longer wait time for manually unlocked device

This commit is contained in:
陈浩南 2023-08-01 16:09:26 +08:00
parent 0ab92b8ba2
commit bf276b1d19
2 changed files with 15 additions and 2 deletions

View File

@ -268,6 +268,12 @@
};})
];
};
# sudo usbipd
# ssh -R 3240:127.0.0.1:3240 root@192.168.122.57
# sudo usbip bind -b 3-6
# usbip attach -r 127.0.0.1 -b 3-6
# systemd-cryptenroll --fido2-device=auto /dev/vda2
# systemd-cryptsetup attach root /dev/vda2
"vps6" = inputs.nixpkgs.lib.nixosSystem
{
system = "x86_64-linux";
@ -289,7 +295,7 @@
"/dev/mapper/root" = { "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
};
};
decrypt.manual.enable = true;
decrypt.manual = { enable = true; devices = [ "/dev/mapper/root" ]; };
rollingRootfs = { device = "/dev/mapper/root"; path = "/nix/rootfs"; };
};
packages =

View File

@ -24,7 +24,11 @@ inputs:
});
default = {};
};
manual.enable = mkOption { type = types.bool; default = false; };
manual =
{
enable = mkOption { type = types.bool; default = false; };
devices = mkOption { type = types.listOf types.nonEmptyStr; default = []; };
};
};
mdadm = mkOption { type = types.nullOr types.str; default = null; };
swap = mkOption { type = types.listOf types.nonEmptyStr; default = []; };
@ -136,6 +140,9 @@ inputs:
usbip = "${inputs.config.boot.kernelPackages.usbip}/bin/usbip";
};
};
fileSystems = listToAttrs (map
(device: { name = device; value.options = [ "x-systemd.mount-timeout=1h" ]; })
fileSystems.decrypt.manual.devices);
}
)
# mdadm