Skip to content
Merged
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
50 changes: 25 additions & 25 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ nix flake check # Check for evaluation errors

There are three nixpkgs inputs with distinct purposes:

- **`nixpkgs`** (stable, `nixos-25.11`) base system. Patched in-place (overwrites itself in `inputs`) with **module-level** changes only (no package rebuilds).
- **`nixpkgs-unstable`** always the original unpatched unstable channel. Exposed as `pkgs.unstable` overlay for select tools that need newer versions.
- **`nixpkgs-patched`** patched version of `nixpkgs-unstable`, stored as a separate input. Used for **package-level** changes to contain cascade rebuilds: patching a package in `nixpkgs-unstable` directly could trigger rebuilds for all dependents; isolating it in a named input limits the blast radius to what explicitly uses `pkgs.patched`.
- **`nixpkgs`** (stable, `nixos-25.11`) - base system. Patched in-place (overwrites itself in `inputs`) with **module-level** changes only (no package rebuilds).
- **`nixpkgs-unstable`** - always the original unpatched unstable channel. Exposed as `pkgs.unstable` overlay for select tools that need newer versions.
- **`nixpkgs-patched`** - patched version of `nixpkgs-unstable`, stored as a separate input. Used for **package-level** changes to contain cascade rebuilds: patching a package in `nixpkgs-unstable` directly could trigger rebuilds for all dependents; isolating it in a named input limits the blast radius to what explicitly uses `pkgs.patched`.

### Input Patching

Expand All @@ -78,18 +78,18 @@ Transitive flake inputs are rewritten selectively using `flake.lock` node names.

Important invariants when editing `nix/inputs.nix`:

- **Top-level canonical nodes** if a dependency is shared in multiple places, it should have a canonical representative at the top level and all repeats should follow that node.
- **`self` is special-cased** the recursive rewrite applies to external inputs, but `self` itself is not rebuilt through that recursion. Only `self.inputs` is updated with the rewritten/exported input set to avoid recursive self-reimport.
- **Top-level canonical nodes** - if a dependency is shared in multiple places, it should have a canonical representative at the top level and all repeats should follow that node.
- **`self` is special-cased** - the recursive rewrite applies to external inputs, but `self` itself is not rebuilt through that recursion. Only `self.inputs` is updated with the rewritten/exported input set to avoid recursive self-reimport.

### Custom pkgs Overlays

`nix/packages/default.nix` instantiates nixpkgs with several overlays, making these package sets available everywhere:

- `pkgs.unstable` nixos-unstable packages
- `pkgs.patched` nixpkgs-unstable with package-level patches applied
- `pkgs.nur` NUR packages
- `pkgs.notashelf` packages from the flint flake
- `pkgs.llm-agents.*` LLM agent tools
- `pkgs.unstable` - nixos-unstable packages
- `pkgs.patched` - nixpkgs-unstable with package-level patches applied
- `pkgs.nur` - NUR packages
- `pkgs.notashelf` - packages from the flint flake
- `pkgs.llm-agents.*` - LLM agent tools

### lib.my.importTree

Expand All @@ -105,26 +105,26 @@ Managed with `sops-nix`. Encrypted secrets live in `secrets/`.

### Key Inputs

- **nvf** Neovim configuration framework (used for all neovim config under `nix/users/ilkecan/text-editors/neovim/`)
- **stylix** System-wide theming
- **niri-flake** Niri Wayland compositor
- **disko** Declarative disk partitioning
- **impermanence** Ephemeral root filesystem support
- **sops-nix** Secrets management (encrypted secrets in `secrets/`)
- **dms** DankMaterialShell, a desktop shell for Wayland compositors, built with Quickshell
- **betterfox-nix** Firefox user.js optimization
- **git-hooks-nix** Pre-commit hooks framework (comrak, deadnix, flake-checker, flint, gitleaks, nil, nixf-diagnose, nixfmt, ripsecrets)
- **nixos-cli** NixOS CLI tool
- **mcp-servers-nix** MCP server configuration for Home Manager
- **optnix** Nix option analysis tool
- **nvf** - Neovim configuration framework (used for all neovim config under `nix/users/ilkecan/text-editors/neovim/`)
- **stylix** - System-wide theming
- **niri-flake** - Niri Wayland compositor
- **disko** - Declarative disk partitioning
- **impermanence** - Ephemeral root filesystem support
- **sops-nix** - Secrets management (encrypted secrets in `secrets/`)
- **dms** - DankMaterialShell, a desktop shell for Wayland compositors, built with Quickshell
- **betterfox-nix** - Firefox user.js optimization
- **git-hooks-nix** - Pre-commit hooks framework (comrak, deadnix, flake-checker, flint, gitleaks, nil, nixf-diagnose, nixfmt, ripsecrets)
- **nixos-cli** - NixOS CLI tool
- **mcp-servers-nix** - MCP server configuration for Home Manager
- **optnix** - Nix option analysis tool

