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:
parent
62cb5bcf93
commit
bf99255fc9
|
@ -119,14 +119,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
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;
|
home.packages = [ cfg.package ] ++ optionalPackage cfg.font;
|
||||||
|
|
||||||
xdg.configFile."kitty/kitty.conf" = {
|
xdg.configFile."kitty/kitty.conf" = {
|
||||||
|
@ -158,8 +150,8 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."kitty/macos-launch-services-cmdline" =
|
xdg.configFile."kitty/macos-launch-services-cmdline" = mkIf
|
||||||
mkIf (cfg.darwinLaunchOptions != null) {
|
(cfg.darwinLaunchOptions != null && pkgs.stdenv.hostPlatform.isDarwin) {
|
||||||
text = concatStringsSep " " cfg.darwinLaunchOptions;
|
text = concatStringsSep " " cfg.darwinLaunchOptions;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue