From 423808ac767ed3a410948bf9e5df7b0da8d9e9c1 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 11 Jan 2026 03:50:08 +0900 Subject: [PATCH] nix: use package from module in default This makes overriding hakurei easier. Also avoids building hakurei twice since nix does that for some reason. Signed-off-by: Ophestra --- options.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/options.nix b/options.nix index 02d69f5..581ce18 100644 --- a/options.nix +++ b/options.nix @@ -1,8 +1,15 @@ packages: -{ lib, pkgs, ... }: +{ + lib, + pkgs, + config, + ... +}: let inherit (lib) types mkOption mkEnableOption; + + cfg = config.environment.hakurei; in { @@ -43,7 +50,10 @@ in sharefs = { package = mkOption { type = types.package; - default = packages.${pkgs.stdenv.hostPlatform.system}.sharefs; + default = pkgs.linkFarm "sharefs" { + "bin/sharefs" = "${cfg.package}/libexec/sharefs"; + "bin/mount.fuse.sharefs" = "${cfg.package}/libexec/sharefs"; + }; description = "The sharefs package to use."; };