1
0
Fork 0

fix(nix): change notification service

This commit is contained in:
Lucas Sta Maria 2025-08-17 13:47:55 +00:00
parent 1d1804f3fc
commit d0dc106ccb
Signed by: lucas
GPG key ID: F07FB16A826E3B47
3 changed files with 40 additions and 20 deletions

View file

@ -79,6 +79,7 @@
xdg-desktop-portal xdg-desktop-portal
xdg-desktop-portal-wlr xdg-desktop-portal-wlr
wpaperd wpaperd
swaynotificationcenter
discord discord
steam steam
@ -223,12 +224,6 @@
}; };
}; };
services.mako = {
enable = true;
defaultTimeout = 10000;
margin = "40,20";
};
### Programs ### Programs
programs.home-manager.enable = true; programs.home-manager.enable = true;
programs.mu.enable = true; programs.mu.enable = true;

View file

@ -1,5 +1,5 @@
{ inputs, config, pkgs, lib, ... }: { { inputs, config, pkgs, lib, ... }: {
imports = [ ./hw.nix ]; imports = [ ./hw.nix ../../modules/swaynotificationcenter.nix ];
networking.hostName = "framework"; networking.hostName = "framework";
time.timeZone = "America/New_York"; time.timeZone = "America/New_York";
@ -103,19 +103,6 @@
# Mouse # Mouse
services.libinput.mouse = { middleEmulation = false; }; services.libinput.mouse = { middleEmulation = false; };
# Notification Server
systemd.user.services.deadd-notification-center = {
description = "deadd notification center";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
serviceConfig = {
ExecStart =
"${pkgs.deadd-notification-center}/bin/deadd-notification-center";
Restart = "always";
RestartSec = 3;
};
};
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
users.users.priime = { users.users.priime = {
@ -152,6 +139,8 @@
programs.niri.enable = true; programs.niri.enable = true;
programs.xwayland.enable = true; programs.xwayland.enable = true;
services.swaynotificationcenter.enable = true;
services.tailscale = { services.tailscale = {
enable = true; enable = true;
useRoutingFeatures = "client"; useRoutingFeatures = "client";

View file

@ -0,0 +1,36 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.swaynotificationcenter;
in {
options.services.swaynotificationcenter = with lib; {
enable = lib.mkEnableOption "SwayNotificationCenter daemon";
package = lib.mkOption {
type = types.package;
default = pkgs.swaynotificationcenter;
description = "The SwayNotificationCenter package to use.";
};
};
config = lib.mkIf cfg.enable {
systemd.user.services.swaync = {
description = "SwayNotificationCenter daemon";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
after = [ "graphical-session-pre.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${cfg.package}/bin/swaync";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
environment.systemPackages = [ cfg.package ];
};
}