Compare commits

..

377 commits
clan ... main

Author SHA1 Message Date
01f9ce7503 infra: add missing wireguard dns records 2026-01-20 15:52:31 +01:00
1ef49241b4 remove wofi-emoji 2026-01-20 15:32:04 +01:00
3d5695c9b3 helix: auto-format ocaml 2026-01-19 22:40:41 +01:00
de32fe0db0 migrate infra to terranix 2026-01-19 22:38:28 +01:00
32c4eeb2f8 add terranix 2026-01-19 22:37:34 +01:00
f1e06aaead Update secret hcloud-token 2026-01-19 15:49:10 +01:00
93b923c146 rename nixfmt-rfc-style -> nixfmt 2026-01-18 17:06:18 +01:00
123c3edb0e update flake inputs 2026-01-18 14:11:52 +01:00
6bb5625bc7 enable nix pipe-operators 2026-01-17 17:32:25 +01:00
65792b7ad4 add rage 2026-01-17 17:30:57 +01:00
8b9ab0b215 change default user shell to fish 2026-01-17 17:30:00 +01:00
f3d5f8e5d7 update flake inputs 2026-01-17 17:27:23 +01:00
a8d52b0473 update garage crocus hostname 2026-01-10 13:04:58 +01:00
a36f64cb93 add direnv-instant 2026-01-10 13:03:55 +01:00
1e8e04bf24 enable pcscd for yubikey 2026-01-06 15:51:35 +01:00
87e589e690 add .val search domain 2026-01-06 15:50:45 +01:00
c9953d269b remove gandi acme 2026-01-06 15:48:51 +01:00
d162591696 infra: allow more recent ovh versions 2026-01-06 15:47:03 +01:00
4ce5811615 update flake inputs 2026-01-06 15:46:21 +01:00
600e2c26c9 add vaultwarden 2026-01-06 15:46:18 +01:00
d3201fbca9 move coredns to port 53 to allow access on android 2026-01-06 15:43:40 +01:00
2063550f93 setup internal CA 2026-01-06 15:43:17 +01:00
dda8ca5d0f move services to internal clan tld 2026-01-06 15:43:17 +01:00
9e3d99231d infra: allow more recent version of ovh provider 2026-01-03 23:43:01 +01:00
c79df328de infra: fix terrible copypasta 2026-01-03 23:41:23 +01:00
7a8b12bba4 infra: remove gandi 2026-01-03 23:41:11 +01:00
caa0179f1d refactor nix module list 2026-01-03 22:57:19 +01:00
d2c624fe9c genepi: remove mpd 2026-01-03 22:26:56 +01:00
3a2dd0cc0b configure email for aerc 2026-01-03 22:24:11 +01:00
afb8dd50f4 niri: reserve first workspace for web 2026-01-03 22:21:52 +01:00
82a559e81a remove deleted vars 2026-01-03 22:21:28 +01:00
f8fb7a2480 add passage 2026-01-03 22:20:52 +01:00
410f63eb31 add jjui 2026-01-03 22:20:36 +01:00
2b2b5d30c7 migrate rpqt.fr domain to OVH 2026-01-03 22:17:25 +01:00
964b9b5b4e add age-plugin-yubikey for clan vars 2026-01-03 22:15:49 +01:00
010c53b6ad remove sway config and outdated dotfiles 2026-01-03 22:11:35 +01:00
e7ce8dba6d cleanup flake inputs 2026-01-03 22:11:35 +01:00
2d8bf05283 Add key(s) for user rpqt to secrets 2025-12-31 00:22:18 +01:00
3206d3f476 Add key(s) for user rpqt to secrets 2025-12-31 00:21:10 +01:00
7d34c5c7c0 add delta diff for nixpkgs-review 2025-12-27 18:23:45 +01:00
9c266bf1df remove taskwarrior 2025-12-27 18:23:30 +01:00
2eb70b7108 dms: use nixpkgs version 2025-12-18 17:43:03 +01:00
3dbb7e4a7e update flake inputs 2025-12-18 17:43:03 +01:00
e0ffd779f0 niri: use dms generated config files 2025-12-18 17:42:59 +01:00
421e978aa4 home-manager: set EDITOR explicitly 2025-12-18 16:46:06 +01:00
5356d3043f haze: remove deprecated nameservers 2025-12-12 23:24:00 +01:00
ae8d0f69e1 haze: add typst and anki 2025-12-12 23:23:00 +01:00
25189d72f2 niri: use dms to change display brightness 2025-12-12 23:21:53 +01:00
13b4a15aee vicinae: add config 2025-12-12 23:20:44 +01:00
8d328aecf3 garage: also listen on wireguard network 2025-12-12 23:16:29 +01:00
4f197b4319 vicinae: remove input and use home-manager option 2025-12-12 23:15:47 +01:00
3cc9ddccb6 update flake inputs 2025-12-12 19:34:58 +01:00
d92ea6d742 move radicle module 2025-12-12 19:34:58 +01:00
0096acaf81 radicle: add pinned repositories 2025-12-12 19:24:54 +01:00
299bf4ea85 genepi: add password for synchthing-gui 2025-12-01 23:43:40 +01:00
5d329ed845 update flake inputs 2025-12-01 23:41:11 +01:00
f970fc0623 Update vars via generator syncthing-gui for machine genepi 2025-11-29 14:06:57 +01:00
4474dbad90 remove ignis desktop 2025-11-27 16:08:18 +01:00
eb16cd96fa add atuin key as clan var 2025-11-27 16:07:36 +01:00
b917f503da Update vars via generator atuin for machine haze 2025-11-27 15:56:54 +01:00
f7700cadd5 add pixel-7a to wireguard network
Hard-coded for now until clan-core/wireguard
supports external peers.
2025-11-27 14:56:53 +01:00
b84078220c remove unbound dns auth-zone
This was moved to coredns to avoid confusion
between the authoritative server and the local
resolver.
2025-11-27 14:55:26 +01:00
09f57a1e6f clan: migrate internal DNS to coredns service
Currently using a patched version of the upstream
coredns service, with hard-coded IPs until
wireguard exports are supported.

