From 830336ee06c0286215ab4485abf98233609b9306 Mon Sep 17 00:00:00 2001 From: Sweetbread Date: Fri, 21 Mar 2025 00:12:27 +0300 Subject: [PATCH] feat: postgres --- host/Senko/configuration.nix | 2 ++ modules/host.nix | 1 + modules/host/db.nix | 10 ++++++++++ 3 files changed, 13 insertions(+) create mode 100644 modules/host/db.nix diff --git a/host/Senko/configuration.nix b/host/Senko/configuration.nix index 04629e0..c6b258d 100644 --- a/host/Senko/configuration.nix +++ b/host/Senko/configuration.nix @@ -23,4 +23,6 @@ hardware.bluetooth.enable = true; host.laptop = true; + + environment.systemPackages = [ pkgs.dbgate ]; } diff --git a/modules/host.nix b/modules/host.nix index 4bd5cd8..523b33f 100644 --- a/modules/host.nix +++ b/modules/host.nix @@ -3,6 +3,7 @@ ./host/bluetooth.nix ./host/bootloader.nix ./host/console.nix + ./host/db.nix ./host/env.nix ./host/gamemode.nix ./host/gpg.nix diff --git a/modules/host/db.nix b/modules/host/db.nix new file mode 100644 index 0000000..14893b4 --- /dev/null +++ b/modules/host/db.nix @@ -0,0 +1,10 @@ +{ lib, ... }:{ + services.postgresql = { + enable = true; + ensureDatabases = [ "mydatabase" ]; + authentication = lib.mkOverride 10 '' + #type database DBuser auth-method + local all all trust + ''; + }; +} \ No newline at end of file