migrate media to orbi

This commit is contained in:
Ingolf Wagner 2024-04-06 10:34:54 +02:00
parent 219f091d03
commit 64578b915c
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
4 changed files with 38 additions and 17 deletions

View file

@ -10,13 +10,14 @@ with types;
}; };
imports = [ imports = [
./sshd
./tinc
./hosts.nix
./wifi.nix
#./avahi.nix #./avahi.nix
./syncthing.nix ./hosts.nix
./nginx.nix ./nginx.nix
./sshd
./syncthing.nix
./tinc
./wifi.nix
./wireguard.nix
]; ];
config = mkIf config.components.network.enable { }; config = mkIf config.components.network.enable { };

View file

@ -0,0 +1,16 @@
{ lib, config, ... }:
with lib;
{
options.wireguard = {
wg0 = {
#ipv4 = mkOption { type = types.str; };
subnet = mkOption {
type = types.str;
default = "10.100.0.1/24";
};
};
};
}

View file

@ -29,18 +29,18 @@
dst = "/mirror/matrix-terranix"; dst = "/mirror/matrix-terranix";
}; };
radarr = { #radarr = {
sshKeyPath = config.sops.secrets.rsync_private_key.path; # sshKeyPath = config.sops.secrets.rsync_private_key.path;
src = "root@robi:/media/arr/radarr"; # src = "root@robi:/media/arr/radarr";
dst = "/media/arr/radarr"; # dst = "/media/arr/radarr";
delete = false; # delete = false;
}; #};
sonarr = { #sonarr = {
sshKeyPath = config.sops.secrets.rsync_private_key.path; # sshKeyPath = config.sops.secrets.rsync_private_key.path;
src = "root@robi:/media/arr/sonarr"; # src = "root@robi:/media/arr/sonarr";
dst = "/media/arr/sonarr"; # dst = "/media/arr/sonarr";
delete = false; # delete = false;
}; #};
}; };

View file

@ -36,8 +36,10 @@
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
"radarr.${config.networking.hostName}.private" = { "radarr.${config.networking.hostName}.private" = {
serverAliases = [ "radarr.ingolf-wagner.de" ];
extraConfig = '' extraConfig = ''
allow ${config.tinc.private.subnet}; allow ${config.tinc.private.subnet};
allow ${config.wireguard.wg0.subnet};
deny all; deny all;
''; '';
locations."/" = { locations."/" = {
@ -46,8 +48,10 @@
}; };
}; };
"sonarr.${config.networking.hostName}.private" = { "sonarr.${config.networking.hostName}.private" = {
serverAliases = [ "sonarr.ingolf-wagner.de" ];
extraConfig = '' extraConfig = ''
allow ${config.tinc.private.subnet}; allow ${config.tinc.private.subnet};
allow ${config.wireguard.wg0.subnet};
deny all; deny all;
''; '';
locations."/" = { locations."/" = {