Compare commits

..

1 Commits

Author SHA1 Message Date
kiri 12e05c42f8 feat: add work repo to trusted codex folders 2026-06-08 10:02:53 +02:00
59 changed files with 2022 additions and 1223 deletions
+78
View File
@@ -0,0 +1,78 @@
# AGENTS.md
## Purpose
This repo uses the Dendritic Pattern with `flake-parts`.
Design and change the configuration as a composition of **features**, not as a host-first tree.
For deeper design rationale and pattern descriptions, refer to `.agents/dendritic-design-with-flake-parts.wiki`.
## Core Terms
- **Feature**: a flake-parts module under `modules/` that defines one coherent concern.
- **Aspect**: a reusable module published at `flake.modules.<module class>.<aspect name>`.
- **Module class**: the configuration context of an aspect. This repo primarily uses `nixos` and `homeManager`.
- **Feature module**: the flake-parts module that defines aspects, flake outputs, options, or shared helpers.
In this repo, `flake.nix` imports `./modules` recursively via `inputs.import-tree`. Any non-private `.nix` file under `modules/` is therefore treated as a feature module.
## Design Principles
- Work bottom-up. Define features first; assemble hosts from features.
- Keep semantic ownership local. A feature should contain the configuration for that concern across all relevant module classes.
- Name aspects semantically. The aspect name should usually match the file or directory name that defines it.
- Prefer small, composable aspects. Build larger configurations with `imports`.
- Import aspects unconditionally and only within the same module class.
- Put conditions inside module content with `lib.mkIf` or `lib.mkMerge`, never around `imports`.
- Avoid importing the same aspect multiple times along one import path.
- Keep private helper files next to the feature that uses them and prefix them with `_` so `import-tree` does not import them as feature modules.
- Put shared schemas and constructors in dedicated shared modules, not ad hoc host files.
## Repo Structure
- `modules/capabilities/`: reusable leaf capability features and most aspect definitions.
- `modules/capabilities/services/`: reusable service capabilities, especially hosted daemons and network services.
- `modules/profiles/`: bundle features that assemble capabilities into larger profiles such as `host-base` and `workstation-base`.
- `modules/hosts/<name>/default.nix`: host features that assemble NixOS aspects into `flake.modules.nixos.<name>`.
- `modules/secrets/`: secret-related features shared by hosts.
- `modules/flake-parts.nix`: flake-parts entrypoint; defines systems, formatter, and `flake.nixosConfigurations`.
- `modules/lib/`: shared schemas, constructors, and helpers exposed through `repo.helpers`, especially `mkHost` and `mkCaddyReverseProxy`.
- `modules/data.nix`: canonical shared repo data, including the single `repo.account`, machine inventory, desktop preferences, services, and theme data.
- `modules/lib/schema.nix`: shared metadata schema for `repo.*` and NixOS `meta.machine`.
## How Features Are Applied Here
- Reusable NixOS concerns are published as `flake.modules.nixos.<name>`.
- Reusable Home Manager concerns are published as `flake.modules.homeManager.<name>`.
- Hosts are aspects too. `orion`, `polaris`, and `zenith` are `nixos` aspects assembled from smaller aspects.
- `flake.nixosConfigurations` instantiates every entry in `repo.machines` with `config.repo.helpers.mkHost`.
- Hosts define machine data under `repo.machines.<name>` and host-specific NixOS composition under `flake.modules.nixos.<name>`.
- `mkHost` wires the single `repo.account` into `users.users.<name>` and `home-manager.users.<name>`.
- NixOS modules may read `config.meta.machine`; Home Manager modules should read host facts through `osConfig.meta.machine` and user facts through `config.home` or `repo.account`.
## Preferred Aspect Patterns
- **Simple Aspect**: use for one self-contained concern in one or more module classes.
- **Multi Context Aspect**: use when one concern must configure both `nixos` and `homeManager`.
- **Inheritance Aspect**: use by importing a parent aspect and extending it.
- **Conditional Aspect**: use `lib.mkMerge` plus `lib.mkIf` for conditional content.
Use **Collector Aspect** only when composition through imports or shared library helpers is insufficient.
## Change Rules
- When adding a reusable leaf feature, add or extend aspects under `modules/capabilities/` and let profiles or hosts opt into them explicitly.
- When adding a hosted service or network daemon feature, prefer `modules/capabilities/services/`.
- When adding a bundle of existing capabilities, put it under `modules/profiles/`.
- When adding a host, create `modules/hosts/<name>/default.nix` and keep host-local generated files private as `_hardware.nix`, `_disk.nix`, or similar.
- When a feature needs local data or helper code, keep it inside that feature directory and prefix non-feature files with `_` when they live under `modules/`.
- Do not place arbitrary non-feature `.nix` files under `modules/` unless they are intentionally private and excluded from recursive import.
- If a concern is shared across hosts, it belongs in a reusable feature, not inline in one host unless it is truly host-specific.
## Practical Heuristics
- If you are about to edit a host because of a reusable concern, that concern probably wants its own feature.
- If a Home Manager module needs host facts, prefer `osConfig.meta.machine`; for user facts, prefer `config.home` or `repo.account` instead of duplicating literals.
- If a concern spans system and user space, keep both aspects in one feature so the behavior stays coherent.
- If imports would need to be conditional, redesign the aspect boundary instead.
Generated
+498 -119
View File
@@ -1,5 +1,30 @@
{
"nodes": {
"blueprint": {
"inputs": {
"nixpkgs": [
"llm-agents",
"nixpkgs"
],
"systems": [
"llm-agents",
"systems"
]
},
"locked": {
"lastModified": 1776249299,
"narHash": "sha256-Dt9t1TGRmJFc0xVYhttNBD6QsAgHOHCArqGa0AyjrJY=",
"owner": "numtide",
"repo": "blueprint",
"rev": "56131e8628f173d24a27f6d27c0215eff57e40dd",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "blueprint",
"type": "github"
}
},
"bun2nix": {
"inputs": {
"flake-parts": [
@@ -20,11 +45,11 @@
]
},
"locked": {
"lastModified": 1784665499,
"narHash": "sha256-9BMxlTxCCDAeoNLtb1a/st7udtTIJep+wpUzquA29VU=",
"lastModified": 1778446047,
"narHash": "sha256-oQvcadh2BCkrog+SGrG6YffKJrveYpjj3TdQJWaKhaM=",
"owner": "nix-community",
"repo": "bun2nix",
"rev": "0f2a1f0b6f42cebe3b149bf62d38754c5e0e9729",
"rev": "f2bc12af1a6369648aac41041ceeaa0b866599c6",
"type": "github"
},
"original": {
@@ -33,6 +58,83 @@
"type": "github"
}
},
"cachix": {
"inputs": {
"devenv": [
"devenv"
],
"flake-compat": [
"devenv",
"flake-compat"
],
"git-hooks": [
"devenv",
"git-hooks"
],
"nixpkgs": [
"devenv",
"nixpkgs"
]
},
"locked": {
"lastModified": 1777487137,
"narHash": "sha256-TuvKVBX60mqyMT6OB5JqVEh1YIWtFMR/igLCaCdC9tw=",
"owner": "cachix",
"repo": "cachix",
"rev": "a66a440c321d35f7193472c317f42a55ccd1cb93",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "latest",
"repo": "cachix",
"type": "github"
}
},
"crate2nix": {
"flake": false,
"locked": {
"lastModified": 1772186516,
"narHash": "sha256-8s28pzmQ6TOIUzznwFibtW1CMieMUl1rYJIxoQYor58=",
"owner": "rossng",
"repo": "crate2nix",
"rev": "ba5dd398e31ee422fbe021767eb83b0650303a6e",
"type": "github"
},
"original": {
"owner": "rossng",
"repo": "crate2nix",
"rev": "ba5dd398e31ee422fbe021767eb83b0650303a6e",
"type": "github"
}
},
"devenv": {
"inputs": {
"cachix": "cachix",
"crate2nix": "crate2nix",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"ghostty": "ghostty",
"git-hooks": "git-hooks",
"nix": "nix",
"nixd": "nixd",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1780630679,
"narHash": "sha256-hhQyVAYmNKziZ0T+T4Gsk0PYmnz4vdzOzpkJAmDASKM=",
"owner": "cachix",
"repo": "devenv",
"rev": "90ed6227ab389dd4e874a69a724f25dba312b754",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"disko": {
"inputs": {
"nixpkgs": [
@@ -40,11 +142,11 @@
]
},
"locked": {
"lastModified": 1781152676,
"narHash": "sha256-RxWs5ND31KzTG7wvMM+PMfUjyNpmIEr999lqNARaM5o=",
"lastModified": 1780290312,
"narHash": "sha256-eTAlX0CwgB84Ts3GaBd944A3DRXVMzgA0EqroZBISUo=",
"owner": "nix-community",
"repo": "disko",
"rev": "ff8702b4de27f72b4c78573dfb89ec74e36abdf1",
"rev": "115e5211780054d8a890b41f0b7734cafad54dfe",
"type": "github"
},
"original": {
@@ -61,11 +163,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1784365424,
"narHash": "sha256-kJO1Tww/GkvLq5amrV4BKidYGr5YumM+cH/xYALAiw4=",
"lastModified": 1775706155,
"narHash": "sha256-h7Rw0vlb0n0Jsk21WJPm7H+1T1bG+PEuxE5cJ2TZl8A=",
"owner": "abenz1267",
"repo": "elephant",
"rev": "23f37238367355cf46843015ad5e94706200176a",
"rev": "376ee71c66db38683daabd57350bf3f6f086eaf8",
"type": "github"
},
"original": {
@@ -74,16 +176,35 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
"nixpkgs-lib": [
"devenv",
"nixpkgs"
]
},
"locked": {
"lastModified": 1782949081,
"narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"lastModified": 1778716662,
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb",
"type": "github"
},
"original": {
@@ -100,11 +221,11 @@
]
},
"locked": {
"lastModified": 1782949081,
"narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"lastModified": 1778716662,
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb",
"type": "github"
},
"original": {
@@ -113,22 +234,85 @@
"type": "github"
}
},
"helix": {
"flake-parts_3": {
"inputs": {
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1784822617,
"narHash": "sha256-IYDL6Vnf13Sa+wbeXZTAxvdLA4h8Ew5ha0spcJy/Yk0=",
"owner": "helix-editor",
"repo": "helix",
"rev": "079a789e8cb08ead67f19e1971a1b7438b37354b",
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"type": "github"
},
"original": {
"owner": "helix-editor",
"repo": "helix",
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"ghostty": {
"flake": false,
"locked": {
"lastModified": 1779069789,
"narHash": "sha256-ojo+gso45/6CVSuqfSVnlWpQ4d0QeLgwok+v/g3yu0E=",
"owner": "ghostty-org",
"repo": "ghostty",
"rev": "4b7bf0b20e3baf9c1ba10c63f2ad1fd853faea8f",
"type": "github"
},
"original": {
"owner": "ghostty-org",
"repo": "ghostty",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": [
"devenv",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"devenv",
"nixpkgs"
]
},
"locked": {
"lastModified": 1778507602,
"narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a",
"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"
}
},
@@ -139,11 +323,11 @@
]
},
"locked": {
"lastModified": 1784913159,
"narHash": "sha256-JWq0BfjO4ktpH5USfQNQzdvHpIDT8fSKD5K7LvdMRFs=",
"lastModified": 1780593650,
"narHash": "sha256-CHo7k65YTL3HY+WQVedDTupji+LMgNlKCdrtRHZFAK4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "079a3b5d1aa6a719920a51316253b7d6dd22738d",
"rev": "447fd9ff62501dae7206dfe180ee89f8de27b7d5",
"type": "github"
},
"original": {
@@ -154,11 +338,11 @@
},
"import-tree": {
"locked": {
"lastModified": 1784254960,
"narHash": "sha256-iI88R3wHz8wTKQb5orvpc51L/Xr64AJyxid/0MKa/b8=",
"lastModified": 1778781969,
"narHash": "sha256-Jjuz5CmSkur8KvLDoGa+vylEp+RkQtv4mt/qcMznpH0=",
"owner": "vic",
"repo": "import-tree",
"rev": "4ebb10ae17d5f1ad366e7aef5b92cb8eecf24f69",
"rev": "d321337efd0f23a9eb14a42adb7b2c29313ab274",
"type": "github"
},
"original": {
@@ -169,20 +353,21 @@
},
"llm-agents": {
"inputs": {
"blueprint": "blueprint",
"bun2nix": "bun2nix",
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_2",
"treefmt-nix": "treefmt-nix"
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1784961014,
"narHash": "sha256-Ot9VI5fn7odhq1Him2pRjdFkLAm9CUTUqUz///pTFF8=",
"lastModified": 1780640554,
"narHash": "sha256-dgnL2gTgRoO1D4z6wkARGCO/gimq3/UE/mVFcQcWBn8=",
"owner": "numtide",
"repo": "llm-agents.nix",
"rev": "d8b00961d99eb93ec852f29ed8be290573cc88e8",
"rev": "f764eba1fdd162a1f2bc923f7e7034b894a22b4a",
"type": "github"
},
"original": {
@@ -191,21 +376,40 @@
"type": "github"
}
},
"lux-pkgs": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1772315038,
"narHash": "sha256-YL6NQd97AiZGe/Q4ZWxZaguKVHL0pfNvP/Cqgl/oh4g=",
"ref": "refs/heads/main",
"rev": "d7660146e70475c096bed703e4dad687a58e13dc",
"revCount": 1,
"type": "git",
"url": "ssh://gitea@orion/kiri/lux-pkgs"
},
"original": {
"type": "git",
"url": "ssh://gitea@orion/kiri/lux-pkgs"
}
},
"niri": {
"inputs": {
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"nixpkgs-stable": "nixpkgs-stable",
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1784874881,
"narHash": "sha256-u4jhSIf/Un0qZB+Cn3hTTaHSI20XeAxYbA5o4faqdJs=",
"lastModified": 1780639821,
"narHash": "sha256-SOTuKPQ9HptaWKnd6pbiSOC3YyY2tXwCJ5sQwKUDldU=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "ef7a2a3d719af46b906c22a3ebfb7d65627b2cd2",
"rev": "f92324f4e97776e141dc8a8ce4debc6c91b64038",
"type": "github"
},
"original": {
@@ -234,11 +438,11 @@
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1784570726,
"narHash": "sha256-9EMn69JBcFWFgUM7f0VBAX+jBby5b9H3M59U75+5yI4=",
"lastModified": 1780637332,
"narHash": "sha256-FeKyLRxLZu2EUnhifijZPDZRl0sVnPVHMtizAINNiN4=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "7f26c3ee804fb6ed458ef7fb0e3c794f14e0b3bc",
"rev": "f717ae030fe56fc52522ebef69f17f3f09064ac4",
"type": "github"
},
"original": {
@@ -247,6 +451,46 @@
"type": "github"
}
},
"nix": {
"inputs": {
"flake-compat": [
"devenv",
"flake-compat"
],
"flake-parts": [
"devenv",
"flake-parts"
],
"git-hooks-nix": [
"devenv",
"git-hooks"
],
"nixpkgs": [
"devenv",
"nixpkgs"
],
"nixpkgs-23-11": [
"devenv"
],
"nixpkgs-regression": [
"devenv"
]
},
"locked": {
"lastModified": 1779748925,
"narHash": "sha256-meIhqGC04O5VXbKSFXSQoOKp+XCq5RMnwAk1Guo0VQo=",
"owner": "cachix",
"repo": "nix",
"rev": "0bc443c8ff235c3547d09327b48aaa2ab98b15f2",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "devenv-2.34",
"repo": "nix",
"type": "github"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
@@ -254,11 +498,11 @@
]
},
"locked": {
"lastModified": 1784440659,
"narHash": "sha256-Q5kNLlWngt7TaIIZoxDKWMHjiSaNRVqr70FqWCRRfr4=",
"lastModified": 1780210899,
"narHash": "sha256-4axz3OBPTKa6LIkXV8n0lc63MQU+et2CB5DGobEAi6k=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "4f8d52a3598b0dc7db7a5e7b419e3edd9d1ecfdb",
"rev": "97df9dc0b7c924344b793a15c1e8e4522ebb854e",
"type": "github"
},
"original": {
@@ -274,11 +518,11 @@
]
},
"locked": {
"lastModified": 1782135443,
"narHash": "sha256-vAmbArdCyjqpVW+37aCy/PMBOLIqukUXLQuEKLwUhA4=",
"lastModified": 1780519948,
"narHash": "sha256-+JiqyEa+77HfyiuJcsG5hUc3bGeEflhUG4TD+CaChzQ=",
"owner": "BirdeeHub",
"repo": "nix-wrapper-modules",
"rev": "6e7f66fa2cdf4d63162580b438f7fcf87c28a46f",
"rev": "6d9506b09f8fbe0429153da1cebef2bd61a98848",
"type": "github"
},
"original": {
@@ -287,16 +531,42 @@
"type": "github"
}
},
"nixos-hardware": {
"nixd": {
"inputs": {
"nixpkgs": "nixpkgs_3"
"flake-parts": [
"devenv",
"flake-parts"
],
"nixpkgs": [
"devenv",
"nixpkgs"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1784723954,
"narHash": "sha256-1CfD8ZUjCkTgjsneLZ/lxCHhgDfqxxE7/GX0MmsgiqA=",
"lastModified": 1778381404,
"narHash": "sha256-FqhdOTA8vyoIpkHhbs2cCT7h6EWM7nsLeOYJc1ifQLE=",
"owner": "nix-community",
"repo": "nixd",
"rev": "e3e45eb76663f522e196b7f0cf34cab201db7779",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixd",
"type": "github"
}
},
"nixos-hardware": {
"inputs": {
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1780310866,
"narHash": "sha256-fPBRVf6A5xlACYcOI59shGrjURuvwu0lRsDoSCEXt/I=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "a017f5b72210026af5b3ac5949f08d94380a6fbd",
"rev": "4ed851c979641e28597a05086332d75cdc9e395f",
"type": "github"
},
"original": {
@@ -307,28 +577,31 @@
}
},
"nixpkgs": {
"inputs": {
"nixpkgs-src": "nixpkgs-src"
},
"locked": {
"lastModified": 1784796856,
"narHash": "sha256-wWFrV5/Qbm+lyt5x20E/bSbfJiGKMo4RCxZV8cl/WZI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e2587caef70cea85dd97d7daab492899902dbf5d",
"lastModified": 1778507786,
"narHash": "sha256-HzSQCKMsMr8r55LwM1JuzIOB+8bzk0FEv6sItKvsfoY=",
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "8f24a228a782e24576b155d1e39f0d914b380691",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"owner": "cachix",
"ref": "rolling",
"repo": "devenv-nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1782614948,
"narHash": "sha256-ePjCwr1sNm9NYUqywL7QfK3JnlS015msC+eBu2zKlp8=",
"lastModified": 1769909678,
"narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "db3f255737b94216eb71cce308e2912cf6bc2d7c",
"rev": "72716169fe93074c333e8d0173151350670b824c",
"type": "github"
},
"original": {
@@ -337,13 +610,30 @@
"type": "github"
}
},
"nixpkgs-stable": {
"nixpkgs-src": {
"flake": false,
"locked": {
"lastModified": 1782847189,
"narHash": "sha256-twXPFqFsrrY5r28Zh7Homgcp2gUMBgQ6WDS98Q/3xFI=",
"lastModified": 1778274207,
"narHash": "sha256-I4puXmX1iovcCHZlRmztO3vW0mAbbRvq4F8wgIMQ1MM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b6018f87da91d19d0ab4cf979885689b469cdd41",
"rev": "b3da656039dc7a6240f27b2ef8cc6a3ef3bccae7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1779796641,
"narHash": "sha256-ZsIrKmhp4vbBXoXXmR/tBXA/UCsAQiJL9vsgZEduhVY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "25f538306313eae3927264466c70d7001dcea1df",
"type": "github"
},
"original": {
@@ -353,29 +643,29 @@
"type": "github"
}
},
"nixpkgs-stable_2": {
"nixpkgs_2": {
"locked": {
"lastModified": 1784856561,
"narHash": "sha256-J+Bx1Z6Oeoj2FgnBhRMKyUhhtDoOpTgXYaVLZpDjW4A=",
"lastModified": 1772173633,
"narHash": "sha256-MOH58F4AIbCkh6qlQcwMycyk5SWvsqnS/TCfnqDlpj4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "597283ad8aa0b331c788e97c4c262d58877074ef",
"rev": "c0f3d81a7ddbc2b1332be0d8481a672b4f6004d6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-26.05",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs_3": {
"locked": {
"lastModified": 1784796856,
"narHash": "sha256-wWFrV5/Qbm+lyt5x20E/bSbfJiGKMo4RCxZV8cl/WZI=",
"lastModified": 1780243769,
"narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e2587caef70cea85dd97d7daab492899902dbf5d",
"rev": "331800de5053fcebacf6813adb5db9c9dca22a0c",
"type": "github"
},
"original": {
@@ -385,7 +675,7 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1767892417,
"narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
@@ -398,65 +688,95 @@
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1784812282,
"narHash": "sha256-kj0RWcISiimYMfvVVXk4O9z73XHY/tPSVYZ24imKdP8=",
"rev": "6d12004108e0e4a5cfa4bd83b14477f040b15773",
"lastModified": 1780365719,
"narHash": "sha256-JX05Ms/dk0c+UoW9IqQriB53HNZFckX9Qd3EJqmcqEw=",
"rev": "ffa10e26ae11d676b2db836259889f1f571cb14f",
"type": "tarball",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1040448.6d12004108e0/nixexprs.tar.xz"
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1009182.ffa10e26ae11/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"lastModified": 1784356753,
"narHash": "sha256-zupdTm41be2fY8cexroEOGjopl3F2Gqs3gk7ieqaM3s=",
"rev": "61b7c44c4073f0b827768aff0049561b5110ea5a",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1036777.61b7c44c4073/nixexprs.tar.xz"
"lastModified": 1780243769,
"narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "331800de5053fcebacf6813adb5db9c9dca22a0c",
"type": "github"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"noctalia": {
"inputs": {
"nixpkgs": "nixpkgs_5"
"nixpkgs": "nixpkgs_6",
"noctalia-qs": "noctalia-qs"
},
"locked": {
"lastModified": 1784944609,
"narHash": "sha256-+TlclUP7Q2ylQ8Uh9M35U1ftuGdp++/QfnX9I3V3VeI=",
"lastModified": 1780371321,
"narHash": "sha256-WCaU6npdMdjZSZHe3XATNDFijmzRnsV8V+iR80e5deg=",
"owner": "noctalia-dev",
"repo": "noctalia",
"rev": "8fc7fac1fd637f0027ce1b3cc9544d053cfd8f2c",
"repo": "noctalia-shell",
"rev": "3aab45a2f34fd47666b05892b95054952e788de1",
"type": "github"
},
"original": {
"owner": "noctalia-dev",
"repo": "noctalia",
"repo": "noctalia-shell",
"type": "github"
}
},
"noctalia-qs": {
"inputs": {
"nixpkgs": [
"noctalia",
"nixpkgs"
],
"systems": "systems_3",
"treefmt-nix": "treefmt-nix_3"
},
"locked": {
"lastModified": 1780194487,
"narHash": "sha256-M+YtjKCTkHrkplNaKVyaxfa8hAWjRF6wFOUBAZvxQ4U=",
"owner": "noctalia-dev",
"repo": "noctalia-qs",
"rev": "07398e12b54f194e3a2d47c87e3fd10b8eeaa27d",
"type": "github"
},
"original": {
"owner": "noctalia-dev",
"repo": "noctalia-qs",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"disko": "disko",
"elephant": "elephant",
"flake-parts": "flake-parts",
"helix": "helix",
"flake-parts": [
"lux-pkgs",
"flake-parts"
],
"home-manager": "home-manager",
"import-tree": "import-tree",
"llm-agents": "llm-agents",
"lux-pkgs": "lux-pkgs",
"niri": "niri",
"nix-index-database": "nix-index-database",
"nix-wrapper-modules": "nix-wrapper-modules",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_4",
"nixpkgs-stable": "nixpkgs-stable_2",
"nixpkgs": "nixpkgs_5",
"noctalia": "noctalia",
"sops-nix": "sops-nix",
"walker": "walker"
@@ -465,16 +785,16 @@
"rust-overlay": {
"inputs": {
"nixpkgs": [
"helix",
"devenv",
"nixpkgs"
]
},
"locked": {
"lastModified": 1775358767,
"narHash": "sha256-f2eC+WIfhjevCPQILuV08i/kmKZzYZpUvkom/33VxCA=",
"lastModified": 1779074409,
"narHash": "sha256-6aXy8Ga41iLVM8ibddFU1O5+wYWcBGNEfZzZuL91eIc=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "20fd44bc663daa53a2575e01293e24e681d62244",
"rev": "2a77b5b1dc952f214e8102acdef1622b68515560",
"type": "github"
},
"original": {
@@ -490,11 +810,11 @@
]
},
"locked": {
"lastModified": 1783174389,
"narHash": "sha256-aCWC8ngycU7OdJrU2+Je3qf+1a2ykuBvpPhZT/9tXMc=",
"lastModified": 1780547341,
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "f1406619a3884cd5c47992a70b8b35c9c0fcb4c9",
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a",
"type": "github"
},
"original": {
@@ -548,7 +868,44 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"devenv",
"nixd",
"nixpkgs"
]
},
"locked": {
"lastModified": 1775636079,
"narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"llm-agents",
@@ -556,11 +913,33 @@
]
},
"locked": {
"lastModified": 1784369104,
"narHash": "sha256-47cxbcZODibHv3rELFQ9vZly0vUNkND/atn/U7HLeb0=",
"lastModified": 1780220602,
"narHash": "sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "df3c0640565d04a0261253cdd89fce78ec50168a",
"rev": "db947814a175b7ca6ded66e21383d938df01c227",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_3": {
"inputs": {
"nixpkgs": [
"noctalia",
"noctalia-qs",
"nixpkgs"
]
},
"locked": {
"lastModified": 1775636079,
"narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba",
"type": "github"
},
"original": {
@@ -577,14 +956,14 @@
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_3"
"systems": "systems_4"
},
"locked": {
"lastModified": 1784217994,
"narHash": "sha256-gxHJsrJZo2qbKK47Kf/9ho3i/HhRwkL8XvPnczGPd9E=",
"lastModified": 1777789924,
"narHash": "sha256-fX3ErzTmHRO9z1SzHC2VZUgKOgRfO13X/joC5a3QN7Q=",
"owner": "abenz1267",
"repo": "walker",
"rev": "42b3ed88abf50bc52638fb2835b7f17e3ea3ac4c",
"rev": "93d44d1cb41732e1370e4b949429ae8e34ea05a4",
"type": "github"
},
"original": {
@@ -613,11 +992,11 @@
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1784679892,
"narHash": "sha256-Mb7jpqnrcYCfNSItIkkHpuR3YxWFxPuIBfcwNKlRBkk=",
"lastModified": 1779745227,
"narHash": "sha256-yqY7RtEJGJiENzR0GwL6q69tSAy6xAAmAcLuIhLjPf8=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "8d135d3b2854b30fd01ea6cd6c27e523dd50a839",
"rev": "5d1efbc9dc3ab1c10160b656e0247f3325daf0f2",
"type": "github"
},
"original": {
+5 -4
View File
@@ -6,8 +6,8 @@
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts.url = "github:hercules-ci/flake-parts";
helix.url = "github:helix-editor/helix";
devenv.url = "github:cachix/devenv";
flake-parts.follows = "lux-pkgs/flake-parts";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
@@ -24,8 +24,7 @@
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-26.05";
noctalia.url = "github:noctalia-dev/noctalia";
noctalia.url = "github:noctalia-dev/noctalia-shell";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
@@ -44,6 +43,8 @@
inputs.elephant.follows = "elephant";
inputs.nixpkgs.follows = "nixpkgs";
};
lux-pkgs.url = "git+ssh://gitea@orion/kiri/lux-pkgs";
};
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules);
+1 -1
View File
@@ -1,7 +1,7 @@
{
cursor = {
name = "phinger-cursors-light";
packageName = "phinger-cursors";
packagePath = [ "phinger-cursors" ];
size = 24;
};
+78 -45
View File
@@ -1,55 +1,48 @@
{ inputs, config, ... }:
let
account = config.repo.account;
hmModules = config.flake.modules.homeManager;
sharedContext = ''
# Global Agent Context
Be a concise technical thought partner. Check the premise before executing, optimize for the user's actual outcome, and make important assumptions or tradeoffs visible.
## Machine Environment
- This machine is Nix/NixOS-based. Standard Linux assumptions may be wrong: software is usually provided by flakes, dev shells, `devenv`, `direnv`, or the user's NixOS/Home Manager config rather than `apt`, `dnf`, or global installs.
- If a repo has `flake.nix`, `devenv.nix`, `shell.nix`, or `.envrc`, prefer entering or invoking its dev environment (`nix develop`, `devenv shell`, or `direnv exec . <cmd>`). `direnv` may not be loaded automatically inside agent shells.
- For NixOS/Home Manager/nixpkgs/packages/options, use the NixOS MCP when available instead of relying on memory.
## User Preferences
- The user values precision, minimalism, and conceptual clarity. Challenge weak premises, but explain why.
- For larger or ambiguous work, interview or plan before broad implementation. For small concrete requests, proceed with the obvious scoped change.
'';
in
{
flake.modules.nixos.ai =
{ pkgs, ... }:
{
home-manager.sharedModules = [ hmModules.ai ];
flake.modules.nixos.ai = {
home-manager.sharedModules = [ hmModules.ai ];
nixpkgs.overlays = [ inputs.llm-agents.overlays.shared-nixpkgs ];
nixpkgs.overlays = [ inputs.llm-agents.overlays.default ];
nix.settings = {
extra-substituters = [ "https://cache.numtide.com" ];
extra-trusted-public-keys = [
"niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
];
};
services.ollama = {
enable = true;
package = pkgs.ollama-vulkan;
loadModels = [ "nomic-embed-text" ];
};
nix.settings = {
extra-substituters = [ "https://cache.numtide.com" ];
extra-trusted-public-keys = [
"niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
];
};
};
flake.modules.homeManager.ai =
{ pkgs, ... }:
{
services.podman = {
volumes = {
grounded-docs-config = { };
grounded-docs-data = { };
};
containers.grounded-docs = {
image = "ghcr.io/arabold/docs-mcp-server:2.4.0";
network = "host";
volumes = [
"grounded-docs-config.volume:/config"
"grounded-docs-data.volume:/data"
];
environment = {
DOCS_MCP_APP_TELEMETRY_ENABLED = "false";
DOCS_MCP_EMBEDDING_MODEL = "openai:nomic-embed-text";
DOCS_MCP_EMBEDDINGS_VECTOR_DIMENSION = "768";
OPENAI_API_BASE = "http://127.0.0.1:11434/v1";
OPENAI_API_KEY = "ollama";
};
exec = "--protocol http --host 127.0.0.1 --port 6280";
};
};
config,
lib,
pkgs,
...
}:
{
home.sessionVariables.GEMINI_CONFIG_DIR = "${config.xdg.configHome}/gemini";
programs.mcp = {
enable = true;
@@ -59,9 +52,49 @@ in
};
};
home.packages = [
pkgs.llm-agents.codex
pkgs.ctx7
];
programs.gemini-cli = {
enable = false;
package = pkgs.llm-agents.gemini-cli;
enableMcpIntegration = true;
context.AGENTS = sharedContext;
settings = {
context = {
fileName = [
"AGENTS.md"
"GEMINI.md"
];
loadMemoryFromIncludeDirectories = true;
};
model.name = "gemini-3.1-pro-preview";
};
};
programs.codex = {
enable = true;
package = pkgs.llm-agents.codex;
enableMcpIntegration = true;
context = sharedContext;
settings = {
model = "gpt-5.5";
model_reasoning_effort = "high";
plan_mode_reasoning_effort = "high";
tui.status_line = [
"model-with-reasoning"
"current-dir"
"git-branch"
"context-remaining"
"five-hour-limit"
];
projects.${account.nixosConfigurationPath}.trust_level = "trusted";
projects."${config.homeDirectory}/work/repos/yookr_data_science".trust_level = "trusted";
sandbox_mode = "workspace-write";
personality = "pragmatic";
features.undo = true;
mcp_servers.nixos = config.programs.mcp.servers.nixos // {
enabled = true;
default_tools_approval_mode = "approve";
};
};
};
};
}
+9 -11
View File
@@ -1,40 +1,38 @@
{ config, ... }:
let
homeModules = config.flake.modules.homeManager;
vivaldiPackage = pkgs: pkgs.vivaldi;
nautilusPackage = pkgs: pkgs.nautilus;
in
{
flake.modules.homeManager.browser-vivaldi =
{ pkgs, ... }:
{
home.packages = [ pkgs.vivaldi ];
home.packages = [ (vivaldiPackage pkgs) ];
};
flake.modules.homeManager.primary-browser-vivaldi =
{ lib, pkgs, ... }:
let
browser = pkgs.vivaldi;
browserCommand = lib.getExe browser;
in
{
imports = [ homeModules.browser-vivaldi ];
facts.desktop.browserCommand = browserCommand;
home.sessionVariables.BROWSER = browserCommand;
xdg.mimeApps.defaultApplicationPackages = [ browser ];
facts.desktop.browserCommand = lib.getExe (vivaldiPackage pkgs);
home.sessionVariables.BROWSER = lib.getExe (vivaldiPackage pkgs);
xdg.mimeApps.defaultApplicationPackages = [ (vivaldiPackage pkgs) ];
};
flake.modules.homeManager.file-manager-nautilus =
{ pkgs, ... }:
{
home.packages = [ pkgs.nautilus ];
home.packages = [ (nautilusPackage pkgs) ];
};
flake.modules.homeManager.primary-file-manager-nautilus =
{ pkgs, ... }:
{ lib, pkgs, ... }:
{
imports = [ homeModules.file-manager-nautilus ];
xdg.mimeApps.defaultApplicationPackages = [ pkgs.nautilus ];
xdg.mimeApps.defaultApplicationPackages = [ (nautilusPackage pkgs) ];
};
flake.modules.homeManager.image-viewer-imv = {
+19 -27
View File
@@ -2,14 +2,6 @@
{
flake.modules.homeManager.dev-tools =
{ config, pkgs, ... }:
let
stablePkgs = import inputs.nixpkgs-stable {
inherit (pkgs.stdenv.hostPlatform) system;
config = {
inherit (pkgs.config) allowUnfree;
};
};
in
{
home.sessionVariables.CARGO_HOME = "${config.xdg.dataHome}/cargo";
home.packages = with pkgs; [
@@ -18,13 +10,19 @@
usql
posting
resterm
kubectl
stablePkgs.mongodb-compass
scc
nodejs
mariadb
inputs.devenv.packages.${pkgs.stdenv.hostPlatform.system}.default
];
# programs.direnv = {
# enable = true;
# enableZshIntegration = true;
# nix-direnv.enable = true;
# };
programs.zsh.initContent = ''
eval "$(devenv hook zsh)"
'';
programs.lazygit = {
enable = true;
enableZshIntegration = true;
@@ -34,20 +32,14 @@
programs.jq.enable = true;
programs.bun.enable = true;
programs.ripgrep.enable = true;
programs.k9s.enable = true;
#programs.uv.enable = true;
programs.direnv = {
enable = true;
nix-direnv.enable = true;
config.global = {
hide_env_diff = true;
log_format = " %s";
};
};
programs.git.ignores = [
"devenv.*"
".devenv*"
".direnv"
"pre-commit-config.yaml"
".envrc"
];
};
flake.modules.nixos.openvpn = {
programs.openvpn3.enable = true;
services.resolved.enable = true;
};
}
+9 -14
View File
@@ -5,26 +5,21 @@
fonts = {
enableDefaultPackages = false;
packages = with pkgs; [
fira
fira-code
geist-font
ibm-plex
inter
iosevka
jetbrains-mono
lexend
literata
merriweather
monaspace
montserrat
noto-fonts
noto-fonts-cjk-sans
noto-fonts-color-emoji
quicksand
iosevka
jetbrains-mono
fira-code
roboto
fira
merriweather
ibm-plex
lexend
literata
montserrat
source-sans-pro
source-serif-pro
victor-mono
];
fontconfig = {
+4 -4
View File
@@ -1,22 +1,23 @@
{ config, lib, ... }:
let
account = config.facts.account;
account = config.repo.account;
in
{
flake.modules.homeManager.git =
{
config,
osConfig,
...
}:
let
machine = config.facts.machine;
machine = osConfig.facts.machine;
allowedSignersFile = "${config.xdg.configHome}/git/allowed_signers";
mkScope =
scope:
let
email = account.emails.${scope}.address;
key = machine.sshKeys.${scope} or null;
key = lib.attrByPath [ scope ] null machine.sshKeys;
hasSigningKey = key != null;
privateKeyPath = key.privateKeyPath or "~/.ssh/id_${scope}";
in
@@ -32,7 +33,6 @@ in
};
}
// lib.optionalAttrs hasSigningKey {
core.sshCommand = "ssh -i ${privateKeyPath} -o IdentitiesOnly=yes";
gpg.ssh.allowedSignersFile = allowedSignersFile;
};
};
-215
View File
@@ -1,215 +0,0 @@
{ inputs, ... }:
{
flake.modules.nixos.helix = {
nix.settings = {
extra-substituters = [ "https://helix.cachix.org" ];
extra-trusted-public-keys = [
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
];
};
};
flake.modules.homeManager.helix =
{ pkgs, ... }:
let
svelteLanguageServer = pkgs.svelte-language-server.overrideAttrs (
finalAttrs: previousAttrs: {
version = "0.18.3";
pnpmWorkspaces = [
"svelte-language-server..."
"typescript-svelte-plugin..."
];
src = pkgs.fetchFromGitHub {
owner = "sveltejs";
repo = "language-tools";
tag = "svelte-language-server@${finalAttrs.version}";
hash = "sha256-FTOkJPXbsG6R53yr4n0/IR2lzFCovrdV0+epOi07lBQ=";
};
pnpmDeps = pkgs.fetchPnpmDeps {
inherit (finalAttrs)
pname
version
src
pnpmWorkspaces
;
pnpm = pkgs.pnpm_10;
fetcherVersion = 3;
hash = "sha256-fY3hrCkr/soJk1gp39/jec8lT2ZJI27xRBCZi006oWA=";
};
buildPhase = builtins.replaceStrings
[ "pnpm run --filter=svelte-language-server... build" ]
[ ''
pnpm run --filter=svelte-language-server... build
pnpm --filter=typescript-svelte-plugin exec tsc \
-p ./ \
--pretty false \
--types node \
--typeRoots ../../node_modules/.pnpm/node_modules/@types
'' ]
previousAttrs.buildPhase;
installPhase = builtins.replaceStrings
[ "pnpm install --filter=svelte-language-server..." ]
[ "pnpm install --filter=svelte-language-server... --filter=typescript-svelte-plugin..." ]
previousAttrs.installPhase;
postInstall = (previousAttrs.postInstall or "") + ''
substituteInPlace \
"$out/lib/node_modules/svelte-language-server/packages/language-server/node_modules/@vscode/emmet-helper/lib/cjs/emmetHelper.js" \
--replace-fail \
"'jsx.enabled': syntax === 'jsx'," \
"'jsx.enabled': syntax === 'jsx' || syntax === 'html',"
ln -s ../packages/typescript-plugin \
"$out/lib/node_modules/svelte-language-server/node_modules/typescript-svelte-plugin"
ln -s ../packages/language-server/node_modules/svelte \
"$out/lib/node_modules/svelte-language-server/node_modules/svelte"
'';
}
);
in
{
programs.helix = {
enable = true;
defaultEditor = true;
package = inputs.helix.packages.${pkgs.stdenv.hostPlatform.system}.default;
extraPackages = with pkgs; [
vtsls
svelteLanguageServer
tailwindcss-language-server
nixd
nixfmt
oxfmt
simple-completion-language-server
odin
ols
rust-analyzer
rustfmt
cargo
];
settings = {
theme = "kanagawa-custom";
editor = {
soft-wrap.enable = true;
lsp = {
auto-document-highlight = true;
display-inlay-hints = false;
};
rainbow-brackets = true;
line-number = "relative";
cursorline = true;
gutters = [
"code-action-hint"
"diagnostics"
"spacer"
"line-numbers"
"spacer"
"diff"
];
color-modes = true;
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
};
};
themes.kanagawa-custom = {
inherits = "kanagawa";
"ui.highlight".underline = {
color = "dragonBlue";
style = "line";
};
};
languages = {
language-server.scls = {
command = "simple-completion-language-server";
environment.SNIPPETS_PATH = "${pkgs.vimPlugins.friendly-snippets}/snippets";
};
language-server.vtsls.config.vtsls = {
autoUseWorkspaceTsdk = true;
tsserver.globalPlugins = [
{
name = "typescript-svelte-plugin";
location = "${svelteLanguageServer}/lib/node_modules/svelte-language-server";
enableForWorkspaceTypeScriptVersions = true;
}
];
};
language = [
{
name = "javascript";
language-servers = [
"vtsls"
"scls"
];
auto-format = true;
}
{
name = "jsx";
language-servers = [
"vtsls"
"scls"
];
auto-format = true;
}
{
name = "typescript";
language-servers = [
"vtsls"
"scls"
];
auto-format = true;
}
{
name = "tsx";
language-servers = [
"vtsls"
"scls"
];
auto-format = true;
}
{
name = "svelte";
formatter = {
command = "${pkgs.coreutils}/bin/env";
args = [
"NODE_PATH=%{workspace_directory}/node_modules"
"oxfmt"
"--stdin-filepath=%{buffer_name}"
];
};
auto-format = true;
language-servers = [
"scls"
"svelteserver"
"tailwindcss-ls"
];
}
{
name = "nix";
auto-format = true;
}
{
name = "rust";
auto-format = true;
}
];
};
};
};
}
-5
View File
@@ -1,5 +0,0 @@
{
flake.modules.homeManager.keyring = {
services.gnome-keyring.enable = true;
};
}
+1 -1
View File
@@ -1,6 +1,6 @@
{ config, lib, ... }:
let
palette = config.facts.theme.kanagawa.palette;
palette = config.repo.theme.kanagawa.palette;
hex = lib.removePrefix "#";
terminalPalette = palette.terminal;
mkPalette = colors: lib.concatStringsSep ";" (map hex colors);
+1 -1
View File
@@ -11,7 +11,7 @@
LC_TELEPHONE = "nl_NL.UTF-8";
LC_NAME = "nl_NL.UTF-8";
# Use '.' as decimal point and ',' as thousands separator
# Use '.' as decimal point and ',' as thouands separator
LC_NUMERIC = "en_IE.UTF-8";
LC_MONETARY = "en_IE.UTF-8";
@@ -48,6 +48,14 @@
NormalFloat = { fg = theme.ui.float.fg, bg = theme.ui.float.bg },
WinBar = { fg = theme.ui.fg_dim, bg = "NONE" },
WinBarNC = { fg = theme.ui.nontext, bg = theme.ui.bg_dim },
BufferLineFill = { bg = theme.ui.bg_m3 },
BufferLineBackground = { fg = theme.ui.fg_dim, bg = theme.ui.bg_m3 },
BufferLineBufferSelected = { fg = theme.ui.fg, bg = theme.ui.bg, bold = true },
BufferLineModified = { fg = theme.vcs.changed, bg = theme.ui.bg_m3 },
BufferLineModifiedSelected = { fg = theme.vcs.changed, bg = theme.ui.bg },
BufferLineDiagnostic = { fg = theme.ui.nontext, bg = theme.ui.bg_m3 },
BufferLineDiagnosticSelected = { fg = theme.ui.fg_dim, bg = theme.ui.bg },
}
end,
})
+28 -57
View File
@@ -1,7 +1,7 @@
{ config, ... }:
let
account = config.facts.account;
theme = config.facts.theme.kanagawa;
account = config.repo.account;
repoTheme = config.repo.theme.kanagawa;
in
{
flake.modules.homeManager.default-editor-neovim =
@@ -18,48 +18,6 @@ in
osConfig,
...
}:
let
nvimTreesitter = pkgs.vimPlugins.nvim-treesitter;
svelteLanguageServer = pkgs.svelte-language-server.overrideAttrs (
finalAttrs: _: {
version = "0.18.3";
src = pkgs.fetchFromGitHub {
owner = "sveltejs";
repo = "language-tools";
tag = "svelte-language-server@${finalAttrs.version}";
hash = "sha256-FTOkJPXbsG6R53yr4n0/IR2lzFCovrdV0+epOi07lBQ=";
};
pnpmDeps = pkgs.fetchPnpmDeps {
inherit (finalAttrs)
pname
version
src
pnpmWorkspaces
;
pnpm = pkgs.pnpm_10;
fetcherVersion = 3;
hash = "sha256-fY3hrCkr/soJk1gp39/jec8lT2ZJI27xRBCZi006oWA=";
};
}
);
svelteGrammar = nvimTreesitter.builtGrammars.svelte.overrideAttrs (_: {
version = "0.0.0+rev=c2457b9";
src = pkgs.fetchFromGitHub {
owner = "m4rch3n1ng";
repo = "tree-sitter-svelte";
rev = "c2457b99a5b8ee38e14928dceeb246a61c097b77";
hash = "sha256-RIAe30TTzZhHuXxC2VRVk/X73Qm1u2LWOW3AsnUfRzI=";
};
});
nvimTreesitterWithAllGrammars = nvimTreesitter.withPlugins (
_:
map (
grammar: if grammar == nvimTreesitter.builtGrammars.svelte then svelteGrammar else grammar
) nvimTreesitter.allGrammars
);
in
{
home.sessionVariables = {
EDITOR = "nvim";
@@ -76,37 +34,43 @@ in
wrappers.neovim = {
enable = true;
# 1. Point to your existing Lua config directory
settings.config_directory = ./lua-config;
# 2. Runtime Dependencies (from lspsAndRuntimeDeps)
# These are added to the PATH of the wrapper
runtimePkgs = with pkgs; [
# Tools
universal-ctags
ripgrep
fd
tree-sitter
wl-clipboard
# LSPs & Formatters
stylua
taplo
yamlfmt
lua-language-server
nixd
nix-doc
nixfmt
dafny
vscode-langservers-extracted
tailwindcss-language-server
typescript
typescript-language-server
rustc
rust-analyzer
rustfmt
astro-language-server
tinymist
typstyle
websocat
# ty
# basedpyright
ty
ruff
vtsls
oxlint
oxfmt
emmet-language-server
svelteLanguageServer
];
# 3. Plugins
# Nix provisions plugins; lz.n controls when lazy specs are packadd'd.
specs = {
lz-n = {
data = pkgs.vimPlugins.lz-n;
@@ -116,7 +80,7 @@ in
data = with pkgs.vimPlugins; [
plenary-nvim
kanagawa-nvim
nvimTreesitterWithAllGrammars
nvim-treesitter.withAllGrammars
nvim-treesitter-textobjects
rainbow-delimiters-nvim
];
@@ -137,7 +101,6 @@ in
data = with pkgs.vimPlugins; [
nvim-lspconfig
lazydev-nvim
nvim-navic
trouble-nvim
typst-preview-nvim
];
@@ -163,6 +126,7 @@ in
lazy = true;
data = with pkgs.vimPlugins; [
lualine-nvim
bufferline-nvim
gitsigns-nvim
zen-mode-nvim
which-key-nvim
@@ -187,7 +151,9 @@ in
};
};
# 4. Values exposed to Lua through require("nix-info").settings.
settings = {
# Hostname/ConfigDir needed for nixd
nixdExtras = {
nixpkgs = "import ${pkgs.path} {}";
nixos_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.facts.machine.name}.options'';
@@ -195,17 +161,22 @@ in
};
themeSetup = import ./_kanagawa-theme.nix {
themeName = theme.name;
themeName = repoTheme.name;
};
typstPreviewDependencies = {
tinymist = "${pkgs.tinymist}/bin/tinymist";
websocat = "${pkgs.websocat}/bin/websocat";
};
};
# 5. Wrapper Configuration
# Enable Python/Node providers
hosts.python3.nvim-host.enable = true;
hosts.node.nvim-host.enable = true;
# Ensure the bin name matches what you expect
binName = "nvim";
};
};
@@ -12,7 +12,6 @@ vim.o.number = true
vim.o.mouse = "a"
vim.o.showmode = false
vim.o.showtabline = 0
vim.opt.shortmess:append("Wc")
@@ -50,7 +49,6 @@ vim.o.confirm = true
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })
vim.keymap.set("n", "<leader>bd", "<cmd>bdelete<CR>", { desc = "[B]uffer [D]elete" })
vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
@@ -1,16 +1,3 @@
local function format_options(bufnr)
local oxfmt = vim.lsp.get_clients({
bufnr = bufnr,
name = "oxfmt",
method = "textDocument/formatting",
})[1]
return {
lsp_format = "fallback",
name = oxfmt and "oxfmt" or nil,
}
end
require("lz.n").load({
{
"conform.nvim",
@@ -20,9 +7,7 @@ require("lz.n").load({
{
"<leader>f",
function()
local options = format_options(vim.api.nvim_get_current_buf())
options.async = true
require("conform").format(options)
require("conform").format({ async = true, lsp_format = "fallback" })
end,
mode = "",
desc = "[F]ormat buffer",
@@ -36,16 +21,15 @@ require("lz.n").load({
if disable_filetypes[vim.bo[bufnr].filetype] then
return nil
else
local options = format_options(bufnr)
options.timeout_ms = 500
return options
return {
timeout_ms = 500,
lsp_format = "fallback",
}
end
end,
formatters_by_ft = {
lua = { "stylua" },
python = { "ruff_fix", "ruff_format", "ruff_organize_imports" },
toml = { "taplo" },
yaml = { "yamlfmt" },
},
formatters = {
stylua = {
@@ -216,33 +216,11 @@ require("lz.n").load({
vim.lsp.enable("nixd")
vim.lsp.enable("dafny")
vim.lsp.enable("jsonls")
vim.lsp.config("vtsls", {
settings = {
vtsls = {
autoUseWorkspaceTsdk = true,
},
},
})
vim.lsp.enable("vtsls")
vim.lsp.enable("cssls")
vim.lsp.enable("html")
vim.lsp.enable("emmet_language_server")
vim.lsp.enable("oxlint")
vim.lsp.config("oxfmt", {
filetypes = vim.list_extend({ "svelte" }, vim.lsp.config.oxfmt.filetypes),
})
vim.lsp.enable("oxfmt")
vim.lsp.enable("tailwindcss")
vim.lsp.enable("ts_ls")
vim.lsp.enable("rust_analyzer")
vim.lsp.enable("ty")
vim.lsp.enable("ruff")
vim.lsp.enable("astro")
vim.lsp.enable("svelte")
vim.lsp.config("tinymist", {
settings = {
@@ -65,6 +65,43 @@ require("lz.n").load({
})
end,
},
{
"bufferline.nvim",
event = "VimEnter",
before = function()
require("lz.n").trigger_load("mini.nvim")
end,
after = function()
require("bufferline").setup({
options = {
mode = "buffers",
numbers = "none",
diagnostics = "nvim_lsp",
diagnostics_indicator = function(count, level)
local icon = level:match("error") and "" or level:match("warning") and "" or ""
return " " .. icon .. count
end,
always_show_bufferline = true,
show_buffer_close_icons = false,
show_close_icon = false,
separator_style = "thin",
sort_by = "insert_after_current",
offsets = {
{
filetype = "minifiles",
text = "Files",
separator = true,
},
},
},
})
vim.keymap.set("n", "<C-0>", "<cmd>BufferLineCycleNext<cr>", { desc = "[B]uffer [N]ext" })
vim.keymap.set("n", "<C-9>", "<cmd>BufferLineCyclePrev<cr>", { desc = "[B]uffer [P]revious" })
vim.keymap.set("n", "<leader>bb", "<cmd>BufferLinePick<cr>", { desc = "[B]uffer [B]rowse" })
vim.keymap.set("n", "<leader>bd", "<cmd>bdelete<cr>", { desc = "[B]uffer [D]elete" })
end,
},
{
"gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
@@ -1,3 +0,0 @@
; extends
("attach") @keyword
+2 -2
View File
@@ -1,11 +1,11 @@
{
config,
facts,
lib,
pkgs,
repo,
}:
let
nixosConfigDir = facts.account.nixosConfigurationPath;
nixosConfigDir = repo.account.nixosConfigurationPath;
mkTerminalScript =
{
name,
+19 -12
View File
@@ -4,7 +4,7 @@
...
}:
let
facts = config.facts;
repo = config.repo;
hmModules = config.flake.modules.homeManager;
in
{
@@ -37,20 +37,21 @@ in
{
config,
lib,
osConfig,
pkgs,
...
}:
let
borderPalette = facts.theme.kanagawa.palette.niri.border;
borderPalette = repo.theme.kanagawa.palette.niri.border;
shortcuts = import ./_shortcuts.nix {
inherit
config
facts
lib
pkgs
repo
;
};
machine = config.facts.machine;
machine = osConfig.facts.machine;
in
{
home = {
@@ -70,6 +71,12 @@ in
programs.niri.settings = {
outputs = lib.mapAttrs (
_: display:
let
scale = display.scale or null;
width = display.width or null;
height = display.height or null;
refresh = display.refresh or null;
in
{
position = {
x = display.x or 0;
@@ -79,24 +86,24 @@ in
// lib.optionalAttrs (display.primary or false) {
"focus-at-startup" = true;
}
// lib.optionalAttrs (display ? scale) {
inherit (display) scale;
// lib.optionalAttrs (scale != null) {
inherit scale;
}
// lib.optionalAttrs (display ? width && display ? height && display ? refresh) {
// lib.optionalAttrs (width != null && height != null && refresh != null) {
mode = {
inherit (display)
inherit
width
height
refresh
width
;
};
}
) machine.displays;
) (machine.displays or { });
environment.DISPLAY = ":0";
spawn-at-startup = [
{ command = [ "xwayland-satellite" ]; }
{ command = [ "noctalia" ]; }
{ command = [ "noctalia-shell" ]; }
];
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
@@ -147,7 +154,7 @@ in
input = {
focus-follows-mouse.enable = true;
mouse."accel-speed" = if machine.portable then -0.6 else 0.4;
mouse."accel-speed" = 0.4;
keyboard = {
repeat-delay = 300;
repeat-rate = 50;
+2 -1
View File
@@ -1,6 +1,6 @@
{ inputs, config, ... }:
let
account = config.facts.account;
account = config.repo.account;
in
{
flake.modules.nixos.nix =
@@ -17,6 +17,7 @@ in
settings = {
trusted-users = [ "@wheel" ];
use-xdg-base-directories = true;
auto-optimise-store = true;
experimental-features = [
"nix-command"
-204
View File
@@ -1,204 +0,0 @@
{
flake.modules.homeManager.noctalia =
{
config,
inputs,
lib,
...
}:
let
homeDir = config.home.homeDirectory;
wallpaper = "${homeDir}/media/images/wallpapers/green-leaves.png";
loginBox = output: {
box_height = 70.0;
box_width = 400.0;
cx = 1280.0;
cy = 1317.0;
inherit output;
rotation = 0.0;
type = "login_box";
settings = {
background_color = "surface_variant";
background_opacity = 0.88;
background_radius = 12.0;
input_opacity = 1.0;
input_radius = 6.0;
show_login_button = true;
};
};
in
{
imports = [ inputs.noctalia.homeModules.default ];
programs.noctalia = {
enable = true;
settings = {
audio = {
enable_sounds = true;
sound_volume = 1.0;
};
bar.default = {
center = [
"clock"
"text_separator"
"date"
];
end = [
"tray"
"bluetooth"
"volume"
]
++ lib.optionals config.facts.machine.portable [
"network"
"battery"
]
++ [
"clipboard"
"session"
];
start = [
"control-center"
"workspaces"
];
font_weight = 400;
thickness = 30;
};
calendar = {
enabled = true;
account.radicale = {
name = "Personal";
provider = "custom";
server_url = config.facts.services.radicale.url;
type = "caldav";
username = config.facts.account.name;
};
};
desktop_widgets = {
enabled = false;
schema_version = 2;
widget_order = [ ];
grid = {
cell_size = 16;
major_interval = 4;
visible = true;
};
widget = { };
};
location.address = "Meterik, The Netherlands";
lockscreen = {
blur_intensity = 0.8;
blurred_desktop = true;
fingerprint = false;
tint_intensity = 0.5;
};
lockscreen_widgets = {
enabled = true;
schema_version = 2;
widget_order = [
"lockscreen-login-box@DP-2"
"lockscreen-login-box@DP-3"
];
grid = {
cell_size = 16;
major_interval = 4;
visible = true;
};
widget = {
"lockscreen-login-box@DP-2" = loginBox "DP-2";
"lockscreen-login-box@DP-3" = loginBox "DP-3";
};
};
nightlight = {
enabled = true;
temperature_night = 3000;
};
notification = {
layer = "overlay";
position = "bottom_right";
};
plugins = {
enabled = [ ];
source = [
{
kind = "git";
location = "https://github.com/noctalia-dev/official-plugins";
name = "official";
}
{
kind = "git";
location = "https://github.com/noctalia-dev/community-plugins";
name = "community";
}
];
};
shell = {
font_family = "Lexend";
screen_time_enabled = true;
settings_show_advanced = true;
ui_scale = 1.1;
animation.speed = 1.5;
screen_corners = {
enabled = true;
size = 50;
};
screenshot.directory = "${homeDir}/media/images/screenshots";
};
theme = {
builtin = "Kanagawa";
community_palette = "Kanagawa Paper";
wallpaper_scheme = "m3-content";
templates = {
enable_builtin_templates = false;
enable_community_templates = false;
};
};
wallpaper = {
directory = "${homeDir}/media/images/wallpapers";
default.path = wallpaper;
last.path = wallpaper;
monitors = {
DP-2.path = wallpaper;
DP-3.path = wallpaper;
};
};
weather.refresh_minutes = 15;
widget = {
bluetooth.hide_when_no_connected_device = true;
cat = {
audio_spectrum = true;
type = "noctalia/bongocat:cat";
};
clock.format = "{:%H:%M}";
media = {
art_size = 90.0;
max_length = 800;
};
text_separator = {
anchor = true;
format = "";
type = "clock";
};
tray.drawer = true;
volume.show_label = false;
network.show_label = false;
battery.show_label = false;
workspaces.display = "none";
};
};
};
};
}
@@ -0,0 +1,569 @@
{
homeDirectory,
lib,
terminalCommand,
}:
{
settingsVersion = 53;
bar = {
barType = "simple";
position = "top";
monitors = [ ];
density = "default";
showOutline = false;
showCapsule = false;
capsuleOpacity = 1;
capsuleColorKey = "none";
widgetSpacing = 6;
contentPadding = 2;
fontScale = 1;
backgroundOpacity = 0;
useSeparateOpacity = false;
floating = false;
marginVertical = 6;
marginHorizontal = 8;
frameThickness = 0;
frameRadius = 0;
outerCorners = false;
hideOnOverview = true;
displayMode = "always_visible";
autoHideDelay = 500;
autoShowDelay = 150;
showOnWorkspaceSwitch = true;
widgets = {
left = [
{
colorizeSystemIcon = "none";
customIconPath = "";
enableColorization = false;
icon = "rocket";
iconColor = "none";
id = "Launcher";
useDistroLogo = false;
}
{
characterCount = 2;
colorizeIcons = true;
emptyColor = "secondary";
enableScrollWheel = true;
focusedColor = "primary";
followFocusedScreen = false;
groupedBorderOpacity = 1;
hideUnoccupied = true;
iconScale = 0.75;
id = "Workspace";
labelMode = "none";
occupiedColor = "secondary";
pillSize = 0.6;
showApplications = true;
showBadge = false;
showLabelsOnlyWhenOccupied = true;
unfocusedIconsOpacity = 1;
}
];
center = [
{
clockColor = "none";
customFont = "";
formatHorizontal = "HH:mm ddd, MMM dd";
formatVertical = "HH mm - dd MM";
id = "Clock";
tooltipFormat = "HH:mm ddd, MMM dd";
useCustomFont = false;
}
];
right = [
{
blacklist = [ ];
chevronColor = "none";
colorizeIcons = false;
drawerEnabled = true;
hidePassive = false;
id = "Tray";
pinned = [ ];
}
{
displayMode = "onhover";
iconColor = "none";
id = "Volume";
middleClickCommand = "pwvucontrol || pavucontrol";
textColor = "none";
}
{
colorizeDistroLogo = false;
colorizeSystemIcon = "none";
customIconPath = "";
enableColorization = false;
icon = "noctalia";
id = "ControlCenter";
useDistroLogo = false;
}
];
};
screenOverrides = [ ];
};
general = {
avatarImage = "${homeDirectory}/.face";
dimmerOpacity = 0;
showScreenCorners = false;
forceBlackScreenCorners = false;
scaleRatio = 1;
radiusRatio = 0.5;
iRadiusRatio = 0.5;
boxRadiusRatio = 0;
screenRadiusRatio = 0;
animationSpeed = 2;
animationDisabled = false;
compactLockScreen = false;
lockScreenAnimations = false;
lockOnSuspend = true;
showSessionButtonsOnLockScreen = true;
showHibernateOnLockScreen = false;
enableLockScreenMediaControls = false;
enableShadows = true;
shadowDirection = "bottom_right";
shadowOffsetX = 2;
shadowOffsetY = 3;
language = "";
allowPanelsOnScreenWithoutBar = true;
showChangelogOnStartup = true;
telemetryEnabled = false;
enableLockScreenCountdown = true;
lockScreenCountdownDuration = 10000;
autoStartAuth = false;
allowPasswordWithFprintd = false;
clockStyle = "custom";
clockFormat = "hh\\nmm";
passwordChars = false;
lockScreenMonitors = [ ];
lockScreenBlur = 0;
lockScreenTint = 0;
keybinds = {
keyUp = [
"Up"
"Ctrl+K"
];
keyDown = [
"Down"
"Ctrl+J"
];
keyLeft = [
"Left"
"Ctrl+H"
];
keyRight = [
"Right"
"Ctrl+L"
];
keyEnter = [
"Return"
];
keyEscape = [
"Esc"
];
keyRemove = [
"Del"
];
};
reverseScroll = false;
};
ui = {
fontDefault = "Comfortaa Medium";
fontFixed = "FiraCode Nerd Font";
fontDefaultScale = 1;
fontFixedScale = 1;
tooltipsEnabled = true;
boxBorderEnabled = false;
panelBackgroundOpacity = 1;
panelsAttachedToBar = true;
settingsPanelMode = "attached";
settingsPanelSideBarCardStyle = false;
};
location = {
name = "Meterik, Limburg";
weatherEnabled = true;
weatherShowEffects = true;
useFahrenheit = false;
use12hourFormat = false;
showWeekNumberInCalendar = true;
showCalendarEvents = true;
showCalendarWeather = true;
analogClockInCalendar = false;
firstDayOfWeek = "unknown character to parse: -";
",
" = "unknown character to parse: h";
deWeatherTimezone = false;
hideWeatherCityName = false;
};
calendar = {
cards = [
{
enabled = true;
id = "calendar-header-card";
}
{
enabled = true;
id = "calendar-month-card";
}
{
enabled = true;
id = "weather-card";
}
];
};
wallpaper = {
enabled = true;
overviewEnabled = false;
directory = "${homeDirectory}/media/images/wallpapers";
monitorDirectories = [ ];
enableMultiMonitorDirectories = false;
showHiddenFiles = false;
viewMode = "recursive";
setWallpaperOnAllMonitors = true;
fillMode = "crop";
fillColor = "#000000";
useSolidColor = false;
solidColor = "#1a1a2e";
automationEnabled = false;
wallpaperChangeMode = "random";
randomIntervalSec = 300;
transitionDuration = 1500;
transitionType = "random";
skipStartupTransition = false;
transitionEdgeSmoothness = 5.0e-2;
panelPosition = "follow_bar";
hideWallpaperFilenames = false;
overviewBlur = 0.4;
overviewTint = 0.6;
useWallhaven = false;
wallhavenQuery = "";
wallhavenSorting = "relevance";
wallhavenOrder = "desc";
wallhavenCategories = "111";
wallhavenPurity = "100";
wallhavenRatios = "";
wallhavenApiKey = "";
wallhavenResolutionMode = "atleast";
wallhavenResolutionWidth = "";
wallhavenResolutionHeight = "";
sortOrder = "name";
favorites = [ ];
};
appLauncher = {
enableClipboardHistory = true;
autoPasteClipboard = false;
enableClipPreview = true;
clipboardWrapText = true;
clipboardWatchTextCommand = "wl-paste --type text --watch cliphist store";
clipboardWatchImageCommand = "wl-paste --type image --watch cliphist store";
position = "top_center";
pinnedApps = [ ];
useApp2Unit = false;
sortByMostUsed = true;
inherit terminalCommand;
customLaunchPrefixEnabled = false;
customLaunchPrefix = "";
viewMode = "grid";
showCategories = true;
iconMode = "tabler";
showIconBackground = false;
enableSettingsSearch = true;
enableWindowsSearch = true;
enableSessionSearch = true;
ignoreMouseInput = false;
screenshotAnnotationTool = "";
overviewLayer = false;
density = "default";
};
controlCenter = {
position = "close_to_bar_button";
diskPath = "/";
shortcuts = {
left = [
{
id = "Network";
}
{
id = "Bluetooth";
}
{
id = "WallpaperSelector";
}
{
id = "NoctaliaPerformance";
}
];
right = [
{
id = "Notifications";
}
{
id = "PowerProfile";
}
{
id = "KeepAwake";
}
{
id = "NightLight";
}
];
};
cards = [
{
enabled = true;
id = "profile-card";
}
{
enabled = true;
id = "shortcuts-card";
}
{
enabled = true;
id = "audio-card";
}
{
enabled = false;
id = "brightness-card";
}
{
enabled = true;
id = "weather-card";
}
{
enabled = true;
id = "media-sysmon-card";
}
];
};
systemMonitor = {
cpuWarningThreshold = 80;
cpuCriticalThreshold = 90;
tempWarningThreshold = 80;
tempCriticalThreshold = 90;
gpuWarningThreshold = 80;
gpuCriticalThreshold = 90;
memWarningThreshold = 80;
memCriticalThreshold = 90;
swapWarningThreshold = 80;
swapCriticalThreshold = 90;
diskWarningThreshold = 80;
diskCriticalThreshold = 90;
diskAvailWarningThreshold = 20;
diskAvailCriticalThreshold = 10;
batteryWarningThreshold = 20;
batteryCriticalThreshold = 5;
enableDgpuMonitoring = false;
useCustomColors = false;
warningColor = "";
criticalColor = "";
externalMonitor = "resources || missioncenter || jdsystemmonitor || corestats || system-monitoring-center || gnome-system-monitor || plasma-systemmonitor || mate-system-monitor || ukui-system-monitor || deepin-system-monitor || pantheon-system-monitor";
};
dock = {
enabled = false;
position = "bottom";
displayMode = "exclusive";
dockType = "floating";
backgroundOpacity = 1;
floatingRatio = 1;
size = 1;
onlySameOutput = true;
monitors = [ ];
pinnedApps = [ ];
colorizeIcons = false;
showLauncherIcon = false;
launcherPosition = "end";
launcherIconColor = "none";
pinnedStatic = false;
inactiveIndicators = false;
groupApps = false;
groupContextMenuMode = "extended";
groupClickAction = "cycle";
groupIndicatorStyle = "dots";
deadOpacity = 0.6;
animationSpeed = 1;
sitOnFrame = false;
showFrameIndicator = true;
};
network = {
wifiEnabled = true;
airplaneModeEnabled = false;
bluetoothRssiPollingEnabled = false;
bluetoothRssiPollIntervalMs = 60000;
networkPanelView = "wifi";
wifiDetailsViewMode = "grid";
bluetoothDetailsViewMode = "grid";
bluetoothHideUnnamedDevices = false;
disableDiscoverability = false;
};
sessionMenu = {
enableCountdown = true;
countdownDuration = 10000;
position = "center";
showHeader = true;
showKeybinds = true;
largeButtonsStyle = true;
largeButtonsLayout = "single-row";
powerOptions = [
{
action = "lock";
command = "";
countdownEnabled = true;
enabled = true;
keybind = "1";
}
{
action = "suspend";
command = "";
countdownEnabled = true;
enabled = true;
keybind = "2";
}
{
action = "hibernate";
command = "";
countdownEnabled = true;
enabled = true;
keybind = "3";
}
{
action = "reboot";
command = "";
countdownEnabled = true;
enabled = true;
keybind = "4";
}
{
action = "logout";
command = "";
countdownEnabled = true;
enabled = true;
keybind = "5";
}
{
action = "shutdown";
command = "";
countdownEnabled = true;
enabled = true;
keybind = "6";
}
{
action = "rebootToUefi";
command = "";
countdownEnabled = true;
enabled = true;
keybind = "";
}
];
};
notifications = {
enabled = true;
enableMarkdown = false;
density = "compact";
monitors = [ ];
location = "bottom_right";
overlayLayer = true;
backgroundOpacity = 1;
respectExpireTimeout = false;
lowUrgencyDuration = 3;
normalUrgencyDuration = 8;
criticalUrgencyDuration = 15;
clearDismissed = true;
saveToHistory = {
low = true;
normal = true;
critical = true;
};
sounds = {
enabled = false;
volume = 0.5;
separateSounds = false;
criticalSoundFile = "";
normalSoundFile = "";
lowSoundFile = "";
excludedApps = "discord,firefox,chrome,chromium,edge";
};
enableMediaToast = false;
enableKeyboardLayoutToast = true;
enableBatteryToast = true;
};
osd = {
enabled = true;
location = "top_right";
autoHideMs = 2000;
overlayLayer = true;
backgroundOpacity = 1;
enabledTypes = [
0
1
2
];
monitors = [ ];
};
audio = {
volumeStep = 5;
volumeOverdrive = false;
cavaFrameRate = 30;
visualizerType = "linear";
mprisBlacklist = [ ];
preferredPlayer = "";
volumeFeedback = false;
volumeFeedbackSoundFile = "";
};
brightness = {
brightnessStep = 5;
enforceMinimum = true;
enableDdcSupport = false;
backlightDeviceMappings = [ ];
};
colorSchemes = {
useWallpaperColors = false;
predefinedScheme = "Kanagawa";
darkMode = true;
schedulingMode = "off";
manualSunrise = "06:30";
manualSunset = "18:30";
generationMethod = "tonal-spot";
monitorForColors = "";
};
templates = {
activeTemplates = [ ];
enableUserTheming = false;
};
nightLight = {
enabled = false;
forced = false;
autoSchedule = true;
nightTemp = "4000";
dayTemp = "6500";
manualSunrise = "06:30";
manualSunset = "18:30";
};
hooks = {
enabled = false;
wallpaperChange = "";
darkModeChange = "";
screenLock = "";
screenUnlock = "";
performanceModeEnabled = "";
performanceModeDisabled = "";
startup = "";
session = "";
};
plugins = {
autoUpdate = false;
};
idle = {
enabled = false;
screenOffTimeout = 600;
lockTimeout = 660;
suspendTimeout = 1800;
fadeDuration = 5;
customCommands = "[]";
};
desktopWidgets = {
enabled = false;
overviewEnabled = true;
gridSnap = false;
monitorWidgets = [ ];
};
}
+92
View File
@@ -0,0 +1,92 @@
{
config,
lib,
...
}:
let
mkNoctaliaSettings =
{
homeDirectory,
lib,
terminalCommand,
}:
import ./_noctalia-config.nix {
inherit
homeDirectory
lib
terminalCommand
;
};
mkBaseSettings =
{
homeDirectory,
lib,
terminalCommand,
}:
mkNoctaliaSettings {
inherit
homeDirectory
lib
terminalCommand
;
};
mkPortableSettings =
baseSettings:
lib.recursiveUpdate baseSettings {
bar.widgets.right = lib.concatMap (
widget:
if widget.id == "ControlCenter" then
[
{
id = "Network";
}
{
id = "Battery";
showPowerProfiles = true;
displayMode = "graphic";
}
widget
]
else
[ widget ]
) baseSettings.bar.widgets.right;
};
in
{
flake.modules.homeManager.noctalia =
{
config,
inputs,
lib,
osConfig,
pkgs,
...
}:
let
baseSettings = mkBaseSettings {
inherit lib;
homeDirectory = config.home.homeDirectory;
terminalCommand = lib.getExe pkgs.xdg-terminal-exec;
};
settings =
if baseSettings == { } || !(osConfig.facts.machine.portable or false) then
baseSettings
else
mkPortableSettings baseSettings;
in
{
imports = [ inputs.noctalia.homeModules.default ];
programs.noctalia-shell = {
enable = true;
package = lib.mkForce (
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
calendarSupport = true;
}
);
inherit settings;
};
};
}
+3 -3
View File
@@ -3,8 +3,8 @@
...
}:
let
facts = config.facts;
account = facts.account;
repo = config.repo;
account = repo.account;
in
{
flake.modules.homeManager.passwords =
@@ -19,7 +19,7 @@ in
programs.rbw = {
enable = true;
settings = {
base_url = facts.services.vaultwarden.url;
base_url = repo.services.vaultwarden.url;
email = account.primaryEmail.address;
pinentry = pinentryPackage;
};
+3 -3
View File
@@ -3,8 +3,8 @@
...
}:
let
facts = config.facts;
account = facts.account;
repo = config.repo;
account = repo.account;
in
{
flake.modules.homeManager.email =
@@ -138,7 +138,7 @@ in
};
remote = {
url = facts.services.radicale.url;
url = repo.services.radicale.url;
type = "caldav";
userName = config.home.username;
passwordCommand = [
+7 -14
View File
@@ -2,20 +2,13 @@
flake.modules.nixos.printing =
{ pkgs, ... }:
{
programs.system-config-printer.enable = true;
services = {
printing = {
enable = true;
browsed.enable = true;
drivers = with pkgs; [
cnijfilter2
];
};
avahi = {
enable = true;
nssmdns4 = true;
};
services.printing = {
enable = true;
drivers = with pkgs; [
cups-filters
cups-browsed
cnijfilter2
];
};
};
}
+30 -13
View File
@@ -1,19 +1,36 @@
{ config, ... }:
let
service = config.facts.services.actual;
repo = config.repo;
repoHelpers = repo.helpers;
service = repo.services.actual;
in
{
flake.modules.nixos.actual = {
services.actual = {
enable = true;
openFirewall = false;
settings = {
inherit (service) port;
hostname = service.host;
};
};
services.caddy.virtualHosts.${service.domain}.extraConfig =
"reverse_proxy :${toString service.port}";
repo.services.actual = {
domain = "finance.jelles.net";
host = "127.0.0.1";
port = 3000;
url = "https://finance.jelles.net";
};
flake.modules.nixos.actual =
{ lib, ... }:
lib.mkMerge [
{
services.actual = {
enable = true;
openFirewall = false;
settings = {
inherit (service) port;
hostname = service.host;
};
};
}
(repoHelpers.mkCaddyReverseProxy {
inherit (service)
domain
port
;
})
];
}
+2 -2
View File
@@ -1,12 +1,12 @@
{ config, ... }:
let
facts = config.facts;
repo = config.repo;
in
{
flake.modules.nixos.caddy = {
services.caddy = {
enable = true;
email = facts.account.primaryEmail.address;
email = repo.account.primaryEmail.address;
openFirewall = true;
};
};
-38
View File
@@ -1,38 +0,0 @@
{ config, ... }:
let
account = config.facts.account;
in
{
flake.modules.nixos.deluge =
{ config, pkgs, ... }:
{
sops.secrets.deluge-auth-file = {
owner = config.services.deluge.user;
group = config.services.deluge.group;
mode = "0400";
restartUnits = [ "deluged.service" ];
};
services.deluge = {
enable = true;
declarative = true;
openFirewall = true;
authFile = config.sops.secrets.deluge-auth-file.path;
config = {
download_location = "${account.homeDirectory}/torrents/.incomplete";
move_completed = true;
move_completed_path = "${account.homeDirectory}/torrents";
listen_ports = [
43864
43864
];
random_port = false;
};
};
home-manager.users.${account.name}.home.packages = [ pkgs.deluge ];
users.users.${account.name}.extraGroups = [ config.services.deluge.group ];
};
}
+43 -24
View File
@@ -1,30 +1,49 @@
{ config, ... }:
let
service = config.facts.services.gitea;
repo = config.repo;
repoHelpers = repo.helpers;
service = repo.services.gitea;
in
{
flake.modules.nixos.gitea = {
services.gitea = {
enable = true;
settings = {
server = {
DOMAIN = service.domain;
ROOT_URL = service.url;
HTTP_PORT = service.port;
HTTP_ADDR = service.host;
START_SSH_SERVER = false;
SSH_PORT = 22;
};
service.DISABLE_REGISTRATION = true;
};
};
services.openssh.settings.AllowUsers = [ "gitea" ];
services.caddy.virtualHosts.${service.domain}.extraConfig =
"reverse_proxy :${toString service.port}";
repo.services.gitea = {
domain = "git.jelles.net";
host = "127.0.0.1";
port = 3001;
url = "https://git.jelles.net/";
};
flake.modules.nixos.gitea =
{ lib, ... }:
lib.mkMerge [
{
services.gitea = {
enable = true;
settings = {
server = {
DOMAIN = service.domain;
ROOT_URL = service.url;
HTTP_PORT = service.port;
HTTP_ADDR = service.host;
START_SSH_SERVER = false;
SSH_PORT = 22;
};
service.DISABLE_REGISTRATION = true;
};
};
}
{
services.openssh.settings.AllowUsers = [ "gitea" ];
}
(repoHelpers.mkCaddyReverseProxy {
inherit (service)
domain
port
;
})
];
}
+2 -2
View File
@@ -1,6 +1,6 @@
{ config, lib, ... }:
let
account = config.facts.account;
account = config.repo.account;
personalPublicKeys =
machines:
map (machine: (machine.sshKeys or { }).personal.publicKey) (
@@ -29,6 +29,6 @@ in
};
};
users.users.${account.name}.openssh.authorizedKeys.keys = personalPublicKeys config.facts.machines;
users.users.${account.name}.openssh.authorizedKeys.keys = personalPublicKeys config.repo.machines;
};
}
+50 -24
View File
@@ -1,30 +1,56 @@
{ config, ... }:
let
service = config.facts.services.radicale;
repo = config.repo;
repoHelpers = repo.helpers;
service = repo.services.radicale;
in
{
flake.modules.nixos.radicale = {
services.radicale = {
enable = true;
settings = {
server.hosts = [ "${service.host}:${toString service.port}" ];
auth = {
type = "htpasswd";
htpasswd_filename = "/var/lib/radicale/users";
htpasswd_encryption = "bcrypt";
};
storage.filesystem_folder = "/var/lib/radicale/collections";
};
};
services.caddy.virtualHosts.${service.domain}.extraConfig = ''
reverse_proxy :${toString service.port} {
header_up X-Script-Name /
header_up X-Forwarded-For {remote}
header_up X-Remote-User {http.auth.user.id}
}
'';
repo.services.radicale = {
domain = "radicale.jelles.net";
host = "127.0.0.1";
port = 5232;
url = "https://radicale.jelles.net/";
};
flake.modules.nixos.radicale =
{ lib, ... }:
lib.mkMerge [
{
services.radicale = {
enable = true;
settings = {
server.hosts = [ "${service.host}:${toString service.port}" ];
auth = {
type = "htpasswd";
htpasswd_filename = "/var/lib/radicale/users";
htpasswd_encryption = "bcrypt";
};
storage.filesystem_folder = "/var/lib/radicale/collections";
};
};
}
(repoHelpers.mkCaddyReverseProxy {
inherit (service)
domain
port
;
extraHeaders = [
{
name = "X-Script-Name";
value = "/";
}
{
name = "X-Forwarded-For";
value = "{remote}";
}
{
name = "X-Remote-User";
value = "{http.auth.user.id}";
}
];
})
];
}
@@ -0,0 +1,28 @@
{ config, ... }:
let
account = config.repo.account;
in
{
flake.modules.nixos.transmission =
{ config, pkgs, ... }:
{
services.transmission = {
enable = true;
package = pkgs.transmission_4;
openPeerPorts = true;
downloadDirPermissions = "775";
settings = {
download-dir = "${account.homeDirectory}/torrents";
incomplete-dir = "${account.homeDirectory}/torrents/.incomplete";
peer-port = 43864;
umask = "002";
};
};
# NOTE: Upstream bug?
systemd.services.transmission-setup.requiredBy = [ "transmission.service" ];
users.users.${account.name}.extraGroups = [ config.services.transmission.group ];
};
}
+32 -15
View File
@@ -1,21 +1,38 @@
{ config, ... }:
let
service = config.facts.services.vaultwarden;
repo = config.repo;
repoHelpers = repo.helpers;
service = repo.services.vaultwarden;
in
{
flake.modules.nixos.vaultwarden = {
services.vaultwarden = {
enable = true;
backupDir = "/var/backup/vaultwarden";
config = {
DOMAIN = service.url;
SIGNUPS_ALLOWED = false;
ROCKET_PORT = service.port;
ROCKET_LOG = "critical";
};
};
services.caddy.virtualHosts.${service.domain}.extraConfig =
"reverse_proxy :${toString service.port}";
repo.services.vaultwarden = {
domain = "vault.jelles.net";
host = "127.0.0.1";
port = 8100;
url = "https://vault.jelles.net";
};
flake.modules.nixos.vaultwarden =
{ lib, ... }:
lib.mkMerge [
{
services.vaultwarden = {
enable = true;
backupDir = "/var/backup/vaultwarden";
config = {
DOMAIN = service.url;
SIGNUPS_ALLOWED = false;
ROCKET_PORT = service.port;
ROCKET_LOG = "critical";
};
};
}
(repoHelpers.mkCaddyReverseProxy {
inherit (service)
domain
port
;
})
];
}
-12
View File
@@ -62,17 +62,6 @@
'';
initContent = ''
source <(/home/kiri/.garden/gardenctl completion zsh)
[ -n "$GCTL_SESSION_ID" ] || [ -n "$TERM_SESSION_ID" ] || export GCTL_SESSION_ID=$(uuidgen)
if [ -z "$GCTL_SESSION_ID" ] && [ -z "$TERM_SESSION_ID" ]; then
export GCTL_SESSION_ID=$(uuidgen)
fi
eval $(/home/kiri/.garden/gardenctl kubectl-env zsh)
bindkey -v
export KEYTIMEOUT=1
@@ -90,7 +79,6 @@
fi
bindkey "^[[Z" reverse-menu-complete
bindkey -M menuselect "^[[Z" reverse-menu-complete
bindkey -M menuselect "^[" send-break
zstyle ':completion:*' completer _extensions _complete _approximate
zstyle ':completion:*' use-cache on
+26 -15
View File
@@ -4,17 +4,28 @@
...
}:
let
account = config.facts.account;
syncMachines = lib.mapAttrs' (
machineName: machine:
let
name = "${account.name}@${machineName}";
in
lib.nameValuePair name {
inherit name;
id = machine.syncthingId;
}
) (lib.filterAttrs (_: machine: (machine.syncthingId or null) != null) config.facts.machines);
syncMachines = lib.listToAttrs (
lib.concatLists (
lib.mapAttrsToList (
machineName: machine:
let
syncthingId = machine.syncthingId or null;
in
lib.optional (syncthingId != null) (
let
name = "${config.repo.account.name}@${machineName}";
in
{
inherit name;
value = {
inherit name;
id = syncthingId;
};
}
)
) config.repo.machines
)
);
syncPhones = {
"pixel-10" = {
@@ -42,10 +53,10 @@ in
label = "sync";
devices = builtins.attrNames syncDevices;
};
bruno = {
path = "~/dev/bruno";
label = "bruno";
devices = builtins.attrNames syncDevices;
calibre = {
path = "~/calibre";
label = "calibre";
devices = builtins.attrNames syncMachines;
};
};
devices = syncDevices;
+35
View File
@@ -0,0 +1,35 @@
{ ... }:
{
flake.modules.nixos.systemd-boot =
{ config, pkgs, ... }:
{
boot = {
loader = {
efi.canTouchEfiVariables = true;
systemd-boot = {
enable = true;
consoleMode = "auto";
configurationLimit = 5;
extraInstallCommands = ''
ENTRIES="${config.boot.loader.efi.efiSysMountPoint}/loader/entries"
PROFILES="/nix/var/nix/profiles"
for file in "$ENTRIES"/nixos-generation-*.conf; do
generation=$(${pkgs.coreutils}/bin/basename "$file" | ${pkgs.gnugrep}/bin/grep -o -E '[0-9]+')
timestamp=$(${pkgs.coreutils}/bin/stat -c %y "$PROFILES/system-$generation-link" 2>/dev/null | ${pkgs.coreutils}/bin/cut -d. -f1)
if [ -z "$timestamp" ]; then
timestamp="Unknown Date"
fi
${pkgs.gnused}/bin/sed -i "s/^version .*/version Generation $generation - $timestamp/" "$file"
done
'';
};
};
tmp.cleanOnBoot = true;
kernelPackages = pkgs.linuxPackages_latest;
};
};
}
+16 -15
View File
@@ -1,6 +1,6 @@
{ lib, config, ... }:
let
facts = config.facts;
repo = config.repo;
kittySingleInstance =
pkgs:
@@ -10,7 +10,10 @@ let
meta = pkgs.kitty.meta;
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
# Wrap the binary to always launch as a single instance
wrapProgram $out/bin/kitty --add-flags "-1"
# Patch the .desktop file for strict app launchers like Vicinae
rm $out/share/applications/kitty.desktop
sed 's/Exec=kitty/Exec=kitty -1/g' ${pkgs.kitty}/share/applications/kitty.desktop > $out/share/applications/kitty.desktop
'';
@@ -25,7 +28,8 @@ in
...
}:
let
palette = facts.theme.kanagawa.palette;
repoTheme = repo.theme.kanagawa;
palette = repoTheme.palette;
hex = lib.removePrefix "#";
in
{
@@ -40,6 +44,8 @@ in
font-bold-italic = "JetBrains Mono:style=Bold Italic:size=11:fontfeatures=-liga:fontfeatures=-calt";
gamma-correct-blending = "yes";
pad = "3x3";
# vertical-letter-offset = -1;
# letter-spacing = -0.2;
};
tweak.box-drawing-base-thickness = 0.1;
@@ -86,14 +92,13 @@ in
flake.modules.homeManager.terminal-kitty =
{ pkgs, ... }:
let
theme = facts.theme.kanagawa;
palette = theme.palette;
kitty = kittySingleInstance pkgs;
repoTheme = repo.theme.kanagawa;
palette = repoTheme.palette;
in
{
programs.kitty = {
enable = true;
package = kitty;
package = kittySingleInstance pkgs;
font = {
name = "JetBrains Mono";
size = 11;
@@ -108,10 +113,7 @@ in
};
keybindings."shift+enter" = "send_text all \\x0a";
extraConfig = ''
# Nerd Fonts v3.4.0
symbol_map U+e000-U+e00a,U+e0a0-U+e0a2,U+e0a3,U+e0b0-U+e0b3,U+e0b4-U+e0c8,U+e0ca,U+e0cc-U+e0d7,U+e200-U+e2a9,U+e300-U+e3e3,U+e5fa-U+e6b7,U+e700-U+e8ef,U+ea60-U+ec1e,U+ed00-U+efce,U+f000-U+f2ff,U+f300-U+f381,U+f400-U+f533,U+f0001-U+f1af0 Symbols Nerd Font Mono
## name: ${theme.displayName}
## name: ${repoTheme.displayName}
## license: MIT
## author: Tommaso Laurenzi
## upstream: https://github.com/rebelot/kanagawa.nvim/
@@ -160,7 +162,9 @@ in
WantedBy = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${lib.getExe kitty} --start-as=hidden ${pkgs.coreutils}/bin/tail -f /dev/null";
# Use the wrapped package (which already includes -1)
# Start it hidden and run an infinite dummy process so the instance stays alive
ExecStart = "${lib.getExe (kittySingleInstance pkgs)} --start-as=hidden ${pkgs.coreutils}/bin/tail -f /dev/null";
Restart = "on-failure";
};
};
@@ -181,13 +185,10 @@ in
flake.modules.homeManager.primary-terminal-kitty =
{ lib, pkgs, ... }:
let
kitty = kittySingleInstance pkgs;
in
{
imports = [ config.flake.modules.homeManager.terminal-kitty ];
facts.desktop.terminalCommand = lib.getExe kitty;
facts.desktop.terminalCommand = lib.getExe (kittySingleInstance pkgs);
xdg.terminal-exec = {
enable = true;
+22 -15
View File
@@ -3,23 +3,26 @@
...
}:
let
facts = config.facts;
repo = config.repo;
repoHelpers = repo.helpers;
hmModules = config.flake.modules.homeManager;
mkCursorTheme =
pkgs:
facts.theme.cursor
// {
package = pkgs.${facts.theme.cursor.packageName};
};
in
{
repo.theme = import ./_theme.nix;
flake.modules.nixos.theme =
{
pkgs,
...
}:
let
cursorTheme = mkCursorTheme pkgs;
repoTheme = repo.theme;
cursorTheme = repoTheme.cursor // {
package = repoHelpers.resolvePackagePath {
inherit pkgs;
path = repoTheme.cursor.packagePath;
};
};
in
{
home-manager.sharedModules = [ hmModules.theme ];
@@ -37,11 +40,16 @@ in
flake.modules.homeManager.theme =
{ config, pkgs, ... }:
let
theme = facts.theme;
cursorTheme = mkCursorTheme pkgs;
repoTheme = repo.theme;
cursorTheme = repoTheme.cursor // {
package = repoHelpers.resolvePackagePath {
inherit pkgs;
path = repoTheme.cursor.packagePath;
};
};
kanagawaThemeSrc = pkgs.fetchFromGitHub {
inherit (theme.kanagawa)
inherit (repoTheme.kanagawa)
hash
owner
repo
@@ -50,13 +58,12 @@ in
};
kanagawaOverride = {
version = theme.kanagawa.version;
version = repoTheme.kanagawa.version;
src = kanagawaThemeSrc;
};
in
{
home.pointerCursor = {
enable = true;
inherit (cursorTheme)
name
package
@@ -72,12 +79,12 @@ in
"sftp://orion Orion VPS"
];
theme = {
name = theme.kanagawa.gtkThemeName;
name = repoTheme.kanagawa.gtkThemeName;
package = pkgs.kanagawa-gtk-theme.overrideAttrs (_: kanagawaOverride);
};
gtk4.theme = null;
iconTheme = {
name = theme.kanagawa.iconThemeName;
name = repoTheme.kanagawa.iconThemeName;
package = pkgs.kanagawa-icon-theme.overrideAttrs (_: kanagawaOverride);
};
};
+78
View File
@@ -0,0 +1,78 @@
{ config, ... }:
let
repo = config.repo;
in
{
flake.modules.homeManager.vicinae =
{
config,
pkgs,
inputs,
lib,
...
}:
let
repoTheme = repo.theme.kanagawa;
palette = repoTheme.palette;
in
{
programs.vicinae = {
enable = true;
systemd.enable = true;
themes.${repoTheme.name} = {
meta = {
version = 1;
name = repoTheme.displayName;
description = "A dark theme inspired by the colors of the famous painting by Katsushika Hokusai.";
variant = "dark";
inherits = "vicinae-dark";
};
colors = {
core = {
background = palette.background;
foreground = palette.foreground;
secondary_background = palette.secondaryBackground;
border = palette.border;
accent = palette.accents.blue;
};
accents = {
inherit (palette.accents)
blue
cyan
green
magenta
orange
purple
red
yellow
;
};
input.border_focus = "colors.core.accent";
};
};
settings.theme = {
light.name = repoTheme.name;
dark.name = repoTheme.name;
};
extensions = with inputs.vicinae-extensions.packages.${pkgs.stdenv.hostPlatform.system}; [
agenda
brotab
fuzzy-files
github
it-tools
niri
nix
podman
process-manager
pulseaudio
simple-bookmarks
ssh
];
};
facts.desktop.launcherCommand = lib.getExe config.programs.vicinae.package;
};
}
+2 -11
View File
@@ -38,19 +38,10 @@ in
};
flake.modules.homeManager.primary-launcher-walker =
{
config,
lib,
pkgs,
...
}:
{ config, lib, ... }:
{
imports = [ homeModules.walker-base ];
facts.desktop.launcherCommand = [
(lib.getExe' pkgs.libressl.nc "nc")
"-U"
"/run/user/1000/walker/walker.sock"
];
facts.desktop.launcherCommand = lib.getExe config.programs.walker.package;
};
}
-15
View File
@@ -1,15 +0,0 @@
{
flake.modules.nixos.yookr-dev =
{ config, ... }:
{
security.pki.certificateFiles = [
../hosts/zenith/mkcert-rootCA.pem
../hosts/polaris/mkcert-rootCA.pem
];
networking.extraHosts = ''
127.0.0.1 local.management.yookr.org
127.0.0.1 local.dashboard.yookr.org
'';
};
}
-5
View File
@@ -1,5 +0,0 @@
{
flake.modules.homeManager.zed = {
programs.zed-editor.enable = true;
};
}
+32
View File
@@ -0,0 +1,32 @@
{
repo = {
account = rec {
name = "kiri";
realName = "Jelle Spreeuwenberg";
homeDirectory = "/home/${name}";
nixosConfigurationPath = "${homeDirectory}/.config/nixos";
emails = {
personal = {
address = "mail@jelles.net";
primary = true;
type = "mxrouting";
};
old = {
address = "mail@jellespreeuwenberg.nl";
type = "mxrouting";
};
uni = {
address = "j.spreeuwenberg@student.tue.nl";
type = "office365";
};
work = {
address = "jelle.spreeuwenberg@yookr.org";
type = "office365";
};
};
primaryEmail = emails.personal;
};
};
}
-98
View File
@@ -1,98 +0,0 @@
{ lib, ... }:
let
factsOption = lib.mkOption {
type = lib.types.submodule {
freeformType = lib.types.attrsOf lib.types.anything;
};
default = { };
};
in
{
options.facts = factsOption;
config = {
facts = {
account = rec {
name = "kiri";
realName = "Jelle Spreeuwenberg";
homeDirectory = "/home/${name}";
nixosConfigurationPath = "${homeDirectory}/.config/nixos";
emails = {
personal = {
address = "mail@jelles.net";
primary = true;
type = "mxrouting";
};
old = {
address = "mail@jellespreeuwenberg.nl";
type = "mxrouting";
};
uni = {
address = "j.spreeuwenberg@student.tue.nl";
type = "office365";
};
work = {
address = "jelle.spreeuwenberg@yookr.org";
type = "office365";
};
};
primaryEmail = emails.personal;
};
services = {
actual = {
domain = "finance.jelles.net";
host = "127.0.0.1";
port = 3000;
url = "https://finance.jelles.net";
};
gitea = {
domain = "git.jelles.net";
host = "127.0.0.1";
port = 3001;
url = "https://git.jelles.net/";
};
radicale = {
domain = "radicale.jelles.net";
host = "127.0.0.1";
port = 5232;
url = "https://radicale.jelles.net/";
};
vaultwarden = {
domain = "vault.jelles.net";
host = "127.0.0.1";
port = 8100;
url = "https://vault.jelles.net";
};
};
theme = import ./capabilities/_theme.nix;
};
flake.modules.nixos.facts = { lib, ... }: {
options.facts = factsOption;
};
flake.modules.homeManager.facts =
{
lib,
osConfig ? { },
...
}:
{
options.facts = factsOption;
config.facts = lib.optionalAttrs (osConfig ? facts) {
inherit (osConfig.facts)
account
machine
machines
services
theme
;
};
};
};
}
+3 -58
View File
@@ -3,65 +3,10 @@
config,
...
}:
let
mkHost =
name: machine:
{ pkgs, ... }:
let
account = config.facts.account;
hmStateVersion = machine.hmStateVersion or machine.stateVersion;
machineFacts = {
displays = { };
portable = false;
sshKeys = { };
syncthingId = null;
}
// machine
// {
inherit name hmStateVersion;
};
in
{
imports = [
config.flake.modules.nixos.${name}
];
facts = {
inherit (config.facts)
account
machines
services
theme
;
machine = machineFacts;
};
networking.hostName = name;
system.stateVersion = machine.stateVersion;
programs.zsh.enable = true;
users.users.${account.name} = {
isNormalUser = true;
home = account.homeDirectory;
extraGroups = [
"wheel"
"networkmanager"
];
shell = pkgs.zsh;
};
home-manager.users.${account.name}.home = {
username = account.name;
homeDirectory = account.homeDirectory;
stateVersion = hmStateVersion;
};
};
in
{
imports = [
inputs.flake-parts.flakeModules.modules
./facts.nix
./data.nix
];
systems = [ "x86_64-linux" ];
@@ -70,9 +15,9 @@ in
name: machine:
inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [ (mkHost name machine) ];
modules = [ (config.repo.helpers.mkHost name machine) ];
}
) config.facts.machines;
) config.repo.machines;
perSystem =
{ pkgs, ... }:
+7 -3
View File
@@ -1,10 +1,14 @@
{ config, ... }:
{
inputs,
config,
...
}:
let
nixosModules = config.flake.modules.nixos;
account = config.facts.account;
account = config.repo.account;
in
{
facts.machines.orion = {
repo.machines.orion = {
syncthingId = "NNRNQKZ-OWPHSVA-B6KKBHE-SDYLSTV-7SVHGPR-NEWLKPL-4MWNJG4-G5FHUAI";
stateVersion = "24.05";
+3 -4
View File
@@ -7,7 +7,7 @@ let
nixosModules = config.flake.modules.nixos;
in
{
facts.machines.polaris = {
repo.machines.polaris = {
sshKeys = {
personal.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEVORk45HKkX7gaGGp90KsVyUy6t+fKhbWN/grjkf3cQ kiri@polaris";
work.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM5DMV6EQzsscgEOE0912mNglUHTEl+LPnaWYjj0y57B kiri@polaris#work";
@@ -19,12 +19,12 @@ in
displays = {
"LG Electronics LG ULTRAGEAR 103NTYT8R290" = {
primary = true;
x = 0;
y = 0;
};
"LG Electronics LG ULTRAGEAR 103NTJJ8R332" = {
primary = true;
x = 2560;
y = 0;
};
@@ -36,9 +36,8 @@ in
{
imports = [
nixosModules.workstation-base
nixosModules.deluge
nixosModules.transmission
nixosModules.steam
nixosModules.yookr-dev
./_hardware.nix
]
++ (with inputs.nixos-hardware.nixosModules; [
-26
View File
@@ -1,26 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIEeTCCAuGgAwIBAgIQfVRHKMDYi6CwYW2V9xAZXjANBgkqhkiG9w0BAQsFADBV
MR4wHAYDVQQKExVta2NlcnQgZGV2ZWxvcG1lbnQgQ0ExFTATBgNVBAsMDGtpcmlA
cG9sYXJpczEcMBoGA1UEAwwTbWtjZXJ0IGtpcmlAcG9sYXJpczAeFw0yNjA3MTAy
MDAyMzZaFw0zNjA3MTAyMDAyMzZaMFUxHjAcBgNVBAoTFW1rY2VydCBkZXZlbG9w
bWVudCBDQTEVMBMGA1UECwwMa2lyaUBwb2xhcmlzMRwwGgYDVQQDDBNta2NlcnQg
a2lyaUBwb2xhcmlzMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAtjZR
dUXirk/gMKXD58D+SbGHZIMKvRbWg1xPMWoXpPZWfu8XDuCYV0LSzOb2bWxSV2bo
zb2tgUVyxwwsBS1UyOkYiGREz+s/0O2drHPDZCxvw1xPbAIIO8CsxWbpyNV/CMpQ
NDH7DRvNJ19K49wvB2B9/K3iVipK55Sz7oCUZnbfkFQ887K4u+m7HvYhyagKX/Wc
NCFYOxDexABozIiGnP42RjziBZxOxARnIpqyWixqSY8JpDmy5QsAeZDikpckLh36
yU8GORVMCy2J6gBd7IW9+iIyCtHi7p5uGJAB94wCgQpiJ9W5/L1rFh3IhGK2HIdd
UmIArNRoL17NAYnxeYV+Ew6dsKXXNIpHu6tWLoscu4tXZO8njSz8c9nuYYFlsgM+
exDpcOCMrRny4P3QAsrRWJPXfxfmvcthWas0fWnM2G1bFvOQ0p0FXb/dfh/+qlLZ
BFxgeys2stfyH0qKsA1074CGJ+3rHfQDnVasT0bZdEoySSOLnvvnfyEVYIF/AgMB
AAGjRTBDMA4GA1UdDwEB/wQEAwICBDASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1Ud
DgQWBBT7QjaWKqbU38Su80x41Ao3c00vxTANBgkqhkiG9w0BAQsFAAOCAYEAc+ft
ZuKFXK+3GwMgisy3223GbjqzW/PpvlUaG5wQMUZyrJd7ejbLY8ot6lfTH3EUtq/D
11IxMAXbjwV5bjzURS2E33b22RT/e/+m3I9pgTITipbHcwfEj6VINsIn3dpsxXbx
uiZaq9RF7LiyhttWBR8qCL9XJaKTYbVc8pr+Rdi5TJr7TA9Dtlzo0ZaF3QFW0/kw
oh0tOoIx4vQ7szl7imtri+Ym4CBgGP3S4gToNrpleJaAg4wQgwoMC/ZY9BO2SQ0P
5hic5yy0fw2XgStGRsxuMhI95BXhXEqGCPvoE5mRXe8ze3kh6Pa/2LlfwSU0fk7E
nKxT20AY4EAu1Eq1nzYCqQMyzRw2g6p6xXSe/CSPa6HazHe/MS6jBDZqhHUKIHGo
N4s1776ibjUbMN6kqtfqEJZKdzkcsFYPJMhwSFktEU76s00SHnJhuQ8FwA/MOmal
090f0qcX3EdwbJWMs+gP03R6Dq9ZQPFc6bWeGig7sf8+DN2ZPPa9YeFhQpdB
-----END CERTIFICATE-----
+2 -3
View File
@@ -7,7 +7,7 @@ let
nixosModules = config.flake.modules.nixos;
in
{
facts.machines.zenith = {
repo.machines.zenith = {
portable = true;
sshKeys = {
@@ -35,9 +35,8 @@ in
{
imports = [
nixosModules.workstation-base
nixosModules.deluge
nixosModules.transmission
nixosModules.laptop-power
nixosModules.yookr-dev
{
hardware.enableRedistributableFirmware = true;
services.fwupd.enable = true;
-26
View File
@@ -1,26 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIEdjCCAt6gAwIBAgIRAOJuuQ6BjvYPVrr3/QgaFz0wDQYJKoZIhvcNAQELBQAw
UzEeMBwGA1UEChMVbWtjZXJ0IGRldmVsb3BtZW50IENBMRQwEgYDVQQLDAtraXJp
QHplbml0aDEbMBkGA1UEAwwSbWtjZXJ0IGtpcmlAemVuaXRoMB4XDTI2MDcxNjA3
MTQ0M1oXDTM2MDcxNjA3MTQ0M1owUzEeMBwGA1UEChMVbWtjZXJ0IGRldmVsb3Bt
ZW50IENBMRQwEgYDVQQLDAtraXJpQHplbml0aDEbMBkGA1UEAwwSbWtjZXJ0IGtp
cmlAemVuaXRoMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAn6JVWaP9
1f+NjudJPWnvMxEJyqYQuQBpMd/6O8XCBjp0LVcKl3sub/tieK4LEJhDHxDw6K7h
I8ZByu7WOpbKCJ59fDyOR2nauo7z443dJLZtqQEfaqVhyvungVFEwEskJWYWK9a4
vCYb0C1096WRd0sT2QEWGWzwc45Q6NG18RXQ7NDM6ou8wiUZXHfd0JDhOmWYwDC1
f123uQBCaZgstb/2PclB7v/ubpZEks1Zsi5kgek3fmspzSHpYN3sjfK9nydl8xBW
5Mv6Qq27BPBZpeFdDIQHB/xwRSFBUwvfwNoYN1Mpk5vwNp97u7Kqxk/zIAvwZd52
QS4WbZobHxC0pOL6opxEweuPELnSmr9xngjOAix3bJIZAv+PrrjOM2mrBjRQCzmu
dxkRUA7PTazzUhFvE6aTfJcDU99Wig+aBLrfe8/FHzSER54+f2LsF+kyoZx3qhJM
hPvgMjRuDG8aVHNEW++sjXOi1l/8YravH+wbiHIY0J/rwlRAqpfkzKg3AgMBAAGj
RTBDMA4GA1UdDwEB/wQEAwICBDASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQW
BBSoh/jhmHEsqe0PODpM/Zshi8wJDzANBgkqhkiG9w0BAQsFAAOCAYEANpe6D8+b
O1SEd1NUiyssPBCgKtx88vvV7P1a3a1askanm7Qq64byrMzs0a5ukU4Be4xOaPlz
o+s4Nk23PYbBHf+uZW4nq5b3eLGIPK17xtToEJlMZoWZx7E960Iql4fywFpt+how
U9K0GMPC8OIOCSkwuhvozrwoyxnErc3lVhTf16DOAYoiMvpH62kk3aSqkqL89hgh
jiMzwhzD9LgNBSq+tyHQMLPAEvwNWOI2U1tDErCcCDia7faP0ppLqpCfd7FAeCBT
DsWpU4eXALbHwljQyzkz5U30GU+UoQAuyKfmWyu5Mwywdvwo94xH/YdkWxr3MqUy
cLEkvuX5dgPHhm8xJs5NqHe6qP4yf0SbiZ8IFtwt1YRchTx2tHDDFfVuFb80KDFp
9wGQ/DoO6Qs8J8QPdCHPh/wsIojgJtw2RO/JmcLEYBJnU9egn6Iko5Ih0YgnVgyw
KrBe9F9HPKJ9CT7s/DrR5rySyomZt0VwFbug7rFeJ4h35M1Nwm81E6Ux
-----END CERTIFICATE-----
+93
View File
@@ -0,0 +1,93 @@
{ lib, config, ... }:
let
nixosModules = config.flake.modules.nixos;
resolvePackagePath =
{
pkgs,
path,
}:
lib.attrByPath path null pkgs;
mkCaddyReverseProxy =
{
domain,
port,
extraHeaders ? [ ],
extraConfigText ? "",
}:
let
headerLines = map (header: " header_up ${header.name} ${header.value}") extraHeaders;
extraConfigLines = map (line: " ${line}") (
lib.filter (line: line != "") (lib.splitString "\n" extraConfigText)
);
bodyLines = headerLines ++ extraConfigLines;
body = lib.concatStringsSep "\n" bodyLines;
in
{
services.caddy.virtualHosts.${domain}.extraConfig =
if body == "" then
"reverse_proxy :${toString port}"
else
''
reverse_proxy :${toString port} {
${body}
}
'';
};
mkHost =
name: machine:
{ pkgs, ... }:
let
account = config.repo.account;
accountHome = account.homeDirectory or "/home/${account.name}";
normalizedMachine = machine // {
inherit name;
displays = machine.displays or { };
hmStateVersion = machine.hmStateVersion or machine.stateVersion;
portable = machine.portable or false;
sshKeys = machine.sshKeys or { };
syncthingId = machine.syncthingId or null;
};
in
{
imports = [
nixosModules.${name}
];
facts.machine = normalizedMachine;
networking.hostName = name;
system.stateVersion = machine.stateVersion;
programs.zsh.enable = true;
users.users.${account.name} = {
isNormalUser = true;
home = accountHome;
extraGroups = [
"wheel"
"networkmanager"
];
shell = pkgs.zsh;
};
home-manager.users.${account.name} = {
home = {
username = account.name;
homeDirectory = accountHome;
stateVersion = normalizedMachine.hmStateVersion;
};
};
};
in
{
config.repo.helpers = {
inherit
mkCaddyReverseProxy
mkHost
resolvePackagePath
;
};
}
+33
View File
@@ -0,0 +1,33 @@
{ lib, ... }:
{
options.repo = lib.mkOption {
type = lib.types.submodule {
freeformType = lib.types.attrsOf lib.types.anything;
options.helpers = lib.mkOption {
type = lib.types.attrsOf lib.types.raw;
default = { };
internal = true;
};
};
default = { };
};
config.flake.modules.nixos.facts =
{ lib, ... }:
{
options.facts.machine = lib.mkOption {
type = lib.types.attrsOf lib.types.anything;
default = { };
};
};
config.flake.modules.homeManager.facts =
{ lib, ... }:
{
options.facts.desktop = lib.mkOption {
type = lib.types.attrsOf lib.types.anything;
default = { };
};
};
}
+1 -2
View File
@@ -15,7 +15,6 @@ in
nixosModules.nix
nixosModules.locale-nl
nixosModules.sops-password
nixosModules.helix
];
home-manager = {
@@ -26,7 +25,7 @@ in
hmModules.facts
hmModules.syncthing
hmModules.shell
hmModules.helix
hmModules.neovim
];
};
+2 -4
View File
@@ -2,7 +2,7 @@
let
nixosModules = config.flake.modules.nixos;
homeModules = config.flake.modules.homeManager;
account = config.facts.account;
account = config.repo.account;
in
{
flake.modules.nixos.workstation-base = {
@@ -24,7 +24,6 @@ in
nixosModules.theme
nixosModules.ai
nixosModules.hidraw-access
nixosModules.openvpn
nixosModules.walker-cache
];
@@ -43,7 +42,6 @@ in
homeModules.passwords
homeModules.clipboard
homeModules.dev-tools
homeModules.zed
homeModules.xdg
homeModules.workstation-apps
homeModules.primary-browser-vivaldi
@@ -51,6 +49,7 @@ in
homeModules.primary-launcher-walker
homeModules.default-image-viewer-imv
homeModules.default-document-viewer-sioyek
homeModules.default-editor-neovim
homeModules.email
homeModules.mpv
homeModules.nix
@@ -61,7 +60,6 @@ in
homeModules.primary-terminal-kitty
homeModules.terminal-foot
homeModules.noctalia
homeModules.keyring
{
programs.discord = {
enable = true;
+1 -1
View File
@@ -1,6 +1,6 @@
{ config, ... }:
let
account = config.facts.account;
account = config.repo.account;
nixosModules = config.flake.modules.nixos;
in
{