alpha
Login
or
Join now
lass.pds.lassul.us
/
superconfig
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
1
Pipelines
yubikey: remove old broken config
author
lassulus
date
2 years ago
(Oct 22, 2024, 1:32 AM CEST)
commit
5e51677b
5e51677bd7b3adbe0fa55f6ca0a56f4d3e9ef7d5
parent
91b43770
91b437700f902a68c7648e36652e2cc26db06d26
+1
-28
1 changed file
Expand all
Collapse all
Unified
Split
2configs
yubikey.nix
+1
-28
2configs/yubikey.nix
View file
Reviewed
···
1
1
{
2
2
self,
3
3
-
lib,
4
3
pkgs,
5
4
...
6
5
}:
7
7
-
let
8
8
-
# pcsclite workaround until https://github.com/NixOS/nixpkgs/pull/308884 is in unstable
9
9
-
pcsclite = pkgs.pcsclite.overrideAttrs (old: {
10
10
-
postPatch =
11
11
-
old.postPatch
12
12
-
+ (lib.optionalString
13
13
-
(!(lib.strings.hasInfix ''--replace-fail "libpcsclite_real.so.1"'' old.postPatch))
14
14
-
''
15
15
-
substituteInPlace src/libredirect.c src/spy/libpcscspy.c \
16
16
-
--replace-fail "libpcsclite_real.so.1" "$lib/lib/libpcsclite_real.so.1"
17
17
-
''
18
18
-
);
19
19
-
});
20
20
-
in
21
6
{
22
7
environment.systemPackages = with pkgs; [
23
8
yubikey-personalization
···
36
21
systemd.user.services.gpg-agent.serviceConfig.ExecStartPre = pkgs.writers.writeDash "init_gpg" ''
37
22
set -x
38
23
mkdir -p $HOME/.gnupg
39
39
-
${pkgs.coreutils}/bin/ln -sf ${pkgs.writeText "scdaemon.conf" ''
40
40
-
disable-ccid
41
41
-
pcsc-driver ${pcsclite.lib}/lib/libpcsclite.so.1
42
42
-
card-timeout 1
43
43
-
44
44
-
# Always try to use yubikey as the first reader
45
45
-
# even when other smart card readers are connected
46
46
-
# Name of the reader can be found using the pcsc_scan command
47
47
-
# If you have problems with gpg not recognizing the Yubikey
48
48
-
# then make sure that the string here matches exacly pcsc_scan
49
49
-
# command output. Also check journalctl -f for errors.
50
50
-
reader-port Yubico YubiKey
51
51
-
''} $HOME/.gnupg/scdaemon.conf
24
24
+
rm -f $HOME/.gnupg/scdaemon.conf
52
25
'';
53
26
systemd.user.services.gpg-agent.serviceConfig.ExecStartPost = pkgs.writers.writeDash "init_gpg" ''
54
27
${pkgs.gnupg}/bin/gpg --import ${