From 04a0a6e5fff44cfe53118c3184b7d50a030bd0a3 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Mon, 22 Jan 2024 00:09:37 +0100 Subject: [PATCH] nitrokey: Fix module For some reason, using the // atribute set merge operator does not work here. --- modules/nitrokey.nix | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/modules/nitrokey.nix b/modules/nitrokey.nix index 63eb10a..bf32140 100644 --- a/modules/nitrokey.nix +++ b/modules/nitrokey.nix @@ -1,16 +1,19 @@ -# SPDX-FileCopyrightText: 2023 Simon Bruder +# SPDX-FileCopyrightText: 2023-2024 Simon Bruder # # SPDX-License-Identifier: AGPL-3.0-or-later { config, lib, pkgs, ... }: -{ - hardware.nitrokey.enable = true; -} // (lib.mkIf config.sbruder.gui.enable { - environment.systemPackages = with pkgs; [ - # both depend on pypemicro, which is not needed, but nixpkgs requires it - # (even though it could have been optional: https://github.com/NixOS/nixpkgs/pull/183099#discussion_r933226708) - #nitrokey-app2 - #pynitrokey - ]; -}) +lib.mkMerge [ + { + hardware.nitrokey.enable = true; + } + (lib.mkIf config.sbruder.gui.enable { + environment.systemPackages = with pkgs; [ + # both depend on pypemicro, which is not needed, but nixpkgs requires it + # (even though it could have been optional: https://github.com/NixOS/nixpkgs/pull/183099#discussion_r933226708) + #nitrokey-app2 + #pynitrokey + ]; + }) +]