From 0d7b9f78a52cd5d2b645bc53cff61e6e241b64b5 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Wed, 9 Feb 2022 23:13:06 -0500 Subject: [PATCH] misc changes --- makefile | 2 +- modules/applications/sway/mako.nix | 36 ++++++++++++++++++++---------- modules/applications/sway/sway.nix | 4 ++-- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/makefile b/makefile index 7855a22..a7b78e4 100644 --- a/makefile +++ b/makefile @@ -118,7 +118,7 @@ remove: swapoff /dev/partitions/swap >/dev/null || true umount /mnt/home >/dev/null || true umount /mnt/boot >/dev/null || true - umount /mnt/rpool >/dev/null || true + umount /mnt/rpool >/dev/null || true umount /mnt >/dev/null || true yes | lvremove /dev/partitions/* >/dev/null || true cryptsetup close root >/dev/null || true diff --git a/modules/applications/sway/mako.nix b/modules/applications/sway/mako.nix index 54b0896..a9c20b0 100644 --- a/modules/applications/sway/mako.nix +++ b/modules/applications/sway/mako.nix @@ -14,8 +14,8 @@ in with lib; { }; config = mkIf cfg.enable { - home-manager.users.james = { + systemd.user.startServices = true; programs.mako = { enable = true; width = 450; @@ -50,22 +50,34 @@ in with lib; { home.packages = with pkgs; [ libnotify ]; }; - systemd.user.services.mako = { enable = true; - description = "Mako - Notificaitons for Wayland"; - documentation = [ "man:mako(5)" ]; - partOf = [ "sway-session.target" ]; - bindsTo = [ "sway-session.target" ]; - environment.PATH = lib.mkForce null; + description = "Mako foo"; + wantedBy = [ "graphical-session.target" ]; + partOf = [ "graphical-session.target" ]; serviceConfig = { - ExecStart = "${pkgs.mako}/bin/mako"; - Restart = "on-failure"; - RestartSec = 1; - TimeoutStopSec = 10; - Type = "simple"; + ExecStart = '' + ${pkgs.mako}/bin/mako + ''; + RestartSec = 5; + Restart = "always"; }; }; + # systemd.user.services.mako = { + # enable = true; + # description = "Mako - Notificaitons for Wayland"; + # documentation = [ "man:mako(5)" ]; + # partOf = [ "sway-session.target" ]; + # bindsTo = [ "sway-session.target" ]; + # environment.PATH = lib.mkForce null; + # serviceConfig = { + # ExecStart = "${pkgs.mako}/bin/mako"; + # Restart = "on-failure"; + # RestartSec = 1; + # TimeoutStopSec = 10; + # Type = "simple"; + # }; + # }; }; } diff --git a/modules/applications/sway/sway.nix b/modules/applications/sway/sway.nix index 19f423b..6ea1c82 100644 --- a/modules/applications/sway/sway.nix +++ b/modules/applications/sway/sway.nix @@ -72,15 +72,15 @@ in with lib; { # systemctl --user import-environment in startsway environment.PATH = lib.mkForce null; serviceConfig = { + Type = "simple"; ExecStart = "${pkgs.dbus}/bin/dbus-run-session ${pkgs.sway}/bin/sway --debug"; ExecStopPost = - "/usr/bin/systemctl --user unset-environment SWAYSOCK DISPLAY I3SOCK WAYLAND_DISPLAY"; + "/usr/bin/env systemctl --user unset-environment SWAYSOCK DISPLAY I3SOCK WAYLAND_DISPLAY"; NotifyAccess = "all"; Restart = "on-failure"; RestartSec = 1; TimeoutStopSec = 10; - Type = "simple"; }; };