commit 1da2a4c5fb727640b7e0103356f6b5b5e632943d
parent 50e4e28813f4321a055b346c130858f37677c32d
Author: mtmn <miro@haravara.org>
Date: Thu, 9 Apr 2026 17:28:54 +0200
feat: fix bazel-cache auth, install attic, misc
Diffstat:
6 files changed, 15 insertions(+), 133 deletions(-)
diff --git a/flake.lock b/flake.lock
@@ -23,46 +23,6 @@
"type": "github"
}
},
- "attic": {
- "inputs": {
- "crane": "crane",
- "flake-compat": "flake-compat",
- "flake-parts": "flake-parts",
- "nix-github-actions": "nix-github-actions",
- "nixpkgs": [
- "nixpkgs"
- ],
- "nixpkgs-stable": "nixpkgs-stable"
- },
- "locked": {
- "lastModified": 1758711588,
- "narHash": "sha256-0nZlCCDC5PfndsQJXXtcyrtrfW49I3KadGMDlutzaGU=",
- "owner": "zhaofengli",
- "repo": "attic",
- "rev": "12cbeca141f46e1ade76728bce8adc447f2166c6",
- "type": "github"
- },
- "original": {
- "owner": "zhaofengli",
- "repo": "attic",
- "type": "github"
- }
- },
- "crane": {
- "locked": {
- "lastModified": 1751562746,
- "narHash": "sha256-smpugNIkmDeicNz301Ll1bD7nFOty97T79m4GUMUczA=",
- "owner": "ipetkov",
- "repo": "crane",
- "rev": "aed2020fd3dc26e1e857d4107a5a67a33ab6c1fd",
- "type": "github"
- },
- "original": {
- "owner": "ipetkov",
- "repo": "crane",
- "type": "github"
- }
- },
"darwin": {
"inputs": {
"nixpkgs": [
@@ -87,7 +47,7 @@
},
"deploy-rs": {
"inputs": {
- "flake-compat": "flake-compat_2",
+ "flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
@@ -130,22 +90,6 @@
"flake-compat": {
"flake": false,
"locked": {
- "lastModified": 1747046372,
- "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
- "owner": "edolstra",
- "repo": "flake-compat",
- "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
- "type": "github"
- },
- "original": {
- "owner": "edolstra",
- "repo": "flake-compat",
- "type": "github"
- }
- },
- "flake-compat_2": {
- "flake": false,
- "locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
@@ -159,27 +103,6 @@
"type": "github"
}
},
- "flake-parts": {
- "inputs": {
- "nixpkgs-lib": [
- "attic",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1751413152,
- "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=",
- "owner": "hercules-ci",
- "repo": "flake-parts",
- "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5",
- "type": "github"
- },
- "original": {
- "owner": "hercules-ci",
- "repo": "flake-parts",
- "type": "github"
- }
- },
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -221,27 +144,6 @@
"type": "github"
}
},
- "nix-github-actions": {
- "inputs": {
- "nixpkgs": [
- "attic",
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1737420293,
- "narHash": "sha256-F1G5ifvqTpJq7fdkT34e/Jy9VCyzd5XfJ9TO8fHhJWE=",
- "owner": "nix-community",
- "repo": "nix-github-actions",
- "rev": "f4158fa080ef4503c8f4c820967d946c2af31ec9",
- "type": "github"
- },
- "original": {
- "owner": "nix-community",
- "repo": "nix-github-actions",
- "type": "github"
- }
- },
"nix-index-database": {
"inputs": {
"nixpkgs": [
@@ -278,26 +180,9 @@
"type": "github"
}
},
- "nixpkgs-stable": {
- "locked": {
- "lastModified": 1751741127,
- "narHash": "sha256-t75Shs76NgxjZSgvvZZ9qOmz5zuBE8buUaYD28BMTxg=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "29e290002bfff26af1db6f64d070698019460302",
- "type": "github"
- },
- "original": {
- "owner": "NixOS",
- "ref": "nixos-25.05",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
"root": {
"inputs": {
"agenix": "agenix",
- "attic": "attic",
"deploy-rs": "deploy-rs",
"disko": "disko",
"home-manager": "home-manager_2",
diff --git a/flake.nix b/flake.nix
@@ -31,11 +31,6 @@
url = "git+ssh://git@codeberg.org/mtmn/tools.git";
flake = false;
};
-
- attic = {
- url = "github:zhaofengli/attic";
- inputs.nixpkgs.follows = "nixpkgs";
- };
};
outputs = {
@@ -76,7 +71,6 @@
};
}
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/hosts/void/default.nix b/hosts/void/default.nix
@@ -100,6 +100,8 @@
ragenix
statix
nix-diff
+ attic-client
+ attic-server
];
net = with pkgs; [
diff --git a/modules/services/attic.nix b/modules/services/attic.nix
@@ -32,14 +32,22 @@ in {
};
port = lib.mkOption {
type = lib.types.port;
- default = 8081;
+ default = 7381;
description = "Port for Attic to listen on";
};
};
config = lib.mkIf cfg.enable {
+ users.users.atticd = {
+ isSystemUser = true;
+ group = "atticd";
+ };
+ users.groups.atticd = {};
+
services.atticd = {
enable = true;
+ user = "atticd";
+ group = "atticd";
settings = {
listen = "127.0.0.1:${toString cfg.port}";
storage = {
@@ -48,20 +56,13 @@ in {
endpoint = cfg.s3Endpoint;
region = cfg.s3Region;
};
- database.url = "postgres:///atticd?host=/run/postgresql";
};
environmentFile = cfg.credentialsFile;
};
- services.postgresql = {
- enable = true;
- ensureDatabases = ["atticd"];
- ensureUsers = [
- {
- name = "atticd";
- ensureDBOwnership = true;
- }
- ];
+ systemd.services.atticd.serviceConfig = {
+ Environment = ["S3_ADDRESSING_STYLE=path"];
+ DynamicUser = lib.mkForce false;
};
services.caddy.virtualHosts."${cfg.domain}".extraConfig = ''
diff --git a/secrets/attic-credentials.age b/secrets/attic-credentials.age
Binary files differ.