Add psotgres on starlight
This commit is contained in:
parent
57da35ac07
commit
8286ba0cbc
18
flake.lock
18
flake.lock
|
@ -7,11 +7,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1649887911,
|
"lastModified": 1650841545,
|
||||||
"narHash": "sha256-Af0Ppb1RZ7HWuxUvF0/O7h3cy8tqU2eKFyVwyA1ZD+w=",
|
"narHash": "sha256-AF3fk+p/mHbdtyrI3kpms+MoMVOdGIBGJ+7LT7WWdaU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "7244c6715cb8f741f3b3e1220a9279e97b2ed8f5",
|
"rev": "236c6ec21420e44c38ec76de4fc3335bec1859b5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -23,11 +23,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1650647313,
|
"lastModified": 1650830814,
|
||||||
"narHash": "sha256-6ghnNPXDlG6/tXeIFdbP0cGnik6TGNwc615hhG9dpl4=",
|
"narHash": "sha256-P7vGsHdS19eHVUJt4BeQA4JfauL2nOpEcnYKIbX76YM=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a318a09a96a38382fe61a7f85d03ea6e25c46c56",
|
"rev": "c254b8c915ac912ae9ee9dc74eac555ccbf33795",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -39,11 +39,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1650701402,
|
"lastModified": 1650831523,
|
||||||
"narHash": "sha256-XKfstdtqDg+O+gNBx1yGVKWIhLgfEDg/e2lvJSsp9vU=",
|
"narHash": "sha256-6pDZ08SAXsUx5rOP391x+TG39ENP/XA8VMa1tQvgEjc=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "bc41b01dd7a9fdffd32d9b03806798797532a5fe",
|
"rev": "87d34a6b8982e901b8e50096b8e79ebc0e66cda0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
./boot-config.nix
|
./boot-config.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./scripts.nix
|
./scripts.nix
|
||||||
|
./postgres.nix
|
||||||
../../sets/builder.nix
|
../../sets/builder.nix
|
||||||
../../sets/cpu/amd.nix
|
../../sets/cpu/amd.nix
|
||||||
../../sets/fpga.nix
|
../../sets/fpga.nix
|
||||||
|
|
17
system/starlight/postgres.nix
Normal file
17
system/starlight/postgres.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue