mirror of
https://github.com/Moe1369/nix-fleet.git
synced 2026-04-24 15:59:06 +02:00
wifi
This commit is contained in:
25
modules/desktop/sys/wifi.nix
Normal file
25
modules/desktop/sys/wifi.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ ... }: {
|
||||
flake.nixosModules.desktop-sys-wifi = { config, ... }: {
|
||||
sops.secrets."infrastructure/wifi/ssid" = {};
|
||||
sops.secrets."infrastructure/wifi/password" = {};
|
||||
|
||||
networking.networkmanager = {
|
||||
ensureProfiles = {
|
||||
environmentFiles = [
|
||||
config.sops.secrets."infrastructure/wifi/ssid".path
|
||||
config.sops.secrets."infrastructure/wifi/password".path
|
||||
];
|
||||
profiles = {
|
||||
"home" = {
|
||||
connection = { id = "home"; type = "wifi"; autoconnect = true; };
|
||||
wifi = { mode = "infrastructure"; ssid = "$WIFI_SSID"; };
|
||||
wifi-security = {
|
||||
key-mgmt = "wpa-psk";
|
||||
psk = "$WIFI_PASSWORD";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user