From 929cfbf0d4620892e6ad1231c32c9c7b8c9265c4 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 25 Dec 2025 19:30:17 +0100 Subject: ... --- system-profiles/bcachefs.nix | 10 ---------- system-profiles/core/default.nix | 5 +---- system-profiles/zfs.nix | 4 ++-- system-profiles/zswap.nix | 25 +++++++++++++++++++++++++ 4 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 system-profiles/zswap.nix (limited to 'system-profiles') diff --git a/system-profiles/bcachefs.nix b/system-profiles/bcachefs.nix index be12bf20..6090c56d 100644 --- a/system-profiles/bcachefs.nix +++ b/system-profiles/bcachefs.nix @@ -2,15 +2,5 @@ config = { boot.supportedFilesystems.bcachefs = true; environment.systemPackages = with pkgs; [ bcachefs-tools ]; - - boot.kernelPatches = [ - { - name = "bcachefs-casefold-fix"; - patch = null; - structuredExtraConfig = with lib.kernel; { - UNICODE = lib.mkOverride 90 no; - }; - } - ]; }; } diff --git a/system-profiles/core/default.nix b/system-profiles/core/default.nix index e5f9dc16..258dd32d 100644 --- a/system-profiles/core/default.nix +++ b/system-profiles/core/default.nix @@ -180,10 +180,7 @@ in { }; environment.systemPackages = with pkgs; [ git-annex scutiger ]; } - ] ++ (optional (options ? system.rebuild.enableNg) { - system.rebuild.enableNg = lib.mkDefault true; - }) - ++ (optional (options ? services.userborn) { + ] ++ (optional (options ? services.userborn) { services.userborn = { enable = lib.mkDefault true; passwordFilesLocation = lib.mkDefault "/var/lib/nixos"; diff --git a/system-profiles/zfs.nix b/system-profiles/zfs.nix index d4a2175f..c20acb9a 100644 --- a/system-profiles/zfs.nix +++ b/system-profiles/zfs.nix @@ -1,8 +1,8 @@ { config, pkgs, lib, ... } : { config = { boot = { - kernelPackages = lib.mkDefault pkgs.linuxPackages_6_12; - zfs.package = lib.mkDefault pkgs.zfs_2_3; + kernelPackages = lib.mkDefault pkgs.linuxPackages_6_18; + zfs.package = lib.mkDefault pkgs.zfs_2_4; supportedFilesystems.zfs = true; }; diff --git a/system-profiles/zswap.nix b/system-profiles/zswap.nix new file mode 100644 index 00000000..ac141f55 --- /dev/null +++ b/system-profiles/zswap.nix @@ -0,0 +1,25 @@ +{ ... }: + +{ + config = { + boot.kernelParams = [ + "zswap.enabled=1" + "zswap.compressor=zstd" + "zswap.zpool=zsmalloc" + "zswap.max_pool_percent=25" + "zswap.accept_threshold_percent=90" + "zswap.shrinker_enabled=1" + ]; + + boot.initrd.kernelModules = [ "zstd" "zsmalloc" ]; + + boot.kernel.sysfs.module.zswap.parameters = { + enabled = true; + compressor = "zstd"; + zpool = "zsmalloc"; + max_pool_percent = 25; + accept_threshold_percent = 90; + shrinker_enabled = true; + }; + }; +} -- cgit v1.2.3