summaryrefslogtreecommitdiff
path: root/hosts/himeji/configuration.nix
blob: 04f7e04213042fa34c771ef356bd9d3c3fa9ff31 (plain) (blame)
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
{ config, self, ... }:
{
  imports = [
    ./hardware-configuration.nix
    "${self}/disks/himeji.nix"
    "${self}/modules/core"
    "${self}/modules/options"
    "${self}/modules/server"
  ];

  config = {
    networking.hostName = "himeji";
    system.stateVersion = "24.05";

    modules = {
      mosh.enable = true;

      containers = {
        engine = "docker";

        extraOptions =
          let
            engine = config.modules.containers.engine;
          in
          [
            "--pull=${if engine == "podman" then "newer" else "always"}"
          ]
          ++ (if engine == "podman" then [ "--restart=on-failure" ] else [ ]);
      };
    };
  };
}