nix-deploy/config/hosts/wind/configuration.nix

80 lines
2.1 KiB
Nix
Raw Normal View History

2023-10-22 14:18:29 +02:00
{ config, pkgs, ... }:
2021-09-22 10:16:11 +02:00
{
2023-06-17 12:22:58 +02:00
imports = [
./hardware-configuration.nix
2023-10-03 17:03:44 +02:00
../../common/configuration/nix.nix
2023-11-29 15:09:10 +01:00
../../common/configuration/documentation.nix
2022-02-26 16:09:12 +01:00
../../common/services/ssh.nix
2022-10-24 11:13:11 +02:00
../../common/services/tailscale.nix
../../common/users.nix
2022-02-26 16:09:12 +01:00
./services/acme.nix
2023-06-17 17:16:59 +02:00
./services/borg.nix
2022-02-26 16:09:12 +01:00
./services/coturn.nix
./services/nginx.nix
./services/nitter.nix
2022-02-26 16:09:12 +01:00
./services/postgres.nix
./services/synapse.nix
./services/ttrss.nix
./services/gitea.nix
./services/restic.nix
./services/vaultwarden.nix
./services/wireguard.nix
2022-02-26 16:09:12 +01:00
./data/secrets/secrets.nix
];
2021-09-22 10:16:11 +02:00
2022-02-26 16:09:12 +01:00
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
2023-06-17 12:22:58 +02:00
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
2022-02-26 16:09:12 +01:00
boot.supportedFilesystems = ["zfs"];
2022-08-23 18:36:50 +02:00
services.zfs.autoSnapshot.enable = false;
2022-02-26 16:09:12 +01:00
services.zfs.autoScrub.enable = true;
2021-09-22 10:16:11 +02:00
2022-02-26 16:09:12 +01:00
networking.hostName = "wind";
networking.hostId = "929e7fb7";
time.timeZone = "Europe/Copenhagen";
networking.useDHCP = false;
networking.interfaces.ens3.useDHCP = true;
networking.interfaces.ens3.ipv6.addresses = [ { address = "2a01:4f9:c010:34cb::1"; prefixLength = 64; } ];
networking.defaultGateway6 = { address = "fe80::1"; interface = "ens3"; };
2021-09-22 10:16:11 +02:00
2022-02-26 16:09:12 +01:00
users.users.deploy-web = {
isNormalUser = true;
extraGroups = [ "nginx" ];
2023-06-17 12:22:58 +02:00
openssh.authorizedKeys.keys = [
2022-02-26 16:09:12 +01:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILk4m1uJzxd7pDmMZgnZxqD6lEIfVPf+I4tKPo0jJJrK deploy@drone.data.coop"
];
};
2021-09-22 10:16:11 +02:00
2022-02-26 16:09:12 +01:00
security.sudo.wheelNeedsPassword = false;
2022-02-26 16:09:12 +01:00
environment.systemPackages = with pkgs; [
vim
htop
iotop
dig
2022-10-24 11:13:11 +02:00
tailscale
2022-02-26 16:09:12 +01:00
];
2021-09-22 10:16:11 +02:00
2022-09-17 13:42:25 +02:00
nix.settings = {
auto-optimise-store = true;
trusted-users = [
2022-02-26 16:09:12 +01:00
"root"
"@wheel"
];
};
2021-09-22 10:16:11 +02:00
2022-02-26 16:09:12 +01:00
# Use hetzner firewall instead
networking.firewall.enable = false;
# networking.firewall.allowedTCPPorts = [ 22 80 443 3478 5349 ];
# networking.firewall.allowedUDPPorts = [ 3478 5349 ]
# networking.firewall.allowedUDPPortsRanges = [ { from = 49152; to = 49999; } ];
2021-09-22 10:16:11 +02:00
2022-02-26 16:09:12 +01:00
users.groups.acme.members = [ "nginx" "turnserver" "gitea" ];
users.groups.backup.members = [ "matrix-synapse" "postgres" "gitea" "vaultwarden" ];
2021-09-22 10:16:11 +02:00
2022-02-26 16:09:12 +01:00
system.stateVersion = "21.05";
2021-09-22 10:16:11 +02:00
}