1 {pkgs, lib, config, ...}:
2 let inherit (config) networking;
3 inherit (config.services) redmine postgresql;
13 port = postgresql.port;
17 users."${redmine.user}" = {
20 databases."${redmine.database.name}" = {
22 users = [ redmine.user ];
24 GRANT USAGE ON SCHEMA pg_catalog TO ${redmine.user};
25 GRANT SELECT ON ALL TABLES IN SCHEMA pg_catalog TO ${redmine.user};
30 upstreams."redmine" = {
31 servers = { "localhost:3000" = {}; };
33 virtualHosts."redmine" = {
34 serverName = "redmine.${networking.domain}";
36 map (domainAlias: "redmine." + domainAlias)
37 config.networking.domainAliases;
41 proxy_next_upstream error timeout
42 invalid_header http_500 http_502 http_503;
43 proxy_pass http://localhost:3000;
50 systemd.services.redmine = {
51 environment.REDMINE_LANG = lib.mkForce "fr";
53 #users.users."${redmine.user}" = {
54 # extraGroups = [ "postgres" ];