mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 17:37:43 -04:00
routing
This commit is contained in:
parent
3caf314a81
commit
c051c5c6c2
5 changed files with 12 additions and 4 deletions
|
|
@ -8,7 +8,6 @@
|
|||
zsh.shellAliases = {
|
||||
nixboot = "sudo nixos-rebuild boot --flake ~/repos/dots && echo 'Time to reboot!'";
|
||||
nixdiff = "cd ~/repos/dots && nixos-rebuild build --flake . && nvd diff /run/current-system result";
|
||||
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'";
|
||||
nixup = "sudo nixos-rebuild switch --flake ~/repos/dots";
|
||||
uwgconnect = "nmcli dev wifi connect SecureWest password";
|
||||
uwgforget = "nmcli connection delete SecureWest";
|
||||
|
|
|
|||
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