diff --git a/hosts/piaf/default.nix b/hosts/piaf/default.nix index c92a4fe..e6ee8a3 100644 --- a/hosts/piaf/default.nix +++ b/hosts/piaf/default.nix @@ -36,5 +36,5 @@ # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "22.11"; # Did you read the comment? + system.stateVersion = "25.05"; # Did you read the comment? } diff --git a/hosts/piaf/disko-config.nix b/hosts/piaf/disko-config.nix index bf50979..7cf0347 100644 --- a/hosts/piaf/disko-config.nix +++ b/hosts/piaf/disko-config.nix @@ -14,58 +14,50 @@ type = "filesystem"; format = "vfat"; mountpoint = "/boot"; - mountOptions = [ "nofail" ]; + mountOptions = [ "nofail" "umask=0077" ]; }; }; - zfs = { + luks = { size = "100%"; + + settings = { + # if you want to use the key for interactive login be sure there is no trailing newline + # for example use `echo -n "password" > /tmp/secret.key` + keyFile = "/tmp/secret.key"; + allowDiscards = true; + }; + # additionalKeyFiles = [ "/tmp/additionalSecret.key" ]; + content = { - type = "zfs"; - pool = "zroot"; + type = "luks"; + name = "crypted"; + + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + + subvolumes = { + "/root" = { + mountpoint = "/"; + }; + "/home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd" ]; + }; + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; + }; + }; + }; }; }; }; }; }; }; - zpool = { - zroot = { - type = "zpool"; - rootFsOptions = { - mountpoint = "none"; - compression = "zstd"; - acltype = "posixacl"; - xattr = "sa"; - "com.sun:auto-snapshot" = "false"; - }; - options.ashift = "12"; - datasets = { - "root" = { - type = "zfs_fs"; - options = { - encryption = "aes-256-gcm"; - keyformat = "passphrase"; - keylocation = "prompt"; - }; - mountpoint = "/"; - - }; - "root/home" = { - type = "zfs_fs"; - options."com.sun:auto-snapshot" = "true"; - mountpoint = "/home"; - }; - "root/var" = { - type = "zfs_fs"; - mountpoint = "/var"; - }; - "root/nix" = { - type = "zfs_fs"; - options.mountpoint = "/nix"; - mountpoint = "/nix"; - }; - }; - }; - }; }; } diff --git a/hosts/piaf/hardware.nix b/hosts/piaf/hardware.nix index 155c879..acf75b5 100644 --- a/hosts/piaf/hardware.nix +++ b/hosts/piaf/hardware.nix @@ -2,7 +2,7 @@ { # Kernel - boot.kernelPackages = pkgs.linuxPackages_6_16; + boot.kernelPackages = pkgs.linuxPackages_6_17; # Boot boot.loader.systemd-boot.enable = true;