Compare commits
44 changed files with 539 additions and 58 deletions
|
|
@ -29,8 +29,7 @@
|
|||
};
|
||||
|
||||
extraConfig = ''
|
||||
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||
set_real_ip_from 10.202.41.100;
|
||||
real_ip_header proxy_protocol;
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@
|
|||
extraConfig = ''
|
||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||
|
||||
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||
set_real_ip_from 10.202.41.100;
|
||||
real_ip_header proxy_protocol;
|
||||
'';
|
||||
};
|
||||
|
|
@ -34,8 +33,7 @@
|
|||
extraConfig = ''
|
||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||
|
||||
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||
set_real_ip_from 10.202.41.100;
|
||||
real_ip_header proxy_protocol;
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@ in
|
|||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||
set_real_ip_from 10.202.41.100;
|
||||
real_ip_header proxy_protocol;
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@
|
|||
extraConfig = ''
|
||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||
|
||||
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||
set_real_ip_from 10.202.41.100;
|
||||
real_ip_header proxy_protocol;
|
||||
|
||||
add_header Strict-Transport-Security "max-age=63072000" always;
|
||||
|
|
|
|||
|
|
@ -57,8 +57,7 @@
|
|||
};
|
||||
|
||||
extraConfig = ''
|
||||
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||
set_real_ip_from 10.202.41.100;
|
||||
real_ip_header proxy_protocol;
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,8 +51,7 @@
|
|||
extraConfig = ''
|
||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||
|
||||
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||
set_real_ip_from 10.202.41.100;
|
||||
real_ip_header proxy_protocol;
|
||||
'';
|
||||
};
|
||||
|
|
@ -81,8 +80,7 @@
|
|||
extraConfig = ''
|
||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||
|
||||
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||
set_real_ip_from 10.202.41.100;
|
||||
real_ip_header proxy_protocol;
|
||||
'';
|
||||
};
|
||||
|
|
@ -105,8 +103,7 @@
|
|||
extraConfig = ''
|
||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||
|
||||
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||
set_real_ip_from 10.202.41.100;
|
||||
real_ip_header proxy_protocol;
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@
|
|||
proxyWebsockets = true;
|
||||
};
|
||||
extraConfig = ''
|
||||
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||
set_real_ip_from 10.202.41.100;
|
||||
real_ip_header proxy_protocol;
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
33
config/hosts/navidrome/configuration.nix
Normal file
33
config/hosts/navidrome/configuration.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/vda";
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "navidrome";
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 80 443 ];
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/mnt/music" = {
|
||||
device = "//10.202.40.5/music-ro";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"username=navidrome"
|
||||
"credentials=/secrets/navidrome-samba-credentials.secret"
|
||||
"iocharset=utf8"
|
||||
"vers=3.1.1"
|
||||
"uid=navidrome"
|
||||
"gid=navidrome"
|
||||
"_netdev"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
7
config/hosts/navidrome/default.nix
Normal file
7
config/hosts/navidrome/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./navidrome.nix
|
||||
./nginx.nix
|
||||
];
|
||||
}
|
||||
9
config/hosts/navidrome/navidrome.nix
Normal file
9
config/hosts/navidrome/navidrome.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ ... }: {
|
||||
services.navidrome = {
|
||||
enable = true;
|
||||
settings = {
|
||||
Address = "unix:/run/navidrome/navidrome.socket";
|
||||
MusicFolder = "/mnt/music";
|
||||
};
|
||||
};
|
||||
}
|
||||
24
config/hosts/navidrome/nginx.nix
Normal file
24
config/hosts/navidrome/nginx.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ ... }: {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
user = "navidrome";
|
||||
virtualHosts."navidrome.grzb.de" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
listen = [
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 80;
|
||||
}
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 443;
|
||||
ssl = true;
|
||||
}
|
||||
];
|
||||
locations."/" = {
|
||||
proxyPass = "http://unix:/run/navidrome/navidrome.socket";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
13
config/hosts/navidrome/secrets.nix
Normal file
13
config/hosts/navidrome/secrets.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ keyCommandEnv, ... }:
|
||||
{
|
||||
deployment.keys = {
|
||||
"navidrome-samba-credentials.secret" = {
|
||||
keyCommand = keyCommandEnv ++ [ "pass" "navidrome/samba-credentials" ];
|
||||
destDir = "/secrets";
|
||||
user = "root";
|
||||
group = "root";
|
||||
permissions = "0640";
|
||||
uploadAt = "pre-activation";
|
||||
};
|
||||
};
|
||||
}
|
||||
17
config/hosts/netbox/configuration.nix
Normal file
17
config/hosts/netbox/configuration.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/vda";
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "netbox";
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 80 443 ];
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
8
config/hosts/netbox/default.nix
Normal file
8
config/hosts/netbox/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./netbox.nix
|
||||
./nginx.nix
|
||||
];
|
||||
}
|
||||
8
config/hosts/netbox/netbox.nix
Normal file
8
config/hosts/netbox/netbox.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.netbox = {
|
||||
enable = true;
|
||||
package = pkgs.netbox;
|
||||
secretKeyFile = "/secrets/netbox-secret-key.secret";
|
||||
};
|
||||
}
|
||||
29
config/hosts/netbox/nginx.nix
Normal file
29
config/hosts/netbox/nginx.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
clientMaxBodySize = "25m";
|
||||
user = "netbox";
|
||||
virtualHosts."netbox.grzb.de" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
listen = [
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 80;
|
||||
}
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 443;
|
||||
ssl = true;
|
||||
}
|
||||
];
|
||||
locations."/static/" = {
|
||||
alias = "${config.services.netbox.dataDir}/static/";
|
||||
};
|
||||
locations."/" = {
|
||||
proxyPass = "http://${config.services.netbox.listenAddress}:${builtins.toString config.services.netbox.port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
11
config/hosts/netbox/secrets.nix
Normal file
11
config/hosts/netbox/secrets.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ keyCommandEnv, ... }:
|
||||
{
|
||||
deployment.keys."netbox-secret-key.secret" = {
|
||||
keyCommand = keyCommandEnv ++ [ "pass" "netbox/secret-key" ];
|
||||
destDir = "/secrets";
|
||||
user = "netbox";
|
||||
group = "netbox";
|
||||
permissions = "0640";
|
||||
uploadAt = "pre-activation";
|
||||
};
|
||||
}
|
||||
|
|
@ -44,8 +44,7 @@
|
|||
extraConfig = ''
|
||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||
|
||||
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||
set_real_ip_from 10.202.41.100;
|
||||
real_ip_header proxy_protocol;
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
17
config/hosts/nitter/configuration.nix
Normal file
17
config/hosts/nitter/configuration.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/vda";
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "nitter";
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 8443 ];
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
8
config/hosts/nitter/default.nix
Normal file
8
config/hosts/nitter/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./nginx.nix
|
||||
./nitter.nix
|
||||
];
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue