diff --git a/modules/gui/hypr/land.nix b/modules/gui/hypr/land.nix index 5bfdd066c..881a8737c 100644 --- a/modules/gui/hypr/land.nix +++ b/modules/gui/hypr/land.nix @@ -22,8 +22,9 @@ in { options.myOptions.programs.hypr.land = { enable = mkEnableOption "enable hiper ląd"; startupSound = mkOption { - type = types.path; + type = with types; nullOr path; description = "sound to play on hyprland startup"; + default = null; }; tearing = mkOption { type = types.bool; @@ -78,7 +79,7 @@ in { # adds an equivalent of hm's settings to this module #imports = [ inputs.hyprland.homeManagerModules.default ]; - xdg.dataFile."hypr/startup_sound".source = cfg.startupSound; + xdg.dataFile = mkIf (cfg.startupSound != null) { "hypr/startup_sound".source = cfg.startupSound; }; wayland.windowManager.hyprland = { enable = true; @@ -94,7 +95,7 @@ in { extraConfig = '' bind=$mainMod, W, exec, ${removeSuffix " %U" hmCfg.xdg.desktopEntries.firefox-schizo.exec} bind=$mainMod SHIFT, W, exec, ${removeSuffix " %U" hmCfg.xdg.desktopEntries.firefox-unschizo.exec} - ${if (cfg.startupSound != "") then "exec-once=${pkgs.mpv}/bin/mpv --no-video --volume=100 ${hmCfg.xdg.dataHome}/hypr/startup_sound" else ""} + ${if (cfg.startupSound != null) then "exec-once=${pkgs.mpv}/bin/mpv --no-video --volume=100 ${hmCfg.xdg.dataHome}/hypr/startup_sound" else ""} ''; settings = { "$mainMod" = "SUPER";