mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
fix: misc minio fixes
This commit is contained in:
parent
5d6325e5dd
commit
61a4117362
3 changed files with 12 additions and 10 deletions
|
|
@ -6,6 +6,7 @@
|
|||
hardware.local
|
||||
nixos.network
|
||||
services.cockroachdb
|
||||
services.minio
|
||||
./kanidm.nix
|
||||
./vouch.nix
|
||||
./home-assistant.nix
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
{ config, lib, ... }: let
|
||||
import (lib.modules) mkIf mkDefault;
|
||||
{ config, lib, tf, ... }: let
|
||||
inherit (lib.modules) mkIf mkDefault;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.attrsets) mapAttrs' genAttrs nameValuePair;
|
||||
cfg = config.services.minio;
|
||||
in {
|
||||
options.services.minio.isNAS = mkEnableFunction "NAS lack of defaults";
|
||||
options.services.minio.isNAS = mkEnableOption "NAS lack of defaults";
|
||||
|
||||
config = {
|
||||
secrets = {
|
||||
|
|
@ -10,7 +12,6 @@ in {
|
|||
path = "gensokyo/minio";
|
||||
field = "${name}-key";
|
||||
}));
|
||||
};
|
||||
files = {
|
||||
minio-root-credentials = {
|
||||
text = ''
|
||||
|
|
@ -23,17 +24,17 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = mkIf !cfg.isNAS ''
|
||||
v /minio 700 minio minio
|
||||
'';
|
||||
systemd.tmpfiles.rules = mkIf (!cfg.isNAS) [
|
||||
"v /minio 700 minio minio"
|
||||
];
|
||||
|
||||
services = {
|
||||
minio = {
|
||||
region = config.services.cockroachdb.locality;
|
||||
enable = true;
|
||||
dataDir = lib.optional !cfg.isNAS "/minio";
|
||||
dataDir = lib.optional (!cfg.isNAS) "/minio";
|
||||
listenAddress = "${config.networks.tailscale.ipv4}:9000";
|
||||
consoleAddress = "${config.networks.tailcale.ipv4}:9001";
|
||||
consoleAddress = "${config.networks.tailscale.ipv4}:9001";
|
||||
rootCredentialsFile = config.secrets.files.minio-root-credentials.path;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
tf
2
tf
|
|
@ -1 +1 @@
|
|||
Subproject commit 350586e12aeea00229c99fb2059dadac56934358
|
||||
Subproject commit 426f3bb0ceaf3fc1495ebe14f90697aaab19e1aa
|
||||
Loading…
Add table
Add a link
Reference in a new issue