summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorGrigory Shipunov2023-01-24 20:40:41 +0100
committerGrigory Shipunov2023-01-24 20:40:41 +0100
commitb5d95071571de62aa62783c65e8cf7ecc487d162 (patch)
tree3806269067604dc4e74c63a00cacd8d630a7bb51 /hosts
parent3b53f3b8a9d78203bf506d6d49975f61f33a052d (diff)
music: init
Diffstat (limited to 'hosts')
-rw-r--r--hosts/cirrus/nextcloud-proxy.nix38
-rw-r--r--hosts/cirrus/wireguard-server.nix8
-rw-r--r--hosts/dishwasher/default.nix1
-rw-r--r--hosts/dishwasher/mcvm-network.nix6
-rw-r--r--hosts/dishwasher/microvms.nix12
5 files changed, 54 insertions, 11 deletions
diff --git a/hosts/cirrus/nextcloud-proxy.nix b/hosts/cirrus/nextcloud-proxy.nix
index 647d29f..11fc5ed 100644
--- a/hosts/cirrus/nextcloud-proxy.nix
+++ b/hosts/cirrus/nextcloud-proxy.nix
@@ -16,15 +16,15 @@
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
};
- services.nginx.virtualHosts."nc.oxapentane.com" = {
- enableACME = true;
- forceSSL = true;
- extraConfig = ''
+ services.nginx.virtualHosts = {
+ "nc.oxapentane.com" = {
+ enableACME = true;
+ forceSSL = true;
+ extraConfig = ''
client_max_body_size 512M;
- '';
- locations = {
- "/" = {
- # extraConfig = '' return 503; '';
+ '';
+ locations = {
+ "/" = {
proxyPass = "http://10.34.45.100:8080";
};
"/well-known/carddav" = {
@@ -33,7 +33,29 @@
"/well-known/caldav" = {
return = "301 $scheme://$host/remote.php/dav";
};
+ };
+ };
+ "music.oxapentane.com" = {
+ enableACME = true;
+ forceSSL = true;
+ extraConfig = ''
+ client_max_body_size 32M;
+ '';
+ locations = {
+ "/" = {
+ proxyPass = "http://10.34.45.101:4533";
+ extraConfig = ''
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-Protocol $scheme;
+ proxy_set_header X-Forwarded-Host $http_host;
+ proxy_buffering off;
+ '';
+ };
};
};
+};
}
diff --git a/hosts/cirrus/wireguard-server.nix b/hosts/cirrus/wireguard-server.nix
index ee4cf60..45c3dcb 100644
--- a/hosts/cirrus/wireguard-server.nix
+++ b/hosts/cirrus/wireguard-server.nix
@@ -66,6 +66,14 @@
PersistentKeepalive = 25;
};
}
+ # music
+ {
+ wireguardPeerConfig = {
+ PublicKey = "vQNkp51S9qLsu97dLPj0/EqFwvVtRFZpMHufgKhxum0=";
+ AllowedIPs = [ "10.34.45.101/32" ];
+ PersistentKeepalive = 25;
+ };
+ }
];
};
networks."oxaproxy" = {
diff --git a/hosts/dishwasher/default.nix b/hosts/dishwasher/default.nix
index b6c6651..f6e7a79 100644
--- a/hosts/dishwasher/default.nix
+++ b/hosts/dishwasher/default.nix
@@ -5,5 +5,6 @@
./secrets.nix
./oxalab.nix
./mcvm-network.nix
+ ./microvms.nix
];
}
diff --git a/hosts/dishwasher/mcvm-network.nix b/hosts/dishwasher/mcvm-network.nix
index 1e59d3f..73894f8 100644
--- a/hosts/dishwasher/mcvm-network.nix
+++ b/hosts/dishwasher/mcvm-network.nix
@@ -14,9 +14,9 @@
addresses = [{
addressConfig.Address = "10.99.99.1/24";
}
- {
- addressConfig.Address = "fd12:3456:789a::1/64";
- }];
+ {
+ addressConfig.Address = "fd12:3456:789a::1/64";
+ }];
ipv6Prefixes = [{
ipv6PrefixConfig.Prefix = "fd12:3456:789a::/64";
}];
diff --git a/hosts/dishwasher/microvms.nix b/hosts/dishwasher/microvms.nix
new file mode 100644
index 0000000..9c69142
--- /dev/null
+++ b/hosts/dishwasher/microvms.nix
@@ -0,0 +1,12 @@
+{ self, ... }: {
+ microvm.vms = {
+ nextcloud = {
+ flake = self;
+ updateFlake = "github:oxapentane/nix-config/master";
+ };
+ music = {
+ flake = self;
+ updateFlake = "github:oxapentane/nix-config/navidrome";
+ };
+ };
+}