Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
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-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 13e7a3e11272
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e7f2ad0db9d9
Choose a head ref

Commits on Feb 24, 2020

  1. maintainers: add lexuge

    LEXUGE committed Feb 24, 2020
    Copy the full SHA
    9bdb928 View commit details

Commits on Feb 26, 2020

  1. cadence: fix dbus,libjack and missing dependancies

    Bignaux Ronan committed Feb 26, 2020
    Copy the full SHA
    7e63e25 View commit details
  2. cadence: fix pulseaudio bridge

    Bignaux Ronan committed Feb 26, 2020
    Copy the full SHA
    368c8ae View commit details

Commits on Mar 8, 2020

  1. Copy the full SHA
    7107e39 View commit details

Commits on Mar 9, 2020

  1. Fix refmt

    anmonteiro committed Mar 9, 2020
    Copy the full SHA
    c09411b View commit details
  2. Copy the full SHA
    0f0cb0b View commit details

Commits on Mar 11, 2020

  1. Copy the full SHA
    766f89d View commit details

Commits on Mar 12, 2020

  1. jetbrains.jdk: build from source

    Milan Pässler authored and Milan Pässler committed Mar 12, 2020
    Copy the full SHA
    74d9a1f View commit details
  2. smartdns: init at 30

    LEXUGE committed Mar 12, 2020
    Copy the full SHA
    25300d7 View commit details

Commits on Mar 13, 2020

  1. Copy the full SHA
    dbe59ec View commit details
  2. maintainers: add KAction

    KAction committed Mar 13, 2020
    Copy the full SHA
    4481a20 View commit details
  3. cargo-udeps: 0.1.7 -> 0.1.9

    r-ryantm committed Mar 13, 2020
    Copy the full SHA
    c106a4f View commit details

