services: remove prololo beta testing service
This commit is contained in:
parent
6d1b8e9b17
commit
63af1a317e
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -21,7 +21,6 @@
|
|||
./pipewire.nix
|
||||
./postgresql-backup.nix
|
||||
./postgresql.nix
|
||||
./prololo.nix
|
||||
./restic-backup.nix
|
||||
./tailscale.nix
|
||||
./tgv.nix
|
||||
|
|
|
@ -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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue