Compare commits

..

No commits in common. "34246c71d44c39f04215df7a4df016c0b4eda2f4" and "c9e07fd6eec568b83dea26c2fca13d6d685eb42b" have entirely different histories.

6 changed files with 6 additions and 267 deletions

4
.gitignore vendored
View file

@ -8,8 +8,4 @@
# build artifacts
result
# devenv artifacts
.direnv
.devenv
tmp

View file

@ -1,34 +0,0 @@
# Agent Guidelines for NixOS Dotfiles
## Development Environment
- **Enter shell**: `nix develop --no-pure-eval` or automatic via direnv
- **Run pre-commit hooks**: `devenv test` (also runs automatically on git commit)
- **Start services**: `devenv up` (if any processes are defined)
## Build/Test Commands
- **Build system**: `nix build .#nixosConfigurations.<hostname>` (e.g., `nix build .#nixosConfigurations.carbon`)
- **Build home config**: `nix build .#homeConfigurations."alejandro@<hostname>"`
- **Test configuration**: `nix flake check` (validates all configurations)
- **Format code**: `nixfmt .` (Nix formatter, available in devenv shell)
- **Deploy**: `nix run github:serokell/deploy-rs -- .#<hostname>` (e.g., `.#gospel`)
## Code Style Guidelines
- **Formatter**: Use nixfmt-rfc-style for Nix code formatting (managed by devenv pre-commit hooks)
- **Pre-commit**: Hooks run automatically on commit via devenv (trailing whitespace, YAML validation, etc.)
- **Imports**: Group function parameters in curly braces, use `...` for extensibility
- **Naming**: Use camelCase for variables, kebab-case for hostnames/services
- **Module structure**: Follow `{ config, lib, pkgs, namespace, ... }:` pattern
- **Options**: Use `lib.mkEnableOption` and `lib.mkOption` with proper types and descriptions
- **Conditionals**: Use `lib.mkIf` for conditional configuration, `lib.mkMerge` for combining configs
- **Namespace**: Use `aa` namespace for custom modules (defined in flake.nix)
- **Comments**: Add descriptive comments for complex logic, especially in system configurations
- **Error handling**: Leverage Nix's built-in evaluation errors, use `lib.assertMsg` for custom assertions
## Repository Structure
- `flake.nix`: Main entry point using Snowfall lib with devenv integration
- `devenv.nix`: Development environment configuration with pre-commit hooks
- `systems/`: NixOS system configurations
- `homes/`: Home Manager configurations
- `modules/`: Reusable modules (nixos/ and home/)
- `packages/`: Custom package definitions
- `.envrc`: Direnv configuration for automatic shell activation

View file

@ -1,21 +0,0 @@
{ pkgs, ... }:
{
packages = [
pkgs.nixfmt-rfc-style
pkgs.nixd
pkgs.deploy-rs
pkgs.git
];
git-hooks.hooks = {
# Basic file hygiene
trim-trailing-whitespace.enable = true;
end-of-file-fixer.enable = true;
check-yaml.enable = true;
check-added-large-files = {
enable = true;
excludes = [ ".*\\.png$" ];
};
nixfmt-rfc-style.enable = true;
};
}

188
flake.lock generated
View file

