Some checks failed
Check / eval-and-lint (push) Has been cancelled
Same footgun as the home.packages fix, found by sweeping the tree for
`mkDefault` on list options that other modules contribute to at normal
priority (so filterOverrides discards the mkDefault def entirely):
* themes/engine/sddm.nix — environment.systemPackages = mkDefault
[ nomarchy-sddm-theme ] was dropped, so the SDDM greeter theme package
was never installed (unthemed login).
* themes/engine/plymouth.nix — boot.kernelParams = mkDefault [ quiet
splash loglevel=3 … ] was dropped, so boots weren't quiet/clean.
* features/desktop/waybar/default.nix — home.packages = mkDefault
[ font-awesome ] was dropped, so waybar's icon font was missing.
Verified via eval: nomarchy-sddm-theme now in systemPackages, "quiet" in
kernelParams, font-awesome in home.packages. Left the genuinely-safe
single-definition mkDefaults alone (plymouth.themePackages,
resolved.fallbackDns, hyprsunset.extraArgs) and the hybridGPU videoDrivers
mkDefault (it outranks nixpkgs' mkOptionDefault on real hardware).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
57 lines
2.0 KiB
Nix
57 lines
2.0 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
activeTheme = config.nomarchy.theme;
|
|
|
|
# Path to local theme files
|
|
themeDir = ./themes + "/${activeTheme}";
|
|
hasThemeConfig = builtins.pathExists (themeDir + "/config.jsonc");
|
|
hasThemeStyle = builtins.pathExists (themeDir + "/style.css");
|
|
|
|
# Default fallback files
|
|
defaultConfig = ./config/config.jsonc;
|
|
defaultStyle = ./config/style.css;
|
|
|
|
# Selected files
|
|
configFile = if hasThemeConfig then (themeDir + "/config.jsonc") else defaultConfig;
|
|
styleFile = if hasThemeStyle then (themeDir + "/style.css") else defaultStyle;
|
|
|
|
rawSettings = builtins.fromJSON (builtins.readFile configFile);
|
|
|
|
# Modules that only make sense on a laptop. Filtered out of any
|
|
# `modules-*` slot when nomarchy.formFactor != "laptop" so a desktop
|
|
# build doesn't ship a permanently-empty battery indicator.
|
|
laptopOnlyModules = [ "battery" "custom/battery" ];
|
|
filterModules = mods:
|
|
if config.nomarchy.formFactor == "laptop"
|
|
then mods
|
|
else builtins.filter (m: !(builtins.elem m laptopOnlyModules)) mods;
|
|
|
|
settings = rawSettings // {
|
|
position = config.nomarchy.panelPosition;
|
|
modules-left = filterModules (rawSettings.modules-left or []);
|
|
modules-center = filterModules (rawSettings.modules-center or []);
|
|
modules-right = filterModules (rawSettings.modules-right or []);
|
|
};
|
|
|
|
in
|
|
{
|
|
programs.waybar = {
|
|
# Gated on nomarchy.toggles.waybar — symmetric with services.hypridle
|
|
# (toggles.idle) and services.hyprsunset (toggles.nightlight). Disabled
|
|
# toggle means no waybar unit, so the bar stays hidden across rebuilds.
|
|
enable = lib.mkDefault config.nomarchy.toggles.waybar;
|
|
systemd.enable = lib.mkDefault config.nomarchy.toggles.waybar;
|
|
|
|
settings = lib.mkDefault [ settings ];
|
|
style = lib.mkDefault (builtins.readFile styleFile);
|
|
};
|
|
|
|
# Not mkDefault: home.packages is a list other modules set at normal
|
|
# priority, so a mkDefault def is dropped — leaving font-awesome (waybar's
|
|
# icon font) uninstalled. Merge it in.
|
|
home.packages = with pkgs; [
|
|
font-awesome
|
|
];
|
|
}
|