Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ Pause, summarize the situation, and ask vx for direction before proceeding.

| Name | Path | Use When |
| -------------- | -------------------------- | ----------------------------------------------------------------- |
| Stylix | `$HOME/git/stylix` | Inspect Stylix source or apply local patches. |
| Home Manager | `$HOME/git/home-manager` | Review module behaviors or backport fixes. |
| i3 Docs | `$HOME/git/i3wm-docs` | Reference i3 window manager documentation offline. |
| nixpkgs | `$HOME/git/nixpkgs` | Vendor patches or inspect upstream expressions. |
Expand Down
1 change: 0 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ Pause, summarize the situation, and ask vx for direction before proceeding.

| Name | Path | Use When |
| -------------- | -------------------------- | ----------------------------------------------------------------- |
| Stylix | `$HOME/git/stylix` | Inspect Stylix source or apply local patches. |
| Home Manager | `$HOME/git/home-manager` | Review module behaviors or backport fixes. |
| i3 Docs | `$HOME/git/i3wm-docs` | Reference i3 window manager documentation offline. |
| nixpkgs | `$HOME/git/nixpkgs` | Vendor patches or inspect upstream expressions. |
Expand Down
54 changes: 54 additions & 0 deletions debug/flake-nixosModules-reproducer.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
flake ? builtins.getFlake (toString ./..),
lib ? flake.inputs.nixpkgs.lib,
}:
let
optionStub =
{ lib, ... }@args:
let
useStub = (args ? forceStubBootstrap) && args.forceStubBootstrap;
in
lib.mkIf useStub {
options.flake.nixosModules = lib.mkOption {
type = lib.types.lazyAttrsOf lib.types.deferredModule;
default = { };
description = "Debug stub: defines flake.nixosModules so downstream modules can assign into it.";
};
config.flake.nixosModules = lib.mkDefault { };
};

roleModule = _: {
config.flake.nixosModules.roles = {
xserver = {
imports = [
(_: { })
];
};
};
};

evalWithoutStub = builtins.tryEval (
lib.evalModules {
modules = [ roleModule ];
specialArgs = { inherit lib; };
}
);

evalWithStub = builtins.tryEval (
lib.evalModules {
modules = [
optionStub
roleModule
];
specialArgs = { inherit lib; };
}
);
in
{
inherit
optionStub
roleModule
evalWithoutStub
evalWithStub
;
}
Loading