28 lines
692 B
Nix
28 lines
692 B
Nix
{ lib, config, pkgs, ... }:
|
|
|
|
let
|
|
moduleName = "waybar";
|
|
username = config.defaultUser or "henrov";
|
|
assetPath = ../../../assets/system/conf/${moduleName};
|
|
|
|
waybarConfig = "${assetPath}/waybar.conf";
|
|
waybarStyle = "${assetPath}/style.css";
|
|
in
|
|
{
|
|
# Install Waybar system-wide
|
|
environment.systemPackages = [
|
|
pkgs.waybar
|
|
];
|
|
|
|
# Deploy config files via Home Manager
|
|
home-manager.users.${username}.home.file = lib.genAttrs [
|
|
"waybar/config"
|
|
"waybar/style.css"
|
|
] (file: let
|
|
src = if file == "waybar/config" then waybarConfig else waybarStyle;
|
|
in {
|
|
source = if builtins.pathExists src then src else null;
|
|
target = ".config/${file}";
|
|
});
|
|
}
|