specialisation: replace nesting with named configurations

Co-authored-by: worldofpeace <worldofpeace@protonmail.ch>
This commit is contained in:
Graham Christensen
2020-04-12 08:12:50 -04:00
co-authored by worldofpeace
parent 807ca93fad
commit ec2d28e323
14 changed files with 230 additions and 189 deletions
@@ -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);
}
@@ -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