Don't do callPackage twice
This commit is contained in:
parent
a7d27d91b4
commit
6055b9417a
2 changed files with 4 additions and 3 deletions
|
|
@ -23,7 +23,7 @@
|
||||||
)
|
)
|
||||||
// {
|
// {
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
night-light = import ./module.nix;
|
night-light = import ./module.nix self;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
self:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
|
@ -7,8 +8,8 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
|
inherit (pkgs.stdenv.hostPlatform) system;
|
||||||
cfg = config.services.nightLight;
|
cfg = config.services.nightLight;
|
||||||
pkg = pkgs.callPackage ./default.nix { };
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.services.nightLight = {
|
options.services.nightLight = {
|
||||||
|
|
@ -29,7 +30,7 @@ in
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkg}/bin/NightLight";
|
ExecStart = "${self.packages.${system}.default}/bin/NightLight";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
User = "night-light";
|
User = "night-light";
|
||||||
Group = "night-light";
|
Group = "night-light";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue