trivionomicon: athena-bccr: separate releases by vendor, add 'vendor' option
This commit is contained in:
parent
a74fc0c70e
commit
aac5bbeb91
7 changed files with 70 additions and 63 deletions
|
|
@ -5,12 +5,11 @@
|
|||
doctrine,
|
||||
...
|
||||
}: let
|
||||
athena =
|
||||
(pkgs.${doctrine.prefix}.athena-bccr.override {
|
||||
inherit (cfg) mirror;
|
||||
}).${
|
||||
cfg.release
|
||||
};
|
||||
releases = pkgs.${doctrine.prefix}.athena-bccr.override {
|
||||
inherit (cfg) mirror vendor;
|
||||
};
|
||||
|
||||
athena = releases.${cfg.release};
|
||||
in {
|
||||
home.packages = [
|
||||
athena.firmador
|
||||
|
|
|
|||
|
|
@ -1,42 +1,40 @@
|
|||
{lib, ...}:
|
||||
with lib.types; {
|
||||
with lib.types; let
|
||||
mirror = lib.mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "release zip mirror base URL, if null then the release zip must be manually added to the Nix store";
|
||||
};
|
||||
|
||||
release = lib.mkOption {
|
||||
type = str;
|
||||
default = "latest";
|
||||
description = "pinned athena-bccr release tag";
|
||||
};
|
||||
|
||||
vendor = lib.mkOption {
|
||||
type = enum ["athena" "idopte"];
|
||||
default = "idopte";
|
||||
description = "driver dvendor";
|
||||
};
|
||||
in {
|
||||
hm = {
|
||||
inherit mirror release vendor;
|
||||
|
||||
gaudiHash = lib.mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "hash of the Gaudi client";
|
||||
};
|
||||
|
||||
mirror = lib.mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "release zip mirror base URL, if null then the release zip must be manually added to the Nix store";
|
||||
};
|
||||
|
||||
release = lib.mkOption {
|
||||
type = str;
|
||||
default = "latest";
|
||||
description = "pinned athena-bccr release tag";
|
||||
};
|
||||
};
|
||||
|
||||
sys = {
|
||||
inherit mirror release vendor;
|
||||
|
||||
group = lib.mkOption {
|
||||
type = str;
|
||||
default = "users";
|
||||
description = "user group with full access to the smartcard reader";
|
||||
};
|
||||
|
||||
mirror = lib.mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "release zip mirror base URL, if null then the release zip must be manually added to the Nix store";
|
||||
};
|
||||
|
||||
release = lib.mkOption {
|
||||
type = str;
|
||||
default = "latest";
|
||||
description = "pinned athena-bccr release tag";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,17 +6,15 @@
|
|||
doctrine,
|
||||
...
|
||||
}: let
|
||||
athena =
|
||||
(pkgs.${doctrine.prefix}.athena-bccr.override {
|
||||
inherit (cfg) mirror;
|
||||
}).${
|
||||
cfg.release
|
||||
};
|
||||
|
||||
inherit (athena) vendor;
|
||||
releases = pkgs.${doctrine.prefix}.athena-bccr.override {
|
||||
inherit (cfg) mirror vendor;
|
||||
};
|
||||
|
||||
athena = releases.${cfg.release};
|
||||
driver = athena.card-driver.lib;
|
||||
scmiddleware = "${driver}/lib/SCMiddleware";
|
||||
|
||||
inherit (cfg) vendor;
|
||||
in {
|
||||
environment = {
|
||||
etc =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue