From f8a17d685539000009a99a3c2b50ffc035e15ab4 Mon Sep 17 00:00:00 2001 From: Sokhibjon Orzikulov Date: Tue, 2 Jul 2024 04:16:52 +0500 Subject: [PATCH] using new network config --- modules/home/topgrade/default.nix | 1 + modules/nixos/network.nix | 4 ++ nixos/kolyma-3/hardware-configuration.nix | 76 +++++++++++++---------- 3 files changed, 48 insertions(+), 33 deletions(-) diff --git a/modules/home/topgrade/default.nix b/modules/home/topgrade/default.nix index ad8a634..d9c01b1 100644 --- a/modules/home/topgrade/default.nix +++ b/modules/home/topgrade/default.nix @@ -11,6 +11,7 @@ "yarn" "cargo" "vscode" + "home_manager" ]; no_retry = true; assume_yes = true; diff --git a/modules/nixos/network.nix b/modules/nixos/network.nix index 5426e8e..f089d80 100644 --- a/modules/nixos/network.nix +++ b/modules/nixos/network.nix @@ -120,5 +120,9 @@ in { }; }; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. config = lib.mkMerge [ipv4 ipv6 cfg]; } diff --git a/nixos/kolyma-3/hardware-configuration.nix b/nixos/kolyma-3/hardware-configuration.nix index 788940f..851b1f1 100644 --- a/nixos/kolyma-3/hardware-configuration.nix +++ b/nixos/kolyma-3/hardware-configuration.nix @@ -36,46 +36,56 @@ {device = "/dev/disk/by-uuid/1e7187bf-7374-41d6-bf0d-4c38a51e02bd";} ]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking = { - useDHCP = false; + # networking = { + # useDHCP = false; - interfaces = { - eth0 = { - useDHCP = true; + # interfaces = { + # eth0 = { + # useDHCP = true; - ipv4.addresses = [ - { - address = "95.216.248.25"; - prefixLength = 24; - } - ]; + # ipv4.addresses = [ + # { + # address = "95.216.248.25"; + # prefixLength = 24; + # } + # ]; - ipv6.addresses = [ - { - address = "2a01:4f9:3070:322c::"; - prefixLength = 64; - } - ]; - }; - }; + # ipv6.addresses = [ + # { + # address = "2a01:4f9:3070:322c::"; + # prefixLength = 64; + # } + # ]; + # }; + # }; - # If you want to configure the default gateway - defaultGateway = { - address = "95.216.248.1"; # Replace with your actual gateway for IPv4 - interface = "eth0"; # Replace with your actual interface - }; + # # If you want to configure the default gateway + # defaultGateway = { + # address = "95.216.248.1"; # Replace with your actual gateway for IPv4 + # interface = "eth0"; # Replace with your actual interface + # }; + + # defaultGateway6 = { + # address = "fe80::1"; # Replace with your actual gateway for IPv6 + # interface = "eth0"; # Replace with your actual interface + # }; - defaultGateway6 = { - address = "fe80::1"; # Replace with your actual gateway for IPv6 - interface = "eth0"; # Replace with your actual interface + # # Optional DNS configuration + # nameservers = ["8.8.8.8" "8.8.4.4"]; # Replace with your desired DNS servers + # }; + + network = { + enable = true; + + ipv4 = { + enable = true; + address = "95.216.248.25"; }; - # Optional DNS configuration - nameservers = ["8.8.8.8" "8.8.4.4"]; # Replace with your desired DNS servers + ipv6 = { + enable = true; + address = "2a01:4f9:3070:322c::"; + }; }; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";