added port forwards to services
This commit is contained in:
parent
6ab64fafe1
commit
12e1f8067b
|
@ -4,13 +4,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
jellyfinPort = 8096;
|
|
||||||
dnsPort = 53;
|
|
||||||
httpPort = 80;
|
|
||||||
httpsPort = 443;
|
|
||||||
isDebug = false;
|
|
||||||
in {
|
|
||||||
imports = [];
|
imports = [];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
@ -30,18 +24,6 @@ in {
|
||||||
default = "${config.apps.headscale.subdomain}.${config.apps.base_domain}";
|
default = "${config.apps.headscale.subdomain}.${config.apps.base_domain}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home-assistant = {
|
|
||||||
subdomain = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "subdomain of base domain that home-assistant will be hosted at";
|
|
||||||
default = "home-assistant";
|
|
||||||
};
|
|
||||||
hostname = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "hostname that home-assistant will be hosted at";
|
|
||||||
default = "${config.apps.home-assistant.subdomain}.${config.apps.base_domain}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
nextcloud = {
|
nextcloud = {
|
||||||
subdomain = lib.mkOption {
|
subdomain = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
@ -135,20 +117,6 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts =
|
|
||||||
[
|
|
||||||
httpPort
|
|
||||||
httpsPort
|
|
||||||
dnsPort
|
|
||||||
]
|
|
||||||
++ (lib.optional isDebug [
|
|
||||||
jellyfinPort
|
|
||||||
config.services.headscale.port
|
|
||||||
config.services.forgejo.settings.server.HTTP_PORT
|
|
||||||
config.services.home-assistant.config.http.server_port
|
|
||||||
config.services.postgresql.settings.port
|
|
||||||
]);
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
config.services.headscale.package
|
config.services.headscale.package
|
||||||
];
|
];
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
config,
|
config,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
dnsPort = 53;
|
||||||
|
in {
|
||||||
options.host.pihole = {
|
options.host.pihole = {
|
||||||
enable = lib.mkEnableOption "should home-assistant be enabled on this computer";
|
enable = lib.mkEnableOption "should home-assistant be enabled on this computer";
|
||||||
directory = lib.mkOption {
|
directory = lib.mkOption {
|
||||||
|
@ -80,6 +82,9 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
dnsPort
|
||||||
|
];
|
||||||
}
|
}
|
||||||
(lib.mkIf config.host.impermanence.enable {
|
(lib.mkIf config.host.impermanence.enable {
|
||||||
environment.persistence."/persist/system/root" = {
|
environment.persistence."/persist/system/root" = {
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
dataDir = "/var/lib/acme";
|
dataDir = "/var/lib/acme";
|
||||||
|
httpPort = 80;
|
||||||
|
httpsPort = 443;
|
||||||
in {
|
in {
|
||||||
options.host.reverse_proxy = {
|
options.host.reverse_proxy = {
|
||||||
enable = lib.mkEnableOption "turn on the reverse proxy";
|
enable = lib.mkEnableOption "turn on the reverse proxy";
|
||||||
|
@ -54,6 +56,11 @@ in {
|
||||||
})
|
})
|
||||||
config.host.reverse_proxy.subdomains;
|
config.host.reverse_proxy.subdomains;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
httpPort
|
||||||
|
httpsPort
|
||||||
|
];
|
||||||
}
|
}
|
||||||
(lib.mkIf config.host.impermanence.enable {
|
(lib.mkIf config.host.impermanence.enable {
|
||||||
# TODO: figure out how to write an assertion for this
|
# TODO: figure out how to write an assertion for this
|
||||||
|
|
Loading…
Reference in a new issue