nixos/object: Migrate to SNSD deployment

This commit is contained in:
Jack O'Sullivan 2023-02-19 16:49:07 +00:00
parent f17ed65cb8
commit eceb1ba892
2 changed files with 34 additions and 3 deletions

View File

@ -18,6 +18,7 @@
configuration = { lib, pkgs, config, assignments, ... }:
let
inherit (lib) mkMerge mkIf;
inherit (config.my.user.homeConfig.lib.file) mkOutOfStoreSymlink;
inherit (lib.my) networkdAssignment;
in
{
@ -35,12 +36,20 @@
owner = "sharry";
group = "sharry";
};
"object/minio-client-config.json" = {
owner = config.my.user.config.name;
group = config.my.user.config.group;
};
};
};
firewall = {
tcp.allowed = [ 9000 9001 config.services.sharry.config.bind.port ];
};
user.homeConfig = {
home.file.".mc/config.json".source = mkOutOfStoreSymlink config.age.secrets."object/minio-client-config.json".path;
};
};
systemd = {
@ -57,6 +66,12 @@
};
};
environment = {
systemPackages = with pkgs; [
minio-client
];
};
services = {
minio = {
enable = true;
@ -64,12 +79,10 @@
browser = true;
rootCredentialsFile = config.age.secrets."object/minio.env".path;
dataDir = [ "/mnt/minio" ];
# TODO: Migrate from fs to snsd backend!
package = pkgs.minio_legacy_fs;
};
sharry = {
# TODO: wait for postgres connection to succeed
enable = true;
configOverridesFile = config.age.secrets."object/sharry.conf".path;

View File

@ -0,0 +1,18 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IGhrYnR2ZyBRZDl3
OTVmSG8yc0ZsSWpYMlFkeGxUaC9rK2Rzeldvc1kxVnZYVDJ0UW1ZCm5RRUJXc2My
UW5XVEh5ZkdBa3lNaWZjVlFJbk80K3R5WGd2Y2ErazBqNVEKLT4gWDI1NTE5IDRi
Q2ltQ0wzVEpwVExDME5YV21xL2tsVnJ1V0pyU1ZNTDhqOWNmL2FuQlEKY3d2QlRQ
Mk14dy9pMG5adEdvTjRTNEc3R3FWd2E5ZHNROWhlVzRvcVVwcwotPiBEc25TLVgt
Z3JlYXNlIHcgL25LJm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