diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-11 03:50:08 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-11 03:50:08 +0900 |
| commit | 423808ac767ed3a410948bf9e5df7b0da8d9e9c1 (patch) | |
| tree | 84488cc8f86021ebb2de9a75433afc232f15c0d9 /options.nix | |
| parent | 2494ede1067d5071d3cc7d355cdc2ae3fac66dc5 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'options.nix')
| -rw-r--r-- | options.nix | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/options.nix b/options.nix index 02d69f59..581ce181 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."; }; |
