Compare commits

..

278 Commits

Author SHA1 Message Date
11418b33b9 ⬆️ version bump 2025-10-19 20:15:33 -04:00
3ebc43b540 🚑 fix raspberry pi build 2025-10-15 12:27:35 -04:00
8fbf192735 ⬆️ version bump 2025-10-12 11:02:54 -04:00
262b1a1f30 ⬆️ version bump 2025-10-11 21:11:58 -04:00
919da33fb5 ⬆️ version bump 2025-10-07 13:21:55 -04:00
c3fd894a76 💄 squircle icon for emacs 2025-09-25 14:35:27 -04:00
a3604071d5 📦 more package tweaks 2025-09-08 17:30:42 -04:00
b7a0807165 📦 more package tweaks 2025-09-02 17:12:25 -04:00
55ae30f066 🔧 fresh borgbase repo 2025-09-01 13:14:06 -04:00
861a12bc60 📦 what's one more browser? 2025-09-01 13:11:02 -04:00
9fa98cb111 🔒️ plato: broadcom driver marked insecure
NOTE: maybe just remove it?
2025-08-18 15:16:10 -04:00
9fbe64a194 🚨 formatting tweaks 2025-08-18 10:31:48 -04:00
ac03db4f87 ⬆️ version bump 2025-07-20 14:07:20 -04:00
7cec56a95e 🔧 cleanup matrix config 2025-07-01 15:14:13 -04:00
a507412e0e 🚚 homebrew app renames 2025-06-23 12:30:06 -04:00
3ecac708c3 🚚 pre-commit-hooks rename 2025-06-02 16:54:44 -04:00
7b8c02a19e ♻️ refactor flake-utils usage 2025-06-01 14:21:00 -04:00
38aff239a0 🔥remove deploy-rs (no longer in use) 2025-05-26 17:03:14 -04:00
f58a14541f 👽️ nix-darwin: primaryUser 2025-05-17 16:40:50 -04:00
6183c17722 ⬆️ version bump 2025-05-01 17:35:01 -04:00
ac43ae77cc 📦️ experimenting with podman 2025-04-20 16:07:45 -04:00
ccfcb5ec7f 🐛 mas 2.0 works again 2025-04-13 11:55:48 -04:00
30db860308 🐛 btop is not a cask 2025-04-08 19:57:03 -04:00
35b24b54fd 🔧 nixfmt-tree 2025-04-08 19:50:13 -04:00
5aaeb78e9c 📦️ I don't remember why I removed btop 2025-04-08 19:49:43 -04:00
f4307bd301 🔧 plato: docker dns 2025-04-07 11:28:45 -04:00
1ff4017cd6 🐛 homebrew masApps aren't working
See: https://github.com/nix-darwin/nix-darwin/issues/1323
2025-04-02 21:20:36 -04:00
e31b3a36d7 ⬆️ version bump 2025-04-01 12:46:50 -04:00
765d3d3919 🔥 ipfs-cluster service is now upstream 2025-03-31 17:02:04 -04:00
4503ca8cc8 🚚 nix-darwin has a new home 2025-03-28 13:28:23 -04:00
22abedaf52 📦️ more package updates 2025-03-23 16:52:23 -07:00
cdadeee69a 📦️ package updates 2025-03-17 10:22:51 -04:00
dafa424d2d add k3s 2025-03-10 23:22:23 -04:00
005b0bb5e4 🔥 remove traefik 2025-03-09 20:54:32 -04:00
a4b746fd9c 🔧 set k3s server address 2025-03-08 18:02:27 -05:00
defc49c48a add k3s 2025-03-08 17:50:32 -05:00
72198292ab 📦 add bruno 2025-03-05 22:50:05 -05:00
e066118d2b ⬆️ version bump 2025-03-03 13:20:22 -05:00
d14137fedd 📦️ emacs-plus now v30 2025-02-26 22:27:28 -05:00
c9d5a5a966 📦 dev tools 2025-02-20 14:24:27 -08:00
5c46a41206 ⬆️ version bump 2025-02-17 15:15:32 -05:00
bbe4fe6f76 🔧 tailscale webclient for metrics 2025-02-15 17:54:31 -05:00
87a362c9c7 👽️ darwin: update nix daemon config 2025-02-13 22:42:52 -05:00
6b1e91b0f5 ⬆️ version bump 2025-02-08 08:14:10 -05:00
86371ba451 ⬆️ version bump 2025-02-06 10:32:19 -05:00
3d945eb6af 🔥 remove old homebrew casks 2025-01-31 13:04:33 -05:00
df43e5550b 🔥 no terraform from homebrew 2025-01-27 10:54:59 -05:00
04ad800a88 📦 heraclitus: adding some packages 2025-01-24 11:10:11 -05:00
afafcb92ad ⬆️ version bump 2025-01-22 23:43:15 -05:00
f5b8d4fde5 🛂 add minecraft user 2025-01-17 18:22:23 -05:00
7ae9292871 ⬆️ bump version 2025-01-17 15:20:14 -05:00
4b0c646ef3 📦 epicurus: standalone tailscale / update IP 2025-01-12 17:20:30 -05:00
c2ffa8c929 📦 switch to tailscale standalone
(I didn't realize it's the recommended macOS install method)
2025-01-08 22:32:54 -05:00
a5238adc25 📦 loving ghostty 2025-01-07 21:39:57 -05:00
c9f76587b3 📦 asdf from homebrew 2025-01-03 21:58:47 -05:00
8fc9873beb 📦 cursor bandwagon? 2024-12-20 20:12:13 -05:00
6b0c1057eb ⬆️ version bump 2024-12-09 21:06:16 -05:00
a53ad5a5ae 🎨 move to nixfmt-rfc-style 2024-12-07 20:46:15 -05:00
9ea7912596 🐛 fix TLS error in chezmoi update 2024-11-30 19:30:57 -05:00
39a6c16cea ⬆️ version bump 2024-11-27 16:50:04 -05:00
1b059d60a2 ⬆️ version bump 2024-11-24 14:44:53 -05:00
2f90fe4b5e 🔧 chezmoi update 2024-11-21 18:48:25 -05:00
be94d1a35a 📦 package updates 2024-11-15 16:57:44 -05:00
365872d879 ⬆️ version bump 2024-11-10 17:30:41 -05:00
56a6133b36 ⬆️ version bump 2024-11-04 22:29:44 -06:00
9ef3beccb8 📦 add watchman 2024-11-02 17:43:01 -04:00
a23f972a35 ⬆️ version bump 2024-11-01 17:47:57 -04:00
4012f8229c 🔥 matrix-sliding-sync is no more 2024-10-23 14:57:45 -04:00
adf5861cf9 ⬆️ version bump 2024-10-22 22:09:49 -04:00
ea5496e870 ♻️ move terraform code start adding dns 2024-10-17 11:24:13 -04:00
73a52e35d0 ⬆️ version bump 2024-10-17 00:14:42 -04:00
1ce8c86b0d 🚀 reinstate system.autoUpgrade 2024-10-14 14:27:09 -04:00
578d029c1a 🔥 remove linux-builder (for now) 2024-10-04 16:53:06 -04:00
732720117d 🐛 don't always init chezmoi 2024-10-03 21:46:45 -04:00
d9b0c54edc 🐛 aristotle: fix kernel build 2024-10-01 13:34:13 -04:00
5c489491ad 🔧 move tofu configs 2024-09-26 15:30:46 -04:00
398b1e7470 📦 package shuffling 2024-09-25 13:29:05 -04:00
46685f03d7 aristotle: fan configs 2024-09-24 10:50:32 -04:00
49d2768cfe 📦 moving to brews for macOS 2024-09-18 21:29:09 -04:00
d3bd7ef416 🔧 aristotle: rebuild agent 2024-09-15 21:28:49 -04:00
6d38e964e3 🔧 aristotle: move to raspberry-pi-nix
also re-deployed form, matter and purpose
2024-09-15 20:35:46 -04:00
8b57a7580a 🐛 fix chezmoi deploy 2024-09-15 13:06:52 -04:00
d9173abb79 ♻️ refactor home-manager / dotfiles to use chezmoi 2024-09-14 18:12:01 -04:00
6321f08230 ⬆️ version bump 2024-09-11 12:41:33 -04:00
06ddc96680 ♻️ consolidate nix configs 2024-09-02 10:47:02 -04:00
49884d40e5 ⬆️ version bump 2024-08-31 12:24:46 -04:00
70cd5624a5 🔧 ups config change 2024-08-27 17:58:52 -04:00
12a0213098 🔥 remove homestar 2024-08-25 13:42:38 -04:00
e49bed2b6d 🚚 logi-options rename 2024-08-24 16:01:27 -04:00
6e31fa5c55 ⬆️ version bump 2024-08-21 20:18:40 -04:00
68f137dd4f 📦 adding packages 2024-08-20 10:47:48 -04:00
965f8de5db 🔥 no more lorri 2024-08-19 20:04:21 -04:00
e747d2f5be 📦️ package tweaks 2024-08-08 19:26:46 -04:00
61e13e4932 ⬆️ version bump 2024-08-05 15:00:42 -04:00
9dd174a224 🔧 switch from nil to nixd 2024-08-02 13:27:23 -04:00
37713225ba ⬆️ version bump 2024-07-29 11:50:26 -04:00
5448135da4 ⬆️ version bump 2024-07-21 16:31:00 -04:00
1e39527f5e add badbits deny for ipfs gateway 2024-07-19 14:26:53 -04:00
ac19b5ab7b ⬆️ version bump 2024-07-18 17:23:47 -04:00
8be7f73e87 🐛 switch to homebrew doppler 2024-07-14 13:04:44 -04:00
fed866990c 🚑 minecraft: fix nat forwarding 2024-07-12 15:09:14 -04:00
fe3911ab2c 📦 k8s tools 2024-07-04 10:38:59 -04:00
e58507d809 🚚 firefox developer edition cask moved 2024-07-02 10:02:41 -04:00
0ede09f95c ⬆ version bump 2024-06-24 15:57:26 -04:00
cc4d60cbac ⬆️ version bump 2024-06-21 10:52:48 -04:00
a836a0a66b 📦 add some dev tools 2024-06-18 21:50:22 -04:00
aabadd52f0 ⬆️ version bump 2024-06-14 14:39:26 -04:00
07a489b471 🔥 more app cleanup 2024-06-10 12:29:42 -04:00
2a4cb54402 🔥 remove bartender 2024-06-06 15:44:31 -04:00
6f104b10da ⬆️ version bump 2024-06-03 22:39:04 -04:00
6ea9e35c72 ⬆️ version bump 2024-05-25 22:53:28 -04:00
e5f6ff3f12 ⬆️ version bump 2024-05-21 21:49:56 -04:00
3fc2cae03f ⬆️ version bump 2024-05-18 18:26:57 -04:00
e22164ab91 ⬆️ version bump 2024-05-13 17:10:30 -04:00
177f4c6393 🔥 not using ipfs desktop anymore 2024-05-06 17:29:22 -04:00
f641c69942 📦 package updates 2024-04-25 16:45:05 -04:00
c1d0e6a267 ⬆️ version bump 2024-04-22 13:14:35 -04:00
558d182465 ⬆️ version bump 2024-04-11 11:54:11 -04:00
d451d34500 ⬆️ version bump 2024-04-09 13:00:57 -04:00
b31ec0d4f7 ⬆️ version bump 2024-04-08 13:46:54 -04:00
0055ce56a4 ⬆️ version bump 2024-04-06 15:00:59 -04:00
b994cb6c73 ⬆️ version bump 2024-04-04 21:25:02 -04:00
c5e8d3896b 👽️ deploy-rs overlay update 2024-03-30 13:43:43 -04:00
a07a205143 ⬆️ bump versions 2024-03-28 15:49:32 -04:00
1a7a9fce77 🔧 plato: update homestar peerID 2024-03-18 22:05:23 -04:00
c3e9fd6714 ⬆️version bump 2024-03-16 11:14:56 -04:00
68614a06e6 🔒️ plato: fixed homestar key 2024-03-15 10:45:46 -04:00
d5fea83d5f 🗑️ plato: clean up deprecated option 2024-03-10 11:15:59 -04:00
5aa4b923f1 ⬆ version bump 2024-03-05 23:18:14 -05:00
e05ac089ed ⬆ version bump 2024-03-02 13:56:38 -05:00
765df12592 🔧 homestar node 2024-02-29 19:01:40 -05:00
074e771c3a 🔧 give linux-builder more resources 2024-02-29 16:09:02 -05:00
4ed771304c 🔥 aristotle: remove homestar
the aarch64-linux build is really slow :(
2024-02-29 16:08:01 -05:00
b574218035 📦️ add some dev tools 2024-02-27 18:28:22 -05:00
79c2cdd6b0 🐛 whoops 2024-02-23 15:29:42 -05:00
ae1760ffd8 aristotle: add homestar 2024-02-23 15:04:24 -05:00
4026caccae ⬆️ bump versions 2024-02-18 12:17:17 -05:00
f7e0ac3cbb ♻️ refactor some monitoring configs 2024-02-17 22:12:24 -05:00
15d95e6208 🔥 clean up duplicate rpi configs 2024-02-17 13:25:00 -05:00
c9692d70eb add homestar 2024-02-16 11:50:50 -05:00
d8f19c487a ⬆️ version bump 2024-02-11 17:39:01 -05:00
b38511486c ⬆️ version bump 2024-01-28 12:24:32 -05:00
d87221ed37 ️ use deploy-rs from nixpkgs 2024-01-26 17:00:00 -05:00
aa4ed46e50 ⬆️ version bump 2024-01-19 13:28:06 -05:00
8ada774d89 📦️ use emacs-macport 2024-01-17 22:34:11 -05:00
23a5e21b71 ⬆️ version bump 2024-01-10 11:11:25 -05:00
f59ff2b383 ⬆️ version bump 2024-01-08 18:46:00 -05:00
a3de6659c1 🔧 matrix-sliding-sync settings update 2024-01-01 17:22:30 -05:00
954abfd1f2 ⬆️ version bump 2023-12-26 09:54:53 -05:00
7b21bc7e91 ⬆️ version bump 2023-12-22 11:45:07 -05:00
a44af04160 🔧 aristotle: set timeZone 2023-12-20 11:10:46 -05:00
74fbd0a385 ⬆️ version bump 2023-12-19 14:09:56 -05:00
ef401a4e4c use system.autoUpgrade for nixos machines
also add garnix.io cache

Closes #18
2023-12-15 22:28:14 -05:00
f85ef16b42 📦️ rework some base packages 2023-12-12 18:59:06 -05:00
94d559c4f4 🔨 pg upgrade script 2023-12-11 16:59:00 -05:00
a38118b191 new power.ups configs 2023-12-10 14:53:55 -05:00
4c3c44f052 🔧 update postgres permissions 2023-11-27 12:14:54 -05:00
c39bbfd5fc ⬆️ bump versions 2023-11-04 13:25:46 -04:00
3659087618 📦 package updates 2023-10-20 16:27:29 -04:00
63399e4f36 🔥 stick with emacs-nox 2023-10-13 21:40:18 -04:00
2b6d30de6e 🏗️ switch to opentofu 2023-10-10 19:27:29 -04:00
e7766c9b8d 🔧 tweak borgbase repo 2023-09-30 13:29:52 -04:00
e8d834dff2 📦 opal now in homebrew 2023-09-22 10:51:42 -04:00
98f3460c5f 🔧 mount samba as user 2023-09-15 22:20:24 -04:00
01ee84e69e 📦 package cleanup 2023-09-15 22:20:05 -04:00
9ec3ddde1f ⚰️ remove old darwin-local script 2023-09-12 17:01:59 -04:00
ba4eaf1d2e 🏗️ no more nfs (smb for parthenon) 2023-09-10 16:16:14 -04:00
4066c2b6a9 🚨 statix updates 2023-09-10 14:27:05 -04:00
ccdea6b752 ⬆️ bump versions 2023-09-09 14:34:13 -04:00
00b0360e0c ⬆️ bump versions 2023-09-02 12:39:29 -04:00
e66a4b9a37 playing with terraform 2023-08-20 13:06:05 -04:00
6198ed9d59 📦 fewer global tools - more shells 2023-08-20 13:05:50 -04:00
475792286d 🔧 ipfs config tweaks 2023-07-27 16:24:11 -04:00
19a01e278e ♻️ config refactor cleanup 2023-07-27 15:51:15 -04:00
d4b4ba1d1e ♻️ refactor layout, simplify flake.nix 2023-07-27 15:22:16 -04:00
74296f8b9b ⚰️ remove pulumi 2023-07-26 15:01:14 -04:00
e1871a2030 📦️ package updates - emacs29, nil, etc 2023-07-25 12:26:13 -04:00
5f668bee6d 🐛 darwin.linux-builder is fixed 2023-07-25 12:24:03 -04:00
71395424ee 🗑️ remove deprecated homebrew tap 2023-07-21 12:48:59 -04:00
17a779f5f9 matrix-sliding-sync - new module upstream 2023-07-21 12:48:23 -04:00
402bddec5d 🐛 aristotle: enable poe-hat support 2023-07-17 17:01:34 -04:00
883e1e634d 🐛 darwin.linux-builder is broken :( 2023-07-17 14:41:12 -04:00
9f80c55ace add pre-commit-hooks 2023-07-14 18:53:25 -04:00
4decbc5f3c add matrix-sliding-sync
Close #17
2023-07-09 19:58:59 -04:00
74e75de168 🐛 aristotle: fix bootloader config 2023-07-09 19:58:27 -04:00
7c92880612 🗑️ boot.loader.raspberryPi deprecated 2023-07-09 13:56:52 -04:00
aee94aef3a nix-darwin now includes linux-builder 2023-07-09 13:56:26 -04:00
4f1f81e425 🔨 builder: no emulation 2023-07-01 16:27:52 -04:00
11d76e31c0 📦 herclitus: package updates 2023-06-29 18:18:36 -04:00
abfcf1ebd2 🔧 builder config updates 2023-06-27 11:04:56 -04:00
5a80cf0597 🗑️ flake cleanup 2023-06-23 18:16:24 -04:00
effe379b80 🚀 epicurus: deploy-rs config 2023-06-20 23:35:34 -04:00
9a6f773f68 🔧 nix gc delete older than 30 days 2023-06-19 16:36:44 -04:00
22e576d8e9 🗑 nix-darwin now includes an IPFS service 2023-06-19 16:15:17 -04:00
51fff43d2a 🕹️ add minecraft user 2023-06-12 15:59:46 -04:00
b3df0ce73b 🔐 epicurus: authorizedKeys 2023-06-08 21:52:58 -04:00
5a855b7eaa 👷 use macos-builder 2023-06-07 15:17:07 -04:00
baad77a1ab 🔧 update traefik config 2023-06-05 22:56:53 -04:00
673f62f6d5 📦 package updates 2023-06-05 22:56:41 -04:00
81a7b69c9d 📦️ package updates 2023-05-25 14:52:23 -07:00
3d3213be05 ⬆️ version bumps 2023-05-22 12:59:10 -04:00
8fe6194fc2 📦 package cleanup 2023-05-11 17:59:38 -04:00
f05e74bba5 🧱 dont auto-opmtimise store on darwin 2023-05-08 13:04:45 -04:00
6a72a85ac2 📦 re-add devenv tool 2023-05-08 13:04:20 -04:00
d09e98f04d 🔧 aristotle: vanilla kubo 2023-05-05 12:08:30 -04:00
cb82a5558a 📦 big package cleanup 2023-05-03 20:29:40 -04:00
420c80b4a1 🔥 remove devenv (issues with deploy-rs) 2023-05-03 17:51:28 -04:00
1f17d5e669 👽️ update deprecated config 2023-04-27 11:05:10 -04:00
60c29113b2 🔧 plato: tailscale exit node 2023-04-19 04:54:37 -04:00
3e52123b80 📦️ aristotle: run carmirror 2023-04-08 15:50:20 -04:00
2f83341de0 🔧 akkoma postgres config update 2023-04-08 15:49:43 -04:00
506cbdc761 🔥 remove old pleroma configs 2023-03-27 22:49:37 -04:00
9c133feed0 ♻️ refactor programs.zsh 2023-03-25 15:17:55 -04:00
0e31565644 🏗️ migrate to akkoma 2023-03-18 23:40:44 -04:00
07130a5a41 📦 add fission overlay 2023-03-15 15:56:51 -04:00
7bb0ca2d52 ⬆️ bump versions 2023-03-06 19:48:30 -05:00
d43da3f34e 🎮 whitelist raf 2023-03-01 12:08:58 -05:00
fe48142b8d 🔧 epicurus: add dev tools 2023-02-27 11:32:48 -05:00
513eaaecd2 🐛 nix flake check currently segfaults on darwin 2023-02-24 11:29:19 -05:00
19a4053a8c 📌 bump postgres to v14 2023-02-20 20:01:39 -05:00
0c4ba0a464 ♻️ refactor system.stateVersion usage 2023-02-20 13:28:35 -05:00
bf6b57c236 🐛 fix home-manager deploy 2023-02-20 13:24:25 -05:00
f8eac0c248 ♻️ back to standalone home-manager 2023-02-18 14:32:30 -05:00
fb0689b904 📦 moved packages from dotfiles 2023-02-15 12:13:26 -05:00
3a34ae013f 🔧 update nix.gc to run weekly 2023-02-13 17:31:23 -05:00
d87d9a76d6 ⬆️ version bump 2023-02-13 11:04:22 -05:00
9d0f12de10 playing with nixos-generators 2023-02-09 22:38:20 -05:00
ba09a67ec9 🧱 scorates: actual droplet config 2023-02-09 22:37:21 -05:00
01089c5725 messing around with pulumi 2023-02-07 22:08:49 -05:00
c158229f40 📦️ add synadm for matrix admin 2023-02-03 18:58:29 -05:00
c8ee9cb4e1 ⬆️ version bumps 2023-02-01 18:41:32 -05:00
2faeb46c59 ♻️ refactor base config 2023-01-31 22:01:21 -05:00
d0ffe9eb60 🔧 cachix config 2023-01-30 22:06:36 -05:00
e51d179082 🔥 plato: no more code-server 2023-01-27 10:01:51 -05:00
abf5b40554 🔧 gitea proxy config update 2023-01-21 17:39:39 -05:00
2860139d82 📦️ package updates 2023-01-20 20:58:47 -05:00
871232da33 ⬆️ bump versions 2023-01-07 11:24:04 -05:00
dfaabb7f92 🔧 epicurus: home-manager config sync 2023-01-04 15:14:17 -05:00
b48348dacc 🐛 niv broken in aarch64-darwin unstable again 2023-01-01 13:37:25 -05:00
08158fd335 🔧 more devenv tinkering 2022-12-28 19:03:43 -05:00
1dd6bb52a0 🚨 statix/deadnix fixes 2022-12-27 10:10:53 -05:00
6abad2d5a6 🔧 add devenv 2022-12-27 10:06:18 -05:00
07fe82964b 📦️ experimenting with devenv 2022-12-26 21:33:53 -05:00
78ce9c76e0 ⬆️ bump versions 2022-12-24 19:58:09 -05:00
b4b879ef77 🔧 more ipfs-cluster config 2022-12-21 23:37:56 -05:00
c47ae5d2ce 🔥 *sigh* ipfs-cluster + nginx doesn't work 2022-12-18 21:29:57 -05:00
b527d5c790 socrates: gateway for cluster restapi 2022-12-17 22:44:49 -05:00
aa73269bee 🔧 aristotle: ipfs cluster api config 2022-12-16 18:44:26 -05:00
8ca1a40ef0 🔧 socrates: new IP for home assistant 2022-12-14 16:26:24 -05:00
12ab2eadb2 ⬆️ version bumps 2022-12-09 21:03:41 -05:00
e238460f76 📦️ heraclitus: add calibre 2022-12-05 22:40:46 -05:00
db869ea59c 🔧 plato: clean up traefik config 2022-12-03 23:14:48 -05:00
ca1fab4f9f 📦️ heraclitus: add signal app 2022-11-25 22:51:48 -05:00
1f87bb4a5e 🔧 darwin: automatic nix gc 2022-11-25 22:50:34 -05:00
e8fe20ffcb 🔧 traefik settings 2022-11-17 22:40:13 -05:00
fe5e3da48d 🐛 fix up ipfs-darwin service 2022-11-17 22:39:47 -05:00
d845616f35 add ipfs service for darwin machines 2022-11-13 17:39:35 -05:00
da846292a6 add base module w/ automatic gc 2022-11-09 23:24:40 -05:00
16d29169e0 🔐 add sudoers on darwin 2022-11-08 23:18:44 -05:00
ff75a042b8 ⬆️ version bump 2022-11-08 22:07:09 -05:00
0dbdc3f548 🔧 pleroma config 2022-11-07 22:10:30 -05:00
1f9d616463 ⬆️ version bump 2022-11-06 23:22:12 -05:00
82e731c314 add nix fmt config 2022-10-31 17:41:19 -04:00
26d57a6eec 🚚 kubo settings rename 2022-10-30 23:04:36 -04:00
449c104dc8 📦️ add overlay + workon 2022-10-27 22:34:08 -04:00
f72e15afa7 🚨 cleanup grafana config changes 2022-10-24 16:23:09 -04:00
1b79e8f003 🐛 nix-darwin fixed 2022-10-23 11:02:55 -04:00
e0ac751438 📦️ add descript 2022-10-21 22:26:49 -04:00
846f886c26 🐛 temporary nix-darwin fix 2022-10-20 22:28:21 -04:00
7deda40119 🚚 moved home-assistant to my new yellow 2022-10-17 20:25:42 -04:00
8ba5e30ed3 ⬆️ version bump 2022-10-14 22:31:26 -04:00
12ca785599 📦️ heraclitus: add diffusionbee 2022-10-13 22:44:19 -04:00
73c6d731e1 ⬆️ version bump 2022-10-12 21:09:56 -04:00
84244a77d9 🔧 socrates: port forward for minecraft 2022-10-10 21:54:45 -04:00
d4df0f75b5 🚚 ipfs -> kubo 2022-10-07 06:19:56 -04:00
687672a62b ⬆️ bump versions again 2022-10-07 06:16:40 -04:00
cfd07e3169 ⬆️ version bump 2022-10-06 14:57:12 +01:00
b99248b210 add traefik for internal tls 2022-10-06 14:56:18 +01:00
88 changed files with 915306 additions and 1500 deletions

7
.gitignore vendored
View File

@@ -1,2 +1,7 @@
/.direnv /.direnv
/result /result
/.pre-commit-config.yaml
/node_modules/
.terraform
*.tfvars
*.tfstate*

View File

@@ -1,17 +1,19 @@
keys: keys:
- &walkah age16yv7atd8n880ja98pksqqvunu2yw00660lkh4n0sg39j5vt3dujshyu95j - &walkah age16yv7atd8n880ja98pksqqvunu2yw00660lkh4n0sg39j5vt3dujshyu95j
- &plato age12m47c7xvqttncps0e79pwamzqa4nmnxekwumtwcv5ju6q74fufaqp9d0xh - &plato age12m47c7xvqttncps0e79pwamzqa4nmnxekwumtwcv5ju6q74fufaqp9d0xh
- &agent age1vc8svd5277rjkgzg7frf04uaa45w3crhfvg628rqyrqmxul3q9nsjz6yxk - &agent age1pn2hnqvgt7rvfglxddlj3jwrm79rvmutmexkpxv4frdnznlel33qvfy6u5
- &form age1ulmzprdmcd8r0w47a0nrrlg8melkjk6evl2rc54yh6lxkcfas36q6wrsv9 - &form age1mnrl9u8vpdjncge33pg7quakl0qdf5dlfgch87jhrs0wrvup4s0s5xh7ly
- &matter age1lfjkch3pqaq3uwmjxyucpm2tws6llxqqjglj4yn49jkwkf50xvmqrl974e - &matter age1tt0gwcm03zmpelerpph49knn8f6t8z7aq9una2qys76kf4rwxpnquxkvz3
- &purpose age1jnf94uq5ap96vk7nfk3qkr38ylhletc6pskj0ypc470d7gmt0qeqskdy5z - &purpose age1px55dk5n3whfdyshzyxqmyjvqdmv9au6myx6w67jw3cqp9sdx9rsa6xep9
- &socrates age12wakcnv487c5rkgv7z6umzywrqwcy6dgguq0dug6lxp64scjsq6sspkmgz
creation_rules: creation_rules:
- path_regex: secrets/[^/]+\.yaml$ - path_regex: secrets/[^/]+\.yaml$
key_groups: key_groups:
- age: - age:
- *walkah - *walkah
- *plato - *plato
- *agent - *agent
- *form - *form
- *matter - *matter
- *purpose - *purpose
- *socrates

View File

@@ -10,4 +10,5 @@
) )
{ {
src = ./.; src = ./.;
}).defaultNix }
).defaultNix

