mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
Convert the nextcloud module into a container
This commit is contained in:
parent
35f77628cc
commit
f0295cd9e1
8 changed files with 170 additions and 134 deletions
30
hosts/proxima/containers/nextcloud/tailscale.nix
Normal file
30
hosts/proxima/containers/nextcloud/tailscale.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
authKeyFile = "/run/secrets/tailscale-auth-key";
|
||||
useRoutingFeatures = "server";
|
||||
interfaceName = "userspace-networking";
|
||||
extraUpFlags = [ "--ssh" ];
|
||||
};
|
||||
|
||||
systemd.services.nextcloud-serve = {
|
||||
after = [
|
||||
"tailscaled.service"
|
||||
"tailscaled-autoconnect.service"
|
||||
];
|
||||
wants = [ "tailscaled.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
${lib.getExe pkgs.tailscale} cert ${config.networking.fqdn}
|
||||
${lib.getExe pkgs.tailscale} serve reset
|
||||
${lib.getExe pkgs.tailscale} serve --bg 80
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue