machine/serverle: enable nginx with separate network config

This commit is contained in:
Felix Buehler 2023-02-23 20:02:46 +01:00
parent 7085003f2a
commit 6d0b676cce
3 changed files with 39 additions and 4 deletions

View file

@ -4,6 +4,7 @@
./hardware-configuration.nix ./hardware-configuration.nix
./disks.nix ./disks.nix
./dyndns.nix ./dyndns.nix
./network.nix
./services.nix ./services.nix
./syncthing.nix ./syncthing.nix
./system.nix ./system.nix
@ -21,10 +22,6 @@
gnupg.sshKeyPaths = [ ]; gnupg.sshKeyPaths = [ ];
}; };
networking.firewall.allowedTCPPorts = [
8080 # aria
];
# Nix # Nix
nix.gc = { nix.gc = {
automatic = true; automatic = true;

View file

@ -0,0 +1,11 @@
{ config, lib, pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [
8080 # aria
];
networking = {
domain = "stunkymonkey.de";
search = [ "stunkymonkey.de" ];
};
}

View file

@ -4,8 +4,12 @@ let
secrets = config.sops.secrets; secrets = config.sops.secrets;
in in
{ {
sops.secrets."acme/inwx" = { };
sops.secrets."borgbackup/password" = { }; sops.secrets."borgbackup/password" = { };
sops.secrets."borgbackup/ssh_key" = { }; sops.secrets."borgbackup/ssh_key" = { };
sops.secrets."sso/auth-key" = { };
sops.secrets."sso/felix/password-hash" = { };
sops.secrets."sso/felix/totp-secret" = { };
# List services that you want to enable: # List services that you want to enable:
my.services = { my.services = {
@ -23,5 +27,28 @@ in
jellyfin = { jellyfin = {
enable = true; enable = true;
}; };
# Dashboard
homer = {
enable = true;
};
# Webserver
nginx = {
enable = true;
acme = {
credentialsFile = secrets."acme/inwx".path;
};
sso = {
authKeyFile = secrets."sso/auth-key".path;
users = {
felix = {
passwordHashFile = secrets."sso/felix/password-hash".path;
totpSecretFile = secrets."sso/felix/totp-secret".path;
};
};
groups = {
root = [ "felix" ];
};
};
};
}; };
} }