421
flake.lock generated
View File

@@ -7,64 +7,28 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1664143588, "lastModified": 1760721282,
"narHash": "sha256-I1qaa8VMISprKulco2bxiIJUaz1NGiKmlsQuM996yzM=", "narHash": "sha256-aAHphQbU9t/b2RRy2Eb8oMv+I08isXv2KUGFAFn7nCo=",
"owner": "lnl7", "owner": "nix-darwin",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "95ba7e548d55e74c36369dbd6a4bfe99a543c835", "rev": "c3211fcd0c56c11ff110d346d4487b18f7365168",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "lnl7", "owner": "nix-darwin",
"ref": "master", "ref": "master",
"repo": "nix-darwin", "repo": "nix-darwin",
"type": "github" "type": "github"
} }
}, },
"deploy-rs": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs",
"utils": "utils"
},
"locked": {
"lastModified": 1659725433,
"narHash": "sha256-1ZxuK67TL29YLw88vQ18Y2Y6iYg8Jb7I6/HVzmNB6nM=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "41f15759dd8b638e7b4f299730d94d5aa46ab7eb",
"type": "github"
},
"original": {
"owner": "serokell",
"repo": "deploy-rs",
"type": "github"
}
},
"dotfiles": {
"flake": false,
"locked": {
"lastModified": 1663967156,
"narHash": "sha256-jWQjcsLCO4HmDSF/Ib5Lo56Z4v5E9eAXewwI6Qb0Sx0=",
"owner": "walkah",
"repo": "dotfiles",
"rev": "4d05de816af0fc3732dcd01999f77f5d9f46afcb",
"type": "github"
},
"original": {
"owner": "walkah",
"repo": "dotfiles",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1648199409, "lastModified": 1747046372,
"narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=", "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "64a525ee38886ab9028e6f61790de0832aa3ef03", "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -76,11 +40,11 @@
"flake-compat_2": { "flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1650374568, "lastModified": 1747046372,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8", "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -89,32 +53,39 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": { "gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1709087332,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "numtide", "owner": "hercules-ci",
"repo": "flake-utils", "repo": "gitignore.nix",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "owner": "hercules-ci",
"repo": "flake-utils", "repo": "gitignore.nix",
"type": "github" "type": "github"
} }
}, },
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2", "nixpkgs": [
"utils": "utils_2" "nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1664146938, "lastModified": 1760887455,
"narHash": "sha256-fIvsJ3qWiD6o3qH9iU66OsL8uG5C1FGXcuaNEctJv8M=", "narHash": "sha256-/xU8iYZjolWbMUNBQF6af5zgGs73Qw21WMgz1tLs3Yw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "9e7394523eb4f298528d457e316fc752bdf07151", "rev": "aeabc1ac63e6ebb8ba4714c4abdfe0556f2de765",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -123,29 +94,83 @@
"type": "github" "type": "github"
} }
}, },
"nixos-hardware": { "libcamera-src": {
"flake": false,
"locked": { "locked": {
"lastModified": 1663229557, "lastModified": 1725630279,
"narHash": "sha256-1uU4nsDLXKG0AHc/VCsNBAEPkTA/07juYhcEWRb1O1E=", "narHash": "sha256-KH30jmHfxXq4j2CL7kv18DYECJRp9ECuWNPnqPZajPA=",
"owner": "NixOS", "owner": "raspberrypi",
"repo": "nixos-hardware", "repo": "libcamera",
"rev": "a0df6cd6e199df4a78c833c273781ea92fa62cfb", "rev": "69a894c4adad524d3063dd027f5c4774485cf9db",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "raspberrypi",
"ref": "master", "repo": "libcamera",
"repo": "nixos-hardware", "rev": "69a894c4adad524d3063dd027f5c4774485cf9db",
"type": "github"
}
},
"libpisp-src": {
"flake": false,
"locked": {
"lastModified": 1724944683,
"narHash": "sha256-Fo2UJmQHS855YSSKKmGrsQnJzXog1cdpkIOO72yYAM4=",
"owner": "raspberrypi",
"repo": "libpisp",
"rev": "28196ed6edcfeda88d23cc5f213d51aa6fa17bb3",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "v1.0.7",
"repo": "libpisp",
"type": "github"
}
},
"nixlib": {
"locked": {
"lastModified": 1736643958,
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixos-generators": {
"inputs": {
"nixlib": "nixlib",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1751903740,
"narHash": "sha256-PeSkNMvkpEvts+9DjFiop1iT2JuBpyknmBUs0Un0a4I=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "032decf9db65efed428afd2fa39d80f7089085eb",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-generators",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1648219316, "lastModified": 1760872779,
"narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=", "narHash": "sha256-c5C907Raf9eY8f1NUXYeju9aUDlm227s/V0OptEbypA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "30d3d79b7d3607d56546dd2a6b49e156ba0ec634", "rev": "63bdb5d90fa2fa11c42f9716ad1e23565613b07c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -155,80 +180,215 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-22_05": {
"locked": {
"lastModified": 1664201777,
"narHash": "sha256-cUW9DqELUNi1jNMwVSbfq4yl5YGyOfeu+UHUUImbby0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "00f877f4927b6f7d7b75731b5a1e2ae7324eaf14",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-22.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1662996720, "lastModified": 1736061677,
"narHash": "sha256-XvLQ3SuXnDMJMpM1sv1ifPjBuRytiDYhB12H/BNTjgY=", "narHash": "sha256-DjkQPnkAfd7eB522PwnkGhOMuT9QVCZspDpJJYyOj60=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5f326e2a403e1cebaec378e72ceaf5725983376d", "rev": "cbd8ec4de4469333c82ff40d057350c30e9f7d36",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1664177230, "lastModified": 1760663237,
"narHash": "sha256-eyo88ffm16I0K9cdcePbOsQg4MDjf1EgIdkGTLB/7iA=", "narHash": "sha256-BflA6U4AM1bzuRMR8QqzPXqh8sWVCNDzOdsxXEguJIc=",
"owner": "NixOS", "owner": "cachix",
"repo": "nixpkgs", "repo": "git-hooks.nix",
"rev": "ff9793cfd1a25145a7e591af604675b3d6f68987", "rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "cachix",
"ref": "nixpkgs-unstable", "repo": "git-hooks.nix",
"repo": "nixpkgs", "type": "github"
}
},
"raspberry-pi-nix": {
"inputs": {
"libcamera-src": "libcamera-src",
"libpisp-src": "libpisp-src",
"nixpkgs": "nixpkgs_2",
"rpi-bluez-firmware-src": "rpi-bluez-firmware-src",
"rpi-firmware-nonfree-src": "rpi-firmware-nonfree-src",
"rpi-firmware-src": "rpi-firmware-src",
"rpi-linux-6_12_17-src": "rpi-linux-6_12_17-src",
"rpi-linux-6_6_78-src": "rpi-linux-6_6_78-src",
"rpi-linux-stable-src": "rpi-linux-stable-src",
"rpicam-apps-src": "rpicam-apps-src"
},
"locked": {
"lastModified": 1742223591,
"narHash": "sha256-ZNTz8r5jlJ1jvpqf5+aUYgpnYJSVX0iP14doOc1Hm0E=",
"owner": "nix-community",
"repo": "raspberry-pi-nix",
"rev": "3e8100d5e976a6a2be363015cb33463af9ef441a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "raspberry-pi-nix",
"type": "github" "type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"darwin": "darwin", "darwin": "darwin",
"deploy-rs": "deploy-rs", "flake-compat": "flake-compat",
"dotfiles": "dotfiles",
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixos-hardware": "nixos-hardware", "nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs",
"sops-nix": "sops-nix" "pre-commit-hooks": "pre-commit-hooks",
"raspberry-pi-nix": "raspberry-pi-nix",
"sops-nix": "sops-nix",
"systems": "systems"
}
},
"rpi-bluez-firmware-src": {
"flake": false,
"locked": {
"lastModified": 1708969706,
"narHash": "sha256-KakKnOBeWxh0exu44beZ7cbr5ni4RA9vkWYb9sGMb8Q=",
"owner": "RPi-Distro",
"repo": "bluez-firmware",
"rev": "78d6a07730e2d20c035899521ab67726dc028e1c",
"type": "github"
},
"original": {
"owner": "RPi-Distro",
"ref": "bookworm",
"repo": "bluez-firmware",
"type": "github"
}
},
"rpi-firmware-nonfree-src": {
"flake": false,
"locked": {
"lastModified": 1723266537,
"narHash": "sha256-T7eTKXqY9cxEMdab8Snda4CEOrEihy5uOhA6Fy+Mhnw=",
"owner": "RPi-Distro",
"repo": "firmware-nonfree",
"rev": "4b356e134e8333d073bd3802d767a825adec3807",
"type": "github"
},
"original": {
"owner": "RPi-Distro",
"ref": "bookworm",
"repo": "firmware-nonfree",
"type": "github"
}
},
"rpi-firmware-src": {
"flake": false,
"locked": {
"lastModified": 1728405098,
"narHash": "sha256-4gnK0KbqFnjBmWia9Jt2gveVWftmHrprpwBqYVqE/k0=",
"owner": "raspberrypi",
"repo": "firmware",
"rev": "7bbb5f80d20a2335066a8781459c9f33e5eebc64",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "1.20241008",
"repo": "firmware",
"type": "github"
}
},
"rpi-linux-6_12_17-src": {
"flake": false,
"locked": {
"lastModified": 1740765145,
"narHash": "sha256-hoCsGc4+RC/2LmxDtswLBL5ZhWlw4vSiL4Vkl39r2MU=",
"owner": "raspberrypi",
"repo": "linux",
"rev": "5985ce32e511f4e8279a841a1b06a8c7d972b386",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "rpi-6.12.y",
"repo": "linux",
"type": "github"
}
},
"rpi-linux-6_6_78-src": {
"flake": false,
"locked": {
"lastModified": 1740503700,
"narHash": "sha256-Y8+ot4Yi3UKwlZK3ap15rZZ16VZDvmeFkD46+6Ku7bE=",
"owner": "raspberrypi",
"repo": "linux",
"rev": "2e071057fded90e789c0101498e45a1778be93fe",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "rpi-6.6.y",
"repo": "linux",
"type": "github"
}
},
"rpi-linux-stable-src": {
"flake": false,
"locked": {
"lastModified": 1728403745,
"narHash": "sha256-phCxkuO+jUGZkfzSrBq6yErQeO2Td+inIGHxctXbD5U=",
"owner": "raspberrypi",
"repo": "linux",
"rev": "5aeecea9f4a45248bcf564dec924965e066a7bfd",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "stable_20241008",
"repo": "linux",
"type": "github"
}
},
"rpicam-apps-src": {
"flake": false,
"locked": {
"lastModified": 1727515047,
"narHash": "sha256-qCYGrcibOeGztxf+sd44lD6VAOGoUNwRqZDdAmcTa/U=",
"owner": "raspberrypi",
"repo": "rpicam-apps",
"rev": "a8ccf9f3cd9df49875dfb834a2b490d41d226031",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "v1.5.2",
"repo": "rpicam-apps",
"type": "github"
} }
}, },
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"nixpkgs-22_05": "nixpkgs-22_05"
}, },
"locked": { "locked": {
"lastModified": 1664204020, "lastModified": 1760845571,
"narHash": "sha256-LAey3hr8b9EAt3n304Wt9Vm4uQFd8pSRtLX8leuYFDs=", "narHash": "sha256-PwGzU3EOU65Ef1VvuNnVLie+l+P0g/fzf/PGUG82KbM=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "912f9ff41fd9353dec1f783170793699789fe9aa", "rev": "9c9a9798be331ed3f4b2902933d7677d0659ee61",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -237,33 +397,18 @@
"type": "github" "type": "github"
} }
}, },
"utils": { "systems": {
"locked": { "locked": {
"lastModified": 1648297722, "lastModified": 1681028828,
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "numtide", "owner": "nix-systems",
"repo": "flake-utils", "repo": "default",
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade", "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "owner": "nix-systems",
"repo": "flake-utils", "repo": "default",
"type": "github"
}
},
"utils_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github" "type": "github"
} }
} }

189
flake.nix
View File

@@ -3,13 +3,16 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; systems.url = "github:nix-systems/default";
home-manager.url = "github:nix-community/home-manager"; raspberry-pi-nix.url = "github:nix-community/raspberry-pi-nix";
flake-utils.url = "github:numtide/flake-utils";
deploy-rs.url = "github:serokell/deploy-rs";
darwin = { darwin = {
url = "github:lnl7/nix-darwin/master"; url = "github:nix-darwin/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -18,147 +21,65 @@
flake = false; flake = false;
}; };
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = { sops-nix = {
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# My stuff
dotfiles = {
url = "github:walkah/dotfiles";
flake = false;
};
}; };
outputs = outputs =
{ self {
, nixpkgs self,
, nixos-hardware nixpkgs,
, deploy-rs pre-commit-hooks,
, darwin systems,
, flake-utils ...
, home-manager
, sops-nix
, dotfiles
, ...
}@inputs: }@inputs:
let let
mkSystem = hostName: system: modules: forAllSystems =
nixpkgs.lib.nixosSystem { fn: nixpkgs.lib.genAttrs (import systems) (system: fn system nixpkgs.legacyPackages.${system});
system = system;
modules = [
home-manager.nixosModules.home-manager
({ config, ... }: {
networking.hostName = hostName;
})
] ++ modules;
specialArgs = inputs;
};
mkDarwin = hostName: system: modules:
darwin.lib.darwinSystem {
system = system;
modules = [
home-manager.darwinModules.home-manager
({ config, ... }: {
networking.hostName = hostName;
})
] ++ modules;
specialArgs = inputs;
};
in in
flake-utils.lib.eachDefaultSystem {
(system: checks = forAllSystems (
let system: pkgs:
pkgs = nixpkgs.legacyPackages.${system}; import ./nix/checks.nix {
darwin-local = pkgs.writeScriptBin "darwin-local" '' inherit
#!${pkgs.stdenv.shell} self
nix build .#darwinConfigurations.$(hostname -s).system pkgs
./result/sw/bin/darwin-rebuild switch --flake . pre-commit-hooks
''; system
in ;
{ }
devShells.default = pkgs.mkShell { );
name = "athens"; devShells = forAllSystems (system: pkgs: import ./nix/shells.nix { inherit self pkgs system; });
buildInputs = [ darwin-local deploy-rs.packages.${system}.deploy-rs pkgs.nixpkgs-fmt pkgs.rnix-lsp pkgs.sops ]; formatter = forAllSystems (_: pkgs: pkgs.nixfmt-tree);
}; }
}) // { // {
nixosConfigurations = { hosts = import ./nix/hosts.nix;
# Aristotle overlays.default = nixpkgs.lib.composeManyExtensions [ ];
agent = mkSystem "agent" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
form = mkSystem "form" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
matter = mkSystem "matter" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
purpose = mkSystem "purpose" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
plato = mkSystem "plato" "x86_64-linux" [ ./hosts/plato/configuration.nix ]; darwinConfigurations = import ./nix/darwin.nix inputs;
socrates = mkSystem "socrates" "x86_64-linux" [ ./hosts/socrates/configuration.nix ]; nixosConfigurations = import ./nix/nixos.nix inputs;
};
darwinConfigurations = {
epicurus = mkDarwin "epicurus" "aarch64-darwin" [ ./hosts/epicurus/darwin-configuration.nix ];
heraclitus = mkDarwin "heraclitus" "aarch64-darwin" [ ./hosts/heraclitus/darwin-configuration.nix ];
};
deploy.nodes = { nixConfig = {
agent = { extra-substituters = [
hostname = "agent"; "https://walkah.cachix.org"
sshUser = "root"; "https://nix-community.cachix.org"
profiles.system = { ];
user = "root"; extra-trusted-public-keys = [
path = deploy-rs.lib.aarch64-linux.activate.nixos "walkah.cachix.org-1:D8cO78JoJC6UPV1ZMgd1V5znpk3jNUERGIeAKN15hxo="
self.nixosConfigurations.agent; "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
}; ];
};
form = {
hostname = "form";
sshUser = "root";
profiles.system = {
user = "root";
path = deploy-rs.lib.aarch64-linux.activate.nixos
self.nixosConfigurations.form;
};
};
matter = {
hostname = "matter";
sshUser = "root";
profiles.system = {
user = "root";
path = deploy-rs.lib.aarch64-linux.activate.nixos
self.nixosConfigurations.matter;
};
};
purpose = {
hostname = "purpose";
sshUser = "root";
profiles.system = {
user = "root";
path = deploy-rs.lib.aarch64-linux.activate.nixos
self.nixosConfigurations.purpose;
};
};
plato = {
hostname = "plato";
profiles = {
system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.plato;
};
};
};
socrates = {
hostname = "socrates";
profiles = {
system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.socrates;
};
};
};
}; };
}; };
} }

View File

@@ -1,68 +0,0 @@
{ config, pkgs, nixos-hardware, ... }:
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
nixos-hardware.nixosModules.raspberry-pi-4
../../modules/ipfs/cluster.nix
../../modules/sops
];
nixpkgs.overlays = [ (import ../../overlays) ];
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
boot.loader.grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
boot.loader.generic-extlinux-compatible.enable = false;
boot.kernelPackages = pkgs.linuxPackages_rpi4;
boot.loader.raspberryPi = {
enable = true;
version = 4;
};
# networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.eth0.useDHCP = true;
networking.interfaces.wlan0.useDHCP = true;
networking.firewall.enable = false;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net"
];
environment.systemPackages = with pkgs; [ libraspberrypi ];
services = {
prometheus = {
enable = true;
port = 9090;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
openFirewall = true;
port = 9100;
};
};
};
tailscale = { enable = true; };
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.05"; # Did you read the comment?
}

View File

@@ -1,50 +0,0 @@
{ config, lib, pkgs, dotfiles, ... }:
{
imports = [
./homebrew.nix
../../modules/base/darwin.nix
../../modules/builder
];
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [ emacs-nox vim ghc go gopls niv rustup stack ];
# Use a custom configuration.nix location.
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
users.users.walkah = {
home = "/Users/walkah";
shell = pkgs.zsh;
};
home-manager.users.walkah = import "${dotfiles}/home.nix";
nixpkgs.config.packageOverrides = pkgs: {
haskellPackages = pkgs.haskellPackages.override {
overrides = self: super: {
niv = pkgs.haskell.lib.overrideCabal super.niv (drv: {
enableSeparateBinOutput = false;
});
};
};
};
services.lorri.enable = true;
programs = {
zsh = {
enable = true;
promptInit = "";
};
};
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
}

View File

@@ -1,50 +0,0 @@
{ config, lib, pkgs, dotfiles, ... }:
{
imports = [
./homebrew.nix
../../modules/base/darwin.nix
../../modules/dev
../../modules/builder
];
nixpkgs.config.allowBroken = true;
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [ emacs ];
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
users.users.walkah = {
home = "/Users/walkah";
shell = pkgs.zsh;
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.walkah = import "${dotfiles}/home.nix";
services.lorri.enable = true;
programs = {
zsh = {
enable = true;
promptInit = "";
};
};
system = {
defaults = {
dock = {
autohide = true;
orientation = "left";
};
};
};
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
}

View File

@@ -1,68 +0,0 @@
{ config, lib, pkgs, ... }:
{
homebrew = {
taps = [
"homebrew/cask"
"homebrew/cask-drivers"
"homebrew/cask-fonts"
"homebrew/cask-versions"
"homebrew/services"
];
brews = [ "coreutils" ];
casks = [
"1password"
"bartender"
"brave-browser"
"bunch"
"discord"
"docker"
"element"
"fantastical"
"figma"
"firefox"
"firefox-developer-edition"
"font-jetbrains-mono"
"font-jetbrains-mono-nerd-font"
"gather"
"google-chrome"
"gpg-suite"
"hazel"
"ipfs"
"iterm2"
"keybase"
"logi-options-plus"
"logseq"
"minecraft"
"obsidian"
"plexamp"
"raycast"
"slack"
"sonos"
"soundsource"
"spotify"
"stats"
"steam"
"syncthing"
"synology-drive"
"todoist"
"visual-studio-code"
"whalebird"
"zoom"
];
masApps = {
OnePasswordSafari = 1569813296;
Bumpr = 1166066070;
DayOne = 1055511498;
Drafts = 1435957248;
HomeAssistant = 1099568401;
Reeder = 1529448980;
Tailscale = 1475387142;
UlyssesMac = 1225570693;
Xcode = 497799835;
};
};
}

View File

@@ -1,183 +0,0 @@
{ config, pkgs, home-manager, ... }: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../../users
../../modules/coredns
../../modules/code-server
../../modules/drone
../../modules/drone/runner-docker.nix
../../modules/gitea
../../modules/home-assistant
../../modules/matrix
../../modules/minecraft
../../modules/pleroma
../../modules/postgresql
../../modules/sops
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 3;
boot.loader.efi.canTouchEfiVariables = true;
boot.cleanTmpDir = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ (import ../../overlays) ];
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
# Set your time zone.
time.timeZone = "America/Toronto";
networking.hostName = "plato"; # Define your hostname.
networking.useDHCP = false;
networking.interfaces.enp10s0.useDHCP = true;
networking.interfaces.enp9s0.useDHCP = true;
security.sudo.wheelNeedsPassword = false;
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC5spf4diguK+w7iYLFr565++6DjHukWfvpN2ru9dCRk nixbuild"
];
system.autoUpgrade.enable = false;
environment.systemPackages = with pkgs; [ pinentry weechat ];
fileSystems."/mnt/downloads" = {
device = "192.168.6.100:/volume1/Downloads";
fsType = "nfs";
};
fileSystems."/mnt/music" = {
device = "192.168.6.100:/volume1/Music";
fsType = "nfs";
};
fileSystems."/mnt/video" = {
device = "192.168.6.100:/volume1/Video";
fsType = "nfs";
};
power.ups = {
enable = true;
mode = "standalone";
ups."cyberpower" = {
description = "Cyberpower EC650LCD";
driver = "usbhid-ups";
port = "auto";
};
};
programs.mosh.enable = true;
programs.zsh = {
enable = true;
promptInit = "";
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "curses";
};
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.tailscale.enable = true;
services.keybase.enable = true;
virtualisation.docker = {
enable = true;
# Clean docker images periodically
autoPrune = {
enable = true;
flags = [ "--all" ];
};
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
walkah.coredns = { enable = true; };
services = {
borgbackup.jobs."borgbase" = {
paths = [
"/var/lib"
"/var/backup"
];
exclude = [
# very large paths
"/var/lib/docker"
"/var/lib/postgresql"
"/var/lib/systemd"
];
repo = "qxflzs92@qxflzs92.repo.borgbase.com:repo";
encryption = {
mode = "repokey-blake2";
passCommand = "cat /root/borgbackup/passphrase";
};
environment.BORG_RSH = "ssh -i /root/borgbackup/ssh_key";
compression = "auto,lzma";
startAt = "daily";
};
grafana = {
enable = true;
domain = "plato.walkah.lab";
port = 2342;
addr = "0.0.0.0";
};
prometheus = {
enable = true;
port = 9090;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
port = 9100;
};
};
scrapeConfigs = [
{
job_name = "node";
static_configs = [{
targets = [
"plato:9100"
"agent:9100"
"form:9100"
"matter:9100"
"purpose:9100"
"socrates:9100"
];
}];
}
{
job_name = "coredns";
static_configs = [{ targets = [ "plato:9153" ]; }];
}
{
job_name = "ipfs";
metrics_path = "/debug/metrics/prometheus";
static_configs = [{
targets = [ "agent:5001" "form:5001" "matter:5001" "purpose:5001" ];
}];
}
];
};
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.09"; # Did you read the comment?
}

View File

@@ -1,37 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [
"uhci_hcd"
"ehci_pci"
"ahci"
"xhci_pci"
"firewire_ohci"
"usb_storage"
"usbhid"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" "wl" ];
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/ea3c68ac-e822-4b71-a8f5-65d9e452a3c2";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/FB06-AB48";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/3a812874-3def-4e46-b20d-cd55fa7bdd5f"; }];
}

View File

@@ -1,81 +0,0 @@
{ pkgs, ... }: {
imports = [
./hardware-configuration.nix
./networking.nix # generated at runtime by nixos-infect
../../users
../../modules/coredns
../../modules/code-server/nginx.nix
../../modules/drone/nginx.nix
../../modules/gitea/nginx.nix
../../modules/home-assistant/nginx.nix
../../modules/ipfs/gateway.nix
../../modules/matrix/nginx.nix
../../modules/pleroma/nginx.nix
];
nixpkgs.overlays = [ (import ../../overlays) ];
boot.cleanTmpDir = true;
# Set your time zone.
time.timeZone = "America/Toronto";
networking.hostName = "socrates";
networking.firewall.allowPing = true;
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.trustedInterfaces = [ "tailscale0" ];
networking.firewall.checkReversePath = "loose";
nix = {
settings.trusted-users = [ "@wheel" "root" ];
};
security.sudo.wheelNeedsPassword = false;
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net"
];
system.autoUpgrade.enable = false;
environment.systemPackages = with pkgs; [ ipfs-migrator ];
programs.mosh.enable = true;
programs.zsh.enable = true;
security.acme.acceptTerms = true;
security.acme.defaults.email = "walkah@walkah.net";
walkah.coredns = {
enable = true;
addr = "100.103.57.96";
};
services = {
nginx = {
enable = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
};
openssh = { enable = true; };
prometheus = {
enable = true;
port = 9090;
listenAddress = "100.103.57.96";
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
openFirewall = true;
port = 9100;
listenAddress = "100.103.57.96";
};
};
};
tailscale = { enable = true; };
};
system.stateVersion = "22.05";
}

View File

@@ -1,29 +0,0 @@
{ pkgs, config, ... }: {
nix = {
configureBuildUsers = true;
extraOptions = ''
extra-platforms = x86_64-darwin aarch64-darwin
experimental-features = nix-command flakes
'';
settings = {
trusted-users = [ "root" "@admin" ];
};
};
homebrew = {
enable = true;
brewPrefix = "/opt/homebrew/bin";
global = {
brewfile = true;
lockfiles = false;
};
onActivation = {
autoUpdate = true;
cleanup = "zap";
upgrade = true;
};
};
}

View File

@@ -1,11 +0,0 @@
{ config, lib, pkgs, ... }:
{
nix.distributedBuilds = true;
nix.buildMachines = [{
hostName = "plato";
systems = [ "x86_64-linux" "aarch64-linux" ];
maxJobs = 12;
speedFactor = 2;
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
}];
}

View File

@@ -1,24 +0,0 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
emacs
# Elixir
elixir
elixir_ls
# Golang
go
gopls
# Node/JS
deno
nodejs
yarn
# Rust
rustup
rust-analyzer
];
}

View File

@@ -1,44 +0,0 @@
{ config, lib, pkgs, ... }:
let cfg = config.services.gitea;
in
{
users.users.git = {
description = "Gitea Service";
home = cfg.stateDir;
useDefaultShell = true;
group = "git";
isSystemUser = true;
};
users.groups.git = { };
services = {
gitea = {
enable = true;
user = "git";
domain = "walkah.dev";
appName = "walkah forge";
rootUrl = "https://walkah.dev/";
httpAddress = "0.0.0.0";
httpPort = 8003;
lfs.enable = true;
settings = {
log.LEVEL = "Error";
other.SHOW_FOOTER_VERSION = false;
repository.DEFAULT_BRANCH = "main";
server.SSH_DOMAIN = "git.walkah.dev";
service.DISABLE_REGISTRATION = true;
session.COOKIE_SECURE = true;
};
dump.enable = false;
database = {
type = "postgres";
user = "git";
};
};
postgresqlBackup.databases = [ "gitea" ];
};
}

View File

@@ -1,15 +0,0 @@
{ config, lib, pkgs, ... }:
{
# Use the docker container because it's officially supported.
virtualisation.oci-containers = {
containers = {
home-assistant = {
image = "ghcr.io/home-assistant/home-assistant:2022.9.7";
volumes =
[ "/var/lib/hass:/config" "/etc/localtime:/etc/localtime:ro" ];
extraOptions = [ "--privileged" "--network=host" ];
};
};
};
}

View File

@@ -1,14 +0,0 @@
{ config, lib, pkgs, ... }:
{
services = {
postgresql = {
ensureDatabases = [ "hass" ];
ensureUsers = [{
name = "hass";
ensurePermissions = { "DATABASE hass" = "ALL PRIVILEGES"; };
}];
};
postgresqlBackup.databases = [ "hass" ];
};
}

View File

@@ -1,28 +0,0 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [ ipfs-migrator ];
services = {
ipfs = {
enable = true;
apiAddress = "/ip4/0.0.0.0/tcp/5001";
gatewayAddress = "/ip4/0.0.0.0/tcp/8080";
swarmAddress = [
"/ip4/0.0.0.0/tcp/4001"
"/ip6/::/tcp/4001"
"/ip4/0.0.0.0/udp/4001/quic"
"/ip6/::/udp/4001/quic"
];
extraConfig = {
Addresses = {
Announce = [ ];
NoAnnounce = [ ];
};
API = { HTTPHeaders = { Access-Control-Allow-Origin = [ "*" ]; }; };
Discovery = { MDNS = { Enabled = true; }; };
Routing = { Type = "dht"; };
};
};
};
}

View File

@@ -1,55 +0,0 @@
{ config, lib, pkgs, ... }:
let
peers = [
{
ID = "12D3KooWMQSgdfa4tUrDhkFx4zP3ZpgT1ryj9KH5RGUae62Vsc7y";
Addrs = [ "/ip4/100.95.167.126/tcp/4001" ];
}
{
ID = "12D3KooWMqSiDukubKNKrK7J4PaF3mfNnZFVAd3Lh7qj3Y3e5bcN";
Addrs = [ "/ip4/100.87.220.71/tcp/4001" ];
}
{
ID = "12D3KooWGmNRyqP969QbyP8NLVRZNK2i6yCcP6N6N2r2DCG4H34v";
Addrs = [ "/ip4/100.126.255.109/tcp/4001" ];
}
{
ID = "12D3KooWFkR8nsG5pzffoAfMzmwBcSakXxnogVa6inRxUbpfN5ua";
Addrs = [ "/ip4/100.74.59.80/tcp/4001" ];
}
];
in
{
imports = [ ./default.nix ];
environment.systemPackages = with pkgs; [ ipfs-migrator ];
networking.firewall = {
allowedTCPPorts = [ 4001 ];
allowedUDPPorts = [ 4001 ];
};
services = {
ipfs = {
enable = true;
extraConfig = {
Peering = { Peers = peers; };
Swarm = { AddrFilters = null; };
};
};
nginx = {
virtualHosts."walkah.cloud" = {
forceSSL = true;
enableACME = true;
locations."/" = { proxyPass = "http://127.0.0.1:8080"; };
serverAliases = [
"walkah.net"
"www.walkah.net"
];
};
};
};
}

View File

@@ -1,39 +0,0 @@
{ config, lib, pkgs, ... }:
{
services.nginx = {
enable = true;
virtualHosts = {
"matrix.walkah.chat" = {
forceSSL = true;
enableACME = true;
locations."/" = { proxyPass = "http://100.111.208.75:8008"; };
};
"walkah.chat" = {
forceSSL = true;
enableACME = true;
locations."= /.well-known/matrix/server".extraConfig =
let server = { "m.server" = "matrix.walkah.chat:443"; };
in
''
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON server}';
'';
locations."= /.well-known/matrix/client".extraConfig =
let
client = {
"m.homeserver" = { "base_url" = "https://matrix.walkah.chat"; };
};
in
''
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON client}';
'';
locations."/" = { root = pkgs.element-web; };
};
};
};
}

View File

@@ -1,61 +0,0 @@
import Config
config :pleroma, Pleroma.Web.Endpoint,
url: [host: "walkah.social", scheme: "https", port: 443],
http: [ip: {0, 0, 0, 0}, port: 4000]
config :pleroma, :instance,
name: "walkah.social",
email: "walkah@walkah.net",
notify_email: "walkah@walkah.net",
limit: 5000,
registrations_open: false
config :pleroma, :media_proxy,
enabled: false,
redirect_on_failure: true
config :pleroma, Pleroma.Repo,
adapter: Ecto.Adapters.Postgres,
username: "pleroma",
database: "pleroma",
hostname: "localhost"
# Configure web push notifications
config :web_push_encryption, :vapid_details, subject: "mailto:walkah@walkah.net"
config :pleroma, :database, rum_enabled: false
config :pleroma, :instance, static_dir: "/var/lib/pleroma/static"
config :pleroma, Pleroma.Uploaders.Local, uploads: "/var/lib/pleroma/uploads"
config :pleroma, configurable_from_database: false
config :pleroma, :frontend_configurations,
pleroma_fe: %{
alwaysShowSubjectInput: true,
background: "",
collapseMessageWithSubject: false,
disableChat: false,
greentext: false,
hideFilteredStatuses: false,
hideMutedPosts: false,
hidePostStats: false,
hideSitename: false,
hideUserStats: false,
loginMethod: "password",
logo: "/static/logo.svg",
logoMargin: ".1em",
logoMask: true,
minimalScopesMode: false,
noAttachmentLinks: false,
nsfwCensorImage: "",
postContentType: "text/plain",
redirectRootLogin: "/main/friends",
redirectRootNoLogin: "/walkah",
scopeCopy: true,
sidebarRight: true,
showFeaturesPanel: false,
showInstanceSpecificPanel: false,
subjectLineBehavior: "email",
theme: "pleroma-dark",
webPushNotifications: false
}

View File

@@ -1,21 +0,0 @@
{ config, lib, pkgs, ... }:
{
services = {
pleroma = {
enable = true;
secretConfigFile = "/var/lib/pleroma/secrets.exs";
configs = [
(builtins.readFile ./config.exs)
];
};
postgresql = {
ensureDatabases = [ "pleroma" ];
ensureUsers = [{
name = "pleroma";
ensurePermissions = { "DATABASE pleroma" = "ALL PRIVILEGES"; };
}];
};
postgresqlBackup.databases = [ "pleroma" ];
};
}

View File

@@ -1,39 +0,0 @@
{ pkgs, config, ... }: {
services = {
postgresql = {
enable = true;
package = pkgs.postgresql_12;
};
postgresqlBackup = {
enable = true;
};
};
# Postgres upgrades: https://nixos.org/manual/nixos/stable/index.html#module-services-postgres-upgrading
environment.systemPackages = [
(pkgs.writeScriptBin "upgrade-pg-cluster" ''
set -eux
# XXX it's perhaps advisable to stop all services that depend on postgresql
systemctl stop postgresql
# XXX replace `<new version>` with the psqlSchema here
export NEWDATA="/var/lib/postgresql/12"
# XXX specify the postgresql package you'd like to upgrade to
export NEWBIN="${pkgs.postgresql_12}/bin"
export OLDDATA="${config.services.postgresql.dataDir}"
export OLDBIN="${config.services.postgresql.package}/bin"
install -d -m 0700 -o postgres -g postgres "$NEWDATA"
cd "$NEWDATA"
sudo -u postgres $NEWBIN/initdb -D "$NEWDATA"
sudo -u postgres $NEWBIN/pg_upgrade \
--old-datadir "$OLDDATA" --new-datadir "$NEWDATA" \
--old-bindir $OLDBIN --new-bindir $NEWBIN \
"$@"
'')
];
}

15
nix/checks.nix Normal file
View File

@@ -0,0 +1,15 @@
{
system,
pre-commit-hooks,
...
}:
{
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
deadnix.enable = true;
nixfmt-rfc-style.enable = true;
statix.enable = true;
};
};
}

29
nix/darwin.nix Normal file
View File

@@ -0,0 +1,29 @@
{
self,
darwin,
home-manager,
...
}:
let
mkDarwin =
hostName: modules:
let
hostSystem = self.hosts.${hostName}.system;
in
darwin.lib.darwinSystem {
system = hostSystem;
modules = [
home-manager.darwinModules.home-manager
(_: {
networking.hostName = hostName;
nixpkgs.overlays = [ self.overlays.default ];
})
]
++ modules;
specialArgs = { inherit home-manager; };
};
in
{
epicurus = mkDarwin "epicurus" [ ./hosts/epicurus/darwin-configuration.nix ];
heraclitus = mkDarwin "heraclitus" [ ./hosts/heraclitus/darwin-configuration.nix ];
}

49
nix/hosts.nix Normal file
View File

@@ -0,0 +1,49 @@
{
socrates = {
type = "nixos";
address = "100.103.57.96";
system = "x86_64-linux";
sshUser = "walkah";
};
plato = {
type = "nixos";
address = "100.111.208.75";
system = "x86_64-linux";
sshUser = "walkah";
};
agent = {
type = "nixos";
address = "100.103.219.26";
system = "aarch64-linux";
sshUser = "root";
};
form = {
type = "nixos";
address = "100.104.247.27";
system = "aarch64-linux";
sshUser = "root";
};
matter = {
type = "nixos";
address = "100.95.77.67";
system = "aarch64-linux";
sshUser = "root";
};
purpose = {
type = "nixos";
address = "100.117.49.15";
system = "aarch64-linux";
sshUser = "root";
};
epicurus = {
type = "darwin";
address = "100.75.26.104";
system = "aarch64-darwin";
sshUser = "walkah";
};
heraclitus = {
type = "darwin";
address = "100.72.149.31";
system = "aarch64-darwin";
};
}

View File

@@ -0,0 +1,75 @@
{ pkgs, raspberry-pi-nix, ... }:
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../../modules/base/nixos.nix
raspberry-pi-nix.nixosModules.raspberry-pi
../../modules/ipfs/cluster.nix
../../modules/k3s/agent.nix
../../modules/sops
];
# See: https://github.com/NixOS/nixos-hardware/issues/858
boot.initrd.systemd.tpm2.enable = false;
boot.kernelParams = [
"cgroup_enable=memory"
"cgroup_enable=cpuset"
"cgroup_memory=1"
];
raspberry-pi-nix.board = "bcm2711";
hardware.raspberry-pi.config = {
all = {
dt-overlays = {
rpi-poe = {
enable = true;
params = {
poe_fan_temp0 = {
enable = true;
value = 50000;
};
poe_fan_temp1 = {
enable = true;
value = 60000;
};
poe_fan_temp2 = {
enable = true;
value = 70000;
};
poe_fan_temp3 = {
enable = true;
value = 80000;
};
};
};
};
};
};
time.timeZone = "America/Toronto";
networking = {
# networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
useDHCP = false;
interfaces.eth0.useDHCP = true;
interfaces.wlan0.useDHCP = true;
firewall.enable = false;
};
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net"
];
environment.systemPackages = with pkgs; [
libraspberrypi
raspberrypi-eeprom
];
security.sudo.wheelNeedsPassword = false;
}

View File

@@ -1,19 +1,15 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: { lib, modulesPath, ... }:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-label/NIXOS_SD"; device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4"; fsType = "ext4";
options = [ "noatime" ];
}; };
swapDevices = [ ]; swapDevices = [ ];

View File

@@ -0,0 +1,10 @@
{ ... }:
{
imports = [
./homebrew.nix
../../modules/base/darwin.nix
../../modules/builder
../../modules/dev
];
}

View File

@@ -1,35 +1,33 @@
{ config, lib, pkgs, ... }: _:
{ {
homebrew = { homebrew = {
taps = [ taps = [
"homebrew/cask" "homebrew/cask"
"homebrew/cask-drivers"
"homebrew/cask-fonts"
"homebrew/services" "homebrew/services"
]; ];
brews = [ "code-server" "coreutils" "mosh" ]; brews = [
"btop"
"code-server"
"coreutils"
"mas"
"mosh"
];
casks = [ casks = [
"1password" "1password"
"alfred" "docker-desktop"
"docker"
"font-jetbrains-mono" "font-jetbrains-mono"
"font-jetbrains-mono-nerd-font" "font-jetbrains-mono-nerd-font"
"gpg-suite" "gpg-suite"
"ipfs"
"keybase"
"plex-media-server" "plex-media-server"
"stats" "stats"
"syncthing"
"synology-drive" "synology-drive"
"tailscale-app"
]; ];
masApps = { masApps = {
Bumpr = 1166066070;
Magnet = 441258766;
Tailscale = 1475387142;
Xcode = 497799835; Xcode = 497799835;
}; };
}; };

View File

@@ -0,0 +1,19 @@
{ ... }:
{
imports = [
./homebrew.nix
../../modules/base/darwin.nix
../../modules/dev
../../modules/builder
];
system = {
defaults = {
dock = {
autohide = true;
orientation = "left";
};
};
};
}

View File

@@ -0,0 +1,106 @@
_:
{
homebrew = {
taps = [
"homebrew/cask"
"homebrew/services"
"walkah/tap"
"1password/tap"
"d12frosted/emacs-plus"
"dracula/install"
"heroku/brew"
];
brews = [
"asdf"
"argocd"
"cmake"
"cocoapods"
"coreutils"
{
name = "emacs-plus";
args = [ "--with-c9rgreen-sonoma-icon" ];
}
"fontconfig"
"gcc"
"gh"
"helm"
"heroku"
"ipfs"
"kind"
"kubernetes-cli"
"kustomize"
"libtool"
"mas"
"mr"
"ollama"
"opentofu"
"podman"
"r"
"ripgrep"
"tea"
"terminal-notifier"
"watchman"
];
casks = [
"1password"
"1password-cli"
"actual"
"android-studio"
"arc"
"balenaetcher"
"beeper"
"brave-browser"
"bruno"
"bunch"
"calibre"
"claude"
"discord"
"docker-desktop"
"dracula-xcode"
"element"
"fantastical"
"figma"
"firefox@developer-edition"
"font-jetbrains-mono"
"font-jetbrains-mono-nerd-font"
"ghostty"
"google-chrome"
"gpg-suite"
"hazel"
"jordanbaird-ice"
"logi-options+"
"logitech-camera-settings"
"microsoft-edge"
"minecraft"
"obsidian"
"opal-composer"
"plexamp"
"raycast"
"rstudio"
"slack"
"sonos"
"spotify"
"stats"
"steam"
"synology-drive"
"tailscale-app"
"todoist-app"
"visual-studio-code"
"zen"
"zoom"
"zulu@17"
];
masApps = {
OnePasswordSafari = 1569813296;
Bumpr = 1166066070;
DayOne = 1055511498;
Drafts = 1435957248;
HomeAssistant = 1099568401;
Xcode = 497799835;
};
};
}

View File

@@ -0,0 +1,217 @@
{
pkgs,
config,
lib,
...
}:
let
automount_opts = "uid=1000,gid=1000,x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
inherit (config.sops) secrets;
in
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../../modules/base/nixos.nix
../../modules/coredns
../../modules/drone
../../modules/drone/runner-docker.nix
../../modules/gitea
../../modules/k3s/server.nix
../../modules/matrix
../../modules/minecraft
../../modules/postgresql
../../modules/sops
];
boot = {
binfmt.emulatedSystems = [ "aarch64-linux" ];
loader = {
efi.canTouchEfiVariables = true;
systemd-boot = {
# Use the systemd-boot EFI boot loader.
enable = true;
configurationLimit = 3;
};
};
tmp.cleanOnBoot = true;
};
# Set your time zone.
time.timeZone = "America/Toronto";
networking = {
hostName = "plato"; # Define your hostname.
useDHCP = false;
interfaces = {
enp10s0.useDHCP = true;
enp9s0.useDHCP = true;
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
firewall.enable = false;
};
security.sudo.wheelNeedsPassword = false;
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC5spf4diguK+w7iYLFr565++6DjHukWfvpN2ru9dCRk nixbuild"
];
environment.systemPackages = with pkgs; [
cifs-utils
pinentry
weechat
];
fileSystems = {
"/mnt/downloads" = {
device = "//parthenon/Downloads";
fsType = "cifs";
options = [
"${automount_opts},credentials=${secrets.filesystems-parthenon.path}"
];
};
"/mnt/music" = {
device = "//parthenon/Music";
fsType = "cifs";
options = [
"${automount_opts},credentials=${secrets.filesystems-parthenon.path}"
];
};
"/mnt/video" = {
device = "//parthenon/Video";
fsType = "cifs";
options = [
"${automount_opts},credentials=${secrets.filesystems-parthenon.path}"
];
};
};
nixpkgs.config.allowInsecurePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"broadcom-sta" # aka “wl”
];
power.ups = {
enable = true;
mode = "netserver";
ups."cyberpower" = {
description = "Cyberpower EC650LCD";
driver = "usbhid-ups";
port = "auto";
};
upsd = {
enable = true;
listen = [
{ address = "0.0.0.0"; }
];
};
users.upsmon = {
passwordFile = secrets.upsmon.path;
upsmon = "primary";
};
upsmon.monitor."cyberpower".user = "upsmon";
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
sops.secrets = {
filesystems-parthenon = { };
upsmon = { };
};
services = {
borgbackup.jobs."borgbase" = {
paths = [
"/var/backup"
];
repo = "ssh://h7ug55o3@h7ug55o3.repo.borgbase.com/./repo";
encryption = {
mode = "repokey-blake2";
passCommand = "cat /root/borgbackup/passphrase";
};
environment.BORG_RSH = "ssh -i /root/borgbackup/ssh_key";
compression = "auto,lzma";
startAt = "daily";
};
grafana = {
enable = true;
settings = {
server = {
domain = "plato.walkah.lab";
http_port = 2342;
http_addr = "0.0.0.0";
};
};
};
prometheus = {
scrapeConfigs = [
{
job_name = "node";
static_configs = [
{
targets = [
"plato:9100"
"agent:9100"
"form:9100"
"matter:9100"
"purpose:9100"
"socrates:9100"
];
}
];
}
{
job_name = "coredns";
static_configs = [ { targets = [ "plato:9153" ]; } ];
}
{
job_name = "ipfs";
metrics_path = "/debug/metrics/prometheus";
static_configs = [
{
targets = [
"agent:5001"
"form:5001"
"matter:5001"
"purpose:5001"
];
}
];
}
];
};
tailscale = {
useRoutingFeatures = "server";
};
};
walkah.coredns = {
enable = true;
};
virtualisation.docker = {
enable = true;
# Clean docker images periodically
autoPrune = {
enable = true;
flags = [ "--all" ];
};
daemon.settings = {
dns = [
"1.1.1.1"
"1.0.0.1"
];
};
};
}

View File

@@ -0,0 +1,40 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd.availableKernelModules = [
"uhci_hcd"
"ehci_pci"
"ahci"
"xhci_pci"
"firewire_ohci"
"usb_storage"
"usbhid"
"sd_mod"
"sr_mod"
];
initrd.kernelModules = [ ];
kernelModules = [
"kvm-intel"
"wl"
];
extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/ea3c68ac-e822-4b71-a8f5-65d9e452a3c2";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/FB06-AB48";
fsType = "vfat";
};
swapDevices = [ { device = "/dev/disk/by-uuid/3a812874-3def-4e46-b20d-cd55fa7bdd5f"; } ];
}

View File

@@ -0,0 +1,72 @@
{ pkgs, ... }:
{
imports = [
./hardware-configuration.nix
./networking.nix # generated at runtime by nixos-infect
../../modules/base/nixos.nix
../../modules/akkoma
../../modules/akkoma/nginx.nix
../../modules/coredns
../../modules/code-server/nginx.nix
../../modules/drone/nginx.nix
../../modules/gitea/nginx.nix
../../modules/home-assistant/nginx.nix
../../modules/ipfs/gateway.nix
../../modules/matrix/nginx.nix
../../modules/minecraft/proxy.nix
../../modules/sops
];
boot.tmp.cleanOnBoot = true;
# Set your time zone.
time.timeZone = "America/Toronto";
networking = {
hostName = "socrates";
firewall = {
allowPing = true;
allowedTCPPorts = [
80
443
];
trustedInterfaces = [ "tailscale0" ];
checkReversePath = "loose";
};
};
nix = {
settings.trusted-users = [
"@wheel"
"root"
];
};
security = {
sudo.wheelNeedsPassword = false;
acme.acceptTerms = true;
acme.defaults.email = "walkah@walkah.net";
};
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net"
];
environment.systemPackages = with pkgs; [ ipfs-migrator ];
walkah.coredns = {
enable = true;
addr = "100.103.57.96";
};
services = {
nginx = {
enable = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
};
};
}

View File

@@ -2,5 +2,8 @@
{ {
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.loader.grub.device = "/dev/vda"; boot.loader.grub.device = "/dev/vda";
fileSystems."/" = { device = "/dev/vda1"; fsType = "ext4"; }; fileSystems."/" = {
device = "/dev/vda1";
fsType = "ext4";
};
} }

View File

@@ -1,4 +1,5 @@
{ lib, ... }: { { lib, ... }:
{
# This file was populated at runtime with the networking # This file was populated at runtime with the networking
# details gathered from the active system. # details gathered from the active system.
networking = { networking = {
@@ -28,14 +29,18 @@
prefixLength = 64; prefixLength = 64;
} }
]; ];
ipv4.routes = [{ ipv4.routes = [
address = "167.99.176.1"; {
prefixLength = 32; address = "167.99.176.1";
}]; prefixLength = 32;
ipv6.routes = [{ }
address = "2604:a880:cad:d0::1"; ];
prefixLength = 32; ipv6.routes = [
}]; {
address = "2604:a880:cad:d0::1";
prefixLength = 32;
}
];
}; };
}; };

View File

@@ -0,0 +1,111 @@
{ config, pkgs, ... }:
let
inherit (config.services) akkoma;
inherit (config.sops) secrets;
inherit ((pkgs.formats.elixirConf { }).lib) mkRaw;
in
{
services = {
akkoma = {
enable = true;
config = {
":pleroma" = {
":instance" = {
name = "walkah.social";
email = "walkah@walkah.net";
notify_email = "walkah@walkah.net";
description = "James Walker's personal Akkoma instance";
registrations_open = false;
invites_enabled = true;
federating = true;
federation_incoming_replies_max_depth = null;
allow_relay = true;
safe_dm_mentions = true;
external_user_synchronization = true;
cleanup_attachments = true;
};
":media_proxy" = {
enabled = false;
redirect_on_failure = true;
};
"Pleroma.Repo" = {
adapter = mkRaw "Ecto.Adapters.Postgres";
socket_dir = "/run/postgresql";
username = config.services.akkoma.user;
database = "akkoma";
prepare = mkRaw ":named";
parameters.plan_cache_mode = "force_custom_plan";
};
"Pleroma.Web.Endpoint" = {
secret_key_base = {
_secret = secrets.akkoma-secret-key-base.path;
};
signing_salt = {
_secret = secrets.akkoma-signing-salt.path;
};
live_view.signing_salt = {
_secret = secrets.akkoma-signing-salt.path;
};
url = {
host = "walkah.social";
scheme = "https";
port = 443;
};
http = {
ip = "127.0.0.1";
port = 4000;
};
};
};
":web_push_encryption" = {
":vapid_details" = {
private_key = {
_secret = secrets.akkoma-vapid-private-key.path;
};
public_key = {
_secret = secrets.akkoma-vapid-public-key.path;
};
};
};
":joken" = {
":default_signer" = {
_secret = secrets.akkoma-joken-signer.path;
};
};
};
nginx = null; # doing this manually
};
postgresql = {
enable = true;
};
postgresqlBackup = {
enable = true;
databases = [ "akkoma" ];
};
};
sops = {
secrets = {
akkoma-secret-key-base = {
owner = akkoma.user;
};
akkoma-signing-salt = {
owner = akkoma.user;
};
akkoma-vapid-private-key = {
owner = akkoma.user;
};
akkoma-vapid-public-key = {
owner = akkoma.user;
};
akkoma-joken-signer = {
owner = akkoma.user;
};
};
};
}

View File

@@ -1,6 +1,4 @@
{ config, lib, pkgs, ... }: _: {
{
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts = { virtualHosts = {
@@ -8,7 +6,7 @@
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
proxyPass = "http://100.111.208.75:4000"; proxyPass = "http://127.0.0.1:4000";
proxyWebsockets = true; proxyWebsockets = true;
}; };
}; };

View File

