2024-05-09 15:20:03 +02:00
|
|
|
{ config, ... }:
|
|
|
|
let port = 8418;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [ ./cloudflared.nix ];
|
|
|
|
|
|
|
|
sops.secrets.microbin_env.sopsFile = ../secrets.yaml;
|
|
|
|
services.cloudflared.tunnels =
|
|
|
|
config.satellite.cloudflared.proxy "bin.moonythm.dev" port;
|
|
|
|
|
|
|
|
services.microbin = {
|
|
|
|
enable = true;
|
|
|
|
dataDir = "/persist/state/var/lib/microbin";
|
2024-05-09 15:29:18 +02:00
|
|
|
|
|
|
|
# {{{ Settings
|
2024-05-09 15:20:03 +02:00
|
|
|
settings = {
|
|
|
|
# High level settings
|
|
|
|
MICROBIN_ADMIN_USERNAME = "prescientmoon";
|
|
|
|
MICROBIN_PORT = toString port;
|
|
|
|
MICROBIN_DISABLE_TELEMETRY = "true";
|
|
|
|
|
|
|
|
# Toggle certain features
|
|
|
|
MICROBIN_READONLY = "true"; # Requires a password to upload
|
|
|
|
MICROBIN_QR = "true"; # Allows generating qr codes
|
|
|
|
MICROBIN_ETERNAL_PASTA = "true"; # Allows marking pastas to never be deleted
|
|
|
|
|
|
|
|
# Make UI more minimal
|
|
|
|
MICROBIN_HIDE_FOOTER = "true";
|
|
|
|
MICROBIN_HIDE_HEADER = "true";
|
|
|
|
MICROBIN_HIDE_LOGO = "true";
|
|
|
|
};
|
2024-05-09 15:29:18 +02:00
|
|
|
# }}}
|
2024-05-09 15:20:03 +02:00
|
|
|
};
|
2024-05-09 15:29:18 +02:00
|
|
|
|
|
|
|
systemd.tmpfiles.rules = [ "d ${config.services.microbin.dataDir}" ];
|
2024-05-09 15:20:03 +02:00
|
|
|
}
|