try out minio
This commit is contained in:
parent
40bc68df75
commit
b34c4da3b2
6 changed files with 66 additions and 5 deletions
|
@ -80,10 +80,10 @@ cache.cything.io {
|
|||
|
||||
s3.cy7.sh {
|
||||
import common
|
||||
reverse_proxy localhost:3900
|
||||
reverse_proxy localhost:9000
|
||||
}
|
||||
|
||||
admin.s3.cy7.sh {
|
||||
import common
|
||||
reverse_proxy localhost:3903
|
||||
reverse_proxy localhost:9001
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
./element.nix
|
||||
./attic.nix
|
||||
./forgejo.nix
|
||||
./garage.nix
|
||||
./minio.nix
|
||||
];
|
||||
|
||||
sops.age.keyFile = "/root/.config/sops/age/keys.txt";
|
||||
|
@ -67,8 +67,8 @@
|
|||
sopsFile = ../../secrets/services/attic.yaml;
|
||||
};
|
||||
|
||||
"garage/env" = {
|
||||
sopsFile = ../../secrets/services/garage.yaml;
|
||||
"minio/env" = {
|
||||
sopsFile = ../../secrets/services/minio.yaml;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
8
hosts/chunk/minio.nix
Normal file
8
hosts/chunk/minio.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{config, ...}: {
|
||||
services.minio = {
|
||||
enable = true;
|
||||
rootCredentialsFile = config.sops.secrets."minio/env".path;
|
||||
region = "universe";
|
||||
dataDir = ["/mnt/minio"];
|
||||
};
|
||||
}
|
|
@ -56,5 +56,22 @@
|
|||
};
|
||||
};
|
||||
|
||||
systemd.services.minio-mount = {
|
||||
enable = true;
|
||||
description = "Mount the minio data remote";
|
||||
requires = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
requiredBy = [ "minio.service" ];
|
||||
before = [ "minio.service" ];
|
||||
serviceConfig = {
|
||||
Type = "notify";
|
||||
ExecStartPre = "/usr/bin/env mkdir -p /mnt/minio";
|
||||
ExecStart = "${lib.getExe pkgs.rclone} mount --config ${
|
||||
config.sops.secrets."rclone/config".path
|
||||
} --cache-dir /var/cache/rclone --transfers=32 --checkers=32 --vfs-cache-mode writes --vfs-cache-max-size 5G --allow-other rsyncnet:minio /mnt/minio ";
|
||||
ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/minio";
|
||||
};
|
||||
};
|
||||
|
||||
programs.fuse.userAllowOther = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue