mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
chore: switch to zfs on luks
This commit is contained in:
parent
14ef8ef877
commit
cdd35390fb
2 changed files with 11 additions and 8 deletions
|
@ -16,7 +16,7 @@
|
||||||
partitions = [
|
partitions = [
|
||||||
(partEfi "efi" "0%" "1GiB")
|
(partEfi "efi" "0%" "1GiB")
|
||||||
(partSwap "swap" "1GiB" "17GiB")
|
(partSwap "swap" "1GiB" "17GiB")
|
||||||
(partZfs "rpool" "17GiB" "100%")
|
(partLuksZfs "rpool" "17GiB" "100%")
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
17
nix/lib.nix
17
nix/lib.nix
|
@ -69,11 +69,17 @@ in rec {
|
||||||
randomEncryption = true;
|
randomEncryption = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
partZfs = name: start: end: {
|
partLuksZfs = name: start: end: {
|
||||||
inherit name start end;
|
inherit start end;
|
||||||
|
name = "enc-${name}";
|
||||||
content = {
|
content = {
|
||||||
type = "zfs";
|
type = "luks";
|
||||||
pool = name;
|
name = "enc-${name}";
|
||||||
|
extraOpenArgs = ["--allow-discards"];
|
||||||
|
content = {
|
||||||
|
type = "zfs";
|
||||||
|
pool = name;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -90,9 +96,6 @@ in rec {
|
||||||
mountpoint = "none";
|
mountpoint = "none";
|
||||||
canmount = "off";
|
canmount = "off";
|
||||||
devices = "off";
|
devices = "off";
|
||||||
encryption = "aes-256-gcm";
|
|
||||||
keyformat = "passphrase";
|
|
||||||
keylocation = "prompt";
|
|
||||||
};
|
};
|
||||||
options.ashift = "12";
|
options.ashift = "12";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue