mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat[server]: preparations for router config
This commit is contained in:
parent
e1569ba472
commit
30a97098af
31 changed files with 586 additions and 92 deletions
26
modules/nixos/server/network.nix
Normal file
26
modules/nixos/server/network.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselmodules.server.network = lib.mkEnableOption "enable server network config";
|
||||
config = lib.mkIf config.swarselmodules.server.network {
|
||||
|
||||
globals.networks.home.hosts.${config.node.name} = {
|
||||
inherit (config.repo.secrets.local.networking.networks.home) id;
|
||||
mac = config.repo.secrets.local.networking.networks.home.mac or null;
|
||||
};
|
||||
|
||||
globals.hosts.${config.node.name} = {
|
||||
inherit (config.repo.secrets.local.networking) defaultGateway4;
|
||||
};
|
||||
|
||||
networking = {
|
||||
inherit (config.repo.secrets.local.networking) hostId;
|
||||
hostName = config.node.name;
|
||||
nftables.enable = lib.mkDefault true;
|
||||
enableIPv6 = lib.mkDefault true;
|
||||
firewall = {
|
||||
enable = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue