docs(plan): use self.inputs in top-level imports to avoid module recursion
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Sv2QAunLcLo3tS1YsfLgN
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
## Global Constraints
|
||||
|
||||
- Do **not** modify `machines/configuration.nix`. `inputs` and `self` are already threaded into every module via `_module.args`; consume them as module arguments.
|
||||
- **Top-level `imports` must reference flake modules via `self.inputs.*`, not `inputs.*`.** `self` is a specialArg (available during `imports` resolution); `inputs` comes from `_module.args` (config-derived) and using it in an `imports` list causes infinite recursion. Inside the `config` body (including nested `home-manager.users.<name>.imports`), either `inputs` or `self.inputs` is fine.
|
||||
- Base channel is pinned `nixpkgs/nixos-26.05`; `pkgs.unstable` overlay is available everywhere. quickshell must come from `pkgs.unstable.quickshell` (needs ≥ 0.3.0).
|
||||
- home-manager scoped to user `finn` only; `home.stateVersion = "26.05"`.
|
||||
- Follow the existing profile pattern exactly: `let cfg = config.my.profiles.<name>; in { options.my.profiles.<name>.enable = lib.mkEnableOption "..."; config = lib.mkIf cfg.enable { ... }; }`.
|
||||
@@ -91,7 +92,7 @@ let
|
||||
cfg = config.my.profiles.home-manager;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
imports = [ self.inputs.home-manager.nixosModules.home-manager ];
|
||||
|
||||
options.my.profiles.home-manager.enable =
|
||||
lib.mkEnableOption "home-manager integration";
|
||||
@@ -156,13 +157,14 @@ Create `modules/environments/dank/default.nix`. Use the exact `homeModules`/`nix
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.profiles.dank;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.dank.nixosModules.dank-material-shell ];
|
||||
imports = [ self.inputs.dank.nixosModules.dank-material-shell ];
|
||||
|
||||
options.my.profiles.dank.enable = lib.mkEnableOption "DankMaterialShell on niri";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user