From 1105e2de4ad17c50ef73789a68106d4f0b2a1dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sun, 6 Mar 2022 10:29:25 +0100 Subject: [PATCH] feat: Add mako as a systemd service fix #28 --- config/programs/mako.nix | 14 ++++++++++++++ config/programs/sway.nix | 4 +--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 config/programs/mako.nix diff --git a/config/programs/mako.nix b/config/programs/mako.nix new file mode 100644 index 00000000..9c020fe5 --- /dev/null +++ b/config/programs/mako.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: { + systemd.user.services.mako = { + Unit = { + Description = "mako"; + PartOf = [ "graphical-session.target" ]; + }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + Service = { + ExecStart = "${pkgs.mako}/bin/mako --default-timeout 30000"; + }; + }; +} diff --git a/config/programs/sway.nix b/config/programs/sway.nix index e52e13a8..fdd5ee88 100644 --- a/config/programs/sway.nix +++ b/config/programs/sway.nix @@ -1,6 +1,7 @@ { config, pkgs, lib, ... }: { imports = [ ./wl-clipboard.nix + ./mako.nix ]; wayland.windowManager.sway = { enable = true; @@ -50,9 +51,6 @@ }; }; startup = [ - { - command = "${pkgs.mako}/bin/mako"; - } { command = "${pkgs.swayidle}/bin/swayidle -w timeout 300 '${pkgs.swaylock}/bin/swaylock -f -c 000000' timeout 305 '${pkgs.sway}/bin/swaymsg \"output * dpms off\"' resume '${pkgs.sway}/bin/swaymsg \"output * dpms on\"' lock '${pkgs.swaylock}/bin/swaylock -f -c 000000' unlock '${pkgs.procps}/bin/pkill swaylock'"; }