mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-11-06 07:36:23 +01:00
20 lines
417 B
Plaintext
Executable file
20 lines
417 B
Plaintext
Executable file
def main [
|
|
interface: string
|
|
type: string
|
|
] {
|
|
$env.PATH = ($env.PATH | split row (char esep) | append '/run/current-system/sw/bin');
|
|
|
|
let currentnet = (
|
|
nmcli -m tabular connection show --active
|
|
| from ssv
|
|
| first
|
|
| get name
|
|
);
|
|
|
|
systemd-cat echo $"($currentnet) \(($interface)): ($type)";
|
|
|
|
if $interface == 'wlp2s0' {
|
|
^$"/etc/networkhooks/($currentnet).nu" $interface $type
|
|
}
|
|
}
|