commit 085d3983baa70010344c0d016e709e64a1e5c708
parent ae7b05f829e9b42e562b3b2b4d2e8363d2bb9b3d
Author: Leah (ctucx) <git@ctu.cx>
Date: Tue, 13 Jun 2023 19:55:36 +0200
parent ae7b05f829e9b42e562b3b2b4d2e8363d2bb9b3d
Author: Leah (ctucx) <git@ctu.cx>
Date: Tue, 13 Jun 2023 19:55:36 +0200
machines/briefkasten: add `travelynx2fedi`
6 files changed, 85 insertions(+), 1 deletion(-)
diff --git a/flake.lock b/flake.lock @@ -619,7 +619,8 @@ "sdm2mqtt": "sdm2mqtt", "simple-nixos-mailserver": "simple-nixos-mailserver", "solax2mqtt": "solax2mqtt", - "stagit": "stagit" + "stagit": "stagit", + "travelynx2fedi": "travelynx2fedi" } }, "sdm2mqtt": { @@ -751,6 +752,30 @@ "type": "github" } }, + "travelynx2fedi": { + "inputs": { + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1686686532, + "narHash": "sha256-q2AUNyHXvl0t+DQtl5E/ws812JJCrO7v4JLAWX/31GM=", + "ref": "main", + "rev": "4a6ca4ce7500fd35da90ad5532019d2f1cb30943", + "revCount": 2, + "type": "git", + "url": "https://git.ctu.cx/travelynx2fedi" + }, + "original": { + "ref": "main", + "type": "git", + "url": "https://git.ctu.cx/travelynx2fedi" + } + }, "utils": { "locked": { "lastModified": 1605370193,
diff --git a/flake.nix b/flake.nix @@ -86,6 +86,7 @@ inputs.dnsmasq-lease-overview.overlay inputs.flauschehorn-sexy.overlay + inputs.travelynx2fedi.overlay ]; }; @@ -284,6 +285,14 @@ inputs.flake-utils.follows = "flake-utils"; }; + travelynx2fedi = { + type = "git"; + url = "https://git.ctu.cx/travelynx2fedi"; + ref = "main"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "flake-utils"; + }; + }; }
diff --git a/machines/briefkasten/configuration.nix b/machines/briefkasten/configuration.nix @@ -26,6 +26,7 @@ ./scanner-sftp.nix ./websites + ./travelynx2fedi.nix ]; networking.usePBBUplink = true;
diff --git a/machines/briefkasten/travelynx2fedi.nix b/machines/briefkasten/travelynx2fedi.nix @@ -0,0 +1,34 @@ +{ inputs, pkgs, lib, config, ... }: + +{ + + dns.zones."ctu.cx".subdomains."travelynx2fedi.home".CNAME = lib.mkIf config.networking.usePBBUplink [ "${config.networking.fqdn}." ]; + + age.secrets.travelynx2fedi-env.file = ./. + "/../../secrets/${config.networking.hostName}/travelynx2fedi-env.age"; + + imports = [ + inputs.travelynx2fedi.nixosModule + ]; + + services.travelynx2fedi = { + enable = true; + environmentFiles = [ config.age.secrets.travelynx2fedi-env.path ]; + + config = { + server.accessToken = "$TRAVELYNX_TOKEN"; + travelynx.username = "ctucx"; + fedi.url = "\"https://fedi.home.ctu.cx\""; + fedi.accessToken = "$FEDI_TOKEN"; + fedi.visibility = "private"; + fedi.spoilerText = "travelynx"; + fedi.useMarkdown = "yes"; + }; + + nginx = { + enable = true; + enableACME = true; + domain = "travelynx2fedi.home.ctu.cx"; + }; + }; + +}+ \ No newline at end of file
diff --git a/secrets/briefkasten/travelynx2fedi-env.age b/secrets/briefkasten/travelynx2fedi-env.age @@ -0,0 +1,13 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA0NjN4UXBmSFcyY25rNThI +NllrMG9vSkJkRTBUL1pKZTllcm84WFJrY0RnCkFqY0xvZHNmWk0rdm1SanE1UnRV +UHNFdWRJdVA3ZzNtVVJ1MzdBbm12N0UKLT4gc3NoLWVkMjU1MTkgNGhLQ013IDdB +RE81VjNrdEZ6MnpoZ3ZGSVJrMXJ1QzlDTVl4UW5ycUJZMmh2UmpVZ3MKd0VkTWRB +a241dTg2YWJLOUtWcDhydnppM0lYMW9EWjRFcHBELzg2RUFDMAotPiBXLWdyZWFz +ZSBHJUZBPUgqNiBDcWAgenkgRV4wPWd1CitQWGkvbDhhWnljamlPdUlZSUZLK3Yv +U2V2ZDVLQQotLS0gS0hKQXlhREd5L0hUeDdYNFJ6QWcwL0dsWjFZRlorS2hSUDRX +Vm9sa0dtWQoVpnSa+2tk26nzoNNfmxWQWxXSt9iUkJCGqbB4U+NA8zYevPg0dqzW +S/Lm0OJdzD9WaBKNf30n9QeP9JkOUelmieUzs2SXTU3gVF/G8hh4zA/GkfV+c+HW +Hh/jGwuGH40miGFZrPPC2EgQ295CvGR7+zrfMvkUkhQllhWGZ4sYmt2/e0gsEvYx +q3MUNQP3VXUmLxWspr7S2j/txz3eputKRnLo +-----END AGE ENCRYPTED FILE-----
diff --git a/secrets/secrets.nix b/secrets/secrets.nix @@ -52,6 +52,7 @@ in { "briefkasten/wireguard-privkey.age".publicKeys = [ leah briefkasten ]; "briefkasten/gotosocial-env.age".publicKeys = [ leah briefkasten ]; + "briefkasten/travelynx2fedi-env.age".publicKeys = [ leah briefkasten ]; "briefkasten/radicale-users.age".publicKeys = [ leah briefkasten ];