when used either with nixos (no home-manager) or home-manager standalone, `features.applications.<name>.enable` options still perform some functionality, rather than assuming a full nixos + home-manager setup like before
29 lines
950 B
Nix
29 lines
950 B
Nix
{ inputs, self, ... }: {
|
|
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
|
options.features.applications.gui.kitty.enable = lib.mkEnableOption "kitty";
|
|
|
|
config = let
|
|
mkIfElse = with lib; p: yes: no: mkMerge [
|
|
(mkIf p yes)
|
|
(mkIf (!p) no)
|
|
];
|
|
in lib.mkIf (config.features.applications.gui.kitty.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
|
home-manager.users.grey.features.applications.gui.kitty.enable = lib.mkDefault true;
|
|
} {
|
|
environment.systemPackages = [ pkgs.kitty ];
|
|
});
|
|
};
|
|
|
|
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
|
options.features.applications.gui.kitty.enable = lib.mkEnableOption "kitty";
|
|
|
|
config = lib.mkIf (config.features.applications.gui.kitty.enable) {
|
|
programs.kitty = {
|
|
enable = true;
|
|
|
|
shellIntegration.enableBashIntegration = true;
|
|
enableGitIntegration = true;
|
|
};
|
|
};
|
|
};
|
|
} |