From 511d1466331c7d4ede2c7f025a08a488d43fe027 Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Sun, 27 Aug 2023 16:25:47 +0200 Subject: devenv: add gitignore module --- modules/devenv/dotfiles.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/devenv/dotfiles.nix') 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}" '' ) -- cgit v1.2.3