summaryrefslogtreecommitdiffstats
path: root/lass
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-09-03 12:12:13 +0200
committerlassulus <git@lassul.us>2023-09-03 12:12:13 +0200
commit3e9f8a0cf037043a2a65769b03507383cc08dedc (patch)
tree27b1d95b3721b1bae62b61696003c6e62903d38f /lass
parent2c38c86d18e440bf5361b638795a704b3530448c (diff)
l riot: add some preparation for move
Diffstat (limited to 'lass')
-rw-r--r--lass/2configs/riot.nix34
1 files changed, 29 insertions, 5 deletions
diff --git a/lass/2configs/riot.nix b/lass/2configs/riot.nix
index 6aacec5b..6348cb88 100644
--- a/lass/2configs/riot.nix
+++ b/lass/2configs/riot.nix
@@ -1,9 +1,12 @@
-{ config, lib, pkgs, ... }:
-{
+{ config, lib, pkgs, ... }: let
+ domains = [
+ "hackerfleet.eu"
+ "hackerfleet.de"
+ ];
+in {
containers.riot = {
config = {
environment.systemPackages = [
- pkgs.dhcpcd
pkgs.git
pkgs.jq
];
@@ -19,8 +22,11 @@
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = pkgs.writers.writeDash "autoswitch" ''
set -efu
- if test -e /var/src/nixos-config; then
- /run/current-system/sw/bin/nixos-rebuild -I /var/src switch || :
+ if test -e /etc/nixos/configuration.nix; then
+ /run/current-system/sw/bin/nixos-rebuild switch \
+ -I nixpkgs=channel:$(cat /etc/nixos/channel) \
+ -I nixos-config=/etc/nixos/configuration.nix \
+ || :
fi
'';
unitConfig.X-StopOnRemoval = false;
@@ -32,6 +38,7 @@
hostAddress = "10.233.1.1";
localAddress = "10.233.1.2";
};
+ systemd.services."container@riot".restartIfChanged = lib.mkForce false;
systemd.network.networks."50-ve-riot" = {
matchConfig.Name = "ve-riot";
@@ -60,4 +67,21 @@
{ predicate = "-i ve-riot"; target = "ACCEPT"; }
{ predicate = "-o ve-riot"; target = "ACCEPT"; }
];
+
+
+ # non container stuff
+
+ services.nginx.virtualHosts.riot = {
+ serverName = null;
+ serverAliases = domains;
+ };
+
+ krebs.exim-smarthost.extraRouters = ''
+ forward_riot:
+ driver = manualroute
+ domains = ${lib.concatStringsSep ":" domains}
+ transport = remote_smtp
+ route_list = * riot
+ no_more
+ '';
}