machines: enable regular btrfs scrub on all machines
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
30b0913a3a
commit
9d4477ff82
6 changed files with 20 additions and 4 deletions
|
@ -4,6 +4,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
../secrets/machines/back.nix
|
../secrets/machines/back.nix
|
||||||
../system/baremetal-server.nix
|
../system/baremetal-server.nix
|
||||||
|
../system/btrfs.nix
|
||||||
../system/ucode-intel.nix
|
../system/ucode-intel.nix
|
||||||
../system/zfs.nix
|
../system/zfs.nix
|
||||||
];
|
];
|
||||||
|
@ -33,6 +34,11 @@
|
||||||
options = [ "noatime" "subvol=@" ];
|
options = [ "noatime" "subvol=@" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/md0";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/home" = {
|
fileSystems."/home" = {
|
||||||
device = "/dev/mapper/nixos-root";
|
device = "/dev/mapper/nixos-root";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
|
@ -51,10 +57,7 @@
|
||||||
options = [ "noatime" "compress=zstd" "subvol=@log" ];
|
options = [ "noatime" "compress=zstd" "subvol=@log" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
services.btrfs.autoScrub.fileSystems = [ "/" ];
|
||||||
device = "/dev/md0";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.backup = {
|
users.users.backup = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|
|
@ -27,6 +27,7 @@ in {
|
||||||
../services/node-exporter.nix
|
../services/node-exporter.nix
|
||||||
../services/restic-client.nix
|
../services/restic-client.nix
|
||||||
../services/web/c8h4-io.nix
|
../services/web/c8h4-io.nix
|
||||||
|
../system/btrfs.nix
|
||||||
../system/virtual-machine.nix
|
../system/virtual-machine.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -67,6 +68,8 @@ in {
|
||||||
options = [ "noatime" "compress=zstd" "subvol=@log" ];
|
options = [ "noatime" "compress=zstd" "subvol=@log" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.btrfs.autoScrub.fileSystems = [ "/" ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ wireguard-tools ];
|
environment.systemPackages = with pkgs; [ wireguard-tools ];
|
||||||
|
|
||||||
networking.hosts = my.homelab.hosts;
|
networking.hosts = my.homelab.hosts;
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
../services/tt-rss.nix
|
../services/tt-rss.nix
|
||||||
../services/vaultwarden.nix
|
../services/vaultwarden.nix
|
||||||
../system/baremetal-server.nix
|
../system/baremetal-server.nix
|
||||||
|
../system/btrfs.nix
|
||||||
../system/ucode-amd.nix
|
../system/ucode-amd.nix
|
||||||
../system/zfs.nix
|
../system/zfs.nix
|
||||||
];
|
];
|
||||||
|
@ -72,6 +73,8 @@
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.btrfs.autoScrub.fileSystems = [ "/" ];
|
||||||
|
|
||||||
home-manager.users.christoph = {
|
home-manager.users.christoph = {
|
||||||
home.packages = with pkgs; [ tagutil ];
|
home.packages = with pkgs; [ tagutil ];
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../system/bluetooth.nix
|
../system/bluetooth.nix
|
||||||
|
../system/btrfs.nix
|
||||||
../system/desktop.nix
|
../system/desktop.nix
|
||||||
../system/laptop.nix
|
../system/laptop.nix
|
||||||
../system/printing.nix
|
../system/printing.nix
|
||||||
|
@ -32,6 +33,8 @@
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.btrfs.autoScrub.fileSystems = [ "/" "/home" ];
|
||||||
|
|
||||||
console.keyMap = "dvorak";
|
console.keyMap = "dvorak";
|
||||||
powerManagement.cpuFreqGovernor = "powersave";
|
powerManagement.cpuFreqGovernor = "powersave";
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
../secrets/machines/zero.nix
|
../secrets/machines/zero.nix
|
||||||
../system/automation-target.nix
|
../system/automation-target.nix
|
||||||
|
../system/btrfs.nix
|
||||||
../system/desktop.nix
|
../system/desktop.nix
|
||||||
../system/ucode-amd.nix
|
../system/ucode-amd.nix
|
||||||
];
|
];
|
||||||
|
@ -45,6 +46,8 @@
|
||||||
options = [ "noatime" "subvol=@log" ];
|
options = [ "noatime" "subvol=@log" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.btrfs.autoScrub.fileSystems = [ "/" ];
|
||||||
|
|
||||||
networking.interfaces.eno1.wakeOnLan.enable = true;
|
networking.interfaces.eno1.wakeOnLan.enable = true;
|
||||||
|
|
||||||
home-manager.users.christoph = {
|
home-manager.users.christoph = {
|
||||||
|
|
1
system/btrfs.nix
Normal file
1
system/btrfs.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ services.btrfs = { autoScrub.enable = true; }; }
|
Loading…
Reference in a new issue