summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/github-hosts-sync.nix
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-09 14:32:45 +0200
committertv <tv@shackspace.de>2015-10-09 14:32:45 +0200
commit694c79a5bc05014604fa2467f965b370102ff78f (patch)
tree209dcafb940880abfef2321d3f7996d5507eb8f7 /krebs/3modules/github-hosts-sync.nix
parent509423f1f19ade5586f66c5691b27694ecb68b01 (diff)
github-hosts-sync service: fix directory creation
Diffstat (limited to 'krebs/3modules/github-hosts-sync.nix')
-rw-r--r--krebs/3modules/github-hosts-sync.nix10
1 files changed, 3 insertions, 7 deletions
diff --git a/krebs/3modules/github-hosts-sync.nix b/krebs/3modules/github-hosts-sync.nix
index 4d4e21252..2a1df9e03 100644
--- a/krebs/3modules/github-hosts-sync.nix
+++ b/krebs/3modules/github-hosts-sync.nix
@@ -41,13 +41,9 @@ let
ExecStartPre = pkgs.writeScript "github-hosts-sync-init" ''
#! /bin/sh
set -euf
-
- mkdir -p ${cfg.dataDir}
- chown ${user.name}: ${cfg.dataDir}
-
- install \
- -o ${user.name} \
- -m 0400 \
+ install -m 0711 -o ${user.name} -d ${cfg.dataDir}
+ install -m 0700 -o ${user.name} -d ${cfg.dataDir}/.ssh
+ install -m 0400 -o ${user.name} \
${cfg.ssh-identity-file} \
${cfg.dataDir}/.ssh/${fileExtension cfg.ssh-identity-file}
'';