diff options
Diffstat (limited to 'makefu/2configs/deployment')
6 files changed, 175 insertions, 3 deletions
diff --git a/makefu/2configs/deployment/docker/etherpad.euer.krebsco.de.nix b/makefu/2configs/deployment/docker/etherpad.euer.krebsco.de.nix new file mode 100644 index 000000000..a01f924e7 --- /dev/null +++ b/makefu/2configs/deployment/docker/etherpad.euer.krebsco.de.nix @@ -0,0 +1,39 @@ +{ lib, ... }: +let + port = 19201; +in { + #services.nginx.virtualHosts."euer.krebsco.de".serverAliases = [ "etherpad.euer.krebsco.de" ]; + services.nginx.virtualHosts."etherpad.euer.krebsco.de" = { + # useACMEHost = "euer.krebsco.de"; + enableACME = true; + forceSSL = true; + locations."/".proxyPass = "http://localhost:${toString port}"; + }; + docker-containers."etherpad-lite" = { + image = "makefoo/bgt-etherpad:2020-05-02.5"; + ports = [ "127.0.0.1:${toString port}:9001" ]; + volumes = [ + "/var/src/secrets/etherpad/apikey:/opt/etherpad-lite/APIKEY.txt" + "etherpad_data:/opt/etherpad-lite/var" # persistent dirtydb + ]; + # for postgres + #DB_TYPE=postgres + #DB_HOST=db.local + #DB_PORT=4321 + #DB_NAME=etherpad + #DB_USER=dbusername + #DB_PASS=mypassword + environment = { + # ADMIN_PASSWORD = "auf jeden fall nicht das echte admin passwort"; + SUPPRESS_ERRORS_IN_PAD_TEXT = "true"; + TITLE = "Binärgewitter Etherpad"; + SKIN_NAME = "no-skin"; + DEFAULT_PAD_TEXT = builtins.replaceStrings ["\n"] ["\\n"] (builtins.readFile ./template.md); + PAD_OPTIONS_USE_MONOSPACE_FONT = "true"; + PAD_OPTIONS_USER_NAME = "true"; + PAD_OPTIONS_USER_COLOR = "true"; + PAD_OPTIONS_CHAT_AND_USERS = "true"; + PAD_OPTIONS_LANG = "en-US"; + }; + }; +} diff --git a/makefu/2configs/deployment/docker/template.md b/makefu/2configs/deployment/docker/template.md new file mode 100644 index 000000000..a26b2f042 --- /dev/null +++ b/makefu/2configs/deployment/docker/template.md @@ -0,0 +1,33 @@ +# BGT<NUMBER> + +1. studio-link aufnehmen drücken (wichtig) + - markus 6407eb63@studio-link.de + - Felix1 1f1021b2@studio-link.de + - L33tFelix 4d47a82a@studio-link.de + - Ingo 03b33b4a@studio-link.de +2. audiocity starten, 48000Hz einstellen, Audio-Device checken und aufnehmen drücken (wichtig) +3. obs starten und aufnehmen drücken (eher unwichtig) +4. darkice starten (wichtig) +4. klatschen +5. Hallo und herzlich Willkommen + +## Vorschläge +### Backlog von Picks und Lesefoo aus der letzten Woche + +--- + +## Blast from the Past + +## Toter der Woche + +## Untoter der Woche + +## News + +## Themen + +## Mimimi der Woche + +## Lesefoo + +## Picks diff --git a/makefu/2configs/deployment/feed.euer.krebsco.de/default.nix b/makefu/2configs/deployment/feed.euer.krebsco.de/default.nix new file mode 100644 index 000000000..de072092b --- /dev/null +++ b/makefu/2configs/deployment/feed.euer.krebsco.de/default.nix @@ -0,0 +1,52 @@ +{ config, lib, pkgs, ... }: +let + filter-file = ./filter.yml; + pkg = with pkgs.python3Packages;buildPythonPackage rec { + version = "d16ce227dc68c9f60f6dd06e6835bab7cdfdf61b"; + pname = "ebk-notify"; + propagatedBuildInputs = [ + docopt + pyyaml + requests + beautifulsoup4 + dateutil + feedgen + ]; + src = pkgs.fetchgit { + url = "http://cgit.euer.krebsco.de/ebk-notify"; + rev = version; + sha256 = "15dlhp17alm01fw7mzdyh2z9zwz8psrs489lxs3hgg1p5wa0kzsp"; + }; + }; + domain = "feed.euer.krebsco.de"; + path = "/var/www/feed.euer.krebsco.de"; +in +{ + systemd.tmpfiles.rules = [ + "d ${path} nginx nogroup - -" + ]; + krebs.secret.files.ebknotify = { + path = "/etc/ebk-notify.yml"; + owner.name = "nginx"; + source-path = "${<secrets/ebk-notify.yml>}"; + }; + systemd.services.ebk-notify = { + startAt = "*:0/10"; + serviceConfig = { + User = "nginx"; # TODO better permission setting + # PrivateTmp = true; + ExecStart = "${pkg}/bin/ebk-notify --atom --outdir ${path} --config /etc/ebk-notify.yml --cache /tmp/ebk-cache.json --filter ${filter-file} --wait 30"; + }; + }; + systemd.timers.ebk-notify.timerConfig.RandomizedDelaySec = "120"; + services.nginx = { + virtualHosts."${domain}" = { + forceSSL = true; + enableACME = true; + locations."/" = { + root = path; + index = "root.atom"; + }; + }; + }; +} diff --git a/makefu/2configs/deployment/feed.euer.krebsco.de/filter.yml b/makefu/2configs/deployment/feed.euer.krebsco.de/filter.yml new file mode 100644 index 000000000..50058f32b --- /dev/null +++ b/makefu/2configs/deployment/feed.euer.krebsco.de/filter.yml @@ -0,0 +1,44 @@ +- name: Free Stuff by Category + zipcode: 70378 + distance: 2 + categoryId: 192 +- name: Kies + zipcode: 70378 + q: grobkies + distance: 2 +- name: pflanzkübel + zipcode: 70378 + q: Pflanzkübel + distance: 3 +- name: Ikea Samla + zipcode: 70378 + q: samla + distance: 5 +- name: Duplo + zipcode: 70378 + q: Duplo + distance: 10 +- name: Baby Gummistiefel + zipcode: 70378 + q: Gummistiefel + distance: 5 +- name: Werkbank + zipcode: 70378 + q: Werkbank + distance: 5 +- name: Stirnthermometer + zipcode: 70378 + q: Stirnthermometer + distance: 5 +- name: Ohrthermometer + zipcode: 70378 + q: Ohrthermometer + distance: 5 +- name: Fieberthermometer + zipcode: 70378 + q: Fieberthermometer + distance: 5 +- name: Einhell + zipcode: 70378 + q: Einhell + distance: 5 diff --git a/makefu/2configs/deployment/gecloudpad/default.nix b/makefu/2configs/deployment/gecloudpad/default.nix index e13ec6ae6..8b88626a3 100644 --- a/makefu/2configs/deployment/gecloudpad/default.nix +++ b/makefu/2configs/deployment/gecloudpad/default.nix @@ -4,12 +4,14 @@ let wsgi-sock = "${workdir}/uwsgi-gecloudpad.sock"; workdir = config.services.uwsgi.runDir; gecloudpad = pkgs.python3Packages.callPackage ./gecloudpad.nix {}; + gecloudpad_settings = pkgs.writeText "gecloudpad_settings" '' + BASEURL = "https://etherpad.euer.krebsco.de" + ''; in { services.uwsgi = { enable = true; user = "nginx"; - # runDir = "/var/lib/photostore"; plugins = [ "python3" ]; instance = { type = "emperor"; @@ -18,6 +20,7 @@ in { type = "normal"; pythonPackages = self: with self; [ gecloudpad ]; socket = wsgi-sock; + env = ["GECLOUDPAD_SETTINGS=${gecloudpad_settings}"]; }; }; }; diff --git a/makefu/2configs/deployment/owncloud.nix b/makefu/2configs/deployment/owncloud.nix index ed3155efc..1cfda6fc5 100644 --- a/makefu/2configs/deployment/owncloud.nix +++ b/makefu/2configs/deployment/owncloud.nix @@ -15,6 +15,7 @@ with lib; let # TODO: copy-paste from lass/2/websites/util.nix + nextcloud = pkgs.nextcloud18; serveCloud = domains: let domain = head domains; @@ -23,9 +24,9 @@ let in { system.activationScripts."prepare-nextcloud-${domain}" = '' if test ! -e ${root} ;then - echo "copying latest ${pkgs.nextcloud.name} release to ${root}" + echo "copying latest ${nextcloud.name} release to ${root}" mkdir -p $(dirname "${root}") - cp -r ${pkgs.nextcloud} "${root}" + cp -r ${nextcloud} "${root}" chown -R nginx:nginx "${root}" chmod 770 "${root}" fi |