summaryrefslogtreecommitdiff
path: root/nix/hm-module.nix
diff options
context:
space:
mode:
authorJacob Birkett <spikespaz@outlook.com>2023-08-12 07:22:37 -0500
committerGitHub <noreply@github.com>2023-08-12 15:22:37 +0300
commitd20837bef8a41d6bf1732b0e8968b7f2feb9a93f (patch)
tree18c41efeead244cf5ba778c4a80862da714b6e71 /nix/hm-module.nix
parent3f7f4207a6dd8bd217c01514ea40e9e4b9b7874a (diff)
Nix: corrections for overlays, overrideable systems (#2929)
* nix: overlays: move waybar-hyprland to own overlay * flake: use legacyPackages for formatter Run `nix fmt` for all files. * flake: move default overlay to nix/overlays.nix * nix: lib: remove lib * nix: overlays: extras: explicitly include xdph overlays * nix: use interpolation for versions * nix: overlays: include deps with hyprland-packages * flake: make systems overrideable * flake: packages: inherit from overlaid pkgsFor
Diffstat (limited to 'nix/hm-module.nix')
-rw-r--r--nix/hm-module.nix26
1 files changed, 19 insertions, 7 deletions
diff --git a/nix/hm-module.nix b/nix/hm-module.nix
index 133c0ef6..705ddf86 100644
--- a/nix/hm-module.nix
+++ b/nix/hm-module.nix
@@ -119,10 +119,14 @@ 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.'' ]
+ 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 =
@@ -138,9 +142,17 @@ in {
exec-once=${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP && systemctl --user start hyprland-session.target
'')
+ 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)
- + (if cfg.extraConfig != null then cfg.extraConfig else "");
+ plugin =
+ if lib.types.package.check entry
+ then "${entry}/lib/lib${entry.pname}.so"
+ else entry;
+ in "plugin = ${plugin}\n")
+ cfg.plugins)
+ + (
+ if cfg.extraConfig != null
+ then cfg.extraConfig
+ else ""
+ );
onChange = let
hyprlandPackage =