diff options
author | lassulus <lassulus@lassul.us> | 2017-11-10 22:35:25 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2017-11-10 22:35:25 +0100 |
commit | 725d98e428b22d73c3797490c6f5bc29f86104e8 (patch) | |
tree | d1c2343c0aa1d2efd758c8b3bdbfa446b5fd2038 /makefu/2configs/lanparty/lancache.nix | |
parent | 4c083777ddf71f7cbd12a1b094aa50e18ab89d2d (diff) | |
parent | 05a8eced9c9cc3e9550c6c24e778d96b822a393a (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/lanparty/lancache.nix')
-rw-r--r-- | makefu/2configs/lanparty/lancache.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/makefu/2configs/lanparty/lancache.nix b/makefu/2configs/lanparty/lancache.nix index 3df2e3f59..bcacf2e15 100644 --- a/makefu/2configs/lanparty/lancache.nix +++ b/makefu/2configs/lanparty/lancache.nix @@ -17,15 +17,21 @@ let installPhase = '' mkdir -p $out cp -r * $out/ + rm $out/caches-enabled/* sed -i -e 's/^\(user\).*/\1 ${cfg.user} ${cfg.group};/' \ -e '1 idaemon off;' \ + -e 's#/var/lancache#${cfg.statedir}#g' \ $out/nginx.conf + sed -i -e 's#/var/lancache#${cfg.statedir}#g' \ + $out/*/*.conf + ln -s $out/caches-available/* $out/caches-enabled/ ''; }; cfg = { + statedir = "/data/cache"; + group = "nginx-lancache"; user = "nginx-lancache"; - statedir = "/var/lancache"; package = pkgs.stdenv.lib.overrideDerivation pkgs.nginx (old:{ configureFlags = old.configureFlags ++ [ "--with-http_slice_module" @@ -43,6 +49,7 @@ in { preStart = '' mkdir -p ${cfg.statedir} && cd ${cfg.statedir} + chmod 700 ${cfg.statedir} PATH_CACHE=$PATH_BASE/cache PATH_LOGS=$PATH_BASE/logs |