# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. --- { lib, config, pkgs, repoPath, buildUser, mutableConfigPath, ... }: let username = config.defaultUser or "henrov"; # IMPORTANT: keep these as plain strings, not Nix paths basePath = mutableConfigPath; waybarPath = "${mutableConfigPath}/waybar"; # Helper to make out-of-store symlinks (clean + reusable) link = path: config.lib.file.mkOutOfStoreSymlink path; in { environment.systemPackages = [ pkgs.waybar ]; home-manager.users.${username} = { config, ... }: { home.file = { # --- Waybar config (REAL symlinks, not copied into store) ".config/waybar/config.jsonc".source = link "${waybarPath}/config.jsonc"; ".config/waybar/style-dark.css".source = link "${waybarPath}/style-dark.css"; # --- Scripts (DO NOT use builtins.readFile here) ".config/scripts/bluetooth-status.sh".source = link "${basePath}/scripts/bluetooth-status.sh"; ".config/scripts/hypr-workspaces.sh".source = link "${basePath}/scripts/hypr-workspaces.sh"; ".config/scripts/hypr-workspacesmenu.sh".source = link "${basePath}/scripts/hypr-workspacesmenu.sh"; }; }; 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" ]; }; }