Skip to content

Commit

Permalink
modules (homelab): Add fritz-box
Browse files Browse the repository at this point in the history
  • Loading branch information
britter committed Aug 29, 2024
1 parent aed29fd commit c71eee4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
6 changes: 6 additions & 0 deletions modules/nixos/homelab/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{lib, ...}: {
options.my.homelab = {
fritz-box = {
ip = lib.mkOption {
type = lib.types.str;
default = "192.168.178.1";
};
};
proxmox = {
ip = lib.mkOption {
type = lib.types.str;
Expand Down
2 changes: 1 addition & 1 deletion modules/nixos/networking/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ in {
prefixLength = 24;
}
];
defaultGateway = "192.168.178.1";
defaultGateway = config.my.homelab.fritz-box.ip;
nameservers = [config.my.homelab.directions.ip];
});
};
Expand Down
10 changes: 7 additions & 3 deletions systems/aarch64-linux/directions/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{inputs, ...}: {
{
config,
inputs,
...
}: {
imports = [
../../../modules/nixos
./hardware-configuration.nix
Expand All @@ -17,11 +21,11 @@
configurations = [
{
fqdn = "fritz-box.ritter.family";
target = "https://192.168.178.1";
target = "https://${config.my.homelab.fritz-box.ip}";
}
{
fqdn = "proxmox.ritter.family";
target = "https://192.168.178.100:8006";
target = "https://${config.my.homelab.proxmox.ip}:8006";
}
];
};
Expand Down
2 changes: 1 addition & 1 deletion systems/x86_64-linux/minimal-server-iso/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
prefixLength = 24;
}
];
defaultGateway = "192.168.178.1";
defaultGateway = config.my.homelab.fritz-box.ip;
nameservers = [config.my.homelab.directions.ip];
};
}

0 comments on commit c71eee4

Please sign in to comment.