system: Move ZFS stuff to own system module
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
0a742a728e
commit
3302058f35
2 changed files with 14 additions and 7 deletions
|
@ -1,10 +1,11 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../secrets/machines/back.nix
|
../secrets/machines/back.nix
|
||||||
../system/baremetal-server.nix
|
../system/baremetal-server.nix
|
||||||
../system/ucode-intel.nix
|
../system/ucode-intel.nix
|
||||||
|
../system/zfs.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
@ -46,8 +47,6 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/mapper/nixos-root";
|
device = "/dev/mapper/nixos-root";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
|
@ -76,8 +75,4 @@
|
||||||
device = "/dev/md0";
|
device = "/dev/md0";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.zfs.autoScrub.enable = true;
|
|
||||||
services.zfs.autoSnapshot.enable = true;
|
|
||||||
services.zfs.trim.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
12
system/zfs.nix
Normal file
12
system/zfs.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||||
|
boot.supportedFilesystems = [ "boot" ];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ zfs ];
|
||||||
|
|
||||||
|
services.zfs.autoScrub.enable = true;
|
||||||
|
services.zfs.autoSnapshot.enable = true;
|
||||||
|
services.zfs.trim.enable = true;
|
||||||
|
}
|
Loading…
Reference in a new issue