mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-26 14:31:55 -05:00
home: convert mako to systemd service
This commit is contained in:
parent
76fd89a217
commit
3eff37c8aa
|
@ -12,7 +12,6 @@
|
|||
./kitty
|
||||
./keepassxc
|
||||
./librewolf
|
||||
./mako
|
||||
./nemo
|
||||
./rofi
|
||||
./swaylock
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.ar.home.apps.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
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -126,7 +126,6 @@ in {
|
|||
exec-once =
|
||||
[
|
||||
"${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
|
||||
(lib.getExe pkgs.mako)
|
||||
(lib.getExe pkgs.waybar)
|
||||
(lib.getExe pkgs.wayland-pipewire-idle-inhibit)
|
||||
]
|
||||
|
|
|
@ -159,7 +159,6 @@ in {
|
|||
[
|
||||
{command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";}
|
||||
{command = lib.getExe pkgs.autotiling;}
|
||||
{command = lib.getExe pkgs.mako;}
|
||||
{command = lib.getExe pkgs.wayland-pipewire-idle-inhibit;}
|
||||
]
|
||||
++ lib.optional cfg.desktop.randomWallpaper {command = "${helpers.wallpaperD}";}
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
ar.home = {
|
||||
apps = {
|
||||
kitty.enable = lib.mkDefault true;
|
||||
mako.enable = lib.mkDefault true;
|
||||
rofi.enable = lib.mkDefault true;
|
||||
swaylock.enable = lib.mkDefault true;
|
||||
waybar.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
services = {
|
||||
mako.enable = lib.mkDefault true;
|
||||
swayidle.enable = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -53,7 +53,6 @@ in {
|
|||
|
||||
kitty.enable = lib.mkEnableOption "Kitty terminal.";
|
||||
librewolf.enable = lib.mkEnableOption "Librewolf web browser.";
|
||||
mako.enable = lib.mkEnableOption "Mako notification daemon.";
|
||||
|
||||
nemo.enable = lib.mkOption {
|
||||
description = "Cinnamon Nemo file manager.";
|
||||
|
@ -196,18 +195,6 @@ in {
|
|||
};
|
||||
|
||||
services = {
|
||||
mpd = {
|
||||
enable = lib.mkEnableOption "MPD user service.";
|
||||
|
||||
musicDirectory = lib.mkOption {
|
||||
description = "Name of music directory";
|
||||
default = config.xdg.userDirs.music;
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
|
||||
gammastep.enable = lib.mkEnableOption "Gammastep redshift daemon.";
|
||||
|
||||
easyeffects = {
|
||||
enable = lib.mkEnableOption "EasyEffects user service.";
|
||||
|
||||
|
@ -218,6 +205,19 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
gammastep.enable = lib.mkEnableOption "Gammastep redshift daemon.";
|
||||
mako.enable = lib.mkEnableOption "Mako notification daemon.";
|
||||
|
||||
mpd = {
|
||||
enable = lib.mkEnableOption "MPD user service.";
|
||||
|
||||
musicDirectory = lib.mkOption {
|
||||
description = "Name of music directory";
|
||||
default = config.xdg.userDirs.music;
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
|
||||
swayidle.enable = lib.mkEnableOption "Swayidle idle daemon.";
|
||||
};
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./easyeffects
|
||||
./gammastep
|
||||
./mako
|
||||
./mpd
|
||||
./swayidle
|
||||
];
|
||||
|
|
49
homeManagerModules/services/mako/default.nix
Normal file
49
homeManagerModules/services/mako/default.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
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"];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue