Set default password for build-vm-with-bootloader
This commit is contained in:
parent
5ed881f694
commit
354982cf37
1 changed files with 25 additions and 1 deletions
|
@ -124,7 +124,31 @@ in {
|
|||
;
|
||||
in {
|
||||
vmVariant = extendVMConfig vmVariant;
|
||||
vmVariantWithBootLoader = extendVMConfig vmVariantWithBootLoader;
|
||||
vmVariantWithBootLoader =
|
||||
(extendVMConfig vmVariantWithBootLoader) //
|
||||
# Overwrite users with `hashedPasswordFile`s as `sops-nix` does not seem to work with `build-vm-with-bootloader`
|
||||
{
|
||||
users.users = builtins.listToAttrs (
|
||||
builtins.map (
|
||||
name: {
|
||||
inherit name;
|
||||
|
||||
value = {
|
||||
hashedPasswordFile = lib.mkVMOverride null;
|
||||
password = lib.mkVMOverride "test";
|
||||
};
|
||||
})
|
||||
(builtins.filter
|
||||
(
|
||||
name:
|
||||
let
|
||||
user = config.users.users.${name};
|
||||
in
|
||||
(
|
||||
(user.hashedPasswordFile != null)
|
||||
))
|
||||
(builtins.attrNames config.users.users)));
|
||||
};
|
||||
};
|
||||
|
||||
system.build =
|
||||
|
|
Loading…
Reference in a new issue