From 67396f09a845fcb08170dc20a8c4a1f729afa39b Mon Sep 17 00:00:00 2001 From: blahai Date: Sun, 15 Dec 2024 19:26:54 +0200 Subject: [PATCH] Nyx: more zfs stuff --- hosts/nyx/configuration.nix | 5 ++++- hosts/nyx/hardware-configuration.nix | 28 +++++++++++++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/hosts/nyx/configuration.nix b/hosts/nyx/configuration.nix index 55f21ce..92b0b0a 100644 --- a/hosts/nyx/configuration.nix +++ b/hosts/nyx/configuration.nix @@ -21,13 +21,16 @@ supportedFilesystems = [ "zfs" ]; zfs = { forceImportRoot = false; - extraPools = [ "zpool" ]; + extraPools = [ "zpool" "zootfs" ]; devNodes = "/dev/disk/by-id"; package = pkgs-smol.zfs; allowHibernation = true; # might cause corruption? }; kernelPackages = pkgs-smol.linuxPackages_6_12; kernel = { sysctl = { "vm.max_map_count" = 2147483642; }; }; + kernelParams = [ + "elevator=none" # for zfs + ]; }; zramSwap = { diff --git a/hosts/nyx/hardware-configuration.nix b/hosts/nyx/hardware-configuration.nix index 5b8b2d9..3433bd9 100644 --- a/hosts/nyx/hardware-configuration.nix +++ b/hosts/nyx/hardware-configuration.nix @@ -1,6 +1,3 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. { config, lib, pkgs, modulesPath, ... }: { @@ -35,6 +32,25 @@ options = [ "zfsutil" ]; }; + fileSystems."/mnt/zootfs/Storage" = { + device = "zootfs/Storage"; + fsType = "zfs"; + options = [ "zfsutil" ]; + }; + + fileSystems."/mnt/zootfs/Media" = { + device = "zootfs/Media"; + fsType = "zfs"; + options = [ "zfsutil" ]; + }; + + # https://github.com/atuinsh/atuin/issues/952#issuecomment-1902164562 + fileSystems."/home/pingu/.local/share/atuin" = { + device = "/dev/zvol/zpool/nixos/atuin"; + fsType = "ext4"; + options = [ "async" "auto" "nofail" ]; + }; + fileSystems."/boot" = { device = "/dev/disk/by-label/BOOT"; fsType = "vfat"; @@ -55,13 +71,7 @@ swapDevices = [{ device = "/dev/disk/by-uuid/04281bd7-784a-4287-b4f2-ce406d2ab6ac"; }]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp13s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp14s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = true;