### Flake Module Outputs

Modules under `nix/modules/` are exposed as flake outputs via `nix/flake/modules.nix`:

- `flakeModules` from `nix/modules/flake/`
- `homeModules` from `nix/modules/home-manager/`
- `nixosModules` from `nix/modules/nixos/`
- `flakeModules` - from `nix/modules/flake/`
- `homeModules` - from `nix/modules/home-manager/`
- `nixosModules` - from `nix/modules/nixos/`

The `cachix-push` flake module (in `nix/modules/flake/`) provides a `flake.cachix.push` option and generates a `perSystem.apps.cachix-push` app for pushing packages to Cachix caches.

Expand Down
56 changes: 28 additions & 28 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions nix/inputs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ let

# Resolve a lock node reference to its canonical node name.
# String refs are already node names; array refs are follow-paths from root
# (e.g. ["nixpkgs"] resolves rootnixpkgs, ["bar","foo"] resolves rootbarfoo).
# (e.g. ["nixpkgs"] resolves root -> nixpkgs, ["bar","foo"] resolves root -> bar -> foo).
resolveNodeName =
inputSpec:
if isString inputSpec then
Expand All @@ -127,7 +127,7 @@ let
topLevelNodeNames = mapAttrs (name: _: resolveTopLevelNodeName name) inputs';

# Shadowed inputs are those whose name also appears in inputs'. Additive
# patches (e.g. nixpkgs-patched) are excluded they add a name not present
# patches (e.g. nixpkgs-patched) are excluded - they add a name not present
# in inputs', so they have no corresponding lock node to mark dirty.
shadowedInputNames = attrNames (intersectAttrs inputs' patchedInputs);
shadowedNodeNames = map resolveTopLevelNodeName shadowedInputNames;
Expand Down Expand Up @@ -171,7 +171,7 @@ let
)
) inputs';

# Maps each top-level input's lock node name its canonical resolved version.
# Maps each top-level input's lock node name -> its canonical resolved version.
# Transitive followers share the same lock node name, so they get the same thunk.
nodeNameMapping = mapAttrs' (
name: _: nameValuePair topLevelNodeNames.${name} resolvedTopLevel.${name}
Expand Down
31 changes: 16 additions & 15 deletions nix/packages/patched/nix-fast-build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
nix-fast-build,
}:

nix-fast-build.overrideAttrs (prev: {
version = "${prev.version}-unstable-2026-03-11";
src = prev.src.override {
tag = null;
rev = "f5ca03a4387aecd739d60c77ae26e567481c3013";
hash = "sha256-mInYAyDT49w0ux7Jgg4Ny3igyEKlRvqzG2KAG9YVmsg=";
};
patches = (prev.patches or [ ]) ++ [
(fetchpatch2 {
name = "support-impure-derivations.patch";
url = "https://github.com/Mic92/nix-fast-build/pull/301.diff?full_index=1";
hash = "sha256-xVN5nOUIDTrCJ6jBeKp/MiYkHULYvj0xgBFqiQ34f+U=";
})
];
})
nix-fast-build.overrideAttrs (
_final: prev: {
version = "1.4.0-unstable-2026-03-19";
src = prev.src.override {
tag = "1.4.0";
hash = "sha256-sH/KWX8NO8iurnnkI7w8eWMkbnRBbvEIK9IW4LnR0qQ=";
};
patches = (prev.patches or [ ]) ++ [
(fetchpatch2 {
name = "guard-against-empty-outputs.patch";
url = "https://github.com/Mic92/nix-fast-build/pull/309.diff?full_index=1";
hash = "sha256-e+2AowxVyx2FbGxgZRND0PsR5gdLGXSAVTN9Ur0Ew4Y=";
})
];
}
)
4 changes: 2 additions & 2 deletions nix/users/ilkecan/llm/codex.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ in
# enableMcpIntegration = true; # disable until lazy loading is implemented https://github.com/openai/codex/issues/9266
settings = {
model = "gpt-5.4";
model_reasoning_effort = "medium";
plan_mode_reasoning_effort = "high";
model_reasoning_effort = "high";
plan_mode_reasoning_effort = "xhigh";
personality = "pragmatic";

features = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
...
}:

{
programs.dank-material-shell.plugins.screenRecorder = {
enable = true;
settings = {
};
};
}