commit 8834387c9d327d60b339e951d17622e8eb376f76
parent 1e63968049606ffb086d9503159cf68463084793
Author: mtmn <miro@haravara.org>
Date: Thu, 9 Apr 2026 17:21:05 +0200
flake.nix hosts/nixaran/configuration.nix modules/services/attic.nix
Diffstat:
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/flake.nix b/flake.nix
@@ -31,6 +31,11 @@
url = "git+ssh://git@codeberg.org/mtmn/tools.git";
flake = false;
};
+
+ attic = {
+ url = "github:zhaofengli/attic";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
};
outputs = {
@@ -71,6 +76,7 @@
};
}
inputs.agenix.nixosModules.default
+ inputs.attic.nixosModules.atticd
(hostDir + "/configuration.nix")
]
++ (lib.attrValues self.nixosModules)
diff --git a/hosts/nixaran/configuration.nix b/hosts/nixaran/configuration.nix
Binary files differ.
diff --git a/modules/services/attic.nix b/modules/services/attic.nix
@@ -1,7 +1,6 @@
{
config,
lib,
- pkgs,
...
}: let
cfg = config.services.haravara.attic;
@@ -39,9 +38,8 @@ in {
};
config = lib.mkIf cfg.enable {
- services.attic-server = {
+ services.atticd = {
enable = true;
- package = pkgs.attic-server;
settings = {
listen = "127.0.0.1:${toString cfg.port}";
storage = {
@@ -50,17 +48,17 @@ in {
endpoint = cfg.s3Endpoint;
region = cfg.s3Region;
};
- database.url = "postgres:///attic_server?host=/run/postgresql";
+ database.url = "postgres:///atticd?host=/run/postgresql";
};
environmentFile = cfg.credentialsFile;
};
services.postgresql = {
enable = true;
- ensureDatabases = ["attic_server"];
+ ensureDatabases = ["atticd"];
ensureUsers = [
{
- name = "attic-server";
+ name = "atticd";
ensureDBOwnership = true;
}
];