restucutred volume mounts

feat/kile-v2
Ricard Illa 2022-05-12 11:00:26 +02:00
parent 138496cb9d
commit 0434701759
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
3 changed files with 55 additions and 60 deletions

View File

@ -5,6 +5,7 @@
{ config, pkgs, stablePkgs, impermanence, ... }: { config, pkgs, stablePkgs, impermanence, ... }:
let home = "/home/rilla"; let home = "/home/rilla";
in { in {
imports = [ ./nixos/hardware-configuration/capibara.nix ./nixos/common.nix ]; imports = [ ./nixos/hardware-configuration/capibara.nix ./nixos/common.nix ];
@ -14,18 +15,32 @@ in {
extraSpecialArgs.stablePkgs = stablePkgs; extraSpecialArgs.stablePkgs = stablePkgs;
}; };
#fileSystems = { fileSystems = {
# "/home/rilla/Music" = { "/persist" = {
# device = "narwhal:/music"; device = "/dev/mapper/root";
# fsType = "nfs"; fsType = "btrfs";
# options = [ options = [ "subvol=persist" "compress=zstd" ];
# "nfsvers=4" neededForBoot = true;
# "noauto" };
# "x-systemd.automount"
# "x-systemd.idle-timeout=1min" "/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 = { environment.variables = {
NIXOS_CONFIG = "${home}/configs/nix-config/capibara.nix"; NIXOS_CONFIG = "${home}/configs/nix-config/capibara.nix";
@ -50,27 +65,20 @@ in {
efiInstallAsRemovable = false; efiInstallAsRemovable = false;
enable = true; enable = true;
version = 2; 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; enableCryptodisk = true;
}; };
}; };
initrd = { initrd = {
luks.devices = { luks.devices = {
system = { root = {
device = "/dev/disk/by-uuid/a5837435-d55e-4506-b256-e5c707d205c3";
keyFile = "/root_keyfile.bin";
allowDiscards = true;
};
user = {
device = "/dev/disk/by-uuid/0fdb839e-dee8-4374-81e6-4455cfc3ae39"; device = "/dev/disk/by-uuid/0fdb839e-dee8-4374-81e6-4455cfc3ae39";
keyFile = "/data_keyfile.bin"; keyFile = "/keyfile.bin";
allowDiscards = true; allowDiscards = true;
}; };
}; };
secrets = { secrets = { "/keyfile.bin" = "/boot/keyfile.bin"; };
"/root_keyfile.bin" = "/boot/root_keyfile.bin";
"/data_keyfile.bin" = "/boot/data_keyfile.bin";
};
}; };
}; };

View File

@ -231,30 +231,6 @@
options = [ "defaults" "size=2G" "mode=755" ]; 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"; }]; swapDevices = [{ device = "/swap/swapfile"; }];

View File

@ -20,19 +20,30 @@ in {
fsType = "vfat"; fsType = "vfat";
}; };
#"/home/rilla/Music" = { "/persist" = {
# device = "narwhal:/music"; device = "/dev/mapper/user";
# fsType = "nfs"; fsType = "btrfs";
# options = options = [ "subvol=persist" "compress=zstd" ];
# [ "nfsvers=4" "x-systemd.automount" "x-systemd.idle-timeout=1min" ]; neededForBoot = true;
#}; };
#"/home/rilla/calibre" = { "/nix" = {
# device = "narwhal:/calibre"; device = "/dev/mapper/system";
# fsType = "nfs"; fsType = "btrfs";
# options = options = [ "subvol=nix" "compress=zstd" ];
# [ "nfsvers=4" "x-systemd.automount" "x-systemd.idle-timeout=1min" ]; };
#};
"/boot" = {
device = "/dev/mapper/system";
fsType = "btrfs";
options = [ "subvol=boot" "compress=zstd" ];
};
"/swap" = {
device = "/dev/mapper/system";
fsType = "btrfs";
options = [ "subvol=swap" ];
};
}; };