summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/hardware/laptop.nix13
-rw-r--r--modules/hardware/nitrokey.nix10
-rw-r--r--modules/hardware/printing.nix9
-rw-r--r--modules/services/zeroconf.nix11
4 files changed, 40 insertions, 3 deletions
diff --git a/modules/hardware/laptop.nix b/modules/hardware/laptop.nix
index bd083081..c6628855 100644
--- a/modules/hardware/laptop.nix
+++ b/modules/hardware/laptop.nix
@@ -6,7 +6,18 @@
   ];
 
   hardware = {
-    bluetooth.enable = true;
+    bluetooth = {
+      enable = true;
+      powerOnBoot = false;
+    };
+  };
+  systemd.services.bluetooth.wantedBy = lib.mkForce [];
+  systemd.timers.bluetooth = {
+    description = "Delayed startup of Bluetooth";
+    wantedBy = [ "timers.target" ];
+    timerConfig = {
+      OnActiveSec = "1 min";
+    };
   };
 
   environment.systemPackages = with pkgs; [
diff --git a/modules/hardware/nitrokey.nix b/modules/hardware/nitrokey.nix
index ec25d8e0..22e9d762 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
diff --git a/modules/hardware/printing.nix b/modules/hardware/printing.nix
index 32aa4038..96d3a959 100644
--- a/modules/hardware/printing.nix
+++ b/modules/hardware/printing.nix
@@ -3,6 +3,15 @@
 { services.printing.enable = true;
   systemd.services.cups.wantedBy = lib.mkForce [];
   systemd.sockets.cups.wantedBy = [ "sockets.target" ];
+  systemd.services.cups-browsed.wantedBy = lib.mkForce [];
+
+  systemd.timers.cups-browsed = {
+    description = "Delayed startup of CUPS Remote Printer Discovery";
+    wantedBy = [ "timers.target" ];
+    timerConfig = {
+      OnActiveSec = "2 min";
+    };
+  };
 
   imports = [
     ../services/zeroconf.nix
diff --git a/modules/services/zeroconf.nix b/modules/services/zeroconf.nix
index aa4b47e8..0b428c54 100644
--- a/modules/services/zeroconf.nix
+++ b/modules/services/zeroconf.nix
@@ -1,7 +1,16 @@
-{ config, pkgs, ... }:
+{ config, pkgs, lib, ... }:
 
 { services.avahi = {
     enable = true;
     nssmdns = true;
+    ipv6 = true;
+  };
+  systemd.services.avahi-daemon.wantedBy = lib.mkForce [];
+  systemd.timers.avahi-daemon = {
+    description = "Delayed startup of Avahi";
+    wantedBy = [ "timers.target" ];
+    timerConfig = {
+      OnActiveSec = "1 min";
+    };
   };
 }