nixos/object: Use local storage instead of s3
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 14m46s
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 14m46s
This commit is contained in:
@@ -145,6 +145,7 @@
|
||||
|
||||
(lvmDisk "media")
|
||||
(lvmDisk "minio")
|
||||
(lvmDisk "nix-atticd")
|
||||
(lvmDisk "git")
|
||||
]);
|
||||
};
|
||||
|
@@ -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;
|
||||
|
@@ -81,6 +81,7 @@ in
|
||||
fsType = "ext4";
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/mnt/media" = {
|
||||
device = "/dev/disk/by-label/media";
|
||||
fsType = "ext4";
|
||||
@@ -89,6 +90,10 @@ in
|
||||
device = "/dev/disk/by-label/minio";
|
||||
fsType = "xfs";
|
||||
};
|
||||
"/mnt/atticd" = {
|
||||
device = "/dev/disk/by-label/atticd";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
@@ -175,6 +180,7 @@ in
|
||||
object = {
|
||||
bindMounts = {
|
||||
"/mnt/minio".readOnly = false;
|
||||
"/mnt/atticd".readOnly = false;
|
||||
};
|
||||
};
|
||||
toot = {};
|
||||
|
Reference in New Issue
Block a user