diff options
author | Aaron Andersen <aaron@fosslib.net> | 2018-10-10 21:04:08 -0400 |
---|---|---|
committer | Aaron Andersen <aaron@fosslib.net> | 2018-10-10 21:04:08 -0400 |
commit | 1cb5b509f1a78ed7a38a327fb122abdf971c1222 (patch) | |
tree | a0203c8b2f719cac4241796739c736978f758555 /nixos/tests | |
parent | e7334bc6e943b15089dd54f4365d8434fc3cc0c8 (diff) | |
download | nixlib-1cb5b509f1a78ed7a38a327fb122abdf971c1222.tar nixlib-1cb5b509f1a78ed7a38a327fb122abdf971c1222.tar.gz nixlib-1cb5b509f1a78ed7a38a327fb122abdf971c1222.tar.bz2 nixlib-1cb5b509f1a78ed7a38a327fb122abdf971c1222.tar.lz nixlib-1cb5b509f1a78ed7a38a327fb122abdf971c1222.tar.xz nixlib-1cb5b509f1a78ed7a38a327fb122abdf971c1222.tar.zst nixlib-1cb5b509f1a78ed7a38a327fb122abdf971c1222.zip |
redmine: refactor, cleanup, bug fix, and add functionality
- added package option to specify which version of redmine - added themes option back in to allow specifying redmine themes - added plugins option back in to allow specifying redmine plugins - added database.socket option to allow mysql unix socket authentication - added port option to allow specifying the port rails runs on - cleaned up Gemfile so it is much less hacky - switched to ruby version 2.4 by default as suggested by documentation http://www.redmine.org/projects/redmine/wiki/redmineinstall#Installing-Redmine - fixed an annoyance (bug) in the service causing recursive symlinks - fixed ownership bug on log files generated by redmine - updates reflecting renames in nixos options - added a nixos test
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/redmine.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/nixos/tests/redmine.nix b/nixos/tests/redmine.nix new file mode 100644 index 000000000000..c1cb15f8288f --- /dev/null +++ b/nixos/tests/redmine.nix @@ -0,0 +1,40 @@ +import ./make-test.nix ({ pkgs, lib, ... }: +{ + name = "redmine"; + meta.maintainers = [ lib.maintainers.aanderse ]; + + machine = + { config, pkgs, ... }: + { services.mysql.enable = true; + services.mysql.package = pkgs.mariadb; + services.mysql.ensureDatabases = [ "redmine" ]; + services.mysql.ensureUsers = [ + { name = "redmine"; + ensurePermissions = { "redmine.*" = "ALL PRIVILEGES"; }; + } + ]; + + services.redmine.enable = true; + services.redmine.database.socket = "/run/mysqld/mysqld.sock"; + services.redmine.plugins = { + redmine_env_auth = builtins.fetchurl { + url = https://github.com/Intera/redmine_env_auth/archive/0.6.zip; + sha256 = "0yyr1yjd8gvvh832wdc8m3xfnhhxzk2pk3gm2psg5w9jdvd6skak"; + }; + }; + services.redmine.themes = { + dkuk-redmine_alex_skin = builtins.fetchurl { + url = https://bitbucket.org/dkuk/redmine_alex_skin/get/1842ef675ef3.zip; + sha256 = "0hrin9lzyi50k4w2bd2b30vrf1i4fi1c0gyas5801wn8i7kpm9yl"; + }; + }; + }; + + testScript = '' + startAll; + + $machine->waitForUnit('redmine.service'); + $machine->waitForOpenPort('3000'); + $machine->succeed("curl --fail http://localhost:3000/"); + ''; +}) \ No newline at end of file |