mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
Serve tailscale gui over caddy
This commit is contained in:
parent
3d4c301bd8
commit
5be9e76486
2 changed files with 15 additions and 6 deletions
|
|
@ -17,11 +17,11 @@
|
||||||
|
|
||||||
syncthing = {
|
syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
deviceId = "5R2MH7T-Q2ZZS2P-ZMSQ2UJ-B6VBHES-XYLNMZ6-7FYC27L-4P7MGJ2-FY4ITQD";
|
|
||||||
isServer = true;
|
isServer = true;
|
||||||
|
deviceId = "5R2MH7T-Q2ZZS2P-ZMSQ2UJ-B6VBHES-XYLNMZ6-7FYC27L-4P7MGJ2-FY4ITQD";
|
||||||
|
gui.domain = "syncthing.${config.custom.services.tailscale.domain}";
|
||||||
backups.enable = true;
|
backups.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nextcloud = {
|
nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "cloud.${config.custom.services.tailscale.domain}";
|
domain = "cloud.${config.custom.services.tailscale.domain}";
|
||||||
|
|
@ -34,6 +34,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
caddy.virtualHosts = {
|
caddy.virtualHosts = {
|
||||||
|
syncthing-gui = {
|
||||||
|
inherit (config.custom.services.syncthing.gui) domain port;
|
||||||
|
};
|
||||||
nextcloud = {
|
nextcloud = {
|
||||||
inherit (config.custom.services.nextcloud) domain port;
|
inherit (config.custom.services.nextcloud) domain port;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,17 @@ in
|
||||||
type = lib.types.port;
|
type = lib.types.port;
|
||||||
default = 22000;
|
default = 22000;
|
||||||
};
|
};
|
||||||
guiPort = lib.mkOption {
|
gui = {
|
||||||
|
domain = lib.mkOption {
|
||||||
|
type = lib.types.nonEmptyStr;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
port = lib.mkOption {
|
||||||
type = lib.types.port;
|
type = lib.types.port;
|
||||||
default = 8384;
|
default = 8384;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
assertions = [
|
assertions = [
|
||||||
|
|
@ -41,7 +47,7 @@ in
|
||||||
group = lib.mkIf (!cfg.isServer) "users";
|
group = lib.mkIf (!cfg.isServer) "users";
|
||||||
dataDir = lib.mkIf (!cfg.isServer) "/home/seb";
|
dataDir = lib.mkIf (!cfg.isServer) "/home/seb";
|
||||||
|
|
||||||
guiAddress = lib.mkIf cfg.isServer "0.0.0.0:${toString cfg.guiPort}";
|
guiAddress = lib.mkIf cfg.isServer "127.0.0.1:${toString cfg.gui.port}";
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
# Get the devices and their ids from the configs of the other hosts
|
# Get the devices and their ids from the configs of the other hosts
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue