summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
authorAlan Pearce2019-06-08 20:12:46 +0200
committerAlan Pearce2019-06-08 20:12:46 +0200
commit006c0cc4659e20e47541657bbd192492c6461aa2 (patch)
tree367361d10eb2e7c125fe56d2574353b9afb9a34a /modules
parent32827c9f15a158877e10bc35e39c73e2e3486a90 (diff)
downloadnixos-configuration-006c0cc4659e20e47541657bbd192492c6461aa2.tar.lz
nixos-configuration-006c0cc4659e20e47541657bbd192492c6461aa2.tar.zst
nixos-configuration-006c0cc4659e20e47541657bbd192492c6461aa2.zip
Separate GnuPG, Keybase and Tor
Diffstat (limited to 'modules')
-rw-r--r--modules/programs/gnupg.nix38
-rw-r--r--modules/programs/keybase.nix11
-rw-r--r--modules/programs/tor.nix22
3 files changed, 37 insertions, 34 deletions
diff --git a/modules/programs/gnupg.nix b/modules/programs/gnupg.nix
index af50078..663bcb3 100644
--- a/modules/programs/gnupg.nix
+++ b/modules/programs/gnupg.nix
@@ -1,40 +1,10 @@
 { config, pkgs, lib, ... }:
 
-{ programs.ssh.startAgent = false;
-
-  programs.gnupg = {
-    agent = {
-      enable = true;
-      enableSSHSupport = true;
-    };
-    dirmngr.enable = true;
-  };
-
-  services.keybase.enable = true;
-  services.kbfs.enable = true;
-  environment.variables.NIX_SKIP_KEYBASE_CHECKS = "1";
-
-  services.tor = {
-    enable = true;
-    client = {
-      enable = true;
-      socksListenAddress = "9050 IPv6Traffic";
-    };
-    torsocks = {
-      enable = true;
-    };
-  };
-  systemd.services.tor.wantedBy = lib.mkForce [];
-  systemd.timers.tor = {
-    description = "Delayed startup of Tor";
-    wantedBy = [ "timers.target" ];
-    timerConfig = {
-      OnActiveSec = "1 min";
-    };
-  };
-
+{
   environment.systemPackages = with pkgs; [
     gnupg
-    keybase-gui
+    pinentry
+    (python3.withPackages(ps: with ps; [ trezor_agent wheel ]))
   ];
+  environment.variables.GNUPGHOME = "$HOME/.gnupg/trezor/";
 }
diff --git a/modules/programs/keybase.nix b/modules/programs/keybase.nix
new file mode 100644
index 0000000..39a16b2
--- /dev/null
+++ b/modules/programs/keybase.nix
@@ -0,0 +1,11 @@
+{ config, pkgs, lib, ... }:
+
+{
+  services.keybase.enable = true;
+  services.kbfs.enable = true;
+  environment.variables.NIX_SKIP_KEYBASE_CHECKS = "1";
+
+  environment.systemPackages = with pkgs; [
+    keybase-gui
+  ];
+}
diff --git a/modules/programs/tor.nix b/modules/programs/tor.nix
new file mode 100644
index 0000000..5524aed
--- /dev/null
+++ b/modules/programs/tor.nix
@@ -0,0 +1,22 @@
+{ config, pkgs, lib, ... }:
+
+{
+  services.tor = {
+    enable = true;
+    client = {
+      enable = true;
+      socksListenAddress = "9050 IPv6Traffic";
+    };
+    torsocks = {
+      enable = true;
+    };
+  };
+  systemd.services.tor.wantedBy = lib.mkForce [];
+  systemd.timers.tor = {
+    description = "Delayed startup of Tor";
+    wantedBy = [ "timers.target" ];
+    timerConfig = {
+      OnActiveSec = "1 min";
+    };
+  };
+}