System Gen149 @ 2026-04-09-18:02:02 by jonas@monolith

This commit is contained in:
2026-04-09 18:02:03 +02:00
parent 075557a871
commit d425db9f19
3 changed files with 10 additions and 9 deletions

View File

@@ -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"];
};