overhaul
This commit is contained in:
29
zfs.nix
Normal file
29
zfs.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
service_configs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
zfs-key = "/etc/zfs-key";
|
||||
in
|
||||
{
|
||||
system.activationScripts = {
|
||||
"zfs-key".text = ''
|
||||
#!/bin/sh
|
||||
rm -fr ${zfs-key} || true
|
||||
cp ${./secrets/zfs-key} ${zfs-key}
|
||||
'';
|
||||
};
|
||||
|
||||
boot.zfs.package = pkgs.zfs_unstable;
|
||||
boot.initrd.kernelModules = [ "zfs" ];
|
||||
|
||||
boot.kernelParams = [
|
||||
# 2048MB
|
||||
"zfs.zfs_arc_max=2048000000"
|
||||
];
|
||||
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
boot.zfs.extraPools = [ service_configs.zpool ];
|
||||
}
|
||||
Reference in New Issue
Block a user