diff options
author | Mihai Fufezan <[email protected]> | 2022-12-19 23:39:37 +0200 |
---|---|---|
committer | Mihai Fufezan <[email protected]> | 2022-12-19 23:39:37 +0200 |
commit | 781f0adad4dfedb74c5e05c11f95dcb153bbb6ac (patch) | |
tree | fd92d177faae7c7f63ff079da98f593bbcd88dfc /nix/hm-module.nix | |
parent | 668cc93962c738d791993e581443273eaca05086 (diff) | |
download | Hyprland-781f0adad4dfedb74c5e05c11f95dcb153bbb6ac.tar.gz Hyprland-781f0adad4dfedb74c5e05c11f95dcb153bbb6ac.zip |
nix/hm-module: add disableAutoreload option
Diffstat (limited to 'nix/hm-module.nix')
-rw-r--r-- | nix/hm-module.nix | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/nix/hm-module.nix b/nix/hm-module.nix index 4f1f4f6b..4109fe54 100644 --- a/nix/hm-module.nix +++ b/nix/hm-module.nix @@ -13,6 +13,7 @@ self: { in { options.wayland.windowManager.hyprland = { enable = lib.mkEnableOption "hyprland wayland compositor"; + package = lib.mkOption { type = with lib.types; nullOr package; default = defaultHyprlandPackage; @@ -27,6 +28,7 @@ in { be done if you want to use the NixOS module to install Hyprland. ''; }; + systemdIntegration = lib.mkOption { type = lib.types.bool; default = pkgs.stdenv.isLinux; @@ -43,6 +45,18 @@ in { </itemizedlist> ''; }; + + disableAutoreload = lib.mkOption { + type = lib.types.bool; + default = false; + defaultText = lib.literalExpression "false"; + example = lib.literalExpression "true"; + description = '' + Whether to disable automatically reloading Hyprland's configuration when + rebuilding the Home Manager profile. + ''; + }; + xwayland = { enable = lib.mkOption { type = lib.types.bool; @@ -70,7 +84,6 @@ in { ''; }; - extraConfig = lib.mkOption { type = lib.types.nullOr lib.types.lines; default = ""; @@ -119,7 +132,8 @@ in { if cfg.package == null then defaultHyprlandPackage else cfg.package; - in "HYPRLAND_INSTANCE_SIGNATURE=$(ls -w 1 /tmp/hypr | tail -1) ${hyprlandPackage}/bin/hyprctl reload config-only"; + in + lib.mkIf (!cfg.disableAutoreload) "HYPRLAND_INSTANCE_SIGNATURE=$(ls -w 1 /tmp/hypr | tail -1) ${hyprlandPackage}/bin/hyprctl reload config-only"; }; systemd.user.targets.hyprland-session = lib.mkIf cfg.systemdIntegration { |