mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-13 16:12:40 +02:00
refactor(vars,hosts): networking & k3s clusters
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#############################################################
|
||||
let
|
||||
hostName = "rakushun"; # Define your hostname.
|
||||
hostAddress = myvars.networking.hostAddress.${hostName};
|
||||
in {
|
||||
imports = [
|
||||
# import the rk3588 module, which contains the configuration for bootloader/kernel/firmware
|
||||
@@ -23,23 +22,14 @@ in {
|
||||
|
||||
./gitea.nix
|
||||
./caddy.nix
|
||||
./tailscale.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
inherit hostName;
|
||||
inherit (myvars.networking) defaultGateway nameservers;
|
||||
|
||||
inherit (myvars.networking.hostsInterface.${hostName}) interfaces;
|
||||
networkmanager.enable = false;
|
||||
# RJ45 port 1
|
||||
interfaces.enP4p65s0 = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [hostAddress];
|
||||
};
|
||||
# RJ45 port 2
|
||||
# interfaces.enP3p49s0 = {
|
||||
# useDHCP = false;
|
||||
# ipv4.addresses = [hostAddress];
|
||||
# };
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
|
||||
Reference in New Issue
Block a user