diff --git a/docs/src/README.md b/docs/src/README.md index 1fc179d..67fdca3 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -105,6 +105,8 @@ Here is a minimal required configuration.nix (the TODOs mention a required chang # hyprland.monitor = [ # # default # "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}" + # # second example monitor + # "DP-2,3440x1440@180,auto,1" # # all others # ",highrr,auto,1" # ]; diff --git a/example/hosts/example/configuration.nix b/example/hosts/example/configuration.nix index 95ace40..20a5134 100644 --- a/example/hosts/example/configuration.nix +++ b/example/hosts/example/configuration.nix @@ -59,6 +59,8 @@ # hyprland.monitor = [ # # default # "${config.conf.defaultMonitor},${config.conf.defaultMonitorMode},0x0,${config.conf.defaultMonitorScale}" + # # second example monitor + # "DP-2,3440x1440@180,auto,1" # # all others # ",highrr,auto,1" # ]; diff --git a/modules/conf.nix b/modules/conf.nix index d7d30c0..8bed977 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -39,6 +39,17 @@ ''; }; + additionalBootKernalParams = lib.mkOption { + default = [ + "video=${config.conf.defaultMonitor}:${config.conf.defaultMonitorMode}" + ]; + example = [ ]; + type = with lib.types; listOf str; + description = '' + additional kernelParams passed to bootloader + ''; + }; + defaultMonitor = lib.mkOption { default = ""; example = "eDP-1"; @@ -204,7 +215,10 @@ config = (lib.optionalAttrs (options ? system.stateVersion) { - boot.kernelPackages = lib.mkIf (config.conf.kernelOverride != null) config.conf.kernel; + boot = { + kernelPackages = lib.mkIf (config.conf.kernelOverride != null) config.conf.kernel; + kernelParams = config.conf.additionalBootKernalParams; + }; system.stateVersion = config.conf.systemStateVersion; }) // (lib.optionalAttrs (options ? home.stateVersion) {