Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 337475b19928
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f59139549210
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Jan 18, 2021

  1. nitrokey-app: 1.3.2 -> 1.4.2

    The optional argument group was removed because it is no longer used
    in the udev-rules that come with the libnitrokey.
    KaiHa committed Jan 18, 2021
    Copy the full SHA
    d27be23 View commit details
  2. module nitrokey: drop option group

    Since the update of the nitrokey-app to 1.4.2 the group option is no
    longer supported.
    KaiHa committed Jan 18, 2021
    Copy the full SHA
    991aba3 View commit details

Commits on Jan 19, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f591395 View commit details
Showing with 5 additions and 29 deletions.
  1. +1 −15 nixos/modules/hardware/nitrokey.nix
  2. +2 −7 pkgs/tools/security/nitrokey-app/default.nix
  3. +2 −7 pkgs/tools/security/nitrokey-app/udev-rules.nix
16 changes: 1 addition & 15 deletions nixos/modules/hardware/nitrokey.nix
Original file line number Diff line number Diff line change
@@ -19,23 +19,9 @@ in
nitrokey-app package, depending on your device and needs.
'';
};

group = mkOption {
type = types.str;
default = "nitrokey";
example = "wheel";
description = ''
Grant access to Nitrokey devices to users in this group.
'';
};
};

config = mkIf cfg.enable {
services.udev.packages = [
(pkgs.nitrokey-udev-rules.override (attrs:
{ inherit (cfg) group; }
))
];
users.groups.${cfg.group} = {};
services.udev.packages = [ pkgs.nitrokey-udev-rules ];
};
}
9 changes: 2 additions & 7 deletions pkgs/tools/security/nitrokey-app/default.nix
Original file line number Diff line number Diff line change
@@ -3,21 +3,16 @@

stdenv.mkDerivation rec {
pname = "nitrokey-app";
version = "1.3.2";
version = "1.4.2";

src = fetchFromGitHub {
owner = "Nitrokey";
repo = "nitrokey-app";
rev = "v${version}";
sha256 = "193kzlz3qn9il56h78faiqkgv749hdils1nn1iw6g3wphgx5fjs2";
sha256 = "1k0w921hfrya4q2r7bqn7kgmwvwb7c15k9ymlbnksmfc9yyjyfcv";
fetchSubmodules = true;
};

postPatch = ''
substituteInPlace libnitrokey/CMakeLists.txt \
--replace '/data/41-nitrokey.rules' '/libnitrokey/data/41-nitrokey.rules'
'';

buildInputs = [
bash-completion
hidapi
9 changes: 2 additions & 7 deletions pkgs/tools/security/nitrokey-app/udev-rules.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ lib, stdenv, nitrokey-app
, group ? "nitrokey"
}:
{ lib, stdenv, nitrokey-app }:


stdenv.mkDerivation {
name = "nitrokey-udev-rules-${lib.getVersion nitrokey-app}";
@@ -9,10 +8,6 @@ stdenv.mkDerivation {

dontBuild = true;

patchPhase = ''
substituteInPlace libnitrokey/data/41-nitrokey.rules --replace plugdev "${group}"
'';

installPhase = ''
mkdir -p $out/etc/udev/rules.d
cp libnitrokey/data/41-nitrokey.rules $out/etc/udev/rules.d