profiles/router: Migrate configuration to profile
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
wireguard-tools
|
||||
tcpdump
|
||||
];
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
"net.ipv4.ip_forward" = true;
|
||||
"net.ipv6.conf.all.forwarding" = true;
|
||||
};
|
||||
|
||||
networking.firewall.checkReversePath = false;
|
||||
}
|
@@ -4,7 +4,6 @@
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
../../configuration/router
|
||||
|
||||
./dns.nix
|
||||
./mdns.nix
|
||||
@@ -23,6 +22,7 @@
|
||||
];
|
||||
|
||||
profiles.clerie.common-networking.enable = false;
|
||||
profiles.clerie.router.enable = true;
|
||||
|
||||
boot.kernelParams = [ "console=ttyS0,115200n8" ];
|
||||
|
||||
|
@@ -4,10 +4,10 @@
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
../../configuration/router
|
||||
];
|
||||
|
||||
profiles.clerie.hetzner-cloud.enable = true;
|
||||
profiles.clerie.router.enable = true;
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
|
@@ -4,10 +4,10 @@
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
../../configuration/router
|
||||
];
|
||||
|
||||
profiles.clerie.mercury-vm.enable = true;
|
||||
profiles.clerie.router.enable = true;
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
|
@@ -4,10 +4,10 @@
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
../../configuration/router
|
||||
];
|
||||
|
||||
profiles.clerie.netcup.enable = true;
|
||||
profiles.clerie.router.enable = true;
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
|
@@ -14,6 +14,7 @@
|
||||
./mercury-vm
|
||||
./netcup
|
||||
./network-fallback-dhcp
|
||||
./router
|
||||
./ruby-vm
|
||||
./serial-console
|
||||
./wg-clerie
|
||||
|
26
profiles/router/default.nix
Normal file
26
profiles/router/default.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
options.profiles.clerie.router = {
|
||||
enable = mkEnableOption "Basic router setup";
|
||||
};
|
||||
|
||||
config = mkIf config.profiles.clerie.router.enable {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wireguard-tools
|
||||
tcpdump
|
||||
];
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
"net.ipv4.ip_forward" = true;
|
||||
"net.ipv6.conf.all.forwarding" = true;
|
||||
};
|
||||
|
||||
networking.firewall.checkReversePath = false;
|
||||
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user