Refactor setup
This commit is contained in:
parent
b6b118f819
commit
a7e892635c
16 changed files with 124 additions and 210 deletions
|
|
@ -1,9 +1,9 @@
|
|||
{ config, ... }:
|
||||
|
||||
let const = config.constants; hn = config.networking.hostName; in {
|
||||
let hn = config.networking.hostName; in {
|
||||
networking = {
|
||||
domain = config.constants.domain;
|
||||
firewall.allowedTCPPorts = with const.port; [ http https ];
|
||||
firewall.trustedInterfaces = [ config.services.tailscale.interfaceName ];
|
||||
hostId = "e6449321";
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
|
|
@ -15,13 +15,6 @@ let const = config.constants; hn = config.networking.hostName; in {
|
|||
};
|
||||
|
||||
services = {
|
||||
cloudflare-dyndns = {
|
||||
enable = true;
|
||||
apiTokenFile = config.sops.secrets."cloudflare/${hn}".path;
|
||||
domains = builtins.attrNames config.services.caddy.virtualHosts;
|
||||
ipv4 = false;
|
||||
ipv6 = true;
|
||||
};
|
||||
openssh = {
|
||||
enable = true;
|
||||
hostKeys = [{
|
||||
|
|
@ -37,6 +30,4 @@ let const = config.constants; hn = config.networking.hostName; in {
|
|||
};
|
||||
resolved.enable = true;
|
||||
};
|
||||
|
||||
sops.secrets."cloudflare/${hn}" = { };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue