parent
a58aac47f7
commit
9b98058650
5 changed files with 66 additions and 14 deletions
|
@ -14,8 +14,9 @@
|
||||||
/data/nixos/share/common.nix
|
/data/nixos/share/common.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# our hostname
|
# our hostname and an ID for ZFS
|
||||||
networking.hostName = "beta";
|
networking.hostName = "beta";
|
||||||
|
networking.hostId = "3f20def9";
|
||||||
|
|
||||||
# german laptop keyboard
|
# german laptop keyboard
|
||||||
services.xserver.xkb.layout = "de";
|
services.xserver.xkb.layout = "de";
|
||||||
|
|
|
@ -14,8 +14,9 @@
|
||||||
/data/nixos/share/common.nix
|
/data/nixos/share/common.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# our hostname
|
# our hostname and an ID for ZFS
|
||||||
networking.hostName = "miku";
|
networking.hostName = "miku";
|
||||||
|
networking.hostId = "c132caed";
|
||||||
|
|
||||||
# EurKey layout
|
# EurKey layout
|
||||||
services.xserver.xkb.layout = "eu";
|
services.xserver.xkb.layout = "eu";
|
||||||
|
|
|
@ -14,8 +14,9 @@
|
||||||
/data/nixos/share/common.nix
|
/data/nixos/share/common.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# our hostname
|
# our hostname and an ID for ZFS
|
||||||
networking.hostName = "mini";
|
networking.hostName = "mini";
|
||||||
|
networking.hostId = "e925ccfb";
|
||||||
|
|
||||||
# EurKey layout
|
# EurKey layout
|
||||||
services.xserver.xkb.layout = "eu";
|
services.xserver.xkb.layout = "eu";
|
||||||
|
|
|
@ -14,8 +14,9 @@
|
||||||
/data/nixos/share/common.nix
|
/data/nixos/share/common.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# our hostname
|
# our hostname and an ID for ZFS
|
||||||
networking.hostName = "neko";
|
networking.hostName = "neko";
|
||||||
|
networking.hostId = "cf5a5ee6";
|
||||||
|
|
||||||
# EurKey layout
|
# EurKey layout
|
||||||
services.xserver.xkb.layout = "eu";
|
services.xserver.xkb.layout = "eu";
|
||||||
|
|
|
@ -26,16 +26,8 @@ in
|
||||||
# atm all stuff is x86_64
|
# atm all stuff is x86_64
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
|
|
||||||
# use the latest kernel
|
# enable ZFS
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
|
|
||||||
# allow md devices
|
|
||||||
boot.swraid = {
|
|
||||||
enable = true;
|
|
||||||
mdadmConf = ''
|
|
||||||
MAILADDR=christoph@cullmann.io
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# my kernel parameters
|
# my kernel parameters
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
|
@ -43,6 +35,12 @@ in
|
||||||
"quiet"
|
"quiet"
|
||||||
"splash"
|
"splash"
|
||||||
|
|
||||||
|
# no hibernate for ZFS systems
|
||||||
|
|
||||||
|
# make ARC fast
|
||||||
|
"init_on_alloc=0"
|
||||||
|
"init_on_free=0"
|
||||||
|
|
||||||
# don't check for split locks, for KVM and Co.
|
# don't check for split locks, for KVM and Co.
|
||||||
"split_lock_detect=off"
|
"split_lock_detect=off"
|
||||||
|
|
||||||
|
@ -113,6 +111,28 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# tweak ZFS
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
options zfs zfetch_max_distance=268435456
|
||||||
|
options zfs zfs_arc_meta_limit_percent=75
|
||||||
|
options zfs zfs_arc_min=134217728
|
||||||
|
options zfs zfs_arc_max=4294967296
|
||||||
|
options zfs zfs_compressed_arc_enabled=0
|
||||||
|
options zfs zfs_abd_scatter_enabled=0
|
||||||
|
options zfs zfs_txg_timeout=30
|
||||||
|
options zfs zfs_vdev_scrub_min_active=1
|
||||||
|
options zfs zfs_vdev_scrub_max_active=1
|
||||||
|
options zfs zfs_vdev_sync_write_min_active=8
|
||||||
|
options zfs zfs_vdev_sync_write_max_active=32
|
||||||
|
options zfs zfs_vdev_sync_read_min_active=8
|
||||||
|
options zfs zfs_vdev_sync_read_max_active=32
|
||||||
|
options zfs zfs_vdev_async_read_min_active=8
|
||||||
|
options zfs zfs_vdev_async_read_max_active=32
|
||||||
|
options zfs zfs_vdev_async_write_min_active=8
|
||||||
|
options zfs zfs_vdev_async_write_max_active=32
|
||||||
|
options zfs zfs_vdev_def_queue_depth=128
|
||||||
|
'';
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
@ -227,6 +247,15 @@ in
|
||||||
# kill the tmp content on reboots, we mount that to /nix/persistent to avoid memory fill-up
|
# kill the tmp content on reboots, we mount that to /nix/persistent to avoid memory fill-up
|
||||||
boot.tmp.cleanOnBoot = true;
|
boot.tmp.cleanOnBoot = true;
|
||||||
|
|
||||||
|
# ensure our data is not rotting
|
||||||
|
services.zfs.autoScrub = {
|
||||||
|
enable = true;
|
||||||
|
interval = "weekly";
|
||||||
|
};
|
||||||
|
|
||||||
|
# trim the stuff, we use SSDs
|
||||||
|
services.zfs.trim.enable = true;
|
||||||
|
|
||||||
# enable fast dbus
|
# enable fast dbus
|
||||||
services.dbus.implementation = "broker";
|
services.dbus.implementation = "broker";
|
||||||
|
|
||||||
|
@ -556,6 +585,25 @@ in
|
||||||
mode = "0400";
|
mode = "0400";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# send mails on ZFS events
|
||||||
|
services.zfs.zed = {
|
||||||
|
settings = {
|
||||||
|
ZED_DEBUG_LOG = "/tmp/zed.debug.log";
|
||||||
|
ZED_EMAIL_ADDR = [ "root" ];
|
||||||
|
ZED_EMAIL_PROG = "/run/wrappers/bin/sendmail";
|
||||||
|
ZED_EMAIL_OPTS = "@ADDRESS@";
|
||||||
|
|
||||||
|
ZED_NOTIFY_INTERVAL_SECS = 3600;
|
||||||
|
ZED_NOTIFY_VERBOSE = true;
|
||||||
|
|
||||||
|
ZED_USE_ENCLOSURE_LEDS = true;
|
||||||
|
ZED_SCRUB_AFTER_RESILVER = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# this option does not work; will return error
|
||||||
|
enableMail = false;
|
||||||
|
};
|
||||||
|
|
||||||
# use ZSH per default
|
# use ZSH per default
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
environment.shells = with pkgs; [ zsh ];
|
environment.shells = with pkgs; [ zsh ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue