aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--switch-to-backup-yubikey23
2 files changed, 24 insertions, 1 deletions
diff --git a/README.md b/README.md
index 5cc97f3..3adb6c4 100644
--- a/README.md
+++ b/README.md
@@ -264,7 +264,7 @@ Generate a NixOS LiveCD image with the given config:
let
config = { pkgs, ... }:
with pkgs; {
- imports = [ <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix> ];
+ imports = [ <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix> ];
boot.kernelPackages = linuxPackages_latest;
diff --git a/switch-to-backup-yubikey b/switch-to-backup-yubikey
new file mode 100644
index 0000000..e4d877a
--- /dev/null
+++ b/switch-to-backup-yubikey
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# To make a duplicate Yubikey for GPG keys
+# 1. Insert Yubikey1
+# 2. Create keys/subkeys
+# 3. Run keytocard to transfer keys to Yubikey1
+# 4. QUIT WITHOUT SAVING!!!!!
+#
+# This will leave the keys on the Yubikey but NOT change the
+# GPG keyring to point to the Yubikey1 with a stub
+#
+# 5. Insert Yubikey2
+# 6. Run keytocard to transfer keys to Yubikey2
+# 7. QUIT and SAVE to make GPG point it's stubs to Yubikey2
+#
+# Running any decrypt, auth or sign will now ask you to insert Yubikey2
+# To switch to Yubikey1 at any time run this script to force GPG
+# to repoint the key stubs to the inserted Yubikey
+
+read -p "Insert the Yubikey you want to use .... " ignore
+echo "Switching GPG to backup Yubikey ..."
+
+gpg-connect-agent "scd serialno" "learn --force" /bye