diff --git a/default.nix b/default.nix index 879ee15..5547a69 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,7 @@ { pkgs ? (import { }) , rustPlatform ? pkgs.rustPlatform , nixVersions ? pkgs.nixVersions +, nixForHarmonia ? nixVersions.unstable , nix-gitignore ? pkgs.nix-gitignore , lib ? pkgs.lib , clippy ? pkgs.clippy @@ -19,7 +20,7 @@ rustPlatform.buildRustPackage ({ nativeBuildInputs = [ pkg-config ] ++ lib.optionals enableClippy [ clippy ]; buildInputs = [ - nixVersions.unstable + nixForHarmonia nlohmann_json libsodium boost diff --git a/module.nix b/module.nix index df12910..5959294 100644 --- a/module.nix +++ b/module.nix @@ -23,6 +23,12 @@ in description = lib.mdDoc "Settings to merge with the default configuration"; }; + + package = lib.mkOption { + type = lib.types.path; + default = pkgs.callPackage ./. { }; + description = "The harmonia package"; + }; }; }; @@ -54,8 +60,9 @@ in # otherwise environment.HOME = "/run/harmonia"; + serviceConfig = { - ExecStart = "${pkgs.callPackage ./. { }}/bin/harmonia"; + ExecStart = "${cfg.package}/bin/harmonia"; User = "harmonia"; Group = "harmonia";