diff options
Diffstat (limited to 'snowfall/lib/modules/default.nix')
| -rw-r--r-- | snowfall/lib/modules/default.nix | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/snowfall/lib/modules/default.nix b/snowfall/lib/modules/default.nix deleted file mode 100644 index b351f7e..0000000 --- a/snowfall/lib/modules/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib, namespace }: - -let - mkSimpleModule = category: name: { packages ? null, persist ? [] }: ( - { options, config, lib, pkgs, ... }: - - with lib; with lib.${namespace}; let - cfg = config.${namespace}.${category}.${name}; - impermanence = config.${namespace}.impermanence; - in { - options.${namespace}.${category}.${name} = with types; { - enable = mkEnableOption "${name}"; - }; - - config = mkIf cfg.enable { - home.packages = if (packages != null) then packages else [ pkgs.${name} ]; - - home.persistence.${impermanence.location} = { - directories = persist; - }; - }; - } - ); -in { - mkSimpleApp = name: args@{ ... }: mkSimpleModule "apps" name args; - mkSimpleTool = name: args@{ ... }: mkSimpleModule "tools" name args; -} |