From d425db9f19c3b446aaafc2c970878badd097a090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20R=C3=B6ger?= Date: Thu, 9 Apr 2026 18:02:03 +0200 Subject: [PATCH] System Gen149 @ 2026-04-09-18:02:02 by jonas@monolith --- hosts/monolith/configuration.nix | 2 ++ hosts/monolith/default.nix | 1 + modules/system/ntsync.nix | 16 +++++++--------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/hosts/monolith/configuration.nix b/hosts/monolith/configuration.nix index 0f047fe..84f724c 100644 --- a/hosts/monolith/configuration.nix +++ b/hosts/monolith/configuration.nix @@ -74,6 +74,7 @@ clientIdSopsKey = config.sops.secrets.spotifyShortcutsClientId.name; clientSecretSopsKey = config.sops.secrets.spotifyShortcutsClientSecret.name; }; + hive.ntsync.enable = false; # system packages environment.systemPackages = with pkgs; [ @@ -171,6 +172,7 @@ boot.plymouth.enable = true; boot.initrd.systemd.enable = true; boot.supportedFilesystems = ["ntfs"]; + boot.kernelPackages = pkgs.linuxPackages_latest; # Configure console keymap console.keyMap = "de"; diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index f23bebb..65a1ea5 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -32,6 +32,7 @@ self.nixosModules.firefox self.nixosModules.kdeconnect self.nixosModules.spotify-shortcuts + self.nixosModules.ntsync ]; }; } diff --git a/modules/system/ntsync.nix b/modules/system/ntsync.nix index 9a86b49..2d8cf27 100644 --- a/modules/system/ntsync.nix +++ b/modules/system/ntsync.nix @@ -2,21 +2,19 @@ flake.nixosModules.ntsync = { config, lib, - pkgs, ... }: let - current_kernel_pkgs = pkgs.linuxPackages_latest; - current_kernel_version = current_kernel_pkgs.kernel.version; cfg = config.hive.ntsync; in { - options.hive.ntsync.enable = lib.mkEnableOption "Enable the nt-sync kernel driver. Enforces a minimum kernel version of 6.14."; + options.hive.ntsync.enable = lib.mkEnableOption "Enable the nt-sync kernel driver."; config = lib.mkIf cfg.enable { - # Require at least 6.14 for the new nt-sync driver - boot.kernelPackages = - if lib.versionAtLeast current_kernel_version "6.14" - then current_kernel_pkgs - else pkgs.linuxPackages_6_14; + assertions = [ + { + assertion = lib.versionAtLeast config.boot.kernelModules.kernel.version "6.14"; + message = "ntsync requires at least linux 6.14"; + } + ]; boot.kernelModules = ["ntsync"]; };