chore(vesuvio): split config into multiple files
This commit is contained in:
parent
f5be56222f
commit
250c600a48
3 changed files with 57 additions and 51 deletions
31
systems/vesuvio/frp.nix
Normal file
31
systems/vesuvio/frp.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ config, _utils, ... }:
|
||||
let
|
||||
secrets = _utils.setupSharedSecrets config { secrets = [ "frpToken" ]; };
|
||||
in
|
||||
{
|
||||
imports = [ secrets.generate ];
|
||||
|
||||
services.frp = {
|
||||
enable = true;
|
||||
role = "server";
|
||||
settings = {
|
||||
bindPort = 7000;
|
||||
auth = {
|
||||
method = "token";
|
||||
token = "{{ .Envs.FRP_TOKEN }}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 22 ]; # forgejo-ssh
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
from = 6000;
|
||||
to = 7000;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services.frp.serviceConfig.EnvironmentFile = secrets.get "frpToken";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue