nixosModules: move tailscale config to hosts

This commit is contained in:
Aly Raffauf 2024-07-07 20:10:54 -04:00
parent e2c9c12c10
commit 58b248367c
10 changed files with 15 additions and 41 deletions

View file

@ -4,7 +4,11 @@
pkgs,
...
}: {
age.secrets.wifi.file = ../secrets/wifi.age;
age.secrets = {
tailscaleAuthKey.file = ../secrets/tailscale/authKeyFile.age;
wifi.file = ../secrets/wifi.age;
};
environment.variables.FLAKE = "github:alyraffauf/nixcfg";
fileSystems = lib.attrsets.optionalAttrs (config.networking.hostName != "mauville") {
@ -118,4 +122,10 @@
};
};
};
services.tailscale = {
enable = true;
openFirewall = true;
authKeyFile = config.age.secrets.tailscaleAuthKey.path;
};
}

View file

@ -39,8 +39,6 @@
enable = true;
syncMusic = false;
};
tailscale.enable = true;
};
users = {

View file

@ -44,10 +44,7 @@
hyprland.enable = true;
};
services = {
syncthing.enable = true;
tailscale.enable = true;
};
services.syncthing.enable = true;
users.aly = {
enable = true;

View file

@ -58,10 +58,7 @@
steam.enable = true;
};
services = {
flatpak.enable = true;
tailscale.enable = true;
};
services.flatpak.enable = true;
users = {
aly = {

View file

@ -136,8 +136,6 @@ in {
syncMusic = true;
musicPath = "${mediaDirectory}/Music";
};
tailscale.enable = true;
};
};

View file

@ -42,10 +42,7 @@
hyprland.enable = true;
};
services = {
syncthing.enable = true;
tailscale.enable = true;
};
services.syncthing.enable = true;
users.aly = {
enable = true;

View file

@ -20,9 +20,7 @@
};
networking.hostName = "rustboro";
system.stateVersion = "24.05";
zramSwap.memoryPercent = 100;
ar = {
@ -41,10 +39,7 @@
hyprland.enable = true;
};
services = {
syncthing.enable = true;
tailscale.enable = true;
};
services.syncthing.enable = true;
users.aly = {
enable = true;

View file

@ -67,8 +67,6 @@
type = lib.types.str;
};
};
tailscale.enable = lib.mkEnableOption "Tailscale WireGuard VPN.";
};
};
}

View file

@ -7,6 +7,5 @@
imports = [
./flatpak
./syncthing
./tailscale
];
}

View file

@ -1,15 +0,0 @@
{
pkgs,
lib,
config,
...
}: {
config = lib.mkIf config.ar.services.tailscale.enable {
age.secrets.tailscaleAuthKey.file = ../../../secrets/tailscale/authKeyFile.age;
services.tailscale = {
enable = true;
openFirewall = true;
authKeyFile = config.age.secrets.tailscaleAuthKey.path;
};
};
}