refactor: implement component-based architecture for enhanced maintainability
- 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
This commit is contained in:
28
core/system/network.nix
Normal file
28
core/system/network.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.nomarchy.system;
|
||||
in
|
||||
{
|
||||
networking.networkmanager.enable = lib.mkDefault true;
|
||||
|
||||
networking.networkmanager.wifi.powersave = lib.mkDefault cfg.wifi.powersave;
|
||||
|
||||
# DNS Configuration
|
||||
networking.nameservers = lib.mkDefault (
|
||||
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 = lib.mkDefault (cfg.dns != "DHCP");
|
||||
dnssec = lib.mkDefault "allow-downgrade";
|
||||
domains = lib.mkDefault [ "~." ];
|
||||
fallbackDns = lib.mkDefault [ "9.9.9.9" "149.112.112.112" ];
|
||||
extraConfig = lib.mkDefault ''
|
||||
DNSOverTLS=opportunistic
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user