@@ -0,0 +1,29 @@
_:
{
nix = {
extraOptions = ''
experimental-features = nix-command flakes
'';
gc = {
automatic = true;
};
settings = {
substituters = [
"https://walkah.cachix.org"
"https://nix-community.cachix.org"
"https://cache.garnix.io"
];
trusted-public-keys = [
"walkah.cachix.org-1:D8cO78JoJC6UPV1ZMgd1V5znpk3jNUERGIeAKN15hxo="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
};
};
programs.zsh.enable = true;
}

View File

@@ -0,0 +1,56 @@
{ ... }:
{
imports = [
./common.nix
../../users
];
nix = {
enable = true;
extraOptions = ''
extra-platforms = x86_64-darwin aarch64-darwin
'';
gc = {
interval = {
Hour = 3;
Minute = 16;
Weekday = 6;
};
options = "--delete-older-than 30d";
};
settings = {
trusted-users = [
"root"
"@admin"
];
};
};
environment.etc = {
"sudoers.d/walkah".text = ''
walkah ALL = (ALL) NOPASSWD: ALL
'';
};
homebrew = {
enable = true;
brewPrefix = "/opt/homebrew/bin";
global = {
brewfile = true;
lockfiles = false;
};
onActivation = {
autoUpdate = true;
cleanup = "zap";
upgrade = true;
};
};
system = {
primaryUser = "walkah";
stateVersion = 4;
};
}

View File

@@ -0,0 +1,63 @@
{ config, pkgs, ... }:
{
imports = [
./common.nix
../monitoring
../../users
];
documentation = {
enable = false;
};
environment.systemPackages = with pkgs; [
btop
htop
inetutils
vim
];
nix = {
gc = {
persistent = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
settings = {
auto-optimise-store = true;
trusted-users = [
"root"
"walkah"
];
};
};
programs = {
mosh.enable = true;
};
services = {
openssh.enable = true;
tailscale = {
enable = true;
extraSetFlags = [ "--webclient" ];
};
};
system = {
autoUpgrade = {
enable = true;
flake = "github:walkah/athens#${config.networking.hostName}";
dates = "hourly";
flags = [
"--option"
"tarball-ttl"
"0"
];
};
stateVersion = "23.05";
};
}

View File

@@ -0,0 +1,23 @@
_: {
nix = {
distributedBuilds = true;
buildMachines = [
{
hostName = "plato";
systems = [
"x86_64-linux"
"aarch64-linux"
];
maxJobs = 6;
supportedFeatures = [
"benchmark"
"big-parallel"
"kvm"
];
}
];
extraOptions = ''
builders-use-substitutes = true
'';
};
}

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ code-server ]; environment.systemPackages = with pkgs; [ code-server ];

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: _:
{ {
services.nginx = { services.nginx = {
@@ -8,7 +8,7 @@
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
proxyPass = "http://100.66.26.116:8080"; proxyPass = "http://100.75.26.104:8080";
proxyWebsockets = true; proxyWebsockets = true;
}; };
}; };

View File

@@ -1,7 +1,8 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
with lib; with lib;
let cfg = config.walkah.coredns; let
cfg = config.walkah.coredns;
in in
{ {
options.walkah.coredns = { options.walkah.coredns = {

View File

@@ -1,6 +1,6 @@
$ORIGIN walkah.lab. $ORIGIN walkah.lab.
@ 3600 IN SOA plato.walkah.lab. walkah.walkah.net. ( @ 3600 IN SOA plato.walkah.lab. walkah.walkah.net. (
2021070700 ; serial 2023091000 ; serial
7200 ; refresh (2 hours) 7200 ; refresh (2 hours)
3600 ; retry (1 hour) 3600 ; retry (1 hour)
1209600 ; expire (2 weeks) 1209600 ; expire (2 weeks)
@@ -10,10 +10,10 @@ $ORIGIN walkah.lab.
socrates IN A 100.103.57.96 socrates IN A 100.103.57.96
plato IN A 100.111.208.75 plato IN A 100.111.208.75
; aristotle ; aristotle
agent IN A 100.95.167.126 agent IN A 100.103.219.26
form IN A 100.87.220.71 form IN A 100.104.247.27
matter IN A 100.126.255.109 matter IN A 100.95.77.67
purpose IN A 100.74.59.80 purpose IN A 100.117.49.15
parthenon IN A 100.106.65.39 parthenon IN A 100.106.65.39
epicurus IN A 100.66.26.116 epicurus IN A 100.75.26.104

View File

@@ -0,0 +1,11 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# Nix
cachix
nixd
nixf
nixfmt-rfc-style
];
}

View File

@@ -1,4 +1,5 @@
{ pkgs, config, ... }: { { pkgs, config, ... }:
{
sops.secrets.drone = { sops.secrets.drone = {
owner = "drone"; owner = "drone";
}; };
@@ -9,9 +10,7 @@
ensureUsers = [ ensureUsers = [
{ {
name = "drone"; name = "drone";
ensurePermissions = { ensureDBOwnership = true;
"DATABASE drone" = "ALL PRIVILEGES";
};
} }
]; ];
}; };

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: _:
{ {
services.nginx = { services.nginx = {

View File

@@ -1,4 +1,5 @@
{ pkgs, config, lib, ... }: { { pkgs, config, ... }:
{
systemd.services.drone-runner-docker = { systemd.services.drone-runner-docker = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {

View File

@@ -1,7 +1,4 @@
{ pkgs, config, lib, ... }: { pkgs, config, ... }:
let
droneserver = config.users.users.droneserver.name;
in
{ {
nix.settings.allowed-users = [ "drone-runner-exec" ]; nix.settings.allowed-users = [ "drone-runner-exec" ];
systemd.services.drone-runner-exec = { systemd.services.drone-runner-exec = {
@@ -39,14 +36,14 @@ in
"/etc/passwd:/etc/passwd" "/etc/passwd:/etc/passwd"
"/etc/group:/etc/group" "/etc/group:/etc/group"
"/nix/var/nix/profiles/system/etc/nix:/etc/nix" "/nix/var/nix/profiles/system/etc/nix:/etc/nix"
"${config.environment.etc."ssl/certs/ca-certificates.crt".source}:/etc/ssl/certs/ca-certificates.crt"
"${config.environment.etc."ssh/ssh_known_hosts".source}:/etc/ssh/ssh_known_hosts"
"${ "${
builtins.toFile "ssh_config" '' config.environment.etc."ssl/certs/ca-certificates.crt".source
Host eve.thalheim.io }:/etc/ssl/certs/ca-certificates.crt"
ForwardAgent yes "${config.environment.etc."ssh/ssh_known_hosts".source}:/etc/ssh/ssh_known_hosts"
'' "${builtins.toFile "ssh_config" ''
}:/etc/ssh/ssh_config" Host eve.thalheim.io
ForwardAgent yes
''}:/etc/ssh/ssh_config"
"/etc/machine-id" "/etc/machine-id"
# channels are dynamic paths in the nix store, therefore we need to bind mount the whole thing # channels are dynamic paths in the nix store, therefore we need to bind mount the whole thing
"/nix/" "/nix/"

View File

@@ -0,0 +1,68 @@
{ config, ... }:
let
cfg = config.services.gitea;
in
{
users.users.git = {
description = "Gitea Service";
home = cfg.stateDir;
useDefaultShell = true;
group = "git";
isSystemUser = true;
};
users.groups.git = { };
services = {
gitea = {
enable = true;
user = "git";
appName = "walkah forge";
lfs.enable = true;
settings = {
log = {
LEVEL = "Error";
};
other = {
SHOW_FOOTER_VERSION = false;
};
repository = {
DEFAULT_BRANCH = "main";
};
server = {
DOMAIN = "walkah.dev";
HTTP_ADDR = "0.0.0.0";
HTTP_PORT = 8003;
ROOT_URL = "https://walkah.dev/";
SSH_DOMAIN = "git.walkah.dev";
};
service = {
DISABLE_REGISTRATION = true;
};
session = {
COOKIE_SECURE = true;
};
};
dump.enable = false;
database = {
createDatabase = false;
type = "postgres";
name = "gitea";
socket = "/run/postgresql";
user = "git";
};
};
postgresql = {
ensureDatabases = [ "gitea" ];
ensureUsers = [
{
name = "git";
}
];
};
postgresqlBackup.databases = [ "gitea" ];
};
}

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: _:
{ {
services.nginx = { services.nginx = {
@@ -10,6 +10,9 @@
locations."/" = { locations."/" = {
proxyPass = "http://100.111.208.75:8003"; proxyPass = "http://100.111.208.75:8003";
proxyWebsockets = true; proxyWebsockets = true;
extraConfig = ''
client_max_body_size 0;
'';
}; };
}; };
}; };

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: _:
{ {
services.nginx = { services.nginx = {
@@ -8,7 +8,7 @@
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
proxyPass = "http://100.111.208.75:8123"; proxyPass = "http://100.72.37.46:8123";
proxyWebsockets = true; proxyWebsockets = true;
}; };
}; };

913231
nix/modules/ipfs/badbits.deny Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,19 @@
{ config, lib, pkgs, ... }: { config, ... }:
{ {
imports = [ imports = [
./default.nix ./default.nix
../../services/ipfs-cluster.nix
]; ];
services = { services = {
ipfs = { kubo = {
enable = true; enable = true;
extraConfig = { settings = {
Discovery = {
MDNS = {
Enabled = true;
};
};
Swarm = { Swarm = {
AddrFilters = null; AddrFilters = null;
ConnMgr = { ConnMgr = {

View File

@@ -0,0 +1,31 @@
_:
{
services = {
kubo = {
enable = true;
settings = {
Addresses = {
Announce = [ ];
API = "/ip4/0.0.0.0/tcp/5001";
Gateway = "/ip4/0.0.0.0/tcp/8080";
NoAnnounce = [ ];
Swarm = [
"/ip4/0.0.0.0/tcp/4001"
"/ip6/::/tcp/4001"
"/ip4/0.0.0.0/udp/4001/quic"
"/ip6/::/udp/4001/quic"
];
};
API = {
HTTPHeaders = {
Access-Control-Allow-Origin = [ "*" ];
};
};
Routing = {
Type = "dht";
};
};
};
};
}

View File

@@ -0,0 +1,79 @@
{ pkgs, ... }:
let
peers = [
{
ID = "12D3KooWEVoGdqsakyi3bgE8ivvRzcgTjiirFNS2FbUMw6HSjZF9";
Addrs = [ "/ip4/100.103.219.26/tcp/4001" ];
}
{
ID = "12D3KooWC5ncgKeJV2G6QBdGMkT2gLbeviaDxpYR7V6NVTsma3C5";
Addrs = [ "/ip4/100.104.247.27/tcp/4001" ];
}
{
ID = "12D3KooW9xeqfnnNWafiDkLXWjC5YdUnBrG5tJDd3tnm86kqVwhA";
Addrs = [ "/ip4/100.95.77.67/tcp/4001" ];
}
{
ID = "12D3KooWLYPckqA4JACJ4vioWc4tYuPjmfLMbgviECnWqazjSgK9";
Addrs = [ "/ip4/100.117.49.15/tcp/4001" ];
}
];
in
{
imports = [ ./default.nix ];
environment.systemPackages = with pkgs; [ ipfs-migrator ];
environment.etc = {
"ipfs/denylists/badbits.deny".source = ./badbits.deny;
};
networking.firewall = {
allowedTCPPorts = [ 4001 ];
allowedUDPPorts = [ 4001 ];
};
services = {
kubo = {
enable = true;
settings = {
Discovery = {
MDNS = {
Enabled = false;
};
};
Peering = {
Peers = peers;
};
Swarm = {
AddrFilters = null;
};
};
};
nginx = {
# IPFS Gateway
virtualHosts."walkah.cloud" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8080";
};
};
# Hosted Sites
virtualHosts."walkah.net" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8080";
};
serverAliases = [
"www.walkah.net"
];
};
};
};
}

12
nix/modules/k3s/agent.nix Normal file
View File

@@ -0,0 +1,12 @@
_:
let
hosts = import ../../hosts.nix;
in
{
imports = [ ./common.nix ];
services.k3s = {
role = "agent";
serverAddr = "https://${hosts.plato.address}:6443";
};
}

View File

@@ -0,0 +1,18 @@
{ config, ... }:
let
hostname = config.networking.hostName;
hosts = import ../../hosts.nix;
in
{
services.k3s = {
enable = true;
tokenFile = config.sops.secrets.k3s-token.path;
extraFlags = [
"--node-external-ip=${hosts.${hostname}.address}"
];
};
sops.secrets.k3s-token = {
owner = "root";
mode = "0400";
};
}

View File

@@ -0,0 +1,7 @@
{
imports = [ ./common.nix ];
services.k3s = {
role = "server";
clusterInit = true;
};
}

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, pkgs, ... }:
{ {
services = { services = {
@@ -13,7 +13,10 @@
LC_CTYPE = "C"; LC_CTYPE = "C";
''; '';
}; };
postgresqlBackup.databases = [ "matrix" ]; postgresqlBackup.databases = [
"matrix"
"matrix-syncv3"
];
matrix-synapse = { matrix-synapse = {
enable = true; enable = true;
@@ -24,21 +27,30 @@
enable_registration = false; enable_registration = false;
database = { database = {
name = "psycopg2"; name = "psycopg2";
args = { database = "matrix"; }; args = {
database = "matrix";
};
}; };
listeners = [{ listeners = [
bind_addresses = [ {
"0.0.0.0" bind_addresses = [
]; "0.0.0.0"
port = 8008; ];
type = "http"; port = 8008;
tls = false; type = "http";
x_forwarded = true; tls = false;
resources = [{ x_forwarded = true;
compress = false; resources = [
names = [ "client" "federation" ]; {
}]; compress = false;
}]; names = [
"client"
"federation"
];
}
];
}
];
}; };
extraConfigFiles = [ extraConfigFiles = [
config.sops.secrets.matrix-registration-secret.path config.sops.secrets.matrix-registration-secret.path

View File

@@ -0,0 +1,64 @@
_:
{
services.nginx = {
enable = true;
virtualHosts = {
"matrix.walkah.chat" = {
forceSSL = true;
enableACME = true;
locations."/_matrix" = {
proxyPass = "http://100.111.208.75:8008";
};
locations."/_synapse/client" = {
proxyPass = "http://100.111.208.75:8008";
};
};
"syncv3.walkah.chat" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://100.111.208.75:8088";
};
};
"walkah.chat" = {
forceSSL = true;
enableACME = true;
locations = {
"= /.well-known/matrix/server".extraConfig =
let
server = {
"m.server" = "matrix.walkah.chat:443";
};
in
''
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON server}';
'';
"= /.well-known/matrix/client".extraConfig =
let
client = {
"m.homeserver" = {
"base_url" = "https://matrix.walkah.chat";
};
"org.matrix.msc3575.proxy" = {
"url" = "https://syncv3.walkah.chat";
};
};
in
''
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON client}';
'';
# "/" = {
# root = pkgs.element-web;
# };
};
};
};
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }: { _: {
services.minecraft-server = { services.minecraft-server = {
enable = true; enable = true;
@@ -8,6 +8,7 @@
# see here for more info: https://minecraft.gamepedia.com/Server.properties#server.properties # see here for more info: https://minecraft.gamepedia.com/Server.properties#server.properties
serverProperties = { serverProperties = {
server-port = 25565; server-port = 25565;
enable-query = true;
gamemode = "survival"; gamemode = "survival";
motd = "Vanilla Survival"; motd = "Vanilla Survival";
max-players = 20; max-players = 20;
@@ -18,6 +19,9 @@
whitelist = { whitelist = {
walkahj = "7209094c-b3ef-4c89-b8cd-0aef7c1d57a6"; walkahj = "7209094c-b3ef-4c89-b8cd-0aef7c1d57a6";
puffpuffpassion = "72e0d040-fa54-47e8-a6e7-162fdaa0cac5"; puffpuffpassion = "72e0d040-fa54-47e8-a6e7-162fdaa0cac5";
rafadoodle = "9a7c860e-e269-4c38-b2f7-ca5533c27e98";
camylamb = "c9fcbfa1-89da-4cf9-97fe-b9e5290a4eb4";
shortychark = "3f420f61-867f-4651-a849-d2e54f8c220d";
}; };
}; };
} }

View File

@@ -0,0 +1,32 @@
_:
let
dest_ip = "100.111.208.75";
dest_port = 25565;
in
{
networking = {
firewall = {
enable = true;
allowedTCPPorts = [ dest_port ];
};
nat = {
enable = true;
internalInterfaces = [ "tailscale0" ];
externalInterface = "eth0";
forwardPorts = [
{
sourcePort = dest_port;
proto = "tcp";
destination = "${dest_ip}:${toString dest_port}";
}
];
};
};
services = {
tailscale = {
useRoutingFeatures = "server";
extraUpFlags = [ "--stateful-filtering=false" ];
};
};
}

View File

@@ -0,0 +1,17 @@
_:
{
services = {
prometheus = {
enable = true;
port = 9090;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
port = 9100;
};
};
};
};
}

View File

@@ -0,0 +1,45 @@
{ pkgs, config, ... }:
{
services = {
postgresql = {
enable = true;
package = pkgs.postgresql_14;
};
postgresqlBackup = {
enable = true;
};
};
# Postgres upgrades: https://nixos.org/manual/nixos/stable/index.html#module-services-postgres-upgrading
environment.systemPackages = [
(
let
# XXX specify the postgresql package you'd like to upgrade to.
# Do not forget to list the extensions you need.
newPostgres = pkgs.postgresql_15;
in
pkgs.writeScriptBin "upgrade-pg-cluster" ''
set -eux
# XXX it's perhaps advisable to stop all services that depend on postgresql
systemctl stop postgresql
export NEWDATA="/var/lib/postgresql/${newPostgres.psqlSchema}"
export NEWBIN="${newPostgres}/bin"
export OLDDATA="${config.services.postgresql.dataDir}"
export OLDBIN="${config.services.postgresql.package}/bin"
install -d -m 0700 -o postgres -g postgres "$NEWDATA"
cd "$NEWDATA"
sudo -u postgres $NEWBIN/initdb -D "$NEWDATA"
sudo -u postgres $NEWBIN/pg_upgrade \
--old-datadir "$OLDDATA" --new-datadir "$NEWDATA" \
--old-bindir $OLDBIN --new-bindir $NEWBIN \
"$@"
''
)
];
}

38
nix/nixos.nix Normal file
View File

@@ -0,0 +1,38 @@
{
self,
nixpkgs,
home-manager,
raspberry-pi-nix,
sops-nix,
...
}:
let
mkSystem =
hostName: modules:
let
hostSystem = self.hosts.${hostName}.system;
in
nixpkgs.lib.nixosSystem {
modules = [
home-manager.nixosModules.home-manager
(_: {
networking.hostName = hostName;
nixpkgs.overlays = [ self.overlays.default ];
nixpkgs.config.allowUnfree = true;
})
{ nixpkgs.hostPlatform = hostSystem; }
]
++ modules;
specialArgs = { inherit raspberry-pi-nix sops-nix; };
};
in
{
# Aristotle
agent = mkSystem "agent" [ ./hosts/aristotle/configuration.nix ];
form = mkSystem "form" [ ./hosts/aristotle/configuration.nix ];
matter = mkSystem "matter" [ ./hosts/aristotle/configuration.nix ];
purpose = mkSystem "purpose" [ ./hosts/aristotle/configuration.nix ];
plato = mkSystem "plato" [ ./hosts/plato/configuration.nix ];
socrates = mkSystem "socrates" [ ./hosts/socrates/configuration.nix ];
}

1
nix/overlays/default.nix Normal file
View File

@@ -0,0 +1 @@
_self: _super: { }

85
nix/secrets/secrets.yaml Normal file
View File

@@ -0,0 +1,85 @@
matrix-registration-secret: ENC[AES256_GCM,data:Sn3pGBq4U3Tgw0pYaetnBLRiNdFGnMxAxyfrxhF9kFDMFijKSy9XBj71M5XxV4shYQyPvu2WDnPR1YvyoQVlv8cEoXhX7++JlYsp/2ZfKIzp4iMxh24z57Cw8vg=,iv:/zxlIeI9gWWCHbejYgz8pjjOrukKome0/bmcXuG3/yE=,tag:3fc3c96H3pO1FUO7p3T4gw==,type:str]
ipfs-cluster-secret: ENC[AES256_GCM,data:fmZ1USrJlR8fbulr1Kn8LDkMl/c6OkIN5M5q4X0MLO77K8zPwTXm0+M8ZHfq36rnuxBV0gsTiYBn47DSQLaDkONOPuEu99EGuIYZ9qZQVaZ/RC12ej6bpHaaX3m3j48szOXwJdoyDWlP32ZFanMznO8+EwAz5ccNV03ck/Rh/qpq9pWt/QjNhqtAkwFkooGB0aWRdHlillsB/SGQJk/moweIQk3qz2Ya4cN21Cxfssd08TDacjNCUekIgZ/xuXV7j8dCV/qiAOJEfaHn,iv:bAEDTTeQvg+sE67nEuSZhxqJBZVXFRNIPOZGkPYy9dY=,tag:82eBLePaqu7tYu0MtefMOQ==,type:str]
drone: ENC[AES256_GCM,data:UKh2qyZq5eTiEpdbGve+fCQZzSx/j+wUv9eHT/ToU9b51rwA7XJQC4g3rvljBL9X7DFVVdsWOdG6y1eRGImdelJ5hwxa8oK5CBpaGLGjd9+Hm8SS+Q+PAFDW6fdsPtDDgK5jjykcIlJ7u9mjCffFsCGw3UWfHxnniCnIba9e499XU+VR6l96U3oGOsrr0XO/d2zwrOm3mvXQL1P3cE+se4/UDKrdABGfKWyGqZ9xgi6Q7PTSmRv4AtpwpgF1URBvPVqs6yoexWetksLv+Xk5H50EeucbMOA+oUSJ06fUMECFRF9thRrdUbtK,iv:CiZz6NSksNMGmZxWS7uE69O6UnvTkRWbeBwC1bUqR9o=,tag:qcLmseQgkjMVv2uNXPFHzw==,type:str]
akkoma-secret-key-base: ENC[AES256_GCM,data:OQBGkyjhDeNz40bBMMqLU7S6s4r6CtatOxJ5RNdba5m5NQO+JJ5/sEuOjJrJ29oRGjHFYwmUcAB9vptWdGZdcA==,iv:oYh9fh12cNYJOgC8DAxyYxw8dp1Fmd1CijNpgmn/AV8=,tag:E9W/5TWPjIgjE3o/QAky0A==,type:str]
akkoma-signing-salt: ENC[AES256_GCM,data:KtOdcHM8XLY=,iv:RXvLlSyPzK6HYFxwyKEnDw1llmfNC5ambqvGiAkVxnA=,tag:LLna293WAYoBlr0j3U6zkg==,type:str]
akkoma-vapid-private-key: ENC[AES256_GCM,data:D8Dh53yOgKrcsttJ36xyV1locXBV2BB2EG/rOfIctCbOItdsodtpMCAwRg==,iv:xzheaTo0b3szYGvZmc3ucPi9lYXJStznAUyWNQ9TATE=,tag:tHV5DUFuvq2F9yRFmHrQXQ==,type:str]
akkoma-vapid-public-key: ENC[AES256_GCM,data:HnUAyTq7dwa+A9L1X3YyxkiJ71BoZis5TdEPHJZkFRoiU5ZYu21xJW4R1H8xsCUDTaFTKLzdSNImVStIg1A+ex6UXLvsJwqM55P8ZnUm87V5KIsCimEm,iv:vVNoYubajEgqZIg6j9k6HjY/j4ib8A7MHGWPrJnkpCw=,tag:GBr2z4EGbn5vmFMWtY013w==,type:str]
akkoma-joken-signer: ENC[AES256_GCM,data:6GbXC7teDXxr0z7eBLm9EvJv59Bvd1FqRuBGntAH9YzM79MVUMsx4JnCZ+bPR9hLiIVgITeAc5djk2tiJewh6w==,iv:q7A8f7kocb1Go7acFkVSxdmhObPxpGlfbPgfrOXHEjg=,tag:lS4UNS1ivVZdmm8AMS/1MQ==,type:str]
filesystems-parthenon: ENC[AES256_GCM,data:dYO+QjvWhR3oXrDfAEaUvTLx147NIDFcPUa7p3Jv558ynqmmEnVZ3+fVMUQVIw==,iv:ASmXqNA8/TZvSRo31CFAzt6StsZzZpVFvz15LN5+QmQ=,tag:Wx6kDCXqZ1iSmxpggBKVxA==,type:str]
upsmon: ENC[AES256_GCM,data:Rlqkhh7w8S9jD3mwUdkt3g==,iv:hiMkbAhea1f6r5gGTRw49ebepMtTYBVyH+bHwp/T61Q=,tag:cbaxIDuD4JNeCC5MiMGl6w==,type:str]
k3s-token: ENC[AES256_GCM,data:dyyFY/ruyCfAdQmmdD1eDPKhBWkbgElbFQgMjGALrM8OeTXRiiV18AwG1ZGtw+j3CBmladwBf0+gcfC0ojKHlA==,iv:j4IOIZegDMJik6shOhUZGyI0N8TD1yMDcOacArgM05Q=,tag:t91uRzF8RgxLF/f2M+9Wgg==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age16yv7atd8n880ja98pksqqvunu2yw00660lkh4n0sg39j5vt3dujshyu95j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBOT3gyL29ETGNYSTNBMHhx
RUVNRmdpZm9TZTdJNTJCOSt5blZ3T2JLVlhVCldaTjhaanBrWTVIOWJQQ1VJUTUw
alJuRjhOU2wxWEF1RG0vZE9LVU1JcHMKLS0tIGF0VlRDeldsSFFZNzVHaWJGTUtC
WlhMcDM3RlF5Y3FkRXczbWNHQWNrVjAKx77NlnVTab75G2QTiuEmAyI10m2ZbMjc
IyVWoRabZY96J/HYiZaURZY5Aq10Opa9vTp0xXL0FxLwF0Bclr7J+Q==
-----END AGE ENCRYPTED FILE-----
- recipient: age12m47c7xvqttncps0e79pwamzqa4nmnxekwumtwcv5ju6q74fufaqp9d0xh
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBzY3hRcjZsZDBjb1FtWElx
ODV3Q0g2Q0QveEUrMkRIZlJSbDBBdjlHZ25ZCmxvcngwN1V4RkJLL1NzWkw4bjNF
OXdXMlo1KzZIV3BtUWtXOGdzQ1l1RnMKLS0tIFJjY3JtOHNwTldrM0dqbnkvSThM
QW0zMzJtMzNSaEJldzJITDAvZExtcFUKTovVFKkl40WdXOji8xWKZ8eZcEXU64uz
4K7fqyhchzu+PB1xVMYeSahIYTh2oZGSKXi8nnTBwz2cPLJmy/8Biw==
-----END AGE ENCRYPTED FILE-----
- recipient: age1pn2hnqvgt7rvfglxddlj3jwrm79rvmutmexkpxv4frdnznlel33qvfy6u5
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKYlZtbC9sSXhzYUU2bnBZ
ZmpKUk5BcHdGbTJ3b0xhRTVxMXIxOXJYSmpNCkdWQ3hJV0t0OVcwNmYwaVh5V3VJ
ellsaGRyNnVEaTkxUFNReG4yTUprQUkKLS0tIHNqdjdmQjh3cHlwb0M2bGk0b2NG
eGV5Vk54dzNWSlFGTWc1akxHUmhiQ28KzAs/krsXZxcRQpefv5ncqbZ6D9Mr8HDl
9Ir35JL2HhZv3wtMUK9TQVINmbPiPGf9mzVoiCQ7Nq9J80wzt/A53Q==
-----END AGE ENCRYPTED FILE-----
- recipient: age1mnrl9u8vpdjncge33pg7quakl0qdf5dlfgch87jhrs0wrvup4s0s5xh7ly
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBTeDI0QXE4L0tBWDd3dmVI
TlN3RlBNYjNCUkZMWGUwVEtkZHU4UTVYdWw4CnMvT09sU0EyVllSM1VSRXhsL2FF
NnVGQ0hyRTFjdjBWSjVpNXNuc3I4RTAKLS0tIEIveW00Ky9jbnozTGZqZk4zeEdp
ZnBaRUJMSy9sSTIwUzR0U1JsRFhJWnMKOyIeYJquwLWqmLVqMNRCLK1U/10ILBEu
FX+kU8c5qrpsSoMjNfy/h9QCF/5u+9CV/9wHw2HONN0CAwWlYrDgdw==
-----END AGE ENCRYPTED FILE-----
- recipient: age1tt0gwcm03zmpelerpph49knn8f6t8z7aq9una2qys76kf4rwxpnquxkvz3
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB6a2JmV1hQb0FHekpzVWVL
d1RzdEoxVmZWQ25XT2hkYmtESFIrNFc1N1Y0Cmx4dEZrRnhDZDlGRXJPVGRpa0l5
akhKR3dlTS9SblFrTndBakVIemwrRFEKLS0tICsraW83aFlvRzRKVHdQcjhLUjFB
K29DeVBqWUs0ejRUVUd2SkpVYzd1UEkK0/AHkZ7gKouHi26nsZsr4CpmDu+jbKx6
BA7VAwCI0nBP5sOgNXbsmYhgyAlaz28tybNXV+QzCnJiyTXhZM5F8w==
-----END AGE ENCRYPTED FILE-----
- recipient: age1px55dk5n3whfdyshzyxqmyjvqdmv9au6myx6w67jw3cqp9sdx9rsa6xep9
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBiS1BMUFU5T05PM2Z1Zk96
N3FYTWp3bWtwMDZ4QVdVMEVLaTFueE9Od1JJCjdtMUNRa1JGWUkxRTZueS9vSGdx
NG9TVHF5T3lYbUZxa1FWY2RldHV1ZVkKLS0tIHNqbEZlSk9zR1FpWmNMQy8rayt6
SStpZHdKZGN0NGNieldPY2JTcnJ4ZW8Kz5u/fJjkwi8vJh3CB7K0S7+b9gzOhsvW
+0lfMGT+Dtbchq8O1wsCoBfe8I5kV2QlXJxTU7o4BASFKfNzX9E4gA==
-----END AGE ENCRYPTED FILE-----
- recipient: age12wakcnv487c5rkgv7z6umzywrqwcy6dgguq0dug6lxp64scjsq6sspkmgz
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBVa2pHd2dvNHBwcW85SnNy
aSt4ZElQdGZLMW5GNnIyc2NxY1J2MEk1c0RjCmJiMEY5cklnWVVHN25ST2JSWEhT
WWcvVG9TRVlVdWFzcjhENFZCMUhXVHMKLS0tIFpWcURkWFExU200TlR1N2NIak4z
WlZuY2ExWWJ1VzBpY2kzaUZCcVJMZHcKoqKBQEe+3UnAhqbc7Nq8zgEVoFFjryaY
c8ALKqMIaMjAeA8ZU4ZTIu13pMYcJ+gAlPATt0vmsTn0Q0XIiudpJQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-03-10T18:41:36Z"
mac: ENC[AES256_GCM,data:nAUaEMxYGZc+hzeFo2sjQNBPuVw9GKjDAL9R9uJl9ySWNOLtSjl150qkAYjfqfIpsiyRtnSBfP1UxvKHjbAv5Fu9Bmkv+1rv6T8d9nK541DrT1IJ/F/sdw+Vqf/xJss1pvZLP/KhLT5wfvyPrk3VeKWx5f7BI/VzCsU1MNukZdY=,iv:ooxqCvIogeyXiHC10BJUYu9PCTZr/bnUJHiUzg2bjw4=,tag:Wt+vmIVPmlTOxAQ6rHnxdg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.9.4

23
nix/shells.nix Normal file
View File

@@ -0,0 +1,23 @@
{
system,
pkgs,
self,
...
}:
{
default = pkgs.mkShell {
name = "athens";
buildInputs = with pkgs; [
deadnix
doctl
nixd
nixf
nixpkgs-fmt
opentofu
statix
sops
];
inherit (self.checks.${system}.pre-commit-check) shellHook;
};
}

5
nix/users/default.nix Normal file
View File

@@ -0,0 +1,5 @@
{ ... }:
{
imports = [ ./walkah ];
}

View File

@@ -0,0 +1,27 @@
{ lib, pkgs, ... }:
{
users.users.walkah = {
home = if pkgs.stdenv.isDarwin then "/Users/walkah" else "/home/walkah";
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM8YMax7PGIrcPNIHkpuNRFgn3HJK6Wepm+ycZWO6jfR walkah@walkah-ipadpro11"
];
}
// lib.optionalAttrs pkgs.stdenv.isLinux {
extraGroups = [
"wheel"
"docker"
];
group = "walkah";
isNormalUser = true;
};
users.groups.walkah = { };
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.walkah = import ./home.nix;
};
}

30
nix/users/walkah/home.nix Normal file
View File

@@ -0,0 +1,30 @@
{ lib, pkgs, ... }:
{
home = {
packages = with pkgs; [
chezmoi
bat
direnv
eza
fd
fzf
git
htop
jq
starship
tmux
];
activation.chezmoi = lib.hm.dag.entryAfter [ "installPackages" ] ''
export SSL_CERT_FILE="${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
export PATH="${pkgs.git}/bin:${pkgs.openssh}/bin:$PATH"
if [ ! -d $HOME/.local/share/chezmoi ]; then
$DRY_RUN_CMD ${pkgs.chezmoi}/bin/chezmoi init --apply walkah/dotfiles
else
$DRY_RUN_CMD ${pkgs.chezmoi}/bin/chezmoi update --apply
fi
'';
stateVersion = "24.05";
};
}

View File

@@ -1 +0,0 @@
self: super: { }

View File

@@ -1,68 +0,0 @@
matrix-registration-secret: ENC[AES256_GCM,data:Sn3pGBq4U3Tgw0pYaetnBLRiNdFGnMxAxyfrxhF9kFDMFijKSy9XBj71M5XxV4shYQyPvu2WDnPR1YvyoQVlv8cEoXhX7++JlYsp/2ZfKIzp4iMxh24z57Cw8vg=,iv:/zxlIeI9gWWCHbejYgz8pjjOrukKome0/bmcXuG3/yE=,tag:3fc3c96H3pO1FUO7p3T4gw==,type:str]
ipfs-cluster-secret: ENC[AES256_GCM,data:Z9i7ZLhlXw4m8myNUSiY5ej2/6UIwCwIe0bvbCttVLdv8cAHwzR2f22poKD6KnPBe9yaym+X3YtrHTCM4pVIbiSzMsHwYZ00vRQi35ZmYg==,iv:9PBz/olzA4X7JEL1xG8ACUaH1WDHSzApzlG5q0ZqSYk=,tag:9I4PGf91MHAKNeG4fVKIow==,type:str]
drone: ENC[AES256_GCM,data:UKh2qyZq5eTiEpdbGve+fCQZzSx/j+wUv9eHT/ToU9b51rwA7XJQC4g3rvljBL9X7DFVVdsWOdG6y1eRGImdelJ5hwxa8oK5CBpaGLGjd9+Hm8SS+Q+PAFDW6fdsPtDDgK5jjykcIlJ7u9mjCffFsCGw3UWfHxnniCnIba9e499XU+VR6l96U3oGOsrr0XO/d2zwrOm3mvXQL1P3cE+se4/UDKrdABGfKWyGqZ9xgi6Q7PTSmRv4AtpwpgF1URBvPVqs6yoexWetksLv+Xk5H50EeucbMOA+oUSJ06fUMECFRF9thRrdUbtK,iv:CiZz6NSksNMGmZxWS7uE69O6UnvTkRWbeBwC1bUqR9o=,tag:qcLmseQgkjMVv2uNXPFHzw==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age16yv7atd8n880ja98pksqqvunu2yw00660lkh4n0sg39j5vt3dujshyu95j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBXNkhRdXhFTVkxVTNVTlhK
d0xiQ3VmcURreWFzVGxVb0RPK2RNMGVob2g0CnBkZzF4U0FrWVVVbW03Umliby9P
djNUKzFWbW0xR1QyOUh3d2g5SjNsUW8KLS0tIGRhamZvOERxUmxDdDNHM1ZUbzdZ
UjJUQS9vL2ZkQ3NCd1VwLzRMQS9Xc0EKKcGxURwN3ejTk41W/q5VVrhalPO4GOdr
JvdxH7OIn+u/8KNNXgKOPV8Iss35Mu4geSh1zJXPVf+YhTZNq8C2jQ==
-----END AGE ENCRYPTED FILE-----
- recipient: age12m47c7xvqttncps0e79pwamzqa4nmnxekwumtwcv5ju6q74fufaqp9d0xh
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCTkxOWEo0Nk9iMy8zUGFP
endwS2NQQWJnVmo3RTNyYiszMndtSGNZUjFJCmZzUTZidmNWVGxVWDduUldMaXV4
SnZTMTZaU3FUNFpwbjBTQk94azhRZ2sKLS0tIDU1R1cwZDJQZW5qcXkyLzZIQitV
ZUptMXcvcXhkNUdRZDc2WmF3c2tLeXMKnicAN5U1KO/vhJxGgv/oHGPJ4mEoVogL
Gv5RTCKMwfHgdEHOUPbq/kPz0eTc9R57XsfhA7DHpgZAxo86gZNqOg==
-----END AGE ENCRYPTED FILE-----
- recipient: age1vc8svd5277rjkgzg7frf04uaa45w3crhfvg628rqyrqmxul3q9nsjz6yxk
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBNcjdmckwyVVJkQXpScTU2
WWt1MHFhTExxbCtwT1ZGWlZRZ3orRmZpYUZjCmNySmRVWkV4TEIyU09SUXNLdGFZ
VjN5RFhwelFvVW1PR04rQ3NyU0trVHcKLS0tIDVZZGt5TnZNU21PbE9PZVVtTUdI
eXhsWlkwa3l2Zk9KTkc0dzZpajFxVmcKTmhGMdS0Uq32P5I+X+8h4ve/KHvHWA/a
Juu+VjGRe7hm0pWOutDQPbL6o8l+wij2ugDsNy3LKHbWs4lM5VZEHg==
-----END AGE ENCRYPTED FILE-----
- recipient: age1ulmzprdmcd8r0w47a0nrrlg8melkjk6evl2rc54yh6lxkcfas36q6wrsv9
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA5MFRGVllUM0R2VXB0bmtj
dXV2bDFvbmpjTktZRlpKUXRPMXdwdmRxL3o4Cmg2WjRFdTgydkd5OHp2dS9TRlhG
Y29NOUVEeXptYWhzMGVJOENrTjdpdUEKLS0tIEZzOGlsWGJPMitkTVpwTC82Uzdh
NDhRVGQweXhEdFk4bHQxOWFOSmxNYVkKlb9KvHfUnM7uApzed5zvFPh7X8QMbdE/
VSlmccOG1zlbstbr4mU/Xu+52FMBsp8UEkK29y07uhZQEh/txI9Wwg==
-----END AGE ENCRYPTED FILE-----
- recipient: age1lfjkch3pqaq3uwmjxyucpm2tws6llxqqjglj4yn49jkwkf50xvmqrl974e
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBiSWRSdGUvRnFuZUtPcG9T
N3FsWldiOTBLUXQ0SHd1UTk2T3ArNkpaN3l3CnBtN1o0SGY5S1Z3WnVhcVYrRUYr
S0htZUh3RlQvYkV4Rmg2b3NPOFdCQkkKLS0tIEVUdVNxRnFZVlFKd3R4d1dCZk9N
cHo2empQdDd4TTZJckczdzU3YVJZeW8K0tFG5fMFiVqAw0HqEV3F8yV6tLV/XY2e
R8Rp2kAcPvBNdHZ52oKyGZNgblg5uia4mBjbvB8iXkX/z8Bddo/vCQ==
-----END AGE ENCRYPTED FILE-----
- recipient: age1jnf94uq5ap96vk7nfk3qkr38ylhletc6pskj0ypc470d7gmt0qeqskdy5z
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBwYk5PazQ2U2ZiYU03K28v
elhtQjllbThwOE5Ockd4S1B6Z1AvNmNjcXlrCmZyTzMyUWFmcEZGazRWTG40bmJI
TXkvOXpWVW1TYkcxckRtT3N6Y1BuZEUKLS0tIDBPRkJ0M3Y2T1NxN0RtbW1aNUhL
alB4LzZGSTJmUEt0TFBkUTdzR1pOOTQKG8T65JhLKx602YnEmG/Gqi/rY8X/9XgF
61ejhZ1DucTrM3sfUKjTFwaNVJLJgGEoPRioZW0SJkckjm5NNlutLw==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2022-06-30T20:47:05Z"
mac: ENC[AES256_GCM,data:S/DfCcsk7oURR8zHW5jkLsDExNBl8G4gPJ5CQzS1R6i38ncEP7yT0pMiwizvZEVHHLP8lxTqsnyquEWhQfcKxojOysgiuGOl/SiiuXGBA91vWzURNN1ricJ+g5SXp593+0cMnkpC8ej6Bkja/QX/DORn74BF+dKLFT3InRi0ucI=,iv:btU0YLRTSnqlOIFzlI0Xbd6IX0noOo0ORqG7+nd8qHs=,tag:JUEWkaaFt0lm5YyW73q7ug==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3

View File

@@ -1,123 +0,0 @@
## From https://github.com/NixOS/nixpkgs/pull/100871
{ config, lib, pkgs, options, ... }:
with lib;
let
cfg = config.services.ipfs-cluster;
opt = options.services.ipfs-cluster;
# secret is by envvar, not flag
initFlags = toString [
(optionalString (cfg.initPeers != [ ]) "--peers")
(lib.strings.concatStringsSep "," cfg.initPeers)
];
in
{
###### interface
options = {
services.ipfs-cluster = {
enable = mkEnableOption
"Pinset orchestration for IPFS - requires ipfs daemon to be useful";
user = mkOption {
type = types.str;
default = "ipfs";
description = "User under which the ipfs-cluster daemon runs.";
};
group = mkOption {
type = types.str;
default = "ipfs";
description = "Group under which the ipfs-cluster daemon runs.";
};
consensus = mkOption {
type = types.enum [ "raft" "crdt" ];
description = "Consensus protocol - 'raft' or 'crdt'. https://cluster.ipfs.io/documentation/guides/consensus/";
};
dataDir = mkOption {
type = types.str;
default = "/var/lib/ipfs-cluster";
description = "The data dir for ipfs-cluster.";
};
initPeers = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Peer addresses to initialize with on first run.";
};
openSwarmPort = mkOption {
type = types.bool;
description = "Open swarm port, secured by the cluster secret. This does not expose the API or proxy. https://cluster.ipfs.io/documentation/guides/security/";
};
secretFile = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
File containing the cluster secret in the format of EnvironmentFile as described by
<citerefentry><refentrytitle>systemd.exec</refentrytitle>
<manvolnum>5</manvolnum></citerefentry>. For example:
<programlisting>
CLUSTER_SECRET=<replaceable>...</replaceable>
</programlisting>
if null, a new secret will be generated on first run.
A secret in the correct format can also be generated by: openssl rand -hex 32
'';
};
};
};
###### implementation
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.ipfs-cluster ];
systemd.tmpfiles.rules =
[ "d '${cfg.dataDir}' - ${cfg.user} ${cfg.group} - -" ];
systemd.services.ipfs-cluster-init = {
path = [ "/run/wrappers" pkgs.ipfs-cluster ];
environment.IPFS_CLUSTER_PATH = cfg.dataDir;
wantedBy = [ "default.target" ];
serviceConfig = {
# "" clears exec list (man systemd.service -> execStart)
ExecStart = [
""
"${pkgs.ipfs-cluster}/bin/ipfs-cluster-service init --consensus ${cfg.consensus} ${initFlags}"
];
Type = "oneshot";
RemainAfterExit = true;
User = cfg.user;
Group = cfg.group;
} // optionalAttrs (cfg.secretFile != null) {
EnvironmentFile = cfg.secretFile;
};
unitConfig.ConditionDirectoryNotEmpty = "!${cfg.dataDir}";
};
systemd.services.ipfs-cluster = {
environment.IPFS_CLUSTER_PATH = cfg.dataDir;
wantedBy = [ "multi-user.target" ];
wants = [ "ipfs-cluster-init.service" ];
after = [ "ipfs-cluster-init.service" ];
serviceConfig = {
ExecStart =
[ "" "${pkgs.ipfs-cluster}/bin/ipfs-cluster-service daemon" ];
User = cfg.user;
Group = cfg.group;
};
};
networking.firewall.allowedTCPPorts = mkIf cfg.openSwarmPort [ 9096 ];
};
}

View File

@@ -10,4 +10,5 @@
) )
{ {
src = ./.; src = ./.;
}).shellNix }
).shellNix

49
terraform/.terraform.lock.hcl generated Normal file
View File

@@ -0,0 +1,49 @@
# This file is maintained automatically by "tofu init".
# Manual edits may be lost in future updates.
provider "registry.opentofu.org/cloudflare/cloudflare" {
version = "4.52.0"
constraints = "~> 4.0"
hashes = [
"h1:Pi5M+GeoMSN2eJ6QnIeXjBf19O+rby/74CfB2ocpv20=",
"zh:19be1a91c982b902c42aba47766860dfa5dc151eed1e95fd39ca642229381ef0",
"zh:1de451c4d1ecf7efbe67b6dace3426ba810711afdd644b0f1b870364c8ae91f8",
"zh:352b4a2120173298622e669258744554339d959ac3a95607b117a48ee4a83238",
"zh:3c6f1346d9154afbd2d558fabb4b0150fc8d559aa961254144fe1bc17fe6032f",
"zh:4c4c92d53fb535b1e0eff26f222bbd627b97d3b4c891ec9c321268676d06152f",
"zh:53276f68006c9ceb7cdb10a6ccf91a5c1eadd1407a28edb5741e84e88d7e29e8",
"zh:7925a97773948171a63d4f65bb81ee92fd6d07a447e36012977313293a5435c9",
"zh:7dfb0a4496cfe032437386d0a2cd9229a1956e9c30bd920923c141b0f0440060",
"zh:890df766e9b839623b1f0437355032a3c006226a6c200cd911e15ee1a9014e9f",
"zh:8d4aa79f0a414bb4163d771063c70cd991c8fac6c766e685bac2ee12903c5bd6",
"zh:a67540c13565616a7e7e51ee9366e88b0dc60046e1d75c72680e150bd02725bb",
"zh:a936383a4767f5393f38f622e92bf2d0c03fe04b69c284951f27345766c7b31b",
"zh:d4887d73c466ff036eecf50ad6404ba38fd82ea4855296b1846d244b0f13c380",
"zh:e9093c8bd5b6cd99c81666e315197791781b8f93afa14fc2e0f732d1bb2a44b7",
"zh:efd3b3f1ec59a37f635aa1d4efcf178734c2fcf8ddb0d56ea690bec342da8672",
]
}
provider "registry.opentofu.org/digitalocean/digitalocean" {
version = "2.49.2"
constraints = "~> 2.0"
hashes = [
"h1:JzS2Y+M1FEMa7/wbKqiCsLSfcUC/HAg9Cq+3HeJuZgo=",
"zh:0fdf521cd264fa17ade903673a96e30b017da1970950d7566d8efaeb7eeaa051",
"zh:1457402e4c5e588e1fc7dc4f360e994c06ab84b4822186e5d67cccef80d817de",
"zh:1b5f1e524cc74c8c9bfe214950972c054ddb24424b396b2c25a932938408dde5",
"zh:293f45fbed53f41b18b4212dee571617cd2968793aedb477958a0b01d640cfbc",
"zh:316dd02bc81d6aeea5fd38c0fe6819fc13696a5f239111e93f9c9730491c2df4",
"zh:32fa7a2a88a50f93025d9ece6b7d755e5c7931fc14f8336341c0939616224523",
"zh:52a977f7ecd480ca03a4a6821afa2de893966a8baa38834b1570ec2ae5b71ec9",
"zh:8c733467ff87aa98495a1c8cdb83d6c6fbaa93a329ff6611ef8ff11d86801321",
"zh:93352fe00a2ada0f188e8669c61283b708a602e10aa7d5ddda9302b24b47fe14",
"zh:9357cf59572b21c4b9d85c6cb22facf9d82cf037f8674b884b3a7be66a06f598",
"zh:a3286ecb621e052fba29c26737b093329c5bcd99d7d7c8fc470ce4695b129abd",
"zh:b66b7b8e37c3614a3e4083b118e6d0de63b90029471a94e5cbb7f44c6d36330d",
"zh:d06dd42935819ea454516edd24f980ca6c1e18ebb3c3e47f8ff4f4ef68fb06e4",
"zh:d89490c30f3e4f097d71af5075b126e5ec13983f3072275a5c0c468bf0df8a57",
"zh:de7d8114938c52920426ae94451edb26ba98583712545c480a69308506ec6a72",
"zh:f6a55d865a3f4ec3a79359bd30e4ef6e2742f1e02a1d934e44b41b092155fc45",
]
}

View File

@@ -0,0 +1,17 @@
locals {
account_id = "273a4698f673c012fd50161e46ceafdb"
}
resource "cloudflare_zone" "walkah_codes" {
account_id = local.account_id
zone = "walkah.codes"
}
resource "cloudflare_record" "walkah_codes" {
zone_id = cloudflare_zone.walkah_codes.id
name = "walkah.codes"
type = "A"
proxied = true
content = digitalocean_droplet.socrates.ipv4_address
}

View File

@@ -0,0 +1,9 @@
resource "digitalocean_droplet" "socrates" {
name = "socrates"
image = "72067660"
size = "s-8vcpu-16gb"
backups = true
ipv6 = true
monitoring = true
}

21
terraform/main.tf Normal file
View File

@@ -0,0 +1,21 @@
terraform {
required_version = ">= 1.8.0"
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 4.0"
}
digitalocean = {
source = "digitalocean/digitalocean"
version = "~> 2.0"
}
}
}
provider "cloudflare" {
api_token = var.cloudflare_token
}
provider "digitalocean" {
token = var.do_token
}

6
terraform/variables.tf Normal file
View File

@@ -0,0 +1,6 @@
variable "cloudflare_token" {
type = string
}
variable "do_token" {
type = string
}

View File

@@ -1,5 +0,0 @@
{ config, lib, pkgs, ... }:
{
imports = [ ./walkah.nix ];
}

View File

@@ -1,16 +0,0 @@
{ config, lib, pkgs, dotfiles, ... }:
{
users.users.walkah = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = [ "wheel" "docker" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM8YMax7PGIrcPNIHkpuNRFgn3HJK6Wepm+ycZWO6jfR walkah@walkah-ipadpro11"
];
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.walkah = import "${dotfiles}/home.nix";
}