Zerotier connections were flaky and wireguard
seems more stable (although it seems to have a bit
less throughput).
2025-11-27 14:52:45 +01:00
de99dad887 clan: add temporary patched coredns service
Needed for IPv6 support, and to set the host names
in the auth zone.
2025-11-27 14:50:44 +01:00
e1219f26c3 borg: accept new ssh host keys 2025-11-27 14:48:44 +01:00
26600f0647 ssh: add hostnames 2025-11-24 17:39:44 +01:00
33721c639c verbena: remove default acme email 2025-11-24 17:39:44 +01:00
680def4278 genepi: open web ports to wireguard network 2025-11-24 17:39:44 +01:00
18cb4dfc1c sq 2025-11-24 17:39:44 +01:00
a81d006e64 clan: use infra output IPs for internet connector 2025-11-24 17:19:27 +01:00
6e14a60047 genepi: add terminfo 2025-11-24 17:18:01 +01:00
7f80af6b0c set adwaita as default font 2025-11-24 17:17:25 +01:00
64c00fe618 vicinae: use nixpkgs package 2025-11-24 17:15:24 +01:00
d7243cc7c3 verbena: replace IP literals with infra ouputs 2025-11-24 17:13:57 +01:00
649f58d875 home-manager: add yazi 2025-11-24 17:13:13 +01:00
c9e10e4081 update flake inputs 2025-11-24 17:12:52 +01:00
5f6ba8e29d infra: add flake module and crocus exports 2025-11-24 17:12:29 +01:00
925cf3140c Update vars via generator step-intermediate-cert for machine verbena 2025-11-22 15:02:45 +01:00
bfe95b15ef Update vars via generator step-intermediate-key for machine verbena 2025-11-22 15:02:44 +01:00
0a232abe5f Update vars via generator step-ca for machine crocus 2025-11-22 15:02:44 +01:00
a0bec48175 nautilus: enable thumbnails for remote directories 2025-11-21 23:29:48 +01:00
080ec61675 genepi: remove taskchampion (unused) 2025-11-21 23:29:26 +01:00
3b9f67c0ff haze: add anytype 2025-11-21 23:27:34 +01:00
f99575598c nautilus: add "open in ghostty" menu 2025-11-21 23:26:57 +01:00
5ddfda7187 clan: set tld to .val 2025-11-21 23:25:53 +01:00
7256b7fbc3 clan: add wireguard 2025-11-21 23:25:29 +01:00
abaf429a38 verbena: configure IPv6 from tofu outputs 2025-11-21 23:24:22 +01:00
3834f215f0 Update vars via generator wireguard-network-wireguard for machine genepi 2025-11-21 17:53:26 +01:00
75b2307f82 Update vars via generator wireguard-keys-wireguard for machine genepi 2025-11-21 17:53:26 +01:00
98653cb2e6 Update vars via generator wireguard-network-wireguard for machine crocus 2025-11-21 17:53:25 +01:00
11c3e87132 Update vars via generator wireguard-keys-wireguard for machine crocus 2025-11-21 17:53:25 +01:00
08f14e8d9f Update vars via generator wireguard-network-wireguard for machine haze 2025-11-21 17:24:47 +01:00
e42cb7edd3 Update vars via generator wireguard-keys-wireguard for machine haze 2025-11-21 17:24:47 +01:00
575e78e473 Update vars via generator wireguard-network-wireguard for machine verbena 2025-11-21 16:59:22 +01:00
92e49d0c9c Update vars via generator wireguard-keys-wireguard for machine verbena 2025-11-21 16:59:22 +01:00
c048448b6a update flake inputs 2025-11-21 13:07:13 +01:00
24e8d8e823 glance: fix pinchflat icon 2025-11-17 21:53:17 +01:00
267807ae66 vicinae: link config file instead of generating it 2025-11-17 18:51:28 +01:00
9577209e67 glance: add prometheus 2025-11-17 18:50:00 +01:00
3f71e191f9 nextcloud: move db init to clan 2025-11-17 18:48:46 +01:00
53b1264c44 clanServices/prometheus: fix IPv6 address brackets 2025-11-17 18:46:54 +01:00
20b4d300ee clan: move monitoring to its own file 2025-11-17 18:46:43 +01:00
740ed6725a move clan config to its own directory 2025-11-14 20:12:02 +01:00
a680d58664 ghostty: use bigger font 2025-11-14 17:27:57 +01:00
00d9b8f4ae niri: don't spawn vicinae server (user service) 2025-11-14 17:26:16 +01:00
8f2f922d45 alacritty: only link the config file (not dir) 2025-11-14 17:25:37 +01:00
ca14d549af add gh and nixpkgs-review 2025-11-14 17:15:40 +01:00
e5b17dad1e use vicinae launcher again (themed) 2025-11-11 23:15:52 +01:00
b86866f121 update flake inputs 2025-11-11 23:15:08 +01:00
722ba001fb ghostty: don't inherit cwd from other windows 2025-11-10 17:09:01 +01:00
c2afe72d3f helix: add script to reload on dark mode change 2025-11-10 16:43:49 +01:00
31e42cc178 niri: update for switch to dms and ghostty 2025-11-05 14:19:14 +01:00
504ed6223f ghostty: actually disable all ligatures 2025-11-05 14:16:40 +01:00
7cccb80945 update(inventory.json): Update information about machine haze 2025-11-03 23:51:16 +01:00
7ea8896b4a update(inventory.json): Update information about machine genepi 2025-11-03 23:49:21 +01:00
38ae40ee0b add wifi hotspot tool 2025-11-03 23:14:40 +01:00
3ffe2ffb31 prometheus: open web interface firewall on vpn 2025-11-03 23:13:57 +01:00
f5ebc063e3 build crocus on haze 2025-11-03 23:13:14 +01:00
d8ef2127ca ghostty: disable ligatures 2025-11-03 23:12:42 +01:00
be9651d3ec update flake inputs 2025-11-03 23:10:10 +01:00
29845aa117 add description of prometheus service 2025-10-30 15:00:12 +01:00
aa4e7c7b45 use token for garage metrics access 2025-10-29 13:03:59 +01:00
76568198f0 prometheus: monitor verbena's garage instance 2025-10-29 13:03:23 +01:00
d358695cb2 fix runtime prometheus metrics token access 2025-10-29 13:02:32 +01:00
cbac9fb3ef add mkDefault to gc config 2025-10-29 13:01:47 +01:00
282a02d55c fix missing lines in server module 2025-10-29 13:00:30 +01:00
0a4de86576 auto format rust 2025-10-29 12:58:43 +01:00
c0bcbe4f28 add aseprite 2025-10-29 12:58:24 +01:00
d4cdd13de2 add additionnal disk to crocus for garage 2025-10-29 12:57:16 +01:00
454d349bb3 allow garage admin endpoint access on zerotier 2025-10-29 12:56:42 +01:00
fac6d2f861 link ssh config 2025-10-29 12:55:18 +01:00
193aff6ee2 jj: write change id header 2025-10-29 12:54:08 +01:00
a879221ced fix tf typo 2025-10-29 12:53:45 +01:00
1548378ef7 Update vars via generator gandi for machine genepi 2025-10-29 12:45:15 +01:00
f0f57dc994 Update vars via generator gandi for machine verbena 2025-10-29 12:44:19 +01:00
d1d392e372 remove nextcloud internal domain redirection 2025-10-24 17:15:58 +02:00
f82874d308 fix nextcloud s3 host address 2025-10-24 17:15:33 +02:00
743bb93534 Update var garage/metrics_token for machine genepi 2025-10-22 15:52:11 +02:00
dd69cfcdb0 Update var garage/metrics_token for machine crocus 2025-10-22 15:51:53 +02:00
edd397390c Update var garage/metrics_token for machine genepi 2025-10-22 15:49:20 +02:00
018b597004 Update var garage/metrics_token for machine crocus 2025-10-22 15:49:11 +02:00
b66e5d1301 Update var garage/metrics_token for machine genepi 2025-10-22 15:46:08 +02:00
fd6eef2e95 Update var garage/metrics_token for machine crocus 2025-10-22 15:45:42 +02:00
ce357923c0 fix nextcloud s3 endpoint 2025-10-19 23:09:00 +02:00
cd8370ae4d add motd 2025-10-19 23:07:02 +02:00
0183d9397a add fake install dates for clan-app 2025-10-19 23:06:11 +02:00
ccb9becde5 update flake inputs 2025-10-18 19:00:18 +02:00
88ebb508bf allow s3 api access on zerotier network 2025-10-18 18:59:45 +02:00
c5a631b990 remove genepi nix-gc config (already set globally) 2025-10-18 18:59:06 +02:00
f2dc0e6b2f move genepi installer to another file 2025-10-18 18:57:10 +02:00
81c3724ff7 migrate gitea from crocus to verbena 2025-10-18 18:56:34 +02:00
838ff7ed6b migrate nextcloud from crocus to verbena 2025-10-18 18:55:52 +02:00
53c5cd6705 add ghostty light theme 2025-10-18 18:52:24 +02:00
a47f3fa886 Update vars via generator nextcloud-s3-storage for machine verbena 2025-10-17 17:13:15 +02:00
57634120b2 Update vars via generator nextcloud for machine verbena 2025-10-17 17:13:14 +02:00
4ac5adaba6 Update vars via generator gitea-s3-storage for machine verbena 2025-10-17 17:13:14 +02:00
73d4a54ea1 Add crocus to secret 2025-10-17 12:30:25 +02:00
2adad42fe7 Add verbena to secret 2025-10-17 12:30:24 +02:00
ebf864ffb9 format file 2025-10-15 21:27:43 +02:00
da2f40a750 Add genepi to secret 2025-10-15 18:45:12 +02:00
fd0d316b00 Update vars via generator openssh-cert for machine verbena 2025-10-15 16:18:29 +02:00
aaf78035c3 Update vars via generator openssh-cert for machine haze 2025-10-15 16:18:28 +02:00
54ad3237d0 Update vars via generator openssh-cert for machine genepi 2025-10-15 16:18:28 +02:00
25aa87e038 Update vars via generator openssh-cert for machine crocus 2025-10-15 16:18:28 +02:00
c80321c878 Update vars via generator openssh-ca for machine verbena 2025-10-15 16:18:28 +02:00
cc0a910c0e add whitesur icon theme 2025-10-10 15:27:22 +02:00
d8ca6d235f enable dank shell 2025-10-10 15:26:51 +02:00
db27b0ac0f niri: maximize thunderbird 2025-10-10 15:17:10 +02:00
70babab8ec add auto nix gc on servers 2025-10-09 16:26:59 +02:00
5c709f9a5d add radicle desktop and tui 2025-10-09 15:11:10 +02:00
405c629a3b move terminal configs to its own module 2025-10-09 15:09:24 +02:00
ce5b609747 garage: bind to zerotier ip 2025-10-08 12:22:15 +02:00
c559b28c93 fix missing module arg 2025-10-08 12:21:43 +02:00
6dc1e11a54 add libreoffice 2025-10-08 12:19:37 +02:00
23768f3a0c git ignore niri dms config (dynamic) 2025-10-08 12:14:52 +02:00
6c1905fa5c fix networkmanager vpn extensions 2025-10-08 12:14:01 +02:00
72b6683b7b remove waypaper 2025-10-08 12:13:46 +02:00
4ea5ab0550 refactor desktop modules 2025-10-08 12:13:34 +02:00
e667e36c4b fix vicinae toggle 2025-10-08 12:11:32 +02:00
73c149ea32 stop using vicinae cache 2025-10-08 12:11:02 +02:00
395deb4093 add dank material shell 2025-10-08 12:09:10 +02:00
ee1d81ede2 update flake inputs 2025-10-04 12:14:55 +02:00
9e9fcc053f fixup: include home-manager flake module 2025-10-04 12:14:27 +02:00
1e6756cac9 fixup: re-enable userborn 2025-10-04 12:14:01 +02:00
285bcc01e2 disable radicle node web description (bug) 2025-10-03 22:54:58 +02:00
1cc8b6b70a restrict nix remote builder ssh to nix daemon
Snippet taken from SrvOS
2025-10-03 22:52:34 +02:00
f2cf7d36de remove "parts" directory and restructure modules 2025-10-03 22:51:26 +02:00
4b26b8da52 remove old agenix secrets 2025-10-03 22:15:28 +02:00
d1f810ee2d update READMEs 2025-10-03 22:15:13 +02:00
48c5929dfd restructure home-manager modules 2025-10-03 22:14:46 +02:00
69f948a677 remove home-manager from genepi 2025-10-03 22:10:39 +02:00
b9cf768802 disable pager in default jj command 2025-10-02 22:05:23 +02:00
ccea34e7e7 add jj stupid tricks 2025-10-02 20:42:56 +02:00
a1f4e90098 add jj per-directory identity 2025-10-02 20:38:54 +02:00
86c53bea37 add desktop module 2025-10-02 07:50:20 +02:00
eec721d549 update flake inputs 2025-10-01 20:58:40 +02:00
4fefe6f289 Update var buildbot/webhook-secret for machine verbena 2025-10-01 19:32:27 +02:00
f65febc49e fix buildbot icon in glance 2025-10-01 16:09:50 +02:00
570049a049 add radicle to glance 2025-10-01 14:37:33 +02:00
6d3c8a92c4 add buildbot 2025-10-01 14:29:49 +02:00
1a42b79c81 setup radicle node again 2025-10-01 14:22:02 +02:00
00967e3852 Update vars via generator radicle for machine crocus 2025-10-01 13:37:19 +02:00
a03ae3e321 Update vars via generator radicle for machine crocus 2025-10-01 13:35:08 +02:00
b720ebe07e Update vars via generator buildbot for machine verbena 2025-09-30 22:24:05 +02:00
35a7d874f2 Update vars via generator buildbot for machine verbena 2025-09-30 22:09:23 +02:00
da09c98948 Update vars via generator buildbot for machine verbena 2025-09-30 21:48:05 +02:00
ec52a4b165 Update vars via generator buildbot-worker for machine verbena 2025-09-30 21:23:50 +02:00
750af04af2 Update vars via generator buildbot for machine verbena 2025-09-30 20:24:07 +02:00
d9e15e92d6 add nextcloud tasks 2025-09-30 11:52:24 +02:00
1f7ac9b044 setup backups of verbena 2025-09-28 22:35:02 +02:00
2e68ab90da shorten admin module machine list 2025-09-28 21:57:33 +02:00
3cf7b2bfaf Update vars via generator borgbackup for machine verbena 2025-09-25 01:04:29 +02:00
ac511f752a add dns entry for haze 2025-09-24 23:23:25 +02:00
7b0b3ac084 add vicinae launcher 2025-09-23 15:56:39 +02:00
d91aabd3c0 unset ghostty font
JetBrains Mono is the default font and now ghostty works even without a
patched font (it includes the additionnal symbols)
2025-09-23 15:12:03 +02:00
e772e68c16 add krakow weather to glance 2025-09-23 15:11:46 +02:00
d09d53690f add clan gui 2025-09-22 16:24:40 +02:00
aad49126e5 move nextcloud to cloud.rpqt.fr 2025-09-22 16:13:22 +02:00
cc04ad425d add shelly home assistant integration 2025-09-22 16:12:44 +02:00
bc5c2bd428 update niri config for double monitors 2025-09-22 16:12:11 +02:00
262ad997d8 fix for acme-home module 2025-09-22 16:10:51 +02:00
233c898530 add dns config for verbena 2025-09-22 16:09:13 +02:00
e1bd742247 Update vars via generator gandi for machine verbena 2025-09-16 20:39:20 +02:00
e83ae422ce fix garage own node address detection 2025-09-15 22:05:21 +02:00
f0c12de11c don't import tailscale on genepi (broken build) 2025-09-15 22:04:24 +02:00
8ed426cca9 fix nextcloud 2025-09-15 22:03:36 +02:00
3616993be8 add machine verbena 2025-09-15 22:01:51 +02:00
4f2d448d6f update flake inputs 2025-09-15 21:59:41 +02:00
f2a76156c9 remove nix-topology 2025-09-15 21:59:35 +02:00
c44f08d6be update(inventory.json): Installed verbena at root@covoiturage.turifer.dev 2025-09-12 01:25:20 +02:00
f62d7a4cde update(inventory.json): Installed verbena at root@covoiturage.turifer.dev 2025-09-12 00:57:50 +02:00
00078bf283 cleanup unused vars (s3 access key id is public) 2025-09-12 00:53:49 +02:00
731c784b70 add nextcloud 2025-09-12 00:52:52 +02:00
b0a539fea4 Set disk schema of machine: verbena to single-disk 2025-09-12 00:43:45 +02:00
b2c0898dc9 update(inventory.json): Installed verbena at ubuntu@covoiturage.turifer.dev 2025-09-12 00:33:59 +02:00
21598ada20 Update vars via generator zerotier for machine verbena 2025-09-12 00:30:18 +02:00
10f2a46b8d Update vars via generator state-version for machine verbena 2025-09-12 00:27:09 +02:00
6533061a3d Update vars via generator root-password for machine verbena 2025-09-12 00:27:07 +02:00
2b59c01fb0 Update vars via generator openssh for machine verbena 2025-09-12 00:27:04 +02:00
2f6f4eb760 Update vars via generator garage for machine verbena 2025-09-12 00:27:00 +02:00
76b9982f77 Add verbena to secret 2025-09-12 00:26:58 +02:00
d9f563ff3b Add machine verbena to secrets 2025-09-12 00:26:58 +02:00
a5cfa0b51d Update secret verbena-age.key 2025-09-12 00:26:58 +02:00
038f731d04 Update vars via generator nextcloud-s3-storage for machine crocus 2025-09-11 22:52:22 +02:00
c685a980d0 Update vars via generator gandi for machine crocus 2025-09-11 22:41:34 +02:00
55a087d946 Update vars via generator nextcloud-s3-storage for machine crocus 2025-09-11 22:22:28 +02:00
0c585d1b68 Update vars via generator nextcloud for machine crocus 2025-09-11 22:22:27 +02:00
53a444298a add home assistant to glance 2025-09-11 21:36:11 +02:00
efe09bebe4 update flake inputs 2025-09-11 18:47:01 +02:00
ebdbb3fb35 fix cert renewal failure
Somehow the local unbound instance seems to fail to resolve some queries
during the renewal process.
2025-09-11 18:46:42 +02:00
2ea7fa983c use nix version of home assistant 2025-09-11 18:46:42 +02:00
ac51739c56 move actual and immich state to their namespaces 2025-09-11 18:46:42 +02:00
4648d28ac0 add gitea state dir to clan backups 2025-09-11 18:46:40 +02:00
d3257336fc re-enable immich 2025-09-04 20:36:48 +02:00
dc92c05616 rename zerotier instance to just "zerotier" 2025-09-04 20:33:38 +02:00
628abe646f add internet deploy target for crocus 2025-09-04 20:33:03 +02:00
90f2c8ab2e remove broken avahi (it was actually garage...) 2025-09-04 20:32:21 +02:00
0ca67e1303 let clan find the deploy targets by itself 2025-09-04 20:28:59 +02:00
1f9d0663b3 update flake inputs 2025-09-04 20:26:55 +02:00
5238012ee5 add website links in glance 2025-09-04 20:26:38 +02:00
fcc5d5a614 add lounge (internal website) 2025-09-04 20:26:38 +02:00
e672fe13f9 add gmail account 2025-09-04 20:21:33 +02:00
5655129770 fix(prometheus): missing full path in stateDir 2025-09-01 20:25:50 +02:00
1b8db35058 mark jj default diff editor as ok 2025-08-25 23:21:50 +02:00
9923396809 renamed clan option 2025-08-25 23:21:29 +02:00
1b0963680c add pinchflat 2025-08-25 23:20:27 +02:00
78556d6159 add weather for Saint-Michel 2025-08-25 08:06:34 +02:00
f3aa929cf5 migrate syncthing config to clan 2025-08-25 07:31:10 +02:00
dce89a70fb fix genepi timezone 2025-08-25 07:30:00 +02:00
f5c12b8457 use systemd credentials for gitea 2025-08-25 07:28:37 +02:00
713c2c5b58 deploy prometheus clan service 2025-08-25 07:27:21 +02:00
a7d835cdee add AGH email 2025-08-25 07:24:26 +02:00
f463644f1b create prometheus clan service 2025-08-25 07:23:58 +02:00
dc5ffa3c66 update flake inputs 2025-08-25 07:23:36 +02:00
c51c1c9dbc setup ignis with home-manager (fixes dependencies) 2025-08-25 07:22:16 +02:00
d78c8a13ea Update vars via generator syncthing for machine haze 2025-08-21 21:57:40 +02:00
0a3596310d Update vars via generator syncthing for machine genepi 2025-08-21 20:39:02 +02:00
d1c88bc832 update flake inputs 2025-08-20 21:26:35 +02:00
5f5b2b7380 Update vars via generator syncthing for machine haze 2025-08-20 21:06:33 +02:00
dce2fec55d Update vars via generator garage for machine haze 2025-08-20 21:06:32 +02:00
dcf1e6d4f6 Add haze to secret 2025-08-20 21:03:15 +02:00
1bbd0c2c62 Update vars via generator gitea-s3-storage for machine crocus 2025-07-26 19:18:51 +02:00
d5110c0f1b run unbound on genepi 2025-07-24 19:07:25 +02:00
f8c5846692 use a template for turifer.dev zone file 2025-07-24 19:05:20 +02:00
5940f73370 merge remotes 2025-07-23 23:06:33 +02:00
1353aa7286 add actual and gitea to glance 2025-07-23 22:53:13 +02:00
512c61a39f use selft.ht icons for glance 2025-07-23 22:52:51 +02:00
6f3b639ee8 git unignore .config (to browse it in helix) 2025-07-23 00:04:07 +02:00
3cf1f977f3 add actual (budget app) 2025-07-23 00:03:32 +02:00
a3244a4e9b set timezone on a per-machine basis 2025-07-22 23:44:25 +02:00
ea57526a5a add srvos 2025-07-22 23:42:55 +02:00
afb50e53ff update flake inputs 2025-07-22 19:42:27 +02:00
862cdcda9b migrate from clan disk-id to standalone disko 2025-07-20 20:49:31 +02:00
c72f0a9c51 add jj "s" alias 2025-07-20 17:04:33 +02:00
b8a0c96cc9 add hyprland (to properly try caelestia-shell) 2025-07-19 19:32:19 +02:00
f1436f0041 update flake inputs 2025-07-19 19:31:25 +02:00
b0cf958d39 fix haze syncthing 2025-07-19 18:51:10 +02:00
5c4664b885 fix genepi zerotier vars that were not commited 2025-07-19 18:49:43 +02:00
0337f379b4 add reverse-proxy for genepi's syncthing 2025-07-19 18:48:09 +02:00
db352afea0 exclude haze from clan machine update 2025-07-19 18:48:09 +02:00
4332ef2fa6 add home nameservers and search domains on haze 2025-07-19 18:48:09 +02:00
898a75df1c remove sway and hyprland specialisations 2025-07-19 18:48:09 +02:00
2d89107f15 add quickshell 2025-07-19 18:48:09 +02:00
fecdae8032 move borgbackup to clan.services 2025-07-19 18:48:09 +02:00
16116fe681 fix user password not being generated 2025-07-19 18:48:09 +02:00
1c76f46e5c add garage instance 2025-07-19 18:48:09 +02:00
97e8b1f963 use gnome-keyring and remove other ssh-agent 2025-07-19 18:48:09 +02:00
bf070bae60 enable using tailscale exit nodes from haze 2025-07-19 18:48:09 +02:00
6594911705 migrate state-version to clan.services 2025-07-19 18:48:09 +02:00
c6cf81dba5 migrate clan trusted-nix-caches to clan.services 2025-07-19 18:48:09 +02:00
bc2a43262a update syntax for setting clan targetHost 2025-07-19 18:48:09 +02:00
bacaf6d5b6 setup unbound dns 2025-07-19 18:38:55 +02:00
c4cefeea54 setup avahi 2025-07-19 18:03:47 +02:00
ed5a50d996 add genepi's syncthing to glance 2025-07-19 18:03:47 +02:00
8b3841a87f remove agenix and migrate secrets to clan vars
squash this
2025-07-19 18:03:47 +02:00
b91a52da5e enable running tailscale exit node on crocus 2025-07-18 00:03:13 +02:00
135e56c288 revert niri window movement bindings to default 2025-07-18 00:01:03 +02:00
caa3080f5f update outdated jj config and include schema 2025-07-17 23:59:01 +02:00
255f2ccfa6 link jj config 2025-07-17 23:57:59 +02:00
a01e4c26f5 remove devenv 2025-07-17 23:57:40 +02:00
69ce708f8f fix unnecessary thunderbird account integration 2025-07-17 23:55:49 +02:00
24379e16fd import helix config as files (not dir) 2025-07-17 23:54:49 +02:00
88f095143c update flake inputs 2025-07-17 23:53:45 +02:00
fc79110d91 add git.turifer.dev dns records 2025-07-17 23:52:57 +02:00
ee84c83582 setup dns for turifer.dev mail 2025-07-17 23:52:12 +02:00
1493d2ec0b update terraform hcloud provider 2025-07-17 23:49:28 +02:00
93fe2bbf5a add gitea 2025-07-17 23:46:40 +02:00
79304f83c6 add garage to devshell 2025-07-17 23:40:26 +02:00
95e1765944 Update vars via generator gitea-s3-storage for machine crocus 2025-07-17 21:36:54 +02:00
43e7880f6d Update vars via generator gitea-s3-storage for machine crocus 2025-07-17 20:25:53 +02:00
42c90d717e Update vars via generator gitea-s3-storage for machine crocus 2025-07-17 20:22:24 +02:00
9ba9797fc3 Update vars via generator gitea-s3-storage for machine crocus 2025-07-17 20:21:03 +02:00
5c86ba4d61 Update vars via generator gitea-s3-storage for machine crocus 2025-07-17 19:54:37 +02:00
Romain Paquet
be672dd092 add dotbot to link windows dots 2025-07-17 14:36:59 +02:00
Romain Paquet
1036ec9e2c add nushell config 2025-07-17 14:36:19 +02:00
2b4eb2c966 Update vars via generator syncthing for machine haze 2025-07-02 20:18:27 +02:00
61b13557fb enable userborn to fix password issues 2025-06-27 17:11:42 +02:00
00926a5373 add python3 2025-06-27 17:10:35 +02:00
a1b36e1bf3 Update vars via generator freshrss for machine genepi 2025-06-26 23:37:15 +02:00
c5c990662c Update vars via generator gandi for machine genepi 2025-06-26 23:22:22 +02:00
a8ae2ba797 Update vars via generator user-password-rpqt for machine haze 2025-06-24 19:11:23 +02:00
242210c2e0 remove broken dns 2025-06-20 19:10:09 +02:00
a364bddd7e add jj 2025-06-20 19:06:01 +02:00
ce6a46b5a8 migrate to clan instances 2025-06-20 19:04:47 +02:00
75c6ddf146 update flake inputs 2025-06-20 19:00:32 +02:00
85c17fe3ea Update vars via generator garage-shared for machine genepi 2025-06-19 23:51:53 +02:00
b7f489b8e7 Update vars via generator garage-shared for machine crocus 2025-06-19 23:51:51 +02:00
3c5a941b21 Update vars via generator garage for machine genepi 2025-06-19 23:51:49 +02:00
2a2721ab33 Update vars via generator garage for machine crocus 2025-06-19 23:51:47 +02:00
02c48167eb move clan definition to its own module 2025-06-19 21:36:14 +02:00
d7fe20c71c Update vars via generator openssh for machine crocus 2025-06-17 21:07:35 +02:00
51f44277df migrate to flake-parts 2025-06-17 20:02:51 +02:00
d79b65169e disable prometheus (will rewrite as clan service) 2025-06-17 20:02:51 +02:00
f301672312 remove tail-tray (buggy) 2025-06-16 22:01:11 +02:00
8ef8f7277c add comma package 2025-06-16 22:00:23 +02:00
06ec517e20 migrate dotfiles to this repository 2025-06-16 21:16:55 +02:00
b5cb78b445 use the new genepi ssh key for agenix 2025-06-12 21:57:11 +02:00
5c4d1ce332 update renamed display manager option 2025-06-10 21:35:57 +02:00
3144febfad rename "home" directory to "home-manager"
My dotfiles will be moved to the "home" directory later
2025-06-10 21:32:23 +02:00
ee2b9fa9e0 update flake inputs 2025-06-05 21:36:05 +02:00
628b996be4 make genepi boot again 2025-06-05 20:42:15 +02:00
03c97d8431 change ignis flake source (moved to ignis-sh) 2025-06-04 22:53:10 +02:00
8b7e6e7897 add matugen 2025-06-04 22:51:17 +02:00
e8e9bfcb01 add nix-output-monitor in dev hm 2025-05-30 01:27:56 +02:00
fd2261a7e5 git ignore ./result 2025-05-30 01:26:36 +02:00
aab09abc52 setup nix-topology 2025-05-30 01:25:08 +02:00
a0c2c41d17 add tailscale tray 2025-05-29 23:02:32 +02:00
85d010dde0 setup ignis 2025-05-29 23:00:29 +02:00
8095738a8f move genepi disk to ext4 using clan 2025-05-25 23:23:38 +02:00
cdc4c4e38b remove impermanence on genepi 2025-05-25 23:10:16 +02:00
03abf0c7af update renamed pinentry option 2025-05-25 23:04:11 +02:00
2ee9461c9e make devshell work on aarch64-linux 2025-05-24 18:35:16 +02:00
4f3afd3a2c remove default user hashed password 2025-05-22 22:28:34 +02:00
8af8425eef add kde connect 2025-05-22 22:26:21 +02:00
1361049225 add clan trusted caches on haze 2025-05-22 22:25:45 +02:00
8a807d4dd5 Update vars via generator disk-id for machine genepi 2025-05-21 17:51:42 +02:00
7f550aabb0 Update vars via generator pinchflat for machine genepi 2025-05-16 17:14:34 +02:00
405 changed files with 8463 additions and 1378 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
/.direnv
/result

