- 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
31 lines
854 B
Nix
31 lines
854 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
nomarchyLib = import ../lib { inherit lib; };
|
|
activeThemeName = config.nomarchy.system.theme;
|
|
currentPalette = nomarchyLib.getPalette activeThemeName;
|
|
|
|
# Hex color for browser theme (base00 is background)
|
|
themeColor = "#${currentPalette.base00}";
|
|
|
|
# Detect light mode from theme name or palette
|
|
isLightTheme = nomarchyLib.isThemeLightMode {
|
|
themeName = activeThemeName;
|
|
assetsPath = ../../assets/themes;
|
|
};
|
|
|
|
browserPolicy = {
|
|
BrowserThemeColor = themeColor;
|
|
BrowserColorScheme = if isLightTheme then "light" else "dark";
|
|
};
|
|
in
|
|
{
|
|
# Chromium policies
|
|
programs.chromium.extraOpts = lib.mkDefault browserPolicy;
|
|
|
|
# Brave browser policies via managed policy file
|
|
environment.etc."brave/policies/managed/nomarchy.json".text = lib.mkDefault (
|
|
builtins.toJSON browserPolicy
|
|
);
|
|
}
|