feat(network): adding options for dns and search
This commit is contained in:
@@ -18,7 +18,7 @@ in {
|
||||
};
|
||||
url = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "jellyfin.${srv.domain}";
|
||||
default = "sobotka.taila7448a.ts.net";
|
||||
};
|
||||
homepage.name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
@@ -53,9 +53,9 @@ in {
|
||||
routers = {
|
||||
jellyfinRouter = {
|
||||
entryPoints = ["websecure"];
|
||||
rule = "Host(`fin.${srv.www.url}`)";
|
||||
rule = "Host(`${cfg.url}`)";
|
||||
service = "${unit}";
|
||||
tls.certResolver = "tailscale";
|
||||
tls.certResolver = "vpn";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
28
modules/server/tailscale/default.nix
Normal file
28
modules/server/tailscale/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.server.tailscale;
|
||||
in {
|
||||
options.server.tailscale = {
|
||||
enable = mkEnableOption "Enable tailscale server configuration";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
age.secrets.sobotkaTsAuth.file = "${self}/secrets/sobotkaTsAuth.age";
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
useRoutingFeatures = "server";
|
||||
authKeyFile = config.age.secrets.sobotkaTsAuth.path;
|
||||
extraSetFlags = [
|
||||
"--advertise-exit-node"
|
||||
"--advertise-routes=192.168.88.0/24"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -49,7 +49,7 @@ in {
|
||||
dashboard = true;
|
||||
};
|
||||
certificatesResolvers = {
|
||||
tailscale.tailscale = {};
|
||||
vpn.tailscale = {};
|
||||
letsencrypt = {
|
||||
acme = {
|
||||
email = "adam@cnst.dev";
|
||||
|
||||
Reference in New Issue
Block a user