From 9b8a6c97718028a4b01b2f4d41b93b235ac80caf Mon Sep 17 00:00:00 2001 From: Nettika Date: Fri, 12 Jul 2024 23:06:19 -0700 Subject: [PATCH] Setup secrets with git-crypt --- .gitattributes | 1 + flake.nix | 9 ++++++--- secrets.json | Bin 0 -> 25 bytes 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .gitattributes create mode 100644 secrets.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e155600 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +secrets.json filter=git-crypt diff=git-crypt diff --git a/flake.nix b/flake.nix index 2c91da7..a916373 100755 --- a/flake.nix +++ b/flake.nix @@ -5,17 +5,20 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; }; - outputs = { nixpkgs, ... }@inputs: { + outputs = { nixpkgs, ... }@inputs: + let + secrets = builtins.fromJSON (builtins.readFile ./secrets.json); + in { nixosConfigurations = { marauder = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./marauder ]; - specialArgs = { inherit inputs; }; + specialArgs = { inherit inputs secrets; }; }; monolith = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./monolith ]; - specialArgs = { inherit inputs; }; + specialArgs = { inherit inputs secrets; }; }; }; }; diff --git a/secrets.json b/secrets.json new file mode 100644 index 0000000000000000000000000000000000000000..e4aa2b220cd0be13fdfd18af66712f7e292b8826 GIT binary patch literal 25 hcmZQ@_Y83kiVO&0u=%%>n>%zb+vM^+>(9j>0|04M3IG5A literal 0 HcmV?d00001