View file

@ -1,10 +1,22 @@
# NixOS & Home Manager config
This repository contains all my system configurations, mostly deployed using Nix and [Clan].
## Structure
- **home**: Home Manager modules
- **hosts**: Host-specific configs
- **home**: Dotfiles
- **machines**: Host-specific configs
- **infra**: Terraform/OpenTofu files
- **secrets**: Age-encrypted secrets shared between multiple hosts.
Host-specific secrets are stored in their own directories.
- **system**: Base NixOS modules shared among all hosts
- **vars**: Encrypted secrets managed by clan
- **modules**: NixOS modules
- **clanServices**: Custom [Clan Services](https://docs.clan.lol/reference/clanServices)
## Dotfiles
### Linking with dotbotc (for windows)
```sh
dotbot -c ./dotbot/windows.yaml -d home
```
[Clan]: https//clan.lol

185
clan/flake-module.nix Normal file
View file

@ -0,0 +1,185 @@
{ self, lib, ... }:
{
imports = [
./machines.nix
./monitoring.nix
./network.nix
];
clan.meta.name = "blossom";
clan.meta.domain = "val";
clan.secrets.age.plugins = [
"age-plugin-yubikey"
];
clan.inventory.instances."rpqt-admin" = {
module.input = "clan-core";
module.name = "admin";
roles.default.tags.server = { };
roles.default.machines.haze = { };
roles.default.settings.allowedKeys = {
rpqt_haze = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGa8R8obgptefcp27Cdp9bc2fiyc9x0oTfMsTPFp2ktE rpqt@haze";
nixbld_haze = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIyNC2sn5m7m52r4kVZqg0T7abqdz5xh/blU3cYtHKAE nixbld@haze";
};
};
clan.inventory.instances."sshd" = {
module.input = "clan-core";
module.name = "sshd";
roles.server.tags.all = { };
roles.server.extraModules = [
self.nixosModules.hardened-ssh-server
];
roles.server.settings = {
certificate.searchDomains = [
"home.rpqt.fr"
];
};
roles.client.tags.all = { };
roles.client.settings = {
certificate.searchDomains = [
"home.rpqt.fr"
];
};
};
clan.inventory.instances.user-rpqt = {
module.input = "clan-core";
module.name = "users";
roles.default.machines.haze = {
settings = {
user = "rpqt";
};
};
roles.default.extraModules = [
self.nixosModules.user-rpqt
];
};
clan.inventory.instances.common-config = {
module = {
input = "clan-core";
name = "importer";
};
roles.default.tags.all = { };
roles.default.extraModules = [ self.nixosModules.common ];
};
clan.inventory.instances.server-config = {
module = {
input = "clan-core";
name = "importer";
};
roles.default.tags.server = { };
roles.default.extraModules = [
{
nix.gc.automatic = lib.mkDefault true;
nix.gc.dates = lib.mkDefault "Mon 3:15";
nix.gc.randomizedDelaySec = lib.mkDefault "30min";
nix.gc.options = lib.mkDefault "--delete-older-than 30d";
}
];
};
clan.inventory.instances."garage" = {
module.input = "clan-core";
module.name = "garage";
roles.default.tags.garage = { };
};
clan.inventory.instances."garage-config" = {
module.input = "clan-core";
module.name = "importer";
roles.default.tags.garage = { };
roles.default.extraModules = [ ../modules/garage.nix ];
};
clan.inventory.instances."trusted-nix-caches" = {
module.input = "clan-core";
module.name = "trusted-nix-caches";
roles.default.tags.all = { };
};
clan.inventory.instances."borgbackup-storagebox" = {
module.input = "clan-core";
module.name = "borgbackup";
roles.client.machines = lib.genAttrs [ "crocus" "genepi" "verbena" ] (
machine:
let
config = self.nixosConfigurations.${machine}.config;
user = "u422292";
host = "${user}.your-storagebox.de";
in
{
settings.destinations."storagebox-${config.networking.hostName}" = {
repo = "${user}@${host}:./borgbackup/${config.networking.hostName}";
rsh = "ssh -oPort=23 -i ${
config.clan.core.vars.generators.borgbackup.files."borgbackup.ssh".path
} -oStrictHostKeyChecking=accept-new";
};
}
);
roles.client.extraModules = [
../modules/storagebox.nix
];
roles.server.machines = { };
};
clan.inventory.instances.syncthing = {
roles.peer.tags.syncthing = { };
roles.peer.settings.folders = {
Documents = {
path = "~/Documents";
};
Music = {
path = "~/Music";
};
Pictures = {
path = "~/Pictures";
};
Videos = {
path = "~/Videos";
};
};
roles.peer.settings.extraDevices = {
pixel-7a = {
id = "IZE7B4Z-LKTJY6Q-77NN4JG-ADYRC77-TYPZTXE-Q35BWV2-AEO7Q3R-ZE63IAU";
name = "Pixel 7a";
addresses = [ "dynamic" ];
};
};
};
clan.inventory.instances.buildbot = {
module.input = "self";
module.name = "@rpqt/buildbot";
roles.master.machines.verbena = {
settings = {
domain = "buildbot.turifer.dev";
admins = [ "rpqt" ];
topic = "buildbot-nix";
gitea.instanceUrl = "https://git.turifer.dev";
};
};
roles.master.extraModules = [
{
services.nginx.virtualHosts."buildbot.turifer.dev" = {
enableACME = true;
forceSSL = true;
};
security.acme.certs."buildbot.turifer.dev" = {
email = "admin@turifer.dev";
};
}
];
roles.worker.machines.verbena = { };
};
}

28
clan/machines.nix Normal file
View file

@ -0,0 +1,28 @@
{
clan.inventory.machines = {
crocus = {
tags = [
"garage"
"server"
];
};
genepi = {
tags = [
"garage"
"server"
"syncthing"
];
};
haze = {
tags = [
"syncthing"
];
};
verbena = {
tags = [
"garage"
"server"
];
};
};
}

46
clan/monitoring.nix Normal file
View file

@ -0,0 +1,46 @@
{ self, ... }:
{
clan.inventory.instances.prometheus = {
module.input = "self";
module.name = "@rpqt/prometheus";
roles.scraper.machines.genepi = { };
roles.scraper.settings = {
extraScrapeConfigs = [
{
job_name = "garage";
static_configs = [
{
labels.instance = "crocus";
targets = [ "crocus.home.rpqt.fr:3903" ];
}
{
labels.instance = "genepi";
targets = [ "genepi.home.rpqt.fr:3903" ];
}
{
labels.instance = "verbena";
targets = [ "verbena.home.rpqt.fr:3903" ];
}
];
authorization = {
type = "Bearer";
credentials_file =
self.nixosConfigurations.verbena.config.clan.core.vars.generators.garage.files.metrics_token.path;
};
}
];
};
roles.target.tags.server = { };
roles.target.settings = {
exporters = {
node = {
enabledCollectors = [
"systemd"
];
};
};
};
};
}

87
clan/network.nix Normal file
View file

@ -0,0 +1,87 @@
{ self, ... }:
{
clan.inventory.instances.zerotier = {
roles.controller.machines.crocus = { };
roles.moon.machines.crocus = {
settings = {
stableEndpoints = [
"116.203.18.122"
"2a01:4f8:1c1e:e415::/64"
];
};
};
roles.peer.tags."all" = { };
};
clan.inventory.instances.internet = {
roles.default.machines.verbena.settings.host = self.infra.machines.verbena.ipv4;
roles.default.machines.crocus.settings.host = self.infra.machines.crocus.ipv4;
};
clan.inventory.instances.wireguard = {
module.name = "wireguard";
module.input = "clan-core";
roles.controller = {
machines.verbena.settings = {
endpoint = "wg1.turifer.dev";
};
};
roles.peer.machines = {
haze = { };
crocus = { };
genepi = { };
};
};
clan.inventory.instances.certificates = {
module.name = "certificates";
module.input = "clan-core";
roles.ca.machines.verbena = {
settings.acmeEmail = "admin@rpqt.fr";
settings.tlds = [ "val" ];
};
roles.default.tags.all = { };
roles.default.settings.acmeEmail = "admin@rpqt.fr";
};
# Temporarily patched version of clan-core/coredns for AAAA records support
clan.inventory.instances.coredns = {
module.name = "@rpqt/coredns";
module.input = "self";
roles.default.tags.all = { };
roles.server.machines.verbena = {
settings.ip = "fd28:387a:90:c400::1";
settings.dnsPort = 53;
};
roles.server.machines.crocus = {
settings.ip = "fd28:387a:90:c400:6db2:dfc3:c376:9956";
};
roles.server.settings = {
tld = "val";
};
roles.default.machines.verbena.settings = {
ip = "fd28:387a:90:c400::1";
services = [
"ca"
"vaultwarden"
];
};
roles.default.machines.genepi.settings = {
ip = "fd28:387a:90:c400:ab23:3d38:a148:f539"; # FIXME: IPv4 expected (A record)
services = [
"actual"
"assistant"
"glance"
"grafana"
"images"
"lounge"
"pinchflat"
"rss"
];
};
};
}

View file

@ -0,0 +1,158 @@
{ self, ... }:
{ lib, ... }:
{
_class = "clan.service";
manifest.name = "buildbot";
roles.master = {
interface.options = {
domain = lib.mkOption {
type = lib.types.str;
description = "Domain name under which the buildbot frontend is reachable";
example = "https://buildbot.example.com";
};
admins = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "List of usernames allowed to authenticate to the buildbot frontend";
example = [ "Mic92" ];
};
topic = lib.mkOption {
type = lib.types.str;
description = "Name of the topic attached to repositories that should be built";
example = "buildbot-nix";
};
gitea.instanceUrl = lib.mkOption {
type = lib.types.str;
description = "URL of the Gitea instance";
example = "https://git.example.com";
};
};
perInstance =
{
settings,
roles,
...
}:
{
nixosModule =
{
config,
lib,
pkgs,
...
}:
{
imports = [
self.inputs.buildbot-nix.nixosModules.buildbot-master
];
services.buildbot-nix.master = {
enable = true;
workersFile = config.clan.core.vars.generators.buildbot.files.workers-file.path;
inherit (settings) domain admins;
authBackend = "gitea";
gitea = {
enable = true;
inherit (settings.gitea) instanceUrl;
inherit (settings) topic;
tokenFile = config.clan.core.vars.generators.buildbot.files.api-token.path;
webhookSecretFile = config.clan.core.vars.generators.buildbot.files.webhook-secret.path;
oauthId = config.clan.core.vars.generators.buildbot.files.oauth-id.value;
oauthSecretFile = config.clan.core.vars.generators.buildbot.files.oauth-secret.path;
};
};
clan.core.vars.generators.buildbot = {
prompts.api-token = {
description = "gitea API token";
type = "hidden";
persist = true;
};
prompts.webhook-secret = {
description = "gitea webhook secret";
type = "hidden";
persist = true;
};
prompts.oauth-id = {
description = "oauth client id";
persist = true;
};
files.oauth-id.secret = false;
prompts.oauth-secret = {
description = "oauth secret";
type = "hidden";
persist = true;
};
dependencies = [ "buildbot-worker" ];
files.workers-file.secret = true;
runtimeInputs = [ pkgs.python3 ];
script = ''
python3 - << EOF
import os
import json
password_path = os.path.join(os.environ.get("in"), "buildbot-worker/worker-password")
password = open(password_path).read().strip()
workers = [
{
"name": "${config.networking.hostName}",
"pass": password,
"cores": 4,
},
];
workers_file_path = os.path.join(os.environ.get("out"), "workers-file")
with open(workers_file_path, "w") as workers_file:
workers_file.write(json.dumps(workers))
EOF
'';
};
};
};
};
roles.worker = {
perInstance =
{
settings,
roles,
...
}:
{
nixosModule =
{
config,
lib,
pkgs,
...
}:
{
imports = [
self.inputs.buildbot-nix.nixosModules.buildbot-worker
];
services.buildbot-nix.worker = {
enable = true;
workerPasswordFile = config.clan.core.vars.generators.buildbot-worker.files.worker-password.path;
};
clan.core.vars.generators.buildbot-worker = {
files.worker-password = { };
runtimeInputs = [
pkgs.openssl
];
script = ''
openssl rand -hex 32 > "$out"/worker-password
'';
};
};
};
};
}

View file

@ -0,0 +1,4 @@
{ self, lib, ... }:
{
clan.modules."@rpqt/buildbot" = lib.modules.importApply ./default.nix { inherit self; };
}

View file

@ -0,0 +1,73 @@
!!! Danger "Experimental"
This service is experimental and will change in the future.
This module enables hosting clan-internal services easily, which can be resolved
inside your VPN. This allows defining a custom top-level domain (e.g. `.clan`)
and exposing endpoints from a machine to others, which will be
accessible under `http://<service>.clan` in your browser.
The service consists of two roles:
- A `server` role: This is the DNS-server that will be queried when trying to
resolve clan-internal services. It defines the top-level domain.
- A `default` role: This does two things. First, it sets up the nameservers so
that clan-internal queries are resolved via the `server` machine, while
external queries are resolved as normal via DHCP. Second, it allows exposing
services (see example below).
## Example Usage
Here the machine `dnsserver` is designated as internal DNS-server for the TLD
`.foo`. `server01` will host an application that shall be reachable at
`http://one.foo` and `server02` is going to be reachable at `http://two.foo`.
`client` is any other machine that is part of the clan but does not host any
services.
When `client` tries to resolve `http://one.foo`, the DNS query will be
routed to `dnsserver`, which will answer with `192.168.1.3`. If it tries to
resolve some external domain (e.g. `https://clan.lol`), the query will not be
routed to `dnsserver` but resolved as before, via the nameservers advertised by
DHCP.
```nix
inventory = {
machines = {
dnsserver = { }; # 192.168.1.2
server01 = { }; # 192.168.1.3
server02 = { }; # 192.168.1.4
client = { }; # 192.168.1.5
};
instances = {
coredns = {
module.name = "@clan/coredns";
module.input = "self";
# Add the default role to all machines, including `client`
roles.default.tags.all = { };
# DNS server queries to http://<name>.foo are resolved here
roles.server.machines."dnsserver".settings = {
ip = "192.168.1.2";
tld = "foo";
};
# First service
# Registers http://one.foo will resolve to 192.168.1.3
# underlying service runs on server01
roles.default.machines."server01".settings = {
ip = "192.168.1.3";
services = [ "one" ];
};
# Second service
roles.default.machines."server02".settings = {
ip = "192.168.1.4";
services = [ "two" ];
};
};
};
};
```

View file

