Regenerated
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
options.enableFonts = lib.mkEnableOption "Enable nerd fonts";
|
||||
|
||||
config = lib.mkIf (config.enableFonts or false) {
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.iosevka
|
||||
nerd-fonts.fira-code
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
# --- Module variables ---
|
||||
moduleName = "waybar";
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
# Assets directory (self-contained)
|
||||
assetPath = ../../../assets/system/conf/${moduleName};
|
||||
|
||||
# Read required config files
|
||||
waybarConfig = "${assetPath}/waybar.conf";
|
||||
waybarStyle = "${assetPath}/style.css";
|
||||
|
||||
# Top-level toggle
|
||||
enableProgram = config.enableWaybar or false;
|
||||
in
|
||||
{
|
||||
# --- Option ---
|
||||
options.enableWaybar =
|
||||
lib.mkEnableOption "Enable Waybar status bar";
|
||||
|
||||
# --- Config ---
|
||||
config = lib.mkIf enableProgram {
|
||||
|
||||
# Install Waybar (symbolic reference expected to be resolved elsewhere)
|
||||
environment.systemPackages = [
|
||||
"waybar"
|
||||
];
|
||||
|
||||
# Deploy only required files to ~/.config/waybar
|
||||
home-manager.users.${username}.xdg.configFile = {
|
||||
|
||||
"waybar/config".source =
|
||||
if builtins.pathExists waybarConfig
|
||||
then waybarConfig
|
||||
else null;
|
||||
|
||||
"waybar/style.css".source =
|
||||
if builtins.pathExists waybarStyle
|
||||
then waybarStyle
|
||||
else null;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user