mirror of
https://github.com/genebean/dots.git
synced 2026-03-28 01:47:42 -04:00
routing
This commit is contained in:
parent
3caf314a81
commit
c051c5c6c2
5 changed files with 12 additions and 4 deletions
7
modules/hosts/common/linux/nixroutes.nix
Normal file
7
modules/hosts/common/linux/nixroutes.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
hostName = config.networking.hostName;
|
||||
in {
|
||||
programs.zsh.shellAliases.nixroutes =
|
||||
"cd ~/repos/dots && echo '=== Current Routes ===' && ip route show && ip -6 route show && echo '' && echo '=== New Build Routes ===' && nix eval --apply 'routes: builtins.concatStringsSep \"\\\\n\" (map (r: r.Destination + \" via \" + r.Gateway) routes)' '.#nixosConfigurations.${hostName}.config.systemd.network.networks.\"10-wan\".routes' | tr '\\\\n' '\\n'";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue