Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make nix, package configurable. #137

Merged
merged 1 commit into from
Aug 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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