~sumner/nixos-configuration

ref: f4eb6417bc48729411263dc754fbe8c63a65d5bf nixos-configuration/host-configurations/nevarro.nix -rw-r--r-- 2.2 KiB
f4eb6417Sumner Evans standupbot: 0.4.1rc2 0.4.1rc3 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{ config, lib, ... }: {
  hardware.isServer = true;

  # Set the hostname
  networking.hostName = "nevarro";
  networking.domain = "nevarro.space";

  networking.interfaces.eth0.useDHCP = true;

  # Enable a lot of swap since we have enough disk. This way, if Airsonic eats
  # memory, it won't crash the box.
  swapDevices = [
    {
      device = "/var/swapfile";
      size = 4096;
    }
  ];

  fileSystems = {
    "/mnt/nevarro-postgresql-data" = { device = "/dev/disk/by-id/scsi-0Linode_Volume_nevarro-postgresql-data"; fsType = "ext4"; };
  };

  # Websites
  services.nginx.websites = [
    { hostname = "nevarro.space"; }
  ];

  ############
  # Services #
  ############
  services.grafana.enable = true;
  services.healthcheck.checkId = "0a1a1c13-e65d-4968-a498-c5709dcb2ae8";
  services.logrotate.enable = true;

  # Heisenbridge
  services.heisenbridge = {
    enable = true;
  } // (import ../secrets/matrix/appservices/heisenbridge.nix);

  # LinkedIn <-> Matrix Bridge
  services.linkedin-matrix = {
    enable = true;
  } // (import ../secrets/matrix/appservices/linkedin-matrix.nix);

  # Longview
  services.longview.enable = true;
  services.longview.apiKeyFile = ../secrets/longview/nevarro;

  # Mjolnir
  services.mjolnir.enable = true;

  # Mumble
  services.murmur.enable = true;

  # PosgreSQL
  services.postgresql.enable = true;
  services.postgresql.dataDir = "/mnt/nevarro-postgresql-data/postgresql/11.1";
  services.postgresqlBackup.enable = true;

  # Quotesfilebot
  services.quotesfilebot.enable = true;
  services.quotesfilebot.passwordFile = "/etc/nixos/secrets/matrix/bots/quotesfilebot";

  # Restic backup
  services.backup.healthcheckId = "5af26654-5ca7-405a-b8c4-e00a2fc6a5b0";
  services.backup.healthcheckPruneId = "d58fb3c6-532b-4db2-9538-c3a5908f3d2c";

  # Standupbot
  services.standupbot.enable = true;
  services.standupbot.passwordFile = "/etc/nixos/secrets/matrix/bots/standupbot";

  # Synapse
  services.matrix-synapse-custom.enable = true;
  services.matrix-synapse-custom.registrationSharedSecretFile = ../secrets/matrix/registration-shared-secret/nevarro;
  services.cleanup-synapse.environmentFile = "/etc/nixos/secrets/matrix/cleanup-synapse/bespin";
}