X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=nixops%2Fmodules%2Fwebsites%2Ftools%2Fdiaspora%2Fdiaspora.nix;h=616c5cc6533faa13c53cd1257478c9a202463a52;hb=7ac9bef4930a10101f02cbfdc4c75351e98553d6;hp=778fe267f415e494914b4d6ffc8bcbd59c757c6b;hpb=61199e9367515ec28f2a24903ea12a7b6747c9c0;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/nixops/modules/websites/tools/diaspora/diaspora.nix b/nixops/modules/websites/tools/diaspora/diaspora.nix index 778fe26..616c5cc 100644 --- a/nixops/modules/websites/tools/diaspora/diaspora.nix +++ b/nixops/modules/websites/tools/diaspora/diaspora.nix @@ -1,25 +1,31 @@ { env, fetchedGithub, stdenv, defaultGemConfig, writeText, bundlerEnv, ruby_2_4, pkgs, cacert }: let - gems = bundlerEnv { - name = "diaspora-env"; - ruby = ruby_2_4; - gemdir = ./.; - gemConfig = defaultGemConfig // { - kostya-sigar = attrs: { - buildInputs = with pkgs; [ pkgs.perl ]; - }; - }; - }; varDir = "/var/lib/diaspora_immae"; socketsDir = "/run/diaspora"; diaspora = stdenv.mkDerivation (fetchedGithub ./diaspora.json // rec { buildPhase = '' patch -p1 < ${./ldap.patch} + # FIXME: bundlerEnv below doesn't take postgresql group for some + # reason + echo 'gem "pg", "1.1.3"' >> Gemfile ''; installPhase = '' cp -a . $out ''; }); + gems = bundlerEnv { + name = "diaspora-env"; + ruby = ruby_2_4; + gemfile = "${diaspora}/Gemfile"; + lockfile = "${diaspora}/Gemfile.lock"; + gemset = ./gemset.nix; + groups = [ "postgresql" "default" "production" ]; + gemConfig = defaultGemConfig // { + kostya-sigar = attrs: { + buildInputs = [ pkgs.perl ]; + }; + }; + }; secret_token = writeText "secret_token.rb" '' Diaspora::Application.config.secret_key_base = '${env.secret_token}' '';