From df461aa72d6ed25cff1e382ea61670d5fdd5d9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Fri, 7 Jan 2022 17:23:28 +0100 Subject: [PATCH] feat(makanek): rip containers --- systems/makanek/menstruation.nix | 55 +++++++++++++------------- systems/makanek/moodle-dl-borsfaye.nix | 2 + 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/systems/makanek/menstruation.nix b/systems/makanek/menstruation.nix index f7c2826..ee7a98f 100644 --- a/systems/makanek/menstruation.nix +++ b/systems/makanek/menstruation.nix @@ -5,37 +5,36 @@ let backendPort = 8000; in { - containers.menstruation.autoStart = true; - containers.menstruation.config = { config, pkgs, ... }: { - services.redis.enable = true; + services.redis.enable = true; - systemd.services.menstruation-telegram = { - wants = [ - "network-online.target" - "menstruation-backend.service" - "redis.service" - ]; - wantedBy = [ "multi-user.target" ]; - environment = { - MENSTRUATION_TOKEN = lib.strings.fileContents ; - MENSTRUATION_ENDPOINT = "http://localhost:${toString backendPort}"; - MENSTRUATION_MODERATORS = "18980945"; - }; - serviceConfig = { - Restart = "always"; - DynamicUser = true; - ExecStart = "${telegram}/bin/menstruation-telegram"; - }; + environment.systemPackages = [ pkgs.redis ]; + + systemd.services.menstruation-telegram = { + wants = [ + "network-online.target" + "menstruation-backend.service" + "redis.service" + ]; + wantedBy = [ "multi-user.target" ]; + environment = { + MENSTRUATION_TOKEN = lib.strings.fileContents ; + MENSTRUATION_ENDPOINT = "http://localhost:${toString backendPort}"; + MENSTRUATION_MODERATORS = "18980945"; }; + serviceConfig = { + Restart = "always"; + DynamicUser = true; + ExecStart = "${telegram}/bin/menstruation-telegram"; + }; + }; - systemd.services.menstruation-backend = { - wants = [ "network-online.target" ]; - environment.ROCKET_PORT = toString backendPort; - serviceConfig = { - Restart = "always"; - DynamicUser = true; - ExecStart = "${backend}/bin/menstruation_server"; - }; + systemd.services.menstruation-backend = { + wants = [ "network-online.target" ]; + environment.ROCKET_PORT = toString backendPort; + serviceConfig = { + Restart = "always"; + DynamicUser = true; + ExecStart = "${backend}/bin/menstruation_server"; }; }; } diff --git a/systems/makanek/moodle-dl-borsfaye.nix b/systems/makanek/moodle-dl-borsfaye.nix index 4f42abe..f48cb0e 100644 --- a/systems/makanek/moodle-dl-borsfaye.nix +++ b/systems/makanek/moodle-dl-borsfaye.nix @@ -5,6 +5,8 @@ let }); in { + imports = [ ]; + services.moodle-dl = { enable = true; startAt = "hourly";