mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 06:18:52 +08:00
longer wait time for manually unlocked device
This commit is contained in:
parent
0ab92b8ba2
commit
bf276b1d19
@ -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 =
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user