From d20837bef8a41d6bf1732b0e8968b7f2feb9a93f Mon Sep 17 00:00:00 2001 From: Jacob Birkett Date: Sat, 12 Aug 2023 07:22:37 -0500 Subject: 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 --- nix/hm-module.nix | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'nix/hm-module.nix') 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 = -- cgit v1.2.3