draft: postgres in container
This commit is contained in:
parent
181e6f681e
commit
f48059e37e
9 changed files with 327 additions and 103 deletions
|
|
@ -1,3 +1,34 @@
|
|||
{}:
|
||||
{ pkgs, hexname-backend, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
hexname-backend = hexname-backend.packages.${super.stdenv.hostPlatform.system}.default;
|
||||
})
|
||||
];
|
||||
|
||||
users.groups.hexname = {};
|
||||
users.users = {
|
||||
hexname-backend = {
|
||||
group = "hexname";
|
||||
isSystemUser = true;
|
||||
createHome = true;
|
||||
home = "/var/lib/hexname/backend";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.hexname-backend = {
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment = {
|
||||
ENV_PATH = "/etc/env/hexname/backend.env";
|
||||
};
|
||||
serviceConfig = {
|
||||
User = "hexname-backend";
|
||||
Group = "hexname";
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.hexname-backend}/bin/dns-backend";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue