aboutsummaryrefslogtreecommitdiff
path: root/hosts/copenhagen/configuration.nix
blob: f3f58bf887a30d03a9796adcceee89256013e8ba (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
52
53
54
55
56
57
58
59
60
61
62
63
64
{ config, lib, pkgs, inputs, ... }:

{
  environment.persistence."/persist/system" = {
    directories = [
      "/srv/minecraft"
    ];
  };

  users.users = {
    root.hashedPasswordFile = "/secrets/passwords/root";

    "c" = {
      isNormalUser = true;
      hashedPasswordFile = "/secrets/passwords/c";
      extraGroups = [ "wheel" "minecraft" ];
      openssh.authorizedKeys.keys = [
        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIDO8JxqS7B2n3YlNtlVMZGARi+GG/z7wLiiyl52qSZc caroline@larimo.re" # c-pc
        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICGftQ5W8QMIVhgDijreliiMgIqwQvxwTkpMftJdQWu+ caroline@larimo.re" # phoenix
      ];
    };
  };

  roles = {
    minecraft = {
      enable = true;

      servers = {
        stargazers = {
          enable = true;
          port = 25566;
        };
      };

      zenith = {
        enable = true;
        port = 25569;
      };
    };
  };

  programs = {
    gnupg.agent = {
      enable = true;
      enableSSHSupport = true;
    };
  };

  services = {
    pcscd.enable = true;
    openssh = {
      enable = true;
      ports = [ 42069 ];
      settings = {
        PermitRootLogin = "no";
        PasswordAuthentication = false;
      };
    };
  };

  environment.systemPackages = with pkgs; [
    ffmpeg
  ];
}