From 9f921e27c5f6670dd3bcf2f3f211cbc4ab5872e2 Mon Sep 17 00:00:00 2001
From: zowoq <59103226+zowoq@users.noreply.github.com>
Date: Sat, 1 Jul 2023 20:28:31 +1000
Subject: [PATCH] modules: refactor cachix secrets, watch-store

move cachix related files into directory
---
 flake.nix                                                  | 2 +-
 hosts/build02/nixpkgs-update.nix                           | 2 +-
 modules/nixos/{nix-community-cache => cachix}/secrets.yaml | 0
 modules/nixos/{ => cachix}/watch-store.nix                 | 2 +-
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename modules/nixos/{nix-community-cache => cachix}/secrets.yaml (100%)
 rename modules/nixos/{ => cachix}/watch-store.nix (69%)

diff --git a/flake.nix b/flake.nix
index 5dbe7ad..05aeea6 100644
--- a/flake.nix
+++ b/flake.nix
@@ -137,7 +137,7 @@
           remote-builder-build04 = ./modules/nixos/remote-builder/build04.nix;
           remote-builder-darwin02 = ./modules/nixos/remote-builder/darwin02.nix;
           remote-builder-user = ./modules/nixos/remote-builder/user.nix;
-          watch-store = ./modules/nixos/watch-store.nix;
+          watch-store = ./modules/nixos/cachix/watch-store.nix;
           zfs = ./modules/nixos/zfs.nix;
         };
 
diff --git a/hosts/build02/nixpkgs-update.nix b/hosts/build02/nixpkgs-update.nix
index 0703e98..4c7238b 100644
--- a/hosts/build02/nixpkgs-update.nix
+++ b/hosts/build02/nixpkgs-update.nix
@@ -179,7 +179,7 @@ in
 
   sops.secrets.nix-community-cachix = {
     path = "/home/r-ryantm/.config/cachix/cachix.dhall";
-    sopsFile = "${toString inputs.self}/modules/nixos/nix-community-cache/secrets.yaml";
+    sopsFile = "${toString inputs.self}/modules/nixos/cachix/secrets.yaml";
     owner = "r-ryantm";
     group = "r-ryantm";
   };
diff --git a/modules/nixos/nix-community-cache/secrets.yaml b/modules/nixos/cachix/secrets.yaml
similarity index 100%
rename from modules/nixos/nix-community-cache/secrets.yaml
rename to modules/nixos/cachix/secrets.yaml
diff --git a/modules/nixos/watch-store.nix b/modules/nixos/cachix/watch-store.nix
similarity index 69%
rename from modules/nixos/watch-store.nix
rename to modules/nixos/cachix/watch-store.nix
index a4d3914..8be3977 100644
--- a/modules/nixos/watch-store.nix
+++ b/modules/nixos/cachix/watch-store.nix
@@ -1,7 +1,7 @@
 { config, ... }:
 
 {
-  sops.secrets.watch-store-token.sopsFile = ./nix-community-cache/secrets.yaml;
+  sops.secrets.watch-store-token.sopsFile = ./secrets.yaml;
 
   services.cachix-watch-store = {
     enable = true;