{
  config,
  pkgs,
  inputs,
  ...
}:
{
  # sops.secrets = {
  #   "rustfs/access-key" = {
  #     sopsFile = ../secrets/rustfs.yaml;
  #     owner = config.services.rustfs.user;
  #     group = config.services.rustfs.group;
  #     mode = "0400";
  #     restartUnits = [ "rustfs.service" ];
  #   };

  #   "rustfs/secret-key" = {
  #     sopsFile = ../secrets/rustfs.yaml;
  #     owner = config.services.rustfs.user;
  #     group = config.services.rustfs.group;
  #     mode = "0400";
  #     restartUnits = [ "rustfs.service" ];
  #   };
  # };

  services.rustfs = {
    enable = true;
    package = inputs.rustfs.packages.${pkgs.stdenv.hostPlatform.system}.default;

    accessKeyFile = "/etc/secrets/rustfs-access-key";
    secretKeyFile = "/etc/secrets/rustfs-secret-key";

    volumes = "/mnt/snow/rustfs";
    address = ":9000";
    consoleAddress = ":9001";
    consoleEnable = true;
  };
}
