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": { "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": {

View file

@ -11,12 +11,12 @@
# We have to do this as text to gaurantee it's part of the last Host * block # We have to do this as text to gaurantee it's part of the last Host * block
userKnownHostsFile = "~/.ssh/known_hosts ${./extra_known_hosts}"; userKnownHostsFile = "~/.ssh/known_hosts ${./extra_known_hosts}";
extraConfig = '' extraConfig = ''
KexAlgorithms sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256 KexAlgorithms sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
VerifyHostKeyDNS ask VerifyHostKeyDNS ask
VisualHostKey yes VisualHostKey yes
UpdateHostKeys ask UpdateHostKeys ask
''; '';
# Most hosts are set in private # Most hosts are set in private

View file

@ -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

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";
};
}];
};
}