diff options
author | makefu <github@syntax-fehler.de> | 2016-06-14 01:36:15 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2016-06-14 01:36:15 +0200 |
commit | eb710a17e28bbec2a4f7877533f101fa78ece209 (patch) | |
tree | 591878b08c6d051418928e7dd94bd0d21853157f /krebs/3modules/repo-sync.nix | |
parent | 618684954207feed26b1b85f0721d41d5ca4c5c3 (diff) | |
parent | 5bc3fa88543cdf3aa5b9103f7423a2af490b3d08 (diff) |
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'krebs/3modules/repo-sync.nix')
-rw-r--r-- | krebs/3modules/repo-sync.nix | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/krebs/3modules/repo-sync.nix b/krebs/3modules/repo-sync.nix index 7a7c80a75..c5c806cdf 100644 --- a/krebs/3modules/repo-sync.nix +++ b/krebs/3modules/repo-sync.nix @@ -1,12 +1,12 @@ { config, lib, pkgs, ... }: -with lib; +with config.krebs.lib; let cfg = config.krebs.repo-sync; out = { options.krebs.repo-sync = api; - config = mkIf cfg.enable imp; + config = lib.mkIf cfg.enable imp; }; api = { @@ -70,7 +70,7 @@ let imp = { users.users.repo-sync = { name = "repo-sync"; - uid = config.krebs.lib.genid "repo-sync"; + uid = genid "repo-sync"; description = "repo-sync user"; home = cfg.stateDir; createHome = true; @@ -95,9 +95,8 @@ let serviceConfig = { Type = "simple"; PermissionsStartOnly = true; - ExecStartPre = pkgs.writeScript "prepare-repo-sync-user" '' - #! /bin/sh - cp -v ${config.krebs.lib.shell.escape cfg.privateKeyFile} ${cfg.stateDir}/ssh.priv + ExecStartPre = pkgs.writeDash "prepare-repo-sync-user" '' + cp -v ${shell.escape cfg.privateKeyFile} ${cfg.stateDir}/ssh.priv chown repo-sync ${cfg.stateDir}/ssh.priv ''; ExecStart = "${pkgs.repo-sync}/bin/repo-sync ${repo-sync-config}"; |