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

docs for wsl

+20 -19
+1 -1
docs/src/content/docs/guides/batteries.mdx
··· 38 38 39 39 On NixOS: adds `wheel` and `networkmanager` groups. 40 40 On Darwin: sets `system.primaryUser`. 41 - On WSL: sets `wsl.defaultUser` if host has a `wsl` attribute. 41 + On WSL: sets `wsl.defaultUser` if host has a `wsl.enable = true`. 42 42 43 43 ## user-shell 44 44
+19 -18
docs/src/content/docs/guides/declare-hosts.mdx
··· 57 57 home-manager switch --flake .#vic 58 58 ``` 59 59 60 - The following standalone Home-Manager example showcases 61 - custom input channels and output attribute. 62 - 63 - ```nix 64 - den.homes.x86_64-linux.tux-at-igloo = { 65 - intoAttr = [ "homeConfigurations" "tux@igloo" ]; 66 - userName = "tux"; 67 - instantiate = { pkgs, modules }: 68 - inputs.home-manager-stable.lib.homeManagerConfiguration { 69 - inherit modules; 70 - pkgs = inputs.self.nixpkgs-stable.legacyPackages.x86_64-linux; 71 - extraSpecialArgs.osConfig = inputs.self.nixosConfigurations.igloo.config; 72 - }; 73 - }; 74 - ``` 75 - 76 60 ## Multiple Hosts, Shared Users 77 61 78 62 The same user aspect applies to every host it appears on: 79 63 80 - ```nix 64 + ```nix "vic" 81 65 den.hosts.x86_64-linux.desktop.users.vic = { }; 82 66 den.hosts.x86_64-linux.server.users.vic = { }; 83 67 den.hosts.aarch64-darwin.mac.users.vic = { }; 84 68 ``` 85 69 86 - All three machines share `den.aspects.vic` configurations. 70 + All three machines share same `den.aspects.vic` user aspect. 87 71 88 72 ## Freeform Attributes 89 73 ··· 136 120 ```nix 137 121 den.hosts.x86_64-linux.wsl-box = { 138 122 intoAttr = [ "wslConfigurations" "my-wsl" ]; 123 + wsl.enable = true; 139 124 users.wsl = { }; 140 125 }; 141 126 ``` 127 + 128 + Custom nixpkgs instance, home-manager osConfig and output attribute: 129 + 130 + ```nix 131 + den.homes.x86_64-linux.tux-at-igloo = { 132 + aspect = "tux"; # Use den.aspects.tux for configuration 133 + intoAttr = [ "homeConfigurations" "tux@igloo" ]; 134 + instantiate = { pkgs, modules }: 135 + inputs.home-manager-stable.lib.homeManagerConfiguration { 136 + inherit modules; 137 + pkgs = inputs.self.nixpkgs-stable.legacyPackages.x86_64-linux; 138 + extraSpecialArgs.osConfig = inputs.self.nixosConfigurations.igloo.config; 139 + }; 140 + }; 141 + ``` 142 +