nix/nixos/default-hardware.nix

52 lines
1.1 KiB
Nix

{ config, pkgs, ... }:
{
imports = [./default.nix];
# boot
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# zfs
boot.initrd.supportedFilesystems = ["zfs"]; # boot from zfs
boot.supportedFilesystems = [ "zfs" ];
#boot.kernelParams = [ "nohibernate" ];
services.zfs.autoScrub.enable = true;
services.zrepl = {
enable = true;
settings = {
global.monitoring = [{
type = "prometheus";
listen = ":9091";
}];
jobs = [{
name = "fireStore";
type = "source";
serve = {
type = "stdinserver";
client_identities = [ "fireStore" ];
};
snapshotting = {
type = "periodic";
interval = "24h";
prefix = "zrepl_fireStore_";
};
send.encrypted = false;
filesystems = {
"zroot/ROOT<" = true;
"zroot/ROOT" = false;
"zroot/local<" = false;
"zroot/local/nix" = false;
"zroot/data<" = true;
"zroot/data" = false;
"zroot/home<" = true;
"zroot/home" = false;
};
}];
};
};
networking.useNetworkd = true;
networking.useDHCP = false;
}