aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoroutfoxxed <[email protected]>2023-05-03 02:23:41 -0700
committerMihai Fufezan <[email protected]>2023-05-03 13:05:21 +0300
commit5a3c1449194aa70d5eacbd902fa99cc1b2910a30 (patch)
tree7ed65d4da69180812f9ad0c43f1b8674acc1738e
parent4fe5827598a2d573f0c2c4c5f7e5f19e980b11fd (diff)
downloadHyprland-5a3c1449194aa70d5eacbd902fa99cc1b2910a30.tar.gz
Hyprland-5a3c1449194aa70d5eacbd902fa99cc1b2910a30.zip
Add warning about setting hyprland config with home manager
-rw-r--r--nix/hm-module.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/nix/hm-module.nix b/nix/hm-module.nix
index 10b08ab4..db8e544e 100644
--- a/nix/hm-module.nix
+++ b/nix/hm-module.nix
@@ -116,6 +116,13 @@ in {
};
config = lib.mkIf cfg.enable {
+ warnings =
+ if (cfg.systemdIntegration || cfg.plugins != []) && cfg.extraConfig == null then
+ [ ''You have enabled hyprland.systemdIntegration or listed plugins in hyprland.plugins.
+ Your hyprland config will be linked by home manager.
+ Set hyprland.extraConfig or unset hyprland.systemdIntegration and hyprland.plugins to remove this warning.'' ]
+ else [];
+
home.packages =
lib.optional (cfg.package != null) cfg.package
++ lib.optional cfg.xwayland.enable pkgs.xwayland;
@@ -131,7 +138,7 @@ in {
+ lib.concatStrings (builtins.map (entry: let
plugin = if lib.types.package.check entry then "${entry}/lib/lib${entry.pname}.so" else entry;
in "plugin = ${plugin}\n") cfg.plugins)
- + cfg.extraConfig;
+ + (if cfg.extraConfig != null then cfg.extraConfig else "");
onChange = let
hyprlandPackage =