notifications-tray-icon: add dedicated module and update flake input
Add notifications-tray-icon.nix module with overlay and home-manager service config. Update flake input to colonelpanic8 fork and remove stale HLS input follows. Clean up xmonad.nix by removing the old overlay reference and commented-out service definition. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
./laptop.nix
|
||||
./nix.nix
|
||||
./nixified.ai.nix
|
||||
./notifications-tray-icon.nix
|
||||
./nvidia.nix
|
||||
./options.nix
|
||||
./plasma.nix
|
||||
|
||||
@@ -127,13 +127,11 @@
|
||||
};
|
||||
|
||||
notifications-tray-icon = {
|
||||
url = "github:IvanMalison/notifications-tray-icon";
|
||||
url = "github:colonelpanic8/notifications-tray-icon";
|
||||
inputs = {
|
||||
flake-utils.follows = "flake-utils";
|
||||
git-ignore-nix.follows = "git-ignore-nix";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
haskell-language-server.inputs.nixpkgs.follows = "nixpkgs";
|
||||
haskell-language-server.inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
47
nixos/notifications-tray-icon.nix
Normal file
47
nixos/notifications-tray-icon.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ config, pkgs, inputs, lib, makeEnable, ... }:
|
||||
makeEnable config "myModules.notifications-tray-icon" true {
|
||||
nixpkgs.overlays = [
|
||||
inputs.notifications-tray-icon.overlays.default
|
||||
];
|
||||
|
||||
home-manager.users.imalison = let
|
||||
notificationsTrayIcon = pkgs.haskellPackages.notifications-tray-icon;
|
||||
gmailExecStart = pkgs.writeShellScript "notifications-tray-icon-gmail" ''
|
||||
creds=$(${pkgs.pass}/bin/pass show gmail-mcp/oauth-credentials)
|
||||
client_id=$(echo "$creds" | ${pkgs.gnugrep}/bin/grep '^client_id:' | cut -d' ' -f2)
|
||||
client_secret=$(echo "$creds" | ${pkgs.gnugrep}/bin/grep '^client_secret:' | cut -d' ' -f2)
|
||||
exec ${notificationsTrayIcon}/bin/notifications-tray-icon gmail \
|
||||
--client-id "$client_id" \
|
||||
--client-secret "$client_secret"
|
||||
'';
|
||||
mkService = description: execStart: {
|
||||
Unit = {
|
||||
Description = description;
|
||||
After = [ "graphical-session-pre.target" "tray.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = execStart;
|
||||
Restart = "always";
|
||||
RestartSec = 3;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
in {
|
||||
systemd.user.services = {
|
||||
notifications-tray-icon-github = mkService
|
||||
"GitHub notifications tray icon"
|
||||
"${notificationsTrayIcon}/bin/notifications-tray-icon github --token-pass github-token";
|
||||
|
||||
notifications-tray-icon-gitea = mkService
|
||||
"Gitea notifications tray icon"
|
||||
"${notificationsTrayIcon}/bin/notifications-tray-icon gitea --url https://dev.railbird.ai --token-pass gitea-omni-token";
|
||||
|
||||
notifications-tray-icon-gmail = mkService
|
||||
"Gmail notifications tray icon"
|
||||
"${gmailExecStart}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -3,7 +3,6 @@ makeEnable config "myModules.xmonad" true {
|
||||
nixpkgs.overlays = with inputs; [
|
||||
xmonad.overlay
|
||||
xmonad-contrib.overlay
|
||||
notifications-tray-icon.overlay
|
||||
(import ../dotfiles/config/xmonad/overlay.nix)
|
||||
];
|
||||
|
||||
@@ -208,21 +207,6 @@ makeEnable config "myModules.xmonad" true {
|
||||
'';
|
||||
};
|
||||
|
||||
# systemd.user.services.notifications-tray-icon = {
|
||||
# Unit = {
|
||||
# Description = "Notifications tray icon";
|
||||
# After = [ "graphical-session-pre.target" "tray.target" ];
|
||||
# PartOf = [ "graphical-session.target" ];
|
||||
# };
|
||||
|
||||
# Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
|
||||
# Service = {
|
||||
# ExecStart = "${pkgs.haskellPackages.notifications-tray-icon}/bin/notifications-tray-icon --github-token-pass dfinity-github-api-token";
|
||||
# Restart = "always";
|
||||
# RestartSec = 3;
|
||||
# };
|
||||
# };
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user