mirror of
https://github.com/kmein/niveum
synced 2026-03-19 11:31:09 +01:00
feat(wifi): networkmanager for wilde, wpa_supplicant for others
This commit is contained in:
30
configs/networkmanager.nix
Normal file
30
configs/networkmanager.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
autowifi = pkgs.writers.writePython3Bin "autowifi" { flakeIgnore = [ "E501" ]; } <stockholm/lass/5pkgs/autowifi/autowifi.py>;
|
||||
in
|
||||
{
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
wifi.macAddress = "random";
|
||||
ethernet.macAddress = "random";
|
||||
unmanaged = [ "docker*" ];
|
||||
};
|
||||
|
||||
users.users.me.extraGroups = [ "networkmanager" ];
|
||||
|
||||
systemd.services.autowifi = {
|
||||
description = "Automatic wifi connector";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.networkmanager ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
Restart = "always";
|
||||
RestartSec = "10s";
|
||||
ExecStart = "${autowifi}/bin/autowifi";
|
||||
};
|
||||
};
|
||||
|
||||
networking.networkmanager.dispatcherScripts = [
|
||||
{ source = "${(pkgs.callPackage <stockholm/makefu/5pkgs/prison-break> {})}/bin/prison-break"; }
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user