Quellcode durchsuchen

firefox background daemon

Johan Rong vor 3 Wochen
Ursprung
Commit
50efdd6b05
3 geänderte Dateien mit 23 neuen und 0 gelöschten Zeilen
  1. 21 0
      home/modules/apps/firefox.nix
  2. 1 0
      hosts/nixstation/home/default.nix
  3. 1 0
      hosts/ono/home/default.nix

+ 21 - 0
home/modules/apps/firefox.nix

@@ -0,0 +1,21 @@
+{ pkgs, ... }:
+
+{
+  systemd.user.services.firefox-daemon = {
+    Unit = {
+      Description = "Pre-load Firefox in background for fast startup";
+      After = [ "graphical-session.target" ];
+    };
+
+    Service = {
+      Type = "simple";
+      ExecStart = "${pkgs.firefox}/bin/firefox --headless";
+      Restart = "on-failure";
+      TimeoutStartSec = "5";
+    };
+
+    Install = {
+      WantedBy = [ "graphical-session.target" ];
+    };
+  };
+}

+ 1 - 0
hosts/nixstation/home/default.nix

@@ -8,6 +8,7 @@
     ./hyprland.nix
 
     ../../../home/modules/apps/alacritty.nix
+    ../../../home/modules/apps/firefox.nix
     ../../../home/modules/apps/fish
     ../../../home/modules/apps/emacs
     ../../../home/modules/apps/neovim

+ 1 - 0
hosts/ono/home/default.nix

@@ -8,6 +8,7 @@
     ./hyprland.nix
 
     ../../../home/modules/apps/alacritty.nix
+    ../../../home/modules/apps/firefox.nix
     ../../../home/modules/apps/fish
     ../../../home/modules/apps/emacs
     ../../../home/modules/apps/neovim