Dendritic Nix - Community-driven Nix distribution based on the Dendritic pattern.
1{ lib, config, ... }:
2{
3 options.gitignore = lib.mkOption {
4 type = lib.types.lines;
5 apply =
6 text:
7 lib.pipe text [
8 (lib.splitString "\n")
9 lib.naturalSort
10 (lib.concatStringsSep "\n")
11 ];
12 };
13 config = {
14 perSystem =
15 { pkgs, ... }:
16 {
17 files.files = [
18 {
19 path_ = ".gitignore";
20 drv = pkgs.writeText ".gitignore" config.gitignore;
21 }
22 ];
23 };
24
25 gitignore = ''
26 result
27 .vscode
28 .direnv
29 '';
30 };
31}