add new external flake to provide helper functions
This commit is contained in:
18 files changed
+73
-163
No files matched your search
@@ -2,13 +2,7 @@
|
||||
flake.nixosModules.global = { pkgs, lib, config, ... }: {
|
||||
options.features.applications.cli.fastfetch.enable = lib.mkEnableOption "fastfetch";
|
||||
|
||||
config = let
|
||||
mkIfElse = with lib; p: yes: no:
|
||||
mkMerge [
|
||||
(mkIf p yes)
|
||||
(mkIf (!p) no)
|
||||
];
|
||||
in lib.mkIf (config.features.applications.cli.fastfetch.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
config = lib.mkIf (config.features.applications.cli.fastfetch.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.users.grey.features.applications.cli.fastfetch.enable = lib.mkDefault true;
|
||||
} {
|
||||
environment.systemPackages = [ pkgs.fastfetch ];
|
||||
|
||||
Reference in new issue
Block a user