about summary refs log tree commit diff
path: root/nix/hosts/corrino
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-03-09 22:56:01 +0100
committerEmile <git@emile.space>2024-03-09 22:56:01 +0100
commit55ee036fd7ebed24097c8da1ca8a0b0829264670 (patch)
tree9c600d75a4f59f8ec253c5caadc1f77b2cecb0da /nix/hosts/corrino
big bang
Diffstat (limited to 'nix/hosts/corrino')
-rw-r--r--nix/hosts/corrino/README.md4
-rw-r--r--nix/hosts/corrino/configuration.nix415
-rw-r--r--nix/hosts/corrino/default.nix3
-rw-r--r--nix/hosts/corrino/emile.space.nix60
-rw-r--r--nix/hosts/corrino/gemini/emile.space.nix16
-rw-r--r--nix/hosts/corrino/hardware-configuration.nix39
-rw-r--r--nix/hosts/corrino/secrets/factorio_password.agebin0 -> 588 bytes
-rw-r--r--nix/hosts/corrino/secrets/grafana_admin_password.age9
-rw-r--r--nix/hosts/corrino/secrets/grafana_database_password.age11
-rw-r--r--nix/hosts/corrino/secrets/grafana_secret_key.age9
-rw-r--r--nix/hosts/corrino/secrets/grafana_smtp_password.age10
-rw-r--r--nix/hosts/corrino/secrets/magic-hash-flag.age10
-rw-r--r--nix/hosts/corrino/secrets/mail_password.age7
-rw-r--r--nix/hosts/corrino/secrets/netbox_secret.age11
-rw-r--r--nix/hosts/corrino/secrets/photoprism_password.age9
-rw-r--r--nix/hosts/corrino/secrets/pretix.agebin0 -> 1487 bytes
-rw-r--r--nix/hosts/corrino/secrets/pretix_postgres_pw.age9
-rw-r--r--nix/hosts/corrino/secrets/storage_box_bx11_password.age7
-rw-r--r--nix/hosts/corrino/secrets/tailscale_authkey.agebin0 -> 524 bytes
-rw-r--r--nix/hosts/corrino/secrets/wireguard_privatekey.agebin0 -> 440 bytes
-rw-r--r--nix/hosts/corrino/ssh.pub1
-rw-r--r--nix/hosts/corrino/www/cs.emile.space.nix56
-rw-r--r--nix/hosts/corrino/www/ctf.emile.space.nix26
-rw-r--r--nix/hosts/corrino/www/emile.space.nix60
-rw-r--r--nix/hosts/corrino/www/events.emile.space.nix59
-rw-r--r--nix/hosts/corrino/www/git.emile.space.nix73
-rw-r--r--nix/hosts/corrino/www/grafana.emile.space.nix217
-rw-r--r--nix/hosts/corrino/www/grafana_full.emile.space.nix440
-rw-r--r--nix/hosts/corrino/www/hydra.emile.space.nix57
-rw-r--r--nix/hosts/corrino/www/jupyter.emile.space.nix60
-rw-r--r--nix/hosts/corrino/www/magic-hash.emile.space.nix33
-rw-r--r--nix/hosts/corrino/www/netbox.emile.space.nix63
-rw-r--r--nix/hosts/corrino/www/pgweb.emile.space.nix21
-rw-r--r--nix/hosts/corrino/www/photo.emile.space.nix33
-rw-r--r--nix/hosts/corrino/www/stream.emile.space.nix24
-rw-r--r--nix/hosts/corrino/www/talks.emile.space.nix97
-rw-r--r--nix/hosts/corrino/www/tickets.emile.space.nix120
-rw-r--r--nix/hosts/corrino/www/tickets.emile.space.nix_chaos.jetzt.nix107
-rw-r--r--nix/hosts/corrino/www/znc.emile.space.nix47
39 files changed, 2223 insertions, 0 deletions
diff --git a/nix/hosts/corrino/README.md b/nix/hosts/corrino/README.md
new file mode 100644
index 0000000..edeb74c
--- /dev/null
+++ b/nix/hosts/corrino/README.md
@@ -0,0 +1,4 @@
+# corrino
+
+`corrino.emile.space` is my current (2023-05-28) "main" server for hosting
+services, running build tasks and more.
diff --git a/nix/hosts/corrino/configuration.nix b/nix/hosts/corrino/configuration.nix
new file mode 100644
index 0000000..aed56cf
--- /dev/null
+++ b/nix/hosts/corrino/configuration.nix
@@ -0,0 +1,415 @@
+{ config, pkgs, ... }:
+{
+  imports =
+    [ # Include the results of the hardware scan.
+      ./hardware-configuration.nix
+      # ./age_secrets.nix
+
+      ./www/emile.space.nix
+      ./www/git.emile.space.nix
+      ./www/hydra.emile.space.nix
+      ./www/netbox.emile.space.nix
+      # ./www/grafana.emile.space.nix
+      ./www/photo.emile.space.nix
+
+      
+      # ./www/events.emile.space.nix
+      ./www/tickets.emile.space.nix
+      ./www/talks.emile.space.nix
+      ./www/stream.emile.space.nix
+
+      ./www/pgweb.emile.space.nix
+
+      ./www/ctf.emile.space.nix
+      # ./www/magic-hash.emile.space.nix
+
+      # ./www/znc.emile.space.nix
+
+      ./gemini/emile.space.nix
+    ];
+
+  # Use GRUB2 as the boot loader.
+  # We don't use systemd-boot because Hetzner uses BIOS legacy boot.
+  boot = {
+    #supportsInitrdSecrets = true;
+
+    loader.systemd-boot.enable = false;
+    loader.grub = {
+      enable = true;
+      efiSupport = false;
+      enableCryptodisk = true;
+      device = "nodev";
+      devices = [ "/dev/nvme0n1" "/dev/nvme1n1"];
+    };
+
+    kernelParams = [ "ip=135.181.142.139::135.181.142.129:255.255.255.192:corrino:enp35s0:off:8.8.8.8:8.8.4.4:" ];
+
+    initrd = {
+      kernelModules = [ "dm-snapshot" ];
+
+      availableKernelModules = [ "cryptd" "aesni_intel" "igb" ];#"FIXME Your network driver" ];
+
+      network = {
+        enable = true;
+        ssh = {
+          enable = true;
+      
+          # ssh port during boot for luks decryption
+          port = 2222;
+          authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys;
+          hostKeys = [ "/initrd_ssh_host_ecdsa_key" ];
+        };
+        postCommands = ''
+          echo 'cryptsetup-askpass' >> /root/.profile
+        '';
+      };
+
+      luks = {
+        forceLuksSupportInInitrd = true;
+        devices = {
+          root = {
+            preLVM = true;
+            device = "/dev/md1";
+            allowDiscards = true;
+          };
+        };
+      };
+                  
+      secrets = {
+        "/initrd_ssh_host_ecdsa_key" = "/initrd_ssh_host_ecdsa_key";
+      };
+
+      # The RAIDs are assembled in stage1, so we need to make the config
+      # available there.
+      # services.swraid.mdadmConf = config.environment.etc."mdadm.conf".text;
+    };
+
+    # From the nixos 23.11 release notes changelog breaking changes section:
+    # mdraid support is optional now. This reduces initramfs size and prevents
+    # the potentially undesired automatic detection and activation of software
+    # RAID pools. It is disabled by default in new configurations (determined
+    # by stateVersion), but the appropriate settings will be generated by
+    # nixos-generate-config when installing to a software RAID device, so the
+    # standard installation procedure should be unaffected. If you have custom
+    # configs relying on mdraid, ensure that you use stateVersion correctly or
+    # set boot.swraid.enable manually. On systems with an updated stateVersion
+    # we now also emit warnings if mdadm.conf does not contain the minimum
+    # required configuration necessary to run the dynamically enabled monitoring
+    # daemons.
+    swraid = {
+      enable = true;
+      # mdadmConf = config.environment.etc."mdadm.conf".text;
+      mdadmConf = ''
+        HOMEHOST <ignore>
+        MAILADDR root
+      '';
+    };
+
+    supportedFilesystems = [ "cifs" ];
+  };
+
+  # The mdadm RAID1s were created with 'mdadm --create ... --homehost=hetzner',
+  # but the hostname for each machine may be different, and mdadm's HOMEHOST
+  # setting defaults to '<system>' (using the system hostname).
+  # This results mdadm considering such disks as "foreign" as opposed to
+  # "local", and showing them as e.g. '/dev/md/hetzner:root0'
+  # instead of '/dev/md/root0'.
+  # This is mdadm's protection against accidentally putting a RAID disk
+  # into the wrong machine and corrupting data by accidental sync, see
+  # https://bugzilla.redhat.com/show_bug.cgi?id=606481#c14 and onward.
+  # We do not worry about plugging disks into the wrong machine because
+  # we will never exchange disks between machines, so we tell mdadm to
+  # ignore the homehost entirely.
+  environment = {
+    etc."mdadm.conf".text = ''
+      HOMEHOST <ignore>
+      MAILADDR root
+    '';
+
+    systemPackages = with pkgs; [
+      git
+      du-dust
+      ncdu
+      # helix
+
+      sshfs
+    ];
+  };
+
+  programs = {
+    mosh.enable = true;
+    mtr.enable = true;
+  };
+
+  # create a oneshot job to authenticate to Tailscale
+  systemd.services.tailscale-autoconnect = {
+    description = "Automatic connection to Tailscale";
+
+    # make sure tailscale is running before trying to connect to tailscale
+    after = [ "network-pre.target" "tailscale.service" ];
+    wants = [ "network-pre.target" "tailscale.service" ];
+    wantedBy = [ "multi-user.target" ];
+
+    # set this service as a oneshot job
+    serviceConfig.Type = "oneshot";
+
+    # have the job run this shell script
+    script = with pkgs; ''
+      # wait for tailscaled to settle
+      sleep 2
+
+      # check if we are already authenticated to tailscale
+      status="$(${tailscale}/bin/tailscale status -json | ${jq}/bin/jq -r .BackendState)"
+      if [ $status = "Running" ]; then # if so, then do nothing
+        exit 0
+      fi
+
+      # otherwise authenticate with tailscale
+      ${tailscale}/bin/tailscale up \
+        --advertise-exit-node --exit-node \
+        -authkey tskey-auth-kfswm86CNTRL-QdFyL42rAhJDw7VZ2poVaJgDewQvmUu5K
+    '';
+        # this is an old authkey which I found (was used once, now it's landed here but long expired...). I'm adding an age secret instead, although it isn't used anymore...
+        # -authkey ${config.age.secrets.tailscale_authkey}
+  };
+
+
+  networking = {
+    hostName = "corrino";
+    domain = "emile.space";
+
+    # Network (Hetzner uses static IP assignments, and we don't use DHCP here)
+    useDHCP = false;
+    interfaces = {
+      "enp35s0" = {
+        ipv4.addresses = [
+          { address = "135.181.142.139"; prefixLength = 26; }
+        ];
+      };
+      "enp35s0".ipv6.addresses = [
+        { address = "2a01:4f9:3a:16a4::1"; prefixLength = 64; }
+      ];
+    };
+
+    defaultGateway = "135.181.142.129";
+    defaultGateway6 = { address = "fe80::1"; interface = "enp35s0"; };
+
+    nameservers = [ "8.8.8.8" "8.8.4.4" ];
+
+
+    firewall = {
+      enable = true;
+      allowedTCPPorts = [
+        80 443 # normal web
+      ];
+      allowedUDPPorts = [
+        51820 # wireguard
+      ];
+      allowedUDPPortRanges = [
+        { from = 60000; to = 61000; } # mosh
+      ];
+
+      interfaces."tailscale0".allowedTCPPorts = [
+        8085 # random internal web server port
+      ];
+    };
+
+    nat = {
+      enable = true;
+      enableIPv6 = true;
+      externalInterface = "enp35s0";
+      internalInterfaces = [ "wg0" ];
+    };
+
+    wireguard = {
+      enable = true;
+      interfaces."wg0" = {
+        ips = [ "10.87.0.1/24" ];
+        listenPort = 51820;
+        # This allows the wireguard server to route your traffic to the internet and hence be like a VPN
+        # For this to work you have to set the dnsserver IP of your router (or dnsserver of choice) in your clients
+        postSetup = ''
+          ${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.87.0.0/24 -o eth0 -j MASQUERADE
+        '';
+
+        # This undoes the above command
+        postShutdown = ''
+          ${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.87.0.0/24 -o eth0 -j MASQUERADE
+        '';
+
+        privateKeyFile = config.age.secrets.wireguard_privatekey.path;
+
+        peers = [
+          # List of allowed peers.
+          { # Emiles-MBA
+            publicKey = "Ebsjn7w2FeUs5lUN6ALoUcF/o9/+SopDL324YJPSCDY=";
+            # List of IPs assigned to this peer within the tunnel subnet. Used to configure routing.
+            allowedIPs = [ "10.87.0.2/32" ];
+          }
+          { # Emiles-IphoneX
+            publicKey = "xGfmwraI0Eh3eFEXjJrd2AYCgUM1uK4Y+FX5ACAQZ3M=";
+            # List of IPs assigned to this peer within the tunnel subnet. Used to configure routing.
+            allowedIPs = [ "10.87.0.3/32" ];
+          }
+        ];
+      };
+    };
+  };
+
+  # Initial empty root password for easy login:
+  users.users = {
+    root = {
+      initialHashedPassword = "";
+      openssh.authorizedKeys.keys = [
+        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPZi43zHEsoWaQomLGaftPE5k0RqVrZyiTtGqZlpWsew emile@caladan"
+      ];
+      packages = with pkgs; [
+        mdadm
+        tailscale
+
+        # random useful stuff
+        htop
+        git
+        vim
+        fd ripgrep
+      ];
+      extraGroups = [ "docker" "libvirtd" ];
+    };
+
+    hack = {
+      isNormalUser = true;
+      openssh.authorizedKeys.keys = [
+        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPZi43zHEsoWaQomLGaftPE5k0RqVrZyiTtGqZlpWsew emile@caladan"
+      ];
+      extraGroups = [ "docker" "libvirtd" ];
+    };
+
+    tmpuser1 = {
+      isNormalUser = true;
+      openssh.authorizedKeys.keys = [
+        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPZi43zHEsoWaQomLGaftPE5k0RqVrZyiTtGqZlpWsew emile@caladan"
+        # "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJMMq7gVuOuJEuarcsss2pb4JJS39zW/Fuow0foyqlV5 noobtracker@noobtracker-linux"
+      ];
+    };
+  };
+
+  services = {
+    openssh = {
+      settings = {
+        PermitRootLogin = "prohibit-password";
+        PasswordAuthentication = false;
+      };
+      enable = true;
+    };
+
+    nginx = {
+      enable = true;
+      recommendedGzipSettings = true;
+      recommendedOptimisation = true;
+      recommendedProxySettings = true;
+      recommendedTlsSettings = true;
+    };
+
+    tailscale = {
+      enable = true;
+
+      # use corrino as a subnet router and an exit node
+      useRoutingFeatures = "both";
+    };
+  };
+  
+  nix = {
+    settings.experimental-features = [ "nix-command" "flakes" ];
+
+    gc = {
+      automatic = true;
+      dates = "daily";
+      options = "--delete-older-than 7d";
+    };
+
+    optimise = {
+      automatic = true;
+      dates = [ "03:45" ];
+    };
+
+    # we need the below in order for hydra to be allowed to access the pages
+    extraOptions = ''
+      allowed-uris = ssh://gitea@git.emile.space git+https://git.emile.space https://git.emile.space https://portswigger-cdn.net https://git.sr.ht/ https://gitlab.com/simple-nixos-mailserver https://github.com/nixos/nixpkgs
+  		builders-use-substitutes = true
+    '';
+
+    buildMachines = [
+      {
+    	 hostName = "localhost";
+    	 system = "x86_64-linux";
+       protocol = "ssh-ng";
+    	 maxJobs = 1;
+    	 supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
+    	}
+      {
+    	 hostName = "caladan";
+    	 system = "aarch64-darwin";
+       protocol = "ssh-ng";
+    	 maxJobs = 1;
+    	 speedFactor = 2;
+    	 supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
+    	 mandatoryFeatures = [ ];
+    	}
+    ];
+
+  	distributedBuilds = true;
+  };
+
+  nixpkgs.config = {
+    allowUnfree = true;
+    permittedInsecurePackages = [
+      # none :D
+    ];
+  };
+
+  security = {
+    acme = {
+      acceptTerms = true;
+      defaults.email = "admin+acme@emile.space";
+    };
+  };
+
+  virtualisation = {
+    docker.enable = true;
+    # libvirtd = {
+    #   enable = true;
+    #   qemu = {
+    #     swtpm.enable = true;
+    #     ovmf.enable = true;
+    #     ovmf.packages = [ pkgs.OVMFFull.fd ];
+    #   };
+    # };
+    # spiceUSBRedirection.enable = true;
+  };
+
+  # programs.virt-manager.enable = true;
+
+  fileSystems."/proc" = {
+    device = "/proc";
+    options = [
+      "nosuid" "nodev" "noexec" "relatime" # normal foo
+      "hidepid=2" # this makes sure users can only see their own processes
+    ];
+  };
+
+  fileSystems."/mnt/storagebox-bx11" = {
+    device = "//u331921.your-storagebox.de/backup";
+    fsType = "cifs";
+    options =
+      let
+        automount_opts = "_netdev,x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
+      in ["${automount_opts},credentials=${config.age.secrets.storage_box_bx11_password.path}"];
+  };
+
+  # FIXME
+  # This value determines the NixOS release with which your system is to be
+  # compatible, in order to avoid breaking some software such as database
+  # servers. You should change this only after NixOS release notes say you
+  # should.
+  system.stateVersion = "22.11"; # Did you read the comment?
+}
diff --git a/nix/hosts/corrino/default.nix b/nix/hosts/corrino/default.nix
new file mode 100644
index 0000000..87486c5
--- /dev/null
+++ b/nix/hosts/corrino/default.nix
@@ -0,0 +1,3 @@
+{
+	sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFzoWTW3c7CKWx5t0OZzTfKTlC6R2VHXczVatgYI57N";
+}
diff --git a/nix/hosts/corrino/emile.space.nix b/nix/hosts/corrino/emile.space.nix
new file mode 100644
index 0000000..9cca880
--- /dev/null
+++ b/nix/hosts/corrino/emile.space.nix
@@ -0,0 +1,60 @@
+{
+  services.nginx.virtualHosts."emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    # kTLS = true;
+
+    locations = {
+      "/" = {
+        root = "/var/www/emile.space";
+        extraConfig = ''
+          add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+        ''; 
+      };
+
+      #"/.well-known" = {
+      #  root = "/var/www/emile.space";
+      #  extraConfig = ''
+      #    autoindex on;
+      #  '';
+      #};
+
+      ## I ran a matrix homeserver for some time, then stopped, but the other
+      ## homeserver don't know and don't stop sending me requests (5e5 a day or
+      ## so).
+      #"/.well-known/matrix/server".extraConfig = ''
+      #  return 410;
+      #'';
+    };
+  };
+
+  # services.stargazer = {
+  #   enable = true;
+  #   user = "stargazer";
+  #   group = "stargazer";
+
+  #   certLifetime = "1m";
+  #   store = /var/lib/gemini/certs;
+
+  #   genCerts = true;
+  #   regenCerts = true;
+  #   responseTimeout = 0;
+  #   requestTimeout = 5;
+
+  #   routes = [
+  #     {
+  #       route = "emile.space";
+  #       root = "/srv/gemini/emile.space";
+  #     }
+  #   ];
+
+  #   listen = [ "0.0.0.0" "[2002:a00:1::]" ];
+
+  #   ipLogPartial = false;
+  #   ipLog = false;
+  #   connectionLogging = false;
+
+  #   certOrg = "emile.space";
+  # };
+}
diff --git a/nix/hosts/corrino/gemini/emile.space.nix b/nix/hosts/corrino/gemini/emile.space.nix
new file mode 100644
index 0000000..f7116ae
--- /dev/null
+++ b/nix/hosts/corrino/gemini/emile.space.nix
@@ -0,0 +1,16 @@
+{ ... }:
+
+{
+  services.agate = {
+    # TODO: fix link generation in vokobe
+    enable = true;
+    contentDir = "/var/www/emile.space";
+    hostnames = [
+      "emile.space"
+    ];
+    addresses = [
+      "0.0.0.0:1965"
+    ];
+  };
+  networking.firewall.allowedTCPPorts = [ 1965 ];
+}
diff --git a/nix/hosts/corrino/hardware-configuration.nix b/nix/hosts/corrino/hardware-configuration.nix
new file mode 100644
index 0000000..b4e8c1e
--- /dev/null
+++ b/nix/hosts/corrino/hardware-configuration.nix
@@ -0,0 +1,39 @@
+
+	# Do not modify this file!  It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations.  Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+  imports =
+    [ (modulesPath + "/installer/scan/not-detected.nix")
+    ];
+
+  boot.initrd.availableKernelModules = [ "ahci" "nvme" ];
+  boot.initrd.kernelModules = [ "dm-snapshot" ];
+  boot.kernelModules = [ "kvm-amd" ];
+  boot.extraModulePackages = [ ];
+
+  fileSystems."/" =
+    { device = "/dev/disk/by-uuid/4d372699-9d47-44bf-a68e-eeb126fb7ad6";
+      fsType = "ext4";
+    };
+
+  fileSystems."/boot" =
+    { device = "/dev/disk/by-uuid/726db4ba-5b90-47e2-b924-72623f02585a";
+      fsType = "ext4";
+    };
+
+  swapDevices = [ ];
+
+  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+  # (the default) this is the recommended approach. When using systemd-networkd it's
+  # still possible to use this option, but it's recommended to use it in conjunction
+  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+  networking.useDHCP = lib.mkDefault true;
+  # networking.interfaces.eth0.useDHCP = lib.mkDefault true;
+
+  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+  powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
+  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/nix/hosts/corrino/secrets/factorio_password.age b/nix/hosts/corrino/secrets/factorio_password.age
new file mode 100644
index 0000000..7f02410
--- /dev/null
+++ b/nix/hosts/corrino/secrets/factorio_password.age
Binary files differdiff --git a/nix/hosts/corrino/secrets/grafana_admin_password.age b/nix/hosts/corrino/secrets/grafana_admin_password.age
new file mode 100644
index 0000000..52fb988
--- /dev/null
+++ b/nix/hosts/corrino/secrets/grafana_admin_password.age
@@ -0,0 +1,9 @@
+age-encryption.org/v1
+-> ssh-ed25519 gvwQ2Q SSBiaII5ILPTF1He6qWvze7l8CpnPVFa63m8TCXRsmw
+s4ey6wROQcE3VTw6zGlsg5sK7Zgw0JXIgjX8DHRGlQc
+-> ssh-ed25519 m8VklA T1KaNA2bHqTNtXgb3MxkuavpOR9lmvhNQjHK8V3sc04
+PIHSYhLHAC+JBUEQpCVb6C9CYOPCsJtzu9iQ0xGcg1U
+-> pV-grease
+oIQ
+--- XSICvGbcTxVppwbDi7vH/CUEPxd6pHfL005t7t9J0jc
+!PYoi]*.9HE8z@gk]`8K60v3[dj5x
\ No newline at end of file
diff --git a/nix/hosts/corrino/secrets/grafana_database_password.age b/nix/hosts/corrino/secrets/grafana_database_password.age
new file mode 100644
index 0000000..69d76d9
--- /dev/null
+++ b/nix/hosts/corrino/secrets/grafana_database_password.age
@@ -0,0 +1,11 @@
+age-encryption.org/v1
+-> ssh-ed25519 gvwQ2Q FrSCB6WTRKb54AGqjFeIDv62uxFT1HvXFQ22BVzwGR0
+/MplLgIhHZJdg+jXn+w3bSs0MyJUXEz+SxWcN/lYngM
+-> ssh-ed25519 m8VklA 8D9irb+/PKIWFhm/YRpJ5Fd7Gne1ie8Y9XxZj36WtBY
+/V30odo5GRJSgigbUZ8ngT1H8Akm3VzUM399RcBcyC8
+-> Iv)bM-grease :v "isNt%u 8W][}
+Slv5G4yrVQ94QVVU4qDo/cYCohRBSxAJdE0IuZMZTbqoc/BOJ7cLuUKNC3l8V0Fg
+pUbO
+--- iyg9ZkWkjQBrUUdG+mV5NlQW9l2F7NeCyOitAf6Ggb4
+6!{J
|c}(4m^,\-w 
+AV7~Sb]/O'L`+*
\ No newline at end of file
diff --git a/nix/hosts/corrino/secrets/grafana_secret_key.age b/nix/hosts/corrino/secrets/grafana_secret_key.age
new file mode 100644
index 0000000..b76483e
--- /dev/null
+++ b/nix/hosts/corrino/secrets/grafana_secret_key.age
@@ -0,0 +1,9 @@
+age-encryption.org/v1
+-> ssh-ed25519 gvwQ2Q RTJU0rMUPybqjF0DpYvb74/xvmmybM3gVXqzwGgqzxs
+QtuBSKXrbZPfqkkKQdarK9i1R5ykxJ0shmK7OCutpPY
+-> ssh-ed25519 m8VklA 2/9r5xZ9Ta/4PO0LvoerlXANl/k58s1eq8QlUuOPrjA
+pS0Q+rRnBdzrEJVYRhua/PkHRGi6xmiMQQZDXYdntKY
+-> -MxO/.cF-grease Xm7e:5
+d6qhrhkhcqjBj4bSsBT1qqxoG/PUKKjZJ4V2QcHBwi57NwtbD4mktKTMfWai
+--- cc8nZhs0oc2YDB0mvAnrQe0Drg5xi1vy0Qx8dm/5AWg
+!f+P"j=3Ib'H@ZPyuN=mZaj<!~=
\ No newline at end of file
diff --git a/nix/hosts/corrino/secrets/grafana_smtp_password.age b/nix/hosts/corrino/secrets/grafana_smtp_password.age
new file mode 100644
index 0000000..dd27bc4
--- /dev/null
+++ b/nix/hosts/corrino/secrets/grafana_smtp_password.age
@@ -0,0 +1,10 @@
+age-encryption.org/v1
+-> ssh-ed25519 gvwQ2Q 4bKX/wv0cMPXZzRJM8LqNw7F1GoYUwJh8AlALIQkqgY
+xYPghPguhfrXKPq1EBwEZWV/imO1ZI6taj1WIbQ8JqU
+-> ssh-ed25519 m8VklA NBPHb4cZeJ9wFZQyUu0ikWLoO1RlXkEz6LOMqzhnfRQ
+/2//XHuIxlVk4klgYPBdXSWpa4cIpfsRHE7duXJ3P0s
+-> P_YApO--grease s" PT MLCA Hz{}~
+brb+DX4hyKS2Pckyt6UC5yAD4mCfufypzNkRYw70adWlp+YEXA
+--- jt3ZEMFoOlikvQD/4XxoD5l8jyrg7f2UtzfMuBOj/tY
+K_u8w'o#%b.dP9_g955RVPDŻC3;vΚZ
+C!7%t*SȒ:t
\ No newline at end of file
diff --git a/nix/hosts/corrino/secrets/magic-hash-flag.age b/nix/hosts/corrino/secrets/magic-hash-flag.age
new file mode 100644
index 0000000..e0a56b4
--- /dev/null
+++ b/nix/hosts/corrino/secrets/magic-hash-flag.age
@@ -0,0 +1,10 @@
+age-encryption.org/v1
+-> ssh-ed25519 gvwQ2Q 82J5AdcqPHQ9uUNFmiRLHNhXUm/Npwee2NssXBmW2hE
+FUjeBE4LFw1u7jfHyrONEMJUMsDlzU06ghhzOaIq2t8
+-> ssh-ed25519 m8VklA o0t4X6iD7QN69F5DBTkxHDLvtKjOCHVHbas1a2WLfGI
+mfKoJBja+ZuJzPyfdlRXl6hsiUF1d5OmIx3MXwd6Kjw
+-> beyszd-grease ^PZ
+Y+VrEhNbCrjAxVvGIlTsh73ojA9eQms4hbl5RzTf4Ykx3k10lrq1kXGVIt1c1G0+
+1ljVNk7mCQ1+YbudED68Vsz1rhA/3gxcd+5hdIQZPFkbQ4y6
+--- RA3DdqkgplKJhsClt14A7zEZiga/s9+l/V5/rC9II80
+SA/<‡	OS[QEݒ(ÌT7[?yu	R?w+Q4\m&٧GťԌzy]*"&q%
\ No newline at end of file
diff --git a/nix/hosts/corrino/secrets/mail_password.age b/nix/hosts/corrino/secrets/mail_password.age
new file mode 100644
index 0000000..5601304
--- /dev/null
+++ b/nix/hosts/corrino/secrets/mail_password.age
@@ -0,0 +1,7 @@
+age-encryption.org/v1
+-> ssh-ed25519 gvwQ2Q DNAJBlZ9d46k703peMMsEVTRvCGfGOJ0VnchUb8dsl4
+xN3l7wkznSCThKVXsic0ix9mSB510w1AFCH3taZIUlk
+-> ssh-ed25519 gvwQ2Q BO6dxNpeWETkukjpD5g+U3tlHnLIPknb4+emb6cfACQ
+j4VYw1trP0rPtSQRYO7nBYyYNkaAbUO3oh1WbPKT6eg
+--- sB9tKpo8a5RT3eam8Cyejdg0Kg66YvSmoY+bQtSpCvk
+o@+@pqǼ\OY8XH[9f<=.mFZ
7!>iH>I=~fu}]Oڬ2
\ No newline at end of file
diff --git a/nix/hosts/corrino/secrets/netbox_secret.age b/nix/hosts/corrino/secrets/netbox_secret.age
new file mode 100644
index 0000000..8f24203
--- /dev/null
+++ b/nix/hosts/corrino/secrets/netbox_secret.age
@@ -0,0 +1,11 @@
+age-encryption.org/v1
+-> ssh-ed25519 gvwQ2Q qEh2F+z0JcOwGITW2vwI+pCc0gEX5bArBkJ2+tUsORc
+gHGoC7aE6KGQFxxQ/vXle0H8VMfeHuV6iRWCZZx977Q
+-> ssh-ed25519 m8VklA wdnUaCTsF+GvQNPViRTOEfc9ytlsrwGXSvi43+288kg
+qxJsSryGAnFyDPrraVjSH29GlgiSsonvg+VM8EpDZ7k
+-> y1&ZO-grease t x I>Fl(`}
+6pzix/Gj077lu+LBkaoWN987JuYbOF2fzpAT3oIi65NTK22yjn063E1k2Utkb6vq
+J4hcpDXKRHpdUE9mor7k7kS3Mwlt4aQrudmJ2I1bZIy/pox6gcICafokmsAeZODR
+vw
+--- wi8HjK7ujilpSz4d3A3velISw+J8oiSVJk0JvKPb21k
+>ǪUNK輋'xC>ccr5FJ*hmeL/42
L>&[ގ&N(4Ow:\P\B
\ No newline at end of file
diff --git a/nix/hosts/corrino/secrets/photoprism_password.age b/nix/hosts/corrino/secrets/photoprism_password.age
new file mode 100644
index 0000000..4b0ad76
--- /dev/null
+++ b/nix/hosts/corrino/secrets/photoprism_password.age
@@ -0,0 +1,9 @@
+age-encryption.org/v1
+-> ssh-ed25519 gvwQ2Q KdqNkMZUY5J1JRtoQ2KFgMafkcG29UM+uNXZSlmbji0
+FsDbzx0zMNQ3lGIm2JmmAf7b8h+qbeOG0QRPRP+ighs
+-> ssh-ed25519 m8VklA 9X1J6AOCzhhVYAJiMB9hWWOWf2eLVDUkHXxOj8UvbHo
+e2R2ICTBOiKOO392NkoOQSBlJLiQA+H18dJRIrjtSUQ
+-> movYQ$-grease zm=!&Kz
+rbksk8Roi2pC/P4b
+--- +WxRRQ9MlQlp6zdJJhrbdM0k1YJrRlWgpHF9uuvmTko
+8kWM[w=-qW^LhDTAU%z!eqɊ&dn",g@B]<pv~8?4sr-T
\ No newline at end of file
diff --git a/nix/hosts/corrino/secrets/pretix.age b/nix/hosts/corrino/secrets/pretix.age
new file mode 100644
index 0000000..4be5d7c
--- /dev/null
+++ b/nix/hosts/corrino/secrets/pretix.age
Binary files differdiff --git a/nix/hosts/corrino/secrets/pretix_postgres_pw.age b/nix/hosts/corrino/secrets/pretix_postgres_pw.age
new file mode 100644
index 0000000..822b221
--- /dev/null
+++ b/nix/hosts/corrino/secrets/pretix_postgres_pw.age
@@ -0,0 +1,9 @@
+age-encryption.org/v1
+-> ssh-ed25519 gvwQ2Q brYZ6kTQTDViC7girn6bcdKYBW6JAKHDtRe8CpPhJkw
+HQCJSPZ0ZUG5LeoCEatTMBBVlQ/p33cWsR2HzPXKAf8
+-> ssh-ed25519 m8VklA YTjOBL2U7dsnW2Gvu/Hbd6MFtoA9//uhBGCb7aXYzno
+oG67Syidm5PeTahPLm7vRzm147tUvU8U3WGA2Ej/zOA
+-> fD[[4QR-grease 1'8$Jt +^, Q+F:D(p Ks
+64cLnDft3WoVEE5AfxgIkdY
+--- z2zfa+/k3RtxoRfJyiEV6j7HMUgLOog697UART4Mio4
+h]PTNl:1Żl)3䣈4(H[zQؤ۠&
\ No newline at end of file
diff --git a/nix/hosts/corrino/secrets/storage_box_bx11_password.age b/nix/hosts/corrino/secrets/storage_box_bx11_password.age
new file mode 100644
index 0000000..a02a210
--- /dev/null
+++ b/nix/hosts/corrino/secrets/storage_box_bx11_password.age
@@ -0,0 +1,7 @@
+age-encryption.org/v1
+-> ssh-ed25519 gvwQ2Q wKf98LIfuGnY5Tz0SDT4BF1RhU44BrGOoHEd7p0AGgY
+DX/MAYTMp1MxXJaFN8R6crggEyhCIb+apdKJ27YnwRw
+-> ssh-ed25519 m8VklA 4hvYcyt/NuIq7fH7nWq7vnYeeGDDDwok0njyb53e+ys
+SOEU0i6khudr5n16QyH+zlIXka2btCGNDGFi1ccIZlI
+--- +2ZDWzJj8rqh0oAnVz1L46qHnepK3oR7epAhJ1Z7jFs
+G2$#=0.hac\'*fZ,;9v\'aUSڠ{E4lۓÕ"ZadAVi2Y7e|qױ
\ No newline at end of file
diff --git a/nix/hosts/corrino/secrets/tailscale_authkey.age b/nix/hosts/corrino/secrets/tailscale_authkey.age
new file mode 100644
index 0000000..8102f1a
--- /dev/null
+++ b/nix/hosts/corrino/secrets/tailscale_authkey.age
Binary files differdiff --git a/nix/hosts/corrino/secrets/wireguard_privatekey.age b/nix/hosts/corrino/secrets/wireguard_privatekey.age
new file mode 100644
index 0000000..b92fbe5
--- /dev/null
+++ b/nix/hosts/corrino/secrets/wireguard_privatekey.age
Binary files differdiff --git a/nix/hosts/corrino/ssh.pub b/nix/hosts/corrino/ssh.pub
new file mode 100644
index 0000000..73387ce
--- /dev/null
+++ b/nix/hosts/corrino/ssh.pub
@@ -0,0 +1 @@
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFzoWTW3c7CKWx5t0OZzTfKTlC6R2VHXczVatgYI57N
diff --git a/nix/hosts/corrino/www/cs.emile.space.nix b/nix/hosts/corrino/www/cs.emile.space.nix
new file mode 100644
index 0000000..de4d67e
--- /dev/null
+++ b/nix/hosts/corrino/www/cs.emile.space.nix
@@ -0,0 +1,56 @@
+# Run sourcegraph, including its entire machinery, in a container.
+# Running it outside of a container is a futile endeavour for now.
+
+# adapted from https://cs.tvl.fyi/depot/-/blob/ops/modules/sourcegraph.nix
+
+{ ... }:
+
+{
+  services.nginx.virtualHosts."cs.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        proxyPass = "http://127.0.0.1:3463";
+
+        extraConfig = ''
+          location = / {
+            return 301 https://cs.emile.space/hefe;
+          }
+
+          location / {
+            proxy_set_header X-Sg-Auth "Anonymous";
+            proxy_pass http://localhost:7080;
+          }
+
+          location /users/Anonymous/settings {
+            return 301 https://cs.emile.space;
+          }
+        '';
+      };
+    };
+  };
+
+  virtualisation.oci-containers.backend = "docker";
+  virtualisation.oci-containers.containers.sourcegraph = {
+    image = "sourcegraph/server:5.1.1";
+
+    ports = [
+      "127.0.0.1:3463:7080"
+    ];
+
+    volumes = [
+      "/var/lib/sourcegraph/etc:/etc/sourcegraph"
+      "/var/lib/sourcegraph/data:/var/opt/sourcegraph"
+    ];
+
+    # Sourcegraph needs a higher nofile limit, it logs warnings
+    # otherwise (unclear whether it actually affects the service).
+    extraOptions = [
+      "--ulimit"
+      "nofile=10000:10000"
+    ];
+  };
+}
+
diff --git a/nix/hosts/corrino/www/ctf.emile.space.nix b/nix/hosts/corrino/www/ctf.emile.space.nix
new file mode 100644
index 0000000..c4de8c5
--- /dev/null
+++ b/nix/hosts/corrino/www/ctf.emile.space.nix
@@ -0,0 +1,26 @@
+{ ... }:
+
+{
+  services.nginx.virtualHosts."ctf.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        proxyPass = "http://127.0.0.1:8338";
+      };
+    };
+  };
+
+  virtualisation.oci-containers = {
+    backend = "docker";
+    containers = {
+      "ctfd" = {
+        image = "ctfd/ctfd";
+        ports = [
+          "8338:8000"
+        ];
+      };
+    };
+  };
+}
diff --git a/nix/hosts/corrino/www/emile.space.nix b/nix/hosts/corrino/www/emile.space.nix
new file mode 100644
index 0000000..9cca880
--- /dev/null
+++ b/nix/hosts/corrino/www/emile.space.nix
@@ -0,0 +1,60 @@
+{
+  services.nginx.virtualHosts."emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    # kTLS = true;
+
+    locations = {
+      "/" = {
+        root = "/var/www/emile.space";
+        extraConfig = ''
+          add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+        ''; 
+      };
+
+      #"/.well-known" = {
+      #  root = "/var/www/emile.space";
+      #  extraConfig = ''
+      #    autoindex on;
+      #  '';
+      #};
+
+      ## I ran a matrix homeserver for some time, then stopped, but the other
+      ## homeserver don't know and don't stop sending me requests (5e5 a day or
+      ## so).
+      #"/.well-known/matrix/server".extraConfig = ''
+      #  return 410;
+      #'';
+    };
+  };
+
+  # services.stargazer = {
+  #   enable = true;
+  #   user = "stargazer";
+  #   group = "stargazer";
+
+  #   certLifetime = "1m";
+  #   store = /var/lib/gemini/certs;
+
+  #   genCerts = true;
+  #   regenCerts = true;
+  #   responseTimeout = 0;
+  #   requestTimeout = 5;
+
+  #   routes = [
+  #     {
+  #       route = "emile.space";
+  #       root = "/srv/gemini/emile.space";
+  #     }
+  #   ];
+
+  #   listen = [ "0.0.0.0" "[2002:a00:1::]" ];
+
+  #   ipLogPartial = false;
+  #   ipLog = false;
+  #   connectionLogging = false;
+
+  #   certOrg = "emile.space";
+  # };
+}
diff --git a/nix/hosts/corrino/www/events.emile.space.nix b/nix/hosts/corrino/www/events.emile.space.nix
new file mode 100644
index 0000000..bb4db38
--- /dev/null
+++ b/nix/hosts/corrino/www/events.emile.space.nix
@@ -0,0 +1,59 @@
+{ ... }:
+
+{
+  services.nginx.virtualHosts."events.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        extraConfig = ''
+          proxy_pass http://[::1]:4000;
+        '';
+      };
+    };
+  };
+
+  # Create users:
+  #
+  # go into the mobilizon-launchers directory within the nix store (systemctl
+  # status mobilizon..., you'll find it there somehow)
+  #
+  # ; sudo -u mobilizon ./bin/mobilizon_ctl users.new emile@emile.space --moderator --admin
+
+  services = {
+    mobilizon = {
+      enable = true;
+      settings.":mobilizon" = {
+        "Mobilizon.Web.Endpoint" = {
+          url.host = "events.emile.space";
+          http.port = 4000;
+
+          # The IP address to listen on. Defaults to [::1] notated as a byte
+          # tuple.
+          # (Yes, this is an elexir application and they've mapped the type system
+          # into nix)
+          http.ip = {
+            _elixirType = "tuple";
+            value = [ 0 0 0 0 0 0 0 1 ];
+          };
+
+          has_reverse_proxy = true;
+        };
+
+        "Mobilizon.Storage.Repo" = {
+          username = "mobilizon";
+          socket_dir = "/var/run/postgresql";
+          database = "mobilizon_prod";
+        };
+
+        ":instance" = rec {
+          name = "events.emile.space";
+          hostname = "emile.space";
+          email_reply_to = email_from;
+          email_from = "noreply@$emile.space";
+        };
+      };
+    };
+  };
+}
diff --git a/nix/hosts/corrino/www/git.emile.space.nix b/nix/hosts/corrino/www/git.emile.space.nix
new file mode 100644
index 0000000..2c7d64e
--- /dev/null
+++ b/nix/hosts/corrino/www/git.emile.space.nix
@@ -0,0 +1,73 @@
+{ pkgs, config, ... }:
+
+let
+  cfg = config.services.gitea;
+in {
+  services.nginx.virtualHosts."git.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        proxyPass = "http://127.0.0.1:3000";
+      };
+    };
+  };
+
+  services.gitea = rec {
+    enable = true;
+
+    appName = "git.emile.space";
+
+    # unstable in order to use the 1.20... version
+    #package = pkgs.forgejo;
+    package = pkgs.unstable.forgejo;
+
+    stateDir = "/var/lib/gitea";
+    repositoryRoot = "${stateDir}/repositories";
+
+    settings = {
+      service.DISABLE_REGISTRATION = true;
+
+      DEFAULT = {
+        WORK_PATH = "/var/lib/gitea";
+      };
+
+      server = {
+        DOMAIN = pkgs.lib.mkForce "git.emile.space";
+        ROOT_URL = pkgs.lib.mkForce "https://git.emile.space";
+
+        #START_SSH_SERVER = true;
+        BUILTIN_SSH_SERVER_USER = "git";
+        SSH_USER = "gitea";
+        SSH_DOMAIN = "git.emile.space";
+
+        REPO_INDEXER_ENABLED = true;
+      };
+
+      indexer = {
+        REPO_INDEXER_ENABLED = true;
+        ISSUE_INDEXER_PATH = "${stateDir}/indexers/issues.bleve";
+        REPO_INDEXER_PATH = "${stateDir}/indexers/repos.bleve";
+        MAX_FILE_SIZE = 1048576;
+        REPO_INDEXER_INCLUDE = "";
+        REPO_INDEXER_EXCLUDE = "resources/bin/**";
+      };
+
+      #federation = {
+      #  enable = true;
+      #  share_user_statistics = true;
+      #  max_size = 4;
+      #};
+    };
+  };
+
+  users.users.git = {
+    isSystemUser = true;
+    useDefaultShell = true;
+    group = "git";
+    extraGroups = [ "gitea" ];
+    home = cfg.stateDir;
+  };
+  users.groups.git = { };
+}
diff --git a/nix/hosts/corrino/www/grafana.emile.space.nix b/nix/hosts/corrino/www/grafana.emile.space.nix
new file mode 100644
index 0000000..0f73147
--- /dev/null
+++ b/nix/hosts/corrino/www/grafana.emile.space.nix
@@ -0,0 +1,217 @@
+{ config, ... }:
+
+{
+  services = {
+    nginx.virtualHosts."grafana.emile.space" = {
+      addSSL = true;
+      enableACME = true;
+      locations."/" = {
+          proxyPass = "http://${toString config.services.grafana.settings.server.http_addr}:${toString config.services.grafana.settings.server.http_port}/";
+          proxyWebsockets = true;
+      };
+    };
+
+    grafana = {
+      enable = true;
+      settings = {
+        server = {
+          http_addr = "127.0.0.1";
+          http_port = 3002;
+          domain = "grafana.emile.space";
+          root_url = "https://grafana.emile.space/";
+        };
+      };
+
+      provision = {
+        datasources = {
+          settings = {
+            datasources = [
+              {
+                url = "http://localhost:${toString config.services.prometheus.port}";
+                type = "prometheus";
+                name = "Prometheus";
+                editable = false;
+                access = "proxy"; # server = "proxy", browser = "direct"
+              }
+              {
+                name = "loki";
+                url = "http://localhost:${toString config.services.loki.configuration.server.http_listen_port}";
+                type = "loki";
+              }
+            ];
+          };
+        };
+      };
+    };
+
+    prometheus = {
+      enable = true;
+      retentionTime = "356d";
+      port = 9003;
+
+      exporters = {
+        node = {
+          enable = true;
+          enabledCollectors = [ "systemd" ];
+          port = 9002;
+        };
+      };
+      scrapeConfigs = [
+        {
+          job_name = "corrino";
+          static_configs = [{
+            targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
+          }];
+        }
+      ];
+    };
+
+    loki = {
+      enable = true;
+      configuration = {
+        auth_enabled = false;
+        server = {
+          http_listen_port = 9004;
+        };
+
+        limits_config = {
+          reject_old_samples = true;
+          reject_old_samples_max_age = "7d";
+          max_global_streams_per_user = 100000;
+        };
+
+        common = {
+          instance_addr = "127.0.0.1";
+          ring = {
+            instance_addr = "127.0.0.1";
+            kvstore.store = "inmemory";
+          };
+          replication_factor = 1;
+          path_prefix = "/tmp/loki";
+        };
+
+        schema_config.configs = [{
+          from = "2023-05-09";
+          store = "boltdb-shipper";
+          object_store = "filesystem";
+          schema = "v11";
+          index = {
+            prefix = "index_";
+            period = "24h";
+          };
+        }];
+      };
+    };
+  };
+
+  # allow the promtail user to read the nginx access files
+  users.users.promtail.extraGroups = [ "nginx" ];
+
+  services = {
+    promtail = {
+      enable = true;
+      configuration = {
+        server = {
+          http_listen_port = 9005;
+          grpc_listen_port = 0;
+        };
+        positions.filename = "/tmp/positions.yml";
+        clients = [{
+          url = "http://localhost:${toString config.services.loki.configuration.server.http_listen_port}/loki/api/v1/push";
+        }];
+        scrape_configs = [
+
+          # systemd
+          {
+            job_name = "journal";
+            journal = {
+              max_age = "12h";
+              labels = {
+                job = "systemd-journal";
+                host = config.networking.hostName;
+              };
+            };
+            relabel_configs = [
+              {
+                source_labels = [ "__journal__systemd_unit" ];
+                target_label = "unit";
+              }
+            ];
+          }
+
+          # nginx error log
+          {
+            job_name = "nginx-error-logs";
+            static_configs = [{
+              targets = [ "localhost" ];
+              labels = {
+                job = "nginx-error-logs";
+                host = "corrino";
+                __path__ = "/var/log/nginx/*error.log";
+              };
+            }];
+          }
+
+          # nginx
+          {
+            job_name = "nginx";
+            static_configs = [
+              {
+                targets = [ "localhost" ];
+                labels = {
+                  job = "nginx";
+                  host = "corrino";
+                  __path__ = "/var/log/nginx/*access.log";
+                };   
+              }
+            ];
+            pipeline_stages = [
+              # {
+              #   regex = {
+              #     expression = "(?:[0-9]{1,3}\.){3}([0-9]{1,3})";
+              #     replace = "***";
+              #   };
+              # }
+              {
+                regex = {
+                  expression = ''(?P<remote_addr>.+) - - \[(?P<time_local>.+)\] "(?P<method>.+) (?P<url>.+) (HTTP\/(?P<version>\d.\d))" (?P<status>\d{3}) (?P<body_bytes_sent>\d+) (["](?P<http_referer>(\-)|(.+))["]) (["](?P<http_user_agent>.+)["])'';
+                };
+              }
+              {
+                labels = {
+                  remote_addr = null;
+                  time_local = null;
+                  method = null;
+                  url = null;
+                  status = null;
+                  body_bytes_sent = null;
+                  http_referer = null;
+                  http_user_agent = null;
+                };
+              }
+              # {
+              #   timestamp = {
+              #     source = "time_local";
+              #     format = "02/Jan/2006:15:04:05 -0700";
+              #   };
+              # }
+              {
+                drop = {
+                  source = "url";
+                  expression = ''/(_matrix|.well-known|notifications|api|identity).*'';
+                };
+              }
+              {
+                drop = {
+                  source = "url";
+                  expression = ''grafana.*'';
+                };
+              }
+            ];
+          }
+
+        ];
+      };
+    };
+  };
+}
\ No newline at end of file
diff --git a/nix/hosts/corrino/www/grafana_full.emile.space.nix b/nix/hosts/corrino/www/grafana_full.emile.space.nix
new file mode 100644
index 0000000..8a9aa02
--- /dev/null
+++ b/nix/hosts/corrino/www/grafana_full.emile.space.nix
@@ -0,0 +1,440 @@
+{ pkgs, config, ... }:
+
+let
+  cfg = config.services.grafana;
+in {
+  services.nginx.virtualHosts."git.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        proxyPass = "http://127.0.0.1:3000";
+      };
+    };
+  };
+
+  services = {
+    grafana = {
+      enable = true;
+      package = pkgs.grafana;
+      #declarativePlugins = with pkgs.grafanaPlugins; [
+      #  grafana-piechart-panel
+      #];
+      dataDir = "/var/lib/grafana";
+
+      settings = {
+        users = {
+          # Viewers can access and use Explore and perform temporary edits on panels in dashboards they have access to. They cannot save their changes.
+          viewers_can_edit = true;
+
+          # Require email validation before sign up completes
+          verify_email_enabled = false;
+
+          # The duration in time a user invitation remains valid before expiring. This setting should be expressed as a duration. Examples: 6h (hours), 2d (days), 1w (week). The minimum supported duration is 15m (15 minutes).
+          user_invite_max_lifetime_duration = "24h";
+
+          # Text used as placeholder text on login page for password input.
+          password_hint = "password";
+
+          # Text used as placeholder text on login page for login/username input.
+          login_hint = "email or username";
+
+          # Path to a custom home page. Users are only redirected to this if the default home dashboard is used. It should match a frontend route and contain a leading slash.
+          home_page = "";
+
+          # This is a comma-separated list of usernames. Users specified here are hidden in the Grafana UI. They are still visible to Grafana administrators and to themselves.
+          hidden_users = "";
+
+          # Editors can administrate dashboards, folders and teams they create.
+          editors_can_admin = false;
+
+          # Sets the default UI theme. system matches the user’s system theme.
+          default_theme = "system";
+
+          # This setting configures the default UI language, which must be a supported IETF language tag, such as en-US.
+          default_language = "en-US";
+
+          # The role new users will be assigned for the main organization (if the auto_assign_org setting is set to true).
+          # one of "Viewer", "Editor", "Admin"
+          auto_assign_org_role = "Viewer";
+
+          # Set this value to automatically add new users to the provided org. This requires auto_assign_org to be set to true. Please make sure that this organization already exists.
+          auto_assign_org_id = 1;
+
+          # Set to true to automatically add new users to the main organization (id 1). When set to false, new users automatically cause a new organization to be created for that new user. The organization will be created even if the allow_org_create setting is set to false.
+          auto_assign_org = true;
+
+          # Set to false to prohibit users from being able to sign up / create user accounts. The admin user can still create users.
+          allow_sign_up = false;
+
+          # Set to false to prohibit users from creating new organizations.
+          allow_org_create = false; 
+        };
+
+        smtp = {
+          # User used for authentication.
+          user = "mail";
+
+          # StartTLS policy when connecting to server.
+          # null or one of "OpportunisticStartTLS", "MandatoryStartTLS", "NoStartTLS"
+          startTLS_policy = null;
+        
+          # Verify SSL for SMTP server.
+          skip_verify = false;
+
+        # Password used for authentication. Please note that the contents of this option will end up in a world-readable Nix store. Use the file provider pointing at a reasonably secured file in the local filesystem to work around that. Look at the documentation for details: https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#file-provider
+          password = "";
+
+          # File path to a key file.
+          key_file = "$__file{${config.age.secrets.grafana_smtp_password.path}}";
+
+          # Host to connect to.
+          host = "localhost:25";
+
+          # Name to be used as client identity for EHLO in SMTP dialog.
+          from_name = "Grafana";
+
+          # Address used when sending out emails
+          from_address = "admin@grafana.localhost";
+
+          # Whether to enable SMTP
+          enabled = true;
+
+          # Name to be used as client identity for EHLO in SMTP dialog
+          ehlo_identity = null;
+
+          # File path to a cert file
+          cert_file = null;
+        };
+        server = {
+          # Root path for static assets.
+          #static_root_path = "${package}/share/grafana/public";
+
+          # Mode where the socket should be set when protocol=socket. Make sure that Grafana process is the file owner before you change this setting.
+          socket_mode = "0660";
+
+          # GID where the socket should be set when protocol=socket. Make sure that the target group is in the group of Grafana process and that Grafana process is the file owner before you change this setting. It is recommended to set the gid as http server user gid. Not set when the value is -1.
+          socket_gid = -1;
+
+          # Path where the socket should be created when protocol=socket. Make sure that Grafana has appropriate permissions before you change this setting.
+          socket = "/run/grafana/grafana.sock";
+
+          # Serve Grafana from subpath specified in the root_url setting. By default it is set to false for compatibility reasons.
+          # 
+          # By enabling this setting and using a subpath in root_url above, e.g. root_url = "http://localhost:3000/grafana", Grafana is accessible on http://localhost:3000/grafana. If accessed without subpath, Grafana will redirect to an URL with the subpath.
+          serve_from_sub_path = false;
+
+          # Set to true for Grafana to log all HTTP requests (not just errors). These are logged as Info level events to the Grafana log.
+          router_logging = false;
+
+          # This is the full URL used to access Grafana from a web browser. This is important if you use Google or GitHub OAuth authentication (for the callback URL to be correct).
+          # 
+          # This setting is also important if you have a reverse proxy in front of Grafana that exposes it through a subpath. In that case add the subpath to the end of this URL setting.
+          root_url = "%(protocol)s://%(domain)s:%(http_port)s/";
+
+          # Sets the maximum time using a duration format (5s/5m/5ms) before timing out read of an incoming request and closing idle connections. 0 means there is no timeout for reading the request.
+          read_timeout = 0;
+
+          # Which protocol to listen.
+          # one of "http", "https", "h2", "socket"
+          protocol = "http";
+
+          # Listening port.
+          http_port = "3000";
+
+          # Listening address.
+          # This setting intentionally varies from upstream’s default to be a bit more secure by default.
+          http_addr = "127.0.0.1";
+
+          # Redirect to correct domain if the host header does not match the domain. Prevents DNS rebinding attacks.
+          enforce_domain = true;
+
+          # Set this option to true to enable HTTP compression, this can improve transfer speed and bandwidth utilization. It is recommended that most users set it to true. By default it is set to false for compatibility reasons.
+          enable_gzip = true;
+
+          # The public facing domain name used to access grafana from a browser.
+          # This setting is only used in the default value of the root_url setting. If you set the latter manually, this option does not have to be specified.
+          domain = "grafana.emile.space";
+
+          # Path to the certificate key file (if protocol is set to https or h2).
+          cert_key = null;
+
+          # Path to the certificate file (if protocol is set to https or h2).
+          cert_file = null;
+
+          # Specify a full HTTP URL address to the root of your Grafana CDN assets. Grafana will add edition and version paths.
+          # 
+          # For example, given a cdn url like https://cdn.myserver.com grafana will try to load a javascript file from http://cdn.myserver.com/grafana-oss/7.4.0/public/build/app.<hash>.js.
+          cdn_url = null;
+        };
+
+        security = {
+          # Set to false to disable the X-XSS-Protection header, which tells browsers to stop pages from loading when they detect reflected cross-site scripting (XSS) attacks.
+          x_xss_protection = true;
+
+          # Set to false to disable the X-Content-Type-Options response header. The X-Content-Type-Options response HTTP header is a marker used by the server to indicate that the MIME types advertised in the Content-Type headers should not be changed and be followed.
+          x_content_type_options = true;
+
+          # Set to true to enable HSTS includeSubDomains option. Only applied if strict_transport_security is enabled.
+          strict_transport_security_subdomains = true;
+
+          # Set to true to enable HSTS preloading option. Only applied if strict_transport_security is enabled.
+          strict_transport_security_preload = true;
+
+          # Sets how long a browser should cache HSTS in seconds. Only applied if strict_transport_security is enabled.
+          strict_transport_security_max_age_seconds = 86400;
+
+          # Set to true if you want to enable HTTP Strict-Transport-Security (HSTS) response header. Only use this when HTTPS is enabled in your configuration, or when there is another upstream system that ensures your application does HTTPS (like a frontend load balancer). HSTS tells browsers that the site should only be accessed using HTTPS.
+          strict_transport_security = true;
+
+          # Secret key used for signing. Please note that the contents of this option will end up in a world-readable Nix store. Use the file provider pointing at a reasonably secured file in the local filesystem to work around that. Look at the documentation for details: https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#file-provider
+          secret_key = "$__file{${config.age.secrets.grafana_secret_key.path}}";
+
+          # Disable creation of admin user on first start of Grafana.
+          disable_initial_admin_creation = false;
+
+          # Set to true to disable the use of Gravatar for user profile images.
+          disable_gravatar = false;
+
+          # Set to true to disable brute force login protection.
+          disable_brute_force_login_protection = false;
+
+          # Define a whitelist of allowed IP addresses or domains, with ports, to be used in data source URLs with the Grafana data source proxy. Format: ip_or_domain:port separated by spaces. PostgreSQL, MySQL, and MSSQL data sources do not use the proxy and are therefore unaffected by this setting.
+          data_source_proxy_whitelist = [];
+
+          # List of additional allowed URLs to pass by the CSRF check. Suggested when authentication comes from an IdP.
+          csrf_trusted_origins = [];
+
+          # List of allowed headers to be set by the user. Suggested to use for if authentication lives behind reverse proxies.
+          csrf_additional_headers = [];
+
+          # Set to true if you host Grafana behind HTTPS.
+          cookie_secure = true;
+
+          # Sets the SameSite cookie attribute and prevents the browser from sending this cookie along with cross-site requests. The main goal is to mitigate the risk of cross-origin information leakage. This setting also provides some protection against cross-site request forgery attacks (CSRF), read more about SameSite here. Using value disabled does not add any SameSite attribute to cookies.
+          # one of "lax", "strict", "none", "disabled"
+          cookie_samesite = "strict";
+
+          # Set to true to add the Content-Security-Policy-Report-Only header to your requests. CSP in Report Only mode enables you to experiment with policies by monitoring their effects without enforcing them. You can enable both policies simultaneously.
+          content_security_policy_report_only = false;
+
+          # Set to true to add the Content-Security-Policy header to your requests. CSP allows to control resources that the user agent can load and helps prevent XSS attacks.
+          content_security_policy = true;
+
+          # When false, the HTTP header X-Frame-Options: deny will be set in Grafana HTTP responses which will instruct browsers to not allow rendering Grafana in a <frame>, <iframe>, <embed> or <object>. The main goal is to mitigate the risk of Clickjacking.
+          allow_embedding = false;
+
+          # Default admin username.
+          admin_user = "admin";
+
+          # Default admin password. Please note that the contents of this option will end up in a world-readable Nix store. Use the file provider pointing at a reasonably secured file in the local filesystem to work around that. Look at the documentation for details: https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#file-provider
+          admin_password = "$__file{${config.age.secrets.grafana_admin_password.path}}";
+
+          # The email of the default Grafana Admin, created on startup.
+          admin_email = "admin@emile.space";
+        };
+
+        paths = {
+          # Folder that contains provisioning config files that grafana will apply on startup and while running. Don’t change the value of this option if you are planning to use services.grafana.provision options.
+          # provisioning = ...
+
+          # Directory where grafana will automatically scan and look for plugins
+          plugins = "${cfg.dataDir}/plugins";
+        };
+
+        database = {
+
+          # For sqlite3 only. Setting to enable/disable Write-Ahead Logging.
+          # https://sqlite.org/wal.html
+          wal = false;
+
+          # The database user (not applicable for sqlite3).
+          user = "root";
+
+          # Database type.
+          # one of "mysql", "sqlite3", "postgres"
+          type = "sqlite3";
+
+          # This setting applies to sqlite3 only and controls the number of times the system retries a transaction when the database is locked.
+          transaction_retries = 5;
+
+          # For Postgres, use either disable, require or verify-full. For MySQL, use either true, false, or skip-verify.
+          # one of "disable", "require", "verify-full", "true", "false", "skip-verify"
+          ssl_mode = "disable";
+
+          # The common name field of the certificate used by the mysql or postgres server. Not necessary if ssl_mode is set to skip-verify.
+          server_cert_name = null;
+
+          # This setting applies to sqlite3 only and controls the number of times the system retries a query when the database is locked.
+          query_retries = 0;
+
+          # Only applicable to sqlite3 database. The file path where the database will be stored.
+          path = "${config.services.grafana.dataDir}/data/grafana.db";
+
+          # The database user’s password (not applicable for sqlite3).
+          # Please note that the contents of this option will end up in a world-readable Nix store. Use the file provider pointing at a reasonably secured file in the local filesystem to work around that. Look at the documentation for details: https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#file-provider
+          password = "$__file{${config.age.secrets.grafana_database_password.path}}";
+
+          # The name of the Grafana database.
+          name = "grafana";
+
+          # The maximum number of open connections to the database.
+          # 0 = unlimited (I'm just assuming this, everything else would be weird)
+          max_open_conn = 0;
+
+          # The maximum number of connections in the idle connection pool.
+          max_idle_conn = 2;
+
+          # Set to true to log the sql calls and execution times
+          log_queries = false;
+
+          # For mysql, if the migrationLocking feature toggle is set, specify the time (in seconds) to wait before failing to lock the database for the migrations.
+          locking_attempt_timeout_sec = 0;
+
+          # Only the MySQL driver supports isolation levels in Grafana. In case the value is empty, the driver’s default isolation level is applied.
+          # null or one of "READ-UNCOMMITTED", "READ-COMMITTED", "REPEATABLE-READ", "SERIALIZABLE"
+          isolation_level = null;
+
+          # Only applicable to MySQL or Postgres. Includes IP or hostname and port or in case of Unix sockets the path to it. For example, for MySQL running on the same host as Grafana: host = "127.0.0.1:3306" or with Unix sockets: host = "/var/run/mysqld/mysqld.sock"
+          host = "127.0.0.1:3306";
+
+          # Sets the maximum amount of time a connection may be reused. The default is 14400 (which means 14400 seconds or 4 hours). For MySQL, this setting should be shorter than the wait_timeout variable.
+          conn_max_lifetime = 14400;
+
+          # The path to the client key. Only if server requires client authentication.
+          client_key_path = null;
+
+          # The path to the client cert. Only if server requires client authentication.
+          client_cert_path = null;
+
+          # For sqlite3 only. Shared cache setting used for connecting to the database.
+          # one of "private", "shared"
+          cache_mode = "private";
+
+          # The path to the CA certificate to use.
+          ca_cert_path = null;
+        };
+
+        analytics = {
+          # When enabled Grafana will send anonymous usage statistics to stats.grafana.org. No IP addresses are being tracked, only simple counters to track running instances, versions, dashboard and error counts. Counters are sent every 24 hours.
+          reporting_enabled = true;
+
+          # Set to false to remove all feedback links from the UI.
+          feedback_links_enabled = true;
+
+          # When set to false, disables checking for new versions of Grafana from Grafana’s GitHub repository. When enabled, the check for a new version runs every 10 minutes. It will notify, via the UI, when a new version is available. The check itself will not prompt any auto-updates of the Grafana software, nor will it send any sensitive information.
+          check_for_updates = true;
+
+          # When set to false, disables checking for new versions of installed plugins from https://grafana.com. When enabled, the check for a new plugin runs every 10 minutes. It will notify, via the UI, when a new plugin update exists. The check itself will not prompt any auto-updates of the plugin, nor will it send any sensitive information.
+          # check_for_plugin_updates = ...
+        };
+      };
+
+      #provision = {
+      #  notifiers.*.uid
+      #  notifiers.*.type
+      #  notifiers.*.settings
+      #  notifiers.*.send_reminder
+      #  notifiers.*.secure_settings
+      #  notifiers.*.org_name
+      #  notifiers.*.org_id
+      #  notifiers.*.name
+      #  notifiers.*.is_default
+      #  notifiers.*.frequency
+      #  notifiers.*.disable_resolve_message
+      #  notifiers
+      #  enable
+      #  datasources.settings.deleteDatasources.*.orgId
+      #  datasources.settings.deleteDatasources.*.name
+      #  datasources.settings.deleteDatasources
+      #  datasources.settings.datasources.*.url
+      #  datasources.settings.datasources.*.uid
+      #  datasources.settings.datasources.*.type
+      #  datasources.settings.datasources.*.secureJsonData
+      #  datasources.settings.datasources.*.name
+      #  datasources.settings.datasources.*.jsonData
+      #  datasources.settings.datasources.*.editable
+      #  datasources.settings.datasources.*.access
+      #  datasources.settings.datasources
+      #  datasources.settings.apiVersion
+      #  datasources.settings
+      #  datasources.path
+      #  datasources
+      #  dashboards.settings.providers.*.type
+      #  dashboards.settings.providers.*.options.path
+      #  dashboards.settings.providers.*.name
+      #  dashboards.settings.providers
+      #  dashboards.settings.apiVersion
+      #  dashboards.settings
+      #  dashboards.path
+      #  dashboards
+      #  alerting.templates.settings.templates.*.template
+      #  alerting.templates.settings.templates.*.name
+      #  alerting.templates.settings.templates
+      #  alerting.templates.settings.deleteTemplates.*.orgId
+      #  alerting.templates.settings.deleteTemplates.*.name
+      #  alerting.templates.settings.deleteTemplates
+      #  alerting.templates.settings.apiVersion
+      #  alerting.templates.settings
+      #  alerting.templates.path
+      #  alerting.rules.settings.groups.*.name
+      #  alerting.rules.settings.groups.*.interval
+      #  alerting.rules.settings.groups.*.folder
+      #  alerting.rules.settings.groups
+      #  alerting.rules.settings.deleteRules.*.uid
+      #  alerting.rules.settings.deleteRules.*.orgId
+      #  alerting.rules.settings.deleteRules
+      #  alerting.rules.settings.apiVersion
+      #  alerting.rules.settings
+      #  alerting.rules.path
+      #  alerting.policies.settings.resetPolicies
+      #  alerting.policies.settings.policies
+      #  alerting.policies.settings.apiVersion
+      #  alerting.policies.settings
+      #  alerting.policies.path
+      #  alerting.muteTimings.settings.muteTimes.*.name
+      #  alerting.muteTimings.settings.muteTimes
+      #  alerting.muteTimings.settings.deleteMuteTimes.*.orgId
+      #  alerting.muteTimings.settings.deleteMuteTimes.*.name
+      #  alerting.muteTimings.settings.deleteMuteTimes
+      #  alerting.muteTimings.settings.apiVersion
+      #  alerting.muteTimings.settings
+      #  alerting.muteTimings.path
+      #  alerting.contactPoints.settings.deleteContactPoints.*.uid
+      #  alerting.contactPoints.settings.deleteContactPoints.*.orgId
+      #  alerting.contactPoints.settings.deleteContactPoints
+      #  alerting.contactPoints.settings.contactPoints.*.name
+      #  alerting.contactPoints.settings.contactPoints
+      #  alerting.contactPoints.settings.apiVersion
+      #  alerting.contactPoints.settings
+      #  alerting.contactPoints.path
+      #};
+
+      #services.grafana-agent.enable
+      #services.grafana_reporter.port
+      #services.grafana_reporter.addr
+      #services.grafana-agent.package
+      #services.grafana-agent.settings
+      #services.grafana_reporter.enable
+      #services.grafana-agent.extraFlags
+      #services.grafana-agent.credentials
+      #services.grafana_reporter.templateDir
+      #services.grafana_reporter.grafana.port
+      #services.grafana_reporter.grafana.addr
+      #services.grafana-image-renderer.enable
+      #services.grafana-image-renderer.verbose
+      #services.grafana-image-renderer.settings
+      #services.grafana-image-renderer.chromium
+      #services.grafana_reporter.grafana.protocol
+      #services.grafana-image-renderer.provisionGrafana
+      #services.grafana-image-renderer.settings.service.port
+      #services.grafana-image-renderer.settings.service.logging.level
+      #services.grafana-image-renderer.settings.rendering.width
+      #services.grafana-image-renderer.settings.rendering.mode
+      #services.grafana-image-renderer.settings.rendering.height
+      #services.grafana-image-renderer.settings.rendering.args
+    };
+  };
+
+}
\ No newline at end of file
diff --git a/nix/hosts/corrino/www/hydra.emile.space.nix b/nix/hosts/corrino/www/hydra.emile.space.nix
new file mode 100644
index 0000000..2607ac0
--- /dev/null
+++ b/nix/hosts/corrino/www/hydra.emile.space.nix
@@ -0,0 +1,57 @@
+ { ... }:
+
+{
+  services.nginx.virtualHosts."hydra.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        proxyPass = "http://127.0.0.1:3001";
+      };
+    };
+  };
+
+  # make hydra send emails
+  services.postfix = {
+    enable = true;
+    setSendmail = true;
+  };
+
+  services.hydra = {
+    enable = true;
+
+    listenHost = "*";
+    port = 3001;
+    hydraURL = "https://hydra.emile.space"; # externally visible URL
+
+    # Directory that holds Hydra garbage collector roots.
+    gcRootsDir = "/nix/var/nix/gcroots/hydra";
+
+
+    # a standalone hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/hosts
+    buildMachinesFiles = [];
+    # you will probably also want, otherwise *everything* will be built from scratch
+    useSubstitutes = true;
+
+
+    # notification settings
+    smtpHost = "mail.emile.space";
+    notificationSender = "hydra@emile.space";
+
+    # Threshold of minimum disk space (GiB) to determine if the evaluator should run or not.
+    minimumDiskFreeEvaluator = 20;
+
+    # Threshold of minimum disk space (GiB) to determine if the queue runner should run or not.
+    minimumDiskFree = 20;
+
+    # Path to a file containing the logo of your Hydra instance
+    # logo = ;
+
+    extraConfig = ''
+      <git-input>
+        timeout = 3600
+      </git-input>
+    '';
+  };
+}
diff --git a/nix/hosts/corrino/www/jupyter.emile.space.nix b/nix/hosts/corrino/www/jupyter.emile.space.nix
new file mode 100644
index 0000000..d1d951c
--- /dev/null
+++ b/nix/hosts/corrino/www/jupyter.emile.space.nix
@@ -0,0 +1,60 @@
+{ pkgs, lib, config, ... }:
+
+{
+  services.nginx.virtualHosts."jupyter.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        proxyPass = "http://127.0.0.1:8004";
+      };
+    };
+  };
+
+  services.jupyter = rec {
+    enable = true;
+
+    ip = "127.0.0.1";
+    port = 8004;
+
+    # ; python3
+    # >>> from notebook.auth import passwd
+    # >>> passwd("the_password_here")
+    password = "'argon2:$argon2id$v=19$m=10240,t=10,p=8$WdU+DaBjTaiV1IQDRJUczg$N734yZ45++Kgl26lFEZau58ru8e7P/IgL9N6sf+kw9E'";
+
+    notebookConfig = ''
+      c.NotebookApp.allow_remote_access = True
+      c.NotebookApp.allow_origin = '*'
+    '';
+
+    kernels = {
+      python3 = let
+        env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [
+                ipykernel
+              ]));
+      in {
+        displayName = "Python 3";
+        argv = [
+          "${env.interpreter}"
+          "-m"
+          "ipykernel_launcher"
+          "-f"
+          "{connection_file}"
+        ];
+        language = "python";
+        #logo32 = "${env.sitePackages}/ipykernel/resources/logo-32x32.png";
+        #logo64 = "${env.sitePackages}/ipykernel/resources/logo-64x64.png";
+        extraPaths = {
+          "cool.txt" = pkgs.writeText "cool" "cool content";
+        };
+      };
+    };
+
+    group = "jupyter";
+    user = "jupyter";
+  };
+
+  users.users.jupyter.group = "jupyter";
+  users.groups.jupyter = {};
+}
\ No newline at end of file
diff --git a/nix/hosts/corrino/www/magic-hash.emile.space.nix b/nix/hosts/corrino/www/magic-hash.emile.space.nix
new file mode 100644
index 0000000..05446ea
--- /dev/null
+++ b/nix/hosts/corrino/www/magic-hash.emile.space.nix
@@ -0,0 +1,33 @@
+{ config, ... }:
+
+{
+  services.nginx.virtualHosts."magic-hash.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        proxyPass = "http://127.0.0.1:8339";
+      };
+    };
+  };
+
+  virtualisation.oci-containers = {
+    backend = "docker";
+    containers = {
+      "ctfd" = {
+        image = "magic-hash";
+        ports = [
+          "8338:80"
+        ];
+        environment = {
+
+          # this is not encouraged, but should work for the weekend (this is a
+          # flag, not a password, so even if it get's leaked, the worst that
+          # can happen is that people could enter it somewhere)
+          "FLAG" = builtins.readFile config.age.secrets.magic-hash-flag.path;
+        };
+      };
+    };
+  };
+}
diff --git a/nix/hosts/corrino/www/netbox.emile.space.nix b/nix/hosts/corrino/www/netbox.emile.space.nix
new file mode 100644
index 0000000..a86209c
--- /dev/null
+++ b/nix/hosts/corrino/www/netbox.emile.space.nix
@@ -0,0 +1,63 @@
+{ config, pkgs, ... }:
+
+{
+  services.nginx.virtualHosts."netbox.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+    kTLS = true;
+
+    locations."/" = {
+      proxyPass = "http://[::1]:8001";
+      proxyWebsockets = true;
+    };
+    locations."/static/".root = "${config.services.netbox.dataDir}";
+  };
+
+  users.users.nginx.extraGroups = [ "netbox" ];
+
+  environment.systemPackages = with pkgs; [ netbox ];
+
+  services.netbox = {
+    enable = true;
+    package = pkgs.netbox_3_6; # nixos 23.11 now has netbox 3.6
+    dataDir = "/var/lib/netbox";
+    settings.ALLOWED_HOSTS = [ "*" ];
+    enableLdap = false;
+    settings = {};
+    secretKeyFile = config.age.secrets.netbox_secret.path;
+    port = 8001;
+    listenAddress = "[::1]";
+  };
+
+  age.secrets.netbox_secret = {
+    mode = "440";
+    owner = "netbox";
+    group = "netbox";
+  };
+
+  #services.netbox = {
+  #  enable = true;
+  #  listenAddress = "[::1]";
+  #  secretKeyFile = config.age.secrets.netbox_secret.path;
+  #  package = pkgs.netbox.override { python3 = pkgs.python310; };
+  #  # extraConfig = ''
+  #  #   # REMOTE_AUTH_BACKEND = 'social_core.backends.open_id_connect.OpenIdConnectAuth'
+  #  #   # SOCIAL_AUTH_OIDC_OIDC_ENDPOINT = 'https://auth.c3voc.de'
+
+  #  #   EXEMPT_VIEW_PERMISSIONS = ['*']
+  #  # '';
+  #};
+
+  # add nginx to the netbox group so it can read /var/lib/nginx/static
+  # users = {
+  #   groups."netbox" = {};
+  #   users = {
+  #     netbox = {
+  #       isNormalUser = true;
+  #       group = "netbox";
+  #     };
+  #   };
+  # };
+  # users.users.nginx.extraGroups = [ "netbox" ];
+}
+
diff --git a/nix/hosts/corrino/www/pgweb.emile.space.nix b/nix/hosts/corrino/www/pgweb.emile.space.nix
new file mode 100644
index 0000000..522a6bf
--- /dev/null
+++ b/nix/hosts/corrino/www/pgweb.emile.space.nix
@@ -0,0 +1,21 @@
+{ pkgs, ... }:
+
+{
+  services.nginx.virtualHosts."pgweb.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        proxyPass = "http://127.0.0.1:5432";
+      };
+    };
+  };
+
+  environment.systemPackages = with pkgs; [ pgweb ];
+
+  # systemd.services.pgweb = {
+  #   wantedBy = [ "multi-user.target" ];
+  #   serviceConfig.ExecStart = "${pkgs.pgweb}/bin/pwgeb";
+  # };
+}
diff --git a/nix/hosts/corrino/www/photo.emile.space.nix b/nix/hosts/corrino/www/photo.emile.space.nix
new file mode 100644
index 0000000..7f2e9ca
--- /dev/null
+++ b/nix/hosts/corrino/www/photo.emile.space.nix
@@ -0,0 +1,33 @@
+{ config, ... }:
+
+{
+  services.nginx.virtualHosts."photo.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        proxyPass = "http://127.0.0.1:2342";
+        proxyWebsockets = true;
+      };
+    };
+  };
+
+  services.photoprism = {
+    enable = true;
+
+    address = "127.0.0.1";
+    port = 2342;
+
+    passwordFile = config.age.secrets.photoprism_password.path;
+
+    # originalsPath = "/data/photos";
+    originalsPath = "/mnt/storagebox-bx11/photos";
+
+    settings = {
+      PHOTOPRISM_ADMIN_USER = "root";
+      PHOTOPRISM_DEFAULT_LOCALE = "en";
+      PHOTOPRISM_SITE_URL = "https://photo.emile.space";
+    };
+  };
+}
diff --git a/nix/hosts/corrino/www/stream.emile.space.nix b/nix/hosts/corrino/www/stream.emile.space.nix
new file mode 100644
index 0000000..7340d4f
--- /dev/null
+++ b/nix/hosts/corrino/www/stream.emile.space.nix
@@ -0,0 +1,24 @@
+{ ... }:
+
+{
+  services.nginx.virtualHosts."stream.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        proxyPass = "http://127.0.0.1:8080";
+        proxyWebsockets = true;
+      };
+    };
+  };
+
+  services.owncast = {
+    enable = true;
+    openFirewall = true;
+    listen = "0.0.0.0";
+    dataDir = "/var/lib/owncast";
+    rtmp-port = 1935;
+    port = 8080; # web interface
+  };
+}
diff --git a/nix/hosts/corrino/www/talks.emile.space.nix b/nix/hosts/corrino/www/talks.emile.space.nix
new file mode 100644
index 0000000..4833fa7
--- /dev/null
+++ b/nix/hosts/corrino/www/talks.emile.space.nix
@@ -0,0 +1,97 @@
+{ config, pkgs, ... }:
+
+let
+  pretalx_config = pkgs.writeText "/etc/pretalx.cfg" ''
+    [filesystem]
+    media = /public/media
+    data = /public/data
+    static = /pretalx/src/static.dist
+
+    [site]
+    ; never run debug in production
+    debug = True
+    url = https://talks.emile.space
+
+    [database]
+    backend=sqlite3
+
+    [mail]
+    from = pretalx@emile.space
+    host = mail.emile.space
+    port = 1025
+    user = mail
+    password=${config.age.secrets.mail_password.path}
+    tls = True
+    ssl = False
+
+    [celery]
+    backend=redis+socket:///pretalx/redis.sock?virtual_host=1
+    broker=redis+socket:///pretalx/redis.sock?virtual_host=2
+
+    [redis]
+    location=unix:///pretalx/redis.sock?db=0
+    ; Remove the following line if you are unsure about your redis' security
+    ; to reduce impact if redis gets compromised.
+    sessions=true    
+  ''; 
+in {
+  services.nginx.virtualHosts."talks.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        extraConfig = ''
+          proxy_pass http://127.0.0.1:8350;
+
+          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+          proxy_set_header Host $host;
+        '';
+      };
+      "/media/" = {
+        root = "/var/pretalx-public/";
+      };
+      "/static/" = {
+        root = "/var/pretalx-public/";
+      };
+    };
+  };
+
+  virtualisation.oci-containers.containers = {
+    pretalx = {
+      image = "pretalx/standalone:latest";
+      ports = [
+        "127.0.0.1:8350:80"
+      ];
+      volumes = [
+        "/var/pretalx-data:/data" # {static, media}
+        "/var/pretalx-public:/public"
+        "/var/pretalx-public/static:/pretalx/src/static.dist"
+
+        # "/var/pretalx-public-media:/public/media"
+        "${pretalx_config}:/etc/pretalx/pretalx.cfg:ro"
+        "/run/redis-pretalx/redis.sock:/pretalx/redis.sock"
+      ];
+    };
+  };
+
+  services.redis.vmOverCommit = true;
+  services.redis.servers."pretalx" = {
+    enable = true;
+    port = 0;
+    unixSocketPerm = 666;
+    user = "pretalxuser";
+  };
+
+  users = {
+    groups."pretalxuser" = {};
+    users."pretalxuser" = {
+      #isNormalUser = true; # we're setting the uid manually, nix should detect this, but whatever...
+      uid = 999;
+      group = "pretalxuser";
+      description = "The user for pretalx. Created, as we need a user to set the permissions for the redis unix socket";
+    };
+  };
+
+  # 15,45 * * * * docker exec pretalx-app pretalx runperiodic
+}
diff --git a/nix/hosts/corrino/www/tickets.emile.space.nix b/nix/hosts/corrino/www/tickets.emile.space.nix
new file mode 100644
index 0000000..f479263
--- /dev/null
+++ b/nix/hosts/corrino/www/tickets.emile.space.nix
@@ -0,0 +1,120 @@
+{ config, pkgs, ... }:
+
+# Future People: This place is not a place of honor... no highly esteemed deed
+# is commemorated here... nothing valued is here...
+# Look at the docker volumes section: You'll have to build and fail a few
+# times... sorry
+
+let
+  # pretix_config = config.age.secrets.pretix.path;
+
+  pretix_config = pkgs.writeText "pretix.cfg" ''
+    [pretix]
+    instance_name=tickets.emile.space
+    url=https://tickets.emile.space
+    currency=EUR
+    ; DO NOT change the following value, it has to be set to the location of the
+    ; directory *inside* the docker container
+    datadir=/data
+    cookie_domain=tickets.emile.space
+    trust_x_forwarded_for=on
+    trust_x_forwarded_proto=on
+
+    [database]
+    backend=sqlite3
+
+    [mail]
+    ; See config file documentation for more options
+    from=tickets@emile.space
+    ; This is the default IP address of your docker host in docker's virtual
+    ; network. Make sure postfix listens on this address.
+    host=mail.emile.space
+    user=mail
+    password=${config.age.secrets.mail_password.path}
+    port=1025
+    tls=on
+    ssl=off
+
+    [redis]
+    location=unix:///pretix/redis.sock?db=0
+    ; Remove the following line if you are unsure about your redis' security
+    ; to reduce impact if redis gets compromised.
+    sessions=true
+
+    [celery]
+    backend=redis+socket:///pretix/redis.sock?virtual_host=1
+    broker=redis+socket:///pretix/redis.sock?virtual_host=2
+  '';
+in {
+  services.nginx.virtualHosts."tickets.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    # serverAliases = [
+    #   "falscher-ha.se"
+    # ];
+
+    locations = {
+      "/" = {
+        extraConfig = ''
+          proxy_pass http://127.0.0.1:8349;
+
+          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+          proxy_set_header Host $host;
+        '';
+      };
+    };
+  };
+
+  virtualisation.oci-containers.containers = {
+    pretix = {
+      image = "pretix/standalone:stable";
+      ports = [
+        "127.0.0.1:8349:80"
+      ];
+      volumes = [
+        "/var/pretix-data:/data"
+        "/etc/pretix:/etc/pretix"
+        "/run/redis-pretix/redis.sock:/pretix/redis.sock"
+        # "/run/redis:/var/run/redis"
+
+        # update the below manually using the result from
+        # ; readlink /etc/static/pretix.cfg
+        # after building and failing once
+        # (yes, I'm so annoyed that I can't mount symlinks into docker containers)
+        # "/nix/store/vch1g88b5za1ab79cikil3n7wqrl8wxg-etc-pretix.cfg:/etc/pretix/pretix.cfg"
+        # "/nix/store/rcxvnbg7iqb1z011ybanj3982153xi70-etc-pretix.cfg:/etc/pretix/pretix.cfg"
+        "${pretix_config}:/etc/pretix/pretix.cfg"
+      ];
+      extraOptions = [
+        # "--sysctl net.core.somaxconn=4096"
+      ];
+    };
+  };
+
+
+  services.redis.vmOverCommit = true;
+  services.redis.servers."pretix" = {
+    enable = true;
+    port = 0;
+    unixSocketPerm = 666;
+    user = "pretixuser";
+  };
+
+  users = {
+    groups."pretixuser" = {};
+    users."pretixuser" = {
+      isNormalUser = true; # we're setting the uid manually, nix should detect this, but whatever...
+      uid = 15371;
+      group = "pretixuser";
+      description = "The user for pretix. Created, as we need a user to set the permissions for the redis unix socket";
+    };
+  };
+
+
+  # Allow access to the unix socket for the "redis" group.
+  # services.redis.settings.unixsocketperm = "770";
+
+  # trace: warning: The option `services.redis.settings' defined in `/nix/store/ib5271hcbjqrxb0yrmrjcypvpacmnp2s-source/ops/modules/www/tickets.emile.space.nix' has been renamed to `services.redis.servers."".settings'.
+
+}
diff --git a/nix/hosts/corrino/www/tickets.emile.space.nix_chaos.jetzt.nix b/nix/hosts/corrino/www/tickets.emile.space.nix_chaos.jetzt.nix
new file mode 100644
index 0000000..5b7d99a
--- /dev/null
+++ b/nix/hosts/corrino/www/tickets.emile.space.nix_chaos.jetzt.nix
@@ -0,0 +1,107 @@
+{ config, ... }:
+
+# Future People: This place is not a place of honor... no highly esteemed deed
+# is commemorated here... nothing valued is here...
+# Look at the docker volumes section: You'll have to build and fail a few
+# times... sorry
+
+{
+  services.nginx.virtualHosts."tickets.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        extraConfig = ''
+          proxy_pass http://127.0.0.1:8349;
+
+          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+          proxy_set_header Host $host;
+        '';
+      };
+    };
+  };
+
+  environment.etc."pretix.cfg".text = ''
+    [pretix]
+    instance_name=tickets.emile.space
+    url=https://tickets.emile.space
+    currency=EUR
+    ; DO NOT change the following value, it has to be set to the location of the
+    ; directory *inside* the docker container
+    datadir=/data
+    cookie_domain=tickets.emile.space
+    trust_x_forwarded_for=on
+    trust_x_forwarded_proto=on
+
+    [database]
+    backend=sqlite3
+
+    [mail]
+    ; See config file documentation for more options
+    from=tickets@emile.space
+    ; This is the default IP address of your docker host in docker's virtual
+    ; network. Make sure postfix listens on this address.
+    host=mail.emile.space
+    user=mail
+
+    ; something like this or so...
+    ;password=${builtins.readFile config.age.secrets.mailserver_credz.path}
+    ;password=this_is_an_example_password_changeme
+
+    port=1025
+    tls=on
+    ssl=off
+
+    [redis]
+    location=unix:///pretix/redis.sock?db=0
+    ; Remove the following line if you are unsure about your redis' security
+    ; to reduce impact if redis gets compromised.
+    sessions=true
+
+    [celery]
+    backend=redis+socket:///pretix/redis.sock?virtual_host=1
+    broker=redis+socket:///pretix/redis.sock?virtual_host=2
+  '';
+
+  virtualisation.oci-containers.containers = {
+    pretix = {
+      image = "pretix/standalone:stable";
+      ports = [
+        "127.0.0.1:8349:80"
+      ];
+      volumes = [
+        "/var/pretix-data:/data"
+        "/etc/pretix:/etc/pretix"
+        "/run/redis-pretix/redis.sock:/pretix/redis.sock"
+
+        # update the below manually using the result from
+        # ; readlink /etc/static/pretix.cfg
+        # after building and failing once
+        # (yes, I'm so annoyed that I can't mount symlinks into docker containers)
+        # "/nix/store/vch1g88b5za1ab79cikil3n7wqrl8wxg-etc-pretix.cfg:/etc/pretix/pretix.cfg"
+        "/nix/store/rcxvnbg7iqb1z011ybanj3982153xi70-etc-pretix.cfg:/etc/pretix/pretix.cfg"
+      ];
+    };
+  };
+
+
+  services.redis.vmOverCommit = true;
+  services.redis.servers."pretix" = {
+    enable = true;
+    port = 0;
+    unixSocketPerm = 666;
+    user = "pretixuser";
+  };
+
+  users = {
+    groups."pretixuser" = {};
+    users."pretixuser" = {
+      isNormalUser = true; # we're setting the uid manually, nix should detect
+                           # this, but whatever...
+      uid = 15371;
+      group = "pretixuser";
+      description = "The user for pretix. Created, as we need a user to set the permissions for the redis unix socket";
+    };
+  };
+}
diff --git a/nix/hosts/corrino/www/znc.emile.space.nix b/nix/hosts/corrino/www/znc.emile.space.nix
new file mode 100644
index 0000000..7a790ed
--- /dev/null
+++ b/nix/hosts/corrino/www/znc.emile.space.nix
@@ -0,0 +1,47 @@
+{ ... }:
+
+{
+  services.nginx.virtualHosts."znc.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+
+    locations = {
+      "/" = {
+        proxyPass = "http://127.0.0.1:5000";
+      };
+    };
+  };
+
+  services.znc = {
+    enable = true;
+    openFirewall = true;
+    useLegacyConfig = false;
+
+    config = {
+      LoadModule = [ ];
+      User.Emile = {
+        Admin = true;
+        Nick = "hanemile";
+        RealName = "Emile";
+        # QuitMsg = "iowait()";
+        LoadModule = [ "chansaver" "controlpanel" ];
+
+        Network.libera = {
+          Server = "irc.libera.chat +6697";
+          LoadModule = [ "simple_away" ];
+          Chan = {
+            "#nixos" = { Detached = false; };
+            "##linux" = { Disabled = true; };
+          };
+        };
+
+        Pass.password = { # hunter2
+          Method = "sha256";
+          Hash =
+            "31357a874d929871b7c2267721501aaa1f3c570ddc72eb6fb6d065fe72dbc2e4";
+          Salt = "Oo1du8jahquataexai6Eiph9OcohpoL3";
+        };
+      };
+    };
+  };
+}