Skip to content

Commit

Permalink
Make nix, package configurable.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepurvis authored and mergify[bot] committed Aug 12, 2023
1 parent e49e988 commit f292063
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ pkgs ? (import <nixpkgs> { })
, rustPlatform ? pkgs.rustPlatform
, nixVersions ? pkgs.nixVersions
, nixForHarmonia ? nixVersions.unstable
, nix-gitignore ? pkgs.nix-gitignore
, lib ? pkgs.lib
, clippy ? pkgs.clippy
Expand All @@ -19,7 +20,7 @@ rustPlatform.buildRustPackage ({

nativeBuildInputs = [ pkg-config ] ++ lib.optionals enableClippy [ clippy ];
buildInputs = [
nixVersions.unstable
nixForHarmonia
nlohmann_json
libsodium
boost
Expand Down
9 changes: 8 additions & 1 deletion module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
};

Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit f292063

Please sign in to comment.