begin to create checks to make nixos modules home-manager independent
This commit is contained in:
17 files changed
+100
-210
No files matched your search
@@ -2,11 +2,20 @@
|
||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||
options.features.applications.gui.kitty.enable = lib.mkEnableOption "kitty";
|
||||
|
||||
config.home-manager.sharedModules = lib.mkIf (config.features.applications.gui.kitty.enable) [
|
||||
{
|
||||
features.applications.gui.kitty.enable = true;
|
||||
}
|
||||
];
|
||||
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.sharedModules = [
|
||||
{
|
||||
features.applications.gui.kitty.enable = lib.mkDefault true;
|
||||
}
|
||||
];
|
||||
} {
|
||||
environment.systemPackages = [ pkgs.kitty ];
|
||||
});
|
||||
};
|
||||
|
||||
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
||||
|
||||
Reference in new issue
Block a user