From 63af1a317e48c2dfbe39fc18abe2ca236cbe7e93 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 24 Sep 2021 16:16:27 +0200 Subject: [PATCH] services: remove prololo beta testing service --- hosts/poseidon/default.nix | 26 --------- secrets/default.nix | 5 -- secrets/prololo-github-secret.secret | Bin 30 -> 0 bytes secrets/prololo-password.secret | Bin 87 -> 0 bytes secrets/prololo-room.secret | Bin 54 -> 0 bytes secrets/prololo-room2.secret | Bin 54 -> 0 bytes services/default.nix | 1 - services/prololo.nix | 80 --------------------------- 8 files changed, 112 deletions(-) delete mode 100644 secrets/prololo-github-secret.secret delete mode 100644 secrets/prololo-password.secret delete mode 100644 secrets/prololo-room.secret delete mode 100644 secrets/prololo-room2.secret delete mode 100644 services/prololo.nix diff --git a/hosts/poseidon/default.nix b/hosts/poseidon/default.nix index 64d3733..fb55c25 100644 --- a/hosts/poseidon/default.nix +++ b/hosts/poseidon/default.nix @@ -134,32 +134,6 @@ in enable = true; }; - prololo = { - enable = true; - port = 8089; - settings = { - matrix_username = "prololo"; - matrix_password = config.my.secrets.prololo_password; - matrix_homeserver = "https://matrix.alarsyo.net"; - matrix_state_dir = "./prololo_state_dir"; - github_secret = config.my.secrets.prololo_github_secret; - matrix_rooms = { - test-room = { id = config.my.secrets.prololo_room; default = true; }; - test-room2 = { id = config.my.secrets.prololo_room2; }; - }; - destinations = [ - { - regex = "^prologin/.*-playground$"; - room = "test-room2"; - } - { - regex = "^prologin/.*-\\dplayground$"; - room = "test-room2"; - } - ]; - }; - }; - tailscale = { enable = true; exitNode = true; diff --git a/secrets/default.nix b/secrets/default.nix index e2f351d..59c9049 100644 --- a/secrets/default.nix +++ b/secrets/default.nix @@ -20,10 +20,5 @@ with lib; restic-backup = import ./restic-backup { inherit lib; }; matrixEmailConfig = import ./matrix-email-config.nix; - - prololo_password = lib.fileContents ./prololo-password.secret; - prololo_room = lib.fileContents ./prololo-room.secret; - prololo_room2 = lib.fileContents ./prololo-room2.secret; - prololo_github_secret = lib.fileContents ./prololo-github-secret.secret; }; } diff --git a/secrets/prololo-github-secret.secret b/secrets/prololo-github-secret.secret deleted file mode 100644 index e63c13e69ab8d50a735a09a118e2df097ba2f3a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30 mcmZQ@_Y83kiVO&0ILonr-=P(`3e6Ic!TFn>ZSh=R+y(%uGYqo; diff --git a/secrets/prololo-password.secret b/secrets/prololo-password.secret deleted file mode 100644 index 039626324fcbe7bc98d49ace35c7202ace55bd76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 87 zcmV-d0I2@}M@dveQdv+`06EM>cs|n{{q8*Dh4T2LFo{mSL~`*klK9pKMMTR-V6-{< tI`~l04U#fPuH&`P$KfTJM7t>VdPOdi5 diff --git a/secrets/prololo-room.secret b/secrets/prololo-room.secret deleted file mode 100644 index 3ce60010f52ea0e4c84d70ce09320471b32ec005..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 54 zcmZQ@_Y83kiVO&0V9QCVHLus(bwlJ!N^N0I7{{wjql~>XwD&6d@CmGw55IIn+|d2i KqEH6zOZ5O0f)uj= diff --git a/secrets/prololo-room2.secret b/secrets/prololo-room2.secret deleted file mode 100644 index 905ffdbd2548e2e8566bb6912ed280c85acfb062..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 54 zcmV-60LlLVM@dveQdv+`04~Gk{58^B+0e2dKypf4%Abe1m*x4dwQIj#HuXSoTE3Q4 MOMGTGqz`+o$*wONZ2$lO diff --git a/services/default.nix b/services/default.nix index 1522988..9412e57 100644 --- a/services/default.nix +++ b/services/default.nix @@ -21,7 +21,6 @@ ./pipewire.nix ./postgresql-backup.nix ./postgresql.nix - ./prololo.nix ./restic-backup.nix ./tailscale.nix ./tgv.nix diff --git a/services/prololo.nix b/services/prololo.nix deleted file mode 100644 index 11664f6..0000000 --- a/services/prololo.nix +++ /dev/null @@ -1,80 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - cfg = config.my.services.prololo; - my = config.my; - domain = config.networking.domain; - prololoPkg = - let - flake = builtins.getFlake "github:prologin/prololo?rev=65007253adb9f366698a450cc9343b30c8ac508f"; - in - flake.defaultPackage."x86_64-linux"; # FIXME: use correct system - settingsFormat = pkgs.formats.yaml {}; -in -{ - options.my.services.prololo = { - enable = lib.mkEnableOption "Prololo Matrix bot"; - - home = mkOption { - type = types.str; - default = "/var/lib/prololo"; - example = "/var/lib/prololo"; - description = "Home for the prololo service, where data will be stored"; - }; - - port = mkOption { - type = types.port; - default = 8080; - example = 8080; - description = "Internal port for Prololo Rocket server"; - }; - - settings = mkOption { - type = settingsFormat.type; - default = {}; - }; - }; - - config = - let - configFile = settingsFormat.generate "config.yaml" cfg.settings; - in mkIf cfg.enable - { - systemd.services.prololo = { - wantedBy = [ "multi-user.target" ]; - serviceConfig = { - Environment = [ - "ROCKET_PORT=${toString cfg.port}" - "ROCKET_LOG_LEVEL=normal" - "RUST_LOG=rocket=info,prololo=trace" - ]; - ExecStart = "${prololoPkg}/bin/prololo --config ${configFile}"; - StateDirectory = "prololo"; - WorkingDirectory = cfg.home; - User = "prololo"; - Group = "prololo"; - }; - }; - - users.users.prololo = { - isSystemUser = true; - home = cfg.home; - createHome = true; - group = "prololo"; - }; - users.groups.prololo = { }; - - services.nginx.virtualHosts = { - "prololo.${domain}" = { - forceSSL = true; - useACMEHost = domain; - - locations."/" = { - proxyPass = "http://127.0.0.1:${toString cfg.port}"; - }; - }; - }; - }; -}