diff --git a/Ttrss/update.nix b/Ttrss/update.nix index 712f829..efbab62 100644 --- a/Ttrss/update.nix +++ b/Ttrss/update.nix @@ -1,6 +1,7 @@ { stdenv , pkgs , lib +, utils }: { readOnlyPaths ? [] , readWritePaths ? [] @@ -22,9 +23,9 @@ let fullPath = "${TtrssService.documentRoot}/${TtrssService.documentName}"; roPaths = [fullPath] ++ readOnlyPaths; in -stdenv.mkDerivation rec { +utils.systemd-service-derivation rec { name = "ttrss-update"; - src = pkgs.writeTextDir "${name}.service" '' + content = '' [Unit] Description=${name} After=network.target ${TtrssPostgresDB.postgresServiceName} @@ -60,9 +61,4 @@ stdenv.mkDerivation rec { [Install] WantedBy=multi-user.target ''; - - installPhase = '' - mkdir -p $out/etc/systemd/system - cp $src/*.service $out/etc/systemd/system - ''; } diff --git a/all-packages.nix b/all-packages.nix index 284d010..5fc20c6 100644 --- a/all-packages.nix +++ b/all-packages.nix @@ -2,6 +2,7 @@ , services ? null , system ? builtins.currentSystem , pkgs ? import { inherit system; } +, utils ? null }: let @@ -11,7 +12,7 @@ let PostgresDB = callPackage ./PostgresDB {}; TtrssService = callPackage ./Ttrss {}; - TtrssUpdateService = callPackage ./Ttrss/update.nix {}; + TtrssUpdateService = callPackage ./Ttrss/update.nix {inherit utils;}; TtrssUpgradeDBService = callPackage ./Ttrss/dbupgrade.nix {}; }; in