mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -04:00
routing
This commit is contained in:
parent
3caf314a81
commit
c051c5c6c2
5 changed files with 12 additions and 4 deletions
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -694,11 +694,11 @@
|
|||
"sops-nix": "sops-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773107095,
|
||||
"narHash": "sha256-FH96EdivFlkW85eumLrp17EdXLMxlPXk4+6p3eGCzOs=",
|
||||
"lastModified": 1773114599,
|
||||
"narHash": "sha256-xPPkXW9mlszorwDVJ3bXQsKVg0wIpiiOCL9kbZlyTjY=",
|
||||
"owner": "genebean",
|
||||
"repo": "private-flake",
|
||||
"rev": "1e245e3d7fab1dd1466569ed10f4488abf343e38",
|
||||
"rev": "8d886b681a65ad3e2a102d40a7a34001b6973450",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -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'";
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
./hardware-configuration.nix
|
||||
./disk-config.nix
|
||||
./post-install
|
||||
../../common/linux/nixroutes.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
./hardware-configuration.nix
|
||||
./disk-config.nix
|
||||
./post-install
|
||||
../../common/linux/nixroutes.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue