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

76 lines
2 KiB
Nix
Raw Normal View History

2021-09-22 10:16:11 +02:00
{ config, pkgs, lib, ... }:
{
imports = [
./hardware-configuration.nix
2021-09-23 16:45:06 +02:00
../../common/services/openssh.nix
2021-09-22 10:16:11 +02:00
./services/acme.nix
./services/coturn.nix
./services/nginx.nix
./services/postgres.nix
./services/synapse.nix
./services/ttrss.nix
./services/gitea.nix
./services/restic.nix
./services/sshguard.nix
2021-09-23 08:34:01 +02:00
./services/vaultwarden.nix
2021-09-22 10:16:11 +02:00
./data/secrets/secrets.nix
];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda";
boot.supportedFilesystems = ["zfs"];
services.zfs.autoSnapshot.enable = true;
services.zfs.autoScrub.enable = true;
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"; };
users.users.emelie = {
isNormalUser = true;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICO4LyBsW1YuUA6i3EL/IZhchSvk7reO4qgRmR/tdQPU emelie@flap"
];
};
security.sudo.wheelNeedsPassword = false;
environment.systemPackages = with pkgs; [
vim
htop
iotop
2021-09-23 08:34:01 +02:00
dig
2021-09-22 10:16:11 +02:00
];
nix = {
autoOptimiseStore = true;
trustedUsers = [
"root"
"@wheel"
];
};
# 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; } ];
users.groups.acme.members = [ "nginx" "turnserver" "gitea" ];
users.groups.postgres.members = [ "restic" ];
users.groups.gitea.members = [ "restic" ];
users.groups.matrix-synapse.members = [ "restic" ];
system.stateVersion = "21.05";
}