bvm-netbox: add postgresql/redis/users
This commit is contained in:
parent
d54d0a2ede
commit
94078428f1
1 changed files with 24 additions and 0 deletions
|
@ -25,5 +25,29 @@
|
|||
};
|
||||
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";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue