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

90 lines
2.2 KiB
Nix
Raw Permalink Normal View History

2021-09-23 16:45:06 +02:00
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./data/secrets/secrets.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
2021-09-27 14:55:55 +02:00
../../common/services/ssh.nix
2022-10-24 11:13:11 +02:00
../../common/services/tailscale.nix
../../common/users.nix
2021-09-23 16:45:06 +02:00
./services/acme.nix
2023-10-26 16:56:34 +02:00
./services/borg.nix
2021-09-23 16:45:06 +02:00
./services/coturn.nix
./services/nginx.nix
./services/synapse.nix
./services/postgres.nix
2022-02-14 12:29:36 +01:00
#./services/mail.nix
#./services/containers.nix
#./services/redis.nix
2021-09-23 16:45:06 +02:00
];
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda";
2023-06-17 12:22:58 +02:00
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
2021-09-23 16:45:06 +02:00
networking = {
hostName = "grondahl";
useDHCP = false;
interfaces = {
"ens3" = {
ipv4.addresses = [ {
address = "107.189.30.157";
prefixLength = 24;
} ];
ipv6.addresses = [ {
address = "2605:6400:30:ef32::1";
prefixLength = 48;
} ];
};
};
defaultGateway = "107.189.30.1";
defaultGateway6 = {
address = "2605:6400:30::1";
interface = "ens3";
};
nameservers = [ "1.1.1.1" "1.0.0.1" "2606:4700:4700::1111" "2606:4700:4700::1001" ];
};
time.timeZone = "Europe/Copenhagen";
security.sudo.wheelNeedsPassword = false;
2022-09-17 13:42:25 +02:00
nix.settings = {
auto-optimise-store = true;
trusted-users = [
2021-09-23 16:45:06 +02:00
"root"
"@wheel"
];
};
users.groups.acme.members = [ "nginx" "turnserver" ];
2021-09-27 14:55:55 +02:00
users.groups.backup.members = [ "matrix-synapse" "postgres" ];
2021-09-23 16:45:06 +02:00
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim
wget
htop
iotop
dig
];
2022-10-24 11:13:11 +02:00
networking.firewall = {
enable = true;
checkReversePath = "loose";
trustedInterfaces = [ "tailscale0" ];
allowedUDPPorts = [ config.services.tailscale.port ];
allowedTCPPorts = [ 22 80 443 ];
allowedTCPPortRanges = [ { from = 3478; to = 3479; } { from = 5349; to = 5350; } ];
allowedUDPPortRanges = [ { from = 3478; to = 3479; } { from = 5349; to = 5350; } { from = 49152; to = 49999; } ];
};
2021-09-23 16:45:06 +02:00
system.stateVersion = "21.05";
}