change port on postgresql

This commit is contained in:
2025-12-26 11:55:31 -06:00
parent bf18cb0d5d
commit 1118a4a25d
+33 -15
View File
@@ -1,4 +1,10 @@
{ config, lib, pkgs, meta, ... }: {
config,
lib,
pkgs,
meta,
...
}:
let let
nimhStaticSite = pkgs.runCommand "nimh-static-site" { } '' nimhStaticSite = pkgs.runCommand "nimh-static-site" { } ''
@@ -9,7 +15,10 @@ in
{ {
imports = [ ]; imports = [ ];
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# Secret Management # Secret Management
@@ -84,8 +93,6 @@ in
}; };
}; };
# Setup vhosts via nginx # Setup vhosts via nginx
services.nginx = { services.nginx = {
enable = true; enable = true;
@@ -130,12 +137,15 @@ in
dataDir = "/persist/data/minio"; dataDir = "/persist/data/minio";
credentialsFile = config.sops.secrets."minio-credentials".path; credentialsFile = config.sops.secrets."minio-credentials".path;
dataPort = 9000; # S3 API access dataPort = 9000; # S3 API access
consolePort = 9001; # Admin console access consolePort = 9001; # Admin console access
bootstrap-minio = { bootstrap-minio = {
enable = true; enable = true;
environments = [ "dev" "prod" ]; environments = [
"dev"
"prod"
];
}; };
default-nginx = { default-nginx = {
@@ -148,19 +158,19 @@ in
# BLOG SERVICE # # BLOG SERVICE #
# ================================ # # ================================ #
# Fullstack sourcecode
# Minio for backend storage # Minio for backend storage
# Postgresql/postgrest for text storage # Postgresql/postgrest for text storage
services.postgresql-db = { services.postgresql-db = {
enable = true; enable = true;
dataDir = "/var/lib/postgresql"; dataDir = "/var/lib/postgresql";
port = 5432; port = 5431;
credentialsFile = config.sops.secrets."postgresql-credentials".path; credentialsFile = config.sops.secrets."postgresql-credentials".path;
databases = [ "rdblog" ]; databases = [ "rdblog" ];
}; };
# Fullstack sourcecode
# ================================ # # ================================ #
# END BLOG SERVICE # # END BLOG SERVICE #
# ================================ # # ================================ #
@@ -178,7 +188,6 @@ in
# END MINECRAFT # # END MINECRAFT #
# ================================ # # ================================ #
# Grub Boot Loader Setup # Grub Boot Loader Setup
boot.loader = { boot.loader = {
efi = { efi = {
@@ -201,11 +210,18 @@ in
hostName = meta.hostname; hostName = meta.hostname;
hostId = meta.hostId; hostId = meta.hostId;
defaultGateway = "10.0.0.1"; defaultGateway = "10.0.0.1";
nameservers = [ "1.1.1.1" "1.0.0.1" ]; nameservers = [
"1.1.1.1"
"1.0.0.1"
];
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 22 80 443]; allowedTCPPorts = [
22
80
443
];
}; };
interfaces.eth0.ipv4.addresses = [ interfaces.eth0.ipv4.addresses = [
@@ -249,11 +265,13 @@ in
# pulse.enable = true; # pulse.enable = true;
# }; # };
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.sysAdmin = { users.users.sysAdmin = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "networkManager" ]; extraGroups = [
"wheel"
"networkManager"
];
# created with mkpasswd # created with mkpasswd
hashedPassword = "$y$j9T$ILYm49Ylk4h6Wforpdw161$ds0DvzLQkbh0o3vN6D.gZ4KMo..0AOR/DwNcWtY0nH2"; hashedPassword = "$y$j9T$ILYm49Ylk4h6Wforpdw161$ds0DvzLQkbh0o3vN6D.gZ4KMo..0AOR/DwNcWtY0nH2";
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [