2024-05-28 23:23:10 +00:00
|
|
|
# SPDX-FileCopyrightText: 2024 Auxolotl Infrastructure Contributors
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
|
2024-05-07 03:36:54 +00:00
|
|
|
# axol
|
|
|
|
# 137.184.177.239
|
2024-05-04 21:20:45 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
2024-08-08 22:37:17 +00:00
|
|
|
lib,
|
2024-05-04 21:20:45 +00:00
|
|
|
modulesPath,
|
2024-08-08 22:37:17 +00:00
|
|
|
config,
|
2024-05-04 21:20:45 +00:00
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [
|
|
|
|
(modulesPath + "/virtualisation/digital-ocean-config.nix")
|
|
|
|
];
|
|
|
|
|
2024-08-08 22:37:17 +00:00
|
|
|
age.rekey.hostPubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG+vSEiWVIn53Jyhs0QmVa7d7qkoArCWVbP1yKv46FDX";
|
|
|
|
|
2024-05-04 21:20:45 +00:00
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
|
|
|
|
virtualisation.digitalOcean.rebuildFromUserData = false;
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
|
|
80
|
|
|
|
443
|
|
|
|
];
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
neovim
|
|
|
|
];
|
|
|
|
|
|
|
|
auxolotl = {
|
|
|
|
nix.enable = true;
|
|
|
|
|
|
|
|
users.infra.enable = true;
|
|
|
|
|
|
|
|
security = {
|
2024-05-07 03:36:54 +00:00
|
|
|
doas.enable = true;
|
|
|
|
|
2024-05-04 21:20:45 +00:00
|
|
|
acme = {
|
|
|
|
enable = true;
|
|
|
|
email = "jake.hamilton@hey.com";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
2024-05-21 20:38:54 +00:00
|
|
|
ssh.enable = true;
|
2024-05-07 03:36:54 +00:00
|
|
|
chat.enable = true;
|
2024-05-04 21:20:45 +00:00
|
|
|
website.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-08-08 22:37:17 +00:00
|
|
|
clicks.services.headscale = {
|
|
|
|
enable = true;
|
|
|
|
domain = "vpn.auxolotl.org";
|
|
|
|
database_password_path = config.age.secrets."clicks.services.headscale.database_password_path".path;
|
|
|
|
};
|
|
|
|
|
2024-08-09 20:28:14 +00:00
|
|
|
clicks.networking.tailscale = {
|
|
|
|
enable = true;
|
|
|
|
server = "vpn.auxolotl.org";
|
|
|
|
authKeyFile = config.age.secrets."clicks.networking.tailscale.authKeyFile".path;
|
|
|
|
};
|
|
|
|
|
2024-08-08 22:37:17 +00:00
|
|
|
age.secrets."clicks.services.headscale.database_password_path" = {
|
|
|
|
generator.script = "alnum";
|
|
|
|
group = "headscale";
|
|
|
|
mode = "0440"; # Needed to allow headscale group to read
|
|
|
|
unstableName = true; # Clicks option to base the name on a hash of the contents ... helps with autorestarting services
|
|
|
|
};
|
|
|
|
|
2024-08-09 20:28:14 +00:00
|
|
|
age.secrets."clicks.networking.tailscale.authKeyFile" = {
|
|
|
|
rekeyFile = ./clicks.networking.tailscale.authKeyFile.age;
|
|
|
|
unstableName = true;
|
|
|
|
};
|
|
|
|
|
2024-05-04 21:20:45 +00:00
|
|
|
system.stateVersion = "23.11";
|
|
|
|
}
|