mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-24 16:34:53 +00:00
add zfs module with options
This commit is contained in:
parent
30fe7c2d18
commit
d56a48cf65
@ -19,6 +19,7 @@ nixpkgs.lib.nixosSystem {
|
||||
disko.nixosModules.disko
|
||||
{
|
||||
server = true;
|
||||
zfs.enable = true;
|
||||
gui.enable = false;
|
||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||
nixpkgs.overlays = overlays;
|
||||
@ -36,9 +37,9 @@ nixpkgs.lib.nixosSystem {
|
||||
|
||||
neovim.enable = true;
|
||||
|
||||
boot.zfs.enabled = true;
|
||||
boot.kernelPackages =
|
||||
config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
# boot.zfs.enabled = true;
|
||||
# boot.kernelPackages =
|
||||
# config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
# boot.zfs.extraPools = [ "mypool" ];
|
||||
# services.zfs.autoScrub.enable = true;
|
||||
# services.zfs.autoScrub.interval = "daily";
|
||||
|
@ -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;
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user