Don't do callPackage twice

This commit is contained in:
Sven van Heugten 2026-02-14 19:58:35 +01:00
parent a7d27d91b4
commit 6055b9417a
2 changed files with 4 additions and 3 deletions

View file

@ -1,3 +1,4 @@
self:
{
config,
lib,
@ -7,8 +8,8 @@
with lib;
let
inherit (pkgs.stdenv.hostPlatform) system;
cfg = config.services.nightLight;
pkg = pkgs.callPackage ./default.nix { };
in
{
options.services.nightLight = {
@ -29,7 +30,7 @@ in
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${pkg}/bin/NightLight";
ExecStart = "${self.packages.${system}.default}/bin/NightLight";
Restart = "on-failure";
User = "night-light";
Group = "night-light";