- secret_token = writeText "secret_token.rb" ''
- Diaspora::Application.config.secret_key_base = '${env.secret_token}'
- '';
- config = writeText "diaspora.yml" ''
+ gems = bundlerEnv {
+ name = "diaspora-env";
+ # https://git.immae.eu/mantisbt/view.php?id=131
+ ruby = ruby_2_4.overrideAttrs(old: {
+ postInstall = builtins.replaceStrings [" --destdir $GEM_HOME"] [""] old.postInstall;
+ });
+ gemfile = "${diaspora}/Gemfile";
+ lockfile = "${diaspora}/Gemfile.lock";
+ gemset = ./gemset.nix;
+ groups = [ "postgresql" "default" "production" ];
+ gemConfig = defaultGemConfig // {
+ kostya-sigar = attrs: {
+ buildInputs = [ pkgs.perl ];
+ };
+ };
+ };
+ keys = {
+ secret_token = {
+ dest = "webapps/tools-diaspora-secret_token";
+ user = "diaspora";
+ group = "diaspora";
+ permissions = "0400";
+ text = ''
+ Diaspora::Application.config.secret_key_base = '${env.secret_token}'
+ '';
+ };
+ config = {
+ dest = "webapps/tools-diaspora-config";
+ user = "diaspora";
+ group = "diaspora";
+ permissions = "0400";
+ text = ''