Skip to content

Commit e14e69b

Browse files
committed
feat: improve nix developer skill
1 parent 3c5b88d commit e14e69b

3 files changed

Lines changed: 54 additions & 49 deletions

File tree

.agents/skills/nix-developer/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ configurations.
2121
- **Declarative Over Imperative:** Avoid `nix-env` or imperative state
2222
manipulation. Everything should be declared in code.
2323
- **Formatting and linting:** Configure `treefmt` to run `nixfmt`, `deadnix`,
24-
and `statix`. For more information, see
24+
and `statix`. Run formatting with `nix fmt`. For more information, see
2525
[references/nix-treefmt.md](references/nix-treefmt.md).
2626

2727
## Workflows
@@ -65,7 +65,7 @@ When configuring user-specific dotfiles or packages:
6565

6666
### Flake development
6767

68-
- Explicitly pin the flake to a release branch:
69-
`url = "github:NixOS/nixpkgs/nixos-25.11"`.
68+
- Explicitly pin the flake to a release branch (e.g.,
69+
`url = "github:NixOS/nixpkgs/nixos-25.11"`).
7070
- Use `inputs.nixpkgs.follows` to unify `nixpkgs` across all inputs.
7171
- Pass inputs to modules using `specialArgs = { inherit inputs; }`.

.agents/skills/nix-developer/references/nix-treefmt.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -26,55 +26,55 @@ Then, load this configuration in a flake (`flake.nix`):
2626

2727
```nix
2828
{
29-
description = "Example flake";
29+
description = "Example flake";
3030
31-
inputs = {
32-
# Reference in case we want to switch to unstable
33-
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
31+
inputs = {
32+
# Example: Pin to a specific release branch
33+
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
3434
35-
treefmt-nix.url = "github:numtide/treefmt-nix";
36-
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
37-
};
35+
treefmt-nix.url = "github:numtide/treefmt-nix";
36+
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
37+
};
3838
39-
outputs =
40-
{
41-
self,
42-
nixpkgs,
43-
treefmt-nix,
44-
...
45-
}:
46-
let
47-
supportedSystems = [
48-
"x86_64-linux"
49-
"aarch64-linux"
50-
"x86_64-darwin"
51-
"aarch64-darwin"
52-
];
53-
eachSystem = nixpkgs.lib.genAttrs supportedSystems;
54-
in
55-
{
56-
formatter = eachSystem (
57-
system:
58-
let
59-
# Use legacyPackages instead of packages to avoid evaluating unneeded
60-
# packages.
61-
# Ref: https://github.com/NixOS/nixpkgs/blob/1073dad219cb244572b74da2b20c7fe39cb3fa9e/flake.nix#L206
62-
pkgs = nixpkgs.legacyPackages.${system};
63-
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
64-
in
65-
treefmtEval.config.build.wrapper
66-
);
39+
outputs =
40+
{
41+
self,
42+
nixpkgs,
43+
treefmt-nix,
44+
...
45+
}:
46+
let
47+
supportedSystems = [
48+
"x86_64-linux"
49+
"aarch64-linux"
50+
"x86_64-darwin"
51+
"aarch64-darwin"
52+
];
53+
eachSystem = nixpkgs.lib.genAttrs supportedSystems;
54+
in
55+
{
56+
formatter = eachSystem (
57+
system:
58+
let
59+
# Use legacyPackages instead of packages to avoid evaluating unneeded
60+
# packages.
61+
# Ref: https://github.com/NixOS/nixpkgs/blob/1073dad219cb244572b74da2b20c7fe39cb3fa9e/flake.nix#L206
62+
pkgs = nixpkgs.legacyPackages.${system};
63+
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
64+
in
65+
treefmtEval.config.build.wrapper
66+
);
6767
68-
checks = eachSystem (
69-
system:
70-
let
71-
pkgs = nixpkgs.legacyPackages.${system};
72-
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
73-
in
74-
{
75-
treefmt-nix = treefmtEval.config.build.check self;
76-
}
77-
);
78-
};
68+
checks = eachSystem (
69+
system:
70+
let
71+
pkgs = nixpkgs.legacyPackages.${system};
72+
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
73+
in
74+
{
75+
treefmt-nix = treefmtEval.config.build.check self;
76+
}
77+
);
78+
};
7979
}
8080
```

.gemini/GEMINI.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ scope:
5050
- **Access to information:** When you cannot get access to data or information
5151
you need, you MUST stop and tell the user.
5252

53+
### Terminology
54+
55+
- Don't use GCP as an acronym for Google Cloud when writing text in natural
56+
language. Use the extended form: Google Cloud.
57+
5358
## Technical stack preferences
5459

5560
- Operating system:

0 commit comments

Comments
 (0)