simple postgres
This commit is contained in:
@@ -42,6 +42,8 @@
|
|||||||
./system-modules/users.nix
|
./system-modules/users.nix
|
||||||
./system-modules/virtualisation.nix
|
./system-modules/virtualisation.nix
|
||||||
./system-modules/ydotool.nix
|
./system-modules/ydotool.nix
|
||||||
|
|
||||||
|
./system-modules/simple-postgres.nix
|
||||||
] ++ (if hyper.isServer then [
|
] ++ (if hyper.isServer then [
|
||||||
./system-modules/nx2site.nix
|
./system-modules/nx2site.nix
|
||||||
./system-modules/hugo.nix
|
./system-modules/hugo.nix
|
||||||
|
|||||||
31
system-modules/simple-postgres.nix
Normal file
31
system-modules/simple-postgres.nix
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{ pkgs, ... }@all: with all; {
|
||||||
|
services.postgresql = {
|
||||||
|
enable = false;
|
||||||
|
ensureUsers = [{
|
||||||
|
name = "nxcaldav";
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
}];
|
||||||
|
package = pkgs.postgresql_16; # https://stackoverflow.com/questions/51688193/how-to-upgrade-postgresql-in-nixos
|
||||||
|
|
||||||
|
dataDir = "/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}"; # default
|
||||||
|
enableJIT = false; # default
|
||||||
|
initdbArgs = []; # default
|
||||||
|
checkConfig = true; # default
|
||||||
|
enableTCPIP = false;
|
||||||
|
# # extraPlugins =
|
||||||
|
initialScript = null; # default
|
||||||
|
authentication = lib.mkForce ''
|
||||||
|
# TYPE DATABASE USER ADDRESS METHOD
|
||||||
|
local all all trust
|
||||||
|
host all all 127.0.0.1/32 trust #scram-sha-256
|
||||||
|
host all all ::1/128 trust #scram-sha-256
|
||||||
|
'';
|
||||||
|
settings = {
|
||||||
|
port = 5432; # default
|
||||||
|
listen_addresses = lib.mkForce "127.0.0.1";
|
||||||
|
log_line_prefix = "[%p] "; # default
|
||||||
|
shared_preload_libraries = [ ]; # default
|
||||||
|
};
|
||||||
|
ensureDatabases = [ "nxcaldav" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user