Skip to content

Commit

Permalink
chore: rename hostConfig to networkConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
rochecompaan committed Jan 18, 2025
1 parent 744bade commit 954a0f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/hosts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@
# Function to get IP from host's network interface config
getHostIP = hostname:
let
hostConfig = (import ./${hostname}/default.nix { inherit self config lib; }).networking;
networkConfig = (import ./${hostname}/default.nix { inherit self config lib; }).networking;
# Get the first interface that has IPv4 addresses configured
interface = lib.head (lib.attrNames
(lib.filterAttrs
(name: value: value.ipv4.addresses != [])
hostConfig.interfaces
networkConfig.interfaces
));
in
# Get the address from the first IPv4 configuration
(lib.head hostConfig.interfaces.${interface}.ipv4.addresses).address;
(lib.head networkConfig.interfaces.${interface}.ipv4.addresses).address;

mkDeployNode = hostname: {
name = hostname;
Expand Down

0 comments on commit 954a0f1

Please sign in to comment.