diff options
| author | adikro <adikro@disroot.org> | 2026-02-10 22:27:11 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2026-02-10 22:27:11 +0100 |
| commit | 233e5fb7d43a0736857ee6b9f74967f03b73837c (patch) | |
| tree | f46c2b13193e495d14502c6b9849482bce366ee3 /hosts/desktop | |
| parent | 43f1d9649a8cf9043dee99a3e366534134aba57b (diff) | |
...
Diffstat (limited to 'hosts/desktop')
| -rw-r--r-- | hosts/desktop/disko.nix | 208 | ||||
| -rw-r--r-- | hosts/desktop/home.nix | 2 |
2 files changed, 150 insertions, 60 deletions
diff --git a/hosts/desktop/disko.nix b/hosts/desktop/disko.nix index edc4008..78eb6a0 100644 --- a/hosts/desktop/disko.nix +++ b/hosts/desktop/disko.nix @@ -17,43 +17,92 @@ mountOptions = [ "umask=0077" ]; }; }; - root = { + luks = { size = "100%"; content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - "@" = { - mountpoint = "/"; - mountOptions = [ "compress=zstd:1" "noatime" ]; - }; - "@home" = { - mountpoint = "/home"; - mountOptions = [ "compress=zstd:1" "noatime" ]; - }; - "@nix" = { - mountpoint = "/nix"; - mountOptions = [ "compress=zstd:1" "noatime" ]; - }; - "@log" = { - mountpoint = "/var/log"; - mountOptions = [ "compress=zstd:1" "noatime" ]; - }; - "@games" = { - mountpoint = "/games"; - mountOptions = [ "compress=zstd:1" "noatime" ]; - }; - "@llms" = { - mountpoint = "/llms"; - mountOptions = [ "nodatacow" "noatime"]; - }; - "@vms" = { - mountpoint = "/vms"; - mountOptions = [ "nodatacow" "noatime" ]; - }; - "@swap" = { - mountpoint = "/.swapvol"; - mountOptions = [ "nodatacow" "noatime" ]; + type = "luks"; + name = "crypted_main"; + settings.allowDiscards = true; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "root" = { + mountpoint = "/"; + mountOptions = [ + "compress=zstd:1" + "noatime" + "discard=async" + ]; + }; + "nix" = { + mountpoint = "/nix"; + mountOptions = [ + "compress=zstd:1" + "noatime" + "discard=async" + ]; + }; + "home" = { + mountpoint = "/home"; + mountOptions = [ + "compress=zstd:1" + "noatime" + "nosuid" + "nodev" + "discard=async" + ]; + }; + "log" = { + mountpoint = "/var/log"; + mountOptions = [ + "compress=zstd:1" + "noatime" + "nosuid" + "nodev" + "discard=async" + ]; + }; + "games" = { + mountpoint = "/games"; + mountOptions = [ + "compress=zstd:1" + "noatime" + "nosuid" + "nodev" + "discard=async" + ]; + }; + "llms" = { + mountpoint = "/llms"; + mountOptions = [ + "nodatacow" + "compress=none" + "noatime" + "nosuid" + "nodev" + "discard=async" + ]; + }; + "vms" = { + mountpoint = "/vms"; + mountOptions = [ + "nodatacow" + "compress=none" + "noatime" + "nosuid" + "nodev" + "discard=async" + ]; + }; + "swap" = { + mountpoint = "/.swapvol"; + mountOptions = [ + "nodatacow" + "noatime" + "discard=async" + ]; + }; }; }; }; @@ -61,37 +110,78 @@ }; }; }; - media = { + storage = { type = "disk"; device = "/dev/sda"; content = { type = "gpt"; partitions = { - media = { + luks = { size = "100%"; content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - "@archive" = { - mountpoint = "/media/archive"; - mountOptions = [ "compress=zstd:1" "autodefrag" "noatime" ]; - }; - "@movies" = { - mountpoint = "/media/movies"; - mountOptions = [ "autodefrag" "noatime" ]; - }; - "@anime" = { - mountpoint = "/media/anime"; - mountOptions = [ "autodefrag" "noatime" ]; - }; - "@pictures" = { - mountpoint = "/media/pics"; - mountOptions = [ "autodefrag" "noatime" ]; - }; - "@videos" = { - mountpoint = "/media/vids"; - mountOptions = [ "autodefrag" "noatime" ]; + type = "luks"; + name = "crypted_storage"; + keyFile = "/tmp/storage.key"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "archive" = { + mountpoint = "/storage/archive"; + mountOptions = [ + "compress=zstd:1" + "autodefrag" + "noatime" + "nofail" + "nosuid" + "nodev" + "x-systemd.device-timeout=5s" + ]; + }; + "movies" = { + mountpoint = "/storage/movies"; + mountOptions = [ + "autodefrag" + "noatime" + "nofail" + "nosuid" + "nodev" + "x-systemd.device-timeout=5s" + ]; + }; + "anime" = { + mountpoint = "/storage/anime"; + mountOptions = [ + "autodefrag" + "noatime" + "nofail" + "nosuid" + "nodev" + "x-systemd.device-timeout=5s" + ]; + }; + "pictures" = { + mountpoint = "/storage/pics"; + mountOptions = [ + "autodefrag" + "noatime" + "nofail" + "nosuid" + "nodev" + "x-systemd.device-timeout=5s" + ]; + }; + "videos" = { + mountpoint = "/storage/vids"; + mountOptions = [ + "autodefrag" + "noatime" + "nofail" + "nosuid" + "nodev" + "x-systemd.device-timeout=5s" + ]; + }; }; }; }; diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index 5eb1635..ba5777a 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -51,7 +51,7 @@ librewolf.enable = true; brave.enable = true; }; - email.evolution.enable = true; + email.thunderbird.enable = true; media.enable = true; mpv.enable = true; nixcord.enable = true; |
