diff --git a/config/nutty-noon.nix b/config/nutty-noon.nix index 62107947..91baac06 100644 --- a/config/nutty-noon.nix +++ b/config/nutty-noon.nix @@ -11,6 +11,7 @@ nixos-hardware.nixosModules.common-cpu-amd nixos-hardware.nixosModules.common-gpu-amd nixos-hardware.nixosModules.common-pc-ssd + ./services/postgres.nix ]; hardware.cpu.amd.updateMicrocode = true; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" "k10temp" ]; diff --git a/config/users/darkkirb.nix b/config/users/darkkirb.nix index b33b9541..1a376b21 100644 --- a/config/users/darkkirb.nix +++ b/config/users/darkkirb.nix @@ -20,4 +20,9 @@ sops.secrets."password/darkkirb" = { neededForUsers = true; }; + services.postgresql.ensureDatabases = [ "darkkirb" ]; + services.postgresql.ensureUsers = [{ + name = "darkkirb"; + ensurePermissions = { "DATABASE darkkirb" = "ALL PRIVILEGES"; }; + }]; }