From 84c15ddf0e3d396806d88b29af8c9d453a4b8b48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 1 Jan 2023 21:44:25 +0000 Subject: [PATCH] switch to ssh store --- nixos/boxes/bolty/nix-store-server.nix | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/nixos/boxes/bolty/nix-store-server.nix b/nixos/boxes/bolty/nix-store-server.nix index e0662865..fd0640f5 100644 --- a/nixos/boxes/bolty/nix-store-server.nix +++ b/nixos/boxes/bolty/nix-store-server.nix @@ -1,22 +1,10 @@ -{ config, pkgs, ... }: -let - objectsPort = 10000; - adminPort = 10001; -in { - sops.secrets."minio-env" = { - sopsFile = ./minio.sops; - format = "binary"; - }; - - networking.firewall.allowedTCPPorts = [ objectsPort adminPort ]; - - services.minio = { +{ config, pkgs, ... }: { + nix.settings.trusted-users = [ "nix-ssh" ]; + nix.sshServe = { enable = true; - region = "cyplodev"; - dataDir = [ "/var/lib/minio/data" ]; - configDir = "/var/lib/minio/config"; - listenAddress = ":${toString objectsPort}"; - consoleAddress = ":${toString adminPort}"; - rootCredentialsFile = "${config.sops.secrets.minio-env.path}"; + write = true; + keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF4OvRjIUlO2TGPTjYNXbgFuP95uvbszyBjqvAC+Z8zH release-bot@cyplo.dev" + ]; }; }