mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 13:50:13 +00:00
add zfs module with options
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
./server.nix
|
||||
./sleep.nix
|
||||
./wifi.nix
|
||||
./zfs.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
|
14
modules/nixos/hardware/zfs.nix
Normal file
14
modules/nixos/hardware/zfs.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
options = { zfs.enable = lib.mkEnableOption "ZFS file system."; };
|
||||
|
||||
config =
|
||||
lib.mkIf (pkgs.stdenv.isLinux && config.server && config.zfs.enable) {
|
||||
|
||||
# Only use compatible Linux kernel, since ZFS can be behind
|
||||
boot.kernelPackages =
|
||||
config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
|
||||
};
|
||||
|
||||
}
|
Reference in New Issue
Block a user