bvm-netbox: add postgresql/redis/users

This commit is contained in:
Luke Granger-Brown 2021-08-15 22:57:36 +00:00
parent d54d0a2ede
commit 94078428f1

View file

@ -25,5 +25,29 @@
}; };
my.ip.tailscale = "100.81.27.52"; my.ip.tailscale = "100.81.27.52";
services.postgresql = {
enable = true;
ensureDatabases = [
"netbox"
];
ensureUsers = [{
name = "netbox";
ensurePermissions = { "DATABASE netbox" = "ALL PRIVILEGES"; };
}];
};
services.postgresqlBackup.enable = true;
services.redis = {
enable = true;
};
users.groups.netbox = {};
users.users.netbox = {
home = "/srv/netbox";
isSystemUser = true;
createHome = true;
group = "netbox";
};
system.stateVersion = "21.05"; system.stateVersion = "21.05";
} }