mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-26 11:55:36 +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
|
disko.nixosModules.disko
|
||||||
{
|
{
|
||||||
server = true;
|
server = true;
|
||||||
|
zfs.enable = true;
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
nixpkgs.overlays = overlays;
|
nixpkgs.overlays = overlays;
|
||||||
@ -36,9 +37,9 @@ nixpkgs.lib.nixosSystem {
|
|||||||
|
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
|
|
||||||
boot.zfs.enabled = true;
|
# boot.zfs.enabled = true;
|
||||||
boot.kernelPackages =
|
# boot.kernelPackages =
|
||||||
config.boot.zfs.package.latestCompatibleLinuxPackages;
|
# config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||||
# boot.zfs.extraPools = [ "mypool" ];
|
# boot.zfs.extraPools = [ "mypool" ];
|
||||||
# services.zfs.autoScrub.enable = true;
|
# services.zfs.autoScrub.enable = true;
|
||||||
# services.zfs.autoScrub.interval = "daily";
|
# services.zfs.autoScrub.interval = "daily";
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
./server.nix
|
./server.nix
|
||||||
./sleep.nix
|
./sleep.nix
|
||||||
./wifi.nix
|
./wifi.nix
|
||||||
|
./zfs.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
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