nixos/object: Migrate to SNSD deployment
This commit is contained in:
parent
f17ed65cb8
commit
eceb1ba892
@ -18,6 +18,7 @@
|
|||||||
configuration = { lib, pkgs, config, assignments, ... }:
|
configuration = { lib, pkgs, config, assignments, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) mkMerge mkIf;
|
inherit (lib) mkMerge mkIf;
|
||||||
|
inherit (config.my.user.homeConfig.lib.file) mkOutOfStoreSymlink;
|
||||||
inherit (lib.my) networkdAssignment;
|
inherit (lib.my) networkdAssignment;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@ -35,12 +36,20 @@
|
|||||||
owner = "sharry";
|
owner = "sharry";
|
||||||
group = "sharry";
|
group = "sharry";
|
||||||
};
|
};
|
||||||
|
"object/minio-client-config.json" = {
|
||||||
|
owner = config.my.user.config.name;
|
||||||
|
group = config.my.user.config.group;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
firewall = {
|
firewall = {
|
||||||
tcp.allowed = [ 9000 9001 config.services.sharry.config.bind.port ];
|
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 = {
|
systemd = {
|
||||||
@ -57,6 +66,12 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
minio-client
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
minio = {
|
minio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -64,12 +79,10 @@
|
|||||||
browser = true;
|
browser = true;
|
||||||
rootCredentialsFile = config.age.secrets."object/minio.env".path;
|
rootCredentialsFile = config.age.secrets."object/minio.env".path;
|
||||||
dataDir = [ "/mnt/minio" ];
|
dataDir = [ "/mnt/minio" ];
|
||||||
|
|
||||||
# TODO: Migrate from fs to snsd backend!
|
|
||||||
package = pkgs.minio_legacy_fs;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sharry = {
|
sharry = {
|
||||||
|
# TODO: wait for postgres connection to succeed
|
||||||
enable = true;
|
enable = true;
|
||||||
configOverridesFile = config.age.secrets."object/sharry.conf".path;
|
configOverridesFile = config.age.secrets."object/sharry.conf".path;
|
||||||
|
|
||||||
|
18
secrets/object/minio-client-config.json.age
Normal file
18
secrets/object/minio-client-config.json.age
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IGhrYnR2ZyBRZDl3
|
||||||
|
OTVmSG8yc0ZsSWpYMlFkeGxUaC9rK2Rzeldvc1kxVnZYVDJ0UW1ZCm5RRUJXc2My
|
||||||
|
UW5XVEh5ZkdBa3lNaWZjVlFJbk80K3R5WGd2Y2ErazBqNVEKLT4gWDI1NTE5IDRi
|
||||||
|
Q2ltQ0wzVEpwVExDME5YV21xL2tsVnJ1V0pyU1ZNTDhqOWNmL2FuQlEKY3d2QlRQ
|
||||||
|
Mk14dy9pMG5adEdvTjRTNEc3R3FWd2E5ZHNROWhlVzRvcVVwcwotPiBEc25TLVgt
|
||||||
|
Z3JlYXNlIHcgL25LJmBKXXAKbGVyV1AxQmp0ZHkwME5GbkVMT3N0SmVUdEp6dXBI
|
||||||
|
RHVGWE9Sam9RV0lQUDB4THN2ckgyNzlsb3R4TTdFVHVvSApCYUlxT3FycVhaWU9t
|
||||||
|
VGs0N1o3NmRqbFMrQXNIVEZjL21iblI4ZmhlQStFSHhnNnJSRk9YaGhFCi0tLSBL
|
||||||
|
VzlQNWpDN2ZwMzNNRkQwcmY4c2FGMThOeEhyOGM3MGdSSXpDUnVsN0swCiJvQAOe
|
||||||
|
C/MBw/vJyPxsGV8F66aEX1o1WB5sFEDfOq/tMDxcg4AqFVNbYb4Sjhe5ak9UpBKW
|
||||||
|
ssnTNrp+noUcsVyitIkSVq4zhTdEkSsGo4fOMXF14OPDJWcnDx3mszRbK4hXT0Fr
|
||||||
|
7tGHI7tmI0L2Gurk8NarbTkjEiGek4K30q0xy26c5mM0VZWZoTbRXl7CTLR8uoLT
|
||||||
|
kKbSYB5mYmobW1ZBJMB7wI9tY12dDwUt6QJAOoRxjHALKenNyUtq1RrBo+tlFGjJ
|
||||||
|
2dg+CcGU4T60z/H39xAG54Tc7wbb/xYQXXy5Wqh8BbN9daFXy5Zi+rVOPwqi7bnr
|
||||||
|
muXLL4Ios+RcsITCR64IsmPimAJF28TQxYMMOK5LDuBvItSJthG6vrcQZQ3ysNhT
|
||||||
|
aLMseXetdKhxUL83Kq/bZXbRS52N
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
Loading…
Reference in New Issue
Block a user