@ -0,0 +1,235 @@
{ ... }:
{
_class = "clan.service";
manifest.name = "coredns";
manifest.description = "Clan-internal DNS and service exposure";
manifest.categories = [ "Network" ];
manifest.readme = builtins.readFile ./README.md;
roles.server = {
description = "A DNS server that resolves services in the clan network.";
interface =
{ lib, ... }:
{
options.tld = lib.mkOption {
type = lib.types.str;
default = "clan";
description = ''
Top-level domain for this instance. All services below this will be
resolved internally.
'';
};
options.ip = lib.mkOption {
type = lib.types.str;
# TODO: Set a default
description = "IP for the DNS to listen on";
};
options.dnsPort = lib.mkOption {
type = lib.types.int;
default = 1053;
description = "Port of the clan-internal DNS server";
};
};
perInstance =
{
roles,
settings,
...
}:
{
nixosModule =
{
lib,
pkgs,
...
}:
let
hostServiceEntries =
host:
lib.strings.concatStringsSep "\n" (
map (
service:
let
ip = roles.default.machines.${host}.settings.ip;
isIPv4 = addr: (builtins.match "\\." addr) != null;
recordType = if (isIPv4 ip) then "A" else "AAAA";
in
"${service} IN ${recordType} ${ip} ; ${host}"
) roles.default.machines.${host}.settings.services
);
hostnameEntries = ''
crocus 10800 IN AAAA fd28:387a:90:c400:6db2:dfc3:c376:9956
genepi 10800 IN AAAA fd28:387a:90:c400:ab23:3d38:a148:f539
verbena 10800 IN AAAA fd28:387a:90:c400::1
haze 10800 IN AAAA fd28:387a:90:c400:840e:e9db:4c08:b920
'';
zonefile = builtins.toFile "${settings.tld}.zone" (
''
$TTL 3600 ; 1 Hour
$ORIGIN ${settings.tld}.
${settings.tld}. IN SOA ns1 admin.rpqt.fr. (
2025112300 ; serial
10800 ; refresh
3600 ; retry
604800 ; expire
300 ; minimum
)
${builtins.concatStringsSep "\n" (
lib.lists.imap1 (i: _m: "@ 1D IN NS ns${toString i}.${settings.tld}.") (
lib.attrNames roles.server.machines
)
)}
${builtins.concatStringsSep "\n" (
lib.lists.imap1 (i: m: "ns${toString i} 10800 IN CNAME ${m}.${settings.tld}.") (
lib.attrNames roles.server.machines
)
)}
''
+ hostnameEntries
+ "\n"
+ (lib.strings.concatStringsSep "\n" (
map (host: hostServiceEntries host) (lib.attrNames roles.default.machines)
))
);
in
{
networking.firewall.interfaces.wireguard = {
allowedTCPPorts = [ settings.dnsPort ];
allowedUDPPorts = [ settings.dnsPort ];
};
services.coredns = {
enable = true;
config =
let
dnsPort = builtins.toString settings.dnsPort;
in
''
.:${dnsPort} {
bind wireguard
forward . 1.1.1.1
cache 30
}
${settings.tld}:${dnsPort} {
bind wireguard
file ${zonefile}
}
'';
};
};
};
};
roles.default = {
description = "A machine that registers the 'server' role as resolver and registers services under the configured TLD in the resolver.";
interface =
{ lib, ... }:
{
options.services = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = ''
Service endpoints this host exposes (without TLD). Each entry will
be resolved to <entry>.<tld> using the configured top-level domain.
'';
};
options.ip = lib.mkOption {
type = lib.types.str;
# TODO: Set a default
description = "IP on which the services will listen";
};
options.dnsPort = lib.mkOption {
type = lib.types.int;
default = 1053;
description = "Port of the clan-internal DNS server";
};
};
perInstance =
{ roles, settings, ... }:
{
nixosModule =
{ config, lib, ... }:
{
networking.nameservers = map (
m:
let
port = config.services.unbound.settings.server.port or 53;
in
"127.0.0.1:${toString port}#${roles.server.machines.${m}.settings.tld}"
) (lib.attrNames roles.server.machines);
services.resolved.domains = map (m: "~${roles.server.machines.${m}.settings.tld}") (
lib.attrNames roles.server.machines
);
services.unbound = {
enable = true;
# resolveLocalQueries = true;
checkconf = true;
settings = {
server = {
port = 5353;
verbosity = 2;
interface = [ "127.0.0.1" ];
access-control = [ "127.0.0.0/8 allow" ];
do-not-query-localhost = "no";
domain-insecure = map (m: "${roles.server.machines.${m}.settings.tld}.") (
lib.attrNames roles.server.machines
);
};
# Default: forward everything else to DHCP-provided resolvers
# forward-zone = [
# {
# name = ".";
# forward-addr = "127.0.0.53@53"; # Forward to systemd-resolved
# }
# ];
forward-zone = [
{
name = ".";
forward-tls-upstream = true;
forward-addr = [
"9.9.9.9#dns.quad9.net"
"149.112.112.112#dns.quad9.net"
"1.1.1.1@853#cloudflare-dns.com"
"1.0.0.1@853#cloudflare-dns.com"
"2606:4700:4700::1111@853#cloudflare-dns.com"
"2606:4700:4700::1001@853#cloudflare-dns.com"
"8.8.8.8#dns.google"
"8.8.4.4#dns.google"
"2001:4860:4860::8888#dns.google"
"2001:4860:4860::8844#dns.google"
];
}
];
stub-zone = {
name = "${roles.server.machines.${(lib.head (lib.attrNames roles.server.machines))}.settings.tld}.";
stub-addr = map (
m: "${roles.server.machines.${m}.settings.ip}@${builtins.toString settings.dnsPort}"
) (lib.attrNames roles.server.machines);
};
};
};
};
};
};
}

View file

@ -0,0 +1,18 @@
{ ... }:
let
module = ./default.nix;
in
{
clan.modules = {
"@rpqt/coredns" = module;
};
# perSystem =
# { ... }:
# {
# clan.nixosTests.coredns = {
# imports = [ ./tests/vm/default.nix ];
# clan.modules."@rpqt/coredns" = module;
# };
# };
}

View file

@ -0,0 +1,7 @@
{
imports = [
./buildbot/flake-module.nix
./coredns/flake-module.nix
./prometheus/flake-module.nix
];
}

View file

@ -0,0 +1,38 @@
This module enables collecting metrics from machines in clan, using Prometheus.
There are two roles:
- A `target` role for machines on which to collect and export metrics.
- A `scraper` roles for machines that fetch metrics from `target` machines and
store them in the long term.
```nix
inventory = {
machines = {
server01.tags.server = {};
server02.tags.server = {};
metrics.tags.server = {}; # metrics collector
};
instances = {
prometheus = {
module.name = "@rpqt/prometheus";
module.input = "self";
roles.scraper.machines."metrics" = {};
# Collect metrics on all servers
roles.target.tags.server = {
settings = {
exporters = {
# Enable the node-exporter metrics source
node.enabledCollectors = [ "systemd" ];
};
};
};
};
};
};
```

View file

@ -0,0 +1,114 @@
{ self, ... }:
{ lib, ... }:
{
_class = "clan.service";
manifest.name = "prometheus";
manifest.description = "Prometheus metrics collection across the clan network.";
manifest.readme = builtins.readFile ./README.md;
# Only works with zerotier (until a unified network module is ready)
roles.scraper = {
description = "A server that scrapes metrics from exporters of machines that have the 'target' role.";
interface = {
options.extraScrapeConfigs = lib.mkOption {
type = lib.types.listOf lib.types.attrs;
description = "A list of additional scrape configurations.";
};
};
perInstance =
{
settings,
roles,
...
}:
{
nixosModule =
{ config, lib, ... }:
{
services.prometheus.enable = true;
services.prometheus.scrapeConfigs =
let
allExporters = lib.unique (
lib.concatLists (
lib.map (machine: lib.attrNames machine.settings.exporters) (lib.attrValues roles.target.machines)
)
);
hasExporter =
exporter: machine: lib.hasAttr exporter roles.target.machines.${machine}.settings.exporters;
mkScrapeConfig = (
exporter:
let
machinesWithExporter = lib.filter (hasExporter exporter) (lib.attrNames roles.target.machines);
in
{
job_name = exporter;
static_configs = lib.map (machineName: {
targets =
let
targetConfig = self.nixosConfigurations.${machineName}.config;
targetHost = targetConfig.clan.core.vars.generators.zerotier.files.zerotier-ip.value;
in
[
"[${targetHost}]:${toString targetConfig.services.prometheus.exporters.${exporter}.port}"
];
labels.instance = machineName;
}) machinesWithExporter;
}
);
in
(lib.map mkScrapeConfig allExporters) ++ settings.extraScrapeConfigs;
clan.core.state.prometheus.folders = [ "/var/lib/${config.services.prometheus.stateDir}" ];
};
};
};
roles.target = {
description = "A machine on which to collect and export metrics.";
interface =
{ lib, ... }:
{
options = {
exporters = lib.mkOption {
type = lib.types.attrs;
default = { };
example = {
node = {
enabledCollectors = [ "systemd" ];
port = 9002;
};
};
description = "Attribute set of exporters to enable";
};
};
};
perInstance =
{
instanceName,
settings,
machine,
roles,
...
}:
{
nixosModule =
{ config, lib, ... }:
{
services.prometheus.exporters = builtins.mapAttrs (
name: exporterSettings:
exporterSettings
// {
enable = true;
}
) settings.exporters;
networking.firewall.interfaces."zts7mq7onf".allowedTCPPorts = lib.map (
exporterName: config.services.prometheus.exporters.${exporterName}.port
) (lib.attrNames settings.exporters);
};
};
};
}

View file

@ -0,0 +1,4 @@
{ self, lib, ... }:
{
clan.modules."@rpqt/prometheus" = lib.modules.importApply ./default.nix { inherit self; };
}

View file

@ -0,0 +1,26 @@
{
perSystem =
{
inputs',
pkgs,
...
}:
{
devShells.default = pkgs.mkShellNoCC {
packages = [
inputs'.clan-core.packages.clan-cli
pkgs.garage
pkgs.nil # Nix language server
pkgs.nixfmt
pkgs.opentofu
pkgs.terraform-ls
pkgs.deploy-rs
pkgs.zsh
];
shellHook = ''
export GARAGE_RPC_SECRET=$(clan vars get crocus garage-shared/rpc_secret)
export GARAGE_RPC_HOST=5d8249fe49264d36bc3532bd88400498bf9497b5cd4872245eb820d5d7797ed6@crocus.val:3901
'';
};
};
}

8
dotbot/windows.yaml Normal file
View file

@ -0,0 +1,8 @@
- defaults:
link:
relink: true
- link:
~/AppData/Roaming/helix/config.toml: .config/helix/config.toml
~/AppData/Roaming/jj/config.toml: .config/jj/config.toml
~/AppData/Roaming/nushell/config.nu: .config/nushell/config.nu

360
flake.lock generated
View file

@ -1,25 +1,25 @@
{
"nodes": {
"agenix": {
"buildbot-nix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"flake-parts": "flake-parts",
"hercules-ci-effects": "hercules-ci-effects",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1745630506,
"narHash": "sha256-bHCFgGeu8XjWlVuaWzi3QONjDW3coZDqSHvnd4l7xus=",
"owner": "ryantm",
"repo": "agenix",
"rev": "96e078c646b711aee04b82ba01aefbff87004ded",
"lastModified": 1768230255,
"narHash": "sha256-d98+nRSV2X86LcJUDZDAR9wvmmGG1uMzY5/zJdKH9pU=",
"owner": "nix-community",
"repo": "buildbot-nix",
"rev": "6c62d4e0e82b607638b00d6f4f4ad06646342826",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"owner": "nix-community",
"repo": "buildbot-nix",
"type": "github"
}
},
@ -27,23 +27,24 @@
"inputs": {
"data-mesher": "data-mesher",
"disko": "disko",
"flake-parts": "flake-parts",
"flake-parts": [
"flake-parts"
],
"nix-darwin": "nix-darwin",
"nix-select": "nix-select",
"nixos-facter-modules": "nixos-facter-modules",
"nixpkgs": [
"nixpkgs"
],
"sops-nix": "sops-nix",
"systems": "systems_2",
"treefmt-nix": "treefmt-nix"
"systems": "systems",
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1747400548,
"narHash": "sha256-zvBGXYkd8pZKkBXlLdcw0/nxSoGJOkwGbc6dz9NS4G8=",
"lastModified": 1768662392,
"narHash": "sha256-tE6k6yaQDF1n4YkTC4aH+BgKNQM36bYdhslP0udgMyY=",
"ref": "refs/heads/main",
"rev": "56f3fd0a454635d0449330e6848a98bab6da020e",
"revCount": 6979,
"rev": "1f2f93239ef3638d4b7a2187d021b8d8fe6507b8",
"revCount": 12169,
"type": "git",
"url": "https://git.clan.lol/clan/clan-core"
},
@ -52,28 +53,6 @@
"url": "https://git.clan.lol/clan/clan-core"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1744478979,
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"data-mesher": {
"inputs": {
"flake-parts": [
@ -84,27 +63,47 @@
"clan-core",
"nixpkgs"
],
"systems": [
"clan-core",
"systems"
],
"treefmt-nix": [
"clan-core",
"treefmt-nix"
]
},
"locked": {
"lastModified": 1747329636,
"narHash": "sha256-mmyx5trq5ZQp6uShbHNfqgSxdg9OeArcZGdZKtHjhqw=",
"rev": "7afcd6f322b9839699f6f31d5bed884c6dd412c4",
"lastModified": 1768383623,
"narHash": "sha256-X1jD5UvgYW50wWxdxJn9b8hiOvpSoLcO3ZC1AZx7+gQ=",
"rev": "82c2fbf84ea0162d95b4958f02499e68c9a843a6",
"type": "tarball",
"url": "https://git.clan.lol/api/v1/repos/clan/data-mesher/archive/7afcd6f322b9839699f6f31d5bed884c6dd412c4.tar.gz"
"url": "https://git.clan.lol/api/v1/repos/clan/data-mesher/archive/82c2fbf84ea0162d95b4958f02499e68c9a843a6.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://git.clan.lol/clan/data-mesher/archive/main.tar.gz"
}
},
"direnv-instant": {
"inputs": {
"flake-parts": [
"flake-parts"
],
"nixpkgs": [
"nixpkgs"
],
"treefmt-nix": "treefmt-nix_3"
},
"locked": {
"lastModified": 1768657403,
"narHash": "sha256-YkbdCu2ZInQj72rQQLgVP2x1m8il8+DtwzypBiYrrfE=",
"owner": "Mic92",
"repo": "direnv-instant",
"rev": "ab8c70c557f610e20008eb407d17cfd78b44ea1c",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "direnv-instant",
"type": "github"
}
},
"disko": {
"inputs": {
"nixpkgs": [
@ -113,11 +112,11 @@
]
},
"locked": {
"lastModified": 1747274630,
"narHash": "sha256-87RJwXbfOHyzTB9LYagAQ6vOZhszCvd8Gvudu+gf3qo=",
"lastModified": 1766150702,
"narHash": "sha256-P0kM+5o+DKnB6raXgFEk3azw8Wqg5FL6wyl9jD+G5a4=",
"owner": "nix-community",
"repo": "disko",
"rev": "ec7c109a4f794fce09aad87239eab7f66540b888",
"rev": "916506443ecd0d0b4a0f4cf9d40a3c22ce39b378",
"type": "github"
},
"original": {
@ -133,11 +132,11 @@
]
},
"locked": {
"lastModified": 1747274630,
"narHash": "sha256-87RJwXbfOHyzTB9LYagAQ6vOZhszCvd8Gvudu+gf3qo=",
"lastModified": 1766150702,
"narHash": "sha256-P0kM+5o+DKnB6raXgFEk3azw8Wqg5FL6wyl9jD+G5a4=",
"owner": "nix-community",
"repo": "disko",
"rev": "ec7c109a4f794fce09aad87239eab7f66540b888",
"rev": "916506443ecd0d0b4a0f4cf9d40a3c22ce39b378",
"type": "github"
},
"original": {
@ -149,16 +148,16 @@
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"clan-core",
"buildbot-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"lastModified": 1767609335,
"narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"rev": "250481aafeb741edfe23d29195671c19b36b6dca",
"type": "github"
},
"original": {
@ -167,19 +166,63 @@
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1768135262,
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": [
"buildbot-nix",
"flake-parts"
],
"nixpkgs": [
"buildbot-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1765774562,
"narHash": "sha256-UQhfCggNGDc7eam+EittlYmeW89CZVT1KkFIHZWBH7k=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "edcbb19948b6caf1700434e369fde6ff9e6a3c93",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1745494811,
"narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=",
"lastModified": 1768598210,
"narHash": "sha256-kkgA32s/f4jaa4UG+2f8C225Qvclxnqs76mf8zvTVPg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be",
"rev": "c47b2cc64a629f8e075de52e4742de688f930dc6",
"type": "github"
},
"original": {
@ -188,41 +231,6 @@
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1747374689,
"narHash": "sha256-JT/aBZqmK1LbExzwT9cPkvxKc0IC4i6tZKOPjsSWFbI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d2263ce5f4c251c0f7608330e8fdb7d1f01f0667",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"impermanence": {
"locked": {
"lastModified": 1737831083,
"narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "impermanence",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
@ -231,11 +239,11 @@
]
},
"locked": {
"lastModified": 1747365160,
"narHash": "sha256-4ZVr0x+ry6ybym/VhVYACj0HlJo44YxAaPGOxiS88Hg=",
"lastModified": 1768561867,
"narHash": "sha256-prGOZ+w3pZfGTRxworKcJliCNsewF0L4HUPjgU/6eaw=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "8817b00b0011750381d0d44bb94d61087349b6ba",
"rev": "8b720b9662d4dd19048664b7e4216ce530591adc",
"type": "github"
},
"original": {
@ -246,11 +254,11 @@
},
"nix-select": {
"locked": {
"lastModified": 1745005516,
"narHash": "sha256-IVaoOGDIvAa/8I0sdiiZuKptDldrkDWUNf/+ezIRhyc=",
"rev": "69d8bf596194c5c35a4e90dd02c52aa530caddf8",
"lastModified": 1763303120,
"narHash": "sha256-yxcNOha7Cfv2nhVpz9ZXSNKk0R7wt4AiBklJ8D24rVg=",
"rev": "3d1e3860bef36857a01a2ddecba7cdb0a14c35a9",
"type": "tarball",
"url": "https://git.clan.lol/api/v1/repos/clan/nix-select/archive/69d8bf596194c5c35a4e90dd02c52aa530caddf8.tar.gz"
"url": "https://git.clan.lol/api/v1/repos/clan/nix-select/archive/3d1e3860bef36857a01a2ddecba7cdb0a14c35a9.tar.gz"
},
"original": {
"type": "tarball",
@ -272,32 +280,17 @@
"type": "github"
}
},
"nixos-facter-modules": {
"locked": {
"lastModified": 1743671943,
"narHash": "sha256-7sYig0+RcrR3sOL5M+2spbpFUHyEP7cnUvCaqFOBjyU=",
"owner": "nix-community",
"repo": "nixos-facter-modules",
"rev": "58ad9691670d293a15221d4a78818e0088d2e086",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-facter-modules",
"type": "github"
}
},
"nixos-generators": {
"inputs": {
"nixlib": "nixlib",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1742568034,
"narHash": "sha256-QaMEhcnscfF2MqB7flZr+sLJMMYZPnvqO4NYf9B4G38=",
"lastModified": 1764234087,
"narHash": "sha256-NHF7QWa0ZPT8hsJrvijREW3+nifmF2rTXgS2v0tpcEA=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "42ee229088490e3777ed7d1162cb9e9d8c3dbb11",
"rev": "032a1878682fafe829edfcf5fdfad635a2efe748",
"type": "github"
},
"original": {
@ -308,11 +301,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1747129300,
"narHash": "sha256-L3clA5YGeYCF47ghsI7Tcex+DnaaN/BbQ4dR2wzoiKg=",
"lastModified": 1768584846,
"narHash": "sha256-IRPmIOV2tPwxbhP/I9M5AmwhTC0lMPtoPStC+8T6xl0=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "e81fd167b33121269149c57806599045fd33eeed",
"rev": "cce68f4a54fa4e3d633358364477f5cc1d782440",
"type": "github"
},
"original": {
@ -340,11 +333,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1747179050,
"narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=",
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e",
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
"type": "github"
},
"original": {
@ -356,14 +349,17 @@
},
"root": {
"inputs": {
"agenix": "agenix",
"buildbot-nix": "buildbot-nix",
"clan-core": "clan-core",
"direnv-instant": "direnv-instant",
"disko": "disko_2",
"home-manager": "home-manager_2",
"impermanence": "impermanence",
"flake-parts": "flake-parts_2",
"home-manager": "home-manager",
"nixos-generators": "nixos-generators",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_2",
"srvos": "srvos",
"terranix": "terranix"
}
},
"sops-nix": {
@ -374,11 +370,11 @@
]
},
"locked": {
"lastModified": 1746485181,
"narHash": "sha256-PxrrSFLaC7YuItShxmYbMgSuFFuwxBB+qsl9BZUnRvg=",
"lastModified": 1768481291,
"narHash": "sha256-NjKtkJraCZEnLHAJxLTI+BfdU//9coAz9p5TqveZwPU=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "e93ee1d900ad264d65e9701a5c6f895683433386",
"rev": "e085e303dfcce21adcb5fec535d65aacb066f101",
"type": "github"
},
"original": {
@ -387,6 +383,26 @@
"type": "github"
}
},
"srvos": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1768523683,
"narHash": "sha256-UbkyPXPPAbz0gHIWvHZ+jrPTruZqkpuwTFo5JXPnIgU=",
"owner": "nix-community",
"repo": "srvos",
"rev": "90e9331fd79d4c3bb5c1e7cd2df2e560565fe543",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "srvos",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@ -417,7 +433,52 @@
"type": "github"
}
},
"terranix": {
"inputs": {
"flake-parts": [
"flake-parts"
],
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_2"
},
"locked": {
"lastModified": 1762472226,
"narHash": "sha256-iVS4sxVgGn+T74rGJjEJbzx+kjsuaP3wdQVXBNJ79A0=",
"owner": "terranix",
"repo": "terranix",
"rev": "3b5947a48da5694094b301a3b1ef7b22ec8b19fc",
"type": "github"
},
"original": {
"owner": "terranix",
"repo": "terranix",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"buildbot-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768031762,
"narHash": "sha256-b2gJDJfi+TbA7Hu2sKip+1mWqya0GJaWrrXQjpbOVTU=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "0c445aa21b01fd1d4bb58927f7b268568af87b20",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"clan-core",
@ -425,11 +486,32 @@
]
},
"locked": {
"lastModified": 1747299117,
"narHash": "sha256-JGjCVbxS+9t3tZ2IlPQ7sdqSM4c+KmIJOXVJPfWmVOU=",
"lastModified": 1768158989,
"narHash": "sha256-67vyT1+xClLldnumAzCTBvU0jLZ1YBcf4vANRWP3+Ak=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "e758f27436367c23bcd63cd973fa5e39254b530e",
"rev": "e96d59dff5c0d7fddb9d113ba108f03c3ef99eca",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_3": {
"inputs": {
"nixpkgs": [
"direnv-instant",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768031762,
"narHash": "sha256-b2gJDJfi+TbA7Hu2sKip+1mWqya0GJaWrrXQjpbOVTU=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "0c445aa21b01fd1d4bb58927f7b268568af87b20",
"type": "github"
},
"original": {

166
flake.nix
View file

@ -5,128 +5,60 @@
inputs@{
nixpkgs,
clan-core,
home-manager,
impermanence,
nixos-generators,
nixos-hardware,
self,
flake-parts,
...
}:
let
clan = clan-core.lib.buildClan {
self = self;
meta.name = "blossom";
specialArgs = {
inherit inputs self;
inherit (import ./parts) keys;
};
inventory = {
instances = {
"rpqt-admin" = {
module.input = "clan-core";
module.name = "admin";
roles.default.machines = {
"crocus" = { };
"genepi" = { };
"haze" = { };
};
roles.default.settings.allowedKeys = {
rpqt_haze = (import ./parts).keys.rpqt.haze;
};
};
};
services = {
zerotier.default = {
roles.controller.machines = [
"crocus"
];
roles.peer.machines = [
"haze"
"genepi"
];
};
sshd.default = {
roles.server.machines = [ "crocus" ];
};
user-password.rpqt = {
roles.default.machines = [
"crocus"
"genepi"
"haze"
];
config.user = "rpqt";
};
};
};
};
in
{
inherit (clan) clanInternals nixosConfigurations;
flake-parts.lib.mkFlake { inherit inputs; } ({
imports = [
clan-core.flakeModules.default
inputs.terranix.flakeModule
./clan/flake-module.nix
./clanServices/flake-module.nix
./devShells/flake-module.nix
./home-manager/flake-module.nix
./infra/flake-module.nix
./modules/flake-module.nix
./packages/flake-module.nix
];
devShells =
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
in
{
"${system}".default = pkgs.mkShell {
packages = [
inputs.agenix.packages.${system}.default
clan-core.packages.${system}.clan-cli
pkgs.nil # Nix language server
pkgs.nixfmt-rfc-style
pkgs.opentofu
pkgs.terraform-ls
pkgs.deploy-rs
pkgs.zsh
];
shellhook = ''
exec zsh
'';
};
};
};
systems = [
"x86_64-linux"
"aarch64-linux"
];
});
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence = {
url = "github:nix-community/impermanence";
};
nixos-hardware = {
url = "github:NixOS/nixos-hardware/master";
};
nixos-generators = {
url = "github:nix-community/nixos-generators";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
clan-core = {
url = "git+https://git.clan.lol/clan/clan-core";
inputs.nixpkgs.follows = "nixpkgs";
};
};
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixConfig = {
extra-substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nixos-generators.url = "github:nix-community/nixos-generators";
clan-core.url = "git+https://git.clan.lol/clan/clan-core";
clan-core.inputs.nixpkgs.follows = "nixpkgs";
clan-core.inputs.flake-parts.follows = "flake-parts";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
srvos.url = "github:nix-community/srvos";
srvos.inputs.nixpkgs.follows = "nixpkgs";
buildbot-nix.url = "github:nix-community/buildbot-nix";
buildbot-nix.inputs.nixpkgs.follows = "nixpkgs";
direnv-instant.url = "github:Mic92/direnv-instant";
direnv-instant.inputs.nixpkgs.follows = "nixpkgs";
direnv-instant.inputs.flake-parts.follows = "flake-parts";
terranix.url = "github:terranix/terranix";
terranix.inputs.nixpkgs.follows = "nixpkgs";
terranix.inputs.flake-parts.follows = "flake-parts";
};
}

View file

@ -1,5 +1,14 @@
{ config, pkgs, ... }:
{
self,
config,
pkgs,
...
}:
{
imports = [
self.homeManagerModules.dotfiles
];
home.packages = with pkgs; [ senpai ];
xdg.configFile."senpai".source = "${config.dotfiles.path}/.config/senpai";

76
home-manager/cli.nix Normal file
View file

@ -0,0 +1,76 @@
{
self,
config,
osConfig,
pkgs,
...
}:
let
shellAliases = {
ls = "eza";
lsa = "ls -A";
ll = "ls -lh";
lla = "ls -lAh";
h = "hx";
g = "git";
cd = "z";
tree = "eza --tree";
".." = "cd ..";
"..." = "cd ../..";
};
in
{
imports = [
self.homeManagerModules.dotfiles
];
home.packages = with pkgs; [
age
age-plugin-yubikey
bottom
btop
comma
difftastic
doggo
duf
eza
fd
glow
jjui
lazygit
nh
passage
rage
ripgrep
skim
tealdeer
vivid
yazi
zoxide
];
programs.zoxide.enable = true;
programs.starship.enable = true;
programs.bat.enable = true;
programs.atuin.enable = true;
xdg.dataFile."atuin/key".source =
config.lib.file.mkOutOfStoreSymlink osConfig.clan.core.vars.generators.atuin.files.key.path;
programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
inherit shellAliases;
};
programs.fish = {
enable = true;
inherit shellAliases;
};
xdg.configFile."git".source = "${config.dotfiles.path}/.config/git";
xdg.configFile."jj/config.toml".source = "${config.dotfiles.path}/.config/jj/config.toml";
xdg.configFile."task/taskrc".source = "${config.dotfiles.path}/.config/task/taskrc";
home.sessionPath = [ "${config.dotfiles.path}/bin" ];
}

View file

@ -3,13 +3,13 @@
imports = [
./fonts.nix
./pass.nix
./terminal.nix
./wayland.nix
];
home.packages = with pkgs; [
discord
seahorse
wofi-emoji
];
home.pointerCursor = {
@ -20,4 +20,14 @@
};
gtk.enable = true;
gtk.iconTheme = {
name = "WhiteSur";
package = pkgs.whitesur-icon-theme.override {
alternativeIcons = true;
boldPanelIcons = true;
};
};
qt.enable = true;
qt.platformTheme.name = "gtk";
}

View file

@ -6,4 +6,8 @@
];
fonts.fontconfig.enable = true;
fonts.fontconfig.defaultFonts = {
sansSerif = [ "Adwaita Sans" ];
monospace = [ "Adwaita Mono" ];
};
}

View file

@ -0,0 +1,13 @@
{ pkgs, ... }:
{
home.packages = with pkgs.gnomeExtensions; [
blur-my-shell
paperwm
];
dconf.settings = {
"org/gnome/nautilus/preferences" = {
show-image-thumbnails = "always";
};
};
}

View file

@ -0,0 +1,9 @@
{ self, config, ... }:
{
imports = [
self.homeManagerModules.dotfiles
./wayland.nix
];
xdg.configFile."niri".source = "${config.dotfiles.path}/.config/niri";
}

View file

@ -9,6 +9,6 @@
programs.gpg.enable = true;
services.gpg-agent = {
enable = true;
pinentryPackage = pkgs.pinentry-gnome3;
pinentry.package = pkgs.pinentry-gnome3;
};
}

View file

@ -0,0 +1,22 @@
{
config,
pkgs,
self,
...
}:
{
imports = [
self.homeManagerModules.dotfiles
];
home.packages = [
pkgs.alacritty
pkgs.ghostty
];
programs.alacritty.enable = true;
xdg.configFile."alacritty/alacritty.toml".source =
"${config.dotfiles.path}/.config/alacritty/alacritty.toml";
xdg.configFile."ghostty/config".source = "${config.dotfiles.path}/.config/ghostty/config";
}

View file

@ -0,0 +1,19 @@
{
config,
lib,
...
}:
{
programs.vicinae = {
enable = true;
systemd.enable = true;
systemd.autoStart = true;
};
xdg.configFile."vicinae/vicinae.json".source =
lib.mkForce "${config.dotfiles.path}/.config/vicinae/vicinae.json";
xdg.configFile."matugen/config.toml".source = "${config.dotfiles.path}/.config/matugen/config.toml";
xdg.configFile."matugen/templates/vicinae.toml".source =
"${config.dotfiles.path}/.config/matugen/templates/vicinae.toml";
}

View file

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

42
home-manager/dev.nix Normal file
View file

@ -0,0 +1,42 @@
{
self,
config,
pkgs,
...
}:
{
imports = [
./cli.nix
./helix.nix
self.homeManagerModules.dotfiles
self.inputs.direnv-instant.homeModules.direnv-instant
];
home.packages = with pkgs; [
delta
direnv
gh
hut
jujutsu
nix-output-monitor
python3
radicle-desktop
radicle-node
radicle-tui
typescript-language-server
nil # Nix language server
nixfmt-rfc-style
nixpkgs-review
];
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
programs.direnv-instant.enable = true;
xdg.configFile."hut/config".source = "${config.dotfiles.path}/.config/hut/config";
home.file.".ssh/config".source = "${config.dotfiles.path}/.ssh/config";
}

View file

@ -5,7 +5,7 @@
path = lib.mkOption {
type = lib.types.path;
apply = toString;
default = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/rep/dotfiles";
default = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/rep/flocon/home";
example = "${config.home.homeDirectory}/.dotfiles";
description = "Location of the dotfiles working copy";
};

View file

@ -0,0 +1,5 @@
{
flake.homeManagerModules = {
dotfiles.imports = [ ./dotfiles.nix ];
};
}

24
home-manager/helix.nix Normal file
View file

@ -0,0 +1,24 @@
{
self,
config,
pkgs,
...
}:
{
imports = [
self.homeManagerModules.dotfiles
];
home.packages = [ pkgs.helix ];
programs.helix = {
enable = true;
defaultEditor = true;
};
home.sessionVariables.EDITOR = "hx";
xdg.configFile."helix/config.toml".source = "${config.dotfiles.path}/.config/helix/config.toml";
xdg.configFile."helix/languages.toml".source =
"${config.dotfiles.path}/.config/helix/languages.toml";
}

View file

@ -0,0 +1,110 @@
{ config, ... }:
let
pass = "passage";
in
{
programs.thunderbird = {
enable = true;
profiles = {
main = {
isDefault = true;
};
};
};
programs.aerc = {
enable = true;
# safe since the accounts file just contains commands for retrieving passwords and is readonly in the nix store
extraConfig.general.unsafe-accounts-conf = true;
};
accounts.email.accounts = {
"rpqt@rpqt.fr" = rec {
address = "rpqt@rpqt.fr";
realName = "Romain Paquet";
primary = true;
flavor = "migadu.com";
thunderbird.enable = config.programs.thunderbird.enable;
aerc.enable = config.programs.aerc.enable;
passwordCommand = [
pass
"show"
"mail/${address}"
];
folders.inbox = "INBOX";
};
"admin@rpqt.fr" = rec {
address = "admin@rpqt.fr";
aliases = [ "postmaster@rpqt.fr" ];
realName = "Postmaster";
flavor = "migadu.com";
thunderbird.enable = config.programs.thunderbird.enable;
aerc.enable = config.programs.aerc.enable;
passwordCommand = [
pass
"show"
"mail/${address}"
];
folders.inbox = "INBOX";
};
"romain.paquet@grenoble-inp.org" = rec {
address = "romain.paquet@grenoble-inp.org";
realName = "Romain Paquet";
userName = "romain.paquet@grenoble-inp.org";
imap = {
host = "imap.partage.renater.fr";
port = 993;
};
smtp = {
host = "smtp.partage.renater.fr";
port = 465;
};
thunderbird.enable = config.programs.thunderbird.enable;
aerc.enable = config.programs.aerc.enable;
passwordCommand = [
pass
"show"
"mail/${address}"
];
folders.inbox = "INBOX";
};
"admin@turifer.dev" = rec {
address = "admin@turifer.dev";
aliases = [ "postmaster@turifer.dev" ];
realName = "Postmaster";
flavor = "migadu.com";
thunderbird.enable = config.programs.thunderbird.enable;
aerc.enable = config.programs.aerc.enable;
passwordCommand = [
pass
"mail/${address}"
];
};
"romain@student.agh.edu.pl" = {
address = "romain@student.agh.edu.pl";
aliases = [ "382799@student.agh.edu.pl" ];
realName = "Romain Paquet";
userName = "romain@student.agh.edu.pl";
imap = {
host = "poczta.agh.edu.pl";
port = 993;
};
smtp = {
host = "poczta.agh.edu.pl";
port = 465;
};
thunderbird.enable = config.programs.thunderbird.enable;
};
"romain.pqt@gmail.com" = {
address = "romain.pqt@gmail.com";
realName = "Romain Paquet";
flavor = "gmail.com";
thunderbird.enable = config.programs.thunderbird.enable;
};
};
}

16
home/.clang-format Normal file
View file

@ -0,0 +1,16 @@
BasedOnStyle: LLVM
IndentWidth: 8
TabWidth: 8
UseTab: Always
ColumnLimit: 80
IndentCaseLabels: false
IndentGotoLabels: false
BreakBeforeBraces: Custom
BraceWrapping:
AfterFunction: false
AlwaysBreakAfterDefinitionReturnType: false

View file

@ -0,0 +1,37 @@
[general]
live_config_reload = false
import = ["~/.config/alacritty/themes/kanagawa_wave.toml"]
[font]
size = 14
[font.bold]
family = "Jetbrains Mono NF"
style = "Bold"
[font.bold_italic]
family = "Jetbrains Mono NF"
style = "Bold Italic"
[font.italic]
family = "Jetbrains Mono NF"
style = "Italic"
[font.normal]
family = "Jetbrains Mono NF"
style = "Regular"
[[keyboard.bindings]]
action = "CreateNewWindow"
key = "Return"
mods = "Control|Shift"
[mouse]
hide_when_typing = true
[window]
opacity = 1.0
[window.padding]
x = 4
y = 4

View file

@ -0,0 +1,35 @@
[colors.primary]
background = '#f2ecbc'
foreground = '#545464'
[colors.normal]
black = "#1f1f28"
red = "#c84053"
green = "#6f894e"
yellow = "#77713f"
blue = "#4d699b"
magenta = "#b35b79"
cyan = "#597b75"
white = "#545464"
[colors.bright]
black = "#8a8980"
red = "#d7474b"
green = "#6e915f"
yellow = "#836f4a"
blue = "#6693bf"
magenta = "#624c83"
cyan = "#5e857a"
white = "#43436c"
[colors.selection]
background = '#c9cbd1'
foreground = '#dcd7ba'
[[colors.indexed_colors]]
index = 16
color = '#e98a00'
[[colors.indexed_colors]]
index = 17
color = '#e82424'

View file

@ -0,0 +1,35 @@
[[colors.indexed_colors]]
color = "0xffa066"
index = 16
[[colors.indexed_colors]]
color = "0xff5d62"
index = 17
[colors.bright]
black = "0x727169"
blue = "0x7fb4ca"
cyan = "0x7aa89f"
green = "0x98bb6c"
magenta = "0x938aa9"
red = "0xe82424"
white = "0xdcd7ba"
yellow = "0xe6c384"
[colors.normal]
black = "0x090618"
blue = "0x7e9cd8"
cyan = "0x6a9589"
green = "0x76946a"
magenta = "0x957fb8"
red = "0xc34043"
white = "0xc8c093"
yellow = "0xc0a36e"
[colors.primary]
background = "0x1f1f28"
foreground = "0xdcd7ba"
[colors.selection]
background = "0x2d4f67"
foreground = "0xc8c093"

1
home/.config/bat/config Normal file
View file

@ -0,0 +1 @@
--theme gruvbox-dark

View file

@ -0,0 +1,6 @@
theme = dark:Kanagawa Wave,light:Builtin Light
font-feature = -liga
font-feature = -calt
font-feature = -dlig
font-size = 14
window-inherit-working-directory = false

View file

@ -0,0 +1,54 @@
[user]
email = rpqt@rpqt.fr
name = Romain Paquet
[init]
defaultBranch = main
[core]
excludesfile = ~/.config/git/ignore
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[color]
ui = auto
[sendemail]
smtpserver = smtp.migadu.com
smtpuser = rpqt@rpqt.fr
smtpencryption = ssl
smtpserverport = 465
[diff]
colormoved = "default"
colormovedws = "allow-indentation-change"
[alias]
a = add
s = status
c = commit
news = -c diff.external=difft log -p HEAD@{1}..HEAD@{0} --ext-diff
dlog = -c diff.external=difft log -p --ext-diff
dshow = -c diff.external=difft show --ext-diff
dft = -c diff.external=difft diff
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
[column]
ui = auto
[branch]
sort = -committerdate
[tag]
sort = version:refname
[push]
autoSetupRemote = true
followTags = true
[help]
autocorrect = prompt
[commit]
verbose = true
[rerere]
enabled = true
autoupdate = true
[rebase]
autoSquash = true
autoStash = true
updateRefs = true
[pull]
rebase = true

5
home/.config/git/config Normal file
View file

@ -0,0 +1,5 @@
[include]
path = ~/.config/git/common.gitconfig
path = ~/.config/git/local.gitconfig
[includeIf "gitdir:~/imag/"]
path = ~/.config/git/ensimag.gitconfig

View file

@ -0,0 +1,3 @@
[user]
name = "Romain Paquet"
email = romain.paquet@grenoble-inp.org

4
home/.config/git/ignore Normal file
View file

@ -0,0 +1,4 @@
/.direnv
/.helix
/.settings
/.classpath

View file

@ -0,0 +1,21 @@
theme = "kanagawa"
[editor]
line-number = "absolute"
auto-completion = true
auto-format = true
end-of-line-diagnostics = "hint"
[editor.cursor-shape]
insert = "bar"
normal = "block"
[editor.statusline]
left = ["mode", "spinner", "file-name"]
right = ["diagnostics", "file-encoding", "file-type", "position"]
mode.normal = "NORMAL"
mode.insert = "INSERT"
mode.select = "SELECT"
[editor.inline-diagnostics]
cursor-line = "error"

View file

@ -0,0 +1,64 @@
[[language]]
name = "c"
scope = "source.c"
file-types = ["c", "h"]
indent = { tab-width = 4, unit = "\t" }
auto-format = true
language-servers = [ { name = "clangd" } ]
[language-server.clangd]
command = "clangd"
args = ["--header-insertion=never"]
[[language]]
name = "rust"
language-servers = [ "rust-analyzer" ]
auto-format = true
[language-server.rust-analyzer.config]
check.command = "clippy"
[language-server.deno-lsp]
command = "deno"
args = ["lsp"]
[language-server.deno-lsp.config.deno]
enable = true
lint = true
suggest.imports.hosts = { "https://deno.land" = true }
[[language]]
name = "typescript"
file-types = ["ts"]
language-servers = ["deno-lsp"]
[[language]]
name = "djot"
scope = "source.djot"
file-types = ["dj"]
[[grammar]]
name = "djot"
source = { git = "https://github.com/treeman/tree-sitter-djot", rev = "master" }
[[language]]
name = "nix"
formatter = { command = "nixfmt" }
[[language]]
name = "java"
formatter = { command = "google-java-format", args = ["--aosp"] }
auto-format = true
[[language]]
name = "hcl"
formatter = { command = "tofu", args = ["fmt", "-"] }
auto-format = true
[[language]]
name = "vento"
indent = { tab-width = 2, unit = "\t" }
[[language]]
name = "ocaml"
auto-format = true

3
home/.config/hut/config Normal file
View file

@ -0,0 +1,3 @@
instance "sr.ht" {
access-token-cmd pass oauth/sr.ht-hut@haze
}

View file

@ -0,0 +1,53 @@
[theme]
theme = "kanagawa"
[theme.overrides]
separator = "<span size='13000'></span>"
[icons]
icons = "material-nf"
[[block]]
block = "privacy"
[[block.driver]]
name = "pipewire"
[[block]]
block = "music"
format = " $icon {$combo.str(max_w:70) $prev $next |}"
[[block.click]]
button = "left"
action = "play_pause"
[[block]]
block = "bluetooth"
mac = "20:74:CF:B5:B7:7A"
format = " $icon $name{ $percentage|} "
disconnected_format = ""
[[block]]
block = "bluetooth"
mac = "28:11:A5:6B:44:8B"
format = " $icon $name{ $percentage|} "
disconnected_format = ""
[[block]]
block = "bluetooth"
mac = "00:1E:7C:50:24:8F"
format = " $icon $name{ $percentage|} "
disconnected_format = ""
[[block]]
block = "toggle"
format = " $icon ensivpn "
command_state = 'nmcli -f general.state con show Ensimag-VPN-ETU-udp | grep -v deactivated'
command_on = "pass show web/ensimag.fr | head -n 1 | nmcli c up Ensimag-VPN-ETU-udp --ask"
command_off = "nmcli c down Ensimag-VPN-ETU-udp"
[[block]]
block = "net"
interval = 10
device = "wlan0"
format = " $icon {$ssid|$device} "
[[block.click]]
button = "left"
cmd = "iwgtk"

View file

@ -0,0 +1,78 @@
[theme]
theme = "kanagawa"
[theme.overrides]
separator = "<span size='17000'></span>"
[icons]
icons = "material-nf"
[icons.overrides]
sleep = "󰒲"
no_sleep = "󰒳"
[[block]]
block = "toggle"
format = " $icon "
command_state = "pgrep swayidle"
command_on = "swaymsg 'exec swayidle -w'"
command_off = "pkill swayidle"
icon_on = "sleep"
icon_off = "no_sleep"
[[block]]
block = "toggle"
format = "  $icon "
command_state = 'if [ "$($HOME/bin/darkmode status)" = "dark" ]; then echo y; fi'
command_on = "$HOME/bin/darkmode toggle"
command_off = "$HOME/bin/darkmode toggle"
[[block]]
block = "hueshift"
format = " 󱩌 {$temperature} "
click_temp = 4000
[[block]]
block = "backlight"
format = " $icon $brightness.eng(width:1) "
step_width = 1
minimum = 1
[[block]]
block = "sound"
driver = "pulseaudio"
headphones_indicator = true
show_volume_when_muted = true
format = " $icon $volume.eng(width:1) "
[[block.click]]
button = "left"
cmd = "pavucontrol"
[block.theme_overrides]
warning_bg = { link = "idle_bg" }
warning_fg = { link = "idle_fg"}
idle_bg = { link = "info_bg" }
idle_fg = { link = "info_fg"}
[[block]]
block = "battery"
interval = 30
format = " $icon $percentage "
full_format = " $icon $percentage "
[[block]]
block = "keyboard_layout"
driver = "sway"
sway_kb_identifier = "1267:12613:ASUE140C:00_04F3:3145_Keyboard"
format = "  $layout "
[[block.click]]
button = "left"
cmd = "swaymsg input '1267:12613:ASUE140C:00_04F3:3145_Keyboard' xkb_switch_layout next"
[block.mappings]
"French (N/A)" = "fr"
"English (Colemak-DH)" = "colemak-dh"
"English (US)" = "en"
[[block]]
block = "time"
interval = 10
[block.format]
full = " $icon $timestamp.datetime(f:'%a %d/%m/%y %R', l:fr_FR) "
short = " $icon $timestamp.datetime(f:'%R')"

View file

@ -0,0 +1,14 @@
idle_bg = "#151515"
idle_fg = "#dcd7ba"
info_bg = "#2d4f67"
info_fg = "#dcd7ba"
good_bg = "#151515"
good_fg = "#98971a"
warning_bg = "#ff9e3b"
warning_fg = "#16161D"
critical_bg = "#e82424"
critical_fg = "#dcd7ba"
separator = "\ue0b2"
separator_bg = "auto"
separator_fg = "auto"
alternating_tint_bg = "#151515"

View file

@ -0,0 +1,54 @@
"$schema" = "https://jj-vcs.github.io/jj/latest/config-schema.json"
[ui]
default-command = ["log", "--no-pager"]
diff-formatter = ["difft", "--color=always", "$left", "$right"]
diff-editor = ":builtin"
[user]
name = "Romain Paquet"
email = "rpqt@rpqt.fr"
[git]
write-change-id-header = true
[revset-aliases]
'closest_pushable(to)' = 'heads(::to & mutable() & ~description(exact:"") & (~empty() | merges()))'
[aliases]
s = ["status", "--no-pager"]
tug = ["bookmark", "move", "--from", "heads(::@ & bookmarks())", "--to", "closest_pushable(@)"]
[[--scope]]
--when.repositories = ["~/agh"]
[--scope.user]
email = "romain@student.agh.edu.pl"
[[--scope]]
--when.repositories = ["~/imag"]
[--scope.user]
email = "romain.paquet@grenoble-inp.org"
# After this line everything is taken from https://andre.arko.net/2025/09/28/stupid-jj-tricks
[templates]
draft_commit_description = '''
concat(
coalesce(description, default_commit_description, "\n"),
surround(
"\nJJ: This commit contains the following changes:\n", "",
indent("JJ: ", diff.stat(72)),
),
"\nJJ: ignore-rest\n",
diff.git(),
)
'''
log_node = '''
if(self && !current_working_copy && !immutable && !conflict && in_branch(self),
"◇",
builtin_log_node
)
'''
[template-aliases]
"in_branch(commit)" = 'commit.contained_in("immutable_heads()..bookmarks()")'

View file

@ -0,0 +1,46 @@
(defcfg
input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
output (uinput-sink "KMonad laptop keyboard output")
fallthrough true
)
(defsrc
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prnt ins del
grv 1 2 3 4 5 6 7 8 9 0 - = bspc home
tab q w e r t y u i o p [ ] \ pgup
caps a s d f g h j k l ; ' ret pgdn
lsft z x c v b n m , . / rsft end
lctl lmet lalt spc ralt rctl
)
(defalias
maj (layer-toggle azerty-shift)
agr (layer-toggle azerty-altgr)
)
(deflayer azerty
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prnt ins del
grv & é " ' \( - è \_ ç à \) = bspc home
tab a z e r t y u i o p ^ $ * pgup
caps q s d f g h j k l m ù ret pgdn
@maj w x c v b n , ; : ! rsft end
lctl lmet lalt spc @agr rctl
)
(deflayer azerty-shift
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ 1 2 3 4 5 6 7 8 9 0 ° + _ _
_ a _ _ _ _ _ _ _ _ _ _ £ µ _
_ _ _ _ _ _ _ _ _ _ _ % _ _
@maj _ _ _ _ _ _ ? . / § rsft _
lctl lmet lalt spc ralt rctl
)
(deflayer azerty-altgr
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ ~ # { [ | grv \ ^ @ ] } _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ rsft _
lctl lmet lalt spc @agr rctl
)

View file

@ -0,0 +1,6 @@
[config]
[templates.vicinae]
input_path = '~/.config/matugen/templates/vicinae.toml'
output_path = '~/.local/share/vicinae/themes/matugen.toml'
post_hook = 'vicinae theme set matugen'

View file

@ -0,0 +1,127 @@
# Vicinae Matugen Theme Template
# Used LLM for initial generation, then modified to a satisfactory level
[meta]
name = "Matugen"
description = "Material You theme generated by Matugen - {{mode}} variant"
variant = "{{mode}}"
# ============================================================================
# Core Colors
# ============================================================================
[colors.core]
accent = "{{colors.primary.default.hex}}"
accent_foreground = "{{colors.on_primary.default.hex}}"
background = "{{colors.surface.default.hex}}"
foreground = "{{colors.on_surface.default.hex}}"
secondary_background = "{{colors.surface_container.default.hex}}"
border = "{{colors.outline_variant.default.hex}}"
# ============================================================================
# Window Borders
# ============================================================================
[colors.main_window]
border = "{{colors.outline_variant.default.hex}}"
[colors.settings_window]
border = "{{colors.outline.default.hex}}"
# ============================================================================
# Accent Palette
# ============================================================================
[colors.accents]
blue = "{{colors.primary.default.hex}}"
green = "{{colors.tertiary.default.hex}}"
magenta = "{{colors.secondary.default.hex}}"
orange = { name = "{{colors.error.default.hex}}", lighter = 40 }
red = "{{colors.error.default.hex}}"
yellow = { name = "{{colors.tertiary.default.hex}}", lighter = 80 }
cyan = { name = "{{colors.primary.default.hex}}", lighter = 50 }
purple = "{{colors.secondary.default.hex}}"
# ============================================================================
# Text System
# ============================================================================
[colors.text]
default = "{{colors.on_surface.default.hex}}"
muted = "{{colors.on_surface_variant.default.hex}}"
danger = "{{colors.error.default.hex}}"
success = "{{colors.tertiary.default.hex}}"
placeholder = { name = "{{colors.on_surface_variant.default.hex}}", opacity = 0.6 }
[colors.text.selection]
background = "{{colors.primary.default.hex}}"
foreground = "{{colors.on_primary.default.hex}}"
[colors.text.links]
default = "{{colors.primary.default.hex}}"
visited = { name = "{{colors.tertiary.default.hex}}", darker = 20 }
# ============================================================================
# Input Fields
# ============================================================================
[colors.input]
border = "{{colors.outline.default.hex}}"
border_focus = "{{colors.primary.default.hex}}"
border_error = "{{colors.error.default.hex}}"
# ============================================================================
# Buttons
# ============================================================================
[colors.button.primary]
background = "{{colors.surface_container_high.default.hex}}"
foreground = "{{colors.on_surface.default.hex}}"
[colors.button.primary.hover]
background = "{{colors.surface_container_highest.default.hex}}"
[colors.button.primary.focus]
outline = "{{colors.primary.default.hex}}"
# ============================================================================
# Lists
# ============================================================================
[colors.list.item.hover]
background = { name = "{{colors.primary_container.default.hex}}", opacity = 0.25 }
foreground = "{{colors.on_surface.default.hex}}"
[colors.list.item.selection]
background = { name = "{{colors.primary_container.default.hex}}", opacity = 0.50 }
foreground = "{{colors.on_primary_container.default.hex}}"
secondary_background = "{{colors.primary_container.default.hex}}"
secondary_foreground = "{{colors.on_primary_container.default.hex}}"
# ============================================================================
# Grid Items
# ============================================================================
[colors.grid.item]
background = "{{colors.surface_container.default.hex}}"
[colors.grid.item.hover]
outline = { name = "{{colors.secondary.default.hex}}", opacity = 0.8 }
[colors.grid.item.selection]
outline = { name = "{{colors.primary.default.hex}}" }
# ============================================================================
# Scrollbars
# ============================================================================
[colors.scrollbars]
background = { name = "{{colors.primary.default.hex}}", opacity = 0.2 }
# ============================================================================
# Loading States
# ============================================================================
[colors.loading]
bar = "{{colors.primary.default.hex}}"
spinner = "{{colors.primary.default.hex}}"

10
home/.config/mpd/mpd.conf Normal file
View file

@ -0,0 +1,10 @@
music_directory "~/Music"
playlist_directory "~/.config/mpd/playlists"
db_file "~/.config/mpd/database"
restore_paused "yes"
state_file "~/.local/state/mpd"
audio_output {
type "pipewire"
name "pipewire"
}

View file

