Autostart is configurable #14

Merged
armel merged 1 commits from feature/hyprland-autostart into master 2026-04-04 21:17:57 +02:00
3 changed files with 151 additions and 130 deletions

View File

@@ -30,6 +30,13 @@
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.nameservers = [ "192.168.68.56" "1.1.1.1" "8.8.8.8" ]; networking.nameservers = [ "192.168.68.56" "1.1.1.1" "8.8.8.8" ];
home-manager.users.avravels.home.hyprland.execOnce = [
"waybar"
"[workspace 1 silent] kitty tmux"
"[workspace 1 silent] spotify"
"[workspace 2 silent] firefox"
];
networking.interfaces.enp130s0.wakeOnLan.enable = true; networking.interfaces.enp130s0.wakeOnLan.enable = true;
networking.firewall.allowedUDPPorts = [ 9 ]; networking.firewall.allowedUDPPorts = [ 9 ];

View File

@@ -1,6 +1,18 @@
{ pkgs, ... }: { lib, pkgs, config, ... }:
let
cfg = config.home.hyprland;
in
{ {
options.home.hyprland = {
execOnce = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ "waybar" ];
description = "Commands to run once when Hyprland starts (maps to Hyprland `exec-once`).";
};
};
config = {
home.packages = with pkgs; [ home.packages = with pkgs; [
bzmenu bzmenu
hyprshot hyprshot
@@ -63,9 +75,8 @@
}; };
}; };
exec-once = [ # Use the configurable option here (default `[ "waybar" ]`)
"waybar" exec-once = (if cfg == null then { execOnce = [ "waybar" ]; } else cfg).execOnce;
];
### INPUT ### INPUT
input = { input = {
@@ -140,4 +151,5 @@
]; ];
}; };
}; };
};
} }

View File

@@ -33,6 +33,8 @@
networking.hostName = "laptop-armel"; networking.hostName = "laptop-armel";
home-manager.users.avravels.home.hyprland.execOnce = [ "waybar" ];
home-manager.users.avravels.home.git.userName = "Armel van Ravels"; home-manager.users.avravels.home.git.userName = "Armel van Ravels";
home-manager.users.avravels.home.git.userEmail = "armel@webavance.nl"; home-manager.users.avravels.home.git.userEmail = "armel@webavance.nl";