diff options
author | Milan Pässler <milan@petabyte.dev> | 2020-11-03 13:33:52 +0100 |
---|---|---|
committer | Milan Pässler <milan@petabyte.dev> | 2020-11-03 13:33:52 +0100 |
commit | 3aba5f813f77e94f3f05ea1fd10f15518b82bf13 (patch) | |
tree | 3be8b1b92e4500430f3f5491ec27441badfec3c6 | |
parent | 1e52270b761336cc47f876d7baf618b1da92b4f6 (diff) |
grub2: fix bug where superusers are always set
-rw-r--r-- | modules/grub2/default.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/grub2/default.nix b/modules/grub2/default.nix index d2da4dd6cf0f..bc8280dec26e 100644 --- a/modules/grub2/default.nix +++ b/modules/grub2/default.nix @@ -10,15 +10,16 @@ let "fallback/payload"; configText = (readFile ./files/grub.cfg) + + cfg.extraConfig + (optionalString (cfg.scanDevices) (readFile ./files/grub-scan.cfg)) + - (optionalString (cfg.users != {}) + (optionalString (cfg.users != {}) ( (concatStringsSep "\n" (mapAttrsToList (n: u: '' ${if u.passwordIsHashed then "password_pbkdf2" else "password"} ${n} ${u.password} '') cfg.users)) + '' set superusers="${concatStringsSep " " (attrNames (filterAttrs (n: u: u.superuser) cfg.users))}" export superusers '' - ) + + )) + (optionalString cfg.generateSecondaryPayloadEntries ( concatMapStrings (n: '' menuentry '${removePrefix "img/" n}' { |