diff --git a/capibara.nix b/capibara.nix index 20fa20b..7ce0fbf 100644 --- a/capibara.nix +++ b/capibara.nix @@ -5,6 +5,7 @@ { config, pkgs, stablePkgs, impermanence, ... }: let home = "/home/rilla"; + in { imports = [ ./nixos/hardware-configuration/capibara.nix ./nixos/common.nix ]; @@ -14,18 +15,32 @@ in { extraSpecialArgs.stablePkgs = stablePkgs; }; - #fileSystems = { - # "/home/rilla/Music" = { - # device = "narwhal:/music"; - # fsType = "nfs"; - # options = [ - # "nfsvers=4" - # "noauto" - # "x-systemd.automount" - # "x-systemd.idle-timeout=1min" - # ]; - # }; - #}; + fileSystems = { + "/persist" = { + device = "/dev/mapper/root"; + fsType = "btrfs"; + options = [ "subvol=persist" "compress=zstd" ]; + neededForBoot = true; + }; + + "/nix" = { + device = "/dev/mapper/root"; + fsType = "btrfs"; + options = [ "subvol=nix" "compress=zstd" ]; + }; + + "/boot" = { + device = "/dev/mapper/root"; + fsType = "btrfs"; + options = [ "subvol=boot" "compress=zstd" ]; + }; + + "/swap" = { + device = "/dev/mapper/root"; + fsType = "btrfs"; + options = [ "subvol=swap" ]; + }; + }; environment.variables = { NIXOS_CONFIG = "${home}/configs/nix-config/capibara.nix"; @@ -50,27 +65,20 @@ in { efiInstallAsRemovable = false; enable = true; version = 2; - device = "/dev/disk/by-id/ata-KINGSTON_SKC600MS512G_50026B7783FC3D2F"; + # device = "/dev/disk/by-id/ata-KINGSTON_SKC600MS512G_50026B7783FC3D2F"; + device = "/dev/disk/by-id/ata-WDC_WDBNCE0010PNC_21112S803178"; enableCryptodisk = true; }; }; initrd = { luks.devices = { - system = { - device = "/dev/disk/by-uuid/a5837435-d55e-4506-b256-e5c707d205c3"; - keyFile = "/root_keyfile.bin"; - allowDiscards = true; - }; - user = { + root = { device = "/dev/disk/by-uuid/0fdb839e-dee8-4374-81e6-4455cfc3ae39"; - keyFile = "/data_keyfile.bin"; + keyFile = "/keyfile.bin"; allowDiscards = true; }; }; - secrets = { - "/root_keyfile.bin" = "/boot/root_keyfile.bin"; - "/data_keyfile.bin" = "/boot/data_keyfile.bin"; - }; + secrets = { "/keyfile.bin" = "/boot/keyfile.bin"; }; }; }; diff --git a/nixos/common.nix b/nixos/common.nix index f4fce4a..da92c7e 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -231,30 +231,6 @@ options = [ "defaults" "size=2G" "mode=755" ]; }; - "/persist" = { - device = "/dev/mapper/user"; - fsType = "btrfs"; - options = [ "subvol=persist" "compress=zstd" ]; - neededForBoot = true; - }; - - "/nix" = { - device = "/dev/mapper/system"; - fsType = "btrfs"; - options = [ "subvol=nix" "compress=zstd" ]; - }; - - "/boot" = { - device = "/dev/mapper/system"; - fsType = "btrfs"; - options = [ "subvol=boot" "compress=zstd" ]; - }; - - "/swap" = { - device = "/dev/mapper/system"; - fsType = "btrfs"; - options = [ "subvol=swap" ]; - }; }; swapDevices = [{ device = "/swap/swapfile"; }]; diff --git a/trantor.nix b/trantor.nix index 60a25c7..a65acd1 100644 --- a/trantor.nix +++ b/trantor.nix @@ -20,19 +20,30 @@ in { fsType = "vfat"; }; - #"/home/rilla/Music" = { - # device = "narwhal:/music"; - # fsType = "nfs"; - # options = - # [ "nfsvers=4" "x-systemd.automount" "x-systemd.idle-timeout=1min" ]; - #}; + "/persist" = { + device = "/dev/mapper/user"; + fsType = "btrfs"; + options = [ "subvol=persist" "compress=zstd" ]; + neededForBoot = true; + }; - #"/home/rilla/calibre" = { - # device = "narwhal:/calibre"; - # fsType = "nfs"; - # options = - # [ "nfsvers=4" "x-systemd.automount" "x-systemd.idle-timeout=1min" ]; - #}; + "/nix" = { + device = "/dev/mapper/system"; + fsType = "btrfs"; + options = [ "subvol=nix" "compress=zstd" ]; + }; + + "/boot" = { + device = "/dev/mapper/system"; + fsType = "btrfs"; + options = [ "subvol=boot" "compress=zstd" ]; + }; + + "/swap" = { + device = "/dev/mapper/system"; + fsType = "btrfs"; + options = [ "subvol=swap" ]; + }; };