haccfiles/parsons/configuration.nix

94 lines
2 KiB
Nix
Raw Normal View History

2021-07-29 20:31:52 +00:00
{ config, lib, pkgs, sources, modules, ... }:
{
imports = [
../common
2021-07-29 20:31:52 +00:00
./hardware.nix
modules.encboot
modules.nopersist
./nftables.nix
./nextcloud.nix
./mattermost.nix
./murmur.nix
./hedgedoc-hacc.nix
./hedgedoc-i4f.nix
./mail.nix
./forgejo.nix
./nginx-pages.nix
./vaultwarden.nix
./tracktrain.nix
./uffd.nix
2021-08-11 20:31:25 +00:00
./lxc.nix
./monit.nix
2021-07-29 20:31:52 +00:00
];
hacc.bindToPersist = [ "/var/lib/acme" ];
2022-11-14 17:14:22 +00:00
hacc.encboot = {
2021-07-29 20:31:52 +00:00
enable = true;
dataset = "-a";
networkDrivers = [ "igb" ];
};
sops.defaultSopsFile = ../secrets.yaml;
sops.age.sshKeyPaths = [ "/persist/ssh/ssh_host_ed25519_key" ];
2021-07-29 20:31:52 +00:00
boot.loader.grub.enable = true;
boot.loader.grub.devices = [ "/dev/nvme0n1" "/dev/nvme1n1" ];
boot.supportedFilesystems = [ "zfs" ];
networking.hostId = "b2867696";
networking.useDHCP = true;
2021-08-04 13:59:35 +00:00
networking.nftables.enable = true;
2021-07-29 20:31:52 +00:00
networking.hostName = "parsons";
2021-08-07 19:19:06 +00:00
networking.interfaces.enp35s0.ipv6.addresses = [{
address = "2a01:4f9:3a:2ddb::1";
prefixLength = 64;
}];
networking.defaultGateway6 = {
address = "fe80::1";
interface = "enp35s0";
};
2021-08-07 19:24:59 +00:00
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
"parsons.hacc.space" = {
default = true;
locations."/".return = "404";
};
"hacc.space" = {
enableACME = true;
forceSSL = true;
locations."/".return = "302 https://hacc.earth";
};
};
};
2021-08-06 17:40:57 +00:00
networking.firewall.allowedTCPPorts = [ 80 443 ];
2021-08-06 18:49:27 +00:00
services.restic.backups.tardis = {
2024-01-28 14:32:18 +00:00
passwordFile = "/run/secrets/restic/system";
environmentFile = "/run/secrets/restic/s3creds.env";
2021-08-06 18:49:27 +00:00
paths = [
"/home"
"/persist"
];
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 5"
"--keep-monthly 3"
];
repository = "b2:tardis-parsons:system";
};
2024-01-28 14:32:18 +00:00
sops.secrets = {
"restic/system" = {};
"restic/s3creds.env" = {};
};
2021-07-29 20:31:52 +00:00
system.stateVersion = "21.05";
}