nixfiles/hosts/hetzner-arm/containers/postgresql/default.nix

47 lines
933 B
Nix
Raw Normal View History

{
self,
hostPath,
tree,
inputs,
config,
pkgs,
...
}: let
containerAddresses = import "${hostPath}/data/containerAddresses.nix";
hostIP = containerAddresses.host;
containerIP = containerAddresses.containers.postgresql;
in {
containers.postgresql = {
autoStart = true;
privateNetwork = true;
hostAddress = hostIP;
localAddress = containerIP;
specialArgs = {
inherit inputs;
inherit tree;
inherit self;
inherit hostPath;
};
config = {...}: {
nixpkgs.pkgs = pkgs;
2023-10-16 18:17:28 +01:00
imports = with tree;
[
presets.nixos.containerBase
./secrets.nix
]
++ (with hosts.hetzner-arm.containers.postgresql.profiles; [
postgres
restic
]);
networking.firewall.allowedTCPPorts = [5432];
home-manager.users.root.home.stateVersion = "23.05";
system.stateVersion = "23.05";
};
};
}