main
nix 94 lines 2.16 KB
Raw
1 {
2 config,
3 inputs,
4 lib,
5 ...
6 }:
7
8 {
9 imports = [
10 ./hardware.nix
11 inputs.srvos.nixosModules.server
12 inputs.srvos.nixosModules.hardware-hetzner-online-amd
13 ../../../modules/rasdaemon.nix
14 ../../modules/common.nix
15 ../../modules/draupnir.nix
16 ../../modules/backup.nix
17 ../../modules/element-web.nix
18 ../../modules/limesurvey.nix
19 ../../modules/matrix-synapse.nix
20 ../../modules/owncast.nix
21 ../../modules/vaultwarden.nix
22 ../../modules/docuseal.nix
23 ./nixpkgs-swh.nix
24 ];
25
26 fileSystems."/boot-1" = {
27 device = "/dev/disk/by-uuid/9299-8E8E";
28 fsType = "vfat";
29 };
30
31 fileSystems."/boot-2" = {
32 device = "/dev/disk/by-uuid/9297-573C";
33 fsType = "vfat";
34 };
35
36 # Bootloader.
37 boot.loader.grub.enable = true;
38 boot.loader.grub.mirroredBoots = lib.mkForce [
39 {
40 path = "/boot-1";
41 devices = [ "/dev/disk/by-id/nvme-SAMSUNG_MZQL23T8HCLS-00A07_S64HNJ0T508051" ];
42 }
43 {
44 path = "/boot-2";
45 devices = [ "/dev/disk/by-id/nvme-SAMSUNG_MZQL23T8HCLS-00A07_S64HNJ0T508053" ];
46 }
47 ];
48
49 networking = {
50 hostName = "caliban";
51 domain = "nixos.org";
52 hostId = "745b334a";
53 };
54
55 disko.devices = import ./disko.nix;
56
57 networking.firewall.allowedTCPPorts = [
58 80
59 443
60 ];
61 networking.firewall.allowedUDPPorts = [ ];
62
63 systemd.network.networks."10-uplink".networkConfig.Address = "2a01:4f9:5a:186c::2";
64
65 sops.secrets.storagebox-ssh-key = {
66 sopsFile = ../../secrets/storagebox-ssh-key.caliban;
67 format = "binary";
68 path = "/var/keys/storagebox-ssh-key";
69 mode = "0600";
70 owner = "root";
71 group = "root";
72 };
73
74 sops.secrets.backup-secret = {
75 sopsFile = ../../secrets/backup-secret.caliban;
76 format = "binary";
77 path = "/var/keys/borg-secret";
78 mode = "0600";
79 owner = "root";
80 group = "root";
81 };
82
83 services.backup = {
84 user = "u391032-sub3";
85 host = "u391032-sub3.your-storagebox.de";
86 hostPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIICf9svRenC/PLKIL9nk6K/pxQgoiFC41wTNvoIncOxs";
87 port = 23;
88 sshKey = config.sops.secrets.storagebox-ssh-key.path;
89 secretPath = config.sops.secrets.backup-secret.path;
90 };
91
92 system.stateVersion = "23.05";
93
94 }