Skip to content

Commit

Permalink
using new network config
Browse files Browse the repository at this point in the history
  • Loading branch information
orzklv committed Jul 1, 2024
1 parent 979cdb2 commit f8a17d6
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 33 deletions.
1 change: 1 addition & 0 deletions modules/home/topgrade/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"yarn"
"cargo"
"vscode"
"home_manager"
];
no_retry = true;
assume_yes = true;
Expand Down
4 changes: 4 additions & 0 deletions modules/nixos/network.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.<interface>.useDHCP`.
config = lib.mkMerge [ipv4 ipv6 cfg];
}
76 changes: 43 additions & 33 deletions nixos/kolyma-3/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.<interface>.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";
Expand Down

0 comments on commit f8a17d6

Please sign in to comment.