profiles/router: Migrate configuration to profile
This commit is contained in:
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