From f66077d76335964b379f8847a5d9a0bceedcfa0f Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Sun, 25 Oct 2026 16:44:36 +0100 Subject: [PATCH] thegeneralist: enable crosspost worker (services.crosspost) --- flake.lock | 50 ++++++++++++++++--- flake.nix | 4 ++ hosts/thegeneralist/configuration.nix | 1 + hosts/thegeneralist/crosspost/api-token.age | 5 ++ hosts/thegeneralist/crosspost/default.nix | 14 ++++++ hosts/thegeneralist/crosspost/worker-key.age | Bin 0 -> 2700 bytes secrets.nix | 2 + 7 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 hosts/thegeneralist/crosspost/api-token.age create mode 100644 hosts/thegeneralist/crosspost/default.nix create mode 100644 hosts/thegeneralist/crosspost/worker-key.age diff --git a/flake.lock b/flake.lock index b398627..5dedc4d 100644 --- a/flake.lock +++ b/flake.lock @@ -61,6 +61,25 @@ "type": "github" } }, + "crosspost": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1792943133, + "narHash": "sha256-qnrkRQksIVfzGhWGnhBSWd91sSb6NBy9qQ6SPMW0/Co=", + "ref": "main", + "rev": "c1abfb1370857bc069037e177be9d1b8539398ed", + "revCount": 3, + "type": "git", + "url": "ssh://git@github.com/thegeneralist01/crosspost" + }, + "original": { + "ref": "main", + "type": "git", + "url": "ssh://git@github.com/thegeneralist01/crosspost" + } + }, "fenix": { "inputs": { "nixpkgs": [ @@ -364,11 +383,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1774709303, - "narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=", + "lastModified": 1792773339, + "narHash": "sha256-rZLrzrC6i+jnTAlvPZHogKDulY7WWDEv9hJeHieO7Zw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8110df5ad7abf5d4c0f6fb0f8f978390e77f9685", + "rev": "3ec636362e1816bc2f0888fa0fa2c69f1bc9e504", "type": "github" }, "original": { @@ -427,6 +446,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1774709303, + "narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8110df5ad7abf5d4c0f6fb0f8f978390e77f9685", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1755186698, "narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=", @@ -442,7 +477,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1769789167, "narHash": "sha256-kKB3bqYJU5nzYeIROI82Ef9VtTbu4uA3YydSk/Bioa8=", @@ -506,7 +541,7 @@ "readlater-bot": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1776031277, @@ -526,6 +561,7 @@ "inputs": { "aerospace-src": "aerospace-src", "agenix": "agenix", + "crosspost": "crosspost", "fenix": "fenix", "ghostty": "ghostty", "helium": "helium", @@ -535,7 +571,7 @@ "niri": "niri", "nix-darwin": "nix-darwin", "nix-homebrew": "nix-homebrew", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "noctalia": "noctalia", "noctalia-qs": "noctalia-qs", "readlater-bot": "readlater-bot", @@ -652,7 +688,7 @@ }, "treefmt-nix": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1772660329, diff --git a/flake.nix b/flake.nix index 381c498..1e039ae 100644 --- a/flake.nix +++ b/flake.nix @@ -64,6 +64,10 @@ url = "github:thegeneralist01/bookkeeper"; }; + # Private repo: git+ssh so fetching uses the evaluating user's SSH key (github: would need an access token). + # No nixpkgs follows: the worker is built from crosspost's own pinned nixpkgs. + crosspost.url = "git+ssh://git@github.com/thegeneralist01/crosspost?ref=main"; + noctalia = { url = "github:noctalia-dev/noctalia-shell"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/thegeneralist/configuration.nix b/hosts/thegeneralist/configuration.nix index 62aebe9..82113cc 100644 --- a/hosts/thegeneralist/configuration.nix +++ b/hosts/thegeneralist/configuration.nix @@ -17,6 +17,7 @@ ./cache ./archive ./forgejo + ./crosspost ]; age.secrets.readlaterBotToken = { diff --git a/hosts/thegeneralist/crosspost/api-token.age b/hosts/thegeneralist/crosspost/api-token.age new file mode 100644 index 0000000..ad6724c --- /dev/null +++ b/hosts/thegeneralist/crosspost/api-token.age @@ -0,0 +1,5 @@ +age-encryption.org/v1 +-> ssh-ed25519 pp9qdQ Dye18WG21VQ551B9FHTQ4h3LuMkHEtvhvdJlM1ITxF8 +QBg7sp1mGH/1MgXojf8YSQK0eWY+ZEllDiKsV9fvnRk +--- odTSmOaF35PJqMI9X2UbfXQr2E4r/wizVmEeKUwXDZg +$f£Û&qA]$æ"×Òá±Ûÿ¬¢"ùñÊ®á Ë´Öo³2ß/SÎë^T¯¶©¹`7zh .E5ŽšBç)‹ÎçyÀ¿˜üV„ã( \ No newline at end of file diff --git a/hosts/thegeneralist/crosspost/default.nix b/hosts/thegeneralist/crosspost/default.nix new file mode 100644 index 0000000..a2db76a --- /dev/null +++ b/hosts/thegeneralist/crosspost/default.nix @@ -0,0 +1,14 @@ +{ config, ... }: +{ + # Crosspost worker: publishes queued X/LinkedIn/Instagram posts for crosspost-app (Cloudflare). + # Outbound HTTPS only. Module source: ~/personal/crosspost (flake input `crosspost`). + age.secrets.crosspostApiToken.file = ./api-token.age; + age.secrets.crosspostWorkerKey.file = ./worker-key.age; + + services.crosspost = { + enable = true; + appUrl = "https://crosspost-app.thegeneralist01.workers.dev"; + apiTokenFile = config.age.secrets.crosspostApiToken.path; + privateKeyFile = config.age.secrets.crosspostWorkerKey.path; + }; +} diff --git a/hosts/thegeneralist/crosspost/worker-key.age b/hosts/thegeneralist/crosspost/worker-key.age new file mode 100644 index 0000000000000000000000000000000000000000..23d19c8f409a88b15cf68546b854e5e8d36e4cc5 GIT binary patch literal 2700 zcmYdHPt{G$OD?J`D9Oyv)5|YP*Do{V(zR14F3!+RO))YxHMCSHD6lL{2~>y(3HI>` zDlJJ1PYx^cu(a@Y&Nr*b$q&p9cP{jZGz$pwEcWyX_SQBE%;w52DKR$Jc23F9tt>Eg zNpVT@weSgwii}KkPuBM@w#>;fGtw^&F)q&zx8Ty%)m13ZF)vCfscNoD8vcc1S%r{|nAah2a15%O{m+xAv@o(?#z^37dYOk=<)U*eQWVB_TVM8Z3{2FnW&?-KaMZQ%s@{2=fO+9 z&gbppGArFK&YW31gFEE>xjohMHha0-cLqi5xN-B&nlFF3+O#<5Y1`;d&)jyRL*$3l z$7Lo4_ELBMUE%&QdxEWFN$c0TjOWh}oZUD7*RszRxwAzaV@;#|Q{s>3$MnC_Q}|Xs zVQZPV!cUD-+t<@4zF#x1hqJpxf8t!-YX49{o6I|rHxdQ3_A*{s{dU*Q-%%bpCmoVB zI;Gw8ZS+I@EK)LdJwIuCK*j6Vzc+=y+^;MOUD_Wr$I|=$W0l6tY3Ebjk9BFeM95!1 zJhA9>gx){rbj4?T)_PY;&(kZKiTqb7xTudQiGHC_Rr+8|GIZm zOv3Xe*WS+MU|6EQ?$)~*JrzC|rn9vj&a9dF`1)eI{w+^$IL;_s93L?E^;?yF57x{J z`f)fdqE*7+>?ZBY%XqnErNa(sFy%JX?lJ$hd)ZvMy8PNI&PrWNzlr?wKj&X>_u3}j zy`f>{#rADCJf^2lVAg;f0>8*ztm77Ra5PxUdZwtJX}{|$`xv8&xUwq#{>K-mF3sE9a>j7CNOWV!R`Fo3 zr{80@ly9@&`!9+6rGStB?%Dspn>}l5JN#&OaN>0ROHW#|mzV8b>0NxXy}qhdBOqUX z>3h2-gAeAe-cA>n-L`A}ARO}YXYjPeP8<~zqqn**-}>1!`xoDn)ore#pJG-X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a_F~M8 zBU7edHGRhTFk)BIbc>&h*8PdNb-XuzcKW-dGuPQImoQeyoRRvpoqyn2o%1_ q3T^K8sZD${uV$7_JNql9mreS~GV<(uqMoX{obl_Kn{%i(a038jAVePk literal 0 HcmV?d00001 diff --git a/secrets.nix b/secrets.nix index b71374b..1d63d0a 100644 --- a/secrets.nix +++ b/secrets.nix @@ -11,6 +11,8 @@ in "hosts/thegeneralist/readlater-bot-token.age".publicKeys = [ thegeneralist ]; "hosts/thegeneralist/readlater-bot-sync-token.age".publicKeys = [ thegeneralist ]; "hosts/thegeneralist/readlater-bot-user-id.age".publicKeys = [ thegeneralist ]; + "hosts/thegeneralist/crosspost/api-token.age".publicKeys = [ thegeneralist ]; + "hosts/thegeneralist/crosspost/worker-key.age".publicKeys = [ thegeneralist ]; "modules/linux/tailscale-marshall.age".publicKeys = [ thegeneralist ]; }