Files
cnix/modules/nixos/programs/hyprland/startup.nix
2025-08-18 20:13:02 +02:00

58 lines
1.2 KiB
Nix

{
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption mkMerge;
cfg = config.nixos.programs.hyprland;
host = config.networking.hostName;
commonExecOnce = [
"pamixer --set-volume 50"
"uwsm app -- keepassxc"
"uwsm app -- nm-applet --indicator"
];
in {
options = {
nixos.programs.hyprland.startup.enable = mkEnableOption "Enables startup settings in Hyprland";
};
config = mkIf cfg.startup.enable (mkMerge [
{
programs.hyprland.settings = {
execr-once = [
"uwsm finalize"
"hyprlock"
];
};
}
(mkIf (host == "kima") {
programs.hyprland.settings.exec-once =
[
"uwsm app -- mullvad-vpn"
"uwsm app -- solaar -w hide -b regular"
"uwsm app -- blueman-applet"
]
++ commonExecOnce;
})
(mkIf (host == "bunk") {
programs.hyprland.settings.exec-once =
[
"uwsm app -- blueman-applet"
]
++ commonExecOnce;
})
(mkIf (host == "toothpc") {
programs.hyprland.settings.exec-once =
[
"uwsm app -- mullvad-vpn"
"uwsm app -- solaar -w hide -b regular"
]
++ commonExecOnce;
})
]);
}