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 = {
availableKernelModules = [ "nvme" "xhci_pci" "uas" "usbhid" "usb_storage" "sd_mod" ];
availableKernelModules = [
"nvme"
"xhci_pci"
"thunderbolt"
"uas" # needed ?
"usbhid"
"usb_storage"
"sd_mod"
];
kernelModules = [ ];
systemd.enable = true;
};

View file

@ -8,30 +8,34 @@
}: {
# bcachefs format \
# --metadata_replicas=2 \
# --data_replicas=1 \
# --background_compression=zstd \
# --discard \
# --metadata_replicas=2
# --data_replicas=1
# --label=ssd.ssd_2t /dev/mapper/crypted_ssd_2t \
# --label=ssd.ssd_4t /dev/mapper/crypted_ssd_4t \
# --background_compression=zstd
# --label=ssd.ssd_4t /dev/mapper/crypt_ssd_4t_data \
# --label=ssd.ssd_2t /dev/mapper/crypt_ssd_2t_data
boot = {
supportedFilesystems = [ "bcachefs" "vfat" ];
initrd.supportedFilesystems = [ "bcachefs" "vfat" ];
initrd.luks.devices = {
# "crypted_1" = {
# device = "/dev/disk/by-uuid/9cca6269-6afa-4f77-92ff-2e9eb8fc9bc7";
# allowDiscards = true;
# bypassWorkqueues = true;
initrd.luks.devices = lib.attrsets.mergeAttrsList
(lib.lists.forEach [
"crypt_ssd_4t_data"
"crypt_ssd_4t_swap"
"crypt_ssd_2t_data"
"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 =
let
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
{
# 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" = {
# device = "//srv-nas-01.local/Server_F";
@ -62,6 +78,7 @@
fsType = "cifs";
options = smb_opts;
};
# "/mnt/media_v2" = {
# device = "root@23.88.68.113:/media_v2";
# 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 ];
}