Configure static IPs, but in Nix

This commit is contained in:
Bun 2025-03-16 02:41:43 -04:00
parent d3529bbcdb
commit 0423c6e180
6 changed files with 27 additions and 5 deletions

View file

@ -6,7 +6,6 @@
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -9,7 +9,17 @@
../../modules/system
];
networking.hostName = "kitty";
networking = {
hostName = "kitty";
interfaces."eno1".ipv4.addresses = [{
address = "10.2.0.101";
prefixLength = 8;
}];
defaultGateway = {
address = "10.1.0.1";
interface = "eno1";
};
};
system = {
desktop.enable = true;

View file

@ -6,7 +6,6 @@
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -13,6 +13,14 @@
networking = {
hostName = "midas";
hostId = "38ba3f57";
interfaces."enp0s31f6".ipv4.addresses = [{
address = "10.2.0.1";
prefixLength = 8;
}];
defaultGateway = {
address = "10.1.0.1";
interface = "enp0s31f6";
};
};
system = {

View file

@ -9,7 +9,6 @@
boot.initrd.kernelModules = [ "dm-snapshot" "atkbd" "applespi" "intel_lpss_pci" "spi_pxa2xx_platform" ];
boot.kernelModules = [ "kvm-intel" ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -12,7 +12,14 @@
networking = {
hostName = "tower";
interfaces.enp42s0.wakeOnLan.enable = true;
interfaces."enp42s0".ipv4.addresses = [{
address = "10.2.0.100";
prefixLength = 8;
}];
defaultGateway = {
address = "10.1.0.1";
interface = "enp42s0";
};
};
system = {