Compare commits

..

348 Commits

Author SHA1 Message Date
3bcd4c3c13 chore: update lockfile 2026-05-06 19:41:05 +02:00
d975d49844 fix(nvim): allow unfree nvim plugins 2026-05-06 19:41:00 +02:00
1ead7fe7be chore: update lockfile 2026-04-30 18:33:01 +02:00
7dd2fc7e59 chore: update lockfile 2026-04-30 18:28:53 +02:00
95ffe7b908 refactor: derive host name solely from host directory name 2026-04-30 17:20:02 +02:00
ce02cc5538 fix(desktops): resolve xdg portal error on 'work' host 2026-04-30 15:31:07 +02:00
0dbc007a90 feat(database): add redis to database module 2026-04-30 15:07:10 +02:00
57e0d49278 fix(nvim): add missing dependencies 2026-04-30 15:06:51 +02:00
ee44b26147 feat(ai): add 'ai-tools' 'skills' submodule 2026-04-29 18:37:43 +02:00
675306ec91 refactor: modularize 'ai-tools' 2026-04-29 18:37:42 +02:00
a829f160fb fix(gnome): don't use monospace font for 'dconf' 2026-04-29 18:37:07 +02:00
4cfe0387e2 chore: update 'nvim' flake dependencies 2026-04-29 18:37:06 +02:00
2efccdb4de feat(hydra): add hydra-repl filetype integration 2026-04-26 19:07:55 +02:00
8aafaf7d35 chore: disable 'mcp-nixos' temporarily (failed test) 2026-04-26 19:07:55 +02:00
dce57f907a chore(ai): enable 'claude-code' on 'andromache,astyanax' hosts 2026-04-26 19:07:55 +02:00
1bda05280e refactor(desktops): give all desktop modules own subdirectory 2026-04-26 19:07:55 +02:00
d39071da06 refactor(desktops): extract 'logind' module 2026-04-26 19:07:55 +02:00
781f379aff refactor: simplify zk file completion 2026-04-26 19:07:55 +02:00
2203b48cde fix: scope markdown file name echo to zk 2026-04-26 19:07:55 +02:00
35f6f7890f chore: add 'nodejs_24' dependency to 'nvim' flake 2026-04-26 19:07:55 +02:00
83958847f4 fix: enable 'boot.tmp.useTmpfs' based on host 'highRam' flag 2026-04-26 15:00:57 +02:00
b66b0c4003 fix: resolve current zettel path issue 2026-04-26 14:40:26 +02:00
efd2771d8c fix: remove tmux hooks 2026-04-26 14:33:19 +02:00
94331531e2 chore: disable 'lutris' temporarily (failed openldap test) 2026-04-26 14:32:20 +02:00
5b1e7efcd2 chore: update lockfile 2026-04-26 14:32:20 +02:00
730dd23967 fix: centralize and nixifiy in 'zk' module 2026-04-26 14:32:20 +02:00
8f5caaed41 fix(nvim): disable neotest check phase 2026-04-21 22:24:48 +02:00
db2bbb86ba chore: update lockfile 2026-04-21 22:08:28 +02:00
72c3710a3c refactor(secrets): simplify secrets 2026-04-21 22:08:28 +02:00
b62f3c20ac refactor(backups): simplify backups module 2026-04-21 21:39:23 +02:00
dd31da5a8f fix: add home manager 'secrets' module to andromache 2026-04-21 21:39:17 +02:00
bc6d8b6305 fix: remove nodeNixpkgs from colmena 2026-04-21 21:38:55 +02:00
fce3aa45ec refactor: modularize utils 2026-04-21 21:37:31 +02:00
949917a809 feat(direnv): set up direnv using '.envrc' 2026-04-21 21:37:25 +02:00
0dd1ecef91 feat: set up tailscale on 'eetion' host 2026-04-21 21:37:17 +02:00
fcdb52cc42 chore: update lockfile 2026-04-21 17:14:17 +02:00
b6500b97ff refactor(stylix): extract shared stylix overrides into 'targets.nix' 2026-04-21 17:11:16 +02:00
8f756554ad refactor(stylix): do not hardcode 'dconf' font 2026-04-21 17:11:10 +02:00
583b9ea5f3 refactor(deploy): move deployment config into '<host>/meta.nix' 2026-04-21 17:11:04 +02:00
6a30a431f8 refactor: simplify 'user' options 2026-04-21 17:10:42 +02:00
38818e7508 refactor: merge '<host>/system.nix' into '<host>/meta.nix' 2026-04-21 15:51:25 +02:00
94c64e9d33 fix: remove task count limits 2026-04-21 15:51:21 +02:00
a9854ac144 feat: alias 'kubectl' to 'k' 2026-04-21 15:51:17 +02:00
8b109af08b fix: add 'devenv' to 'astyanax' and 'work' hosts 2026-04-21 15:51:12 +02:00
82dde7d749 chore: update lockfile 2026-04-17 12:47:31 +02:00
59ce48d65e fix(taskwarrior): prevent taskwarrior scroll issue 2026-04-17 12:47:26 +02:00
9b9c580a7f fix: disable xdg user dirs auto create 2026-04-17 12:47:25 +02:00
0e27b181ad fix(browser): set 'BROWSER' environment variable based on nix config 2026-04-17 12:47:24 +02:00
6b43660491 refactor: add wayland clipboard module 2026-04-17 12:47:22 +02:00
db5e8855d2 fix(nix-secrets): use simplified signing key setup 2026-04-17 12:47:21 +02:00
2f1f60b836 fix: update tailscale flags 2026-04-17 12:47:20 +02:00
a13a19e8e9 fix: allow unsigned builds on hecuba 2026-04-17 12:47:19 +02:00
fee4b43104 fix: add kitty term info to 'hecuba' host 2026-04-17 12:47:18 +02:00
faf3afad79 fix: update secrets approach to match 'nix-secrets' 2026-04-17 12:47:17 +02:00
db116cc4de fix: add 'yubikey' module to astyanax host 2026-04-17 12:47:16 +02:00
75ee011369 fix: enable tailscale module on 'astyanax' host 2026-04-17 12:47:15 +02:00
ae63c4737a fix(niri): do not enable gnome keyring or Nautilus when niri is enabled 2026-04-17 12:47:14 +02:00
d6bc3c0293 chore(ssh): rotate 'astyanax' to hardware-backed ssh key 2026-04-17 12:47:11 +02:00
fd3a38da62 chore(nvim): update 'nvim' packages 2026-04-17 12:47:10 +02:00
e30ca9d8dd refactor: move nixPath into 'common' module 2026-04-17 12:47:08 +02:00
79eb5c27e9 feat: add tailscale module 2026-04-17 12:47:07 +02:00
677728c440 fix(deploy): never build ARM on target 2026-04-17 12:47:05 +02:00
483b05fc27 fix(deploy): resolve colmena issues 2026-04-17 12:47:02 +02:00
cb4709b1a6 chore(scripts): remove 'git-cb' script 2026-04-17 12:46:58 +02:00
dc650e4722 feat(eetion): pin actualbudget to 26.4.0-alpine 2026-04-05 22:18:59 +02:00
f5dd89582d fix: improve gaming module 2026-04-05 18:13:30 +02:00
585259480e feat: add 'devenv' home manager module 2026-04-05 18:13:12 +02:00
2248d7d781 fix: resolve niri xdg portal issues 2026-04-05 16:11:41 +02:00
0b79904103 refactor: simplify host config 2026-04-05 16:01:08 +02:00
2929a10d62 feat: add 'torrenting' module 2026-04-05 15:38:23 +02:00
4cac77f4c7 chore: update lockfile 2026-04-02 23:14:12 +02:00
1586549896 fix: explicitely set 'SYSTEMD_EDITOR' env variable 2026-04-02 23:14:12 +02:00
5ae3aa4e6c fix(desktop): enable waybar systemd service 2026-04-02 23:14:12 +02:00
4aee96241c fix: conditionally enable 'mpris-proxy' in audio module 2026-04-01 21:56:28 +02:00
3478fac832 feat: add 'ticketing' module 2026-03-27 13:23:04 +01:00
e364dbe76d chore: update lockfile 2026-03-18 12:13:42 +01:00
55a69316a5 refactor(nvim): cleanup nvim config 2026-03-18 12:12:15 +01:00
41011923ac feat: add tirith to work host 2026-03-18 12:12:14 +01:00
916e732ce6 refactor: adopt modular secrets approach 2026-03-17 19:44:04 +01:00
3f9c9cd154 fix: split up 3d module 2026-03-15 20:07:44 +01:00
8c2c1a2aab feat: add font for emoji support 2026-03-14 22:45:52 +01:00
e7c6df1c9b refactor: extract 'firewall' and 'wol' modules 2026-03-14 22:17:35 +01:00
34ebb265e6 chore: update lockfile 2026-03-13 20:31:22 +01:00
b65735929c fix: prevent 'opencode' from reading SSH private keys or 'sops' secret files 2026-03-13 20:27:08 +01:00
804305abf9 fix: resolve incorrect imports 2026-03-12 09:31:57 +01:00
af8555cbe1 feat: add tirith to work host 2026-03-12 09:31:31 +01:00
210d8f3b1f refactor: merge 'audio-automation' module into 'audio' module 2026-03-11 23:53:50 +01:00
b417e67e16 docs: update README.md 2026-03-11 23:46:40 +01:00
32e928c56b refactor: extract host config into 'host.nix' files 2026-03-11 23:43:54 +01:00
12481d7468 refactor: cleanup (deadnix, nixfmt, statix) 2026-03-11 23:23:51 +01:00
7c92cc5c6a fix: use mkDefault for stateVersion to allow host overrides 2026-03-11 23:05:04 +01:00
0a568cba6f chore: update lockfile 2026-03-11 23:05:04 +01:00
43dff3e8e5 refactor: add config.host option for host variables 2026-03-11 23:04:43 +01:00
4c9db2b822 refactor(waybar): modularize waybar config 2026-03-11 21:33:29 +01:00
6389bf4e25 refactor: remove unnecessary config wrapper in nvim 2026-03-11 21:25:32 +01:00
9285e69086 refactor: remove unnecessary config wrapper in docker 2026-03-11 21:25:32 +01:00
1ecb690f0d refactor: namespace git cli options under git module 2026-03-11 21:25:32 +01:00
83cb9cdec1 refactor: move vscode.nix to vscode/default.nix 2026-03-11 21:25:32 +01:00
754deff57f refactor: move nodejs.nix to nodejs/default.nix 2026-03-11 21:25:32 +01:00
d3093b13eb chore: update lockfile 2026-03-11 21:25:32 +01:00
a2386de8ce fix: use 'colmenaHive' instead of 'colmena' 2026-03-11 21:25:32 +01:00
13cf1c296b refactor: simplify bash configuration 2026-03-11 21:25:32 +01:00
890146bc9d refactor: use 'import-as-enable' pattern 2026-03-11 21:25:32 +01:00
ed39959b61 feat(deploy): add deployment tags for each host 2026-03-11 21:25:32 +01:00
828b5d7374 refactor(hosts): use modules/ssh with sensible defaults 2026-03-11 21:25:32 +01:00
b9bdd36a05 feat(ssh): add default module with enable+harden 2026-03-11 21:25:32 +01:00
a49be3040f chore(ai): add 'mcp-nixos' 2026-03-11 21:25:32 +01:00
19617326f0 feat: add 'infra' module (and use on work host) 2026-03-11 21:25:32 +01:00
14f79f54ec fix: use correct vscode no sandbox flag 2026-03-11 21:25:32 +01:00
5b19722ab1 fix: resolve anki warning 2026-03-11 21:25:32 +01:00
4fae852ab1 feat: add database module 2026-03-11 21:25:32 +01:00
959bccc375 chore: update lockfile 2026-03-11 21:25:32 +01:00
030010a66f refactor(home): organize home manager modules 2026-03-11 21:25:32 +01:00
16d14bcb1e feat: add 'yubikey' module to 'andromache' host 2026-03-11 21:25:32 +01:00
d47e0fd6da refactor: move 'sshfs' into 'ssh' module 2026-03-11 21:25:32 +01:00
78b31a187f refactor: remove redundant 'vimPlugins.vim-plug' package 2026-03-11 21:25:32 +01:00
56efbd8ab5 chore: add 'anki' module to 'work' host 2026-03-11 21:25:32 +01:00
bfe1f82943 chore: update lockfile 2026-03-11 21:25:32 +01:00
7033407c23 fix: add /etc/xdg to XDG_CONFIG_DIRS for GNOME session 2026-03-11 21:25:32 +01:00
dd7091b10a chore(git): add includeIf for nix-dev-shells
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:25:32 +01:00
388feede95 feat: add 'secrets' module to work host 2026-03-11 21:25:32 +01:00
99a20c9ac7 refactor: simplify apps.colmena 2026-03-11 21:25:32 +01:00
2883d6f4f3 feat: add golang module to work host 2026-03-11 21:25:32 +01:00
725d2fa9c4 chore: update lockfile 2026-03-11 21:25:32 +01:00
4939523735 fix: add wrapper util for home manager modules 2026-03-11 21:25:32 +01:00
bae21e1538 fix: remove pnpm bash config 2026-03-11 21:25:32 +01:00
1bf71bf066 fix: update 'work' host modules 2026-03-11 21:25:32 +01:00
d06e8d975e feat: add 'nodejs' module (and use on 'work' host) 2026-03-11 21:25:32 +01:00
9cbd0cc316 feat: set up 'opencode' on work host 2026-03-11 21:25:32 +01:00
0089087f52 feat: add 'vscode' module to work host 2026-03-11 21:25:32 +01:00
ed193de628 fix: add pdf support to pandoc module 2026-03-11 21:25:32 +01:00
565e4573ca fix: remove default packages 2026-03-11 21:25:32 +01:00
3be3997cf6 feat: set up 'tlp' for laptop mode on 'astyanax' 2026-03-11 21:25:32 +01:00
47302d98ed feat: add notifier plugin to opencode 2026-03-11 21:25:32 +01:00
52cf601f39 fix :resolve 'andromache' syntax error 2026-03-11 21:25:32 +01:00
0a2145f063 feat: set up 'storage' module 2026-03-11 21:25:32 +01:00
e48a8de02e fix: resolve nix build warnings 2026-03-11 21:25:32 +01:00
ce1ce79f83 chore: disable syncthing module 2026-03-11 21:25:32 +01:00
df33251ada fix: remove 'nix.settings' from 'hecuba' host 2026-03-11 21:25:32 +01:00
f9ea95f346 refactor: extract 'pandoc' module 2026-03-11 21:25:32 +01:00
27b6af253f docs: update readme 2026-03-11 21:25:32 +01:00
8ddf5bf850 feat: add basic 'gaming' module to 'andromache' 2026-03-11 21:25:32 +01:00
12710cd3d5 refactor: extract 'nvidia' module 2026-03-11 21:25:32 +01:00
4363b8c88f refactor: add home 'allowedUnfree' option 2026-03-11 21:25:32 +01:00
e031da34b8 refactor: remove unused 'colmena' input 2026-03-11 21:25:32 +01:00
72876ca9f7 fix: deny opencode access to nix secret paths 2026-03-11 21:25:32 +01:00
58d4bc6f13 fix: temporarily disable 'ly' on desktop 2026-03-11 21:25:32 +01:00
ff724c51bc feat: set up openscad lsp 2026-03-11 21:25:32 +01:00
53b56a096f fix: update 'ncspot' config 2026-03-11 21:25:32 +01:00
1160b48da7 chore: remove redundant 'update-vim' script 2026-03-11 21:25:32 +01:00
1a3ae09be3 chore: update lockfile 2026-03-11 21:25:32 +01:00
7d4129b02b fix: enable colortheme for firefox-based browsers 2026-03-11 21:25:32 +01:00
750237e4c4 fix: update 'sb-pomo' script to match 'pomo' script 2026-03-11 21:25:32 +01:00
414476baf2 docs: update readme 2026-03-11 21:25:32 +01:00
b04a1ee845 chore: remove unused vpn module 2026-03-11 21:25:32 +01:00
0b853ebf4b fix: add 'lib' as default module 2026-03-11 21:25:32 +01:00
22a5026f38 feat: add home manager audio module (pulsemixer) 2026-03-11 21:25:32 +01:00
4457e2bd6d fix: add 'lib' module to astyanax host 2026-03-11 21:25:32 +01:00
93a9f7fb52 fix: color niri workspaces in waybar 2026-03-11 21:25:32 +01:00
301355a082 chore: update lockfile 2026-03-11 21:25:32 +01:00
1af04c10df chore: remove 'phone' config (skip 'nix-on-droid' for now) 2026-03-11 21:25:32 +01:00
d205b4b129 feat: set up 'eetion-02' raspberry pi host 2026-03-11 21:25:32 +01:00
3be1b5c384 flake.lock: Update
Flake lock file updates:

• Updated input 'firefox-addons':
    'gitlab:rycee/nur-expressions/c7794d3f46304de5234008c31b5b28a9d5709184?dir=pkgs/firefox-addons&narHash=sha256-0iGDl/ct3rW%2Bh6%2BsLq4RZaze/U/aQo2L5sLLuyjuVTk%3D' (2026-02-04)
  → 'gitlab:rycee/nur-expressions/65d59f814068d04e532cad2773d281e4951acd95?dir=pkgs/firefox-addons&narHash=sha256-%2BFHN9EthS%2BkHxnMoSDZEiGLoxwiIuij6ltK3aTmlLMA%3D' (2026-02-07)
• Updated input 'home-manager':
    'github:nix-community/home-manager/04e5203db66417d548ae1ff188a9f591836dfaa7?narHash=sha256-R1WFtIvp38hS9x63dnijdJw1KyIiy30KGea6e6N7LHs%3D' (2026-02-05)
  → 'github:nix-community/home-manager/6cee0821577643e0b34e2c5d9a90d0b1b5cdca70?narHash=sha256-cyxgVsNfHnJ4Zn6G1EOzfTXbjTy7Ds9zMOsZaX7VZWs%3D' (2026-02-07)
• Updated input 'nvim':
    'path:./dots/.config/nvim'
  → 'path:./dots/.config/nvim'
2026-03-11 21:25:32 +01:00
7493af6218 feat: add (but disable for now) uptime kuma module for 'hecuba' 2026-03-11 21:25:32 +01:00
b5776e547c refactor: resolve warnings/errors in checks 2026-03-11 21:25:32 +01:00
ff4e9ee337 fix: simplify syncthing module 2026-03-11 21:25:32 +01:00
c4ea029874 feat: set up 'stylix' 2026-03-11 21:25:32 +01:00
a7972e7211 test: try taskwarrior hooks to track slots 2026-03-11 21:25:32 +01:00
a93f576142 fix: make 'colmena' available 2026-03-11 21:25:32 +01:00
529d243565 test: see if this fixes auto upgrades 2026-03-11 21:25:32 +01:00
239456efbc feat: set up 'stylix' 2026-03-11 21:25:32 +01:00
d6b2ce04ef feat: colorize 'kubectl' output 2026-03-11 21:25:32 +01:00
f04730d4ff chore: gitignore '.pre-commit-config.yaml' 2026-03-11 21:25:32 +01:00
e87f85710d feat(bluetooth): add 'mpris-proxy' service 2026-03-11 21:25:32 +01:00
4840108bb0 fix: improve 'ai-tools' module (host-specific options) 2026-03-11 21:25:32 +01:00
254b6fa48f chore: disable 'm_taskwarrior_d.nvim' 2026-03-11 21:25:32 +01:00
b3247589e0 refactor(nixGL): extract 'nixGL' wrapper 2026-03-11 21:25:32 +01:00
2c36290054 feat: add 'bruno' module 2026-03-11 21:25:32 +01:00
55f2be9dbe chore: remove redundant backup files after nixification 2026-03-11 21:25:32 +01:00
7b435f09b3 feat: add 'bak' script 2026-03-11 21:25:32 +01:00
5ce228aee7 chore: update lockfile 2026-03-11 21:25:32 +01:00
f644fcbd5f fix: add 'ai-tools' module to 'andromache' 2026-03-11 21:25:32 +01:00
2207666a34 feat: set up git hooks 2026-03-11 21:25:32 +01:00
f3858f4418 fix: add ssh keys to agent for all hosts 2026-03-11 21:25:32 +01:00
554accb4aa fix: resolve proxmark firmware flashing issues 2026-03-11 21:25:32 +01:00
7155c9d126 fix: set up ipv4 forwarding 2026-03-11 21:25:32 +01:00
e16b55d155 feat: add 'brightnessctl' to niri desktop 2026-03-11 21:25:32 +01:00
8bd73165d4 flake.lock: Update
Flake lock file updates:

• Updated input 'firefox-addons':
    'gitlab:rycee/nur-expressions/4f827ff035c6ddc58d04c45abe5b777d356b926a?dir=pkgs/firefox-addons&narHash=sha256-9Sqq/hxq8ZDLRSzu%2Bedn0OfWG%2BFAPWFpwMKaJobeLec%3D' (2026-02-03)
  → 'gitlab:rycee/nur-expressions/c7794d3f46304de5234008c31b5b28a9d5709184?dir=pkgs/firefox-addons&narHash=sha256-0iGDl/ct3rW%2Bh6%2BsLq4RZaze/U/aQo2L5sLLuyjuVTk%3D' (2026-02-04)
• Updated input 'home-manager':
    'github:nix-community/home-manager/984708c34d3495a518e6ab6b8633469bbca2f77a?narHash=sha256-gj1yP3spUb1vGtaF5qPhshd2j0cg4xf51pklDsIm19Q%3D' (2026-02-01)
  → 'github:nix-community/home-manager/04e5203db66417d548ae1ff188a9f591836dfaa7?narHash=sha256-R1WFtIvp38hS9x63dnijdJw1KyIiy30KGea6e6N7LHs%3D' (2026-02-05)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/cb369ef2efd432b3cdf8622b0ffc0a97a02f3137?narHash=sha256-VKS4ZLNx4PNrABoB0L8KUpc1fE7CLpQXQs985tGfaCU%3D' (2026-02-02)
  → 'github:nixos/nixpkgs/00c21e4c93d963c50d4c0c89bfa84ed6e0694df2?narHash=sha256-AYqlWrX09%2BHvGs8zM6ebZ1pwUqjkfpnv8mewYwAo%2BiM%3D' (2026-02-04)
• Updated input 'nvim':
    'path:./dots/.config/nvim'
  → 'path:./dots/.config/nvim'
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/f990b0a334e96d3ef9ca09d4bd92778b42fd84f9?narHash=sha256-NUVGVtYBTC96WhPh4Y3SVM7vf0o1z5W4uqRBn9v1pfo%3D' (2026-02-03)
  → 'github:Mic92/sops-nix/17eea6f3816ba6568b8c81db8a4e6ca438b30b7c?narHash=sha256-ktjWTq%2BD5MTXQcL9N6cDZXUf9kX8JBLLBLT0ZyOTSYY%3D' (2026-02-03)
2026-03-11 21:25:32 +01:00
fa369973b7 feat: add helm plugins declaratively 2026-03-11 21:25:32 +01:00
ff667438a0 feat: set up 'music' module 2026-03-11 21:25:32 +01:00
ad2675829a refactor: simplify keyboard module 2026-03-11 21:25:32 +01:00
2ca4e72ad7 feat: add 'direnv' module 2026-03-11 21:25:32 +01:00
8977ed2212 feat: add nfc module (and use it on 'astyanax') 2026-03-11 21:25:32 +01:00
648c5b1dde fix: remove wlsunset spawn (replaced by gammastep service) 2026-03-11 21:25:32 +01:00
cba482d26d fix: remove duplicate waybar spawn in niri config (already managed by systemd) 2026-03-11 21:25:32 +01:00
58df524ac5 chore: update lockfile
Flake lock file updates:

• Updated input 'nvim':
    'path:./dots/.config/nvim'
  → 'path:./dots/.config/nvim'
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/1e89149dcfc229e7e2ae24a8030f124a31e4f24f?narHash=sha256-twBMKGQvaztZQxFxbZnkg7y/50BW9yjtCBWwdjtOZew%3D' (2026-02-01)
  → 'github:Mic92/sops-nix/f990b0a334e96d3ef9ca09d4bd92778b42fd84f9?narHash=sha256-NUVGVtYBTC96WhPh4Y3SVM7vf0o1z5W4uqRBn9v1pfo%3D' (2026-02-03)
2026-03-11 21:25:32 +01:00
76f4f2278e feat: mute 'astyanax' speakers when disconnecting AC 2026-03-11 21:25:32 +01:00
09909cbe42 fix: integrate keepassxc browser on all firefox-based browsers 2026-03-11 21:25:32 +01:00
dd7bc3193d feat: set up restic backups for 'andromache' and 'astyanax' 2026-03-11 21:25:32 +01:00
381f29cbea feat: set up syncthing (with e-reader) 2026-03-11 21:25:32 +01:00
8bfc6cd698 feat: set up 'paperless-ngx' (behind nginx reverse proxy) 2026-03-11 21:25:32 +01:00
6012da3ceb fix: smarten 'buildOnTarget' by using tags 2026-03-11 21:25:32 +01:00
35d495e872 fix: add python dependency to 'taskwarrior' home module 2026-03-11 21:25:32 +01:00
f4be58c648 fix: enable 'eetion' firewall 2026-03-11 21:25:32 +01:00
17ecac6524 fix: allow 'astyanax' to cross-compile to ARM (e.g. for eetion) 2026-03-11 21:25:32 +01:00
2b9dc9b7da fix: add public hostname to ssh config and refactor 2026-03-11 21:25:32 +01:00
da814d8d56 feat: host 'ActualBudget' on 'eetion' host 2026-03-11 21:25:32 +01:00
ecf481893c fix(colmena): add hostname to 'hecuba' host 2026-03-11 21:25:32 +01:00
9091d55af2 feat: add 'k8s' home module 2026-03-11 21:25:32 +01:00
23d3c5c83a feat: add 'docker' home module to 'work' host 2026-03-11 21:25:32 +01:00
60cf0651dc fix: add 'dconf2nix' package to 'dconf' module 2026-03-11 21:25:32 +01:00
8054b6f1e0 refactor: clean up packages 2026-03-11 21:25:32 +01:00
7f8d95c7c4 refactor: clean up 'flake.nix' and 'deploy/colmena.nix' 2026-03-11 21:25:32 +01:00
58642c9e15 fix(ssh): harden ARM SD installer image SSH 2026-03-11 21:25:32 +01:00
d58c4fee0d feat(host): add 'eetion' host (as a test for Orange Pi Zero2 H616) 2026-03-11 21:25:32 +01:00
159bc5c6a5 fix(deploy): add colmena to 'builder' hosts 2026-03-11 21:25:32 +01:00
6409b5425d refactor: move disko module out of 'common' module 2026-03-11 21:25:32 +01:00
c877e48e0a fix: use cross-compilation from x86 to ARM for SD card image 2026-03-11 21:25:32 +01:00
d04a6ed67e feat: add SD card image for ARM 2026-03-11 21:25:32 +01:00
5b43fde4ce feat(phone): set up 'nix-on-droid' 2026-03-11 21:25:32 +01:00
889440aef8 fix: only use 'nvim' flake as home manager module 2026-03-11 21:25:32 +01:00
e40d5b02f7 feat: add 'taskopen' to 'taskwarrior' module 2026-03-11 21:25:32 +01:00
ab87e785b6 feat: add 'comms' module 2026-03-11 21:25:32 +01:00
9cfe4d3c43 chore: temporarily disable wireguard VPN module 2026-03-11 21:25:32 +01:00
d14a33378f feat: add CLI tools to git module 2026-03-11 21:25:32 +01:00
6ef5f761d5 feat: add 'azure' cloud option (and generalized module) 2026-03-11 21:25:32 +01:00
d7f895d084 fix: update 'ai-tools' module and add to 'astyanax' host 2026-03-11 21:25:32 +01:00
583c72f6bd feat: add 'ai-tools' home module 2026-03-11 21:25:32 +01:00
79a39ee163 chore: update nvim flake dependencies 2026-03-11 21:25:32 +01:00
201db9d842 chore: update flake lockfiles 2026-03-11 21:25:32 +01:00
fc3a7dc402 fix: declare contents of 'setup-gnome' 2026-03-11 21:25:32 +01:00
1b51954bbd refactor(statix): resolve 'statix check' issues 2026-03-11 21:25:32 +01:00
cec4c12dc2 chore: update lockfile 2026-03-11 21:25:32 +01:00
c8f612e7a3 fix(nixd): properly configure 'nixd' nvim lsp 2026-03-11 21:25:32 +01:00
57121926d2 feat: add 'gammastep' to niri deskopt 2026-03-11 21:25:32 +01:00
e16bffcb07 feat: add '3d' and 'photography' modules to andromache 2026-03-11 21:25:32 +01:00
612c024965 fix: update hardware config 2026-03-11 21:25:32 +01:00
46181a340a chore: update lockfile 2026-03-11 21:25:32 +01:00
459c408bd6 refactor: migrate vim.cmd to lua API in init.lua 2026-03-11 21:25:32 +01:00
c068a44761 fix: remove conflicting light background setting
The bg=light setting was immediately overridden by vim.opt.background = "dark" later in the file.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-11 21:25:32 +01:00
aef49d9f4d refactor: remove duplicate 'paq-setup' require 2026-03-11 21:25:32 +01:00
a9f98f6927 chore(nvim): remove redundant unused config 2026-03-11 21:25:32 +01:00
4f7c4ccc0b fix(vim.keymap): resolve duplicate 'fzf' keymap 2026-03-11 21:25:32 +01:00
a84fbe2f59 fix(tmux): update tmux config 2026-03-11 21:25:32 +01:00
145351a30d refactor: deduplicate firefox/librewolf config 2026-03-11 21:25:32 +01:00
50c8e8be50 fix: use 'nixGL' for kitty when available 2026-03-11 21:25:32 +01:00
1eecdb8103 feat: add 'tmux' to 'shell' module 2026-03-11 21:25:32 +01:00
bf40f85b39 refactor: extract 'dotsPath' for 'dots' path 2026-03-11 21:25:32 +01:00
6b1b09f9a6 refactor: centralize kitty config 2026-03-11 21:25:32 +01:00
c25d42759c fix: remove 'edit_editor_config' alias 2026-03-11 21:25:32 +01:00
30fb73fec0 refactor: modularize 'nvim' for home manager hosts 2026-03-11 21:25:32 +01:00
c0885dc6ca feat: set up colmena with hetzner stuff 2026-03-11 21:25:32 +01:00
934cbff81d feat: configure auto suspend 2026-03-11 21:25:32 +01:00
8e8250ed56 feat: set up opencode (with automated API key) 2026-03-11 21:25:32 +01:00
03eac376d2 feat: add 'hcloud' module 2026-03-11 21:25:32 +01:00
7181356f5e chore: update Nix 'work' host 2026-03-11 21:25:32 +01:00
7fcd6eac8e chore: update lockfile 2026-03-11 21:25:32 +01:00
f7b4aa257f refactor: modularize 'nvim' for home manager hosts 2026-03-11 21:25:32 +01:00
254b3d255f feat: use shell module on work host 2026-03-11 21:25:32 +01:00
5ffb87f458 feat: modularize (and extend) kitty config 2026-03-11 21:25:32 +01:00
5368461675 feat: add 'hcloud' module 2026-03-11 21:25:32 +01:00
abe101d58e fix: add 'hetzner' module 2026-03-11 21:25:32 +01:00
1137705b20 chore: update lockfile 2026-03-11 21:25:32 +01:00
bda86e86ea feat: automate optimising store, garbage collection and upgrades 2026-03-11 21:25:32 +01:00
628681bc58 refactor(nixfmt): format 2026-03-11 21:25:32 +01:00
33033aa6e7 chore: add 'andromache' ssh public keys 2026-03-11 21:25:32 +01:00
7334018e6f refactor: simplify hosts files 2026-03-11 21:25:32 +01:00
f74803cd88 fix: remove xdg config 2026-03-11 21:25:32 +01:00
d0ee271e7b feat: replace 'sddm' with 'ly' 2026-03-11 21:25:32 +01:00
66f36cf71c feat: automate SSH config ('known_hosts', 'authorized_keys' ...) 2026-03-11 21:25:32 +01:00
fbdcf51e6c chore(nixfmt): format 2026-03-11 21:25:32 +01:00
c71e232fe7 fix: merge 'astyanax' services configuration 2026-03-11 21:25:32 +01:00
aed1aa2ad9 fix: disable 'throttled' service 2026-03-11 21:25:31 +01:00
6a0538c8b8 fix: improve niri desktop 2026-03-11 21:25:31 +01:00
1fcbc2fd83 fix: add anki to 'astyanax' host 2026-03-11 21:25:31 +01:00
6a0fa7a02d fix: move kitty tab bar to bottom 2026-03-11 21:25:31 +01:00
07223be230 fix: update font configuration 2026-03-11 21:25:31 +01:00
de944a017c chore: update lockfile 2026-03-11 21:25:31 +01:00
26e9a0e0c9 fix: disable 'nixos-hardware' module for astyanax (caused boot to hang on 'loading module i915') 2026-03-11 21:25:31 +01:00
c2f9a321a2 feat(home): add shell module 2026-03-11 21:25:31 +01:00
bad0979caf fix(anki): make sops optional for standalone home-manager 2026-03-11 21:25:31 +01:00
85628b1924 feat(home): migrate bash config to shell module 2026-03-11 21:25:31 +01:00
aae87a78ad feat(nixos): pass inputs to home-manager via extraSpecialArgs 2026-03-11 21:25:31 +01:00
81905c0287 chore(git): add .claude/ to gitignore 2026-03-11 21:25:31 +01:00
c26ce95e57 fix: make taskwarrior available on both NixOS and standalone home-manager 2026-03-11 21:25:31 +01:00
b7601bf665 chore: update NixOS 2026-03-11 21:25:31 +01:00
a2d90bbc00 fix: remove descriptions from 'browser' module 2026-03-11 21:25:31 +01:00
2fef58e066 fix: resolve nvim treesitter errors 2026-03-11 21:25:31 +01:00
bf4d5229a9 fix: add 'stylelint' to neovim flake 2026-03-11 21:25:31 +01:00
b13bba26d5 refactor(browser): create single browser module 2026-03-11 21:25:31 +01:00
e01f37321e chore: update Nix 'work' host 2026-03-11 21:25:31 +01:00
91b8358331 chore: update lockfile 2026-03-11 21:25:31 +01:00
ffe0d2a3ec feat(nvim): add typescript-language-server to runtime dependencies 2026-03-11 21:25:31 +01:00
613cd70f49 fix(nvim): ensure codecompanion config structure exists before mcphub extension loads 2026-03-11 21:25:31 +01:00
e7f675cea4 chore: update flake.lock with nvim mcp-hub input
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-11 21:25:22 +01:00
3c56092131 feat(nvim): add mcp-hub, fd, and delta dependencies
- add mcp-hub flake input for MCP integration
- create system-aware dependency overlays
- add mcp-hub, fd, delta to lspsAndRuntimeDeps
- remove duplicate tailwind-fold.lua file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-11 21:25:22 +01:00
bcd78baf09 feat: set up 'claude-code.nvim' plugin 2026-03-11 21:25:22 +01:00
2d3b8070d7 chore: add TODO for unique 'networking.hostId' 2026-03-11 21:25:22 +01:00
bbe528ebce refactor: use username variable consistently
Replaced hardcoded "h" username references with variables:
- hosts/vm: use username variable for secrets.username
- home configs: use username variable in bash initExtra paths
- keepassxc: update comment to use $HOME instead of /home/h

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-11 21:25:22 +01:00
06fe355250 fix(firefox): merge duplicate policies declarations
Second policies declaration was overwriting the first, causing
DefaultDownloadDirectory setting to be lost. Merged both into single
policies block.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-11 21:25:22 +01:00
767cc4c512 fix: format rust using 'rustfmt' 2026-03-11 21:25:22 +01:00
7dab619256 refactor: decouple 'andromache' home config from 'astyanax' 2026-03-11 21:25:22 +01:00
926a2def67 chore: update neovim flake (and main flake) 2026-03-11 21:25:22 +01:00
aa70174040 refactor: import shikane 'desktop/niri' instead of directly 2026-03-11 21:25:22 +01:00
6600b2325d feat: add plain 'mako' service for notifications 2026-03-11 21:25:22 +01:00
447ccd705e feat: declare anki config 2026-03-11 21:25:22 +01:00
6b56dfa595 fix: migrate 'r5rs' script to neovim 2026-03-11 21:25:22 +01:00
5fda65e0a5 fix: ignore directories that contain '.nobackup' in 'save-home' 2026-03-11 21:25:22 +01:00
de818cf4e8 chore: format using 'black' 2026-03-11 21:25:22 +01:00
b786abbed6 chore: clean up 'astyanax' packages 2026-03-11 21:25:22 +01:00
0de28843a3 feat: add 'fail2ban' to 'hecuba' host 2026-03-11 21:25:22 +01:00
a06a87802b refactor: use environment variable for zettelkasten path 2026-03-11 21:25:22 +01:00
54338e7498 feat: add 'rustfmt' for rust formatting 2026-03-11 21:25:22 +01:00
b15ec5d6ae chore: relock flake 2026-03-11 21:25:22 +01:00
58787c5917 feat: add 'figet.nvim' to 'nvim' flake 2026-03-11 21:25:22 +01:00
ec7975936f test(nvim): try out 'm_taskwarrior_d.nvim' plugin 2026-03-11 21:25:22 +01:00
3b87ac54a6 fix: resolve 'nix flake check' errors 2026-03-11 21:25:22 +01:00
76b01e120c feat: use 'rustaceanvim' instead for rust development 2026-03-11 21:25:22 +01:00
675692e3f3 feat: add 'wl-clipboard' to niri desktop 2026-03-11 21:25:22 +01:00
6fa4b9d72e fix: work around throttled error 2026-03-11 21:25:22 +01:00
542ebb3ee3 fix: declare graphics config for 'astyanax' host 2026-03-11 21:25:22 +01:00
4eee3de44a fix: resolve treesitter errors on NixOS 2026-03-11 21:25:22 +01:00
32a65d912a chore: ignore breaking changes warning for 'codecompanion.nvim' 2026-03-11 21:25:22 +01:00
d755464eb0 enable 'shikane' on 'astyanax' (and add 'wdisplays') 2026-03-11 21:25:22 +01:00
da462b6717 feat(nvim): set up rust lsp config 2026-03-11 21:25:22 +01:00
5c40f08146 refactor: enable firewall explicitely for 'hecuba' host 2026-03-11 21:25:22 +01:00
401b25b9a0 fix: remove common '.nix' suffix 2026-03-11 21:25:22 +01:00
3ed5ff019d fix: update waybar to match polybar config (for the most part) 2026-03-11 21:25:22 +01:00
62e62b8e20 refactor: move 'wlsunset' package into home manager module 2026-03-11 21:25:22 +01:00
Hektor Misplon
9e9c2b5349 chore: update 'nvim' flake 2026-03-11 21:25:22 +01:00
Hektor Misplon
28e24c284e fix: don't autoinstall treesitter grammars when using 'nixCats' 2026-03-11 21:25:22 +01:00
709f754697 fix: declare 'fuzzel' config and add it to 'niri' desktop 2026-03-11 21:25:22 +01:00
17627f5074 feat: track (currently unused) k3s module 2026-03-11 21:25:22 +01:00
2e2e52aa78 refactor: use 'default.nix' for all modules 2026-03-11 21:25:22 +01:00
591bd25a3d fix: declare 'waybar' config and add it to 'niri' desktop 2026-03-11 21:25:22 +01:00
03793989a5 fix: declare niri config 2026-03-11 21:25:22 +01:00
e69024f921 fix: try 'writeShellApplication' for 'astyanax' WOL script 2026-03-11 21:25:22 +01:00
f664d4b46a fix: declare 'andromache' 'eno1' interface MAC address 2026-03-11 21:25:22 +01:00
84d9ac50a6 feat: add 'hecuba' host config 2026-03-11 21:25:22 +01:00
7ccbbb418b fix: further harden 'hardened-openssh' module 2026-03-11 21:25:22 +01:00
3c294d2194 fix: replace 'gnome' desktop with 'niri' 2026-03-11 21:25:22 +01:00
82a4f44a19 fix: declare KeePassXC browser integration 2026-03-11 21:25:22 +01:00
6677b1e14b chore(pkgs): add 'signal-desktop' package 2026-03-11 21:25:22 +01:00
8315866dd7 fix: disable kitty tab shortcut for now 2026-03-11 21:25:22 +01:00
b4cac89e95 update bluetooth config 2026-03-11 21:25:22 +01:00
54bdee7e8f refactor: move bootloader into 'modules/boot' 2026-03-11 21:25:22 +01:00
11381a1ff9 refactor: move 'disko' modules into 'modules/disko' 2026-03-11 21:25:22 +01:00
e97dcbfcc5 resolve NixOS build warnings 2026-03-11 21:25:22 +01:00
143 changed files with 1890 additions and 1651 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

3
.gitignore vendored
View File

@@ -9,4 +9,5 @@ result-*
nixos-efi-vars.fd nixos-efi-vars.fd
/.pre-commit-config.yaml .direnv/
.pre-commit-config.yaml

View File

@@ -1,4 +1,4 @@
# NixOS flake # ❄️ NixOS flake
## hosts ## hosts

View File

@@ -8,29 +8,27 @@ let
utils = import ../utils { inherit lib; }; utils = import ../utils { inherit lib; };
hostDirNames = utils.dirNames ../hosts; hostDirNames = utils.dirNames ../hosts;
mkNode = hostname: tags: { mkNode = hostname: meta: {
imports = [ ../hosts/${hostname} ]; imports = [ ../hosts/${hostname} ];
deployment = { deployment = {
targetHost = self.nixosConfigurations.${hostname}.config.ssh.publicHostname; inherit (meta.deployment) targetHost targetUser tags;
targetUser = self.nixosConfigurations.${hostname}.config.ssh.username; buildOnTarget = builtins.any (t: t != "local" && t != "arm") meta.deployment.tags;
buildOnTarget = builtins.any (t: t != "local") tags;
inherit tags;
}; };
}; };
nodes = lib.genAttrs hostDirNames (hostname: nodes = lib.genAttrs hostDirNames (hostname: mkNode hostname (utils.hostMeta ../hosts/${hostname}));
mkNode hostname (utils.hostMeta ../hosts/${hostname}).deployment.tags
);
in in
inputs.colmena.lib.makeHive { inputs.colmena.lib.makeHive (
{
meta = { meta = {
nixpkgs = import inputs.nixpkgs { nixpkgs = import inputs.nixpkgs { localSystem = "x86_64-linux"; };
localSystem = "x86_64-linux"; specialArgs = {
inherit inputs;
outputs = self;
dotsPath = ../dots;
myUtils = utils;
}; };
nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations;
nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs or { }) self.nixosConfigurations;
}; };
inherit nodes;
} }
// nodes
)

View File

@@ -27,8 +27,6 @@ alias ipa="ip -brief address"
alias ipl="ip -brief link" alias ipl="ip -brief link"
alias ipr="ip route" alias ipr="ip route"
alias clip="xclip -sel clip"
alias df="df -kTh" alias df="df -kTh"
alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S" alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S"
alias path='echo -e ${PATH//:/\\n}' # Pretty print path variables alias path='echo -e ${PATH//:/\\n}' # Pretty print path variables

View File

@@ -4,3 +4,4 @@
# Set NeoVim as default editor # Set NeoVim as default editor
export EDITOR=nvim export EDITOR=nvim
export SUDO_EDITOR="$EDITOR" export SUDO_EDITOR="$EDITOR"
export SYSTEMD_EDITOR="$EDITOR"

View File

@@ -1,221 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
readonly ALLOWED_MAIN_BRANCHES=("main" "master" "develop")
readonly BRANCH_TYPES=(
"feat For new features"
"hotfix For urgent fixes"
"fix For fixes"
"release For preparing releases"
"chore For non-code tasks"
)
error() {
echo "Error: $1" >&2
exit 1
}
warn() {
echo "Warning: $1" >&2
}
check_dependencies() {
local missing=()
for cmd in git fzf; do
if ! command -v "$cmd" &> /dev/null; then
missing+=("$cmd")
fi
done
if [[ ${#missing[@]} -gt 0 ]]; then
error "Missing required commands: ${missing[*]}"
fi
}
check_git_repo() {
if ! git rev-parse --git-dir &> /dev/null; then
error "Not in a git repository"
fi
}
check_current_branch() {
local current_branch
current_branch=$(git branch --show-current)
local is_main_branch=false
for branch in "${ALLOWED_MAIN_BRANCHES[@]}"; do
if [[ "$current_branch" == "$branch" ]]; then
is_main_branch=true
break
fi
done
if [[ "$is_main_branch" == false ]]; then
warn "Not branching from a main branch (current: $current_branch)"
read -rp "Continue anyway? [y/N] " response
if [[ ! "$response" =~ ^[Yy]$ ]]; then
exit 0
fi
fi
}
get_user_email() {
local email
email=$(git config --get user.email 2>/dev/null)
if [[ -z "$email" ]]; then
error "Git user email not configured. Run: git config user.email 'your@email.com'"
fi
echo "$email"
}
select_branch_type() {
local selected
selected=$(printf '%s\n' "${BRANCH_TYPES[@]}" | \
fzf --prompt="Select branch type: " \
--height=40% \
--border \
--info=inline) || error "Branch type selection cancelled"
echo "${selected%% *}"
}
select_jira_ticket() {
local email=$1
if ! command -v jira &> /dev/null; then
warn "Jira CLI not found. Proceeding without ticket ID."
return 0
fi
echo "Fetching Jira tickets for $email..." >&2
local jira_data
jira_data=$(jira issue list --assignee="$email" --order-by=priority --plain --no-headers 2>/dev/null) || {
warn "Could not fetch Jira tickets. Proceeding without ticket ID."
return 0
}
if [[ -z "$jira_data" ]]; then
warn "No Jira tickets found. Proceeding without ticket ID."
return 0
fi
echo "$jira_data" >&2
echo "" >&2
local formatted_tickets
formatted_tickets=$(echo "$jira_data" | awk '{
ticket_id = $2
$1 = $2 = ""
description = $0
gsub(/^[ \t]+/, "", description)
if (length(description) > 60) {
description = substr(description, 1, 57) "..."
}
print ticket_id " - " description
}')
if [[ -z "$formatted_tickets" ]]; then
warn "No tickets to display. Proceeding without ticket ID."
return 0
fi
local selected_ticket
selected_ticket=$(echo -e "SKIP - Create branch without ticket ID\n$formatted_tickets" | \
fzf --prompt="Select Jira ticket (or skip): " \
--height=40% \
--border \
--info=inline) || error "Ticket selection cancelled"
if [[ "$selected_ticket" != "SKIP"* ]]; then
echo "${selected_ticket%% -*}"
fi
}
get_branch_description() {
local ticket_id=$1
local editor="${EDITOR:-vi}"
local tmpfile
tmpfile=$(mktemp)
trap "rm -f '$tmpfile'" EXIT
if [[ -n "$ticket_id" ]]; then
cat > "$tmpfile" << EOF
# Selected ticket: $ticket_id
# Enter your branch description below in kebab-case (e.g., my-description):
# The ticket ID will be automatically included in the branch name.
# Lines starting with # will be ignored.
EOF
else
cat > "$tmpfile" << 'EOF'
# Enter your branch description below in kebab-case (e.g., my-description):
# Lines starting with # will be ignored.
EOF
fi
"$editor" "$tmpfile" < /dev/tty > /dev/tty
local desc
desc=$(grep -v '^#' "$tmpfile" | tr -d '\n' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
echo "$desc"
}
validate_description() {
local desc=$1
if [[ -z "$desc" ]]; then
error "No description provided"
fi
if [[ ! "$desc" =~ ^[a-z0-9]+(-[a-z0-9]+)*$ ]]; then
error "Invalid branch description format.\nUse lowercase letters, numbers, and hyphens only.\nNo trailing or consecutive hyphens allowed.\nExample: my-feature-description"
fi
}
create_branch() {
local type=$1
local ticket_id=$2
local desc=$3
local branch
if [[ -n "$ticket_id" ]]; then
branch="$type/$ticket_id-$desc"
else
branch="$type/$desc"
fi
if git show-ref --verify --quiet "refs/heads/$branch"; then
error "Branch '$branch' already exists"
fi
echo ""
echo "Creating branch: $branch"
git checkout -b "$branch"
}
main() {
check_dependencies
check_git_repo
check_current_branch
local email
email=$(get_user_email)
local type
type=$(select_branch_type)
echo "About to call select_jira_ticket" >&2
local ticket_id=""
ticket_id=$(select_jira_ticket "$email")
local desc
desc=$(get_branch_description "$ticket_id")
validate_description "$desc"
create_branch "$type" "$ticket_id" "$desc"
}
main "$@"

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env bash
cd "$ZK_PATH" || echo "No zettelkasten directory found"
git a . && git commit -m "Update" && git push

View File

@@ -1,20 +0,0 @@
#!/bin/bash
if [ ! -d ~/.zk ]; then
echo "[zk] Setting up zettelkasten"
gh repo clone zk ~/.zk
else
echo "[zk] Zettelkasten already set up."
fi
read -p "Would you like open your zettelkasten? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
if [ -x "$(command -v zk)" ]; then
zk
else
echo "Error: 'zk' command not found or not executable"
exit 1
fi
fi

View File

@@ -13,6 +13,7 @@ if ok then
cc_config.interactions = cc_config.interactions or {} cc_config.interactions = cc_config.interactions or {}
cc_config.interactions.chat = cc_config.interactions.chat or {} cc_config.interactions.chat = cc_config.interactions.chat or {}
cc_config.interactions.chat.tools = cc_config.interactions.chat.tools or {} cc_config.interactions.chat.tools = cc_config.interactions.chat.tools or {}
cc_config.interactions.chat.variables = cc_config.interactions.chat.variables or {}
require("mcphub.extensions.codecompanion").setup({ require("mcphub.extensions.codecompanion").setup({
make_vars = true, make_vars = true,

View File

@@ -0,0 +1,35 @@
local hydra_repl = "hydra-repl"
if not vim.fn.executable(hydra_repl) then
return
end
local function send(lines)
vim.system({ hydra_repl, table.concat(lines, "\n") })
end
local function get_paragraph(buf)
local start_ = vim.fn.search("^$", "bnW")
local end_ = vim.fn.search("^$", "nW") - 1
if end_ < vim.api.nvim_win_get_cursor(0)[1] then
end_ = vim.api.nvim_buf_line_count(buf)
end
return vim.api.nvim_buf_get_lines(buf, start_, end_, false)
end
local function get_selection(buf)
return vim.api.nvim_buf_get_lines(buf, vim.fn.line("'<") - 1, vim.fn.line("'>"), false)
end
vim.api.nvim_create_autocmd("FileType", {
pattern = "javascript",
callback = function(e)
if vim.fn.fnamemodify(vim.api.nvim_buf_get_name(e.buf), ":e") ~= "hydra" then
return
end
local buf = e.buf
vim.keymap.set("n", "<CR>", function() send(get_paragraph(buf)) end, { buffer = buf, desc = "hydra: send block" })
vim.keymap.set("v", "<CR>", function() send(get_selection(buf)) end, { buffer = buf, desc = "hydra: send selection" })
end,
})

View File

@@ -87,7 +87,6 @@ local servers = {
}, },
openscad_ls = {}, openscad_ls = {},
pyright = {}, pyright = {},
-- tsserver = {},
svelte = { svelte = {
plugin = { plugin = {
svelte = { svelte = {
@@ -96,7 +95,6 @@ local servers = {
}, },
}, },
tailwindcss = {}, tailwindcss = {},
-- vtsls = {},
ts_ls = {}, ts_ls = {},
-- vtsls = { -- vtsls = {
-- maxTsServerMemory = 16384, -- maxTsServerMemory = 16384,

View File

@@ -1,23 +1,5 @@
local ls = require("luasnip") local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local l = require("luasnip.extras").lambda
local rep = require("luasnip.extras").rep
local p = require("luasnip.extras").partial
local m = require("luasnip.extras").match
local n = require("luasnip.extras").nonempty
local dl = require("luasnip.extras").dynamic_lambda
local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta
local conds = require("luasnip.extras.expand_conditions")
ls.config.set_config({ ls.config.set_config({
history = true, history = true,
update_events = "TextChanged,TextChangedI", update_events = "TextChanged,TextChangedI",
@@ -27,287 +9,5 @@ ls.config.set_config({
store_selection_keys = "<Tab>", store_selection_keys = "<Tab>",
}) })
local function copy(args)
return args[1]
end
local function bash(_, _, command)
local file = io.popen(command, "r")
local res = {}
if file then
for line in file:lines() do
table.insert(res, line)
end
end
return res
end
local date_input = function(args, snip, old_state, date_format)
print(args, snip, old_state)
return sn(nil, i(1, os.date(date_format or "%Y-%m-%d")))
end
-- -- FIXME: EXAMPLE
-- ls.add_snippets("all", {
-- -- arg1: trigger `fn`,
-- -- arg2: nodes to insert into buffer on expansion.
-- s("fn", {
-- t("//Parameters: "), -- Text.
-- f(copy, 2), -- 1: function, 2: placeholders to copy text from
-- t({ "", "function " }), -- placeholder/insert.
-- i(1),
-- t("("), -- placeholder with initial text.
-- i(2, "int foo"), -- linebreak
-- t({ ") {", "\t" }), -- last placeholder, snippet exit point
-- i(0),
-- t({ "", "}" }),
-- }),
-- s("class", {
-- -- Choice: Switch between two different Nodes, first parameter is its position, second a list of nodes.
-- c(1, {
-- t("public "),
-- t("private "),
-- }),
-- t("class "),
-- i(2),
-- t(" "),
-- c(3, {
-- t("{"),
-- -- sn: Nested Snippet. Instead of a trigger, it has a position, just like insert-nodes. !!! These don't expect a 0-node!!!!
-- -- Inside Choices, Nodes don't need a position as the choice node is the one being jumped to.
-- sn(nil, {
-- t("extends "),
-- -- restoreNode: stores and restores nodes.
-- -- pass position, store-key and nodes.
-- r(1, "other_class", i(1)),
-- t(" {"),
-- }),
-- sn(nil, {
-- t("implements "),
-- -- no need to define the nodes for a given key a second time.
-- r(1, "other_class"),
-- t(" {"),
-- }),
-- }),
-- t({ "", "\t" }),
-- i(0),
-- t({ "", "}" }),
-- }),
-- -- Alternative printf-like notation for defining snippets. It uses format
-- -- string with placeholders similar to the ones used with Python's .format().
-- s(
-- "fmt1",
-- fmt("To {title} {} {}.", {
-- i(2, "Name"),
-- i(3, "Surname"),
-- title = c(1, { t("Mr."), t("Ms.") }),
-- })
-- ),
-- -- To escape delimiters use double them, e.g. `{}` -> `{{}}`.
-- -- Multi-line format strings by default have empty first/last line removed.
-- -- Indent common to all lines is also removed. Use the third `opts` argument
-- -- to control this behaviour.
-- s(
-- "fmt2",
-- fmt(
-- [[
-- foo({1}, {3}) {{
-- return {2} * {4}
-- }}
-- ]],
-- {
-- i(1, "x"),
-- rep(1),
-- i(2, "y"),
-- rep(2),
-- }
-- )
-- ),
-- -- Empty placeholders are numbered automatically starting from 1 or the last
-- -- value of a numbered placeholder. Named placeholders do not affect numbering.
-- s(
-- "fmt3",
-- fmt("{} {a} {} {1} {}", {
-- t("1"),
-- t("2"),
-- a = t("A"),
-- })
-- ),
-- -- The delimiters can be changed from the default `{}` to something else.
-- s("fmt4", fmt("foo() { return []; }", i(1, "x"), { delimiters = "[]" })),
-- -- `fmta` is a convenient wrapper that uses `<>` instead of `{}`.
-- s("fmt5", fmta("foo() { return <>; }", i(1, "x"))),
-- -- By default all args must be used. Use strict=false to disable the check
-- s(
-- "fmt6",
-- fmt("use {} only", { t("this"), t("not this") }, { strict = false })
-- ),
-- -- Use a dynamic_node to interpolate the output of a
-- -- function (see date_input above) into the initial
-- -- value of an insert_node.
-- s("novel", {
-- t("It was a dark and stormy night on "),
-- d(1, date_input, {}, { user_args = { "%A, %B %d of %Y" } }),
-- t(" and the clocks were striking thirteen."),
-- }),
-- -- Parsing snippets: First parameter: Snippet-Trigger, Second: Snippet body.
-- -- Placeholders are parsed into choices with 1. the placeholder text(as a snippet) and 2. an empty string.
-- -- This means they are not SELECTed like in other editors/Snippet engines.
-- ls.parser.parse_snippet(
-- "lspsyn",
-- "Wow! This ${1:Stuff} really ${2:works. ${3:Well, a bit.}}"
-- ),
-- -- When wordTrig is set to false, snippets may also expand inside other words.
-- ls.parser.parse_snippet(
-- { trig = "te", wordTrig = false },
-- "${1:cond} ? ${2:true} : ${3:false}"
-- ),
-- -- When regTrig is set, trig is treated like a pattern, this snippet will expand after any number.
-- ls.parser.parse_snippet({ trig = "%d", regTrig = true }, "A Number!!"),
-- -- Using the condition, it's possible to allow expansion only in specific cases.
-- s("cond", {
-- t("will only expand in c-style comments"),
-- }, {
-- condition = function(line_to_cursor, matched_trigger, captures)
-- -- optional whitespace followed by //
-- return line_to_cursor:match("%s*//")
-- end,
-- }),
-- -- there's some built-in conditions in "luasnip.extras.expand_conditions".
-- s("cond2", {
-- t("will only expand at the beginning of the line"),
-- }, {
-- condition = conds.line_begin,
-- }),
-- -- The last entry of args passed to the user-function is the surrounding snippet.
-- s(
-- { trig = "a%d", regTrig = true },
-- f(function(_, snip)
-- return "Triggered with " .. snip.trigger .. "."
-- end, {})
-- ),
-- -- It's possible to use capture-groups inside regex-triggers.
-- s(
-- { trig = "b(%d)", regTrig = true },
-- f(function(_, snip)
-- return "Captured Text: " .. snip.captures[1] .. "."
-- end, {})
-- ),
-- s({ trig = "c(%d+)", regTrig = true }, {
-- t("will only expand for even numbers"),
-- }, {
-- condition = function(line_to_cursor, matched_trigger, captures)
-- return tonumber(captures[1]) % 2 == 0
-- end,
-- }),
-- -- Use a function to execute any shell command and print its text.
-- s("bash", f(bash, {}, "ls")),
-- -- Short version for applying String transformations using function nodes.
-- s("transform", {
-- i(1, "initial text"),
-- t({ "", "" }),
-- -- lambda nodes accept an l._1,2,3,4,5, which in turn accept any string transformations.
-- -- This list will be applied in order to the first node given in the second argument.
-- l(l._1:match("[^i]*$"):gsub("i", "o"):gsub(" ", "_"):upper(), 1),
-- }),
-- s("transform2", {
-- i(1, "initial text"),
-- t("::"),
-- i(2, "replacement for e"),
-- t({ "", "" }),
-- -- Lambdas can also apply transforms USING the text of other nodes:
-- l(l._1:gsub("e", l._2), { 1, 2 }),
-- }),
-- s({ trig = "trafo(%d+)", regTrig = true }, {
-- -- env-variables and captures can also be used:
-- l(l.CAPTURE1:gsub("1", l.TM_FILENAME), {}),
-- }),
-- -- Set store_selection_keys = "<Tab>" (for example) in your
-- -- luasnip.config.setup() call to populate
-- -- TM_SELECTED_TEXT/SELECT_RAW/SELECT_DEDENT.
-- -- In this case: select a URL, hit Tab, then expand this snippet.
-- s("link_url", {
-- t('<a href="'),
-- f(function(_, snip)
-- -- TM_SELECTED_TEXT is a table to account for multiline-selections.
-- -- In this case only the first line is inserted.
-- return snip.env.TM_SELECTED_TEXT[1] or {}
-- end, {}),
-- t('">'),
-- i(1),
-- t("</a>"),
-- i(0),
-- }),
-- -- Shorthand for repeating the text in a given node.
-- s("repeat", { i(1, "text"), t({ "", "" }), rep(1) }),
-- -- Directly insert the ouput from a function evaluated at runtime.
-- s("part", p(os.date, "%Y")),
-- -- use matchNodes (`m(argnode, condition, then, else)`) to insert text
-- -- based on a pattern/function/lambda-evaluation.
-- -- It's basically a shortcut for simple functionNodes:
-- s("mat", {
-- i(1, { "sample_text" }),
-- t(": "),
-- m(1, "%d", "contains a number", "no number :("),
-- }),
-- -- The `then`-text defaults to the first capture group/the entire
-- -- match if there are none.
-- s("mat2", {
-- i(1, { "sample_text" }),
-- t(": "),
-- m(1, "[abc][abc][abc]"),
-- }),
-- -- It is even possible to apply gsubs' or other transformations
-- -- before matching.
-- s("mat3", {
-- i(1, { "sample_text" }),
-- t(": "),
-- m(
-- 1,
-- l._1:gsub("[123]", ""):match("%d"),
-- "contains a number that isn't 1, 2 or 3!"
-- ),
-- }),
-- -- `match` also accepts a function in place of the condition, which in
-- -- turn accepts the usual functionNode-args.
-- -- The condition is considered true if the function returns any
-- -- non-nil/false-value.
-- -- If that value is a string, it is used as the `if`-text if no if is explicitly given.
-- s("mat4", {
-- i(1, { "sample_text" }),
-- t(": "),
-- m(1, function(args)
-- -- args is a table of multiline-strings (as usual).
-- return (#args[1][1] % 2 == 0 and args[1]) or nil
-- end),
-- }),
-- -- The nonempty-node inserts text depending on whether the arg-node is
-- -- empty.
-- s("nempty", {
-- i(1, "sample_text"),
-- n(1, "i(1) is not empty!"),
-- }),
-- -- dynamic lambdas work exactly like regular lambdas, except that they
-- -- don't return a textNode, but a dynamicNode containing one insertNode.
-- -- This makes it easier to dynamically set preset-text for insertNodes.
-- s("dl1", {
-- i(1, "sample_text"),
-- t({ ":", "" }),
-- dl(2, l._1, 1),
-- }),
-- -- Obviously, it's also possible to apply transformations, just like lambdas.
-- s("dl2", {
-- i(1, "sample_text"),
-- i(2, "sample_text_2"),
-- t({ "", "" }),
-- dl(3, l._1:gsub("\n", " linebreak ") .. l._2, { 1, 2 }),
-- }),
-- }, {
-- key = "all",
-- })
require("luasnip.loaders.from_lua").lazy_load({ paths = { "~/.config/nvim/snips" } }) require("luasnip.loaders.from_lua").lazy_load({ paths = { "~/.config/nvim/snips" } })
require("luasnip.loaders.from_vscode").lazy_load({ paths = { "~/.config/Code - Insiders/User/snippets" } }) require("luasnip.loaders.from_vscode").lazy_load({ paths = { "~/.config/Code - Insiders/User/snippets" } })

View File

@@ -1,9 +0,0 @@
-- require("m_taskwarrior_d").setup()
--
-- vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost" }, {
-- group = vim.api.nvim_create_augroup("TWTask", { clear = true }),
-- pattern = "*.md",
-- callback = function()
-- vim.cmd("TWSyncTasks")
-- end,
-- })

View File

@@ -1,3 +1 @@
vim.opt.termguicolors = true
require("nvim-highlight-colors").setup({}) require("nvim-highlight-colors").setup({})

View File

@@ -28,9 +28,6 @@ require("lint").linters_by_ft = {
yaml = { "yamllint" }, yaml = { "yamllint" },
} }
-- TODO: Wouldn't it be possible / nice to only try to load the linters when they are
-- actually needed?
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, { vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
callback = function() callback = function()
require("lint").try_lint() require("lint").try_lint()

View File

@@ -1,16 +1,28 @@
vim.cmd([[ vim.g.tidal_default_config = { socket_name = "default", target_pane = "tidal:1.1" }
" Tidalcycles (sclang and vim-tidal) vim.g.tidal_no_mappings = 1
let g:tidal_default_config = {"socket_name": "default", "target_pane": "tidal:1.1"}
let g:tidal_no_mappings = 1
au FileType tidal nm <buffer> <leader>ep <Plug>TidalParagraphSend vim.api.nvim_create_autocmd("FileType", {
au FileType tidal nm <buffer> <leader>ee <Plug>TidalLineSend pattern = "tidal",
au FileType tidal nnoremap <buffer> <leader>h :TidalHush<cr> callback = function(e)
au FileType tidal com! -nargs=1 S :TidalSilence <args> local buf = e.buf
au FileType tidal com! -nargs=1 P :TidalPlay <args> vim.keymap.set("n", "<leader>ep", "<Plug>TidalParagraphSend", { buffer = buf, desc = "Tidal: send paragraph" })
au FileType tidal com! -nargs=0 H :TidalHush vim.keymap.set("n", "<leader>ee", "<Plug>TidalLineSend", { buffer = buf, desc = "Tidal: send line" })
vim.keymap.set("n", "<leader>h", ":TidalHush<cr>", { buffer = buf, desc = "Tidal: hush" })
vim.api.nvim_buf_create_user_command(buf, "S", "TidalSilence <args>", { nargs = 1 })
vim.api.nvim_buf_create_user_command(buf, "P", "TidalPlay <args>", { nargs = 1 })
vim.api.nvim_buf_create_user_command(buf, "H", "TidalHush", { nargs = 0 })
end,
})
" SuperCollider -- SuperCollider
au BufEnter,BufWinEnter,BufNewFile,BufRead *.sc,*.scd se filetype=supercollider vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter", "BufNewFile", "BufRead" }, {
au Filetype supercollider packadd scvim pattern = { "*.sc", "*.scd" },
]]) callback = function()
vim.bo.filetype = "supercollider"
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = "supercollider",
command = "packadd scvim",
})

View File

@@ -1,6 +1,8 @@
require("zk.utils")
vim.cmd([[ vim.cmd([[
" Change local buffer to directory of current file after the plugin has loaded " Change local buffer to directory of current file after the plugin has loaded
autocmd VimEnter * lcd %:p:h execute 'autocmd BufEnter' g:zk_path . '/*.md' 'silent lcd %:p:h'
" " Override wiki index mapping to also cd into the wiki " " Override wiki index mapping to also cd into the wiki
nm <leader>ww <plug>(wiki-index) nm <leader>ww <plug>(wiki-index)
@@ -11,11 +13,16 @@ nm <leader>ww <plug>(wiki-index)
" nm <leader>s <plug>(wiki-link-follow-split) " nm <leader>s <plug>(wiki-link-follow-split)
" nm <leader>v <plug>(wiki-link-follow-vsplit) " nm <leader>v <plug>(wiki-link-follow-vsplit)
autocmd BufEnter *.md if expand('%:t') =~ '_' | echo 'hierarchical relation' | endif function! ZKContextualEcho()
autocmd BufEnter *.md if expand('%:t') =~ '--' | echo 'relation' | endif let l:name = expand('%:t')
autocmd BufEnter *.md if expand('%:t') =~ '<>' | echo 'dichotomy' | endif if l:name =~ '_' | echo 'hierarchical relation'
autocmd BufEnter *.md if expand('%:t') =~ 'my-' | echo 'personal file' | endif elseif l:name =~ '--' | echo 'relation'
autocmd BufEnter *.md if expand('%:t') =~ 'project_' | echo 'project file' | endif elseif l:name =~ '<>' | echo 'dichotomy'
elseif l:name =~ 'my-' | echo 'personal file'
elseif l:name =~ 'project_' | echo 'project file'
endif
endfunction
execute 'autocmd BufEnter' g:zk_path . '/*.md' 'call ZKContextualEcho()'
" Only load wiki.vim for zk directory " Only load wiki.vim for zk directory
let g:wiki_index_name='index' let g:wiki_index_name='index'
@@ -76,7 +83,7 @@ let g:wiki_templates = [
" "
let g:wiki_filetypes=['md'] let g:wiki_filetypes=['md']
let g:wiki_root='~/.zk' let g:wiki_root=g:zk_path
let g:wiki_global_load=0 let g:wiki_global_load=0
let g:wiki_link_creation = { let g:wiki_link_creation = {
\ 'md': { \ 'md': {

View File

@@ -42,11 +42,11 @@
}, },
"nixCats": { "nixCats": {
"locked": { "locked": {
"lastModified": 1770584904, "lastModified": 1777273601,
"narHash": "sha256-9Zaz8lbKF2W9pwXZEnbiGsicHdBoU+dHt3Wv3mCJoZ8=", "narHash": "sha256-xBUa8Tl9V7IXI+VmLEuDc81La/EhoSn1C3EVSnJ3cfU=",
"owner": "BirdeeHub", "owner": "BirdeeHub",
"repo": "nixCats-nvim", "repo": "nixCats-nvim",
"rev": "538fdde784d2909700d97a8ef307783b33a86fb1", "rev": "f69ea013e328841a7def7037ed59788a76be8816",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -73,11 +73,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1770843696, "lastModified": 1777270315,
"narHash": "sha256-LovWTGDwXhkfCOmbgLVA10bvsi/P8eDDpRudgk68HA8=", "narHash": "sha256-yKB4G6cKsQsWN7M6rZGk6gkJPDNPIzT05y4qzRyCDlI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2343bbb58f99267223bc2aac4fc9ea301a155a16", "rev": "6368eda62c9775c38ef7f714b2555a741c20c72d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -106,11 +106,11 @@
"plugins-helm-ls-nvim": { "plugins-helm-ls-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1768584652, "lastModified": 1773934114,
"narHash": "sha256-jnMc87OjURNcqsva0npYgVyUrWc5C6L7yHpNvt9eSmg=", "narHash": "sha256-8trqFsA7nTKSdtkiAL0Sa9bXjh5ONtAqN7XNE/B8ukM=",
"owner": "qvalentin", "owner": "qvalentin",
"repo": "helm-ls.nvim", "repo": "helm-ls.nvim",
"rev": "f0b9a1723890971a6d84890b50dbf5f40974ea1b", "rev": "20df43509b02a3ce3c6b3eee254d6e2bffa9a370",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -45,13 +45,38 @@
inherit (nixCats) utils; inherit (nixCats) utils;
luaPath = ./.; luaPath = ./.;
forEachSystem = utils.eachSystem nixpkgs.lib.platforms.all; forEachSystem = utils.eachSystem nixpkgs.lib.platforms.all;
extra_pkg_config = { }; extra_pkg_config = {
allowUnfreePredicate =
pkg:
builtins.elem (nixpkgs.lib.getName pkg) [
"vim-sandwich"
"jupytext.nvim"
"eyeliner.nvim"
"context_filetype.vim"
"editorconfig-vim"
"unicode.vim"
"quarto-nvim"
"vim-openscad"
"lsp_lines.nvim"
"nvim-highlight-colors"
"nvim-lint"
];
};
mkDependencyOverlays = system: [ mkDependencyOverlays = system: [
(utils.standardPluginOverlay inputs) (utils.standardPluginOverlay inputs)
(_final: _prev: { (_final: _prev: {
mcp-hub = inputs.mcp-hub.packages.${system}.default; mcp-hub = inputs.mcp-hub.packages.${system}.default;
}) })
(_: prev: {
luajitPackages = prev.luajitPackages.overrideScope (
_: lprev: {
neotest = lprev.neotest.overrideAttrs (_: {
doCheck = false;
});
}
);
})
]; ];
categoryDefinitions = categoryDefinitions =
@@ -62,9 +87,11 @@
{ {
lspsAndRuntimeDeps = with pkgs; { lspsAndRuntimeDeps = with pkgs; {
general = [ general = [
nodejs_24
black black
clang clang
clang-tools clang-tools
curl # → plenary-nvim, mcp-hub
delta delta
emmet-language-server emmet-language-server
eslint_d eslint_d
@@ -78,8 +105,8 @@
mcp-hub mcp-hub
nixd nixd
nixfmt nixfmt
nodePackages.prettier prettier
nodePackages.typescript-language-server typescript-language-server
ormolu ormolu
prettierd prettierd
rust-analyzer rust-analyzer
@@ -88,6 +115,8 @@
stylelint stylelint
stylua stylua
tree-sitter tree-sitter
tailwindcss-language-server
typescript-language-server
vscode-langservers-extracted vscode-langservers-extracted
vtsls vtsls
yaml-language-server yaml-language-server

View File

@@ -1,15 +1,12 @@
local json_newline = function() local json_newline = function()
local line = vim.api.nvim_get_current_line() local line = vim.api.nvim_get_current_line()
if line == "" then if line == "" then
print("line is empty")
return "o" return "o"
elseif string.byte(line, -1) == string.byte(",") then elseif string.byte(line, -1) == string.byte(",") then
return "o" return "o"
elseif string.byte(line, -1) == string.byte("{") then elseif string.byte(line, -1) == string.byte("{") then
print("line ends with '{'")
return "o" return "o"
elseif string.byte(line, -1) == string.byte("}") then elseif string.byte(line, -1) == string.byte("}") then
print("line ends with '}'")
return "o" return "o"
else else
return "A,<CR>" return "A,<CR>"

View File

@@ -26,5 +26,4 @@ set lcs=trail:·,tab:→\ ,nbsp:␣ " Whitespace rendering
set ar " Autoread set ar " Autoread
set spellsuggest+=5 " Limit spell suggestions set spellsuggest+=5 " Limit spell suggestions
set wildignore+=*/node_modules/*,*/tmp/*,*.so,*.swp,*.zip set wildignore+=*/node_modules/*,*/tmp/*,*.so,*.swp,*.zip
" set thesaurus+=./thesaurus/mthesaur.txt " FIXME
]]) ]])

View File

@@ -9,5 +9,6 @@ vim.filetype.add({
["%.env.*"] = "dotenv", ["%.env.*"] = "dotenv",
["%.pl$"] = "prolog", ["%.pl$"] = "prolog",
[".*.containerfile.*"] = "dockerfile", [".*.containerfile.*"] = "dockerfile",
["%.hydra$"] = "javascript",
}, },
}) })

View File

@@ -1,60 +1,57 @@
vim.cmd([[ vim.g.mapleader = " "
" Leader keys vim.g.maplocalleader = ";"
let mapleader = " "
let maplocalleader = ";"
" Splits & navigation
nm s <c-w> " Split horizontal
nm ss :sp<CR><c-w>w| " Split horizontal
nm sv :vs<CR><c-w>w| " Split vertical
nm sw <c-w>w| " Navigate splits
nm sh <c-w>h| "
nm sj <c-w>j| "
nm sk <c-w>k| "
nm sl <c-w>l| "
nn sH <c-w>8<| " Resize splits
nn sJ <c-w>8-| "
nn sK <c-w>8+| "
nn sL <c-w>8>| "
nn s= <c-w>=| " Equalize splits
" Open
nn sb :Lex<cr>| " File tree
nn <leader><leader> :noh<cr> |"
nn <leader>t :term<cr>| " Open terminal
" Remaps
ino <nowait> jj <esc>| " Normal now
nn <left> <nop>| " Hard mode
nn <down> <nop>| " "
nn <up> <nop>| " "
nn <right> <nop>| " "
ino <left> <nop>| " "
ino <down> <nop>| " "
ino <up> <nop>| " "
ino <right> <nop>| " "
" Search
nn <c-_> :noh<cr>| " map 'ctrl + /'
" Line numbers
nn <leader>n :set nu! rnu!<cr>
" Vim configuration
nn <leader>ec :vs $MYVIMRC<cr>
nn <leader>so :so %<cr>
]])
local set = vim.keymap.set local set = vim.keymap.set
set("n", "<leader>cx", "<cmd>!chmod +x %<CR>", { silent = true, desc = "Run `chmod +x` on current file" }) -- splits & navigation
set("n", "yp", "<cmd>let @+ = expand('%r')<CR>:p<CR>", { silent = true, desc = "Yank path" }) set("n", "s", "<c-w>", { desc = "window prefix" })
set("n", "ss", ":sp<CR><c-w>w", { desc = "split horizontal" })
set("n", "sv", ":vs<CR><c-w>w", { desc = "split vertical" })
set("n", "sw", "<c-w>w", { desc = "navigate splits" })
set("n", "sh", "<c-w>h", { desc = "focus left split" })
set("n", "sj", "<c-w>j", { desc = "focus below split" })
set("n", "sk", "<c-w>k", { desc = "focus above split" })
set("n", "sl", "<c-w>l", { desc = "focus right split" })
set("n", "sH", "<c-w>8<", { desc = "shrink split left" })
set("n", "sJ", "<c-w>8-", { desc = "shrink split down" })
set("n", "sK", "<c-w>8+", { desc = "grow split up" })
set("n", "sL", "<c-w>8>", { desc = "grow split right" })
set("n", "s=", "<c-w>=", { desc = "equalize splits" })
-- Remap native NeoVim comment keymaps -- open
set({ "n", "x" }, "<leader>c", "gc", { remap = true, desc = "Toggle comment" }) set("n", "sb", ":Lex<cr>", { desc = "file tree" })
set("n", "<leader>cc", "gcc", { remap = true, desc = "Toggle comment line" }) set("n", "<leader><leader>", ":noh<cr>", { desc = "clear highlights" })
set("o", "<leader>c", "gc", { remap = true, desc = "Comment textobject" }) set("n", "<leader>t", ":term<cr>", { desc = "open terminal" })
-- Move lines -- remaps
set("v", "K", ": '<,'>move '<-2<cr>gv") set("i", "jj", "<esc>", { nowait = true, desc = "exit insert mode" })
set("v", "J", ": '<,'>move '>+1<cr>gv") set("n", "<left>", "<nop>")
set("n", "<down>", "<nop>")
set("n", "<up>", "<nop>")
set("n", "<right>", "<nop>")
set("i", "<left>", "<nop>")
set("i", "<down>", "<nop>")
set("i", "<up>", "<nop>")
set("i", "<right>", "<nop>")
-- search
set("n", "<c-_>", ":noh<cr>", { desc = "clear search highlight" })
-- line numbers
set("n", "<leader>n", ":set nu! rnu!<cr>", { desc = "toggle line numbers" })
-- vim configuration
set("n", "<leader>ec", ":vs $MYVIMRC<cr>", { desc = "edit vimrc" })
set("n", "<leader>so", ":so %<cr>", { desc = "source current file" })
set("n", "<leader>cx", "<cmd>!chmod +x %<CR>", { silent = true, desc = "run `chmod +x` on current file" })
set("n", "yp", "<cmd>let @+ = expand('%r')<CR>:p<CR>", { silent = true, desc = "yank path" })
-- remap native NeoVim comment keymaps
set({ "n", "x" }, "<leader>c", "gc", { remap = true, desc = "toggle comment" })
set("n", "<leader>cc", "gcc", { remap = true, desc = "toggle comment line" })
set("o", "<leader>c", "gc", { remap = true, desc = "comment textobject" })
-- move lines
set("v", "K", ": '<,'>move '<-2<cr>gv", { desc = "move selection up" })
set("v", "J", ": '<,'>move '>+1<cr>gv", { desc = "move selection down" })

View File

@@ -13,13 +13,19 @@ local function get_markdown_files(base)
return items return items
end end
function source:get_keyword_pattern()
return "[%w%./%-]*"
end
function source:complete(params, callback) function source:complete(params, callback)
local cursor_before_line = params.context.cursor_before_line local cursor_before_line = params.context.cursor_before_line
local cursor_after_line = params.context.cursor_after_line or "" local cursor_after_line = params.context.cursor_after_line or ""
local trigger = cursor_before_line:match("%[[^%]]*%]%(([^)]*)$") if not cursor_before_line:match("%[[^%]]*%]%(") then
callback({})
return
end
if trigger ~= nil then
local items = get_markdown_files(".") local items = get_markdown_files(".")
local next_char = cursor_after_line:sub(1, 1) local next_char = cursor_after_line:sub(1, 1)
@@ -32,9 +38,6 @@ function source:complete(params, callback)
end end
callback(items) callback(items)
else
callback({})
end
end end
function source:get_trigger_characters() function source:get_trigger_characters()

View File

@@ -1,9 +1,10 @@
require("zk.cmp") require("zk.cmp")
require("zk.utils")
vim.cmd([[ vim.cmd([[
let s:zk_preview_enabled = 0 let s:zk_preview_enabled = 0
let s:live_server_job = -1 let s:live_server_job = -1
au BufEnter /home/h/.zk/*.md silent exe '!echo "%" > /home/h/.zk/current-zettel.txt' execute 'au BufEnter' g:zk_path . '/*.md' 'silent exe "!echo %" ">" g:zk_path . "/current-zettel.txt"'
function! ToggleZKPreview() function! ToggleZKPreview()
if s:zk_preview_enabled == 1 if s:zk_preview_enabled == 1
let s:zk_preview_enabled = 0 let s:zk_preview_enabled = 0
@@ -11,10 +12,10 @@ function! ToggleZKPreview()
au! ZKPreview au! ZKPreview
else else
let s:zk_preview_enabled = 1 let s:zk_preview_enabled = 1
let s:live_server_job = jobstart('live-server --watch=/home/h/.zk/current-zettel-content.html --open=current-zettel-content.html --port=8080') let s:live_server_job = jobstart('live-server --watch=' . g:zk_path . '/current-zettel-content.html --open=current-zettel-content.html --port=8080')
augroup ZKPreview augroup ZKPreview
au BufEnter /home/h/.zk/*.md silent exe '!cat "%:r.html" > /home/h/.zk/current-zettel-content.html' execute 'au BufEnter' g:zk_path . '/*.md' 'silent exe "!cat %:r.html" ">" g:zk_path . "/current-zettel-content.html"'
au BufWritePost /home/h/.zk/*.md silent exe '!make && cat "%:r.html" > /home/h/.zk/current-zettel-content.html' execute 'au BufWritePost' g:zk_path . '/*.md' 'silent exe "!make && cat %:r.html" ">" g:zk_path . "/current-zettel-content.html"'
augroup END augroup END
endif endif
endfunction endfunction

View File

@@ -0,0 +1,2 @@
vim.g.zk_path = os.getenv("ZK_PATH") or (os.getenv("HOME") .. "/.zk")
return vim.g.zk_path

View File

@@ -17,7 +17,7 @@ local LOCALHOST_IP = "127.0.0.1"
return { return {
s({ trig = "fn", desc = "Filename" }, { f(TM_FILENAME_BASE) }), s({ trig = "fn", desc = "Filename" }, { f(TM_FILENAME_BASE) }),
s({ trig = "fne", dscr = "Filename (+extension)" }, { f(TM_FILENAME) }), s({ trig = "fne", desc = "Filename (+extension)" }, { f(TM_FILENAME) }),
s({ trig = "hm" }, { t(NAME) }), s({ trig = "hm" }, { t(NAME) }),
s({ trig = "loho" }, { t(LOCALHOST) }), s({ trig = "loho" }, { t(LOCALHOST) }),
s({ trig = "lohoi" }, { t(LOCALHOST_IP) }), s({ trig = "lohoi" }, { t(LOCALHOST_IP) }),

View File

@@ -5,112 +5,112 @@ local i = ls.insert_node
return { return {
-- Flex -- Flex
s({ trig = "b1", dscr = "Add 'border: 1px <color>;'" }, { s({ trig = "b1", desc = "Add 'border: 1px <color>;'" }, {
t("border: 1px solid "), t("border: 1px solid "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "dfl", dscr = "Add 'display: flex;'" }, { s({ trig = "dfl", desc = "Add 'display: flex;'" }, {
t("display: flex;"), t("display: flex;"),
i(0), i(0),
}), }),
s({ trig = "flr", dscr = "Add 'flex-direction: row;'" }, { s({ trig = "flr", desc = "Add 'flex-direction: row;'" }, {
t("flex-direction: row;"), t("flex-direction: row;"),
i(0), i(0),
}), }),
s({ trig = "flc", dscr = "Add 'flex-direction: column;'" }, { s({ trig = "flc", desc = "Add 'flex-direction: column;'" }, {
t("flex-direction: column;"), t("flex-direction: column;"),
i(0), i(0),
}), }),
s({ trig = "flw", dscr = "Add 'flex-wrap: wrap;'" }, { s({ trig = "flw", desc = "Add 'flex-wrap: wrap;'" }, {
t("flex-wrap: wrap;"), t("flex-wrap: wrap;"),
i(0), i(0),
}), }),
s({ trig = "dfc", dscr = "Add 'flex-direction: column;'" }, { s({ trig = "dfc", desc = "Add 'flex-direction: column;'" }, {
t("display: flex;"), t("display: flex;"),
t("flex-direction: column;"), t("flex-direction: column;"),
i(0), i(0),
}), }),
-- Grid -- Grid
s({ trig = "dg", dscr = "Add 'display: grid;'" }, { s({ trig = "dg", desc = "Add 'display: grid;'" }, {
t("display: grid;"), t("display: grid;"),
i(0), i(0),
}), }),
-- Block -- Block
s({ trig = "db", dscr = "Add 'display: block;'" }, { s({ trig = "db", desc = "Add 'display: block;'" }, {
t("display: block;"), t("display: block;"),
i(0), i(0),
}), }),
-- None -- None
s({ trig = "dn", dscr = "Add 'display: none;'" }, { s({ trig = "dn", desc = "Add 'display: none;'" }, {
t("display: none;"), t("display: none;"),
i(0), i(0),
}), }),
-- CSS Variables -- CSS Variables
s({ trig = "v", dscr = "Add CSS variable" }, { s({ trig = "v", desc = "Add CSS variable" }, {
t("var(--"), t("var(--"),
i(1), i(1),
t(")"), t(")"),
i(0), i(0),
}), }),
-- Margin -- Margin
s({ trig = "m", dscr = "Add 'margin: ;'" }, { s({ trig = "m", desc = "Add 'margin: ;'" }, {
t("margin: "), t("margin: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "mt", dscr = "Add 'margin-top: ;'" }, { s({ trig = "mt", desc = "Add 'margin-top: ;'" }, {
t("margin-top: "), t("margin-top: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "mr", dscr = "Add 'margin-right: ;'" }, { s({ trig = "mr", desc = "Add 'margin-right: ;'" }, {
t("margin-right: "), t("margin-right: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "mb", dscr = "Add 'margin-bottom: ;'" }, { s({ trig = "mb", desc = "Add 'margin-bottom: ;'" }, {
t("margin-bottom: "), t("margin-bottom: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "ml", dscr = "Add 'margin-left: ;'" }, { s({ trig = "ml", desc = "Add 'margin-left: ;'" }, {
t("margin-left: "), t("margin-left: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
-- Padding -- Padding
s({ trig = "p", dscr = "Add 'padding: ;'" }, { s({ trig = "p", desc = "Add 'padding: ;'" }, {
t("padding: "), t("padding: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "pt", dscr = "Add 'padding-top: ;'" }, { s({ trig = "pt", desc = "Add 'padding-top: ;'" }, {
t("padding-top: "), t("padding-top: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "pr", dscr = "Add 'padding-right: ;'" }, { s({ trig = "pr", desc = "Add 'padding-right: ;'" }, {
t("padding-right: "), t("padding-right: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "pb", dscr = "Add 'padding-bottom: ;'" }, { s({ trig = "pb", desc = "Add 'padding-bottom: ;'" }, {
t("padding-bottom: "), t("padding-bottom: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "pl", dscr = "Add 'padding-left: ;'" }, { s({ trig = "pl", desc = "Add 'padding-left: ;'" }, {
t("padding-left: "), t("padding-left: "),
i(1), i(1),
t(";"), t(";"),

View File

@@ -4,19 +4,19 @@ local t = ls.text_node
local i = ls.insert_node local i = ls.insert_node
return { return {
s({ trig = "clg", dscr = "console.log" }, { s({ trig = "clg", desc = "console.log" }, {
t("console.log("), t("console.log("),
i(1), i(1),
t(")"), t(")"),
i(0), i(0),
}), }),
s({ trig = "Js", dscr = "JSON.stringify" }, { s({ trig = "Js", desc = "JSON.stringify" }, {
t("JSON.stringify("), t("JSON.stringify("),
i(1), i(1),
t(")"), t(")"),
i(0), i(0),
}), }),
s({ trig = "Jsf", dscr = "JSON.stringify (formatted)" }, { s({ trig = "Jsf", desc = "JSON.stringify (formatted)" }, {
t("JSON.stringify("), t("JSON.stringify("),
i(1), i(1),
t(", 0, 2)"), t(", 0, 2)"),

View File

@@ -915,21 +915,21 @@ end
return { return {
s( s(
{ trig = "^h", regTrig = true, dscr = "Markdown header" }, { trig = "^h", regTrig = true, desc = "Markdown header" },
fmta("# <><>", { fmta("# <><>", {
d(1, get_visual), d(1, get_visual),
i(0), i(0),
}) })
), ),
s( s(
{ trig = "^sec", regTrig = true, dscr = "Markdown header" }, { trig = "^sec", regTrig = true, desc = "Markdown header" },
fmta("## <><>", { fmta("## <><>", {
d(1, get_visual), d(1, get_visual),
i(0), i(0),
}) })
), ),
s( s(
{ trig = "^ssec", regTrig = true, dscr = "Markdown header" }, { trig = "^ssec", regTrig = true, desc = "Markdown header" },
fmta("### <><>", { fmta("### <><>", {
d(1, get_visual), d(1, get_visual),
i(0), i(0),

View File

@@ -1,11 +1,5 @@
local cmd = vim.cmd
local map = vim.keymap.set local map = vim.keymap.set
cmd([[
source ~/.vim/init/base.vim
source ~/.vim/init/mappings.vim
]])
require("keymaps") require("keymaps")
map({ "n", "v" }, "<leader>p", '<cmd>call VSCodeNotify("workbench.action.quickOpen")<cr>') map({ "n", "v" }, "<leader>p", '<cmd>call VSCodeNotify("workbench.action.quickOpen")<cr>')

View File

@@ -1 +0,0 @@
set -g status-style bg=colour12,fg=colour0

View File

@@ -70,8 +70,6 @@ set -g status-right '#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") %a %l:%M:%S
set -g default-terminal "tmux-256color" set -g default-terminal "tmux-256color"
set-hook -g after-new-session 'if -F "#{==:#{session_name},ssh}" "source ${XDG_CONFIG_HOME}/tmux/hooks/tmux.ssh.conf" "source ${XDG_CONFIG_HOME}/tmux/hooks/tmux.regular.conf"'
# Vi copypaste mode # Vi copypaste mode
if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 4 \)'" 'bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel' if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 4 \)'" 'bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel'
if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 4\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'bind-key -t vi-copy v begin-selection; bind-key -t vi-copy y copy-selection' if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 4\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'bind-key -t vi-copy v begin-selection; bind-key -t vi-copy y copy-selection'

View File

@@ -1,29 +0,0 @@
#!/usr/bin/env python3
import sys
import json
SLOTS_FILE = "/home/h/.local/share/task/add_slots"
def get_slots():
try:
with open(SLOTS_FILE, "r") as f:
return int(f.read().strip())
except:
return 0
slots = get_slots()
if slots <= 0:
print(f"Cannot add task: No slots available (0/{slots}).")
print("Delete or complete a task first to earn an add slot.")
sys.exit(1)
with open(SLOTS_FILE, "w") as f:
f.write(str(slots - 1))
print(f"Task added. Slots remaining: {slots - 1}")
for line in sys.stdin:
task = json.loads(line)
print(json.dumps(task))
sys.exit(0)

View File

@@ -1,34 +0,0 @@
#!/usr/bin/env python3
import sys
import json
SLOTS_FILE = "/home/h/.local/share/task/add_slots"
def get_slots():
try:
with open(SLOTS_FILE, "r") as f:
return int(f.read().strip())
except:
return 0
data = sys.stdin.read().strip().split("\n")
if len(data) < 2:
for line in data:
if line:
print(line)
sys.exit(0)
old_task = json.loads(data[0])
new_task = json.loads(data[1])
was_pending = old_task.get("status") == "pending"
is_not_pending = new_task.get("status") in ("completed", "deleted")
if was_pending and is_not_pending:
slots = get_slots() + 1
with open(SLOTS_FILE, "w") as f:
f.write(str(slots))
print(f"Slot earned! Total slots: {slots}")
print(json.dumps(new_task))
sys.exit(0)

128
flake.lock generated
View File

@@ -38,11 +38,11 @@
"base16-helix": { "base16-helix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1760703920, "lastModified": 1776754714,
"narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=", "narHash": "sha256-E3OAK27smtATTmX45uoTSRsVD+Y+ZiVVfgM/tjpbtYg=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "base16-helix", "repo": "base16-helix",
"rev": "d646af9b7d14bff08824538164af99d0c521b185", "rev": "4d508123037e7851ad36ebf7d9c48b0e9e1eb581",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -121,11 +121,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1773115390, "lastModified": 1778040175,
"narHash": "sha256-nl1kcyM1locj//JnzC43hZIjY4z5opcTPqv1RnMZqPU=", "narHash": "sha256-SSXJp3BMjO2LrW/VLjNdGGcjd3RFEyV4FemYA6OGrYw=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "aecb1fc3e18c3cdcbdd96485b392ffa4584467e8", "rev": "3bd76b0f41e65661866bddcac57ebe83aeadb581",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -138,11 +138,11 @@
"firefox-gnome-theme": { "firefox-gnome-theme": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1764873433, "lastModified": 1776136500,
"narHash": "sha256-1XPewtGMi+9wN9Ispoluxunw/RwozuTRVuuQOmxzt+A=", "narHash": "sha256-r0gN2brVWA351zwMV0Flmlcd6SGMvYqFbvC3DfKFM8Y=",
"owner": "rafaelmardojai", "owner": "rafaelmardojai",
"repo": "firefox-gnome-theme", "repo": "firefox-gnome-theme",
"rev": "f7ffd917ac0d253dbd6a3bf3da06888f57c69f92", "rev": "0f8ba203d475587f477e7ae12661bd8459e225b7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -213,11 +213,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1767609335, "lastModified": 1775087534,
"narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=", "narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "250481aafeb741edfe23d29195671c19b36b6dca", "rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -284,11 +284,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772893680, "lastModified": 1776796298,
"narHash": "sha256-JDqZMgxUTCq85ObSaFw0HhE+lvdOre1lx9iI6vYyOEs=", "narHash": "sha256-PcRvlWayisPSjd0UcRQbhG8Oqw78AcPE6x872cPRHN8=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "8baab586afc9c9b57645a734c820e4ac0a604af9", "rev": "3cfd774b0a530725a077e17354fbdb87ea1c4aad",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -321,20 +321,18 @@
"gnome-shell": { "gnome-shell": {
"flake": false, "flake": false,
"locked": { "locked": {
"host": "gitlab.gnome.org",
"lastModified": 1767737596, "lastModified": 1767737596,
"narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=", "narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=",
"owner": "GNOME", "owner": "GNOME",
"repo": "gnome-shell", "repo": "gnome-shell",
"rev": "ef02db02bf0ff342734d525b5767814770d85b49", "rev": "ef02db02bf0ff342734d525b5767814770d85b49",
"type": "gitlab" "type": "github"
}, },
"original": { "original": {
"host": "gitlab.gnome.org",
"owner": "GNOME", "owner": "GNOME",
"ref": "gnome-49",
"repo": "gnome-shell", "repo": "gnome-shell",
"type": "gitlab" "rev": "ef02db02bf0ff342734d525b5767814770d85b49",
"type": "github"
} }
}, },
"home-manager": { "home-manager": {
@@ -344,11 +342,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773093840, "lastModified": 1778009629,
"narHash": "sha256-u/96NoAyN8BSRuM3ZimGf7vyYgXa3pLx4MYWjokuoH4=", "narHash": "sha256-nUoQtf4Zq7DRYJrfv904hjrxjAlWVP6a1pNNFKx3FCg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "bb014746edb2a98d975abde4dd40fa240de4cf86", "rev": "00ed86e58bb6979a7921859fd1615d19382eac5c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -400,10 +398,10 @@
"nix-secrets": { "nix-secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1770135527, "lastModified": 1776723456,
"narHash": "sha256-Fup9LiyL6bDID3x+rAB2nP99Xv2o9Is5NkTDbmIy6o0=", "narHash": "sha256-GBbbm05oXYqSZ2EgxQPsNpTKl16wNhvrlUxdmv0FbSU=",
"ref": "main", "ref": "main",
"rev": "521d144f8a8ff9fca8ccf492d7fbdd05d9a5fe37", "rev": "135b681d24af6ee4508bbf7c657982d7be8743d4",
"shallow": true, "shallow": true,
"type": "git", "type": "git",
"url": "ssh://git@github.com/hektor/nix-secrets" "url": "ssh://git@github.com/hektor/nix-secrets"
@@ -417,11 +415,11 @@
}, },
"nixCats": { "nixCats": {
"locked": { "locked": {
"lastModified": 1770584904, "lastModified": 1777273601,
"narHash": "sha256-9Zaz8lbKF2W9pwXZEnbiGsicHdBoU+dHt3Wv3mCJoZ8=", "narHash": "sha256-xBUa8Tl9V7IXI+VmLEuDc81La/EhoSn1C3EVSnJ3cfU=",
"owner": "BirdeeHub", "owner": "BirdeeHub",
"repo": "nixCats-nvim", "repo": "nixCats-nvim",
"rev": "538fdde784d2909700d97a8ef307783b33a86fb1", "rev": "f69ea013e328841a7def7037ed59788a76be8816",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -453,11 +451,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1772972630, "lastModified": 1777917524,
"narHash": "sha256-mUJxsNOrBMNOUJzN0pfdVJ1r2pxeqm9gI/yIKXzVVbk=", "narHash": "sha256-k+LVe9YaO2BEPB9AaCtTtOMCeGi4dxDo6gt4Un3qoPY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "3966ce987e1a9a164205ac8259a5fe8a64528f72", "rev": "df7783100babf59001340a7a874ba3824e441ecb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -469,11 +467,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1772963539, "lastModified": 1777954456,
"narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=", "narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9dcb002ca1690658be4a04645215baea8b95f31d", "rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -511,11 +509,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1767810917, "lastModified": 1777598946,
"narHash": "sha256-ZKqhk772+v/bujjhla9VABwcvz+hB2IaRyeLT6CFnT0=", "narHash": "sha256-X239dAGaU1+gfDj8jKH8GzlqKMcxaVfXOio+uzBOkeE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "dead29c804adc928d3a69dfe7f9f12d0eec1f1a4", "rev": "5d55af01c0f86be583931fe99207fc56c14134b3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -567,11 +565,11 @@
"plugins-helm-ls-nvim": { "plugins-helm-ls-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1768584652, "lastModified": 1773934114,
"narHash": "sha256-jnMc87OjURNcqsva0npYgVyUrWc5C6L7yHpNvt9eSmg=", "narHash": "sha256-8trqFsA7nTKSdtkiAL0Sa9bXjh5ONtAqN7XNE/B8ukM=",
"owner": "qvalentin", "owner": "qvalentin",
"repo": "helm-ls.nvim", "repo": "helm-ls.nvim",
"rev": "f0b9a1723890971a6d84890b50dbf5f40974ea1b", "rev": "20df43509b02a3ce3c6b3eee254d6e2bffa9a370",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -667,11 +665,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773096132, "lastModified": 1777944972,
"narHash": "sha256-M3zEnq9OElB7zqc+mjgPlByPm1O5t2fbUrH3t/Hm5Ag=", "narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "d1ff3b1034d5bab5d7d8086a7803c5a5968cd784", "rev": "c591bf665727040c6cc5cb409079acb22dcce33c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -710,18 +708,17 @@
], ],
"nur": "nur", "nur": "nur",
"systems": "systems_2", "systems": "systems_2",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes", "tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux", "tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1772296853, "lastModified": 1777835090,
"narHash": "sha256-pAtzPsgHRKw/2Kv8HgAjSJg450FDldHPWsP3AKG/Xj0=", "narHash": "sha256-VLH8zPweblCOvpnQXp4fVs7f6Q79YhXF5XFKlOrvIFk=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "c4b8e80a1020e09a1f081ad0f98ce804a6e85acf", "rev": "7989a1054b01153212dede6005abfd1576b8328c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -760,23 +757,6 @@
"type": "github" "type": "github"
} }
}, },
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1726913040,
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
}
},
"tinted-kitty": { "tinted-kitty": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -796,11 +776,11 @@
"tinted-schemes": { "tinted-schemes": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1767710407, "lastModified": 1777041405,
"narHash": "sha256-+W1EB79Jl0/gm4JqmO0Nuc5C7hRdp4vfsV/VdzI+des=", "narHash": "sha256-BAGZ7ObFV/9Z61OJZun7ifPyhkuHqNuW1QIhQ8LuzCo=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "schemes", "repo": "schemes",
"rev": "2800e2b8ac90f678d7e4acebe4fa253f602e05b2", "rev": "5f868b3a338b6904c47f3833b9c411be641983a8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -812,11 +792,11 @@
"tinted-tmux": { "tinted-tmux": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1767489635, "lastModified": 1777169200,
"narHash": "sha256-e6nnFnWXKBCJjCv4QG4bbcouJ6y3yeT70V9MofL32lU=", "narHash": "sha256-h7dDbIzP5hDr9v97w9PL6jdAgXawmj6krcH+959rqpU=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "tinted-tmux", "repo": "tinted-tmux",
"rev": "3c32729ccae99be44fe8a125d20be06f8d7d8184", "rev": "f798c2dce44ef815bb6b8f05a82135c7942d35ac",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -828,11 +808,11 @@
"tinted-zed": { "tinted-zed": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1767488740, "lastModified": 1777463218,
"narHash": "sha256-wVOj0qyil8m+ouSsVZcNjl5ZR+1GdOOAooAatQXHbuU=", "narHash": "sha256-Bhkozqtq3BKLqWTlmKm8uAptfX4aRGI8QX3eEL54Vpc=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "base16-zed", "repo": "base16-zed",
"rev": "11abb0b282ad3786a2aae088d3a01c60916f2e40", "rev": "5768d08ed2e7944a26a958868cdb073cb8856dae",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -60,8 +60,8 @@
let let
inherit (self) outputs; inherit (self) outputs;
inherit (inputs.nixpkgs) lib; inherit (inputs.nixpkgs) lib;
utils = import ./utils { inherit lib; }; myUtils = import ./utils { inherit lib; };
hostDirNames = utils.dirNames ./hosts; hostDirNames = myUtils.dirNames ./hosts;
system = "x86_64-linux"; system = "x86_64-linux";
dotsPath = ./dots; dotsPath = ./dots;
gitHooks = import ./git-hooks.nix { gitHooks = import ./git-hooks.nix {
@@ -70,19 +70,24 @@
}; };
in in
{ {
nix.nixPath = [
"nixpkgs=${inputs.nixpkgs}"
]; # <https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md>
nixosConfigurations = nixosConfigurations =
(lib.genAttrs hostDirNames ( (lib.genAttrs hostDirNames (
host: host:
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
modules = [ modules = [
./hosts/${host} ./hosts/${host}
{ nixpkgs.hostPlatform = import ./hosts/${host}/system.nix; } {
nixpkgs.hostPlatform = (myUtils.hostMeta ./hosts/${host}).system;
host.name = host;
}
]; ];
specialArgs = { specialArgs = {
inherit inputs outputs dotsPath; inherit
inputs
outputs
dotsPath
myUtils
;
}; };
} }
)) ))
@@ -97,7 +102,12 @@
} }
]; ];
specialArgs = { specialArgs = {
inherit inputs outputs dotsPath; inherit
inputs
outputs
dotsPath
myUtils
;
}; };
}; };
sd-image-raspberry-pi-aarch64 = nixpkgs.lib.nixosSystem { sd-image-raspberry-pi-aarch64 = nixpkgs.lib.nixosSystem {
@@ -110,7 +120,12 @@
} }
]; ];
specialArgs = { specialArgs = {
inherit inputs outputs dotsPath; inherit
inputs
outputs
dotsPath
myUtils
;
}; };
}; };
}; };
@@ -123,7 +138,12 @@
}; };
modules = [ ./home/hosts/work ]; modules = [ ./home/hosts/work ];
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs outputs dotsPath; inherit
inputs
outputs
dotsPath
myUtils
;
}; };
}; };
}; };

View File

@@ -5,9 +5,6 @@
... ...
}: }:
let
username = "h";
in
{ {
imports = [ imports = [
../../modules ../../modules
@@ -19,6 +16,7 @@ in
../../modules/cloud ../../modules/cloud
../../modules/comms ../../modules/comms
../../modules/desktop/niri ../../modules/desktop/niri
../../modules/devenv
../../modules/direnv ../../modules/direnv
../../modules/git ../../modules/git
../../modules/k8s/k9s.nix ../../modules/k8s/k9s.nix
@@ -27,28 +25,40 @@ in
../../modules/nvim ../../modules/nvim
../../modules/pandoc ../../modules/pandoc
../../modules/photography ../../modules/photography
../../modules/secrets
../../modules/shell ../../modules/shell
../../modules/ssh ../../modules/ssh
../../modules/taskwarrior ../../modules/taskwarrior
../../modules/terminal ../../modules/terminal
../../modules/zk
../../modules/torrenting
]; ];
home = { home = {
stateVersion = "25.05"; stateVersion = "25.05";
inherit username; inherit (config.host) username;
homeDirectory = "/home/${username}"; homeDirectory = "/home/${config.host.username}";
}; };
xdg.userDirs.createDirectories = false; xdg.userDirs.createDirectories = false;
xdg.userDirs.download = "${config.home.homeDirectory}/dl"; xdg.userDirs.download = "${config.home.homeDirectory}/dl";
ai-tools.opencode.enable = true; modules."3d" = {
printing.enable = true;
modeling.enable = true;
};
ai-tools = {
claude-code.enable = true;
opencode.enable = true;
};
browser.primary = "librewolf"; browser.primary = "librewolf";
cloud.hetzner.enable = true; cloud.hetzner.enable = true;
comms.signal.enable = true; comms.signal.enable = true;
github.enable = true; git.github.enable = true;
shell.bash.aliases.lang-js = true; shell.bash.aliases.lang-js = true;
shell.bash.addBinToPath = true; shell.bash.addBinToPath = true;
torrenting.enable = true;
zk.enable = true;
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;

View File

@@ -4,12 +4,10 @@
... ...
}: }:
let
username = "h";
in
{ {
imports = [ imports = [
../../modules ../../modules
../../modules/3d
../../modules/ai-tools ../../modules/ai-tools
../../modules/anki ../../modules/anki
../../modules/audio ../../modules/audio
@@ -17,6 +15,7 @@ in
../../modules/cloud ../../modules/cloud
../../modules/comms ../../modules/comms
../../modules/desktop/niri ../../modules/desktop/niri
../../modules/devenv
../../modules/direnv ../../modules/direnv
../../modules/git ../../modules/git
../../modules/k8s/k9s.nix ../../modules/k8s/k9s.nix
@@ -25,6 +24,7 @@ in
../../modules/nfc ../../modules/nfc
../../modules/nvim ../../modules/nvim
../../modules/pandoc ../../modules/pandoc
../../modules/secrets
../../modules/shell ../../modules/shell
../../modules/ssh ../../modules/ssh
../../modules/taskwarrior ../../modules/taskwarrior
@@ -33,18 +33,24 @@ in
home = { home = {
stateVersion = "25.05"; stateVersion = "25.05";
inherit username; inherit (config.host) username;
homeDirectory = "/home/${username}"; homeDirectory = "/home/${config.host.username}";
}; };
xdg.userDirs.createDirectories = false; xdg.userDirs = {
xdg.userDirs.download = "${config.home.homeDirectory}/dl"; enable = false;
createDirectories = false;
};
ai-tools.opencode.enable = true; modules."3d".printing.enable = true;
ai-tools = {
claude-code.enable = true;
opencode.enable = true;
};
browser.primary = "librewolf"; browser.primary = "librewolf";
cloud.hetzner.enable = true; cloud.hetzner.enable = true;
comms.signal.enable = true; comms.signal.enable = true;
github.enable = true; git.github.enable = true;
shell.bash.aliases.lang-js = true; shell.bash.aliases.lang-js = true;
shell.bash.addBinToPath = true; shell.bash.addBinToPath = true;

View File

@@ -5,15 +5,12 @@
... ...
}: }:
let
username = "hektor";
in
{ {
imports = [ imports = [
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
../../modules ../../modules
../../modules/ai-tools ../../modules/ai-tools
../../modules/anki.nix ../../modules/anki
../../modules/browser ../../modules/browser
../../modules/bruno ../../modules/bruno
../../modules/cloud ../../modules/cloud
@@ -21,6 +18,7 @@ in
../../modules/database ../../modules/database
../../modules/dconf ../../modules/dconf
../../modules/desktop/niri ../../modules/desktop/niri
../../modules/devenv
../../modules/direnv ../../modules/direnv
../../modules/docker ../../modules/docker
../../modules/git ../../modules/git
@@ -29,63 +27,35 @@ in
../../modules/k8s ../../modules/k8s
../../modules/k8s/k9s.nix ../../modules/k8s/k9s.nix
../../modules/keepassxc ../../modules/keepassxc
../../modules/kitty.nix
../../modules/music ../../modules/music
../../modules/nodejs.nix ../../modules/nodejs
../../modules/nvim ../../modules/nvim
../../modules/pandoc ../../modules/pandoc
../../modules/secrets ../../modules/secrets
../../modules/shell ../../modules/shell
../../modules/stylix ../../modules/stylix
../../modules/taskwarrior ../../modules/taskwarrior
../../modules/ticketing
../../modules/terminal ../../modules/terminal
../../modules/vscode.nix ../../modules/vscode
]; ];
sops = { sops.age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
defaultSopsFile = "${inputs.nix-secrets}/secrets.yaml";
secrets = {
taskwarrior_sync_server_url = { };
taskwarrior_sync_server_client_id = { };
taskwarrior_sync_encryption_secret = { };
anki_sync_user = { };
anki_sync_key = { };
opencode_api_key = { };
};
templates = {
"taskrc.d/sync" = {
content = ''
sync.server.url=${config.sops.placeholder.taskwarrior_sync_server_url}
sync.server.client_id=${config.sops.placeholder.taskwarrior_sync_server_client_id}
sync.encryption_secret=${config.sops.placeholder.taskwarrior_sync_encryption_secret}
'';
};
"opencode/auth.json" = {
path = "${config.home.homeDirectory}/.local/share/opencode/auth.json";
content = ''
{
"zai-coding-plan": {
"type": "api",
"key": "${config.sops.placeholder.opencode_api_key}"
}
}
'';
};
};
};
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
xdg.systemDirs.config = [ "/etc/xdg" ]; xdg = {
systemDirs.config = [ "/etc/xdg" ];
userDirs = {
createDirectories = false;
download = "${config.home.homeDirectory}/dl";
};
};
home = { home = {
stateVersion = "25.05"; stateVersion = "25.05";
inherit username; username = "hektor";
homeDirectory = "/home/${username}"; homeDirectory = "/home/${config.home.username}";
}; };
targets.genericLinux.nixGL = { targets.genericLinux.nixGL = {
@@ -100,12 +70,16 @@ in
comms.teams.enable = true; comms.teams.enable = true;
ai-tools = { ai-tools = {
claude-code.enable = true; claude-code.enable = true;
tirith.enable = true;
opencode.enable = true; opencode.enable = true;
}; };
database.mssql.enable = true; database = {
database.postgresql.enable = true; mssql.enable = true;
github.enable = true; postgresql.enable = true;
gitlab.enable = true; redis.enable = true;
};
git.github.enable = true;
git.gitlab.enable = true;
secrets.vault.enable = true; secrets.vault.enable = true;
programs = { programs = {

View File

@@ -1,11 +1,32 @@
{ pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}:
let
cfg = config.modules."3d";
in
{
options.modules."3d" = {
printing.enable = lib.mkEnableOption "3D printing tools";
modeling.enable = lib.mkEnableOption "3D modeling tools";
};
config = lib.mkMerge [
(lib.mkIf cfg.printing.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
bambu-studio bambu-studio
orca-slicer
];
})
(lib.mkIf cfg.modeling.enable {
home.packages = with pkgs; [
blender blender
openscad-lsp openscad-lsp
openscad-unstable openscad-unstable
orca-slicer ];
})
]; ];
} }

View File

@@ -0,0 +1,60 @@
{
lib,
config,
pkgs,
...
}:
let
cfg = config.ai-tools.claude-code;
rtk-version = "0.18.1";
in
{
options.ai-tools.claude-code.enable = lib.mkEnableOption "claude code with rtk and ccline";
config = lib.mkIf cfg.enable {
programs.claude-code.enable = true;
home.packages = with pkgs; [
(stdenv.mkDerivation {
name = "ccline";
src = fetchurl {
url = "https://github.com/Haleclipse/CCometixLine/releases/download/v1.0.8/ccline-linux-x64.tar.gz";
hash = "sha256-Joe3Dd6uSMGi66QT6xr2oY/Tz8rA5RuKa6ckBVJIzI0=";
};
unpackPhase = "tar xzf $src";
installPhase = ''
mkdir -p $out/bin
cp ccline $out/bin/
chmod +x $out/bin/ccline
'';
meta = {
description = "CCometixLine Linux x64 CLI (Claude Code statusline)";
homepage = "https://github.com/Haleclipse/CCometixLine";
license = lib.licenses.mit;
platforms = [ "x86_64-linux" ];
};
})
(stdenv.mkDerivation {
name = "rtk-${rtk-version}";
version = rtk-version;
src = fetchurl {
url = "https://github.com/rtk-ai/rtk/releases/download/v${rtk-version}/rtk-x86_64-unknown-linux-gnu.tar.gz";
hash = "sha256-XoTia5K8b00OzcKYCufwx8ApkAS31DxUCpGSU0jFs2Q=";
};
unpackPhase = "tar xzf $src";
installPhase = ''
mkdir -p $out/bin
cp rtk $out/bin/
chmod +x $out/bin/rtk
'';
meta = {
description = "RTK - AI coding tool enhancer";
homepage = "https://www.rtk-ai.app";
license = lib.licenses.mit;
platforms = [ "x86_64-linux" ];
};
})
mcp-nixos
];
};
}

View File

@@ -1,89 +1,8 @@
{ {
lib, imports = [
config, ./claude-code.nix
pkgs, ./opencode.nix
... ./skills.nix
}: ./tirith.nix
let
cfg = config.ai-tools;
rtk-version = "0.18.1";
in
{
options.ai-tools = {
claude-code.enable = lib.mkEnableOption "claude code with rtk and ccline";
opencode.enable = lib.mkEnableOption "opencode";
};
config = lib.mkMerge [
(lib.mkIf cfg.claude-code.enable {
home.packages = with pkgs; [
claude-code
(pkgs.stdenv.mkDerivation {
name = "ccline";
src = pkgs.fetchurl {
url = "https://github.com/Haleclipse/CCometixLine/releases/download/v1.0.8/ccline-linux-x64.tar.gz";
hash = "sha256-Joe3Dd6uSMGi66QT6xr2oY/Tz8rA5RuKa6ckBVJIzI0=";
};
unpackPhase = ''
tar xzf $src
'';
installPhase = ''
mkdir -p $out/bin
cp ccline $out/bin/
chmod +x $out/bin/ccline
'';
meta = with pkgs.lib; {
description = "CCometixLine Linux x64 CLI (Claude Code statusline)";
homepage = "https://github.com/Haleclipse/CCometixLine";
license = licenses.mit;
platforms = [ "x86_64-linux" ];
};
})
(pkgs.stdenv.mkDerivation {
name = "rtk-${rtk-version}";
version = rtk-version;
src = pkgs.fetchurl {
url = "https://github.com/rtk-ai/rtk/releases/download/v${rtk-version}/rtk-x86_64-unknown-linux-gnu.tar.gz";
hash = "sha256-XoTia5K8b00OzcKYCufwx8ApkAS31DxUCpGSU0jFs2Q=";
};
unpackPhase = ''
tar xzf $src
'';
installPhase = ''
mkdir -p $out/bin
cp rtk $out/bin/
chmod +x $out/bin/rtk
'';
meta = with pkgs.lib; {
description = "RTK - AI coding tool enhancer";
homepage = "https://www.rtk-ai.app";
license = licenses.mit;
platforms = [ "x86_64-linux" ];
};
})
mcp-nixos
];
})
(lib.mkIf cfg.opencode.enable {
home.packages = with pkgs; [
opencode
];
home.file.".config/opencode/opencode.json".text = builtins.toJSON {
"$schema" = "https://opencode.ai/config.json";
permission = {
external_directory = {
"/run/secrets/" = "deny";
"~/.config/sops/age/keys.txt" = "deny";
};
};
plugin = [ "@mohak34/opencode-notifier@latest" ];
};
})
]; ];
} }

View File

@@ -0,0 +1,40 @@
{
lib,
config,
pkgs,
...
}:
let
cfg = config.ai-tools.opencode;
in
{
options.ai-tools.opencode = {
enable = lib.mkEnableOption "opencode";
};
config = lib.mkIf cfg.enable {
home.packages = [ pkgs.opencode ];
home.file.".config/opencode/opencode.json".text = builtins.toJSON {
"$schema" = "https://opencode.ai/config.json";
permission = {
external_directory = {
"/run/secrets/" = "deny";
"~/.config/sops/age/keys.txt" = "deny";
"~/.ssh/id_rsa" = "deny";
"~/.ssh/id_ed25519" = "deny";
"~/.ssh/id_ecdsa" = "deny";
"~/.ssh/id_dsa" = "deny";
"/etc/ssh/ssh_host_rsa_key" = "deny";
"/etc/ssh/ssh_host_ed25519_key" = "deny";
"/etc/ssh/ssh_host_ecdsa_key" = "deny";
"/etc/ssh/ssh_host_dsa_key" = "deny";
};
command = {
sops = "deny";
};
};
plugin = [ "@mohak34/opencode-notifier@latest" ];
};
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
config,
pkgs,
...
}:
let
cfg = config.ai-tools.claude-code;
skillType = lib.types.submodule {
options = {
owner = lib.mkOption { type = lib.types.str; };
repo = lib.mkOption { type = lib.types.str; };
rev = lib.mkOption { type = lib.types.str; };
hash = lib.mkOption { type = lib.types.str; };
skill = lib.mkOption { type = lib.types.str; };
};
};
fetchSkill =
skill:
let
src = pkgs.fetchFromGitHub {
inherit (skill)
owner
repo
rev
hash
;
};
in
{
name = ".claude/skills/${skill.skill}";
value = {
source = "${src}/${skill.skill}";
recursive = true;
};
};
in
{
options.ai-tools.claude-code.skills = lib.mkOption {
type = lib.types.listOf skillType;
default = [ ];
};
config = lib.mkIf cfg.enable {
home.file = builtins.listToAttrs (map fetchSkill cfg.skills);
};
}

View File

@@ -0,0 +1,190 @@
#!/usr/bin/env python3
"""Claude Code PreToolUse hook — runs tirith check on Bash tool calls.
Reads JSON from stdin (Claude Code hook protocol), extracts the command,
and delegates to `tirith check --json` for security analysis.
Exit codes:
0 — hook completed successfully (decision in stdout JSON)
Non-zero — hook error (fail-closed by default; set TIRITH_FAIL_OPEN=1 for fail-open)
Output (stdout, only for deny):
{
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "deny",
"permissionDecisionReason": "..."
}
}
Environment:
TIRITH_BIN — path to tirith binary (default: "tirith")
TIRITH_HOOK_WARN_ACTION — "deny" (default) or "allow"
"""
import json
import os
import shutil
import subprocess
import sys
def get(data, *keys):
"""Return the first matching key from data (supports dual-case fields)."""
for k in keys:
if k in data:
return data[k]
return None
def deny(reason):
"""Print a deny decision using hookSpecificOutput and exit 0."""
print(
json.dumps(
{
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "deny",
"permissionDecisionReason": reason,
}
}
)
)
sys.exit(0)
def fail_action():
"""Return the fail action: deny (default, fail-closed) or allow (fail-open via env)."""
return "allow" if os.environ.get("TIRITH_FAIL_OPEN") == "1" else "deny"
def fail_closed(reason):
"""Deny or allow based on TIRITH_FAIL_OPEN, for error/missing-binary paths."""
action = fail_action()
if action == "deny":
deny(reason)
else:
sys.exit(0)
def main():
try:
raw = sys.stdin.read()
if not raw.strip():
# Empty input — cannot determine command, fail-closed
fail_closed("tirith: empty hook input — blocked for safety")
return
data = json.loads(raw)
except (json.JSONDecodeError, OSError):
fail_closed("tirith: failed to parse hook input — blocked for safety")
return
if not isinstance(data, dict):
fail_closed("tirith: invalid hook input format — blocked for safety")
return
# Dual-case field extraction (camelCase and snake_case)
event = get(data, "hook_event_name", "hookEventName")
tool = get(data, "tool_name", "toolName")
tool_input = get(data, "tool_input", "toolInput") or {}
# Only intercept PreToolUse + Bash
if event != "PreToolUse" or tool != "Bash":
sys.exit(0)
if not isinstance(tool_input, dict):
fail_closed("tirith: invalid tool_input format — blocked for safety")
return
command = tool_input.get("command")
if not isinstance(command, str) or not command.strip():
fail_closed("tirith: no command found in hook input — blocked for safety")
return
# Locate tirith binary
tirith_bin = os.environ.get("TIRITH_BIN") or shutil.which("tirith") or "tirith"
try:
result = subprocess.run(
[
tirith_bin,
"check",
"--json",
"--non-interactive",
"--shell",
"posix",
"--",
command,
],
capture_output=True,
text=True,
timeout=10,
)
except FileNotFoundError:
fail_closed(f"tirith: {tirith_bin} not found — install tirith or set TIRITH_FAIL_OPEN=1")
return
except subprocess.TimeoutExpired:
fail_closed("tirith: check timed out — blocked for safety")
return
except OSError as e:
fail_closed(f"tirith: OS error running check — {e}")
return
# Unexpected exit code — fail-closed
if result.returncode not in (0, 1, 2):
fail_closed(f"tirith: unexpected exit code {result.returncode} — blocked for safety")
return
if result.returncode != 0 and not result.stdout.strip():
fail_closed("tirith: check returned non-zero with no output — blocked for safety")
return
# Exit 0 = clean, allow
if result.returncode == 0:
sys.exit(0)
# Exit 2 = warn — check TIRITH_HOOK_WARN_ACTION
if result.returncode == 2:
warn_action = os.environ.get("TIRITH_HOOK_WARN_ACTION", "deny").lower()
if warn_action == "allow":
sys.exit(0)
# Exit 1 = block, Exit 2 + deny = block
# Build reason from tirith JSON output
reason = "Tirith security check failed"
if result.stdout.strip():
try:
verdict = json.loads(result.stdout)
findings = verdict.get("findings", [])
if findings:
parts = []
for f in findings:
title = f.get("title", f.get("rule_id", "unknown"))
severity = f.get("severity", "")
parts.append(f"[{severity}] {title}" if severity else title)
reason = "Tirith: " + "; ".join(parts)
except json.JSONDecodeError:
reason = result.stdout.strip()[:500]
deny(reason)
if __name__ == "__main__":
try:
main()
except Exception:
# Fail-closed on unexpected errors (respects TIRITH_FAIL_OPEN)
if os.environ.get("TIRITH_FAIL_OPEN") == "1":
sys.exit(0)
# Deny — print structured output so Claude Code shows a message
print(
json.dumps(
{
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "deny",
"permissionDecisionReason": "tirith: unexpected hook error — blocked for safety",
}
}
)
)
sys.exit(0)

View File

@@ -0,0 +1,30 @@
{
lib,
config,
pkgs,
...
}:
let
cfg = config.ai-tools.tirith;
in
{
options.ai-tools.tirith = {
enable = lib.mkEnableOption "tirith shell security guard";
};
config = lib.mkMerge [
(lib.mkIf cfg.enable {
home.packages = [ pkgs.tirith ];
})
(lib.mkIf (cfg.enable && config.ai-tools.claude-code.enable) {
home.file.".claude/hooks/tirith-check.py" = {
source = ./tirith-check.py;
executable = true;
};
home.activation.tirith-claude-code = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
${pkgs.tirith}/bin/tirith setup claude-code --with-mcp --scope user --force 2>/dev/null || true
'';
})
];
}

View File

@@ -2,20 +2,27 @@
config, config,
lib, lib,
pkgs, pkgs,
myUtils,
osConfig ? null, osConfig ? null,
inputs ? null,
... ...
}: }:
let let
hmSopsAvailable = config ? sops && config.sops ? secrets; sops = myUtils.sopsAvailability config osConfig;
osSopsAvailable = osConfig != null && osConfig ? sops && osConfig.sops ? secrets; standalone = osConfig == null;
sopsAvailable = hmSopsAvailable || osSopsAvailable;
sopsSecrets = if hmSopsAvailable then config.sops.secrets else osConfig.sops.secrets;
in in
{ lib.optionalAttrs standalone {
sops.secrets = myUtils.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" null {
anki = [
"sync-user"
"sync-key"
];
};
}
// {
warnings = lib.optional ( warnings = lib.optional (
!sopsAvailable && config.programs.anki.enable !sops.available && config.programs.anki.enable
) "anki is enabled but sops secrets are not available. anki sync will not be configured."; ) "anki is enabled but sops secrets are not available. anki sync will not be configured.";
programs.anki = { programs.anki = {
@@ -26,9 +33,9 @@ in
puppy-reinforcement puppy-reinforcement
review-heatmap review-heatmap
]; ];
profiles."User 1".sync = lib.mkIf sopsAvailable { profiles."User 1".sync = lib.mkIf sops.available {
usernameFile = "${sopsSecrets."anki_sync_user".path}"; usernameFile = "${sops.secrets."anki/sync-user".path}";
keyFile = "${sopsSecrets."anki_sync_key".path}"; keyFile = "${sops.secrets."anki/sync-key".path}";
}; };
}; };
} }

View File

@@ -1,5 +1,7 @@
{ pkgs, ... }: { osConfig, pkgs, ... }:
{ {
home.packages = with pkgs; [ pulsemixer ]; home.packages = with pkgs; [ pulsemixer ];
services.mpris-proxy.enable = osConfig.hardware.bluetooth.enable or false;
} }

View File

@@ -1,4 +1,4 @@
{ lib, ... }: { config, lib, ... }:
{ {
options.browser = { options.browser = {
@@ -23,6 +23,8 @@
}; };
}; };
config.home.sessionVariables.BROWSER = config.browser.primary;
imports = [ imports = [
./firefox.nix ./firefox.nix
./librewolf.nix ./librewolf.nix

View File

@@ -0,0 +1,7 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
wl-clipboard
];
}

View File

@@ -14,8 +14,7 @@ in
warnings = warnings =
lib.optional (!isNixOS) lib.optional (!isNixOS)
"hcloud module requires NixOS host configuration. This module will not work with standalone home-manager."; "hcloud module requires NixOS host configuration. This module will not work with standalone home-manager.";
home = {
packages = with pkgs; [ hcloud ]; home.packages = with pkgs; [ hcloud ];
};
}; };
} }

View File

@@ -9,14 +9,18 @@
options.database = { options.database = {
mssql.enable = lib.mkEnableOption "MSSQL"; mssql.enable = lib.mkEnableOption "MSSQL";
postgresql.enable = lib.mkEnableOption "PostgreSQL"; postgresql.enable = lib.mkEnableOption "PostgreSQL";
redis.enable = lib.mkEnableOption "Redis";
}; };
config = lib.mkMerge [ config = lib.mkMerge [
(lib.mkIf config.database.mssql.enable { (lib.mkIf config.database.mssql.enable {
home.packages = [ (config.nixgl.wrap pkgs.dbeaver-bin) ]; home.packages = with pkgs; [ (config.nixgl.wrap dbeaver-bin) ];
}) })
(lib.mkIf config.database.postgresql.enable { (lib.mkIf config.database.postgresql.enable {
home.packages = [ (config.nixgl.wrap pkgs.pgadmin4-desktopmode) ]; home.packages = with pkgs; [ (config.nixgl.wrap pgadmin4-desktopmode) ];
})
(lib.mkIf config.database.postgresql.enable {
home.packages = with pkgs; [ redis ];
}) })
]; ];
} }

View File

@@ -3,6 +3,7 @@
let let
terminal = "kitty"; terminal = "kitty";
browser = config.browser.primary; browser = config.browser.primary;
font = "${config.stylix.fonts.monospace.name} ${toString config.stylix.fonts.sizes.applications}";
in in
{ {
dconf.settings = { dconf.settings = {
@@ -40,9 +41,9 @@ in
clock-show-weekday = true; clock-show-weekday = true;
color-scheme = "prefer-dark"; color-scheme = "prefer-dark";
enable-hot-corners = false; enable-hot-corners = false;
font-name = "Iosevka Term SS08 12"; # font-name = font;
locate-pointer = true; locate-pointer = true;
monospace-font-name = "Iosevka Term SS08 12"; monospace-font-name = font;
}; };
"org/gnome/desktop/wm/keybindings" = { "org/gnome/desktop/wm/keybindings" = {

View File

@@ -1,13 +1,24 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
{ {
options.nixgl.wrap = lib.mkOption { options = {
host.username = lib.mkOption {
type = lib.types.str;
default = config.home.username;
};
nixgl.wrap = lib.mkOption {
type = lib.types.functionTo lib.types.package; type = lib.types.functionTo lib.types.package;
default = if config.lib ? nixGL then config.lib.nixGL.wrap else lib.id; default = if config.lib ? nixGL then config.lib.nixGL.wrap else lib.id;
readOnly = true; readOnly = true;
}; };
options.wrapApp = lib.mkOption { wrapApp = lib.mkOption {
type = lib.types.raw; type = lib.types.raw;
default = default =
pkg: flags: pkg: flags:
@@ -22,4 +33,5 @@
pkg; pkg;
readOnly = true; readOnly = true;
}; };
};
} }

View File

@@ -2,6 +2,7 @@
{ {
imports = [ imports = [
../../clipboard
../../fuzzel ../../fuzzel
../../mako ../../mako
../../shikane ../../shikane
@@ -12,7 +13,6 @@
file.".config/niri/config.kdl".source = ./config.kdl; file.".config/niri/config.kdl".source = ./config.kdl;
packages = with pkgs; [ packages = with pkgs; [
brightnessctl brightnessctl
wl-clipboard
wlsunset wlsunset
]; ];
}; };

View File

@@ -0,0 +1,4 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.devenv ];
}

View File

@@ -1,9 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
config = {
home.packages = with pkgs; [ home.packages = with pkgs; [
dive dive
]; ];
};
} }

View File

@@ -7,7 +7,7 @@
}: }:
{ {
options = { options.git = {
github.enable = lib.mkEnableOption "Github CLI"; github.enable = lib.mkEnableOption "Github CLI";
gitlab.enable = lib.mkEnableOption "Gitlab CLI"; gitlab.enable = lib.mkEnableOption "Gitlab CLI";
}; };
@@ -20,7 +20,7 @@
".gitignore".source = dotsPath + "/.gitignore"; ".gitignore".source = dotsPath + "/.gitignore";
}; };
programs.gh.enable = config.github.enable; programs.gh.enable = config.git.github.enable;
home.packages = lib.optionals config.gitlab.enable [ pkgs.glab ]; home.packages = lib.optionals config.git.gitlab.enable [ pkgs.glab ];
}; };
} }

View File

@@ -18,6 +18,10 @@
enableAlias = true; enableAlias = true;
}; };
home.shellAliases = {
k = "kubectl";
};
imports = [ imports = [
./helm.nix ./helm.nix
./k9s.nix ./k9s.nix

View File

@@ -1,9 +1,7 @@
{ pkgs, inputs, ... }: { pkgs, inputs, ... }:
{ {
config = {
home.packages = [ home.packages = [
inputs.nvim.packages.${pkgs.stdenv.hostPlatform.system}.nvim inputs.nvim.packages.${pkgs.stdenv.hostPlatform.system}.nvim
]; ];
};
} }

View File

@@ -1,5 +1,4 @@
{ {
lib,
pkgs, pkgs,
... ...
}: }:
@@ -7,7 +6,8 @@
imports = [ ./vault.nix ]; imports = [ ./vault.nix ];
home.packages = with pkgs; [ home.packages = with pkgs; [
sops
age age
age-plugin-yubikey # TODO: only needed when using Yubikey
sops
]; ];
} }

View File

@@ -1,18 +1,15 @@
{ {
outputs, myUtils,
lib, lib,
pkgs, pkgs,
... ...
}: }:
let let
nixosConfigs = builtins.attrNames outputs.nixosConfigurations; hostDir = ../../hosts;
homeConfigs = map (n: lib.last (lib.splitString "@" n)) ( hostNames = myUtils.dirNames hostDir;
builtins.attrNames outputs.homeConfigurations
);
allHosts = lib.unique (homeConfigs ++ nixosConfigs);
hostsWithKeys = lib.filter ( hostsWithKeys = lib.filter (
hostname: builtins.pathExists ../../hosts/${hostname}/ssh_host.pub hostname: builtins.pathExists (hostDir + "/${hostname}/ssh_host.pub")
) allHosts; ) hostNames;
in in
{ {
home.packages = with pkgs; [ sshfs ]; home.packages = with pkgs; [ sshfs ];
@@ -25,15 +22,14 @@ in
lib.genAttrs hostsWithKeys ( lib.genAttrs hostsWithKeys (
hostname: hostname:
let let
hostConfig = outputs.nixosConfigurations.${hostname}.config; meta = myUtils.hostMeta (hostDir + "/${hostname}");
inherit (hostConfig.ssh) publicHostname username;
in in
{ {
host = hostname; host = hostname;
user = username; user = meta.deployment.targetUser;
} }
// lib.optionalAttrs (publicHostname != "") { // lib.optionalAttrs (meta.deployment.targetHost != "") {
hostname = publicHostname; hostname = meta.deployment.targetHost;
} }
) )
// { // {

View File

@@ -6,7 +6,7 @@
}: }:
let let
theme = import ../../modules/stylix/theme.nix { inherit pkgs; }; theme = import ../../../modules/stylix/theme.nix { inherit pkgs; };
in in
{ {
imports = [ inputs.stylix.homeModules.stylix ]; imports = [ inputs.stylix.homeModules.stylix ];
@@ -25,21 +25,6 @@ in
sansSerif = config.stylix.fonts.monospace; sansSerif = config.stylix.fonts.monospace;
emoji = config.stylix.fonts.monospace; emoji = config.stylix.fonts.monospace;
}; };
targets = { targets = import ../../../modules/stylix/targets.nix;
firefox = {
profileNames = [ "default" ];
colorTheme.enable = true;
};
librewolf = {
profileNames = [ "default" ];
colorTheme.enable = true;
};
gnome.enable = false;
gtk.enable = false;
kitty = {
variant256Colors = true;
};
nixvim.enable = false;
};
}; };
} }

View File

@@ -3,20 +3,39 @@
lib, lib,
pkgs, pkgs,
dotsPath, dotsPath,
myUtils,
osConfig ? null, osConfig ? null,
inputs ? null,
... ...
}: }:
let let
hmSopsAvailable = config ? sops && config.sops ? templates; sops = myUtils.sopsAvailability config osConfig;
osSopsAvailable = osConfig != null && osConfig ? sops && osConfig.sops ? templates; standalone = osConfig == null;
sopsAvailable = hmSopsAvailable || osSopsAvailable;
sopsTemplates = if hmSopsAvailable then config.sops.templates else osConfig.sops.templates;
in in
{ lib.optionalAttrs standalone {
sops = {
secrets = myUtils.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" null {
taskwarrior = [
"sync-server-url"
"sync-server-client-id"
"sync-encryption-secret"
];
};
templates."taskrc.d/sync" = {
content = ''
sync.server.url=${config.sops.placeholder."taskwarrior/sync-server-url"}
sync.server.client_id=${config.sops.placeholder."taskwarrior/sync-server-client-id"}
sync.encryption_secret=${config.sops.placeholder."taskwarrior/sync-encryption-secret"}
'';
};
};
}
// {
warnings = warnings =
lib.optional (!sopsAvailable && config.programs.taskwarrior.enable) lib.optional (!sops.available && config.programs.taskwarrior.enable)
"taskwarrior is enabled, but sops templates are not available. taskwarrior sync will not be configured."; "taskwarrior is enabled, but sops templates are not available. taskwarrior sync will not be configured.";
home.packages = with pkgs; [ home.packages = with pkgs; [
@@ -27,7 +46,7 @@ in
home.file = { home.file = {
".config/task/taskrc" = { ".config/task/taskrc" = {
force = true; # overwrite when present force = true;
source = dotsPath + "/.config/task/taskrc"; source = dotsPath + "/.config/task/taskrc";
}; };
".config/task/taskrc.d/aliases".source = dotsPath + "/.config/task/taskrc.d/aliases"; ".config/task/taskrc.d/aliases".source = dotsPath + "/.config/task/taskrc.d/aliases";
@@ -39,14 +58,6 @@ in
".local/share/task/hooks/on-exit.sync.py" = { ".local/share/task/hooks/on-exit.sync.py" = {
source = dotsPath + "/.local/share/task/hooks/on-exit.sync.py"; source = dotsPath + "/.local/share/task/hooks/on-exit.sync.py";
}; };
".local/share/task/hooks/on-add.limit.py" = {
source = dotsPath + "/.local/share/task/hooks/on-add.limit.py";
executable = true;
};
".local/share/task/hooks/on-modify.limit.py" = {
source = dotsPath + "/.local/share/task/hooks/on-modify.limit.py";
executable = true;
};
".local/share/task/scripts/sync-and-notify.sh" = { ".local/share/task/scripts/sync-and-notify.sh" = {
source = dotsPath + "/.local/share/task/scripts/sync-and-notify.sh"; source = dotsPath + "/.local/share/task/scripts/sync-and-notify.sh";
executable = true; executable = true;
@@ -59,9 +70,10 @@ in
colorTheme = "dark-256"; colorTheme = "dark-256";
config = { config = {
recurrence = "off"; recurrence = "off";
reserved.lines = 3; # without this I would have to scroll up 3 lines
}; };
extraConfig = lib.optionalString sopsAvailable '' extraConfig = lib.optionalString sops.available ''
include ${sopsTemplates."taskrc.d/sync".path} include ${sops.templates."taskrc.d/sync".path}
''; '';
}; };
} }

View File

@@ -0,0 +1,7 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
jira-cli-go
];
}

View File

@@ -11,9 +11,5 @@
enable = true; enable = true;
extraConfig = builtins.readFile (dotsPath + "/.config/tmux/tmux.conf"); extraConfig = builtins.readFile (dotsPath + "/.config/tmux/tmux.conf");
}; };
home.file = {
".config/tmux/hooks/tmux.ssh.conf".source = dotsPath + "/.config/tmux/hooks/tmux.ssh.conf";
};
}; };
} }

View File

@@ -0,0 +1,21 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.torrenting;
in
{
options.torrenting = {
enable = lib.mkEnableOption "transmission torrent client";
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
transmission_4
];
};
}

View File

@@ -1,68 +1,11 @@
{ {
lib, imports = [
... ./settings.nix
}: ./style.nix
];
{
programs.waybar = { programs.waybar = {
enable = true; enable = true;
settings = [ systemd.enable = true;
{
height = 16;
spacing = 4;
modules-left = [ "niri/workspaces" ];
modules-right = [
"pulseaudio"
"memory"
"cpu"
"network"
"clock"
"battery"
];
clock = {
format = "W{:%V %d %b %H:%M}";
tooltip-format = "{calendar}";
format-alt = "{:%Y-%m-%d %H:%M:%S}";
};
battery = {
bat = "BAT0";
adapter = "ADP1";
interval = 5;
full-at = 99;
states = {
good = 80;
warning = 20;
critical = 10;
};
format = "{capacity}%--";
format-charging = "{capacity}%++";
format-plugged = "{capacity}%";
format-alt = "{time} {power}W";
};
pulseaudio = {
format = "VOL {volume}%";
format-muted = "muted";
on-click = "pavucontrol";
};
memory = {
interval = 2;
format = "RAM {percentage}%";
format-alt = "RAM {used:0.1f}G/{total:0.1f}G";
};
cpu = {
interval = 2;
format = "CPU {usage}%";
format-alt = "CPU {avg_frequency}GHz";
};
network = {
interval = 5;
format-wifi = "{ifname} {ipaddr} {essid}";
format-ethernet = "{ifname} {ipaddr}";
format-disconnected = "{ifname} disconnected";
tooltip-format = "{ifname}: {ipaddr}/{cidr}";
};
}
];
style = lib.readFile ./style.css;
}; };
} }

View File

@@ -0,0 +1,59 @@
{
programs.waybar.settings = [
{
height = 16;
spacing = 4;
modules-left = [ "niri/workspaces" ];
modules-right = [
"pulseaudio"
"memory"
"cpu"
"network"
"clock"
"battery"
];
clock = {
format = "W{:%V %d %b %H:%M}";
tooltip-format = "{calendar}";
format-alt = "{:%Y-%m-%d %H:%M:%S}";
};
battery = {
bat = "BAT0";
adapter = "ADP1";
interval = 5;
full-at = 99;
states = {
good = 80;
warning = 20;
critical = 10;
};
format = "{capacity}%--";
format-charging = "{capacity}%++";
format-plugged = "{capacity}%";
format-alt = "{time} {power}W";
};
pulseaudio = {
format = "VOL {volume}%";
format-muted = "muted";
on-click = "pavucontrol";
};
memory = {
interval = 2;
format = "RAM {percentage}%";
format-alt = "RAM {used:0.1f}G/{total:0.1f}G";
};
cpu = {
interval = 2;
format = "CPU {usage}%";
format-alt = "CPU {avg_frequency}GHz";
};
network = {
interval = 5;
format-wifi = "{ifname} {ipaddr} {essid}";
format-ethernet = "{ifname} {ipaddr}";
format-disconnected = "{ifname} disconnected";
tooltip-format = "{ifname}: {ipaddr}/{cidr}";
};
}
];
}

View File

@@ -0,0 +1,5 @@
{ lib, ... }:
{
programs.waybar.style = lib.readFile ./style.css;
}

View File

@@ -0,0 +1,45 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.zk;
in
{
options.zk = {
enable = lib.mkEnableOption "zettelkasten";
path = lib.mkOption {
type = lib.types.str;
default = config.home.homeDirectory + "/.zk";
description = "Path to the zettelkasten directory";
};
};
config = lib.mkIf cfg.enable {
home = {
sessionVariables.ZK_PATH = cfg.path;
packages = [
(pkgs.writeShellApplication {
name = "zk";
runtimeInputs = with pkgs; [ tmux ];
text = builtins.readFile ./scripts/zk.sh;
})
(pkgs.writeShellApplication {
name = "save-zk";
runtimeInputs = with pkgs; [ git ];
text = builtins.readFile ./scripts/save-zk.sh;
})
(pkgs.writeShellApplication {
name = "setup-zk";
runtimeInputs = with pkgs; [ gh ];
text = builtins.readFile ./scripts/setup-zk.sh;
})
];
};
};
}

View File

@@ -0,0 +1,2 @@
cd "$ZK_PATH" || { echo "No zettelkasten directory found"; exit 1; }
git add . && git commit -m "Update" && git push

View File

@@ -0,0 +1,13 @@
if [ ! -d "$ZK_PATH" ]; then
echo "[zk] Setting up zettelkasten"
gh repo clone zk "$ZK_PATH"
else
echo "[zk] Zettelkasten already set up."
fi
read -p "Would you like open your zettelkasten? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
$EDITOR "$ZK_PATH"
fi

14
dots/.bin/zk → home/modules/zk/scripts/zk.sh Executable file → Normal file
View File

@@ -1,8 +1,6 @@
#!/usr/bin/env bash current_zettel_path="$(cat "$ZK_PATH/current-zettel.txt")"
current_zettel_path="$ZK_PATH/$(cat "$ZK_PATH/current-zettel.txt")" if [ -n "${TMUX:-}" ]; then
if [ "$TERM_PROGRAM" = tmux ]; then
cd "$ZK_PATH" && $EDITOR "$current_zettel_path" cd "$ZK_PATH" && $EDITOR "$current_zettel_path"
else else
echo 'Not in tmux' echo 'Not in tmux'
@@ -12,13 +10,9 @@ else
read -r -p 'Enter your choice: ' choice read -r -p 'Enter your choice: ' choice
case $choice in case $choice in
1) 1)
# Check if a tmux session is running with a window named zk if tmux has-session -t zk 2>/dev/null; then
if tmux list-windows -F '#{window_name}' | grep -q zk; then tmux attach -t zk
# Attach to the session containing the 'zk' window
session="$(tmux list-windows -F '#{window_name} #{session_name}' | grep zk | head -n 1 | awk '{ print $2 }')"
tmux attach -t "$session"
else else
# Create session with a window named 'zk' and start nvim
tmux new-session -s zk -n zk -d tmux new-session -s zk -n zk -d
tmux send-keys -t zk:zk "cd $ZK_PATH && $EDITOR $current_zettel_path" Enter tmux send-keys -t zk:zk "cd $ZK_PATH && $EDITOR $current_zettel_path" Enter
tmux attach -t zk tmux attach -t zk

View File

@@ -7,62 +7,60 @@
}: }:
let let
username = "h";
hostName = "andromache";
wolInterfaces = import ./wol-interfaces.nix; wolInterfaces = import ./wol-interfaces.nix;
in in
{ {
imports = [ imports = [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
../../modules/common
./hard.nix ./hard.nix
./host.nix
inputs.nixos-hardware.nixosModules.common-cpu-intel inputs.nixos-hardware.nixosModules.common-cpu-intel
inputs.nixos-hardware.nixosModules.common-pc inputs.nixos-hardware.nixosModules.common-pc
inputs.nixos-hardware.nixosModules.common-pc-ssd inputs.nixos-hardware.nixosModules.common-pc-ssd
inputs.sops-nix.nixosModules.sops ../../modules/common
../../modules/boot/bootloader.nix ../../modules/boot/bootloader.nix
(import ../../modules/disko/zfs-encrypted-root.nix { (import ../../modules/disko/zfs-encrypted-root.nix {
inherit lib config; inherit lib config;
device = "/dev/nvme1n1"; device = "/dev/nvme1n1";
}) })
../../modules/desktops/niri ../../modules/ai-tools
../../modules/anki
../../modules/audio
../../modules/backups ../../modules/backups
../../modules/bluetooth ../../modules/bluetooth
../../modules/gaming ../../modules/desktops/niri
../../modules/keyboard ../../modules/docker
(import ../../modules/networking { inherit hostName; }) ../../modules/firewall
../../modules/users
../../modules/audio
../../modules/localization
../../modules/fonts ../../modules/fonts
../../modules/gaming
../../modules/git
../../modules/hcloud
../../modules/keyboard
../../modules/localization
../../modules/networking
../../modules/nvidia
../../modules/secrets
../../modules/ssh ../../modules/ssh
../../modules/storage ../../modules/storage
../../modules/stylix ../../modules/stylix
(import ../../modules/secrets { inherit lib inputs config; })
../../modules/docker
../../modules/syncthing ../../modules/syncthing
../../modules/nvidia ../../modules/tailscale
../../modules/taskwarrior
../../modules/users
../../modules/wol
../../modules/yubikey ../../modules/yubikey
]; ];
home-manager.users.${username} = import ../../home/hosts/andromache { home-manager.users.${config.host.username} = import ../../home/hosts/${config.host.name};
inherit
inputs
config
pkgs
lib
;
};
networking.hostName = hostName; secrets.nixSigningKey.enable = true;
ssh.username = username; restic-backup.enable = true;
ssh.authorizedHosts = [ "astyanax" ]; tailscale.enable = true;
secrets.username = username; docker.enable = true;
docker.user = username;
nix.settings.secret-key-files = [ config.sops.secrets.nix_signing_key_andromache.path ]; hcloud.enable = true;
disko.devices = { disko.devices = {
disk.data = { disk.data = {
@@ -94,7 +92,6 @@ in
my.yubikey = { my.yubikey = {
enable = false; enable = false;
inherit username;
keys = [ keys = [
{ {
handle = "<KeyHandle1>"; handle = "<KeyHandle1>";
@@ -116,17 +113,15 @@ in
package = pkgs.plocate; package = pkgs.plocate;
}; };
networking = { networking.hostId = "80eef97e";
# TODO: generate unique hostId on actual host with: head -c 8 /etc/machine-id
hostId = "80eef97e"; wol = {
interfaces = { enable = true;
eno1 = { interfaces.eno1 = { inherit (wolInterfaces.eno1) macAddress; };
wakeOnLan.enable = true;
inherit (wolInterfaces.eno1) macAddress;
};
}; };
firewall = { firewall = {
allowedUDPPorts = [ 9 ]; enable = true;
}; allowedTCPPorts = [ 22 ];
}; };
} }

View File

@@ -0,0 +1,7 @@
{
host = {
username = "h";
highRam = true;
admin = true;
};
}

View File

@@ -1,4 +1,9 @@
{ {
deployment.tags = [ "local" ]; system = "x86_64-linux";
deployment = {
tags = [ "local" ];
targetHost = "";
targetUser = "h";
};
role = "desktop"; role = "desktop";
} }

View File

@@ -1 +0,0 @@
"x86_64-linux"

View File

@@ -6,62 +6,57 @@
... ...
}: }:
let let
username = "h";
hostName = "astyanax";
wolInterfaces = import ../andromache/wol-interfaces.nix; wolInterfaces = import ../andromache/wol-interfaces.nix;
in in
{ {
imports = [ imports = [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
../../modules/common
./hard.nix ./hard.nix
./host.nix
inputs.nixos-hardware.nixosModules.common-pc inputs.nixos-hardware.nixosModules.common-pc
inputs.nixos-hardware.nixosModules.common-pc-ssd inputs.nixos-hardware.nixosModules.common-pc-ssd
# inputs.nixos-hardware.nixosModules.lenovo-thinkpad-e14-intel-gen7 (not available yet?) # inputs.nixos-hardware.nixosModules.lenovo-thinkpad-e14-intel-gen7 (not available yet?)
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
../../modules/common
../../modules/boot/bootloader.nix ../../modules/boot/bootloader.nix
(import ../../modules/disko/zfs-encrypted-root.nix { (import ../../modules/disko/zfs-encrypted-root.nix {
inherit lib config; inherit lib config;
device = "/dev/nvme0n1"; device = "/dev/nvme0n1";
}) })
../../modules/desktops/niri ../../modules/ai-tools
../../modules/anki
../../modules/audio ../../modules/audio
../../modules/audio-automation
../../modules/backups ../../modules/backups
../../modules/bluetooth ../../modules/bluetooth
../../modules/keyboard ../../modules/desktops/niri
(import ../../modules/networking { inherit hostName; }) ../../modules/docker
../../modules/users ../../modules/firewall
../../modules/localization
../../modules/fonts ../../modules/fonts
../../modules/git
../../modules/keyboard
../../modules/localization
../../modules/networking
../../modules/nfc
../../modules/secrets
../../modules/ssh ../../modules/ssh
../../modules/storage ../../modules/storage
../../modules/stylix ../../modules/stylix
(import ../../modules/secrets { inherit lib inputs config; }) ../../modules/tailscale
../../modules/docker ../../modules/taskwarrior
../../modules/nfc ../../modules/users
../../modules/yubikey
]; ];
home-manager.users.${username} = import ../../home/hosts/astyanax { home-manager.users.${config.host.username} = import ../../home/hosts/${config.host.name};
inherit
inputs
config
pkgs
lib
;
};
networking.hostName = hostName; secrets.nixSigningKey.enable = true;
ssh.username = username; restic-backup.enable = true;
ssh.authorizedHosts = [ "andromache" ]; tailscale.enable = true;
docker.enable = true;
secrets.username = username; nfc.enable = true;
docker.user = username;
nfc.user = username;
desktop.ly.enable = true; desktop.ly.enable = true;
audio.automation.enable = true;
nix.settings.secret-key-files = [ config.sops.secrets.nix_signing_key_astyanax.path ];
hardware = { hardware = {
cpu.intel.updateMicrocode = true; cpu.intel.updateMicrocode = true;
@@ -92,12 +87,35 @@ in
]; ];
networking = { networking = {
# TODO: generate unique hostId on actual host with: head -c 8 /etc/machine-id
hostId = "80eef97e"; hostId = "80eef97e";
}; };
firewall = {
enable = true;
allowedTCPPorts = [ 22 ];
};
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
my.yubikey = {
enable = true;
# inherit (config.host) username;
# keys = [
# {
# handle = "<KeyHandle1>";
# userKey = "<UserKey1>";
# coseType = "<CoseType1>";
# options = "<Options1>";
# }
# {
# handle = "<KeyHandle2>";
# userKey = "<UserKey2>";
# coseType = "<CoseType2>";
# options = "<Options2>";
# }
# ];
};
services = { services = {
fwupd.enable = true; fwupd.enable = true;
locate = { locate = {

7
hosts/astyanax/host.nix Normal file
View File

@@ -0,0 +1,7 @@
{
host = {
username = "h";
highRam = true;
admin = true;
};
}

View File

@@ -1,4 +1,9 @@
{ {
deployment.tags = [ "local" ]; system = "x86_64-linux";
deployment = {
tags = [ "local" ];
targetHost = "";
targetUser = "h";
};
role = "laptop"; role = "laptop";
} }

View File

@@ -1 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIzP1PjIDb1tN9nhPOK88HYDtTNk9SN9ZpEem2id49Fa h@astyanax sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIJApgl/+QaAtrg0OK5ihXasdcnDwzFo6qtHbgnqGFl25AAAABHNzaDo= h@astyanax

View File

@@ -1 +0,0 @@
"x86_64-linux"

View File

@@ -1,27 +1,16 @@
{ pkgs, ... }: { pkgs, config, ... }:
# Raspberry Pi 3 # Raspberry Pi 3
# See <https://nixos.wiki/wiki/NixOS_on_ARM/Raspberry_Pi_3> # See <https://nixos.wiki/wiki/NixOS_on_ARM/Raspberry_Pi_3>
let
username = "h";
hostName = "eetion-02";
in
{ {
imports = [ imports = [
./hard.nix ./hard.nix
./host.nix
../../modules/common
../../modules/ssh ../../modules/ssh
]; ];
ssh = {
inherit username;
publicHostname = "eetion-02";
authorizedHosts = [
"andromache"
"astyanax"
];
};
boot = { boot = {
kernelParams = [ kernelParams = [
"console=ttyS1,115200n8" "console=ttyS1,115200n8"
@@ -38,7 +27,7 @@ in
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
networking = { networking = {
inherit hostName; hostName = config.host.name;
networkmanager.enable = true; networkmanager.enable = true;
firewall = { firewall = {
enable = true; enable = true;
@@ -51,7 +40,7 @@ in
users.users = { users.users = {
root.hashedPassword = "!"; root.hashedPassword = "!";
${username} = { ${config.host.username} = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" ];
}; };

5
hosts/eetion-02/host.nix Normal file
View File

@@ -0,0 +1,5 @@
{
host = {
username = "h";
};
}

View File

@@ -1,4 +1,9 @@
{ {
deployment.tags = [ "arm" ]; system = "aarch64-linux";
deployment = {
tags = [ "arm" ];
targetHost = "eetion-02";
targetUser = "h";
};
role = "embedded"; role = "embedded";
} }

View File

@@ -1 +0,0 @@
"aarch64-linux"

View File

@@ -1,27 +1,19 @@
{ pkgs, ... }: { pkgs, config, ... }:
# Orange Pi Zero2 H616 # Orange Pi Zero2 H616
# See <https://nixos.wiki/wiki/NixOS_on_ARM/Orange_Pi_Zero2_H616> # See <https://nixos.wiki/wiki/NixOS_on_ARM/Orange_Pi_Zero2_H616>
let
username = "h";
hostName = "eetion";
in
{ {
imports = [ imports = [
./hard.nix ./hard.nix
./host.nix
../../modules/common
../../modules/ssh ../../modules/ssh
../../modules/tailscale
# ../../modules/uptime-kuma # ../../modules/uptime-kuma
]; ];
ssh = { tailscale.enable = true;
inherit username;
publicHostname = "eetion";
authorizedHosts = [
"andromache"
"astyanax"
];
};
boot.loader = { boot.loader = {
grub.enable = false; grub.enable = false;
@@ -29,7 +21,7 @@ in
}; };
networking = { networking = {
inherit hostName; hostName = config.host.name;
networkmanager.enable = true; networkmanager.enable = true;
firewall = { firewall = {
enable = true; enable = true;
@@ -44,7 +36,7 @@ in
users.users = { users.users = {
root.hashedPassword = "!"; root.hashedPassword = "!";
${username} = { ${config.host.username} = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" ];
}; };
@@ -57,19 +49,19 @@ in
enable = true; enable = true;
passwordFile = "/etc/paperless-admin-pass"; passwordFile = "/etc/paperless-admin-pass";
settings = { settings = {
PAPERLESS_URL = "http://paperless.eetion"; PAPERLESS_URL = "http://paperless.${config.host.name}";
}; };
}; };
# added (OPNSense) domain override to make this work on LAN # added (OPNSense) domain override to make this work on LAN
# #
# host: eetion # host: <host-name>
# domain: <domain (e.g. lan)> # domain: <domain (e.g. lan)>
# ip address: <eetion-ip> # ip address: <host-ip>
# #
# host: paperless # host: paperless
# domain: eetion # domain: <host-name>
# ip address: <eetion-ip> # ip address: <host-ip>
nginx = { nginx = {
enable = true; enable = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;
@@ -78,13 +70,13 @@ in
recommendedTlsSettings = true; recommendedTlsSettings = true;
virtualHosts = { virtualHosts = {
"eetion" = { "${config.host.name}" = {
default = true; default = true;
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:5006"; proxyPass = "http://127.0.0.1:5006";
}; };
}; };
"paperless.eetion" = { "paperless.${config.host.name}" = {
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:28981"; proxyPass = "http://127.0.0.1:28981";
}; };
@@ -100,7 +92,13 @@ in
oci-containers = { oci-containers = {
backend = "podman"; backend = "podman";
containers.actualbudget = { containers.actualbudget = {
image = "docker.io/actualbudget/actual-server:latest-alpine"; image = "docker.io/actualbudget/actual-server:26.4.0-alpine";
imageFile = pkgs.dockerTools.pullImage {
imageName = "docker.io/actualbudget/actual-server";
imageDigest = "sha256:996f3a59d297ec9699cb36ce558b61ab16d79c76763a5c3158d5387f71161499";
sha256 = "sha256-81On59dSFBNeIjNJEm93b01EldYga2liiztXhjiVoj4=";
finalImageTag = "26.4.0-alpine";
};
ports = [ "5006:5006" ]; ports = [ "5006:5006" ];
volumes = [ "/var/lib/actualbudget:/data" ]; volumes = [ "/var/lib/actualbudget:/data" ];
}; };

5
hosts/eetion/host.nix Normal file
View File

@@ -0,0 +1,5 @@
{
host = {
username = "h";
};
}

View File

@@ -1,4 +1,9 @@
{ {
deployment.tags = [ "arm" ]; system = "aarch64-linux";
deployment = {
tags = [ "arm" ];
targetHost = "eetion";
targetUser = "h";
};
role = "embedded"; role = "embedded";
} }

View File

@@ -1 +0,0 @@
"aarch64-linux"

View File

@@ -1,35 +1,24 @@
{ {
inputs, inputs,
pkgs, pkgs,
config,
... ...
}: }:
# Also see <https://wiki.nixos.org/wiki/Install_NixOS_on_Hetzner_Cloud> # Also see <https://wiki.nixos.org/wiki/Install_NixOS_on_Hetzner_Cloud>
let
username = "username";
hostName = "hecuba";
in
{ {
imports = [ imports = [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
../../modules/common
./hard.nix ./hard.nix
./host.nix
../../modules/common
../../modules/ssh ../../modules/ssh
../../modules/docker ../../modules/docker
]; ];
networking.hostName = hostName; networking.hostName = config.host.name;
ssh = { docker.enable = true;
inherit username;
publicHostname = "server.hektormisplon.xyz";
authorizedHosts = [
"andromache"
"astyanax"
];
};
docker.user = username;
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-label/nixos"; device = "/dev/disk/by-label/nixos";
@@ -50,7 +39,7 @@ in
users.users = { users.users = {
root.hashedPassword = "!"; root.hashedPassword = "!";
username = { ${config.host.username} = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" ];
}; };
@@ -69,6 +58,7 @@ in
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim vim
git git
kitty.terminfo
]; ];
services.fail2ban = { services.fail2ban = {

5
hosts/hecuba/host.nix Normal file
View File

@@ -0,0 +1,5 @@
{
host = {
username = "username";
};
}

View File

@@ -1,4 +1,9 @@
{ {
deployment.tags = [ "cloud" ]; system = "x86_64-linux";
deployment = {
tags = [ "cloud" ];
targetHost = "server.hektormisplon.xyz";
targetUser = "username";
};
role = "server"; role = "server";
} }

View File

@@ -1 +0,0 @@
"x86_64-linux"

View File

@@ -1,44 +1,34 @@
{ {
lib,
inputs, inputs,
config, config,
pkgs,
... ...
}: }:
let
username = "h";
hostName = "vm";
in
{ {
imports = [ imports = [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
../../modules/common
./hard.nix ./hard.nix
inputs.sops-nix.nixosModules.sops ./host.nix
./disk.nix ./disk.nix
../../modules/boot/bootloader.nix ../../modules/common
../../modules/keyboard ../../modules/anki
(import ../../modules/networking { inherit hostName; })
../../modules/users
../../modules/audio ../../modules/audio
../../modules/localization ../../modules/boot/bootloader.nix
../../modules/x
../../modules/fonts ../../modules/fonts
../../modules/git
../../modules/keyboard
../../modules/localization
../../modules/networking
../../modules/ai-tools
../../modules/ssh ../../modules/ssh
../../modules/storage ../../modules/storage
(import ../../modules/secrets { ../../modules/stylix
inherit lib inputs config; ../../modules/secrets
}) ../../modules/taskwarrior
../../modules/users
../../modules/x
]; ];
home-manager.users.${username} = import ../../home/hosts/vm { home-manager.users.${config.host.username} = import ../../home/hosts/vm;
inherit inputs config pkgs;
};
networking.hostName = hostName;
ssh.username = username;
secrets.username = username;
disko = { disko = {
devices.disk.main = { devices.disk.main = {

Some files were not shown because too many files have changed in this diff Show More