diff options
Diffstat (limited to 'modules/devenv/integrations/gitignore.nix')
| -rw-r--r-- | modules/devenv/integrations/gitignore.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/devenv/integrations/gitignore.nix b/modules/devenv/integrations/gitignore.nix new file mode 100644 index 0000000..ed0e61a --- /dev/null +++ b/modules/devenv/integrations/gitignore.nix @@ -0,0 +1,25 @@ +{ + config, + lib, + ... +}: let + cfg = config.gitignore; +in { + options.gitignore = { + extra = lib.mkOption { + type = lib.types.lines; + default = ""; + example = '' + *.my-file-extension + ''; + }; + }; + + config.dotfiles.gitignore = lib.mkIf (cfg.extra != "") { + gitignore = lib.mkDefault false; + text = '' + ## Miscellaneous + ${cfg.extra}; + ''; + }; +} |
