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:
@@ -1,5 +1,26 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.nomarchy.system;
|
||||
in
|
||||
{
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
networking.networkmanager.wifi.powersave = cfg.wifi.powersave;
|
||||
|
||||
# DNS Configuration
|
||||
networking.nameservers = if cfg.dns == "Cloudflare" then [ "1.1.1.1" "1.0.0.1" ]
|
||||
else if cfg.dns == "Google" then [ "8.8.8.8" "8.8.4.4" ]
|
||||
else if cfg.dns == "Custom" then cfg.customDns
|
||||
else []; # DHCP lets NM handle it
|
||||
|
||||
services.resolved = {
|
||||
enable = cfg.dns != "DHCP";
|
||||
dnssec = "allow-downgrade";
|
||||
domains = [ "~." ];
|
||||
fallbackDns = [ "9.9.9.9" "149.112.112.112" ];
|
||||
extraConfig = ''
|
||||
DNSOverTLS=opportunistic
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user