mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2025-09-06 11:31:38 +02:00
lmao
This commit is contained in:
parent
224c80c420
commit
1cd19687be
21 changed files with 315 additions and 68 deletions
19
other/scripts/dispatcher.nu
Executable file
19
other/scripts/dispatcher.nu
Executable file
|
@ -0,0 +1,19 @@
|
|||
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
|
||||
| detect columns
|
||||
| first
|
||||
| get name
|
||||
);
|
||||
|
||||
systemd-cat echo $"($currentnet) \(($interface)): ($type)";
|
||||
|
||||
if $interface == 'wlp2s0' {
|
||||
^$"/etc/networkhooks/($currentnet).nu" $interface $type
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue