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, ... }:
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"; };
};
};

View File

@ -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"; }];

View File

@ -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" ];
};
};