Compare commits

..

2 commits

Author SHA1 Message Date
6126aa9142 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.
2026-03-25 11:03:37 +01:00
65aacd4220 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.
2026-03-25 11:03:26 +01:00
2 changed files with 7 additions and 7 deletions

View file

@ -7,14 +7,13 @@
{ {
services.postgresql = { services.postgresql = {
enable = true; enable = true;
ensureDatabases = [ "attic" ]; ensureDatabases = [ "atticd" ];
ensureUsers = [{ name = "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 ]; environment.systemPackages = with pkgs; [ attic-client ];
services.atticd = { services.atticd = {
enable = true; enable = true;
@ -27,7 +26,7 @@
garbage-collection.default-retention-period = "3 months"; garbage-collection.default-retention-period = "3 months";
database.url = "postgresql:///attic?host=/run/postgresql"; database.url = "postgresql:///atticd?host=/run/postgresql";
listen = "[::]:8080"; listen = "[::]:8080";

View file

@ -22,6 +22,7 @@
virtualisation = { virtualisation = {
docker.enable = true; docker.enable = true;
podman.dockerCompat = false; podman.dockerCompat = false;
libvirtd.enable = false;
}; };
# Legacy BIOS boot (Hetzner cloud instance) # Legacy BIOS boot (Hetzner cloud instance)