diff --git a/bookwyrm.nix b/bookwyrm.nix index dfec431..66e03ec 100644 --- a/bookwyrm.nix +++ b/bookwyrm.nix @@ -116,6 +116,17 @@ mkDerivation { chmod +x $out/bin/bookwyrm + # Systemd units + + cat <<- EOF > $out/lib/systemd/system/bookwyrm.service + [Unit] + After=network.target + + [Service] + ExecStart=$out/bin/bookwyrm + WorkingDirectory=/var/lib/bookwyrm + EOF + runHook postInstall '' ; } diff --git a/nixos-module.nix b/nixos-overlay.nix similarity index 84% rename from nixos-module.nix rename to nixos-overlay.nix index b90ef12..5a527a3 100644 --- a/nixos-module.nix +++ b/nixos-overlay.nix @@ -51,19 +51,4 @@ ) ] ; } ; - - systemd = { - units = { - bookwyrm = { - text = '' - [Unit] - After=network.target - - [Service] - ExecStart=$out/bin/bookwyrm - WorkingDirectory=/var/lib/bookwyrm - '' ; - } ; - } ; - } ; } diff --git a/readme.md b/readme.md index d6bec7c..d4567d4 100644 --- a/readme.md +++ b/readme.md @@ -3,7 +3,7 @@ ## Description An assortment of Nix packages not in the official collection. -They can either be imported individually or using the module if you're on NixOS. +They can either be imported individually or using the overlay if you're on NixOS. These are purposefully written without support for [overriding](https://nixos.org/guides/nix-pills/17-nixpkgs-overriding-packages) in order to minimise complexity. If you want to build upon them I encourage you to fork this repository. @@ -23,13 +23,13 @@ pkgs . callPackage ( import ( pkgs . fetchurl { } ) ) {} ``` -Using the NixOS module: +Using the NixOS overlay: ```nix imports = [ ( fetchTarball { url = "https://kernelmaft.com/forgejo/zedfrigg/nix-packages/archive/432123bb0984dd766c16ac06b7e3ef4cfee36145.tar.gz" ; sha256 = "sha256:1wx7ljabgndandcd11jmr590jfpkhs55mqrgksf24ji90m37wpq0" ; - } + "/nixos-module.nix" ) + } + "/nixos-overlay.nix" ) ] ; ```