- Reorganize directory structure into core/, features/, and themes/ - Colocate application Nix logic, configs, scripts, and theme overrides - Implement 'Inversion of Control' for theming: apps now pull theme-specific layouts - Update flake.nix and shared library paths to match the new structure - Document the new Feature-Centric architecture in README.md
33 lines
908 B
Nix
33 lines
908 B
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;
|
|
|
|
in
|
|
{
|
|
programs.waybar = {
|
|
enable = lib.mkDefault true;
|
|
systemd.enable = lib.mkDefault true;
|
|
|
|
settings = lib.mkDefault [ (builtins.fromJSON (builtins.readFile configFile)) ];
|
|
style = lib.mkDefault (builtins.readFile styleFile);
|
|
};
|
|
|
|
home.packages = lib.mkDefault (with pkgs; [
|
|
font-awesome
|
|
]);
|
|
}
|