don't copy secret files to store during nixops deployment

This commit is contained in:
Erik Arvstedt 2019-11-27 14:04:24 +01:00
parent f0a36fe0c7
commit cd0fd6926b
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
2 changed files with 15 additions and 4 deletions

View File

@ -44,28 +44,28 @@ let
permissions = "0440"; permissions = "0440";
}; };
nginx_key = { nginx_key = {
keyFile = ../secrets/nginx.key; keyFile = toString ../../secrets/nginx.key;
destDir = "/secrets/"; destDir = "/secrets/";
user = "nginx"; user = "nginx";
group = "root"; group = "root";
permissions = "0440"; permissions = "0440";
}; };
nginx_cert = { nginx_cert = {
keyFile = ../secrets/nginx.cert; keyFile = toString ../../secrets/nginx.cert;
destDir = "/secrets/"; destDir = "/secrets/";
user = "nginx"; user = "nginx";
group = "root"; group = "root";
permissions = "0440"; permissions = "0440";
}; };
lnd_key = { lnd_key = {
keyFile = ../secrets/lnd.key; keyFile = toString ../../secrets/lnd.key;
destDir = "/secrets/"; destDir = "/secrets/";
user = "lnd"; user = "lnd";
group = "lnd"; group = "lnd";
permissions = "0440"; permissions = "0440";
}; };
lnd_cert = { lnd_cert = {
keyFile = ../secrets/lnd.cert; keyFile = toString ../../secrets/lnd.cert;
destDir = "/secrets/"; destDir = "/secrets/";
user = "lnd"; user = "lnd";
group = "lnd"; group = "lnd";

View File

@ -32,3 +32,14 @@
# For "nix-build --run-env". # For "nix-build --run-env".
--- a/nixops/backends/__init__.py
+++ b/nixops/backends/__init__.py
@@ -24,6 +24,7 @@ class MachineDefinition(nixops.resources.ResourceDefinition):
opts = {}
for (key, xmlType) in (('text', 'string'),
('keyFile', 'path'),
+ ('keyFile', 'string'),
('destDir', 'string'),
('user', 'string'),
('group', 'string'),