This commit is contained in:
Christoph Cullmann 2024-10-29 18:06:21 +01:00
parent 86dd3efcdb
commit 922366910b
No known key found for this signature in database
5 changed files with 5 additions and 66 deletions

View file

@ -14,9 +14,8 @@
/data/nixos/share/common.nix
];
# our hostname and an ID for ZFS
# our hostname
networking.hostName = "beta";
networking.hostId = "3f20def9";
# german laptop keyboard
services.xserver.xkb.layout = "de";

View file

@ -14,9 +14,8 @@
/data/nixos/share/common.nix
];
# our hostname and an ID for ZFS
# our hostname
networking.hostName = "miku";
networking.hostId = "c132caed";
# EurKey layout
services.xserver.xkb.layout = "eu";

View file

@ -14,9 +14,8 @@
/data/nixos/share/common.nix
];
# our hostname and an ID for ZFS
# our hostname
networking.hostName = "mini";
networking.hostId = "e925ccfb";
# EurKey layout
services.xserver.xkb.layout = "eu";

View file

@ -14,9 +14,8 @@
/data/nixos/share/common.nix
];
# our hostname and an ID for ZFS
# our hostname
networking.hostName = "neko";
networking.hostId = "cf5a5ee6";
# EurKey layout
services.xserver.xkb.layout = "eu";

View file

@ -28,44 +28,15 @@ in
# atm all stuff is x86_64
nixpkgs.hostPlatform = "x86_64-linux";
# enable ZFS
boot.supportedFilesystems = [ "zfs" ];
# my kernel parameters
boot.kernelParams = [
# no hibernate for ZFS systems
# no hibernate
"nohibernate"
# make ARC fast
"init_on_alloc=0"
"init_on_free=0"
# don't check for split locks, for KVM and Co.
"split_lock_detect=off"
];
# 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.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -158,15 +129,6 @@ in
# kill the tmp content on reboots, we mount that to /nix/persistent to avoid memory fill-up
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
services.dbus.implementation = "broker";
@ -524,25 +486,6 @@ in
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
programs.zsh.enable = true;
environment.shells = with pkgs; [ zsh ];