summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/flex-wg-router/configuration.nix57
-rw-r--r--hosts/poweredge/configuration.nix14
2 files changed, 55 insertions, 16 deletions
diff --git a/hosts/flex-wg-router/configuration.nix b/hosts/flex-wg-router/configuration.nix
index b09c3f0..6fea096 100644
--- a/hosts/flex-wg-router/configuration.nix
+++ b/hosts/flex-wg-router/configuration.nix
@@ -1,17 +1,60 @@
-{ config, lib, pkgs, ... }: {
+{ config, lib, pkgs, ... }: let
+ ipAddress = "10.1.1.1";
+in {
# Setup bootloader
boot._loader.enable = true;
+ # Enable common options
_archetypes = {
# Use headless profile
- profiles.headless.enable = true;
- # Install software
- collections = {
- development = {
- docker.enable = true;
+ profiles.headless = {
+ enable = true;
+ home.users.timmy.enable = true;
+ };
+ profiles.router = {
+ enable = true;
+ home.users.timmy.enable = true;
+ };
+ };
+
+ networking = {
+ _interfaceLabels = {
+ lan0 = "98:b7:85:22:9b:43"; # internal
+ wan0 = "54:ee:75:8c:4b:2d"; # external
+ };
+ #useDHCP = false; # TODO Enable when accessible via wireguard
+ interfaces = {
+ lan0.ipv4.addresses = [{
+ address = ipAddress;
+ prefixLength = 24;
+ }];
+ wan0.ipv4.addresses = [{
+ address = "46.110.173.165"; # Public static ip 4
+ prefixLength = 31;
+ }];
+ };
+ };
+
+ services._router = {
+ dnsDhcpConfig = {
+ localDomain = "wg-router.pls.lan";
+ dhcp = {
+ defaultGateway = ipAddress;
+ localhostIp = ipAddress;
+ rangeStart = "10.1.1.100";
+ rangeEnd = "10.1.1.250";
+ staticLeases = {
+ poweredge-pro-idrac = {
+ macAddress = "00:11:22:33:44:55";
+ staticIp = "10.1.1.10";
+ };
+ };
};
};
- }
+ };
+
+ # Enable user timmy
+ _users.timmy.enable = true;
system.stateVersion = "25.05";
}
diff --git a/hosts/poweredge/configuration.nix b/hosts/poweredge/configuration.nix
index 08e392d..f031a3b 100644
--- a/hosts/poweredge/configuration.nix
+++ b/hosts/poweredge/configuration.nix
@@ -1,15 +1,11 @@
{ config, lib, pkgs, ... }: {
imports = [ ./hardware-configuration.nix ];
- # ZFS bootloader
- bootloader.loader = "grub";
- bootloader.mode = "efi";
- boot.loader.grub = {
- zfsSupport = true;
- efiInstallAsRemovable = true;
- mirroredBoots = [
- { devices = [ "nodev" ]; path = "/boot"; }
- ];
+ # Grub bootloader with zfs support
+ boot._loader = {
+ enable = true;
+ type = "grub";
+ grub.zfsSupport = true;
};
# Disable suspend