diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-25 09:05:46 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-04-25 09:05:46 +0200 |
commit | 32c84ff89c2b8931f58cea63961a178a9b1d0efe (patch) | |
tree | 7a90c28e1db3d8c704b2371737f2f2fae471db67 /nixops/modules/websites/tools/mastodon | |
parent | 742697c95318d3625298437995e948ee00a00ba5 (diff) | |
download | Nix-32c84ff89c2b8931f58cea63961a178a9b1d0efe.tar.gz Nix-32c84ff89c2b8931f58cea63961a178a9b1d0efe.tar.zst Nix-32c84ff89c2b8931f58cea63961a178a9b1d0efe.zip |
Move etherpad mastodon mediagoblin task and peertube to new secrets
Diffstat (limited to 'nixops/modules/websites/tools/mastodon')
-rw-r--r-- | nixops/modules/websites/tools/mastodon/default.nix | 8 | ||||
-rw-r--r-- | nixops/modules/websites/tools/mastodon/mastodon.nix | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/nixops/modules/websites/tools/mastodon/default.nix b/nixops/modules/websites/tools/mastodon/default.nix index 048d845..a3f2364 100644 --- a/nixops/modules/websites/tools/mastodon/default.nix +++ b/nixops/modules/websites/tools/mastodon/default.nix | |||
@@ -13,7 +13,7 @@ in { | |||
13 | }; | 13 | }; |
14 | 14 | ||
15 | config = lib.mkIf cfg.enable { | 15 | config = lib.mkIf cfg.enable { |
16 | deployment.keys = mastodon.keys; | 16 | mySecrets.keys = mastodon.keys; |
17 | ids.uids.mastodon = myconfig.env.tools.mastodon.user.uid; | 17 | ids.uids.mastodon = myconfig.env.tools.mastodon.user.uid; |
18 | ids.gids.mastodon = myconfig.env.tools.mastodon.user.gid; | 18 | ids.gids.mastodon = myconfig.env.tools.mastodon.user.gid; |
19 | 19 | ||
@@ -55,7 +55,7 @@ in { | |||
55 | 55 | ||
56 | serviceConfig = { | 56 | serviceConfig = { |
57 | User = "mastodon"; | 57 | User = "mastodon"; |
58 | EnvironmentFile = "/run/keys/webapps/tools-mastodon"; | 58 | EnvironmentFile = "/var/secrets/webapps/tools-mastodon"; |
59 | PrivateTmp = true; | 59 | PrivateTmp = true; |
60 | Restart = "always"; | 60 | Restart = "always"; |
61 | TimeoutSec = 15; | 61 | TimeoutSec = 15; |
@@ -88,7 +88,7 @@ in { | |||
88 | 88 | ||
89 | serviceConfig = { | 89 | serviceConfig = { |
90 | User = "mastodon"; | 90 | User = "mastodon"; |
91 | EnvironmentFile = "/run/keys/webapps/tools-mastodon"; | 91 | EnvironmentFile = "/var/secrets/webapps/tools-mastodon"; |
92 | PrivateTmp = true; | 92 | PrivateTmp = true; |
93 | Restart = "always"; | 93 | Restart = "always"; |
94 | TimeoutSec = 60; | 94 | TimeoutSec = 60; |
@@ -117,7 +117,7 @@ in { | |||
117 | 117 | ||
118 | serviceConfig = { | 118 | serviceConfig = { |
119 | User = "mastodon"; | 119 | User = "mastodon"; |
120 | EnvironmentFile = "/run/keys/webapps/tools-mastodon"; | 120 | EnvironmentFile = "/var/secrets/webapps/tools-mastodon"; |
121 | PrivateTmp = true; | 121 | PrivateTmp = true; |
122 | Restart = "always"; | 122 | Restart = "always"; |
123 | TimeoutSec = 15; | 123 | TimeoutSec = 15; |
diff --git a/nixops/modules/websites/tools/mastodon/mastodon.nix b/nixops/modules/websites/tools/mastodon/mastodon.nix index 944b2db..3ee3552 100644 --- a/nixops/modules/websites/tools/mastodon/mastodon.nix +++ b/nixops/modules/websites/tools/mastodon/mastodon.nix | |||
@@ -58,8 +58,8 @@ let | |||
58 | ''; | 58 | ''; |
59 | buildInputs = [ yarnModules ]; | 59 | buildInputs = [ yarnModules ]; |
60 | }); | 60 | }); |
61 | keys.tools-mastodon = { | 61 | keys.mastodon = { |
62 | destDir = "/run/keys/webapps"; | 62 | dest = "webapps/tools-mastodon"; |
63 | user = "mastodon"; | 63 | user = "mastodon"; |
64 | group = "mastodon"; | 64 | group = "mastodon"; |
65 | permissions = "0400"; | 65 | permissions = "0400"; |
@@ -113,7 +113,7 @@ let | |||
113 | builder = writeText "build_mastodon_immae" '' | 113 | builder = writeText "build_mastodon_immae" '' |
114 | source $stdenv/setup | 114 | source $stdenv/setup |
115 | set -a | 115 | set -a |
116 | ${keys.tools-mastodon.text} | 116 | ${keys.mastodon.text} |
117 | set +a | 117 | set +a |
118 | cp -a $mastodon $out | 118 | cp -a $mastodon $out |
119 | cd $out | 119 | cd $out |
@@ -128,7 +128,8 @@ let | |||
128 | }; | 128 | }; |
129 | in | 129 | in |
130 | { | 130 | { |
131 | inherit railsRoot keys varDir socketsDir gems; | 131 | inherit railsRoot varDir socketsDir gems; |
132 | keys = builtins.attrValues keys; | ||
132 | nodeSocket = "${socketsDir}/live_immae_node.sock"; | 133 | nodeSocket = "${socketsDir}/live_immae_node.sock"; |
133 | railsSocket = "${socketsDir}/live_immae_puma.sock"; | 134 | railsSocket = "${socketsDir}/live_immae_puma.sock"; |
134 | } | 135 | } |