blob: 93b55303ec47f9d95c36337a397c85d78322d69f [file] [log] [blame]
Skyler Grey252927a2022-10-18 22:18:15 +01001{ config
2, lib
3, pkgs
4, ...
Skyler Greye0b26d22022-10-30 23:05:08 +00005}: {
Skyler Greyf4a835a2022-08-20 22:30:48 +01006 config = {
Skyler Greyf18fe9f2022-10-30 23:07:57 +00007 networking = {
Skyler Grey06cd6702022-10-31 00:06:16 +00008 dhcpcd.extraConfig = ''
9 timeout 0
10 leasetime -1
11 ipv6 off
12 noipv6rs
13 ipv4only
14 noarp
15
16 ssid eduroam
17 static ip_address=10.0.48.79/8
18 static routers=10.0.0.1
19 '';
Skyler Greyf18fe9f2022-10-30 23:07:57 +000020 hostName = "python";
Skyler Grey252927a2022-10-18 22:18:15 +010021 nameservers = [ "1.1.1.1" "1.0.0.1" ];
Skyler Greyf18fe9f2022-10-30 23:07:57 +000022 search = [
23 "python.local"
24 ];
25 wireless = {
26 enable = true;
27 userControlled.enable = true;
28 networks = {
29 eduroam = {
30 auth = ''
31 scan_ssid=1
32 proto=WPA2
33 key_mgmt=WPA-EAP
34 eap=PEAP
35 pairwise=CCMP
Skyler Greye0b26d22022-10-30 23:05:08 +000036
Skyler Greyf18fe9f2022-10-30 23:07:57 +000037 identity="@eduroamUser@"
38 password="@eduroamPass@"
Skyler Greye0b26d22022-10-30 23:05:08 +000039
Skyler Greyf18fe9f2022-10-30 23:07:57 +000040 phase2="auth=MSCHAPV2"
41 '';
42 };
43 "HRSFC Guest".psk = "@hrsfcGuestPass@";
44 adelie10 = {
45 psk = "@adelie10Pass@";
46 priority = 500;
47 };
48 robocon-buster_beta.psk = "@roboconProtoboardPass@";
Skyler Grey4d6c69d2022-10-31 00:18:55 +000049 "RoboCon2023-Sky".psk = "@robocon2023SkyPass@";
50 "RoboCon2022-Beta_team_4".psk = "@robocon2023Beta4Pass@";
Skyler Greyf18fe9f2022-10-30 23:07:57 +000051 };
52 environmentFile = config.sops.secrets."wireless.env".path;
Skyler Greyf4a835a2022-08-20 22:30:48 +010053 };
54 };
Skyler Greyc8dc35e2022-09-01 23:42:28 +010055
56 hardware.enableRedistributableFirmware = true;
57
Skyler Greyf18fe9f2022-10-30 23:07:57 +000058 sops.secrets."wireless.env" = {
59 sopsFile = ../secrets/wireless.env.bin;
Skyler Greye0b3b7d2022-09-09 08:14:11 +010060 format = "binary";
Skyler Greye0b3b7d2022-09-09 08:14:11 +010061 };
Skyler Grey06cd6702022-10-31 00:06:16 +000062
63 environment = {
Skyler Grey252927a2022-10-18 22:18:15 +010064 persistence."/nix/persist".directories = [ "/var/db/dhcpcd" ];
65 systemPackages = [ pkgs.bandwidth ];
Skyler Grey06cd6702022-10-31 00:06:16 +000066 };
Skyler Greyf4a835a2022-08-20 22:30:48 +010067 };
68}