aboutsummaryrefslogtreecommitdiff
path: root/infra/hosts/plato/plato.nix
blob: e8a534e826908e282e03880008686c86080ff01e (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
65
66
67
68
69
70
71
{ config, ... }:
let
  flakeConfig = config;
in
{
  flake.modules.nixos.plato =
    { config, ... }:
    {
      imports = map (m: flakeConfig.flake.modules.nixos."${m}") [
        # keep-sorted start
        "base"
        "deploy"
        "gitserver"
        # keep-sorted end
      ];

      infra = {
        tailscale = {
          authenticate = true;
          ssh = true;
        };

        zfs.pool = "zroot";
      };

      networking = {
        hostName = "plato";
        hostId = "56d7f0f2";
      };

      hardware.facter.reportPath = ./facter.json;
      system.stateVersion = "26.11";

      boot.loader = {
        efi.canTouchEfiVariables = true;
        systemd-boot = {
          enable = true;
          configurationLimit = 100;
          editor = false;
        };
      };

      disko.devices.disk.main = {
        type = "disk";
        imageSize = "100G";
        device = "/dev/disk/by-id/ata-CONSISTENT_SSD_S7_512GB_09092225J0987";
        content = {
          type = "gpt";
          partitions = {
            boot = {
              size = "1G";
              type = "EF00";
              content = {
                type = "filesystem";
                format = "vfat";
                mountpoint = "/boot";
                mountOptions = [ "umask=0077" ];
              };
            };
            zfs = {
              size = "100%";
              content = {
                type = "zfs";
                pool = config.infra.zfs.pool;
              };
            };
          };
        };
      };
    };
}