forked from security/hakurei
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>
This commit is contained in:
14
options.nix
14
options.nix
@@ -1,8 +1,15 @@
|
|||||||
packages:
|
packages:
|
||||||
{ lib, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) types mkOption mkEnableOption;
|
inherit (lib) types mkOption mkEnableOption;
|
||||||
|
|
||||||
|
cfg = config.environment.hakurei;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -43,7 +50,10 @@ in
|
|||||||
sharefs = {
|
sharefs = {
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
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.";
|
description = "The sharefs package to use.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user