Home

infra @17cae734b86425c0ca38cd2d7d66d1d1008c6b17 - refs - log -
-
https://git.jolheiser.com/infra.git
My NixOS infrastructure
infra / dragonwell / default.nix
- raw -
 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
{ jolheiser, ... }:
let
  key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+uhnfFLhlyfGGsksSxh5IIY6gnIMryeQ2EiM979kZa";
in
{
  imports = jolheiser.importDir ./services ++ [ ./hardware.nix ];

  boot.tmp.cleanOnBoot = true;
  zramSwap.enable = true;

  networking = {
    hostName = "dragonwell";

    firewall = {
      enable = true;
      allowedTCPPorts = [
        80
        443
        6697
        8448
        8449
      ];
    };
  };

  services = {
    openssh.enable = true;
    tailscale.enable = true;
    fail2ban.enable = true;
  };

  users.users = {
    "${jolheiser.username}" = {
      extraGroups = [
        "wheel"
        "docker"
        "storage"
      ];
      isNormalUser = true;
      openssh.authorizedKeys.keys = [ key ];
    };
    "root".openssh.authorizedKeys.keys = [ key ];
  };

  system.stateVersion = "22.11";
}