1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00

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 <git@opensource.nslick.com>
This commit is contained in:
Nicholas Sielicki 2022-11-26 16:16:33 -08:00 committed by GitHub
parent 62cb5bcf93
commit bf99255fc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
};
};