@ -0,0 +1,312 @@
include "dms/alttab.kdl"
include "dms/binds.kdl"
include "dms/colors.kdl"
include "dms/layout.kdl"
include "dms/wpblur.kdl"
input {
keyboard {
xkb {
layout "fr,us(colemak_dh),us"
options "grp:win_space_toggle"
}
}
touchpad {
tap
natural-scroll
}
// Make the mouse warp to the center of newly focused windows.
// warp-mouse-to-focus
// Focus windows and outputs automatically when moving the mouse into them.
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
focus-follows-mouse max-scroll-amount="0%"
}
workspace "browser" {
}
output "eDP-1" {
mode "1920x1080@60.049"
scale 1
position x=360 y=1440
}
output "HDMI-A-1" {
mode "3840x2160@60.000"
scale 1.5
position x=0 y=0
}
layout {
gaps 8
center-focused-column "never"
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
preset-column-widths {
// Proportion sets the width as a fraction of the output width, taking gaps into account.
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
proportion 0.33333
proportion 0.5
proportion 0.66667
// Fixed sets the width in logical pixels exactly.
// fixed 1920
}
// You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between.
// preset-window-heights { }
// You can change the default width of the new windows.
default-column-width { proportion 0.5; }
// If you leave the brackets empty, the windows themselves will decide their initial width.
}
prefer-no-csd
cursor {
hide-when-typing
}
window-rule {
match app-id=r#"^firefox$"#
open-maximized true
open-on-workspace "browser"
focus-ring {
off
}
}
window-rule {
match app-id=r#"^thunderbird$"#
open-maximized true
focus-ring {
off
}
}
// Open the Firefox picture-in-picture player as floating by default.
window-rule {
// This app-id regular expression will work for both:
// - host Firefox (app-id is "firefox")
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
open-floating true
}
binds {
// Keys consist of modifiers separated by + signs, followed by an XKB key name
// in the end. To find an XKB name for a particular key, you may use a program
// like wev.
//
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
// when running as a winit window.
//
// Most actions that you can bind here can also be invoked programmatically with
// `niri msg action do-something`.
// Show a list of important hotkeys.
Mod+Shift+Comma { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+Return { spawn "ghostty" "+new-window"; }
// Mod+D { spawn "dms" "ipc" "call" "spotlight" "toggle"; }
Mod+D { spawn "vicinae" "toggle"; }
Super+Alt+L hotkey-overlay-title="Lock session" { spawn "loginctl" "lock-session"; }
XF86AudioPlay { spawn "playerctl" "play-pause"; }
XF86AudioNext { spawn "playerctl" "next"; }
XF86AudioPrev { spawn "playerctl" "previous"; }
XF86Search { spawn "tofi-drun" "--drun-launch=true"; }
Mod+W { close-window; }
Mod+Left { focus-column-left; }
Mod+Down { focus-window-down; }
Mod+Up { focus-window-up; }
Mod+Right { focus-column-right; }
Mod+H { focus-column-left; }
Mod+J { focus-window-down; }
Mod+K { focus-window-up; }
Mod+L { focus-column-right; }
Mod+Ctrl+Left { move-column-left; }
Mod+Ctrl+Down { move-window-down; }
Mod+Ctrl+Up { move-window-up; }
Mod+Ctrl+Right { move-column-right; }
Mod+Ctrl+H { move-column-left; }
Mod+Ctrl+J { move-window-down; }
Mod+Ctrl+K { move-window-up; }
Mod+Ctrl+L { move-column-right; }
// Alternative commands that move across workspaces when reaching
// the first or last window in a column.
// Mod+J { focus-window-or-workspace-down; }
// Mod+K { focus-window-or-workspace-up; }
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
Mod+Ctrl+Home { move-column-to-first; }
Mod+Ctrl+End { move-column-to-last; }
Mod+Shift+Left { focus-monitor-left; }
Mod+Shift+Down { focus-monitor-down; }
Mod+Shift+Up { focus-monitor-up; }
Mod+Shift+Right { focus-monitor-right; }
Mod+Shift+H { focus-monitor-left; }
Mod+Shift+J { focus-monitor-down; }
Mod+Shift+K { focus-monitor-up; }
Mod+Shift+L { focus-monitor-right; }
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
// Alternatively, there are commands to move just a single window:
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
// ...
// And you can also move a whole workspace to another monitor:
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
// ...
Mod+Page_Down { focus-workspace-down; }
Mod+Page_Up { focus-workspace-up; }
Mod+U { focus-workspace-down; }
Mod+I { focus-workspace-up; }
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
Mod+Ctrl+U { move-column-to-workspace-down; }
Mod+Ctrl+I { move-column-to-workspace-up; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
// ...
Mod+Shift+Page_Down { move-workspace-down; }
Mod+Shift+Page_Up { move-workspace-up; }
Mod+Shift+U { move-workspace-down; }
Mod+Shift+I { move-workspace-up; }
// You can bind mouse wheel scroll ticks using the following syntax.
// These binds will change direction based on the natural-scroll setting.
//
// To avoid scrolling through workspaces really fast, you can use
// the cooldown-ms property. The bind will be rate-limited to this value.
// You can set a cooldown on any bind, but it's most useful for the wheel.
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
Mod+WheelScrollRight { focus-column-right; }
Mod+WheelScrollLeft { focus-column-left; }
Mod+Ctrl+WheelScrollRight { move-column-right; }
Mod+Ctrl+WheelScrollLeft { move-column-left; }
// Usually scrolling up and down with Shift in applications results in
// horizontal scrolling; these binds replicate that.
Mod+Shift+WheelScrollDown { focus-column-right; }
Mod+Shift+WheelScrollUp { focus-column-left; }
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
// You can refer to workspaces by index. However, keep in mind that
// niri is a dynamic workspace system, so these commands are kind of
// "best effort". Trying to refer to a workspace index bigger than
// the current workspace count will instead refer to the bottommost
// (empty) workspace.
//
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
// will all refer to the 3rd workspace.
Mod+ampersand { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+quotedbl { focus-workspace 3; }
Mod+apostrophe { focus-workspace 4; }
Mod+parenleft { focus-workspace 5; }
Mod+minus { focus-workspace 6; }
Mod+7 { focus-workspace 7; }
Mod+underscore { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+Ctrl+1 { move-column-to-workspace 1; }
Mod+Ctrl+2 { move-column-to-workspace 2; }
Mod+Ctrl+3 { move-column-to-workspace 3; }
Mod+Ctrl+4 { move-column-to-workspace 4; }
Mod+Ctrl+5 { move-column-to-workspace 5; }
Mod+Ctrl+6 { move-column-to-workspace 6; }
Mod+Ctrl+7 { move-column-to-workspace 7; }
Mod+Ctrl+8 { move-column-to-workspace 8; }
Mod+Ctrl+9 { move-column-to-workspace 9; }
// Switches focus between the current and the previous workspace.
Mod+Tab { focus-workspace-previous; }
// The following binds move the focused window in and out of a column.
// If the window is alone, they will consume it into the nearby column to the side.
// If the window is already in a column, they will expel it out.
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
// Consume one window from the right to the bottom of the focused column.
Mod+Comma { consume-window-into-column; }
// Expel the bottom window from the focused column to the right.
Mod+Semicolon { expel-window-from-column; }
Mod+R { switch-preset-column-width; }
Mod+Shift+R { switch-preset-window-height; }
Mod+Ctrl+R { reset-window-height; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
Mod+C { center-column; }
Mod+Escape { toggle-overview; }
// Finer height adjustments when in column with other windows.
Mod+Shift+Minus { set-window-height "-10%"; }
Mod+Shift+Equal { set-window-height "+10%"; }
// Move the focused window between the floating and the tiling layout.
Mod+V { toggle-window-floating; }
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Alt+Print { screenshot-window; }
// The quit action will show a confirmation dialog to avoid accidental exits.
Mod+Shift+E { quit; }
Ctrl+Alt+Delete { quit; }
// Powers off the monitors. To turn them back on, do any input like
// moving the mouse or pressing any other key.
Mod+Shift+P { power-off-monitors; }
Mod+N hotkey-overlay-title="Open notes" {
spawn-sh "ghostty -e hx --working-dir ~/notes ~/notes/notes.dj:9999";
}
}
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
spawn-at-startup "kdeconnect-indicator"
spawn-at-startup "~/rep/flocon/home/bin/monitor-dark-mode.sh"
spawn-at-startup "xwayland-satellite"
environment {
DISPLAY ":0"
}
hotkey-overlay {
skip-at-startup
}

View file

@ -0,0 +1,5 @@
recent-windows {
highlight {
corner-radius 12
}
}

View file

@ -0,0 +1,55 @@
binds {
Mod+Shift+D hotkey-overlay-title="Application Launcher" {
spawn "dms" "ipc" "call" "spotlight" "toggle";
}
Mod+V hotkey-overlay-title="Clipboard Manager" {
spawn "dms" "ipc" "call" "clipboard" "toggle";
}
Mod+M hotkey-overlay-title="Task Manager" {
spawn "dms" "ipc" "call" "processlist" "toggle";
}
Mod+Comma hotkey-overlay-title="Settings" {
spawn "dms" "ipc" "call" "settings" "toggle";
}
Mod+N hotkey-overlay-title="Notification Center" {
spawn "dms" "ipc" "call" "notifications" "toggle";
}
Mod+Shift+N hotkey-overlay-title="Notepad" {
spawn "dms" "ipc" "call" "notepad" "toggle";
}
Mod+Alt+L hotkey-overlay-title="Lock Screen" {
spawn "dms" "ipc" "call" "lock" "lock";
}
Ctrl+Alt+Delete hotkey-overlay-title="Task Manager" {
spawn "dms" "ipc" "call" "processlist" "toggle";
}
// Audio
XF86AudioRaiseVolume allow-when-locked=true {
spawn "dms" "ipc" "call" "audio" "increment" "3";
}
XF86AudioLowerVolume allow-when-locked=true {
spawn "dms" "ipc" "call" "audio" "decrement" "3";
}
XF86AudioMute allow-when-locked=true {
spawn "dms" "ipc" "call" "audio" "mute";
}
XF86AudioMicMute allow-when-locked=true {
spawn "dms" "ipc" "call" "audio" "micmute";
}
// BL
XF86MonBrightnessUp allow-when-locked=true {
spawn "dms" "ipc" "call" "brightness" "increment" "5" "";
}
XF86MonBrightnessDown allow-when-locked=true {
spawn "dms" "ipc" "call" "brightness" "decrement" "5" "";
}
}

View file

@ -0,0 +1,36 @@
layout {
background-color "transparent"
focus-ring {
active-color "#5c5891"
inactive-color "#787680"
urgent-color "#ba1a1a"
}
border {
active-color "#5c5891"
inactive-color "#787680"
urgent-color "#ba1a1a"
}
shadow {
color "#00000070"
}
tab-indicator {
active-color "#5c5891"
inactive-color "#787680"
urgent-color "#ba1a1a"
}
insert-hint {
color "#5c589180"
}
}
recent-windows {
highlight {
active-color "#444078"
urgent-color "#ba1a1a"
}
}

View file

@ -0,0 +1,17 @@
layout {
gaps 4
border {
width 2
}
focus-ring {
width 2
}
}
window-rule {
geometry-corner-radius 12
clip-to-geometry true
tiled-state true
draw-border-with-background false
}

View file

@ -0,0 +1,4 @@
layer-rule {
match namespace="dms:blurwallpaper"
place-within-backdrop true
}

View file

@ -0,0 +1,9 @@
alias ls = eza
alias ll = eza -l
alias lla = eza -la
alias h = hx
alias g = git
# Load starship prompt
mkdir ($nu.data-dir | path join "vendor/autoload")
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")

View file

@ -0,0 +1,4 @@
address chat.sr.ht
nickname rpqt
username rpqt
password-cmd pass show oauth/sr.ht-senpai-irc

View file

@ -0,0 +1,24 @@
alias dotfiles="/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME"
alias dots=dotfiles
if command -v helix >/dev/null; then
alias h='helix'
else
alias h='hx'
fi
if command -v eza >/dev/null; then
alias ls='eza'
else
alias ls='ls --color -h'
fi
alias lsa='ls -A'
alias ll='ls -l'
alias lla='ls -lA'
alias ..='cd ..'
alias ...='cd ../..'
alias bt='bluetoothctl'
alias go='GOPROXY=direct go'
alias ts='tree-sitter'
alias g='git'
alias c='cargo'
alias MAKE='make clean && make'
alias n='myrtle --notebook-dir=$HOME/notes'

4
home/.config/sh/path.sh Normal file
View file

@ -0,0 +1,4 @@
#!/bin/sh
# Personnal scripts
export PATH="$PATH:$HOME/bin"

View file

@ -0,0 +1,23 @@
{
"closeOnFocusLoss": false,
"considerPreedit": false,
"faviconService": "twenty",
"font": {
"size": 12
},
"keybinding": "default",
"keybinds": {
},
"popToRootOnClose": true,
"rootSearch": {
"searchFiles": true
},
"theme": {
"name": "matugen"
},
"window": {
"csd": true,
"opacity": 1,
"rounding": 10
}
}

View file

@ -0,0 +1,2 @@
# Highlight the executable in green if it is found
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh

30
home/.config/zsh/hooks.sh Normal file
View file

@ -0,0 +1,30 @@
# Hook direnv if present
if command -v direnv >/dev/null; then
eval "$(direnv hook zsh)"
fi
# Prompt
if command -v starship >/dev/null; then
source <(starship init zsh)
fi
# Load opam config if present
if [ -r ~/.opam/opam-init/init.zsh ]; then
source ~/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
fi
# Launch atuin if it is installed
if command -v atuin >/dev/null; then
eval "$(atuin init zsh)"
fi
# Set ls/tree/fd theme using vivid if it is installed
if command -v vivid >/dev/null; then
export LS_COLORS="$(vivid generate gruvbox-dark-hard)"
fi
# Init zoxide if present and alias cd to it
if command -v zoxide >/dev/null; then
eval "$(zoxide init zsh)"
alias cd=z
fi

1
home/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
!/.config

11
home/.ssh/config Normal file
View file

@ -0,0 +1,11 @@
Host crocus
HostName crocus.val
User root
Host verbena
HostName verbena.val
User root
Host genepi
HostName genepi.val
User root

27
home/.zshrc Normal file
View file

@ -0,0 +1,27 @@
# Path
source ~/.config/sh/path.sh
# Aliases
source ~/.config/sh/aliases.sh
# Completion
autoload -Uz compinit
compinit
# sudo completion
zstyle ':completion::complete:*' gain-privileges 1
# Line movement with special keys
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
bindkey "^[[3~" delete-char
source ~/.config/zsh/hooks.sh
if [ -r ~/.profile ]; then
source ~/.profile
fi
# Load machine-specific config
if [ -r ~/.config/zsh/$HOST.zsh ]; then
source ~/.config/zsh/$HOST.zsh
fi

4
home/bin/monitor-dark-mode.sh Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env sh
gsettings monitor org.gnome.desktop.interface color-scheme \
| xargs -L1 "${HOME}/rep/flocon/home/bin/switch-helix-theme.sh"

15
home/bin/switch-helix-theme.sh Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euox pipefail
HELIX_CONFIG_PATH=$(readlink -f "${HOME}/.config/helix/config.toml")
HELIX_THEME_LIGHT="zed_onelight"
HELIX_THEME_DARK="kanagawa"
if [[ "$2" == "prefer-dark" ]]; then
sed -i "s/^theme .*/theme = \"$HELIX_THEME_DARK\"/" "$HELIX_CONFIG_PATH"
else
sed -i "s/^theme .*/theme = \"$HELIX_THEME_LIGHT\"/" "$HELIX_CONFIG_PATH"
fi
pkill -USR1 hx || true

View file

@ -1,48 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
bottom
btop
difftastic
doggo
duf
eza
fd
glow
lazygit
nh
ripgrep
skim
taskwarrior3
tealdeer
vivid
zoxide
];
programs.zoxide.enable = true;
programs.starship.enable = true;
programs.atuin.enable = true;
programs.bat.enable = true;
programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
ls = "eza";
lsa = "ls -A";
ll = "ls -lh";
lla = "ls -lAh";
h = "hx";
g = "git";
cd = "z";
tree = "eza --tree";
".." = "cd ..";
"..." = "cd ../..";
};
};
xdg.configFile."git".source = "${config.dotfiles.path}/.config/git";
xdg.configFile."task/taskrc".source = "${config.dotfiles.path}/.config/task/taskrc";
home.sessionPath = [ "${config.dotfiles.path}/bin" ];
}

View file

@ -1,7 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs.gnomeExtensions; [
blur-my-shell
paperwm
];
}

View file

@ -1,5 +0,0 @@
{ config, ... }:
{
xdg.configFile."i3bar-river".source = "${config.dotfiles.path}/.config/i3bar-river";
xdg.configFile."niri".source = "${config.dotfiles.path}/.config/niri";
}

View file

@ -1,30 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
alacritty
ghostty
tofi
i3status-rust
mako
wlsunset
kanshi
grim
slurp
playerctl
swaybg
];
xdg.configFile = {
"sway".source = "${config.dotfiles.path}/.config/sway";
"swaylock".source = "${config.dotfiles.path}/.config/swaylock";
"swayidle".source = "${config.dotfiles.path}/.config/swayidle";
"kanshi".source = "${config.dotfiles.path}/.config/kanshi";
"i3status-rust".source = "${config.dotfiles.path}/.config/i3status-rust";
"tofi/config".source = "${config.dotfiles.path}/.config/tofi/config";
};
programs.alacritty.enable = true;
xdg.configFile."alacritty".source = "${config.dotfiles.path}/.config/alacritty";
xdg.configFile."ghostty/config".source = "${config.dotfiles.path}/.config/ghostty/config";
}

View file

@ -1,20 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
devenv
direnv
hut
radicle-node
typescript-language-server
nil # Nix language server
nixfmt-rfc-style
];
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
xdg.configFile."hut/config".source = "${config.dotfiles.path}/.config/hut/config";
}

View file

@ -1,12 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = [ pkgs.helix ];
programs.helix = {
enable = true;
defaultEditor = true;
};
xdg.configFile."helix".source = "${config.dotfiles.path}/.config/helix";
}

View file

@ -1,44 +0,0 @@
{ config, ... }:
{
programs.thunderbird = {
enable = true;
profiles = {
main = {
isDefault = true;
};
};
};
accounts.email.accounts = {
"rpqt@rpqt.fr" = {
address = "rpqt@rpqt.fr";
realName = "Romain Paquet";
primary = true;
flavor = "migadu.com";
thunderbird.enable = true;
};
"admin@rpqt.fr" = {
address = "admin@rpqt.fr";
aliases = [ "postmaster@rpqt.fr" ];
realName = "Postmaster";
flavor = "migadu.com";
thunderbird.enable = config.programs.thunderbird.enable;
};
"romain.paquet@grenoble-inp.org" = {
address = "romain.paquet@grenoble-inp.org";
realName = "Romain Paquet";
userName = "romain.paquet@grenoble-inp.org";
imap = {
host = "imap.partage.renater.fr";
port = 993;
};
smtp = {
host = "smtp.partage.renater.fr";
port = 465;
};
thunderbird.enable = config.programs.thunderbird.enable;
};
};
}

View file

