From 438d01d9c8872c274c2c5728aa4eb0179b7fc027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 25 Dec 2022 21:15:51 +0000 Subject: [PATCH] try populating minio nix store --- .woodpecker/sync.yml | 18 ++++++------------ nixos/boxes/bolty/nix-store-server.nix | 9 +++++++++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.woodpecker/sync.yml b/.woodpecker/sync.yml index 3ea79321..d0ee2bfb 100644 --- a/.woodpecker/sync.yml +++ b/.woodpecker/sync.yml @@ -4,19 +4,13 @@ pipeline: image: nixpkgs/nix-flakes:latest pull: true commands: - - mkdir -p ~/.config/nix - - echo "store = /var/build-nix-store" >> /etc/nix/nix.conf - - echo "sandbox = false" >> /etc/nix/nix.conf - - echo "accept-flake-config = true" >> /etc/nix/nix.conf - - echo "fallback = true" >> /etc/nix/nix.conf - - echo "pure-eval = true" >> /etc/nix/nix.conf - - echo "stalled-download-timeout = 16" >> /etc/nix/nix.conf - - echo "max-silent-time = 32" >> /etc/nix/nix.conf - - echo "sync-before-registering = true" >> /etc/nix/nix.conf - - cat /etc/nix/nix.conf - - nix develop --no-sandbox --eval-store local --show-trace -c git lfs fetch --all + - nix develop -c git lfs fetch --all - git remote add github https://cyplo:$GITHUB_TOKEN@github.com/cyplo/dotfiles.git - nix develop -c git push github --all --force - secrets: [ github_token ] + - export AWS_ACCESS_KEY_ID="nix-builder" + - export AWS_ACCESS_KEY_ID="nix-builder" + - export AWS_SECRET_ACCESS_KEY="$MINIO_NIX_BUILDER_KEY" + - nix copy --all --to 's3://nix-store?endpoint=bolty:10000&schema=http' + secrets: [ github_token minio-nix-builder-key ] volumes: - /var/lib/woodpecker/nix-store:/var/build-nix-store \ No newline at end of file diff --git a/nixos/boxes/bolty/nix-store-server.nix b/nixos/boxes/bolty/nix-store-server.nix index 9ecaff5f..37faa40e 100644 --- a/nixos/boxes/bolty/nix-store-server.nix +++ b/nixos/boxes/bolty/nix-store-server.nix @@ -3,4 +3,13 @@ pkgs, ... }: { + networking.firewall.allowedTCPPorts = [10000 10001]; + services.minio = { + enable = true; + region = "home"; + dataDir = ["/var/lib/minio/data"]; + configDir = "/var/lib/minio/config"; + listenAddress = ":10000"; + consoleAddress = ":10001"; + }; }