mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 13:43:56 -05:00
system: added wifi secrets
This commit is contained in:
parent
d370a2d08c
commit
5737231100
|
@ -4,7 +4,7 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [./plymouth ./power-profiles-daemon ./zramSwap];
|
imports = [./plymouth ./power-profiles-daemon ./zramSwap ./wifi.nix];
|
||||||
|
|
||||||
alyraffauf.system.power-profiles-daemon.enable = lib.mkDefault true;
|
alyraffauf.system.power-profiles-daemon.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
|
45
nixosModules/system/wifi.nix
Normal file
45
nixosModules/system/wifi.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
inputs.agenix.nixosModules.default
|
||||||
|
];
|
||||||
|
|
||||||
|
age.secrets.Stargate-Discovery.file = ../../secrets/wifi/Stargate-Discovery.age;
|
||||||
|
age.secrets.wattson.file = ../../secrets/wifi/wattson.age;
|
||||||
|
|
||||||
|
networking.networkmanager = {
|
||||||
|
ensureProfiles = {
|
||||||
|
environmentFiles = [
|
||||||
|
config.age.secrets.Stargate-Discovery.path
|
||||||
|
config.age.secrets.wattson.path
|
||||||
|
];
|
||||||
|
profiles = {
|
||||||
|
Stargate-Discovery = {
|
||||||
|
connection.type = "wifi";
|
||||||
|
connection.id = "Stargate-Discovery";
|
||||||
|
wifi.ssid = "Stargate-Disovery";
|
||||||
|
wifi-security = {
|
||||||
|
auth-alg = "open";
|
||||||
|
key-mgmt = "wpa-psk";
|
||||||
|
psk = "$StargateDiscoveryPSK";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
wattson = {
|
||||||
|
connection.type = "wifi";
|
||||||
|
connection.id = "wattson";
|
||||||
|
wifi.ssid = "wattson";
|
||||||
|
wifi-security = {
|
||||||
|
auth-alg = "open";
|
||||||
|
key-mgmt = "wpa-psk";
|
||||||
|
psk = "$wattsonPSK";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue