Add psotgres on starlight

This commit is contained in:
Artemis Tosini 2022-04-26 21:00:09 +00:00
parent 57da35ac07
commit 8286ba0cbc
Signed by: artemist
GPG key ID: ADFFE553DCBB831E
4 changed files with 33 additions and 15 deletions

View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1649887911,
"narHash": "sha256-Af0Ppb1RZ7HWuxUvF0/O7h3cy8tqU2eKFyVwyA1ZD+w=",
"lastModified": 1650841545,
"narHash": "sha256-AF3fk+p/mHbdtyrI3kpms+MoMVOdGIBGJ+7LT7WWdaU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "7244c6715cb8f741f3b3e1220a9279e97b2ed8f5",
"rev": "236c6ec21420e44c38ec76de4fc3335bec1859b5",
"type": "github"
},
"original": {
@ -23,11 +23,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1650647313,
"narHash": "sha256-6ghnNPXDlG6/tXeIFdbP0cGnik6TGNwc615hhG9dpl4=",
"lastModified": 1650830814,
"narHash": "sha256-P7vGsHdS19eHVUJt4BeQA4JfauL2nOpEcnYKIbX76YM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a318a09a96a38382fe61a7f85d03ea6e25c46c56",
"rev": "c254b8c915ac912ae9ee9dc74eac555ccbf33795",
"type": "github"
},
"original": {
@ -39,11 +39,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1650701402,
"narHash": "sha256-XKfstdtqDg+O+gNBx1yGVKWIhLgfEDg/e2lvJSsp9vU=",
"lastModified": 1650831523,
"narHash": "sha256-6pDZ08SAXsUx5rOP391x+TG39ENP/XA8VMa1tQvgEjc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bc41b01dd7a9fdffd32d9b03806798797532a5fe",
"rev": "87d34a6b8982e901b8e50096b8e79ebc0e66cda0",
"type": "github"
},
"original": {

View file

@ -5,6 +5,7 @@
./boot-config.nix
./hardware-configuration.nix
./scripts.nix
./postgres.nix
../../sets/builder.nix
../../sets/cpu/amd.nix
../../sets/fpga.nix

View file

@ -0,0 +1,17 @@
{ config, pkgs, ... }:
{
services.postgresql = {
enable = true;
package = pkgs.postgresql_14;
extraPlugins = with config.services.postgresql.package.pkgs; [ postgis ];
ensureDatabases = [ "osm" ];
ensureUsers = [{
name = "artemis";
ensurePermissions = {
"DATABASE osm" = "ALL PRIVILEGES";
};
}];
};
}