switch to ssh store

This commit is contained in:
Cyryl Płotnicki 2023-01-01 21:44:25 +00:00
parent b779a8a3fe
commit 84c15ddf0e

View file

@ -1,22 +1,10 @@
{ config, pkgs, ... }:
let
objectsPort = 10000;
adminPort = 10001;
in {
sops.secrets."minio-env" = {
sopsFile = ./minio.sops;
format = "binary";
};
networking.firewall.allowedTCPPorts = [ objectsPort adminPort ];
services.minio = {
{ config, pkgs, ... }: {
nix.settings.trusted-users = [ "nix-ssh" ];
nix.sshServe = {
enable = true;
region = "cyplodev";
dataDir = [ "/var/lib/minio/data" ];
configDir = "/var/lib/minio/config";
listenAddress = ":${toString objectsPort}";
consoleAddress = ":${toString adminPort}";
rootCredentialsFile = "${config.sops.secrets.minio-env.path}";
write = true;
keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF4OvRjIUlO2TGPTjYNXbgFuP95uvbszyBjqvAC+Z8zH release-bot@cyplo.dev"
];
};
}