From 31c01e92aa6f927f7d88510afef4b3038e9aa4cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 21 Dec 2022 21:01:16 -0300 Subject: [PATCH] autostart firefox --- user/firefox.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/user/firefox.nix b/user/firefox.nix index e5c5835..0ecf800 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -31,6 +31,21 @@ in { }; }; }; + systemd.user.services = { + firefox = { + Unit = { + Description = "Firefox Web client"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + Service = { + ExecStartPre = "/usr/bin/env sleep 10s"; + ExecStart = "${pkgs.firefox}/bin/firefox"; + Restart = "on-failure"; + }; + Install = { WantedBy = [ "sway-session.target" ]; }; + }; + }; home.sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; }; }; }