diff options
| author | quentin@aristote.fr <quentin@aristote.fr> | 2023-08-27 16:25:47 +0200 |
|---|---|---|
| committer | quentin@aristote.fr <quentin@aristote.fr> | 2023-08-27 16:31:34 +0200 |
| commit | 511d1466331c7d4ede2c7f025a08a488d43fe027 (patch) | |
| tree | b53d6b3bb7252efd5ada30bab6a5e9a3310370bd /modules/devenv/dotfiles.nix | |
| parent | 2296a9c3d51ff7d9db1edb6e65376df21f485486 (diff) | |
devenv: add gitignore module
Diffstat (limited to 'modules/devenv/dotfiles.nix')
| -rw-r--r-- | modules/devenv/dotfiles.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/devenv/dotfiles.nix b/modules/devenv/dotfiles.nix index 8b8d95b..7f11194 100644 --- a/modules/devenv/dotfiles.nix +++ b/modules/devenv/dotfiles.nix @@ -40,15 +40,15 @@ in { let content = text - + lib.optionalString (name == ".gitignore") '' - # dotfiles + + lib.optionalString (name == ".gitignore" && dotfilesToIgnore != []) '' + ### dotfiles ${lib.concatStringsSep "\n" dotfilesToIgnore} ''; in '' ${ if gitignore - then "ln -s" - else "cp" + then "ln --symbolic --force" + else "install --mode=644" } "${builtins.toFile name content}" "${name}" '' ) |
