feat(system): professionalize system configurations
- Consolidate imperative system settings into /etc/nixos/state.json - Implement nomarchy.system options for DNS, Wifi powersave, Timezone, and hardware features - Add declarative browser policies for Chromium/Brave based on theme - Update toggles scripts to mutate system JSON and run sys-update --impure - Remove obsolete imperative browser theme and redundant system modules
This commit is contained in:
22
modules/system/browser.nix
Normal file
22
modules/system/browser.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
palettes = import ../../themes/nomarchy-palettes.nix;
|
||||
activeThemeName = config.nomarchy.system.theme;
|
||||
currentPalette = (palettes.${activeThemeName} or palettes.nord).palette;
|
||||
|
||||
# Hex color for browser theme (base00 is background)
|
||||
themeColor = "#${currentPalette.base00}";
|
||||
|
||||
policy = {
|
||||
BrowserThemeColor = themeColor;
|
||||
BrowserColorScheme = if lib.strings.hasInfix "light" activeThemeName then "light" else "dark";
|
||||
};
|
||||
in
|
||||
{
|
||||
# Chromium policies
|
||||
programs.chromium.extraOpts = policy;
|
||||
|
||||
# Brave policies (Brave on NixOS also respects some chromium policies if set via extraOpts)
|
||||
# But better to use the specific brave module if available or just the same policy.
|
||||
}
|
||||
Reference in New Issue
Block a user