45 lines
1021 B
Nix
45 lines
1021 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
let
|
|
stateDir = "/state";
|
|
hostname = "cartus";
|
|
siteName = config.fudo.hosts."${hostname}".site;
|
|
|
|
in {
|
|
config = {
|
|
networking = {
|
|
interfaces.enp3s0 = {
|
|
ipv4.addresses = [{
|
|
address = pkgs.lib.getHostIpv4 hostname;
|
|
prefixLength = pkgs.lib.getSiteV4PrefixLength siteName;
|
|
}];
|
|
};
|
|
firewall.enable = false;
|
|
defaultGateway = {
|
|
address = pkgs.lib.getSiteGatewayV4 siteName;
|
|
interface = "enp3s0";
|
|
};
|
|
};
|
|
|
|
virtualisation = {
|
|
arion.backend = "podman-socket";
|
|
podman = {
|
|
enable = true;
|
|
autoPrune.enable = true;
|
|
dockerSocket.enable = true;
|
|
dockerCompat = true;
|
|
defaultNetwork.settings = {
|
|
dns_enabled = true;
|
|
network_dns_servers = [ "1.1.1.1" "8.8.4.4" ];
|
|
};
|
|
};
|
|
};
|
|
|
|
services.immichContainer = {
|
|
state-directory = "/state/immich/state";
|
|
store-directory = "/state/immich/store";
|
|
};
|
|
};
|
|
}
|