Files
nixos/Droidnix/generated/modules/traveldroid/desktop/waybar.nix
T
2026-04-27 16:36:39 +02:00

54 lines
1.9 KiB
Nix

# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, buildUser, repoPath, mutableConfigPath,... }:
let
# Use the config option defaultUser directly, fallback to "henrov"
username = config.defaultUser or "henrov";
basePath = "${mutableConfigPath}";
assetPath = "${mutableConfigPath}/waybar";
in
{
# Install Waybar system-wide
environment.systemPackages = [ pkgs.waybar ];
home-manager.users = {
${username} = { config, lib, ... }: {
home.file = {
".config/waybar/config.jsonc".source = config.lib.file.mkOutOfStoreSymlink "${assetPath}/config.jsonc";
".config/waybar/style-dark.css".source = config.lib.file.mkOutOfStoreSymlink "${assetPath}/style-dark.css";
".config/scripts/bluetooth-status.sh" = {
text = builtins.readFile "${basePath}/scripts/bluetooth-status.sh";
force = true;
executable = true;
};
".config/scripts/hypr-workspaces.sh" = {
text = builtins.readFile "${basePath}/scripts/hypr-workspaces.sh";
force = true;
executable = true;
};
".config/scripts/hypr-workspacesmenu.sh" = {
text = builtins.readFile "${basePath}/scripts/hypr-workspacesmenu.sh";
force = true;
executable = true;
};
};
};
};
# Systemd user service for Waybar
systemd.user.services.waybar = {
description = "Waybar for Hyprland";
after = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${pkgs.waybar}/bin/waybar";
Restart = "always";
Environment = ''
WAYLAND_DISPLAY=${config.environment.sessionVariables.WAYLAND_DISPLAY or "wayland-0"}
XDG_CURRENT_DESKTOP=Hyprland
'';
};
wantedBy = [ "default.target" ];
};
}