nixos/object: Use local storage instead of s3
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 14m46s

This commit is contained in:
2023-11-17 22:14:19 +00:00
parent 4133ed48c5
commit 5766bdda99
5 changed files with 49 additions and 23 deletions

View File

@@ -60,9 +60,23 @@ in
};
};
users = with lib.my.c.ids; let inherit (config.services.atticd) user group; in {
users."${user}" = {
isSystemUser = true;
uid = uids.atticd;
group = group;
};
groups."${user}".gid = gids.atticd;
};
systemd = {
network.networks."80-container-host0" = networkdAssignment "host0" assignments.internal;
services = {
services =
let
awaitPostgres = systemdAwaitPostgres pkgs.postgresql "colony-psql";
in
{
minio = {
environment = {
MINIO_ROOT_USER = "minioadmin";
@@ -71,7 +85,17 @@ in
MINIO_BROWSER_REDIRECT_URL = "https://minio.nul.ie";
};
};
sharry = systemdAwaitPostgres pkgs.postgresql "colony-psql";
sharry = awaitPostgres;
atticd = mkMerge [
awaitPostgres
{
serviceConfig = {
# Needs to be able to access its data
DynamicUser = mkForce false;
BindPaths = [ "/mnt/atticd:/var/lib/atticd/storage" ];
};
}
];
};
};
@@ -159,10 +183,8 @@ in
api-endpoint = "https://nix-cache.${pubDomain}/";
database = mkForce {}; # blank to pull from env
storage = {
type = "s3";
region = "eu-central-1";
bucket = "nix-attic";
endpoint = "https://s3.nul.ie";
type = "local";
path = "/var/lib/atticd/storage";
};
chunking = {
nar-size-threshold = 65536;