nixcfg/homeManagerModules/services/mako/default.nix
Aly Raffauf 3663469066
sway,hyprland: convert startup apps to systemd (#73)
* home: switch hyprland and sway to new swayidle systemd service

* home: add swayosd service

* home: move swayidle and swayosd to services

* home/services: add swayidle and swayosd services

* hyprland,sway: don't start swayosd

* user playerctld as systemd service

* home: run gammastep as service for redShift"

* cleanup

* home: set swayosd and swayidle as wanted by hyprland and sway

* nix fmt

* home/services/swayidle: fixed resume command

* home/swayidle: fix command syntax

* home: better systemd defaults for swayidle and swayosd

* home: convert mako to systemd service

* home: make wayland-ipewire-idle-inhibit a systemd service

* home/waybar: use as systemd service

* home: move waybar to services

* home/desktop: convert randomWallpaper to systemd service

* migrate home options
2024-08-02 17:58:08 -04:00

50 lines
1.3 KiB
Nix

{
config,
lib,
pkgs,
...
}: {
config = lib.mkIf config.ar.home.services.mako.enable {
services.mako = {
enable = true;
anchor = "top-center";
backgroundColor = "${config.ar.home.theme.colors.background}CC";
borderColor = "${config.ar.home.theme.colors.primary}EE";
borderSize = 2;
borderRadius = 10;
defaultTimeout = 10000;
font = "${config.gtk.font.name} Regular ${toString config.gtk.font.size}";
height = 300;
layer = "top";
padding = "15";
textColor = "${config.ar.home.theme.colors.text}";
width = 400;
margin = "20,0";
extraConfig = ''
[mode=do-not-disturb]
invisible=1
'';
};
systemd.user.services.mako = {
Unit = {
After = "graphical-session.target";
Description = "Lightweight Wayland notification daemon";
Documentation = "man:mako(1)";
PartOf = "graphical-session.target";
};
Service = {
BusName = "org.freedesktop.Notifications";
ExecReload = ''${lib.getExe' pkgs.mako "makoctl"} reload'';
ExecStart = "${lib.getExe pkgs.mako}";
Restart = "on-failure";
RestartSec = 5;
Type = "dbus";
};
Install.WantedBy = ["hyprland-session.target" "sway-session.target"];
};
};
}