diff options
Diffstat (limited to 'snowfall/modules')
| -rw-r--r-- | snowfall/modules/home/suites/common/default.nix | 18 | ||||
| -rw-r--r-- | snowfall/modules/home/tools/git/default.nix | 46 |
2 files changed, 64 insertions, 0 deletions
diff --git a/snowfall/modules/home/suites/common/default.nix b/snowfall/modules/home/suites/common/default.nix new file mode 100644 index 0000000..c4620ee --- /dev/null +++ b/snowfall/modules/home/suites/common/default.nix @@ -0,0 +1,18 @@ +{ options, config, lib, namespace, ... }: + +with lib; with lib.${namespace}; let + cfg = config.${namespace}.suites.common; +in { + options.${namespace}.suites.common = with types; { + enable = mkEnableOption "common"; + }; + + config = mkIf cfg.enable { + cxl = { + tools = { + git.enable = true; + }; + }; + }; +} + diff --git a/snowfall/modules/home/tools/git/default.nix b/snowfall/modules/home/tools/git/default.nix new file mode 100644 index 0000000..8aebfd8 --- /dev/null +++ b/snowfall/modules/home/tools/git/default.nix @@ -0,0 +1,46 @@ +{ options, config, lib, namespace, ... }: + +with lib; with lib.${namespace}; let + cfg = config.${namespace}.tools.git; +in { + options.${namespace}.tools.git = with types; { + enable = mkEnableOption "git"; + + name = mkOption { + type = str; + }; + + email = mkOption { + type = str; + }; + + key = mkOption { + type = nullOr str; + }; + + sign = mkOption { + type = bool; + default = true; + }; + }; + + config = mkIf cfg.enable { + programs.git = { + enable = true; + + userName = cfg.name; + userEmail = cfg.email; + + signing = { + key = cfg.key; + signByDefault = cfg.sign; + }; + + ignores = [ + "*~" + "*.swp" + ]; + }; + }; +} + |