Commits on Mar 14, 2020

  1. croc: 6.4.10 -> 8.0.3

    r-ryantm committed Mar 14, 2020
    Copy the full SHA
    ba95784 View commit details
  2. nix-generate-from-cpan: remove unkown license

    Leave license empty when it is not provided. This prevents packages from
    failing to build because the license is set to
    `stdenv.lib.licenses.unkown`.
    
    There will still be a warning about the unkown license.
    ydlr committed Mar 14, 2020
    Copy the full SHA
    5e2beaf View commit details
  3. nix-generate-from-cpan: use Module::CoreList to detect core modules

    The previous way of detecting core modules failed to filter "if" and
    possibly other core modules.
    ydlr committed Mar 14, 2020
    Copy the full SHA
    9035381 View commit details
  4. geoipupdate: 4.1.5 -> 4.2.2

    r-ryantm committed Mar 14, 2020
    Copy the full SHA
    d633f29 View commit details
  5. Copy the full SHA
    6e132f0 View commit details
  6. pgmetrics: 1.7.1 -> 1.8.1

    r-ryantm authored and marsam committed Mar 14, 2020
    Copy the full SHA
    f47ec36 View commit details
  7. rar2fs: 1.28.0 -> 1.29.0

    r-ryantm committed Mar 14, 2020
    Copy the full SHA
    8ed7848 View commit details
  8. sampler: 1.0.3 -> 1.1.0

    r-ryantm committed Mar 14, 2020
    Copy the full SHA
    8097fc0 View commit details
  9. Merge pull request #82068 from anmonteiro/anmonteiro/bs-platform-7.2.0

    bs-platform: 7.0.1 -> 7.2.0
    marsam authored Mar 14, 2020
    Copy the full SHA
    8a0c1b8 View commit details
  10. Copy the full SHA
    b1c71eb View commit details
  11. ntp: 4.2.8p13 -> 4.2.8p14

    r-ryantm authored and alyssais committed Mar 14, 2020
    Copy the full SHA
    281dd8b View commit details
  12. Copy the full SHA
    3b2d9b3 View commit details
  13. Copy the full SHA
    45cc3c9 View commit details
  14. minio: 2019-10-12 -> 2020-03-06

    bachp authored and alyssais committed Mar 14, 2020
    Copy the full SHA
    85f8014 View commit details
  15. minio-client: 2019-01-30 -> 2020-03-06

    bachp authored and alyssais committed Mar 14, 2020
    Copy the full SHA
    337b357 View commit details
  16. rustracerd: build with current rust

    Fix taken from jwilm/racerd#82.  It just
    updates a dependency.
    alyssais committed Mar 14, 2020
    Copy the full SHA
    6cea0da View commit details
  17. Copy the full SHA
    c4393d6 View commit details
  18. rust_1_38_0: drop

    alyssais committed Mar 14, 2020
    Copy the full SHA
    dcb4319 View commit details
  19. Merge pull request #82572 from r-ryantm/auto-update/pgmetrics

    pgmetrics: 1.7.1 -> 1.8.1
    marsam authored Mar 14, 2020
    Copy the full SHA
    6e2eeba View commit details
  20. Merge pull request #82577 from r-ryantm/auto-update/sampler

    sampler: 1.0.3 -> 1.1.0
    ryantm authored Mar 14, 2020
    Copy the full SHA
    6ac55d9 View commit details
  21. Copy the full SHA
    e3e86f1 View commit details
  22. Copy the full SHA
    c6c7536 View commit details
  23. miniserve: 0.5.0 -> 0.6.0

    dywedir authored and alyssais committed Mar 14, 2020
    Copy the full SHA
    9d8580f View commit details
  24. Merge pull request #75312 from KAction/mmh

    mmh: init at 0.4
    veprbl authored Mar 14, 2020
    Copy the full SHA
    2547ef9 View commit details
  25. Merge pull request #82498 from r-ryantm/auto-update/cargo-udeps

    cargo-udeps: 0.1.7 -> 0.1.9
    dywedir authored Mar 14, 2020
    Copy the full SHA
    1f8127d View commit details
  26. emacs: improve setup hook

    - Add packages installed in a sub-directory of site-lisp, such as
      mu4e, to EMACSLOADPATH.
    
    - Add ELPA packages to EMACSLOADPATH.
    
    - Add each package only once to EMACSLOADPATH. Before, each package
      would typically be added twice for each transitive dependency
      leading to a huge variable for a package having many dependencies.
    
    Fixed #78680
    rycee committed Mar 14, 2020
    Copy the full SHA
    2d2de74 View commit details
  27. Merge pull request #82574 from r-ryantm/auto-update/rar2fs

    rar2fs: 1.28.0 -> 1.29.0
    adisbladis authored Mar 14, 2020
    Copy the full SHA
    920187c View commit details
  28. Merge pull request #82532 from r-ryantm/auto-update/croc

    croc: 6.4.10 -> 8.0.3
    ryantm authored Mar 14, 2020
    Copy the full SHA
    94a67e6 View commit details
  29. Copy the full SHA
    b293343 View commit details
  30. Copy the full SHA
    387d521 View commit details
  31. Copy the full SHA
    b6fe12b View commit details
  32. folding@home: 6.02 -> 7.5.1

    The v7 series is very different.
    
    This commit introduces the 3 packages: fahclient, fahcontrol and
    fahviewer. It also rebuilds the NixOS module to map better with the new
    client.
    zimbatm authored and Jon committed Mar 14, 2020
    Copy the full SHA
    001be89 View commit details
  33. bitlbee-mastodon: 1.4.2 -> 1.4.3

    jpotier authored and alyssais committed Mar 14, 2020
    Copy the full SHA
    20ef86e View commit details
  34. phpPackages.exts: Add extensions

    etu committed Mar 14, 2020
    Copy the full SHA
    e0b1b9d View commit details
  35. xfce4-12: remove alias

    Ekleog committed Mar 14, 2020
    Copy the full SHA
    175f9ef View commit details
  36. tautulli: 2.1.44 -> 2.2.0

    r-ryantm authored and alyssais committed Mar 14, 2020
    Copy the full SHA
    dece4b9 View commit details
  37. lego: 3.3.0 -> 3.4.0

    r-ryantm authored and alyssais committed Mar 14, 2020
    Copy the full SHA
    892827c View commit details
  38. k9s: 0.13.8 -> 0.17.7

    r-ryantm authored and alyssais committed Mar 14, 2020
    Copy the full SHA
    fd9a2e7 View commit details
