diff --git a/nix/hm-module.nix b/nix/hm-module.nix index ac149985..3fea6d26 100644 --- a/nix/hm-module.nix +++ b/nix/hm-module.nix @@ -60,7 +60,7 @@ in { }; extraConfig = lib.mkOption { - type = lib.types.lines; + type = lib.types.nullOr lib.types.lines; default = ""; description = '' Extra configuration lines to add to ~/.config/hypr/hyprland.conf. @@ -95,7 +95,7 @@ in { NIXOS_OZONE_WL = "1"; }; - xdg.configFile."hypr/hyprland.conf" = { + xdg.configFile."hypr/hyprland.conf" = lib.mkIf (cfg.extraConfig != null) { text = (lib.optionalString cfg.systemdIntegration '' 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