add pkgs derivation
This commit is contained in:
1 parent
c61c523711
commit
fff3934315
2 files changed
+7
-4
No files matched your search
@@ -16,11 +16,15 @@
|
||||
postgresql-db,
|
||||
}@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
credentials = builtins.listToAttrs (
|
||||
map (filename: {
|
||||
name = builtins.replaceStrings [ ".env" ] [ "-env" ] filename;
|
||||
value = nixpkgs.runCommand "sops-decrypt-${filename}" { } ''
|
||||
${nixpkgs.sops}/bin/sops -d ${./secrets}/${filename} > $out
|
||||
value = pkgs.runCommand "sops-decrypt-${filename}" { } ''
|
||||
${pkgs.sops}/bin/sops -d ${./secrets}/${filename} > $out
|
||||
'';
|
||||
}) (builtins.attrNames (builtins.readDir ./secrets))
|
||||
);
|
||||
@@ -28,7 +32,6 @@
|
||||
{
|
||||
nixosConfigurations = {
|
||||
vm = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit credentials;
|
||||
};
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
enable = true;
|
||||
dataDir = "/var/lib/postgresql";
|
||||
port = 5432;
|
||||
credentialsFile = credentials.psql;
|
||||
credentialsFile = credentials.psql-env;
|
||||
databases = [
|
||||
"test"
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user