From 461bbb19677d9cfc113a2eb3d9a71e3b9905b968 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Sat, 2 Aug 2025 09:40:31 -0400 Subject: [PATCH] add valent --- clients/quadraticserver/matrix/bot.nix | 22 +++++++ .../quadraticserver/{ => matrix}/bridges.nix | 0 .../{ => matrix}/grapevine.nix | 0 flake.lock | 61 ++++++++++++++++++- flake.nix | 4 ++ modules/graphical/gnome.nix | 2 + secrets/botPassword.age | 10 +++ secrets/smtpPassword.age | 9 +++ 8 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 clients/quadraticserver/matrix/bot.nix rename clients/quadraticserver/{ => matrix}/bridges.nix (100%) rename clients/quadraticserver/{ => matrix}/grapevine.nix (100%) create mode 100644 secrets/botPassword.age create mode 100644 secrets/smtpPassword.age diff --git a/clients/quadraticserver/matrix/bot.nix b/clients/quadraticserver/matrix/bot.nix new file mode 100644 index 0000000..02d979f --- /dev/null +++ b/clients/quadraticserver/matrix/bot.nix @@ -0,0 +1,22 @@ +{ + inputs, + config, + ... +}: { + imports = [inputs.nexusbot.nixosModules.default]; + + services = let + socket = "/var/run/nexusbot/socket"; + domain = "register.federated.nexus"; + in { + nexusbot = { + enable = true; + botPasswordFile = config.age.secrets."botPassword.age".path; + smtpPasswordFile = config.age.secrets."smtpPassword.age".path; + args = ["--socket" socket "--homeserver" config.services.grapevine.settings.server_discovery.client.base_url "--name" "nexusbot" "--inviteTo" "#community:federated.nexus" "--adminRoom" "#admins:federated.nexus" "--successUri" "https://federated.nexus/success"]; + group = "caddy"; + }; + + caddy.virtualHosts."${domain}".extraConfig = "reverse_proxy unix/${socket}"; + }; +} diff --git a/clients/quadraticserver/bridges.nix b/clients/quadraticserver/matrix/bridges.nix similarity index 100% rename from clients/quadraticserver/bridges.nix rename to clients/quadraticserver/matrix/bridges.nix diff --git a/clients/quadraticserver/grapevine.nix b/clients/quadraticserver/matrix/grapevine.nix similarity index 100% rename from clients/quadraticserver/grapevine.nix rename to clients/quadraticserver/matrix/grapevine.nix diff --git a/flake.lock b/flake.lock index 74206d2..cbe347a 100644 --- a/flake.lock +++ b/flake.lock @@ -838,6 +838,24 @@ } }, "flake-parts_5": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_4" + }, + "locked": { + "lastModified": 1749398372, + "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_6": { "inputs": { "nixpkgs-lib": [ "sdm845", @@ -858,7 +876,7 @@ "type": "github" } }, - "flake-parts_6": { + "flake-parts_7": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -1653,6 +1671,27 @@ "type": "github" } }, + "nexusbot": { + "inputs": { + "flake-parts": "flake-parts_5", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1754080381, + "narHash": "sha256-GUtSLCJ3dAnV6aQBuHUptsmM22qQiXIpv2M5QcSQ62w=", + "ref": "refs/heads/main", + "rev": "74a634c642f74c3ec165d77f4b5dcb9247fdae53", + "revCount": 6, + "type": "git", + "url": "https://git.federated.nexus/federated-nexus/nexusbot" + }, + "original": { + "type": "git", + "url": "https://git.federated.nexus/federated-nexus/nexusbot" + } + }, "niri-flake": { "inputs": { "niri-stable": [ @@ -2232,6 +2271,21 @@ "type": "github" } }, + "nixpkgs-lib_4": { + "locked": { + "lastModified": 1748740939, + "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "656a64127e9d791a334452c6b6606d17539476e2", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs-riscv": { "locked": { "lastModified": 1752147015, @@ -2601,6 +2655,7 @@ "home-manager": "home-manager_2", "lasuite-docs-proxy": "lasuite-docs-proxy", "matrixoidc": "matrixoidc", + "nexusbot": "nexusbot", "nix-matrix-appservices": "nix-matrix-appservices", "nixpkgs": "nixpkgs_2", "ooye": "ooye", @@ -2727,7 +2782,7 @@ "emacs-overlay": "emacs-overlay", "fenix": "fenix_2", "flake-compat": "flake-compat_5", - "flake-parts": "flake-parts_5", + "flake-parts": "flake-parts_6", "flake-schemas": "flake-schemas", "flake-utils": "flake-utils_4", "flake-utils-plus": "flake-utils-plus", @@ -2822,7 +2877,7 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme_2", - "flake-parts": "flake-parts_6", + "flake-parts": "flake-parts_7", "gnome-shell": "gnome-shell", "nixpkgs": [ "nixpkgs" diff --git a/flake.nix b/flake.nix index 10c36a4..079ae52 100755 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,10 @@ url = "git+https://git.federated.nexus/Henry-Hiles/lasuite_docs_proxy"; inputs.nixpkgs.follows = "nixpkgs"; }; + nexusbot = { + url = "git+https://git.federated.nexus/federated-nexus/nexusbot"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nix-matrix-appservices = { url = "gitlab:coffeetables/nix-matrix-appservices"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/graphical/gnome.nix b/modules/graphical/gnome.nix index ebdd173..dc75635 100644 --- a/modules/graphical/gnome.nix +++ b/modules/graphical/gnome.nix @@ -8,6 +8,7 @@ sessionVariables.XDG_CURRENT_DESKTOP = "GNOME"; systemPackages = with pkgs.gnomeExtensions; [ + valent caffeine pop-shell appindicator @@ -34,6 +35,7 @@ gnome-console gnome-software gnome-characters + gnome-connections gnome-text-editor gnome-system-monitor ]; diff --git a/secrets/botPassword.age b/secrets/botPassword.age new file mode 100644 index 0000000..4006590 --- /dev/null +++ b/secrets/botPassword.age @@ -0,0 +1,10 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFZLUVVkUSBoVHkz +NkVudWNTemZFWHpRQWxzeHNta2ozK3JvbXB5NXRqdnBmeU4rYXlzCjdSL0tWd3E3 +a1JGNHp4NjU1bll5eDZtRk5uYUJUVXRNY3B5Sk9vMmJQRGMKLT4gaDNqLWdyZWFz +ZSAhYHoqRWAhJSBdLj11JyBveV8KRDRTYzlEU21KM0NLZklXeWdzdE5jSzZHZVBV +U0k1R0tBbzlJbVVaeFZsRHZtck9MMW5zb05qN2t3SGFSTjFEcQoxQlFFCi0tLSBL +WklLRzkvd0JFZEJ6VURVTnNhenhoejVVNGhXblA3eGtPMGVMbldnOVlJCuD/6vJ4 +YBu7SYqR3AQ10SAbd7Dn4Ze/gfO8u1I2hegQa8p0I4Iu+1Grs1V9qwNiXX8qpLfy +wklk1LIeDWr1Kn7f +-----END AGE ENCRYPTED FILE----- diff --git a/secrets/smtpPassword.age b/secrets/smtpPassword.age new file mode 100644 index 0000000..d6fa37d --- /dev/null +++ b/secrets/smtpPassword.age @@ -0,0 +1,9 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFZLUVVkUSBvYlEw +TE54bDNBNEhQWkp3OThKOWJxVkltVGRaOThiTmQrbXgreVkrZ3hVCmJGQVNMTk8r +eU9lM1pYS0lVUXVJaURXc0tDem5DU0UxcUMydmtyNFVaeFUKLT4gQ1xCM2woPT0t +Z3JlYXNlIEAKSHhsOUt5My9OYVNSdXJrb0loYzl5MEpTcWdNcDJnZ1IzWk9xbXpw +akc5cHgKLS0tIHg5YjQ3d3VyZ3dQWG1sVWlYL3lqUUt2UndpVlV1NEo3eENiUnJE +Ry83RlkKr7Q6I67w7sLxayT8qPgiGyLbGaHCIIttc2Zhd832xcKopkA1+9aB/9fY +nQ== +-----END AGE ENCRYPTED FILE-----