From bf99255fc9a092ef0272df598ab70eeecc93ca78 Mon Sep 17 00:00:00 2001 From: Nicholas Sielicki Date: Sat, 26 Nov 2022 16:16:33 -0800 Subject: [PATCH] kitty: silently drop darwin-specific options (#3394) Rather than reject a configuration when this option is set, just silently ignore it when the platform isn't darwin. The name makes it obvious that it won't be applied outside of darwin, and this allows people to use the same configuration between hosts without any special concern. Co-authored-by: Nicholas Sielicki --- modules/programs/kitty.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/programs/kitty.nix b/modules/programs/kitty.nix index 196ecbdbd..1a6258a3d 100644 --- a/modules/programs/kitty.nix +++ b/modules/programs/kitty.nix @@ -119,14 +119,6 @@ in { }; config = mkIf cfg.enable { - assertions = [{ - assertion = (cfg.darwinLaunchOptions != null) - -> pkgs.stdenv.hostPlatform.isDarwin; - message = '' - The 'programs.kitty.darwinLaunchOptions' option is only available on darwin. - ''; - }]; - home.packages = [ cfg.package ] ++ optionalPackage cfg.font; xdg.configFile."kitty/kitty.conf" = { @@ -158,8 +150,8 @@ in { ''; }; - xdg.configFile."kitty/macos-launch-services-cmdline" = - mkIf (cfg.darwinLaunchOptions != null) { + xdg.configFile."kitty/macos-launch-services-cmdline" = mkIf + (cfg.darwinLaunchOptions != null && pkgs.stdenv.hostPlatform.isDarwin) { text = concatStringsSep " " cfg.darwinLaunchOptions; }; };