From 65aacd42209643da8ed8b81317caf1f4102fdf17 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 25 Mar 2026 11:03:26 +0100 Subject: [PATCH 1/2] feat(attic): disable libvirtd in virtualization config - Set `libvirtd.enable` to `false` in `default.nix` to align with the current virtualization setup. - Prevents unnecessary service activation and reduces resource usage. --- systems/x86_64-linux/attic/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/systems/x86_64-linux/attic/default.nix b/systems/x86_64-linux/attic/default.nix index 8daa780..e6658e5 100644 --- a/systems/x86_64-linux/attic/default.nix +++ b/systems/x86_64-linux/attic/default.nix @@ -22,6 +22,7 @@ virtualisation = { docker.enable = true; podman.dockerCompat = false; + libvirtd.enable = false; }; # Legacy BIOS boot (Hetzner cloud instance) From 6126aa9142761625710952a3cc5331943ed2ab00 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 25 Mar 2026 11:03:37 +0100 Subject: [PATCH 2/2] fix(attic): adjust PostgreSQL config for atticd ownership - Rename `attic` database to `atticd` and set `atticd` user as the owner directly. - Remove redundant `postStart` script for altering database ownership. - Update `database.url` to match the renamed database. --- systems/x86_64-linux/attic/atticd.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/systems/x86_64-linux/attic/atticd.nix b/systems/x86_64-linux/attic/atticd.nix index 6ba5e4c..dc91235 100644 --- a/systems/x86_64-linux/attic/atticd.nix +++ b/systems/x86_64-linux/attic/atticd.nix @@ -7,14 +7,13 @@ { services.postgresql = { enable = true; - ensureDatabases = [ "attic" ]; - ensureUsers = [{ name = "atticd"; }]; + ensureDatabases = [ "atticd" ]; + ensureUsers = [{ + name = "atticd"; + ensureDBOwnership = true; + }]; }; - systemd.services.postgresql.postStart = lib.mkAfter '' - psql -d postgres -tAc 'ALTER DATABASE "attic" OWNER TO "atticd"' - ''; - environment.systemPackages = with pkgs; [ attic-client ]; services.atticd = { enable = true; @@ -27,7 +26,7 @@ garbage-collection.default-retention-period = "3 months"; - database.url = "postgresql:///attic?host=/run/postgresql"; + database.url = "postgresql:///atticd?host=/run/postgresql"; listen = "[::]:8080";