summaryrefslogtreecommitdiff
path: root/chaski/configuration.nix
blob: da8fdaf3ba8067893c137b23fa06fd035c400dd2 (plain)
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
# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      # ./services/uplcg.nix
      ./services/chat.nix
      ./services/bahnhof-name.nix
      ./services/conduit.nix
    ];

  sops.defaultSopsFile = ../secrets/chaski.yaml;
  # This will automatically import SSH keys as age keys
  sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];

  environment.noXlibs = true;
  services.nginx.enable = true;
  services.nginx.package = pkgs.nginx.override { gd = null; };

  # Use the GRUB 2 boot loader.
  boot.loader.grub.enable = true;
  boot.loader.grub.devices = [ "/dev/sda" ];

  networking = {
    hostName = "chaski";

    enableIPv6 = true;
    defaultGateway6 = {
      address = "fe80::1";
      interface = "ens3";
    };

    interfaces.ens3.ipv6.addresses = [ {
      address = "2a01:4f9:c010:69ed::1";
      prefixLength = 64;
    } ];

    useDHCP = false;
    interfaces.ens10.useDHCP = true;
    interfaces.ens3.useDHCP = true;

    firewall.logRefusedConnections = false;
    firewall.allowedTCPPorts = [ 80 443 ];
  };
  system.stateVersion = "20.09"; # Did you read the comment?
}