hypr: fix startup things

This commit is contained in:
2025-07-05 10:46:03 +02:00
parent 2ca846d0a3
commit f19f298f7e

View File

@@ -6,6 +6,13 @@
inherit (lib) mkIf mkEnableOption mkMerge;
cfg = config.nixos.programs.hyprland;
host = config.networking.hostName;
commonExecOnce = [
"pamixer --set-volume 50"
"uwsm app -- blueman-applet"
"uwsm app -- keepassxc"
"uwsm app -- nm-applet --indicator"
];
in {
options = {
nixos.programs.hyprland.startup.enable = mkEnableOption "Enables startup settings in Hyprland";
@@ -14,7 +21,7 @@ in {
config = mkIf cfg.startup.enable (mkMerge [
{
programs.hyprland.settings = {
exec-once = [
execr-once = [
"uwsm finalize"
"hyprlock"
];
@@ -22,32 +29,25 @@ in {
}
(mkIf (host == "cnixtop") {
programs.hyprland.settings.exec-once = [
programs.hyprland.settings.exec-once =
[
"uwsm app -- mullvad-vpn"
"uwsm app -- blueman-applet"
"uwsm app -- keepassxc"
"uwsm app -- pamixer --set-volume 50"
"uwsm app -- solaar -w hide -b regular"
"uwsm app -- nm-applet --indicator"
];
]
++ commonExecOnce;
})
(mkIf (host == "cnixpad") {
programs.hyprland.settings.exec-once = [
"uwsm app -- blueman-applet"
"uwsm app -- keepassxc"
"uwsm app -- pamixer --set-volume 50"
"uwsm app -- nm-applet --indicator"
];
programs.hyprland.settings.exec-once = commonExecOnce;
})
(mkIf (host == "toothpc") {
programs.hyprland.settings.exec-once = [
programs.hyprland.settings.exec-once =
[
"uwsm app -- mullvad-vpn"
"uwsm app -- keepassxc"
"uwsm app -- solaar -w hide -b regular"
"uwsm app -- nm-applet --indicator"
];
]
++ commonExecOnce;
})
]);
}