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