summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Fufezan <fufexan@protonmail.com>2022-12-15 20:53:20 +0200
committerMihai Fufezan <fufexan@protonmail.com>2022-12-17 21:41:22 +0200
commitf59c9a805e7f3686202c36a13364518c0e4ecc9d (patch)
tree599a6a3d74fce6159c16a9a92f6f0a1425dd5039
parent85f50a4a137ded58082680eb721b162fc5d24238 (diff)
nix/module: add nvidiaPatches option
Also fixes wrong package passing.
-rw-r--r--nix/module.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/nix/module.nix b/nix/module.nix
index 69c69c93..bb577d8e 100644
--- a/nix/module.nix
+++ b/nix/module.nix
@@ -11,6 +11,7 @@ with lib; let
defaultHyprlandPackage = inputs.self.packages.${pkgs.system}.default.override {
enableXWayland = cfg.xwayland.enable;
hidpiXWayland = cfg.xwayland.hidpi;
+ nvidiaPatches = cfg.nvidiaPatches;
};
in {
imports = [
@@ -53,6 +54,15 @@ in {
};
};
+ nvidiaPatches = mkOption {
+ type = types.bool;
+ default = false;
+ example = liberalExpression "true";
+ description = ''
+ Patch wlroots for better Nvidia support.
+ '';
+ };
+
recommendedEnvironment = mkOption {
type = types.bool;
default = true;
@@ -66,7 +76,7 @@ in {
config = mkIf cfg.enable {
environment = {
- systemPackages = lib.optional (cfg.package != null) defaultHyprlandPackage;
+ systemPackages = lib.optional (cfg.package != null) cfg.package;
sessionVariables = mkIf cfg.recommendedEnvironment {
NIXOS_OZONE_WL = "1";
@@ -79,14 +89,14 @@ in {
xwayland.enable = mkDefault true;
};
security.polkit.enable = true;
- services.xserver.displayManager.sessionPackages = lib.optional (cfg.package != null) defaultHyprlandPackage;
+ services.xserver.displayManager.sessionPackages = lib.optional (cfg.package != null) cfg.package;
xdg.portal = {
enable = mkDefault true;
# xdg-desktop-portal-hyprland
extraPortals = lib.mkIf (cfg.package != null) [
(inputs.xdph.packages.${pkgs.system}.xdg-desktop-portal-hyprland.override {
hyprland-share-picker = inputs.xdph.packages.${pkgs.system}.hyprland-share-picker.override {
- hyprland = defaultHyprlandPackage;
+ hyprland = cfg.package;
};
})
];