blob: 9924633185b339d39c1728ada2b7cf98f9274d86 [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
Skyler Grey664b72e2023-01-26 00:40:57 +000016 ssid HRSFC Guest
17 static ip_address=10.0.48.79/8
18 static routers=10.0.0.1
19
Skyler Grey06cd6702022-10-31 00:06:16 +000020 ssid eduroam
21 static ip_address=10.0.48.79/8
22 static routers=10.0.0.1
23 '';
Skyler Greyf18fe9f2022-10-30 23:07:57 +000024 hostName = "python";
Skyler Grey252927a2022-10-18 22:18:15 +010025 nameservers = [ "1.1.1.1" "1.0.0.1" ];
Skyler Greyf18fe9f2022-10-30 23:07:57 +000026 search = [
27 "python.local"
28 ];
29 wireless = {
30 enable = true;
31 userControlled.enable = true;
32 networks = {
33 eduroam = {
34 auth = ''
35 scan_ssid=1
36 proto=WPA2
37 key_mgmt=WPA-EAP
38 eap=PEAP
39 pairwise=CCMP
Skyler Greye0b26d22022-10-30 23:05:08 +000040
Skyler Greyf18fe9f2022-10-30 23:07:57 +000041 identity="@eduroamUser@"
42 password="@eduroamPass@"
Skyler Greye0b26d22022-10-30 23:05:08 +000043
Skyler Greyf18fe9f2022-10-30 23:07:57 +000044 phase2="auth=MSCHAPV2"
45 '';
46 };
47 "HRSFC Guest".psk = "@hrsfcGuestPass@";
48 adelie10 = {
49 psk = "@adelie10Pass@";
50 priority = 500;
51 };
52 robocon-buster_beta.psk = "@roboconProtoboardPass@";
Skyler Greyac27f242022-10-31 00:29:57 +000053 "RoboCon3665-Sky".psk = "@robocon3665SkyPass@";
Skyler Grey4d6c69d2022-10-31 00:18:55 +000054 "RoboCon2022-Beta_team_4".psk = "@robocon2023Beta4Pass@";
Skyler Greyac27f242022-10-31 00:29:57 +000055 "RoboCon2023-Will".psk = "@robocon2023Will@";
Skyler Grey664b72e2023-01-26 00:40:57 +000056 "robot-HRS69420".psk = "@srRobotPassword@";
57 "newadelie24".psk = "@newadelie24Pass@";
Skyler Greyac27f242022-10-31 00:29:57 +000058 } // lib.pipe (lib.range 1 21) [
59 (builtins.map builtins.toString)
60 (builtins.map (team: {
61 name = "RoboCon2023-Team${team}";
62 value = {
63 psk = "@robocon2023Team${team}@";
64 };
65 }))
66 builtins.listToAttrs
67 ];
Skyler Greyf18fe9f2022-10-30 23:07:57 +000068 environmentFile = config.sops.secrets."wireless.env".path;
Skyler Greyf4a835a2022-08-20 22:30:48 +010069 };
70 };
Skyler Greyc8dc35e2022-09-01 23:42:28 +010071
72 hardware.enableRedistributableFirmware = true;
73
Skyler Greyf18fe9f2022-10-30 23:07:57 +000074 sops.secrets."wireless.env" = {
75 sopsFile = ../secrets/wireless.env.bin;
Skyler Greye0b3b7d2022-09-09 08:14:11 +010076 format = "binary";
Skyler Greye0b3b7d2022-09-09 08:14:11 +010077 };
Skyler Grey06cd6702022-10-31 00:06:16 +000078
79 environment = {
Skyler Grey252927a2022-10-18 22:18:15 +010080 persistence."/nix/persist".directories = [ "/var/db/dhcpcd" ];
81 systemPackages = [ pkgs.bandwidth ];
Skyler Grey06cd6702022-10-31 00:06:16 +000082 };
Skyler Greyf4a835a2022-08-20 22:30:48 +010083 };
84}