Update systems/nixos-fw16/default.nix #7

Merged
tristan merged 3 commits from tristan-patch-1 into main 2024-06-20 18:29:50 +00:00
2 changed files with 49 additions and 19 deletions

View file

@ -58,7 +58,15 @@
}; };
initrd = { initrd = {
availableKernelModules = [ "nvme" "xhci_pci" "uas" "usbhid" "usb_storage" "sd_mod" ]; availableKernelModules = [
"nvme"
"xhci_pci"
"thunderbolt"
"uas" # needed ?
"usbhid"
"usb_storage"
"sd_mod"
];
kernelModules = [ ]; kernelModules = [ ];
systemd.enable = true; systemd.enable = true;
}; };

View file

@ -8,30 +8,34 @@
}: { }: {
# bcachefs format \ # bcachefs format \
# --metadata_replicas=2 \
# --data_replicas=1 \
# --background_compression=zstd \
# --discard \ # --discard \
# --metadata_replicas=2 # --label=ssd.ssd_4t /dev/mapper/crypt_ssd_4t_data \
# --data_replicas=1 # --label=ssd.ssd_2t /dev/mapper/crypt_ssd_2t_data
# --label=ssd.ssd_2t /dev/mapper/crypted_ssd_2t \
# --label=ssd.ssd_4t /dev/mapper/crypted_ssd_4t \
# --background_compression=zstd
boot = { boot = {
supportedFilesystems = [ "bcachefs" "vfat" ]; supportedFilesystems = [ "bcachefs" "vfat" ];
initrd.supportedFilesystems = [ "bcachefs" "vfat" ]; initrd.supportedFilesystems = [ "bcachefs" "vfat" ];
initrd.luks.devices = { initrd.luks.devices = lib.attrsets.mergeAttrsList
# "crypted_1" = { (lib.lists.forEach [
# device = "/dev/disk/by-uuid/9cca6269-6afa-4f77-92ff-2e9eb8fc9bc7"; "crypt_ssd_4t_data"
# allowDiscards = true; "crypt_ssd_4t_swap"
# bypassWorkqueues = true; "crypt_ssd_2t_data"
# crypttabExtraOpts = [ "nofail" ]; "crypt_ssd_2t_swap"
# }; ]
}; (drive: {
"${drive}" = {
device = "/dev/disk/by-partlabel/${drive}";
allowDiscards = true;
bypassWorkqueues = true;
# crypttabExtraOpts = [ "nofail" ];
};
})
);
}; };
swapDevices = [
# { device = "/dev/disk/by-uuid/83b6aa0a-ff9f-40ef-b728-6540bd5c9365"; }
];
fileSystems = fileSystems =
let let
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
@ -48,7 +52,19 @@
]; ];
in in
{ {
# TODO Add system partitions "/" =
{
device = "UUID=f89215ba-3313-42d3-8f68-051ad2453870";
fsType = "bcachefs";
options = [ "relatime" ];
};
"/boot" =
{
device = "/dev/disk/by-uuid/05A2-6A8A";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
"/mnt/ServerF" = { "/mnt/ServerF" = {
# device = "//srv-nas-01.local/Server_F"; # device = "//srv-nas-01.local/Server_F";
@ -62,6 +78,7 @@
fsType = "cifs"; fsType = "cifs";
options = smb_opts; options = smb_opts;
}; };
# "/mnt/media_v2" = { # "/mnt/media_v2" = {
# device = "root@23.88.68.113:/media_v2"; # device = "root@23.88.68.113:/media_v2";
# fsType = "sshfs"; # fsType = "sshfs";
@ -69,5 +86,10 @@
# }; # };
}; };
swapDevices = [
{ device = "/dev/disk/by-uuid/a8f478f0-ad5e-47ae-8e18-63060f7e5706"; }
{ device = "/dev/disk/by-uuid/59987b2a-c5c5-4547-95ad-f0d1dcdf8458"; }
];
system.fsPackages = [ pkgs.sshfs ]; system.fsPackages = [ pkgs.sshfs ];
} }