Skip to content

Commit

Permalink
pretalx: Rename module avoiding nixpkgs clash
Browse files Browse the repository at this point in the history
Also remove deprecated configurion while at it,
see #126
  • Loading branch information
lorenzleutgeb committed Apr 12, 2024
1 parent a6c5ac4 commit 7522efa
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions configs/pretalx/mysql.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
...
}: {
services = {
pretalx.database = {
ngi-pretalx.database = {
backend = "mysql";
host = "/var/run/mysqld/mysqld.sock";
};
Expand All @@ -14,11 +14,11 @@
package = pkgs.mysql;
ensureUsers = [
{
name = config.services.pretalx.database.user;
ensurePermissions."${config.services.pretalx.database.name}.*" = "ALL PRIVILEGES";
name = config.services.ngi-pretalx.database.user;
ensurePermissions."${config.services.ngi-pretalx.database.name}.*" = "ALL PRIVILEGES";
}
];
ensureDatabases = [config.services.pretalx.database.name];
ensureDatabases = [config.services.ngi-pretalx.database.name];
};
};
}
8 changes: 4 additions & 4 deletions configs/pretalx/postgresql.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{config, ...}: {
services = {
pretalx.database.backend = "postgresql";
ngi-pretalx.database.backend = "postgresql";

postgresql = {
enable = true;
authentication = "local all all trust";
ensureUsers = [
{
name = config.services.pretalx.database.user;
ensurePermissions."DATABASE \"${config.services.pretalx.database.name}\"" = "ALL PRIVILEGES";
name = config.services.ngi-pretalx.database.user;
ensureDBOwnership = true;
}
];
ensureDatabases = [config.services.pretalx.database.name];
ensureDatabases = [config.services.ngi-pretalx.database.name];
};
};
}
2 changes: 1 addition & 1 deletion configs/pretalx/pretalx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
};

services = {
pretalx = {
ngi-pretalx = {
enable = true;
package = pkgs.pretalx-full;
nginx = {
Expand Down
6 changes: 3 additions & 3 deletions modules/pretalx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
filterAttrsRecursive
;

cfg = config.services.pretalx;
opt = options.services.pretalx;
cfg = config.services.ngi-pretalx;
opt = options.services.ngi-pretalx;
gunicorn = pkgs.python3Packages.gunicorn;
libDir = "/var/lib/pretalx";
gunicornSocketPath = "/var/run/pretalx.sock";
Expand All @@ -56,7 +56,7 @@

secretRecommendation = "Consider using a secret managing scheme such as `agenix` or `sops-nix` to generate this file.";
in {
options.services.pretalx = with types; {
options.services.ngi-pretalx = with types; {
enable = mkEnableOption "Enable pretalx server.";

package = mkPackageOption pkgs "pretalx" {};
Expand Down
2 changes: 1 addition & 1 deletion tests/pretalx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ in {
defaultSopsFile = ./sops/pretalx.yaml;
};

services.pretalx.site.url = mkForce "http://localhost:8000";
services.ngi-pretalx.site.url = mkForce "http://localhost:8000";

# Use kmscon <https://www.freedesktop.org/wiki/Software/kmscon/>
# to provide a slightly nicer console, and while we're at it,
Expand Down

0 comments on commit 7522efa

Please sign in to comment.