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

create minimal template useful for cleaner start and bug reproduction. (#44)

authored by oeiuwq.com and committed by

GitHub c7923378 c1a0d345

+298 -3
+3 -3
templates/default/flake.lock
··· 22 }, 23 "den": { 24 "locked": { 25 - "lastModified": 1762465155, 26 - "narHash": "sha256-BDeDTRBFoonBU3XpnhWXH9Mo5fTad/mXfwDQAbs7XSQ=", 27 "owner": "vic", 28 "repo": "den", 29 - "rev": "dd929700c71b997941c7045a1ac77c8ae052a93b", 30 "type": "github" 31 }, 32 "original": {
··· 22 }, 23 "den": { 24 "locked": { 25 + "lastModified": 1762483837, 26 + "narHash": "sha256-4rFMMbyZdzxPduljpUB2eEB4VHNLcF2pM2K6KxWK37k=", 27 "owner": "vic", 28 "repo": "den", 29 + "rev": "c1a0d345c4484faba4a146d60c746b12c5fce9e6", 30 "type": "github" 31 }, 32 "original": {
+194
templates/minimal/flake.lock
···
··· 1 + { 2 + "nodes": { 3 + "den": { 4 + "locked": { 5 + "lastModified": 1762483837, 6 + "narHash": "sha256-4rFMMbyZdzxPduljpUB2eEB4VHNLcF2pM2K6KxWK37k=", 7 + "owner": "vic", 8 + "repo": "den", 9 + "rev": "c1a0d345c4484faba4a146d60c746b12c5fce9e6", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "vic", 14 + "repo": "den", 15 + "type": "github" 16 + } 17 + }, 18 + "flake-aspects": { 19 + "locked": { 20 + "lastModified": 1762148645, 21 + "narHash": "sha256-NfxjuuA1p7Sn+OX0HD+p6LepxRFYmahaybvN7+D3GZQ=", 22 + "owner": "vic", 23 + "repo": "flake-aspects", 24 + "rev": "895538b1372ecbe4966db85553b11eb64a72086c", 25 + "type": "github" 26 + }, 27 + "original": { 28 + "owner": "vic", 29 + "repo": "flake-aspects", 30 + "type": "github" 31 + } 32 + }, 33 + "flake-file": { 34 + "locked": { 35 + "lastModified": 1761535278, 36 + "narHash": "sha256-OPZ7XpG778i9CIJfchAwgrZGZ9z1dWJzfN18VFxCyS4=", 37 + "owner": "vic", 38 + "repo": "flake-file", 39 + "rev": "57b2a65831ae49e4f9218dbba1c2dc9700f6cd68", 40 + "type": "github" 41 + }, 42 + "original": { 43 + "owner": "vic", 44 + "repo": "flake-file", 45 + "type": "github" 46 + } 47 + }, 48 + "flake-parts": { 49 + "inputs": { 50 + "nixpkgs-lib": [ 51 + "nixpkgs-lib" 52 + ] 53 + }, 54 + "locked": { 55 + "lastModified": 1762040540, 56 + "narHash": "sha256-z5PlZ47j50VNF3R+IMS9LmzI5fYRGY/Z5O5tol1c9I4=", 57 + "owner": "hercules-ci", 58 + "repo": "flake-parts", 59 + "rev": "0010412d62a25d959151790968765a70c436598b", 60 + "type": "github" 61 + }, 62 + "original": { 63 + "owner": "hercules-ci", 64 + "repo": "flake-parts", 65 + "type": "github" 66 + } 67 + }, 68 + "home-manager": { 69 + "inputs": { 70 + "nixpkgs": [ 71 + "nixpkgs" 72 + ] 73 + }, 74 + "locked": { 75 + "lastModified": 1762087455, 76 + "narHash": "sha256-hpbPma1eUKwLAmiVRoMgIHbHiIKFkcACobJLbDt6ABw=", 77 + "owner": "nix-community", 78 + "repo": "home-manager", 79 + "rev": "43e205606aeb253bfcee15fd8a4a01d8ce8384ca", 80 + "type": "github" 81 + }, 82 + "original": { 83 + "owner": "nix-community", 84 + "repo": "home-manager", 85 + "type": "github" 86 + } 87 + }, 88 + "import-tree": { 89 + "locked": { 90 + "lastModified": 1761120675, 91 + "narHash": "sha256-TEbh9zISiQcU82VwVoEbmXHnSGlUxTwvjJA9g9ErSDA=", 92 + "owner": "vic", 93 + "repo": "import-tree", 94 + "rev": "a037ed2a58fc0ebed9e93b9ef79b0646e648f719", 95 + "type": "github" 96 + }, 97 + "original": { 98 + "owner": "vic", 99 + "repo": "import-tree", 100 + "type": "github" 101 + } 102 + }, 103 + "nix-auto-follow": { 104 + "inputs": { 105 + "nixpkgs": [ 106 + "nixpkgs" 107 + ] 108 + }, 109 + "locked": { 110 + "lastModified": 1754073254, 111 + "narHash": "sha256-CQp/v2HQ7AtGJQqFGRZLHt4MZAK3NF94I6GDaRyhbsc=", 112 + "owner": "fzakaria", 113 + "repo": "nix-auto-follow", 114 + "rev": "5baa00b79d4cc46523da0b8b3532c5163d151be4", 115 + "type": "github" 116 + }, 117 + "original": { 118 + "owner": "fzakaria", 119 + "repo": "nix-auto-follow", 120 + "type": "github" 121 + } 122 + }, 123 + "nixpkgs": { 124 + "locked": { 125 + "lastModified": 1761880412, 126 + "narHash": "sha256-QoJjGd4NstnyOG4mm4KXF+weBzA2AH/7gn1Pmpfcb0A=", 127 + "owner": "nixos", 128 + "repo": "nixpkgs", 129 + "rev": "a7fc11be66bdfb5cdde611ee5ce381c183da8386", 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 + "den": "den", 142 + "flake-aspects": "flake-aspects", 143 + "flake-file": "flake-file", 144 + "flake-parts": "flake-parts", 145 + "home-manager": "home-manager", 146 + "import-tree": "import-tree", 147 + "nix-auto-follow": "nix-auto-follow", 148 + "nixpkgs": "nixpkgs", 149 + "nixpkgs-lib": [ 150 + "nixpkgs" 151 + ], 152 + "systems": "systems", 153 + "treefmt-nix": "treefmt-nix" 154 + } 155 + }, 156 + "systems": { 157 + "locked": { 158 + "lastModified": 1681028828, 159 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 160 + "owner": "nix-systems", 161 + "repo": "default", 162 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 163 + "type": "github" 164 + }, 165 + "original": { 166 + "owner": "nix-systems", 167 + "repo": "default", 168 + "type": "github" 169 + } 170 + }, 171 + "treefmt-nix": { 172 + "inputs": { 173 + "nixpkgs": [ 174 + "nixpkgs" 175 + ] 176 + }, 177 + "locked": { 178 + "lastModified": 1761311587, 179 + "narHash": "sha256-Msq86cR5SjozQGCnC6H8C+0cD4rnx91BPltZ9KK613Y=", 180 + "owner": "numtide", 181 + "repo": "treefmt-nix", 182 + "rev": "2eddae033e4e74bf581c2d1dfa101f9033dbd2dc", 183 + "type": "github" 184 + }, 185 + "original": { 186 + "owner": "numtide", 187 + "repo": "treefmt-nix", 188 + "type": "github" 189 + } 190 + } 191 + }, 192 + "root": "root", 193 + "version": 7 194 + }
+63
templates/minimal/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 + den = { 9 + url = "github:vic/den"; 10 + }; 11 + flake-aspects = { 12 + url = "github:vic/flake-aspects"; 13 + }; 14 + flake-file = { 15 + url = "github:vic/flake-file"; 16 + }; 17 + flake-parts = { 18 + inputs = { 19 + nixpkgs-lib = { 20 + follows = "nixpkgs-lib"; 21 + }; 22 + }; 23 + url = "github:hercules-ci/flake-parts"; 24 + }; 25 + home-manager = { 26 + inputs = { 27 + nixpkgs = { 28 + follows = "nixpkgs"; 29 + }; 30 + }; 31 + url = "github:nix-community/home-manager"; 32 + }; 33 + import-tree = { 34 + url = "github:vic/import-tree"; 35 + }; 36 + nix-auto-follow = { 37 + inputs = { 38 + nixpkgs = { 39 + follows = "nixpkgs"; 40 + }; 41 + }; 42 + url = "github:fzakaria/nix-auto-follow"; 43 + }; 44 + nixpkgs = { 45 + url = "github:nixos/nixpkgs/nixpkgs-unstable"; 46 + }; 47 + nixpkgs-lib = { 48 + follows = "nixpkgs"; 49 + }; 50 + systems = { 51 + url = "github:nix-systems/default"; 52 + }; 53 + treefmt-nix = { 54 + inputs = { 55 + nixpkgs = { 56 + follows = "nixpkgs"; 57 + }; 58 + }; 59 + url = "github:numtide/treefmt-nix"; 60 + }; 61 + }; 62 + 63 + }
+6
templates/minimal/modules/aspects.nix
···
··· 1 + # A best practice is not to use a single file 2 + # but split into modules in directories. 3 + { 4 + # den.aspects.my-laptop = { }; 5 + # den.aspects.my-user = { }; 6 + }
+9
templates/minimal/modules/defaults.nix
···
··· 1 + # User TODO: Remove this file. 2 + { 3 + # default aspect can be used for global static settings. 4 + den.default = { 5 + darwin.system.stateVersion = 6; 6 + nixos.system.stateVersion = "25.05"; 7 + homeManager.home.stateVersion = "25.05"; 8 + }; 9 + }
+7
templates/minimal/modules/dendritic.nix
···
··· 1 + { inputs, lib, ... }: 2 + { 3 + flake-file.inputs.flake-file.url = lib.mkDefault "github:vic/flake-file"; 4 + imports = [ 5 + inputs.flake-file.flakeModules.dendritic 6 + ]; 7 + }
+13
templates/minimal/modules/homes.nix
···
··· 1 + { den, ... }: 2 + { 3 + # Define standalone homes. 4 + # den.homes.x86_64-linux.alice = {}; 5 + 6 + # Enable home-manager for NixOS/Darwin 7 + den.default.includes = [ den._.home-manager ]; 8 + 9 + flake-file.inputs.home-manager = { 10 + url = "github:nix-community/home-manager"; 11 + inputs.nixpkgs.follows = "nixpkgs"; 12 + }; 13 + }
+3
templates/minimal/modules/hosts.nix
···
··· 1 + { 2 + # den.hosts.x86_64-linux.my-laptop.users.my-user = {}; 3 + }