From 0d688022d99072718fb00bd789b35f345ab424fd Mon Sep 17 00:00:00 2001 From: Reinout Meliesie Date: Tue, 4 Mar 2025 12:28:03 +0100 Subject: [PATCH 1/2] Make hashbang in Bookwyrm executable use bash package directly --- bookwyrm.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bookwyrm.nix b/bookwyrm.nix index dfec431..650a33b 100644 --- a/bookwyrm.nix +++ b/bookwyrm.nix @@ -5,6 +5,7 @@ } : with builtins ; +with pkgs ; with pkgs . kernelmaft . python ; with pkgs . python311Packages ; with stdenv ; @@ -99,7 +100,7 @@ mkDerivation { # Executables cat <<- EOF > $out/bin/bookwyrm - #!/run/current-system/sw/bin/sh + #!${bash}/bin/sh export PYTHONPATH="$out/lib/python3.11/site-packages" From 69d0e632479252c29f1c0913b1ef67cec2561552 Mon Sep 17 00:00:00 2001 From: Reinout Meliesie Date: Tue, 4 Mar 2025 12:29:13 +0100 Subject: [PATCH 2/2] Fix ExecStart in Bookwyrm systemd unit --- nixos-module.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nixos-module.nix b/nixos-module.nix index b90ef12..88e7329 100644 --- a/nixos-module.nix +++ b/nixos-module.nix @@ -1,11 +1,12 @@ { pkgs , ... } : +with pkgs ; +with pkgs . kernelmaft ; + { nixpkgs = { overlays = [ ( self : super : - with pkgs ; - { kernelmaft = { @@ -54,13 +55,13 @@ systemd = { units = { - bookwyrm = { + "bookwyrm.service" = { text = '' [Unit] After=network.target [Service] - ExecStart=$out/bin/bookwyrm + ExecStart=${bookwyrm}/bin/bookwyrm WorkingDirectory=/var/lib/bookwyrm '' ; } ;