diff options
author | Graham Christensen <graham@grahamc.com> | 2020-04-12 08:56:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-12 08:56:11 -0400 |
commit | 35d8514a9149699cfbf3fe81d62f7b9f59dc2e7e (patch) | |
tree | 3912c62ccc188a62fe7a0bcc1205c02575ad05d5 /nixos/modules/system/boot | |
parent | 99b5068c263b09e5c401e5d677ba57c470aec702 (diff) | |
parent | ec2d28e3233c4c04fe6afe13e828691d099167ae (diff) | |
download | nixlib-35d8514a9149699cfbf3fe81d62f7b9f59dc2e7e.tar nixlib-35d8514a9149699cfbf3fe81d62f7b9f59dc2e7e.tar.gz nixlib-35d8514a9149699cfbf3fe81d62f7b9f59dc2e7e.tar.bz2 nixlib-35d8514a9149699cfbf3fe81d62f7b9f59dc2e7e.tar.lz nixlib-35d8514a9149699cfbf3fe81d62f7b9f59dc2e7e.tar.xz nixlib-35d8514a9149699cfbf3fe81d62f7b9f59dc2e7e.tar.zst nixlib-35d8514a9149699cfbf3fe81d62f7b9f59dc2e7e.zip |
Merge pull request #81848 from grahamc/nested-specialisation
specialisation: replace nesting with named configurations
Diffstat (limited to 'nixos/modules/system/boot')
-rw-r--r-- | nixos/modules/system/boot/loader/grub/install-grub.pl | 5 | ||||
-rw-r--r-- | nixos/modules/system/boot/loader/init-script/init-script-builder.sh | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index ca0fb0248e0e..8df18cbd9013 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -409,7 +409,7 @@ $conf .= "$extraEntries\n" unless $extraEntriesBeforeNixOS; # Find all the children of the current default configuration # Do not search for grand children -my @links = sort (glob "$defaultConfig/fine-tune/*"); +my @links = sort (glob "$defaultConfig/specialisation/*"); foreach my $link (@links) { my $entryName = ""; @@ -425,7 +425,8 @@ foreach my $link (@links) { if ($cfgName) { $entryName = $cfgName; } else { - $entryName = "($date - $version)"; + my $linkname = basename($link); + $entryName = "($linkname - $date - $version)"; } addEntry("NixOS - $entryName", $link); } diff --git a/nixos/modules/system/boot/loader/init-script/init-script-builder.sh b/nixos/modules/system/boot/loader/init-script/init-script-builder.sh index 08d4ab14c9ca..6f48d2539ace 100644 --- a/nixos/modules/system/boot/loader/init-script/init-script-builder.sh +++ b/nixos/modules/system/boot/loader/init-script/init-script-builder.sh @@ -69,7 +69,7 @@ addEntry "NixOS - Default" $defaultConfig "" # Add all generations of the system profile to the menu, in reverse # (most recent to least recent) order. -for link in $((ls -d $defaultConfig/fine-tune/* ) | sort -n); do +for link in $((ls -d $defaultConfig/specialisation/* ) | sort -n); do date=$(stat --printf="%y\n" $link | sed 's/\..*//') addEntry "NixOS - variation" $link "" done |