mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 11:08:44 +08:00
整理swap
This commit is contained in:
parent
53c94c46ee
commit
2377533a96
@ -141,6 +141,7 @@
|
||||
};
|
||||
mdadm =
|
||||
"ARRAY /dev/md/swap metadata=1.2 name=chn-PC:swap UUID=2b546b8d:e38007c8:02990dd1:df9e23a4";
|
||||
swap = [ "/dev/mapper/swap" ];
|
||||
};
|
||||
};}
|
||||
)
|
||||
|
@ -19,7 +19,6 @@ inputs:
|
||||
# sudo $(dirname $(realpath $(which systemctl)))/../lib/systemd/systemd-cryptsetup \
|
||||
# attach swap /dev/md/swap - fido2-device=auto
|
||||
# sudo mkswap --uuid clear /dev/mapper/swap
|
||||
swapDevices = [ { device = "/dev/mapper/swap"; } ];
|
||||
|
||||
# kernel, modules, ucode
|
||||
boot.kernelPackages = inputs.pkgs.linuxPackages_xanmod_latest;
|
||||
|
@ -12,6 +12,7 @@ inputs:
|
||||
decrypt.auto = mkOption { type = types.attrsOf (types.submodule { options =
|
||||
{ mapper = mkOption { type = types.nonEmptyStr; }; ssd = mkOption { type = types.bool; }; }; }); };
|
||||
mdadm = mkOption { type = types.nullOr types.str; };
|
||||
swap = mkOption { type = types.listOf types.nonEmptyStr; };
|
||||
|
||||
# swap and resume
|
||||
# swap != resume.device if swap is a file
|
||||
@ -52,6 +53,7 @@ inputs:
|
||||
)
|
||||
(inputs.localLib.attrsToList inputs.config.nixos.fileSystems.mount.btrfs)))
|
||||
);
|
||||
swapDevices = builtins.map (device: { device = device; }) inputs.config.nixos.fileSystems.swap;
|
||||
boot.initrd =
|
||||
{
|
||||
luks.devices =
|
||||
|
Loading…
Reference in New Issue
Block a user