diff --git a/machines/back.nix b/machines/back.nix index 56f4c4a..e814f57 100644 --- a/machines/back.nix +++ b/machines/back.nix @@ -4,6 +4,7 @@ imports = [ ../secrets/machines/back.nix ../system/baremetal-server.nix + ../system/btrfs.nix ../system/ucode-intel.nix ../system/zfs.nix ]; @@ -33,6 +34,11 @@ options = [ "noatime" "subvol=@" ]; }; + fileSystems."/boot" = { + device = "/dev/md0"; + fsType = "vfat"; + }; + fileSystems."/home" = { device = "/dev/mapper/nixos-root"; fsType = "btrfs"; @@ -51,10 +57,7 @@ options = [ "noatime" "compress=zstd" "subvol=@log" ]; }; - fileSystems."/boot" = { - device = "/dev/md0"; - fsType = "vfat"; - }; + services.btrfs.autoScrub.fileSystems = [ "/" ]; users.users.backup = { isNormalUser = true; diff --git a/machines/fort.nix b/machines/fort.nix index 46fe4a8..f770210 100644 --- a/machines/fort.nix +++ b/machines/fort.nix @@ -27,6 +27,7 @@ in { ../services/node-exporter.nix ../services/restic-client.nix ../services/web/c8h4-io.nix + ../system/btrfs.nix ../system/virtual-machine.nix ]; @@ -67,6 +68,8 @@ in { options = [ "noatime" "compress=zstd" "subvol=@log" ]; }; + services.btrfs.autoScrub.fileSystems = [ "/" ]; + environment.systemPackages = with pkgs; [ wireguard-tools ]; networking.hosts = my.homelab.hosts; diff --git a/machines/tank.nix b/machines/tank.nix index 33139a1..5bf6479 100644 --- a/machines/tank.nix +++ b/machines/tank.nix @@ -16,6 +16,7 @@ ../services/tt-rss.nix ../services/vaultwarden.nix ../system/baremetal-server.nix + ../system/btrfs.nix ../system/ucode-amd.nix ../system/zfs.nix ]; @@ -72,6 +73,8 @@ fsType = "vfat"; }; + services.btrfs.autoScrub.fileSystems = [ "/" ]; + home-manager.users.christoph = { home.packages = with pkgs; [ tagutil ]; diff --git a/machines/trek.nix b/machines/trek.nix index e61f7e8..4739cb5 100644 --- a/machines/trek.nix +++ b/machines/trek.nix @@ -3,6 +3,7 @@ { imports = [ ../system/bluetooth.nix + ../system/btrfs.nix ../system/desktop.nix ../system/laptop.nix ../system/printing.nix @@ -32,6 +33,8 @@ fsType = "btrfs"; }; + services.btrfs.autoScrub.fileSystems = [ "/" "/home" ]; + console.keyMap = "dvorak"; powerManagement.cpuFreqGovernor = "powersave"; diff --git a/machines/zero.nix b/machines/zero.nix index c40c5dc..ac08680 100644 --- a/machines/zero.nix +++ b/machines/zero.nix @@ -4,6 +4,7 @@ imports = [ ../secrets/machines/zero.nix ../system/automation-target.nix + ../system/btrfs.nix ../system/desktop.nix ../system/ucode-amd.nix ]; @@ -45,6 +46,8 @@ options = [ "noatime" "subvol=@log" ]; }; + services.btrfs.autoScrub.fileSystems = [ "/" ]; + networking.interfaces.eno1.wakeOnLan.enable = true; home-manager.users.christoph = { diff --git a/system/btrfs.nix b/system/btrfs.nix new file mode 100644 index 0000000..ddaaf42 --- /dev/null +++ b/system/btrfs.nix @@ -0,0 +1 @@ +{ services.btrfs = { autoScrub.enable = true; }; }