Skip to content
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
37 changes: 37 additions & 0 deletions projects/ThresholdOPRF/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
lib,
pkgs,
sources,
...
}@args:

{
metadata = {
summary = "Oblivious Pseudo-random Functions (OPRFs) and Threshold constructions implementations";
subgrants = {
Entrust = [
"ThresholdOPRF"
];
Review = [
"OpaqueSphinx"
"OpaqueSphinxServer"
"OpaqueStore-Sphinx2.0"
];
};
};

nixos.modules.programs = {
ThresholdOPRF = {
name = "ThresholdOPRF";
module = ./programs/ThresholdOPRF/module.nix;
examples."Enable ThresholdOPRF" = {
module = ./programs/ThresholdOPRF/examples/basic.nix;
description = "";
tests.basic.module = null;
};
};
};

# pwdsphinx needs a module
nixos.modules.services.ThresholdOPRF.module = null;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{ ... }:

{
programs.ThresholdOPRF.enable = true;
}
26 changes: 26 additions & 0 deletions projects/ThresholdOPRF/programs/ThresholdOPRF/module.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.ThresholdOPRF;
in
{
options.programs.ThresholdOPRF = {
enable = lib.mkEnableOption "ThresholdOPRF";
};

config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
libopaque
liboprf
pwdsphinx
python3Packages.opaque
python3Packages.pyequihash
python3Packages.pyoprf
python3Packages.qrcodegen
];
};
}