rove to luks

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2024-10-22 23:59:13 -04:00
parent bedef50435
commit e00d40fa55
No known key found for this signature in database
GPG Key ID: 47940175096C1330
3 changed files with 33 additions and 21 deletions

View File

@ -8,6 +8,7 @@
imports = [ imports = [
./attic.nix ./attic.nix
./docker ./docker
./hardware-changes.nix
./hydra.nix ./hydra.nix
./minio.nix ./minio.nix
./networking.nix ./networking.nix

View File

@ -0,0 +1,32 @@
{ ... }:
{
boot.initrd.luks.devices = {
"nixos-pv" = {
device = "/dev/disk/by-uuid/l1H5s7-l3Tx-tDci-zgcx-iKPz-R7jg-Vnp8J2";
preLVM = true;
allowDiscards = true;
};
};
fileSystems = {
"/".options = [
"noatime"
"nodiratime"
"discard"
];
"/home".options = [
"noatime"
"nodiratime"
"discard"
];
"/boot".option = [
"noatime"
"nodiratime"
"discard"
];
};
}

View File

@ -4,31 +4,10 @@
pkgs, pkgs,
... ...
}: }:
let
bootkey = key: { "/crypto/keys/${key}" = /crypto/keys/${key}; };
zfskeys = [
"zfs-attic-key"
"zfs-backup-key"
"zfs-calibre-key"
"zfs-db-key"
"zfs-docker-key"
"zfs-games-key"
"zfs-hydra-key"
"zfs-libvirt-key"
"zfs-main-key"
"zfs-nxtcld-key"
"zfs-torr-key"
"zfs-var-docker-key"
"zfs-nix-store-key"
"zfs-archiveteam-key"
"zfs-minio-key"
];
in
{ {
boot = { boot = {
zfs.extraPools = [ "ZFS-primary" ]; zfs.extraPools = [ "ZFS-primary" ];
filesystem = "zfs"; filesystem = "zfs";
initrd.secrets = lib.mergeAttrsList (map bootkey zfskeys);
extraModprobeConfig = '' extraModprobeConfig = ''
options zfs zfs_arc_min=82463372083 options zfs zfs_arc_min=82463372083
options zfs zfs_arc_max=192414534860 options zfs zfs_arc_max=192414534860