summaryrefslogtreecommitdiff
path: root/ymir.nix
blob: e7b9b88c19e1c8a0eaea241c38a67e2aa0ad5e29 (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
{ config, pkgs, ... }:

{
  imports =
    [
      ./ymir-hw.nix
      ./custom/zsh.nix
      ./users.nix
    ];

  boot.loader.grub.enable = true;
  boot.loader.grub.version = 2;

  networking.hostName = "ymir";
  networking.hostId = "1c5c994e";

  environment.systemPackages = with pkgs; [
    git
    mosh
    rsync
    tmux
    zsh
  ];

  # List services that you want to enable:

  services.openssh = {
    enable = true;
  };

  services.fcron = {
    enable = true;
    systab = ''
      %weekly * * nix-collect-garbage --delete-older-than '7d'
    '';
  };

  networking.firewall = {
    enable = true;
    allowPing = true;
    allowedTCPPorts = [ 22
                      ];
    allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh
                           ];
  };

  services.ntp = {
    enable = false;
  };

  services.chrony = {
    enable = true;
  };

  users.extraUsers.root = let
    template = (import users/gkleen.nix);
    in {
        inherit (template) shell;
        openssh.authorizedKeys.keyFiles = template.openssh.authorizedKeys.keyFiles;
      };
}