diff --git a/virtual-machines/vm-test/flake.nix b/virtual-machines/vm-test/flake.nix index c488efe..9a4291f 100644 --- a/virtual-machines/vm-test/flake.nix +++ b/virtual-machines/vm-test/flake.nix @@ -17,25 +17,29 @@ }@inputs: let system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - }; - credentials = builtins.listToAttrs ( - map (filename: { - name = builtins.replaceStrings [ ".env" ] [ "-env" ] filename; - value = pkgs.runCommand "sops-decrypt-${filename}" { } '' - ${pkgs.sops}/bin/sops -d ${./secrets}/${filename} > $out - ''; - }) (builtins.attrNames (builtins.readDir ./secrets)) - ); + /* + pkgs = import nixpkgs { + inherit system; + }; + credentials = builtins.listToAttrs ( + map (filename: { + name = builtins.replaceStrings [ ".env" ] [ "-env" ] filename; + value = pkgs.runCommand "sops-decrypt-${filename}" { } '' + ${pkgs.sops}/bin/sops -d ${./secrets}/${filename} > $out + ''; + }) (builtins.attrNames (builtins.readDir ./secrets)) + ); + */ in { nixosConfigurations = { vm = nixpkgs.lib.nixosSystem { system = system; - specialArgs = { - inherit credentials; - }; + /* + specialArgs = { + inherit credentials; + }; + */ modules = [ ./virtual.nix postgresql-db.nixosModules.postgresql-db diff --git a/virtual-machines/vm-test/virtual.nix b/virtual-machines/vm-test/virtual.nix index 94e7915..4d067d1 100644 --- a/virtual-machines/vm-test/virtual.nix +++ b/virtual-machines/vm-test/virtual.nix @@ -72,7 +72,7 @@ enable = true; dataDir = "/var/lib/postgresql"; port = 5432; - credentialsFile = credentials.psql-env; + credentialsFile = ./secrets/plain.env; databases = [ "test" ];