Some more fw16 fixes

This commit is contained in:
Tristan D. 2024-06-20 20:47:43 +02:00
parent 0efa653058
commit ea9ef50418
Signed by: tristan
SSH key fingerprint: SHA256:WtyH40TFEIklkqijla5j9zqbuMV3mE/vC9DA/xVbJZA
2 changed files with 34 additions and 37 deletions

View file

@ -74,10 +74,8 @@
extraModulePackages = [ ];
};
services.btrfs.autoScrub.enable = true;
networking = {
hostName = "nixos-f16";
hostName = "nixos-fw16";
extraHosts = ''
192.168.0.75 monitor.oekonzept.de
192.168.0.151 rosa.oekonzept.de
@ -100,7 +98,7 @@
176.9.242.147 fe3f3294-c93a-4aca-895e-abe6c858dbd5-llama-cpp.redvau.lt
'';
interfaces = {
enp5s0f4u1u1c2 = {
eth0 = {
useDHCP = false;
ipv4.addresses = [
{
@ -128,15 +126,15 @@
# This manually configures the automatically created network-adresses service to be more flexible
# regarding booting without the the device being available on boot
# It prevents slow timeouts & errors on boot while preserving Plug & Play ability
network-addresses-enp5s0f4u1u1c2.unitConfig = {
ConditionPathExists = "/sys/class/net/enp5s0f4u1u1c2";
network-addresses-eth0.unitConfig = {
ConditionPathExists = "/sys/class/net/eth0";
BindsTo = lib.mkForce null;
};
};
};
services.udev.extraRules = ''
ACTION=="add", KERNEL=="enp5s0f4u1u1c2", TAG+="systemd", ENV{SYSTEMD_WANTS}="network-addresses-enp5s0f4u1u1c2.service"
ACTION=="remove", KERNEL=="enp5s0f4u1u1c2", RUN+="${pkgs.systemd}/bin/systemctl stop network-addresses-enp5s0f4u1u1c2.service"
ACTION=="add", KERNEL=="eth0", TAG+="systemd", ENV{SYSTEMD_WANTS}="network-addresses-eth0.service"
ACTION=="remove", KERNEL=="eth0", RUN+="${pkgs.systemd}/bin/systemctl stop network-addresses-eth0.service"
SUBSYSTEM=="pci", ATTR{power/control}="auto"
ACTION=="add", SUBSYSTEM=="serio", DRIVERS=="atkbd", ATTR{power/wakeup}="disabled"
'';

View file

@ -6,7 +6,6 @@
, inputs
, ...
}: {
# bcachefs format \
# --metadata_replicas=2 \
# --data_replicas=1 \
@ -18,22 +17,24 @@
boot = {
supportedFilesystems = [ "bcachefs" "vfat" ];
initrd.supportedFilesystems = [ "bcachefs" "vfat" ];
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" ];
};
})
);
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" ];
};
})
);
};
fileSystems =
@ -52,19 +53,17 @@
];
in
{
"/" =
{
device = "UUID=f89215ba-3313-42d3-8f68-051ad2453870";
fsType = "bcachefs";
options = [ "relatime" ];
};
"/" = {
device = "/dev/mapper/crypt_ssd_4t_data";
fsType = "bcachefs";
options = [ "relatime" ];
};
"/boot" =
{
device = "/dev/disk/by-uuid/05A2-6A8A";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/05A2-6A8A";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
"/mnt/ServerF" = {
# device = "//srv-nas-01.local/Server_F";