Modular, context-aware and aspect-oriented dendritic Nix configurations. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/ den.oeiuwq.com
configurations den dendritic nix aspect oriented

Simplify default template (#142)

This will help people getting started.

Our old default template is now named example, as it provides some
layout structure users can consider but it is not enforced at all.

Also renamed examples template to be CI now. since it is used for
running all tests.

authored by oeiuwq.com and committed by

GitHub 42e09c12 32946bc1

+409 -101
+1 -1
.github/workflows/test.yml
··· 34 34 strategy: 35 35 matrix: 36 36 os: [ubuntu-latest, macos-latest] 37 - template: [default, bogus, examples] 37 + template: [default, bogus, ci, example] 38 38 name: Check template ${{matrix.template}} ${{matrix.os}} 39 39 runs-on: ${{matrix.os}} 40 40 steps:
+9 -8
README.md
··· 30 30 31 31 - Context-aware [dependencies](modules/aspects/dependencies.nix): user/host contributions. 32 32 33 - - [Share](templates/default/modules/namespace.nix) aspects across systems & repos. 33 + - [Share](templates/example/modules/namespace.nix) aspects across systems & repos. 34 34 35 - - [Routable](templates/default/modules/aspects/eg/routes.nix) configurations. 35 + - [Routable](templates/example/modules/aspects/eg/routes.nix) configurations. 36 36 37 37 - Custom factories for any Nix `class`. 38 38 ··· 46 46 47 47 - Opt-in [`<angle/brackets>`](https://vic.github.io/den/angle-brackets.html) aspect resolution. 48 48 49 - - Templates [tested](templates/default/modules/tests.nix) along [examples](templates/examples/modules/_example/ci). 49 + - Features [tested](templates/ci). 50 50 51 51 - Concepts [documented](https://vic.github.io/den). 52 52 ··· 77 77 **Available templates** 78 78 79 79 - [`default`](templates/default) batteries-included layout. 80 - - [`minimal`](templates/minimal) truly minimalistic start. 80 + - [`minimal`](templates/minimal) minimalistic flake. 81 81 - [`noflake`](templates/noflake) no flakes, no flake-parts, user nix-maid. 82 - - [`examples`](templates/examples) tests for all features. 82 + - [`example`](templates/example) examples. 83 + - [`ci`](templates/ci) tests for all features. 83 84 - [`bogus`](templates/bogus) reproduce and report bugs. 84 85 85 86 </div> 86 87 </td> 87 88 <td> 88 89 89 - 🏠 Define [Hosts, Users](templates/examples/modules/_example/hosts.nix) & [Homes](templates/examples/modules/_example/homes.nix) concisely. 90 + 🏠 Define [Hosts, Users](templates/ci/modules/hosts.nix) & [Homes](templates/ci/modules/homes.nix) concisely. 90 91 91 92 See schema in [`_types.nix`](modules/_types.nix). 92 93 ··· 107 108 $ home-manager switch --flake .#vic 108 109 ``` 109 110 110 - 🧩 [Aspect-oriented](https://github.com/vic/flake-aspects) incremental features. ([example](templates/default/modules/den.nix)) 111 + 🧩 [Aspect-oriented](https://github.com/vic/flake-aspects) incremental features. 111 112 112 113 Any module can contribute configurations to aspects. 113 114 ··· 178 179 179 180 You are done! You know everything to start creating configurations with `den`. 180 181 181 - Feel free to to **explore** the codebase, particularly our [included batteries](modules/aspects/provides) and [tests](templates/examples/modules/_example/ci). 182 + Feel free to to **explore** the codebase, particularly our [included batteries](modules/aspects/provides) and [tests](templates/ci). 182 183 183 184 ## Learn more at our [documentation website](https://vic.github.io/den) 184 185
+5 -3
nix/default.nix
··· 8 8 modules.flake = flakeModules; 9 9 templates = { 10 10 default.path = ../templates/default; 11 - default.description = "Batteries included"; 11 + default.description = "Default template"; 12 12 minimal.path = ../templates/minimal; 13 13 minimal.description = "Minimalistic den"; 14 - examples.path = ../templates/examples; 15 - examples.description = "API examples and CI"; 14 + example.path = ../templates/example; 15 + example.description = "Example"; 16 + ci.path = ../templates/ci; 17 + ci.description = "Feature Tests"; 16 18 bogus.path = ../templates/bogus; 17 19 bogus.description = "For bug reproduction"; 18 20 };
+1 -1
nix/template-packages.nix
··· 5 5 url = "https://github.com/edolstra/flake-compat/archive/${rev}.tar.gz"; 6 6 sha256 = narHash; 7 7 }; 8 - flake = import compat { src = ../templates/default; }; 8 + flake = import compat { src = ../templates/example; }; 9 9 pkgs = flake.outputs.packages; 10 10 in 11 11 {
+28
templates/ci/modules/auto-imported.nix
··· 1 + # configures class-automatic module auto imports for hosts/users/homes. 2 + # See documentation at modules/aspects/provides/import-tree.nix 3 + { 4 + # deadnix: skip 5 + __findFile ? __findFile, 6 + ... 7 + }: 8 + { 9 + 10 + # alice imports non-dendritic <class> modules from ../non-dendritic/alice/_<class>/*.nix 11 + den.aspects.alice.includes = [ (<den/import-tree> ./../non-dendritic/alice) ]; 12 + 13 + # See the documentation at batteries/import-tree.nix 14 + den.default.includes = [ 15 + (<den/import-tree/host> ./../non-dendritic/hosts) 16 + (<den/import-tree/user> ./../non-dendritic/users) 17 + (<den/import-tree/home> ./../non-dendritic/homes) 18 + ]; 19 + 20 + # tests 21 + perSystem = 22 + { checkCond, rockhopper, ... }: 23 + { 24 + checks.import-tree = checkCond "auto-imported from rockhopper/_nixos" ( 25 + rockhopper.config.auto-imported 26 + ); 27 + }; 28 + }
+9
templates/ci/modules/dendritic.nix
··· 1 + { inputs, lib, ... }: 2 + { 3 + flake-file.inputs.flake-file.url = lib.mkDefault "github:vic/flake-file"; 4 + flake-file.inputs.den.url = lib.mkDefault "github:vic/den"; 5 + imports = [ 6 + (inputs.flake-file.flakeModules.dendritic or { }) 7 + (inputs.den.flakeModules.dendritic or { }) 8 + ]; 9 + }
+1 -17
templates/default/README.md
··· 16 16 nix flake check 17 17 ``` 18 18 19 - - Read [modules/den.nix](modules/den.nix) where hosts and homes definitions are for this example. 20 - 21 - - Read [modules/namespace.nix](modules/namespace.nix) where a new `eg` (an example) aspects namespace is created. 22 - 23 - - Read [modules/aspects/igloo.nix](modules/aspects/igloo.nix) where the `igloo` host is configured. 24 - 25 - - Read [modules/aspects/alice.nix](modules/aspects/alice.nix) where the `alice` user is configured. 26 - 27 - - Run the VM. 28 - 29 - ```console 30 - nix run .#vm 31 - ``` 32 - 33 - - Edit and run VM loop. 34 - 35 - Feel free to add more aspects, organize things to your liking. 19 + - Edit [modules/hosts.nix](modules/hosts.nix)
-21
templates/default/flake.lock
··· 1 1 { 2 2 "nodes": { 3 - "darwin": { 4 - "inputs": { 5 - "nixpkgs": [ 6 - "nixpkgs" 7 - ] 8 - }, 9 - "locked": { 10 - "lastModified": 1762627886, 11 - "narHash": "sha256-/QLk1bzmbcqJt9sU43+y/3tHtXhAy0l8Ck0MoO2+evQ=", 12 - "owner": "nix-darwin", 13 - "repo": "nix-darwin", 14 - "rev": "5125a3cd414dc98bbe2c528227aa6b62ee61f733", 15 - "type": "github" 16 - }, 17 - "original": { 18 - "owner": "nix-darwin", 19 - "repo": "nix-darwin", 20 - "type": "github" 21 - } 22 - }, 23 3 "den": { 24 4 "locked": { 25 5 "lastModified": 1763707606, ··· 138 118 }, 139 119 "root": { 140 120 "inputs": { 141 - "darwin": "darwin", 142 121 "den": "den", 143 122 "flake-aspects": "flake-aspects", 144 123 "flake-file": "flake-file",
-4
templates/default/flake.nix
··· 5 5 outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules); 6 6 7 7 inputs = { 8 - darwin = { 9 - inputs.nixpkgs.follows = "nixpkgs"; 10 - url = "github:nix-darwin/nix-darwin"; 11 - }; 12 8 den.url = "github:vic/den"; 13 9 flake-aspects.url = "github:vic/flake-aspects"; 14 10 flake-file.url = "github:vic/flake-file";
templates/default/modules/aspects/alice.nix templates/example/modules/aspects/alice.nix
templates/default/modules/aspects/defaults.nix templates/example/modules/aspects/defaults.nix
templates/default/modules/aspects/eg/autologin.nix templates/example/modules/aspects/eg/autologin.nix
templates/default/modules/aspects/eg/ci-no-boot.nix templates/example/modules/aspects/eg/ci-no-boot.nix
templates/default/modules/aspects/eg/routes.nix templates/example/modules/aspects/eg/routes.nix
templates/default/modules/aspects/eg/vm-bootable.nix templates/example/modules/aspects/eg/vm-bootable.nix
templates/default/modules/aspects/eg/vm.nix templates/example/modules/aspects/eg/vm.nix
templates/default/modules/aspects/eg/xfce-desktop.nix templates/example/modules/aspects/eg/xfce-desktop.nix
templates/default/modules/aspects/igloo.nix templates/example/modules/aspects/igloo.nix
+20
templates/default/modules/ci.nix
··· 1 + { config, ... }: 2 + { 3 + 4 + den.default.includes = [ 5 + 6 + # USER TODO: Remove. 7 + ( 8 + # This is a conditional aspect to disable boot during CI on all hosts. 9 + if config ? _module.args.CI then 10 + { 11 + nixos.fileSystems."/".device = "/dev/fake"; 12 + nixos.boot.loader.grub.enable = false; 13 + } 14 + else 15 + { } 16 + ) 17 + 18 + ]; 19 + 20 + }
templates/default/modules/den.nix templates/example/modules/den.nix
+11 -3
templates/default/modules/dendritic.nix
··· 1 - { inputs, lib, ... }: 1 + { inputs, ... }: 2 2 { 3 - flake-file.inputs.flake-file.url = lib.mkDefault "github:vic/flake-file"; 4 - flake-file.inputs.den.url = lib.mkDefault "github:vic/den"; 5 3 imports = [ 6 4 (inputs.flake-file.flakeModules.dendritic or { }) 7 5 (inputs.den.flakeModules.dendritic or { }) 8 6 ]; 7 + 8 + # other inputs may be defined at a module using them. 9 + flake-file.inputs = { 10 + den.url = "github:vic/den"; 11 + flake-file.url = "github:vic/flake-file"; 12 + home-manager = { 13 + url = "github:nix-community/home-manager"; 14 + inputs.nixpkgs.follows = "nixpkgs"; 15 + }; 16 + }; 9 17 }
+19
templates/default/modules/hosts.nix
··· 1 + # defines all hosts + users + homes. 2 + # then config their aspects in as many files you want 3 + { 4 + # tux user at igloo host. 5 + den.hosts.x86_64-linux.igloo.users.tux = { }; 6 + 7 + # define an standalone home-manager for tux 8 + # den.homes.x86_64-linux.tux = { }; 9 + 10 + # be sure to add nix-darwin input for this: 11 + # den.hosts.aarch64-darwin.apple.users.alice = { }; 12 + 13 + # other hosts can also have user tux. 14 + # den.hosts.x86_64-linux.south = { 15 + # wsl = { }; # add nixos-wsl input for this. 16 + # users.tux = { }; 17 + # users.orca = { }; 18 + # }; 19 + }
+18
templates/default/modules/igloo.nix
··· 1 + { 2 + # host aspect 3 + den.aspects.igloo = { 4 + # host NixOS configuration 5 + nixos = 6 + { pkgs, ... }: 7 + { 8 + environment.systemPackages = [ pkgs.hello ]; 9 + }; 10 + 11 + # host provides default home environment for its users 12 + homeManager = 13 + { pkgs, ... }: 14 + { 15 + home.packages = [ pkgs.vim ]; 16 + }; 17 + }; 18 + }
templates/default/modules/inputs.nix templates/example/modules/inputs.nix
templates/default/modules/namespace.nix templates/example/modules/namespace.nix
templates/default/modules/tests.nix templates/example/modules/tests.nix
+20
templates/default/modules/tux.nix
··· 1 + { den, ... }: 2 + { 3 + # user aspect 4 + den.aspects.tux = { 5 + includes = [ 6 + den.provides.primary-user 7 + (den.provides.user-shell "fish") 8 + ]; 9 + 10 + homeManager = 11 + { pkgs, ... }: 12 + { 13 + home.packages = [ pkgs.htop ]; 14 + }; 15 + 16 + # user can provide NixOS configurations 17 + # to any host it is included on 18 + # nixos = { pkgs, ... }: { }; 19 + }; 20 + }
templates/default/modules/vm.nix templates/example/modules/vm.nix
+27
templates/example/.github/workflows/test.yml
··· 1 + on: 2 + pull_request: 3 + push: 4 + concurrency: 5 + group: ${{ github.workflow }}-${{ github.ref }} 6 + cancel-in-progress: true 7 + jobs: 8 + flake-check: 9 + strategy: 10 + matrix: 11 + os: [ubuntu-latest, macos-latest] 12 + name: Nix flake check ${{matrix.os}} 13 + runs-on: ${{matrix.os}} 14 + steps: 15 + - uses: wimpysworld/nothing-but-nix@main 16 + if: matrix.os == 'ubuntu-latest' 17 + - uses: DeterminateSystems/nix-installer-action@main 18 + - uses: DeterminateSystems/magic-nix-cache-action@main 19 + - uses: actions/checkout@v5 20 + - run: nix flake metadata 21 + - run: | 22 + cat <<-EOF > modules/ci-runtime.nix 23 + { 24 + _module.args.CI = true; 25 + } 26 + EOF 27 + - run: nix flake check
+38
templates/example/README.md
··· 1 + # Examples 2 + 3 + This template provides some basic examples of how to use Den features. 4 + However, you will learn more by reading templates/ci which tests all of Den. 5 + 6 + Steps you can follow after cloning this template: 7 + 8 + - Be sure to read the [den documentation](https://vic.github.io/den) 9 + 10 + - Update den input. 11 + 12 + ```console 13 + nix flake update den 14 + ``` 15 + 16 + - Run checks to test everything works. 17 + 18 + ```console 19 + nix flake check 20 + ``` 21 + 22 + - Read [modules/den.nix](modules/den.nix) where hosts and homes definitions are for this example. 23 + 24 + - Read [modules/namespace.nix](modules/namespace.nix) where a new `eg` (an example) aspects namespace is created. 25 + 26 + - Read [modules/aspects/igloo.nix](modules/aspects/igloo.nix) where the `igloo` host is configured. 27 + 28 + - Read [modules/aspects/alice.nix](modules/aspects/alice.nix) where the `alice` user is configured. 29 + 30 + - Run the VM. 31 + 32 + ```console 33 + nix run .#vm 34 + ``` 35 + 36 + - Edit and run VM loop. 37 + 38 + Feel free to add more aspects, organize things to your liking.
+173
templates/example/flake.lock
··· 1 + { 2 + "nodes": { 3 + "darwin": { 4 + "inputs": { 5 + "nixpkgs": [ 6 + "nixpkgs" 7 + ] 8 + }, 9 + "locked": { 10 + "lastModified": 1762627886, 11 + "narHash": "sha256-/QLk1bzmbcqJt9sU43+y/3tHtXhAy0l8Ck0MoO2+evQ=", 12 + "owner": "nix-darwin", 13 + "repo": "nix-darwin", 14 + "rev": "5125a3cd414dc98bbe2c528227aa6b62ee61f733", 15 + "type": "github" 16 + }, 17 + "original": { 18 + "owner": "nix-darwin", 19 + "repo": "nix-darwin", 20 + "type": "github" 21 + } 22 + }, 23 + "den": { 24 + "locked": { 25 + "lastModified": 1763707606, 26 + "narHash": "sha256-l9v3NNdKj3GJvV5LhzsWDs4Sl2bg0tuKNFFkMeFvUWo=", 27 + "owner": "vic", 28 + "repo": "den", 29 + "rev": "8164e0d89c59839d67757bc9a1fb61770dc6e8b7", 30 + "type": "github" 31 + }, 32 + "original": { 33 + "owner": "vic", 34 + "repo": "den", 35 + "type": "github" 36 + } 37 + }, 38 + "flake-aspects": { 39 + "locked": { 40 + "lastModified": 1769717274, 41 + "narHash": "sha256-U15OaMr9AcJiB1wW2uCFzFO+DnQ3jJSvln+ZR/+Q0vE=", 42 + "owner": "vic", 43 + "repo": "flake-aspects", 44 + "rev": "a35ed5efc9a629694d659d606230ba18a76cefaa", 45 + "type": "github" 46 + }, 47 + "original": { 48 + "owner": "vic", 49 + "repo": "flake-aspects", 50 + "type": "github" 51 + } 52 + }, 53 + "flake-file": { 54 + "locked": { 55 + "lastModified": 1763706734, 56 + "narHash": "sha256-kR1Rrh9evfiJaTb6ufWCSk6GMtrnPKFydqQUV0Bb4Eg=", 57 + "owner": "vic", 58 + "repo": "flake-file", 59 + "rev": "9af20d5e62c94b658b4d0671829393c1b8bb0b3e", 60 + "type": "github" 61 + }, 62 + "original": { 63 + "owner": "vic", 64 + "repo": "flake-file", 65 + "type": "github" 66 + } 67 + }, 68 + "flake-parts": { 69 + "inputs": { 70 + "nixpkgs-lib": [ 71 + "nixpkgs-lib" 72 + ] 73 + }, 74 + "locked": { 75 + "lastModified": 1762810396, 76 + "narHash": "sha256-dxFVgQPG+R72dkhXTtqUm7KpxElw3u6E+YlQ2WaDgt8=", 77 + "owner": "hercules-ci", 78 + "repo": "flake-parts", 79 + "rev": "0bdadb1b265fb4143a75bd1ec7d8c915898a9923", 80 + "type": "github" 81 + }, 82 + "original": { 83 + "owner": "hercules-ci", 84 + "repo": "flake-parts", 85 + "type": "github" 86 + } 87 + }, 88 + "home-manager": { 89 + "inputs": { 90 + "nixpkgs": [ 91 + "nixpkgs" 92 + ] 93 + }, 94 + "locked": { 95 + "lastModified": 1762787259, 96 + "narHash": "sha256-t2U/GLLXHa2+kJkwnFNRVc2fEJ/lUfyZXBE5iKzJdcs=", 97 + "owner": "nix-community", 98 + "repo": "home-manager", 99 + "rev": "37a3d97f2873e0f68711117c34d04b7c7ead8f4e", 100 + "type": "github" 101 + }, 102 + "original": { 103 + "owner": "nix-community", 104 + "repo": "home-manager", 105 + "type": "github" 106 + } 107 + }, 108 + "import-tree": { 109 + "locked": { 110 + "lastModified": 1762327901, 111 + "narHash": "sha256-AJ96FNj50DU0bTyIzAPkPOjCZTHqjURVjok8qoXvmqM=", 112 + "owner": "vic", 113 + "repo": "import-tree", 114 + "rev": "90fa129798be99cde036b78658e89475710966a1", 115 + "type": "github" 116 + }, 117 + "original": { 118 + "owner": "vic", 119 + "repo": "import-tree", 120 + "type": "github" 121 + } 122 + }, 123 + "nixpkgs": { 124 + "locked": { 125 + "lastModified": 1762482733, 126 + "narHash": "sha256-g/da4FzvckvbiZT075Sb1/YDNDr+tGQgh4N8i5ceYMg=", 127 + "owner": "nixos", 128 + "repo": "nixpkgs", 129 + "rev": "e1ebeec86b771e9d387dd02d82ffdc77ac753abc", 130 + "type": "github" 131 + }, 132 + "original": { 133 + "owner": "nixos", 134 + "ref": "nixpkgs-unstable", 135 + "repo": "nixpkgs", 136 + "type": "github" 137 + } 138 + }, 139 + "root": { 140 + "inputs": { 141 + "darwin": "darwin", 142 + "den": "den", 143 + "flake-aspects": "flake-aspects", 144 + "flake-file": "flake-file", 145 + "flake-parts": "flake-parts", 146 + "home-manager": "home-manager", 147 + "import-tree": "import-tree", 148 + "nixpkgs": "nixpkgs", 149 + "nixpkgs-lib": [ 150 + "nixpkgs" 151 + ], 152 + "systems": "systems" 153 + } 154 + }, 155 + "systems": { 156 + "locked": { 157 + "lastModified": 1681028828, 158 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 159 + "owner": "nix-systems", 160 + "repo": "default", 161 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 162 + "type": "github" 163 + }, 164 + "original": { 165 + "owner": "nix-systems", 166 + "repo": "default", 167 + "type": "github" 168 + } 169 + } 170 + }, 171 + "root": "root", 172 + "version": 7 173 + }
+29
templates/example/flake.nix
··· 1 + # DO-NOT-EDIT. This file was auto-generated using github:vic/flake-file. 2 + # Use `nix run .#write-flake` to regenerate it. 3 + { 4 + 5 + outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules); 6 + 7 + inputs = { 8 + darwin = { 9 + inputs.nixpkgs.follows = "nixpkgs"; 10 + url = "github:nix-darwin/nix-darwin"; 11 + }; 12 + den.url = "github:vic/den"; 13 + flake-aspects.url = "github:vic/flake-aspects"; 14 + flake-file.url = "github:vic/flake-file"; 15 + flake-parts = { 16 + inputs.nixpkgs-lib.follows = "nixpkgs-lib"; 17 + url = "github:hercules-ci/flake-parts"; 18 + }; 19 + home-manager = { 20 + inputs.nixpkgs.follows = "nixpkgs"; 21 + url = "github:nix-community/home-manager"; 22 + }; 23 + import-tree.url = "github:vic/import-tree"; 24 + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; 25 + nixpkgs-lib.follows = "nixpkgs"; 26 + systems.url = "github:nix-systems/default"; 27 + }; 28 + 29 + }
templates/examples/flake.lock templates/ci/flake.lock
templates/examples/flake.nix templates/ci/flake.nix
-5
templates/examples/modules/_example/README.md
··· 1 - User TODO: REMOVE this directory (or disable its import from den.nix) 2 - 3 - It is used to implement tests for all den features so we can validate at CI. 4 - 5 - Use it as reference to see how den features are used, however, be aware that this might not be the best practices for file/aspect organization.
templates/examples/modules/_example/ci/_non_dendritic/hosts/honeycrisp/_darwin/something.nix templates/ci/non-dendritic/hosts/honeycrisp/_darwin/something.nix
templates/examples/modules/_example/ci/_non_dendritic/hosts/rockhopper/_nixos/hardware-auto-generated.nix templates/ci/non-dendritic/hosts/rockhopper/_nixos/hardware-auto-generated.nix
templates/examples/modules/_example/ci/angle-bracket-deep.nix templates/ci/modules/angle-bracket-deep.nix
templates/examples/modules/_example/ci/base-conf-modules.nix templates/ci/modules/base-conf-modules.nix
templates/examples/modules/_example/ci/builds.nix templates/ci/modules/builds.nix
templates/examples/modules/_example/ci/cross-flake-parametric.nix templates/ci/modules/cross-flake-parametric.nix
templates/examples/modules/_example/ci/custom-home-managed-package.nix templates/ci/modules/custom-home-managed-package.nix
templates/examples/modules/_example/ci/custom-nixos-module.nix templates/ci/modules/custom-nixos-module.nix
templates/examples/modules/_example/ci/deep-nested-namespace.nix templates/ci/modules/deep-nested-namespace.nix
templates/examples/modules/_example/ci/define-user.nix templates/ci/modules/define-user.nix
templates/examples/modules/_example/ci/enable-wsl-host.nix templates/ci/modules/enable-wsl-host.nix
templates/examples/modules/_example/ci/helpers.nix templates/ci/modules/helpers.nix
templates/examples/modules/_example/ci/hm-enabled-host.nix templates/ci/modules/hm-enabled-host.nix
templates/examples/modules/_example/ci/host-configures-users.nix templates/ci/modules/host-configures-users.nix
templates/examples/modules/_example/ci/host-user-conditional-hm.nix templates/ci/modules/host-user-conditional-hm.nix
-28
templates/examples/modules/_example/ci/import-tree.nix
··· 1 - # configures class-automatic module auto imports for hosts/users/homes. 2 - # See documentation at modules/aspects/provides/import-tree.nix 3 - { 4 - # deadnix: skip 5 - __findFile ? __findFile, 6 - ... 7 - }: 8 - { 9 - 10 - # alice imports non-dendritic <class> modules from _non_dendritic/alice/_<class>/*.nix 11 - den.aspects.alice.includes = [ (<den/import-tree> ./_non_dendritic/alice) ]; 12 - 13 - # See the documentation at batteries/import-tree.nix 14 - den.default.includes = [ 15 - (<den/import-tree/host> ./_non_dendritic/hosts) 16 - (<den/import-tree/user> ./_non_dendritic/users) 17 - (<den/import-tree/home> ./_non_dendritic/homes) 18 - ]; 19 - 20 - # tests 21 - perSystem = 22 - { checkCond, rockhopper, ... }: 23 - { 24 - checks.import-tree = checkCond "auto-imported from rockhopper/_nixos" ( 25 - rockhopper.config.auto-imported 26 - ); 27 - }; 28 - }
templates/examples/modules/_example/ci/namespace.nix templates/ci/modules/namespace.nix
templates/examples/modules/_example/ci/one-os-package-per-user.nix templates/ci/modules/one-os-package-per-user.nix
templates/examples/modules/_example/ci/parametric-with-owned.nix templates/ci/modules/parametric-with-owned.nix
templates/examples/modules/_example/ci/primary-user.nix templates/ci/modules/primary-user.nix
templates/examples/modules/_example/ci/set-hostname.nix templates/ci/modules/set-hostname.nix
templates/examples/modules/_example/ci/shared-parametric-aspects.nix templates/ci/modules/shared-parametric-aspects.nix
templates/examples/modules/_example/ci/special-args.nix templates/ci/modules/special-args.nix
templates/examples/modules/_example/ci/standalone-hm-special-args-osconfig.nix templates/ci/modules/standalone-hm-special-args-osconfig.nix
templates/examples/modules/_example/ci/top-level-parametric.nix templates/ci/modules/top-level-parametric.nix
templates/examples/modules/_example/ci/unfree.nix templates/ci/modules/unfree.nix
templates/examples/modules/_example/ci/user-configures-hosts.nix templates/ci/modules/user-configures-hosts.nix
templates/examples/modules/_example/ci/user-home-defaults.nix templates/ci/modules/user-home-defaults.nix
templates/examples/modules/_example/ci/user-host-conditional-os.nix templates/ci/modules/user-host-conditional-os.nix
templates/examples/modules/_example/ci/user-shell.nix templates/ci/modules/user-shell.nix
templates/examples/modules/_example/ci/user-specific-hm-config.nix templates/ci/modules/user-specific-hm-config.nix
templates/examples/modules/_example/ci/vm-bootable.nix templates/ci/modules/vm-bootable.nix
templates/examples/modules/_example/defaults.nix templates/ci/modules/defaults.nix
templates/examples/modules/_example/home-managed.nix templates/ci/modules/home-managed.nix
templates/examples/modules/_example/homes.nix templates/ci/modules/homes.nix
templates/examples/modules/_example/hosts.nix templates/ci/modules/hosts.nix
-10
templates/examples/modules/den.nix
··· 1 - # USER TODO: remove this file. 2 - # copy any desired module to your ./modules and let it be auto-imported. 3 - { inputs, ... }: 4 - { 5 - imports = [ 6 - # The _example directory contains CI tests for all den features. 7 - # use it as reference of usage, but not of best practices. 8 - (inputs.import-tree ./_example) 9 - ]; 10 - }
templates/examples/modules/dendritic.nix templates/example/modules/dendritic.nix
templates/examples/provider/flake.nix templates/ci/provider/flake.nix
templates/examples/provider/modules/den.nix templates/ci/provider/modules/den.nix