@ -1,44 +1,16 @@
# This file is maintained automatically by "tofu init".
# Manual edits may be lost in future updates.
provider "registry.opentofu.org/go-gandi/gandi" {
version = "2.3.0"
constraints = "2.3.0"
provider "registry.opentofu.org/hashicorp/external" {
version = "2.3.5"
hashes = [
"h1:9kqWL+eFk/ogrQSltL9zVqjMcOqbvs3EgIJEeyNPb8U=",
"zh:0936d011cf75bb5162c6027d00575a586807adc9008f4152def157b6ad22bae9",
"zh:2170e671f04d3346ea416fcc404be6d05f637eab7df77e289a6898a928885f0b",
"zh:250329baae3cb09cfb88dd004d45f003ba76fbe7b8daf9d18fd640b93a2b7252",
"zh:2ccd9f253424738ca5fbbcb2127bf3713c20e87bfb3829f8c4565569424fd0bd",
"zh:3607b48bc4691cd209528f9ffe16a6cc666bd284b0d0bdfe8c4e1d538559a408",
"zh:3bc1d2b770fe0f50027da59c405b2468d1322243235367014f75f765124f458d",
"zh:6c8a9092847ee2e2890825432b54424c456638d494e49b7d1845f055214714f5",
"zh:8e0b62a330876005d52bcd65d7b1d9a679a7ac79c626e0f86661519e8f9b5698",
"zh:8f44f4d52583ff249e2001ea2a8b8841010489dd43e1a01a9ec3a6813d121c28",
"zh:9a617927d4a3a2897ff10999a19a6d1f0ef634b8c6b8fc3be12cf53948cfd9cf",
"zh:cab3c82c54e38e6001eed5b80a2d16b7824921f8f8b3909049e174c48e6e8804",
"zh:f78cc685aa4ba5056ea53a7f8ce585f87a911f0a8a387a44a33d7dfb69db7663",
"h1:en/2hMK/W/2hKtsEkbxGiiYwi/pSPS/UoGDILHIHjmw=",
]
}
provider "registry.opentofu.org/hetznercloud/hcloud" {
version = "1.49.1"
constraints = "~> 1.45"
version = "1.58.0"
hashes = [
"h1:FKGRNHVbcfQJd8EWrb8Ze5QHkaGr8zI+ZKxBMjvOwPk=",
"zh:3d5f9773da4f8203cf625d04a5a0e4ff7e202684c010a801a945756140c61cde",
"zh:446305d492017cda91e5c15122ec16ff15bfe3ef4d3fd6bcea0cdf7742ab1b86",
"zh:44d4f9156ed8b4f0444bd4dc456825940be49048828565964a192286d28c9f20",
"zh:492ad893d2f89bb17c9beb877c8ceb4a16caf39db1a79030fefeada6c7aa217f",
"zh:68dc552c19ad9d209ec6018445df6e06fb77a637513a53cc66ddce1b024082be",
"zh:7492495ffda6f6c49ab38b539bd2eb965b1150a63fb6b191a27dec07d17601cb",
"zh:850fe92005981ea00db86c3e49ba5b49732fdf1f7bd5530a68f6e272847059fc",
"zh:8cb67f744c233acfb1d68a6c27686315439d944edf733b95f113b4aa63d86713",
"zh:8e13dac46e8c2497772ed1baee701b1d1c26bcc95a63b5c4566c83468f504868",
"zh:c44249c6a8ba931e208a334792686b5355ab2da465cadea03c1ea8e73c02db12",
"zh:d103125a28a85c89aea0cb0c534fe3f504416c4d4fc75c37364b9ec5f66dd77d",
"zh:ed8f64e826aa9bfca95b72892271678cb78411b40d7b404a52404141e05a4ab1",
"zh:f40efad816de00b279bd1e2cbf62c76b0e5b2da150a0764f259984b318e30945",
"zh:f5e912d0873bf4ecc43feba4ceccdf158048080c76d557e47f34749139fdd452",
"h1:6C2LNEvCyGPyWgALDAFTNbRp+5Iuikd4Ju1Xejh+aeg=",
]
}

View file

@ -19,3 +19,8 @@ tofu import hcloud_firewall.hcloud_firewall YYY
```
For Hetzner Cloud, the resource IDs can be found in the URL of the admin console.
## Outputs
The nix configuration reads some values from the `outputs.json` file.
When modifying these, the file should be regenerated with `tofu output -json > outputs.json`.

24
infra/base.nix Normal file
View file

@ -0,0 +1,24 @@
{
config,
lib,
pkgs,
...
}:
{
terraform.required_providers.hcloud.source = "hetznercloud/hcloud";
data.external.hcloud-token = {
program = [
(lib.getExe (
pkgs.writeShellApplication {
name = "get-clan-secret";
text = ''
jq -n --arg secret "$(clan secrets get hcloud-token)" '{"secret":$secret}'
'';
}
))
];
};
provider.hcloud.token = config.data.external.hcloud-token "result.secret";
}

View file

@ -1,52 +0,0 @@
resource "hcloud_server" "crocus_server" {
name = "crocus"
server_type = "cx22"
image = "ubuntu-20.04"
firewall_ids = [hcloud_firewall.crocus_firewall.id]
}
resource "hcloud_firewall" "crocus_firewall" {
name = "crocus-firewall"
rule {
direction = "in"
protocol = "icmp"
source_ips = ["0.0.0.0/0", "::/0"]
}
rule {
direction = "in"
protocol = "tcp"
port = "22"
source_ips = ["0.0.0.0/0", "::/0"]
}
rule {
direction = "in"
protocol = "tcp"
port = "22"
source_ips = ["0.0.0.0/0", "::/0"]
}
rule {
direction = "in"
protocol = "tcp"
port = "80"
source_ips = ["0.0.0.0/0", "::/0"]
}
rule {
direction = "in"
protocol = "tcp"
port = "443"
source_ips = ["0.0.0.0/0", "::/0"]
}
# radicle-node
rule {
direction = "in"
protocol = "tcp"
port = "8776"
source_ips = ["0.0.0.0/0", "::/0"]
}
}

20
infra/dns.nix Normal file
View file

@ -0,0 +1,20 @@
{ config, ... }:
{
resource.hcloud_zone.rpqt_fr = {
name = "rpqt.fr";
mode = "primary";
};
resource.hcloud_zone.turifer_dev = {
name = "turifer.dev";
mode = "primary";
};
output.rpqt_fr_zone_name = {
value = config.resource.hcloud_zone.rpqt_fr "name";
};
output.turifer_dev_zone_name = {
value = config.resource.hcloud_zone.turifer_dev "name";
};
}

View file

@ -1,23 +0,0 @@
data "gandi_livedns_domain" "rpqt_fr" {
name = "rpqt.fr"
}
resource "gandi_livedns_record" "rpqt_fr_radicle_a" {
zone = data.gandi_livedns_domain.rpqt_fr.id
name = "radicle"
type = "A"
ttl = 10800
values = [
hcloud_server.crocus_server.ipv4_address,
]
}
resource "gandi_livedns_record" "rpqt_fr_radicle_aaaa" {
zone = data.gandi_livedns_domain.rpqt_fr.id
name = "radicle"
type = "AAAA"
ttl = 10800
values = [
hcloud_server.crocus_server.ipv6_address,
]
}

40
infra/flake-module.nix Normal file
View file

@ -0,0 +1,40 @@
{ self, ... }:
{
perSystem =
{ pkgs, ... }:
{
terranix.terranixConfigurations.infra = {
terraformWrapper.package = pkgs.opentofu.withPlugins (p: [
p.hashicorp_external
p.hetznercloud_hcloud
]);
extraArgs = { inherit (self) infra; };
modules = [
./base.nix
./dns.nix
./mail.nix
./radicle.nix
./web.nix
];
};
};
flake.infra =
let
tf_outputs = builtins.fromJSON (builtins.readFile ./outputs.json);
in
{
machines = {
verbena = {
ipv4 = tf_outputs.verbena_ipv4.value;
ipv6 = tf_outputs.verbena_ipv6.value;
gateway6 = tf_outputs.verbena_gateway6.value;
};
crocus = {
ipv4 = tf_outputs.crocus_ipv4.value;
ipv6 = "2a01:4f8:1c1e:e415::1";
};
};
};
}

88
infra/lib.nix Normal file
View file

@ -0,0 +1,88 @@
{ lib, ... }:
let
mkMigaduDkim = zone: name: {
inherit zone;
name = "${name}._domainkey";
type = "CNAME";
records = [
{ value = "${name}.${zone}._domainkey.migadu.com."; }
];
};
in
{
mkMigadu_hcloud_zone_rrset = zone: hostedEmailVerify: {
dkim_1 = mkMigaduDkim zone "key1";
dkim_2 = mkMigaduDkim zone "key2";
dkim_3 = mkMigaduDkim zone "key3";
spf = {
inherit zone;
name = "@";
type = "TXT";
records = [
{
value = lib.tf.ref ''provider::hcloud::txt_record("v=spf1 include:spf.migadu.com -all")'';
}
{
value = lib.tf.ref ''provider::hcloud::txt_record("hosted-email-verify=pgeaq3bp")'';
}
];
};
dmarc = {
inherit zone;
name = "_dmarc";
type = "TXT";
records = [
{
value = lib.tf.ref ''provider::hcloud::txt_record("v=DMARC1; p=quarantine;")'';
}
];
};
mx = {
inherit zone;
name = "@";
type = "MX";
records = [
{ value = "10 aspmx1.migadu.com."; }
{ value = "20 aspmx2.migadu.com."; }
];
};
autoconfig = {
inherit zone;
name = "autoconfig";
type = "CNAME";
records = [ { value = "autoconfig.migadu.com."; } ];
};
autodiscover = {
inherit zone;
name = "_autodiscover._tcp";
type = "SRV";
records = [ { value = "0 1 443 autodiscover.migadu.com."; } ];
};
submissions = {
inherit zone;
name = "_submissions._tcp";
type = "SRV";
records = [ { value = "0 1 465 smtp.migadu.com."; } ];
};
imaps = {
inherit zone;
name = "_imaps._tcp";
type = "SRV";
records = [ { value = "0 1 993 imap.migadu.com."; } ];
};
pop3s = {
inherit zone;
name = "_pop3s._tcp";
type = "SRV";
records = [ { value = "0 1 995 pop.migadu.com."; } ];
};
};
}

15
infra/mail.nix Normal file
View file

@ -0,0 +1,15 @@
{ config, lib, ... }:
let
inherit (import ./lib.nix { inherit lib; })
mkMigadu_hcloud_zone_rrset
;
rpqt_fr = mkMigadu_hcloud_zone_rrset (config.resource.hcloud_zone.rpqt_fr "name") "pgeaq3bp";
# Prefix resource names with zone name to avoid collision
turifer_dev = lib.mapAttrs' (name: value: lib.nameValuePair "turifer_dev_${name}" value) (
mkMigadu_hcloud_zone_rrset (config.resource.hcloud_zone.turifer_dev "name") "k5z4lcfc"
);
in
{
resource.hcloud_zone_rrset = rpqt_fr // turifer_dev;
}

View file

@ -1,12 +0,0 @@
terraform {
required_providers {
gandi = {
source = "go-gandi/gandi"
version = "2.3.0"
}
hcloud = {
source = "hetznercloud/hcloud"
version = "~> 1.45"
}
}
}

22
infra/outputs.json Normal file
View file

@ -0,0 +1,22 @@
{
"crocus_ipv4": {
"sensitive": false,
"type": "string",
"value": "116.203.18.122"
},
"verbena_gateway6": {
"sensitive": false,
"type": "string",
"value": "2001:41d0:305:2100::1"
},
"verbena_ipv4": {
"sensitive": false,
"type": "string",
"value": "51.68.122.153"
},
"verbena_ipv6": {
"sensitive": false,
"type": "string",
"value": "2001:41d0:305:2100::271e"
}
}

View file

@ -1,7 +0,0 @@
provider "gandi" {
personal_access_token = var.gandi_token
}
provider "hcloud" {
token = var.hcloud_token
}

52
infra/radicle.nix Normal file
View file

@ -0,0 +1,52 @@
{
config,
infra,
lib,
...
}:
{
resource.hcloud_zone_rrset =
let
zone = config.resource.hcloud_zone.rpqt_fr "name";
in
{
radicle_a = {
inherit zone;
name = "radicle";
type = "A";
records = [ { value = infra.machines.crocus.ipv4; } ];
};
radicle_aaaa = {
inherit zone;
name = "radicle";
type = "AAAA";
records = [ { value = infra.machines.crocus.ipv6; } ];
};
radicles_srv = {
inherit zone;
name = "seed._radicle-node._tcp";
type = "SRV";
records = [ { value = "32767 32767 58776 radicle.rpqt.fr."; } ];
};
radicles_nid = {
inherit zone;
name = "seed._radicle-node._tcp";
type = "TXT";
records = [
{
value = lib.tf.ref ''provider::hcloud::txt_record("nid=z6MkuivFHDPg6Bd25v4bEWm7T7qLUYMWk1eVTE7exvum5Rvd")'';
}
];
};
radicle_ptr = {
inherit zone;
name = "_radicle-node._tcp";
type = "PTR";
records = [ { value = "seed._radicle-node._tcp.radicle.rpqt.fr."; } ];
};
};
}

View file

@ -1,7 +0,0 @@
variable "gandi_token" {
sensitive = true
}
variable "hcloud_token" {
sensitive = true
}

82
infra/web.nix Normal file
View file

@ -0,0 +1,82 @@
{ config, infra, ... }:
{
resource.hcloud_zone_rrset =
let
sourcehut_pages = {
ipv4 = "46.23.81.157";
ipv6 = "2a03:6000:1813:1337::157";
};
zone = config.resource.hcloud_zone.rpqt_fr "name";
in
{
a = {
inherit zone;
name = "@";
type = "A";
records = [ { value = sourcehut_pages.ipv4; } ];
};
aaaa = {
inherit zone;
name = "@";
type = "AAAA";
records = [ { value = sourcehut_pages.ipv6; } ];
};
cloud_a = {
inherit zone;
name = "cloud";
type = "A";
records = [ { value = infra.machines.verbena.ipv4; } ];
};
cloud_aaaa = {
inherit zone;
name = "cloud";
type = "AAAA";
records = [ { value = infra.machines.verbena.ipv6; } ];
};
git_turifer_dev_a = {
zone = config.resource.hcloud_zone.turifer_dev "name";
name = "git";
type = "A";
records = [ { value = infra.machines.verbena.ipv4; } ];
};
git_turifer_dev_aaaa = {
zone = config.resource.hcloud_zone.turifer_dev "name";
name = "git";
type = "AAAA";
records = [ { value = infra.machines.verbena.ipv6; } ];
};
buildbot_turifer_dev_a = {
zone = config.resource.hcloud_zone.turifer_dev "name";
name = "buildbot";
type = "A";
records = [ { value = infra.machines.verbena.ipv4; } ];
};
buildbot_turifer_dev_aaaa = {
zone = config.resource.hcloud_zone.turifer_dev "name";
name = "buildbot";
type = "AAAA";
records = [ { value = infra.machines.verbena.ipv6; } ];
};
wg1_turifer_dev_a = {
zone = config.resource.hcloud_zone.turifer_dev "name";
name = "wg1";
type = "A";
records = [ { value = infra.machines.verbena.ipv4; } ];
};
wg1_turifer_dev_aaaa = {
zone = config.resource.hcloud_zone.turifer_dev "name";
name = "wg1";
type = "AAAA";
records = [ { value = infra.machines.verbena.ipv6; } ];
};
};
}

18
inventory.json Normal file
View file

@ -0,0 +1,18 @@
{
"machines": {
"verbena": {
"installedAt": 1757633120
},
"crocus": {
"installedAt": 1757633120
},
"haze": {
"installedAt": 1757633120,
"description": "Romain's laptop"
},
"genepi": {
"installedAt": 1757633120,
"description": "Raspberry Pi 4B"
}
}
}

View file

@ -3,3 +3,4 @@
- **crocus**: Hetzner Cloud x86_64 VPS
- **genepi**: Raspberry Pi 4B
- **haze**: ASUS VivoBook Laptop
- **verbena**: OVH Cloud x86_64 VPS

View file

@ -1,23 +1,23 @@
{
inputs,
modulesPath,
config,
self,
...
}:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
# ./radicle.nix
../../system
inputs.clan-core.clanModules.state-version
self.nixosModules.radicle
self.nixosModules.nix-defaults
../../modules/remote-builder.nix
../../modules/borgbackup.nix
self.inputs.srvos.nixosModules.server
self.inputs.srvos.nixosModules.hardware-hetzner-cloud
];
disabledModules = [
self.inputs.srvos.nixosModules.mixins-cloud-init
];
nixpkgs.hostPlatform = "x86_64-linux";
networking.hostName = "crocus";
clan.core.networking.targetHost = "root@crocus.local";
networking.useDHCP = false;
systemd.network.enable = true;
@ -32,38 +32,34 @@
];
};
services.avahi.enable = true;
fileSystems."/data1" = {
device = "/dev/disk/by-id/scsi-0HC_Volume_103766469";
};
disko.devices.disk.main.device = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_48353082";
services.garage.settings.data_dir = [
{
path = "/var/lib/garage/data";
capacity = "20G";
}
{
path = "/data1/garage";
capacity = "20G";
}
];
clan.core.settings.state-version.enable = true;
clan.core.networking.buildHost = "root@haze";
services.avahi.allowInterfaces = [
"zts7mq7onf"
];
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
services.prometheus = {
enable = true;
port = 9001;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
port = 9002;
};
};
scrapeConfigs = [
{
job_name = "crocus";
static_configs = [
{
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
}
];
}
];
};
services.nginx = {
enable = true;
recommendedProxySettings = true;
@ -79,4 +75,6 @@
acceptTerms = true;
defaults.email = "admin@rpqt.fr";
};
services.tailscale.useRoutingFeatures = "server";
}

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