Skip to content

Commit

Permalink
Merge pull request #178 from ngi-nix/update-inputs
Browse files Browse the repository at this point in the history
Update Inputs
  • Loading branch information
lorenzleutgeb authored Apr 12, 2024
2 parents 9620970 + 11704c4 commit 3366f05
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 452 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
44 changes: 22 additions & 22 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions modules/pretalx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@
optional
escapeShellArgs
generators
getExe
filterAttrs
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 @@ -48,15 +49,18 @@

pretalxWrapped =
pkgs.runCommand "pretalx-wrapper"
{nativeBuildInputs = [pkgs.makeWrapper pkgs.python3Packages.wrapPython];}
{
nativeBuildInputs = [pkgs.makeWrapper pkgs.python3Packages.wrapPython];
meta.mainProgram = cfg.package.meta.mainProgram;
}
''
makeWrapper ${cfg.package}/bin/pretalx \
$out/bin/pretalx --prefix PYTHONPATH : "${PYTHONPATH}"
makeWrapper ${getExe cfg.package} \
$out/bin/${cfg.package.meta.mainProgram} --prefix PYTHONPATH : "${PYTHONPATH}"
'';

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 Expand Up @@ -496,7 +500,7 @@ in {
};
script = ''
${exportPasswordEnv}
${pretalxWrapped}/bin/pretalx ${command}
${getExe pretalxWrapped} ${command}
'';
};
in {
Expand Down Expand Up @@ -526,7 +530,7 @@ in {
script = ''
${exportPasswordEnv}
export DJANGO_SUPERUSER_PASSWORD=$(cat ${cfg.init.admin.passwordFile})
${pretalxWrapped}/bin/pretalx init --noinput
${getExe pretalxWrapped} init --noinput
touch ${libDir}/init-will-not-run-again-if-this-file-exists
'';
requires = ["pretalx-migrate.service"];
Expand Down
12 changes: 6 additions & 6 deletions pkgs/by-name/kikit/package.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
lib,
pcbnew-transition,
pybars3,
python3,
openscad,
fetchFromGitHub,
bats,
callPackage,
Expand All @@ -15,12 +15,11 @@

properCaseName = "KiKit";

shapely = callPackage ./shapely {};
solidpython = callPackage ./solidpython {};
in
python3.pkgs.buildPythonPackage rec {
pname = toLower properCaseName;
version = "1.3.0";
version = "1.5.1";
format = "setuptools";

disabled = python3.pythonOlder "3.7";
Expand All @@ -29,7 +28,7 @@ in
owner = "yaqwsx";
repo = properCaseName;
rev = "v${version}";
hash = "sha256-kDTPk/R3eZtm4DjoUV4tSQzjGQ9k8MKQedX4oUXYzeo=";
hash = "sha256-iehA6FthNTJq+lDTL4eSUIIlYDJj86LMOyv/L2/ybyc=";
};

propagatedBuildInputs = with python3.pkgs;
Expand All @@ -41,13 +40,14 @@ in
commentjson
# https://github.com/yaqwsx/KiKit/issues/575
wxPython_4_2
shapely
pcbnew-transition
]
++ [
pcbnew-transition
shapely
pybars3
# https://github.com/yaqwsx/KiKit/issues/576
solidpython
openscad
];

nativeBuildInputs = with python3.pkgs; [
Expand Down
78 changes: 0 additions & 78 deletions pkgs/by-name/kikit/shapely/default.nix

This file was deleted.

31 changes: 0 additions & 31 deletions pkgs/by-name/kikit/shapely/library-paths.patch

This file was deleted.

Loading

0 comments on commit 3366f05

Please sign in to comment.