implement plaintext
This commit is contained in:
1 parent
ca7c1d9a34
commit
99e5d39c1a
2 files changed
+19
-15
No files matched your search
@@ -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
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
enable = true;
|
||||
dataDir = "/var/lib/postgresql";
|
||||
port = 5432;
|
||||
credentialsFile = credentials.psql-env;
|
||||
credentialsFile = ./secrets/plain.env;
|
||||
databases = [
|
||||
"test"
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user