1
0
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:
2021-09-17 11:12:23 +02:00
parent 6418b03548
commit d1079fe413
11 changed files with 50 additions and 113 deletions

View 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"; }
];
}