summary refs log tree commit diff stats
path: root/modules/hardware/nitrokey.nix
diff options
context:
space:
mode:
authorAlan Pearce2018-04-29 15:00:53 +0200
committerAlan Pearce2018-04-29 15:00:53 +0200
commit05571aa5ed5eb898be468bff237657914f7e9dcf (patch)
treeb7f271af5d42dce8caec06a66eaafd9e1ef6411d /modules/hardware/nitrokey.nix
parent68f44953449af2ad3565426e1716757fe7afc04b (diff)
downloadnixos-configuration-05571aa5ed5eb898be468bff237657914f7e9dcf.tar.lz
nixos-configuration-05571aa5ed5eb898be468bff237657914f7e9dcf.tar.zst
nixos-configuration-05571aa5ed5eb898be468bff237657914f7e9dcf.zip
Delay startup of non-essential services
Diffstat (limited to 'modules/hardware/nitrokey.nix')
-rw-r--r--modules/hardware/nitrokey.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/hardware/nitrokey.nix b/modules/hardware/nitrokey.nix
index ec25d8e..22e9d76 100644
--- a/modules/hardware/nitrokey.nix
+++ b/modules/hardware/nitrokey.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, ... }:
+{ config, pkgs, lib, ... }:
 
 { programs.ssh.startAgent = false;
 
@@ -26,6 +26,14 @@
       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