mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-17 15:09:26 +03:00
Add configurationLimit to systemd-boot to prevent running out of disk space
Refs #23926
This commit is contained in:
parent
8b7c42032e
commit
224a6562a4
2 changed files with 14 additions and 2 deletions
|
@ -133,7 +133,9 @@ def get_generations(profile=None):
|
|||
universal_newlines=True)
|
||||
gen_lines = gen_list.split('\n')
|
||||
gen_lines.pop()
|
||||
return [ (profile, int(line.split()[0])) for line in gen_lines ]
|
||||
|
||||
configurationLimit = @configurationLimit@
|
||||
return [ (profile, int(line.split()[0])) for line in gen_lines ][-configurationLimit:]
|
||||
|
||||
def remove_old_entries(gens):
|
||||
rex_profile = re.compile("^@efiSysMountPoint@/loader/entries/nixos-(.*)-generation-.*\.conf$")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue