diff --git a/hosts/nixos-testbed/configuration.nix b/hosts/nixos-testbed/configuration.nix index d32dd92..7386640 100755 --- a/hosts/nixos-testbed/configuration.nix +++ b/hosts/nixos-testbed/configuration.nix @@ -8,7 +8,7 @@ sydnix = { filesystemType = "btrfs"; - # gpg.enable = true; + tailscale.enable = true; users.users = [ "crumb" diff --git a/modules/nixos/hosts.nix b/modules/nixos/hosts.nix new file mode 100644 index 0000000..0f58843 --- /dev/null +++ b/modules/nixos/hosts.nix @@ -0,0 +1,9 @@ +{ config, lib, pkgs, ... }: + +{ + config = { + networking.hosts = { + "100.95.131.43" = [ "whitepc" ]; + }; + }; +} diff --git a/modules/nixos/tailscale.nix b/modules/nixos/tailscale.nix new file mode 100644 index 0000000..e07ff17 --- /dev/null +++ b/modules/nixos/tailscale.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let cfg = config.sydnix.tailscale; +in { + options = { + sydnix.tailscale = { + enable = mkEnableOption "Tailscale"; + }; + }; + + config = mkIf cfg.enable { + services.tailscale.enable = true; + + networking.firewall.trustedInterfaces = [ + "36mtailscale0" + ]; + }; +}