server settings with zfs
Some checks are pending
Flake.lock / build (push) Waiting to run

This commit is contained in:
Mohamed Chrayed 2024-09-05 18:34:47 +02:00
parent 8e7af0f6ac
commit f31ddf2583
2 changed files with 30 additions and 10 deletions

View File

@ -4,11 +4,36 @@
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.zfs.enabled = true;
services.zfs.autoScrub.enable = true;
fileSystems."/" =
{ device = "zpool/root";
fsType = "zfs";
};
fileSystems."/" = fileSystems."/nix" =
{ device = "/dev/disk/by-partlabel/root"; { device = "zpool/nix";
fsType = "ext4"; fsType = "zfs";
};
fileSystems."/var" =
{ device = "zpool/var";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "zpool/home";
fsType = "zfs";
};
fileSystems."/container" =
{ device = "zpool/container";
fsType = "zfs";
};
fileSystems."/daten" =
{ device = "zpool/daten";
fsType = "zfs";
}; };
fileSystems."/boot" = fileSystems."/boot" =
@ -16,9 +41,4 @@
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };
}
swapDevices = [ {
device = "/var/lib/swapfile";
size = 16*1024;
}];
}

View File

@ -3,7 +3,7 @@
virtualisation.docker = { virtualisation.docker = {
enable = true; enable = true;
autoPrune.enable = true; autoPrune.enable = true;
daemon.settings.data-root = "/docker/data-root"; daemon.settings.data-root = "/container/data-root";
}; };
virtualisation.oci-containers.backend = "docker"; virtualisation.oci-containers.backend = "docker";
users.users.${user}.extraGroups = [ "docker" ]; users.users.${user}.extraGroups = [ "docker" ];