Refactor the Nix config management.

This commit is contained in:
Root User 2026-02-06 21:31:22 +01:00
parent 55fe63bcdb
commit aca053b4e1
Signed by: root
GPG key ID: 087F0A95E5766D72
23 changed files with 954 additions and 1764 deletions

View file

@ -0,0 +1,45 @@
{
config,
pkgs,
lib,
...
}: {
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
services.resolved.enable = false;
# Use this clean static network configuration instead:
networking.useDHCP = false;
networking.networkmanager.enable = false; # Disable NetworkManager
networking.interfaces.ens18 = {
ipv4.addresses = [
{
address = config.local.address or "10.1.1.100";
prefixLength = 24;
}
];
};
networking.defaultGateway = {
address = "10.1.1.1";
interface = "ens18";
};
# Explicitly set DNS
networking.nameservers = ["10.1.1.2"]; # PiHole DNS
}