create shared niri config, refactor generic feature modules
This commit is contained in:
23 files changed
+353
-410
No files matched your search
@@ -1,20 +1,18 @@
|
||||
{ inputs, self, ... }: {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "globalOptions" ({ lib, ... }: {
|
||||
options.features.applications.cli.fastfetch.enable = lib.mkEnableOption "`fastfetch`";
|
||||
})) ];
|
||||
{ inputs, self, ... }: let
|
||||
optionName = "features.applications.cli.fastfetch.enable";
|
||||
in {
|
||||
imports = [ (inputs.helpers.mkStandardFeature.flakeModule "global" optionName "`fastfetch`") ];
|
||||
|
||||
flake.nixosModules.global = { pkgs, lib, config, ... }: {
|
||||
config = lib.mkIf (config.features.applications.cli.fastfetch.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.users.${config.info.userName}.features.applications.cli.fastfetch.enable = lib.mkDefault true;
|
||||
} {
|
||||
imports = [ (inputs.helpers.mkStandardFeature.nixosModule { inherit config optionName; } {
|
||||
environment.systemPackages = [ pkgs.fastfetch ];
|
||||
});
|
||||
}) ];
|
||||
};
|
||||
|
||||
flake.homeModules.global = { pkgs, lib, config, ... }: {
|
||||
config = lib.mkIf (config.features.applications.cli.fastfetch.enable) ({
|
||||
imports = [ (inputs.helpers.mkStandardFeature.homeModule { inherit config optionName; } {
|
||||
programs.zsh.initContent = lib.mkOrder 1500 "fastfetch";
|
||||
programs.fastfetch.enable = true;
|
||||
});
|
||||
}) ];
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user