@ -25,38 +25,6 @@
"type": "github"
}
},
"cachix": {
"inputs": {
"devenv": [
"devenv"
],
"flake-compat": [
"devenv"
],
"git-hooks": [
"devenv",
"git-hooks"
],
"nixpkgs": [
"devenv",
"nixpkgs"
]
},
"locked": {
"lastModified": 1748883665,
"narHash": "sha256-R0W7uAg+BLoHjMRMQ8+oiSbTq8nkGz5RDpQ+ZfxxP3A=",
"owner": "cachix",
"repo": "cachix",
"rev": "f707778d902af4d62d8dd92c269f8e70de09acbe",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "latest",
"repo": "cachix",
"type": "github"
}
},
"catppuccin": {
"inputs": {
"nixpkgs": "nixpkgs"
@ -97,30 +65,6 @@
"type": "github"
}
},
"devenv": {
"inputs": {
"cachix": "cachix",
"flake-compat": "flake-compat_2",
"git-hooks": "git-hooks",
"nix": "nix",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1754158015,
"narHash": "sha256-B/o0XiDj06Knm7t/9KmLKnkrpI9s5O13qU+SNL/4Gp8=",
"owner": "cachix",
"repo": "devenv",
"rev": "062f3f42de2f6bb7382f88f6dbcbbbaa118a3791",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -138,22 +82,6 @@
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1650374568,
@ -170,28 +98,6 @@
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"devenv",
"nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
@ -209,7 +115,7 @@
"type": "github"
}
},
"flake-parts_3": {
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
@ -286,54 +192,6 @@
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": [
"devenv",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"devenv",
"nixpkgs"
]
},
"locked": {
"lastModified": 1750779888,
"narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"devenv",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -385,43 +243,6 @@
"type": "github"
}
},
"nix": {
"inputs": {
"flake-compat": [
"devenv",
"flake-compat"
],
"flake-parts": "flake-parts",
"git-hooks-nix": [
"devenv",
"git-hooks"
],
"nixpkgs": [
"devenv",
"nixpkgs"
],
"nixpkgs-23-11": [
"devenv"
],
"nixpkgs-regression": [
"devenv"
]
},
"locked": {
"lastModified": 1752773918,
"narHash": "sha256-dOi/M6yNeuJlj88exI+7k154z+hAhFcuB8tZktiW7rg=",
"owner": "cachix",
"repo": "nix",
"rev": "031c3cf42d2e9391eee373507d8c12e0f9606779",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "devenv-2.30",
"repo": "nix",
"type": "github"
}
},
"nixlib": {
"locked": {
"lastModified": 1736643958,
@ -539,7 +360,7 @@
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
@ -562,7 +383,7 @@
},
"nixvim_2": {
"inputs": {
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_3",
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_4"
@ -627,7 +448,6 @@
"agenix": "agenix",
"catppuccin": "catppuccin",
"deploy-rs": "deploy-rs",
"devenv": "devenv",
"home-manager": "home-manager",
"nixos-generators": "nixos-generators",
"nixos-hardware": "nixos-hardware",
@ -640,7 +460,7 @@
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_2",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"

View file

@ -28,9 +28,6 @@
nixvim.url = "git+https://git.alejandr0angul0.dev/alejandro-angulo/nixvim-config?ref=main";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
devenv.url = "github:cachix/devenv";
devenv.inputs.nixpkgs.follows = "nixpkgs";
zsh-syntax-highlighting.url = "github:zsh-users/zsh-syntax-highlighting/master";
zsh-syntax-highlighting.flake = false;
@ -57,14 +54,6 @@
homes.modules = with inputs; [ catppuccin.homeModules.catppuccin ];
outputs-builder = channels: {
devShells.default = inputs.devenv.lib.mkShell {
inherit inputs;
pkgs = channels.nixpkgs;
modules = [ ./devenv.nix ];
};
};
deploy.nodes = {
node = {
hostname = "node";

View file

@ -2,19 +2,10 @@
config,
lib,
namespace,
pkgs,
...
}:
let
cfg = config.${namespace}.programs.opencode;
context7 = pkgs.writeShellApplication {
name = "context7-mcp";
runtimeInputs = [ pkgs.nodejs_24 ];
text = ''
npx -y @upstash/context7-mcp
'';
};
in
{
options.${namespace}.programs.opencode = {
@ -28,10 +19,8 @@ in
theme = "catppuccin";
mcp = {
context7 = {
type = "local";
command = [
"${context7}/bin/context7-mcp"
];
type = "remote";
url = "https://mcp.context7.com/mcp";
enabled = true;
};
};