Showing with 9,873 additions and 5,965 deletions.
  1. +20 −0 maintainers/maintainer-list.nix
  2. +4 −9 maintainers/scripts/nix-generate-from-cpan.pl
  3. +4 −4 nixos/doc/manual/release-notes/rl-2003.xml
  4. +9 −0 nixos/doc/manual/release-notes/rl-2009.xml
  5. +5 −3 nixos/modules/module-list.nix
  6. +2 −4 nixos/modules/security/google_oslogin.nix
  7. +185 −0 nixos/modules/security/tpm2.nix
  8. +81 −0 nixos/modules/services/computing/foldingathome/client.nix
  9. +0 −67 nixos/modules/services/misc/folding-at-home.nix
  10. +2 −4 nixos/modules/services/misc/sssd.nix
  11. +61 −0 nixos/modules/services/networking/smartdns.nix
  12. +25 −1 nixos/modules/services/networking/ssh/sshd.nix
  13. +30 −11 pkgs/applications/audio/cadence/default.nix
  14. +30 −0 pkgs/applications/audio/ft2-clone/default.nix
  15. +30 −0 pkgs/applications/audio/pt2-clone/default.nix
  16. +3 −3 pkgs/applications/blockchains/go-ethereum.nix
  17. +3 −3 pkgs/applications/editors/android-studio/default.nix
  18. +1 −1 pkgs/applications/editors/emacs/default.nix
  19. +10 −0 pkgs/applications/editors/neovim/wrapper.nix
  20. +3 −3 pkgs/applications/gis/openorienteering-mapper/default.nix
  21. +3 −3 pkgs/applications/misc/archiver/default.nix
  22. +3 −3 pkgs/applications/misc/geoipupdate/default.nix
  23. +83 −0 pkgs/applications/misc/obinskit/default.nix
  24. +3 −3 pkgs/applications/misc/sampler/default.nix
  25. +3 −3 pkgs/applications/networking/cluster/fluxctl/default.nix
  26. +4 −4 pkgs/applications/networking/cluster/k9s/default.nix
  27. +1 −1 pkgs/applications/networking/cluster/spacegun/node-composition.nix
  28. +920 −863 pkgs/applications/networking/cluster/spacegun/node-packages.nix
  29. +2 −2 pkgs/applications/networking/instant-messengers/bitlbee-mastodon/default.nix
  30. +2 −2 pkgs/applications/networking/instant-messengers/ripcord/default.nix
  31. +24 −0 pkgs/applications/networking/mailreaders/mmh/default.nix
  32. +3 −2 pkgs/applications/networking/mailreaders/neomutt/default.nix
  33. +2 −0 pkgs/applications/networking/sniffers/wireshark/default.nix
  34. +2 −2 pkgs/applications/networking/ssb/patchwork/default.nix
  35. +0 −41 pkgs/applications/office/ledger/2.6.3.nix
  36. +59 −0 pkgs/applications/science/misc/foldingathome/client.nix
  37. +58 −0 pkgs/applications/science/misc/foldingathome/control.nix
  38. +55 −0 pkgs/applications/science/misc/foldingathome/viewer.nix
  39. +5 −3 pkgs/applications/science/misc/snakemake/default.nix
  40. +2 −2 pkgs/applications/version-management/gitkraken/default.nix
  41. +29 −0 pkgs/applications/video/ffmpeg-normalize/default.nix
  42. +21 −9 pkgs/build-support/emacs/setup-hook.sh
  43. +1 −1 pkgs/desktops/xfce/core/xfwm4/default.nix
  44. +21 −7 pkgs/development/compilers/bs-platform/build-bs-platform.nix
  45. +4 −4 pkgs/development/compilers/bs-platform/default.nix
  46. +1 −1 pkgs/development/compilers/elm/packages/node-composition.nix
  47. +344 −223 pkgs/development/compilers/elm/packages/node-packages.nix
  48. +18 −54 pkgs/development/compilers/jetbrains-jdk/default.nix
  49. +0 −22 pkgs/development/compilers/rust/1_38_0.nix
  50. +26 −0 ...pment/libraries/science/math/openblas/0001-Disable-optimised-aarch64-dgemm_beta-pending-fix.patch
  51. +6 −0 pkgs/development/libraries/science/math/openblas/default.nix
  52. +7 −4 pkgs/development/libraries/sentencepiece/default.nix
  53. +2 −2 pkgs/development/misc/google-clasp/google-clasp.nix
  54. +397 −393 pkgs/development/misc/google-clasp/node-packages.nix
  55. +1 −1 pkgs/development/node-packages/composition-v10.nix
  56. +1 −1 pkgs/development/node-packages/composition-v12.nix
  57. +1 −1 pkgs/development/node-packages/composition-v13.nix
  58. +5 −3 pkgs/development/node-packages/node-env.nix
  59. +1 −0 pkgs/development/node-packages/node-packages-v10.json
  60. +4,142 −2,558 pkgs/development/node-packages/node-packages-v10.nix
  61. +92 −34 pkgs/development/node-packages/node-packages-v12.nix
  62. +52 −39 pkgs/development/node-packages/node-packages-v13.nix
  63. +1 −2 pkgs/development/node-packages/shell-generate.nix
  64. +4 −4 pkgs/development/python-modules/GitPython/default.nix
  65. +38 −0 pkgs/development/python-modules/batchgenerators/default.nix
  66. +9 −3 pkgs/development/python-modules/gitdb/default.nix
  67. +0 −23 pkgs/development/python-modules/gitdb2/default.nix
  68. +17 −6 pkgs/development/python-modules/google-api-python-client/default.nix
  69. +5 −2 pkgs/development/python-modules/sentencepiece/default.nix
  70. +0 −20 pkgs/development/python-modules/smmap2/default.nix
  71. +23 −0 pkgs/development/python-modules/somajo/default.nix
  72. +20 −32 pkgs/development/python-modules/spacy/default.nix
  73. +30 −0 pkgs/development/python-modules/sphinxcontrib-fulltoc/default.nix
  74. +28 −0 pkgs/development/python-modules/sphinxcontrib-katex/default.nix
  75. +2 −2 pkgs/development/python-modules/srsly/default.nix
  76. +15 −25 pkgs/development/python-modules/thinc/default.nix
  77. +38 −0 pkgs/development/python-modules/threadpoolctl/default.nix
  78. +1 −0 pkgs/development/tools/analysis/retdec/default.nix
  79. +3 −3 pkgs/development/tools/analysis/tflint/default.nix
  80. +3 −3 pkgs/development/tools/rust/cargo-udeps/default.nix
  81. +9 −2 pkgs/development/tools/rust/racerd/default.nix
  82. +1 −1 pkgs/development/web/remarkjs/generate.sh
  83. +652 −730 pkgs/development/web/remarkjs/node-packages.nix
  84. +2 −2 pkgs/development/web/remarkjs/nodepkgs.nix
  85. +2 −1 pkgs/misc/base16-builder/generate.sh
  86. +479 −75 pkgs/misc/base16-builder/node-packages-generated.nix
  87. +7 −3 pkgs/misc/base16-builder/node-packages.nix
  88. +3 −0 pkgs/misc/base16-builder/supplement.json
  89. +693 −0 pkgs/misc/base16-builder/supplement.nix
  90. +27 −9 pkgs/misc/emulators/caprice32/default.nix
  91. +0 −36 pkgs/misc/foldingathome/default.nix
  92. +7 −0 pkgs/misc/vim-plugins/overrides.nix
  93. +3 −3 pkgs/servers/caddy/default.nix
  94. +2 −2 pkgs/servers/dns/bind/default.nix
  95. +1 −1 pkgs/servers/matrix-synapse/matrix-appservice-slack/node-composition.nix
  96. +289 −282 pkgs/servers/matrix-synapse/matrix-appservice-slack/node-packages.nix
  97. +3 −3 pkgs/servers/minio/default.nix
  98. +0 −15 pkgs/servers/sql/mariadb/cmake-without-client.patch
  99. +1 −14 pkgs/servers/sql/mariadb/default.nix
  100. +3 −3 pkgs/servers/tautulli/default.nix
  101. +10 −9 pkgs/servers/web-apps/cryptpad/bower-packages.nix
  102. +1 −1 pkgs/servers/web-apps/cryptpad/generate.sh
  103. +69 −45 pkgs/servers/web-apps/cryptpad/node-packages-generated.nix
  104. +1 −1 pkgs/servers/web-apps/cryptpad/node-packages.json
  105. +2 −2 pkgs/servers/web-apps/cryptpad/node-packages.nix
  106. +3 −3 pkgs/tools/admin/eksctl/default.nix
  107. +3 −3 pkgs/tools/admin/lego/default.nix
  108. +13 −13 pkgs/tools/backup/duplicity/default.nix
  109. +2 −2 pkgs/tools/backup/rdedup/default.nix
  110. +3 −3 pkgs/tools/filesystems/rar2fs/default.nix
  111. +1 −0 pkgs/tools/misc/ckb-next/default.nix
  112. +6 −6 pkgs/tools/misc/miniserve/default.nix
  113. +6 −4 pkgs/tools/misc/pgmetrics/default.nix
  114. +1 −1 pkgs/tools/networking/airfield/deps.sh
  115. +97 −117 pkgs/tools/networking/airfield/node-packages.nix
  116. +2 −2 pkgs/tools/networking/airfield/node.nix
  117. +3 −3 pkgs/tools/networking/clash/default.nix
  118. +4 −4 pkgs/tools/networking/croc/default.nix
  119. +7 −5 pkgs/tools/networking/minio-client/default.nix
  120. +3 −3 pkgs/tools/networking/ntp/default.nix
  121. +38 −0 pkgs/tools/networking/smartdns/default.nix
  122. +1 −1 pkgs/tools/package-management/nixui/generate.sh
  123. +2 −2 pkgs/tools/package-management/nixui/nixui.nix
  124. +6 −6 pkgs/tools/package-management/nixui/node-packages.nix
  125. +2 −2 pkgs/tools/system/fio/default.nix
  126. +2 −1 pkgs/top-level/aliases.nix
  127. +22 −12 pkgs/top-level/all-packages.nix
  128. +216 −1 pkgs/top-level/php-packages.nix
  129. +12 −2 pkgs/top-level/python-packages.nix
20 changes: 20 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
@@ -3713,6 +3713,16 @@
githubId = 66669;
name = "Jeff Zellner";
};
kaction = {
name = "Dmitry Bogatov";
email = "KAction@disroot.org";
github = "kaction";
githubId = 44864956;
key = [{
longkeyid = "ed25519/0x749FD4DFA2E94236";
fingerprint = "3F87 0A7C A7B4 3731 2F13 6083 749F D4DF A2E9 4236";
}];
};
kaiha = {
email = "kai.harries@gmail.com";
github = "kaiha";
@@ -4144,6 +4154,16 @@
githubId = 3425311;
name = "Antoine Eiche";
};
lexuge = {
name = "Harry Ying";
email = "lexugeyky@outlook.com";
github = "LEXUGE";
githubId = 13804737;
keys = [{
longkeyid = "rsa4096/0xAE53B4C2E58EDD45";
fingerprint = "7FE2 113A A08B 695A C8B8 DDE6 AE53 B4C2 E58E DD45";
}];
};
lheckemann = {
email = "git@sphalerite.org";
github = "lheckemann";
13 changes: 4 additions & 9 deletions maintainers/scripts/nix-generate-from-cpan.pl
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@

use CPAN::Meta();
use CPANPLUS::Backend();
use Module::CoreList;
use Getopt::Long::Descriptive qw( describe_options );
use JSON::PP qw( encode_json );
use Log::Log4perl qw(:easy);
@@ -164,7 +165,7 @@

# License not provided in metadata.
unknown => {
licenses => [qw( unknown )],
licenses => [],
amb => 1
}
);
@@ -278,14 +279,8 @@ sub get_deps {
foreach my $n ( $deps->required_modules ) {
next if $n eq "perl";

# Figure out whether the module is a core module by attempting
# to `use` the module in a pure Perl interpreter and checking
# whether it succeeded. Note, $^X is a magic variable holding
# the path to the running Perl interpreter.
if ( system("env -i $^X -M$n -e1 >/dev/null 2>&1") == 0 ) {
DEBUG("skipping Perl-builtin module $n");
next;
}
my @core = Module::CoreList->find_modules(qr/^$n$/);
next if (@core);

my $pkg = module_to_pkg( $cb, $n );

8 changes: 4 additions & 4 deletions nixos/doc/manual/release-notes/rl-2003.xml
Original file line number Diff line number Diff line change
@@ -196,10 +196,10 @@ services.xserver.displayManager.defaultSession = "xfce+icewm";
</listitem>
<listitem>
<para>
There is now only one Xfce package-set and module. This means attributes, <literal>xfce4-14</literal>
<literal>xfce4-12</literal>, and <literal>xfceUnstable</literal> all now point to the latest Xfce 4.14
packages. And in future NixOS releases will be the latest released version of Xfce available at the
time during the releases development (if viable).
There is now only one Xfce package-set and module. This means that attributes <literal>xfce4-14</literal>
and <literal>xfceUnstable</literal> all now point to the latest Xfce 4.14
packages. And in the future NixOS releases will be the latest released version of Xfce available at the
time of the release's development (if viable).
</para>
</listitem>
<listitem>
9 changes: 9 additions & 0 deletions nixos/doc/manual/release-notes/rl-2009.xml
Original file line number Diff line number Diff line change
@@ -28,6 +28,15 @@
PHP now defaults to PHP 7.4, updated from 7.3.
</para>
</listitem>
<listitem>
<para>
Two new options, <link linkend="opt-services.openssh.authorizedKeysCommand">authorizedKeysCommand</link>
and <link linkend="opt-services.openssh.authorizedKeysCommandUser">authorizedKeysCommandUser</link>, have
been added to the <literal>openssh</literal> module. If you have <literal>AuthorizedKeysCommand</literal>
in your <link linkend="opt-services.openssh.extraConfig">services.openssh.extraConfig</link> you should
make use of these new options instead.
</para>
</listitem>
</itemizedlist>
</section>

8 changes: 5 additions & 3 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
@@ -200,6 +200,7 @@
./security/wrappers/default.nix
./security/sudo.nix
./security/systemd-confinement.nix
./security/tpm2.nix
./services/admin/oxidized.nix
./services/admin/salt/master.nix
./services/admin/salt/minion.nix
@@ -247,9 +248,10 @@
./services/cluster/kubernetes/proxy.nix
./services/cluster/kubernetes/scheduler.nix
./services/computing/boinc/client.nix
./services/computing/torque/server.nix
./services/computing/torque/mom.nix
./services/computing/foldingathome/client.nix
./services/computing/slurm/slurm.nix
./services/computing/torque/mom.nix
./services/computing/torque/server.nix
./services/continuous-integration/buildbot/master.nix
./services/continuous-integration/buildbot/worker.nix
./services/continuous-integration/buildkite-agents.nix
@@ -432,7 +434,6 @@
./services/misc/ethminer.nix
./services/misc/exhibitor.nix
./services/misc/felix.nix
./services/misc/folding-at-home.nix
./services/misc/freeswitch.nix
./services/misc/fstrim.nix
./services/misc/gammu-smsd.nix
@@ -709,6 +710,7 @@
./services/networking/shorewall6.nix
./services/networking/shout.nix
./services/networking/sniproxy.nix
./services/networking/smartdns.nix
./services/networking/smokeping.nix
./services/networking/softether.nix
./services/networking/spacecookie.nix
6 changes: 2 additions & 4 deletions nixos/modules/security/google_oslogin.nix
Original file line number Diff line number Diff line change
@@ -59,10 +59,8 @@ in
exec ${package}/bin/google_authorized_keys "$@"
'';
};
services.openssh.extraConfig = ''
AuthorizedKeysCommand /etc/ssh/authorized_keys_command_google_oslogin %u
AuthorizedKeysCommandUser nobody
'';
services.openssh.authorizedKeysCommand = "/etc/ssh/authorized_keys_command_google_oslogin %u";
services.openssh.authorizedKeysCommandUser = "nobody";
};

}
185 changes: 185 additions & 0 deletions nixos/modules/security/tpm2.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
{ lib, pkgs, config, ... }:
let
cfg = config.security.tpm2;

# This snippet is taken from tpm2-tss/dist/tpm-udev.rules, but modified to allow custom user/groups
# The idea is that the tssUser is allowed to acess the TPM and kernel TPM resource manager, while
# the tssGroup is only allowed to access the kernel resource manager
# Therefore, if either of the two are null, the respective part isn't generated
udevRules = tssUser: tssGroup: ''
${lib.optionalString (tssUser != null) ''KERNEL=="tpm[0-9]*", MODE="0660", OWNER="${tssUser}"''}
${lib.optionalString (tssUser != null || tssGroup != null)
''KERNEL=="tpmrm[0-9]*", MODE="0660"''
+ lib.optionalString (tssUser != null) '', OWNER="${tssUser}"''
+ lib.optionalString (tssGroup != null) '', GROUP="${tssGroup}"''
}
'';

in {
options.security.tpm2 = {
enable = lib.mkEnableOption "Trusted Platform Module 2 support";

tssUser = lib.mkOption {
description = ''
Name of the tpm device-owner and service user, set if applyUdevRules is
set.
'';
type = lib.types.nullOr lib.types.str;
default = if cfg.abrmd.enable then "tss" else "root";
defaultText = ''"tss" when using the userspace resource manager,'' +
''"root" otherwise'';
};

tssGroup = lib.mkOption {
description = ''
Group of the tpm kernel resource manager (tpmrm) device-group, set if
applyUdevRules is set.
'';
type = lib.types.nullOr lib.types.str;
default = "tss";
};

applyUdevRules = lib.mkOption {
description = ''
Whether to make the /dev/tpm[0-9] devices accessible by the tssUser, or
the /dev/tpmrm[0-9] by tssGroup respectively
'';
type = lib.types.bool;
default = true;
};

abrmd = {
enable = lib.mkEnableOption ''
Trusted Platform 2 userspace resource manager daemon
'';

package = lib.mkOption {
description = "tpm2-abrmd package to use";
type = lib.types.package;
default = pkgs.tpm2-abrmd;
defaultText = "pkgs.tpm2-abrmd";
};
};

pkcs11 = {
enable = lib.mkEnableOption ''
TPM2 PKCS#11 tool and shared library in system path
(<literal>/run/current-system/sw/lib/libtpm2_pkcs11.so</literal>)
'';

package = lib.mkOption {
description = "tpm2-pkcs11 package to use";
type = lib.types.package;
default = pkgs.tpm2-pkcs11;
defaultText = "pkgs.tpm2-pkcs11";
};
};

tctiEnvironment = {
enable = lib.mkOption {
description = ''
Set common TCTI environment variables to the specified value.
The variables are
<itemizedlist>
<listitem>
<para>
<literal>TPM2TOOLS_TCTI</literal>
</para>
</listitem>
<listitem>
<para>
<literal>TPM2_PKCS11_TCTI</literal>
</para>
</listitem>
</itemizedlist>
'';
type = lib.types.bool;
default = false;
};

interface = lib.mkOption {
description = ''
The name of the TPM command transmission interface (TCTI) library to
use.
'';
type = lib.types.enum [ "tabrmd" "device" ];
default = "device";
};

deviceConf = lib.mkOption {
description = ''
Configuration part of the device TCTI, e.g. the path to the TPM device.
Applies if interface is set to "device".
The format is specified in the
<link xlink:href="https://github.com/tpm2-software/tpm2-tools/blob/master/man/common/tcti.md#tcti-options">
tpm2-tools repository</link>.
'';
type = lib.types.str;
default = "/dev/tpmrm0";
};

tabrmdConf = lib.mkOption {
description = ''
Configuration part of the tabrmd TCTI, like the D-Bus bus name.
Applies if interface is set to "tabrmd".
The format is specified in the
<link xlink:href="https://github.com/tpm2-software/tpm2-tools/blob/master/man/common/tcti.md#tcti-options">
tpm2-tools repository</link>.
'';
type = lib.types.str;
default = "bus_name=com.intel.tss2.Tabrmd";
};
};
};

config = lib.mkIf cfg.enable (lib.mkMerge [
{
# PKCS11 tools and library
environment.systemPackages = lib.mkIf cfg.pkcs11.enable [
(lib.getBin cfg.pkcs11.package)
(lib.getLib cfg.pkcs11.package)
];

services.udev.extraRules = lib.mkIf cfg.applyUdevRules
(udevRules cfg.tssUser cfg.tssGroup);

# Create the tss user and group only if the default value is used
users.users.${cfg.tssUser} = lib.mkIf (cfg.tssUser == "tss") {
isSystemUser = true;
};
users.groups.${cfg.tssGroup} = lib.mkIf (cfg.tssGroup == "tss") {};

environment.variables = lib.mkIf cfg.tctiEnvironment.enable (
lib.attrsets.genAttrs [
"TPM2TOOLS_TCTI"
"TPM2_PKCS11_TCTI"
] (_: ''${cfg.tctiEnvironment.interface}:${
if cfg.tctiEnvironment.interface == "tabrmd" then
cfg.tctiEnvironment.tabrmdConf
else
cfg.tctiEnvironment.deviceConf
}'')
);
}

(lib.mkIf cfg.abrmd.enable {
systemd.services."tpm2-abrmd" = {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "dbus";
Restart = "always";
RestartSec = 30;
BusName = "com.intel.tss2.Tabrmd";
StandardOutput = "syslog";
ExecStart = "${cfg.abrmd.package}/bin/tpm2-abrmd";
User = "tss";
Group = "nogroup";
};
};

services.dbus.packages = lib.singleton cfg.abrmd.package;
})
]);

meta.maintainers = with lib.maintainers; [ lschuermann ];
}
Loading