about summary refs log tree commit diff stats
path: root/home-manager/config/gpg/default.nix
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-08-01 15:31:42 +0200
committerSoispha <soispha@vhack.eu>2023-08-01 15:42:54 +0200
commit0a608bd781dcda40144097b007fac0a0c60a8ee1 (patch)
treee69fbc1fd0e15e3b86f31f47b776df21f6f0170d /home-manager/config/gpg/default.nix
parentFix(hm/conf/gammastep): Use lighter settings on laptops (diff)
downloadnixos-config-0a608bd781dcda40144097b007fac0a0c60a8ee1.tar.gz
nixos-config-0a608bd781dcda40144097b007fac0a0c60a8ee1.zip
Refactor(treewide): Move module configuration in separate files
Diffstat (limited to 'home-manager/config/gpg/default.nix')
-rw-r--r--home-manager/config/gpg/default.nix65
1 files changed, 0 insertions, 65 deletions
diff --git a/home-manager/config/gpg/default.nix b/home-manager/config/gpg/default.nix
deleted file mode 100644
index 52069c94..00000000
--- a/home-manager/config/gpg/default.nix
+++ /dev/null
@@ -1,65 +0,0 @@
-{
-  config,
-  nixosConfig,
-  sysLib,
-  pkgs,
-  ...
-}: let
-  agent-program = sysLib.writeShellScriptWithLibrary {
-    name = "onlykey-gpg-agent";
-    src = ./agent-program;
-    dependencies = with pkgs; [
-      python3
-      onlykey-agent
-    ];
-  };
-  settings =
-    if nixosConfig.networking.hostName == "isimud"
-    then {}
-    else {
-      # Hardware-based GPG configuration
-      agent-program = "${agent-program}/bin/onlykey-gpg-agent";
-
-      default-key = "Soispha <soispha@vhack.eu>";
-      # TODO add more
-    };
-  gpg-agent =
-    if nixosConfig.networking.hostName == "isimud"
-    then {
-      enable = true;
-      enableZshIntegration = true;
-      enableScDaemon = true; # smartcards and such things
-      pinentryFlavor = "tty";
-    }
-    else {
-      enable = false;
-      enableZshIntegration = true;
-      enableScDaemon = true; # smartcards and such things
-      pinentryFlavor = "tty";
-    };
-in {
-  programs.gpg = {
-    enable = true;
-    homedir = "${config.xdg.dataHome}/gnupg/onlykey";
-    mutableKeys = false;
-    mutableTrust = false;
-    inherit settings;
-    publicKeys = [
-      {
-        source = ./keys/key_1;
-        trust = "ultimate";
-      }
-      {
-        source = ./keys/key_2;
-        trust = "ultimate";
-      }
-      {
-        source = ./keys/key_3;
-        trust = "full";
-      }
-    ];
-  };
-  services = {
-    inherit gpg-agent;
-  };
-}