fix(nix): change notification service
This commit is contained in:
parent
1d1804f3fc
commit
d0dc106ccb
3 changed files with 40 additions and 20 deletions
|
@ -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;
|
||||||
|
|
|
@ -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";
|
||||||
|
|
36
nix/modules/swaynotificationcenter.nix
Normal file
36
nix/modules/swaynotificationcenter.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue