Thanks again @yunfachi !
Excludes now works. ![]()
That’s a great suggestion re programs.git.ignores. I previously tried it, but used the way commented out below, because when I try import ./gitignore-global.nix; in git.nix with programs.git.ignores = [ ... ]; in gitignore-global.nix, I get this:
error: syntax error, unexpected PATH, expecting ‘.’ or ‘=’
32|
33| import ./gitignore-global.nix;
| ^
34|
I can use imports by itself in .nix files, but it appears I haven’t yet learned how to use import without assigning it.
How do you do that? (Thanks!)
git.nix
{ config, pkgs, libs, ... }:
{
programs.git = {
enable = true;
userName = "xxxxx xxxx";
userEmail = "xxxxxxxxxxxxx";
extraConfig = {
init.defaultBranch = "main";
core.editor = "lvim";
core.fileMode = false;
core.ignorecase= true;
};
};
import ./gitignore-global.nix;
#programs.git.ignores = import ./gitignore-global.nix; <-- Before umport
}
gitignore-global.nix
 programs.git.ignores = [
...
];