Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 1 | { config |
| 2 | , lib |
| 3 | , pkgs |
| 4 | , ... |
Skyler Grey | e0b26d2 | 2022-10-30 23:05:08 +0000 | [diff] [blame] | 5 | }: { |
Skyler Grey | f4a835a | 2022-08-20 22:30:48 +0100 | [diff] [blame] | 6 | config = { |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 7 | networking = { |
Skyler Grey | ec37bd7 | 2023-02-26 12:49:42 +0000 | [diff] [blame] | 8 | dhcpcd = { |
| 9 | wait = "background"; |
| 10 | extraConfig = '' |
| 11 | timeout 0 |
| 12 | leasetime -1 |
| 13 | ipv6 off |
| 14 | noipv6rs |
| 15 | ipv4only |
| 16 | noarp |
Skyler Grey | 06cd670 | 2022-10-31 00:06:16 +0000 | [diff] [blame] | 17 | |
Skyler Grey | ec37bd7 | 2023-02-26 12:49:42 +0000 | [diff] [blame] | 18 | ssid HRSFC Guest |
| 19 | static ip_address=10.0.48.79/8 |
| 20 | static routers=10.0.0.1 |
Skyler Grey | 664b72e | 2023-01-26 00:40:57 +0000 | [diff] [blame] | 21 | |
Skyler Grey | ec37bd7 | 2023-02-26 12:49:42 +0000 | [diff] [blame] | 22 | ssid eduroam |
| 23 | static ip_address=10.0.48.79/8 |
| 24 | static routers=10.0.0.1 |
| 25 | ''; |
| 26 | }; |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 27 | hostName = "python"; |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 28 | nameservers = [ "1.1.1.1" "1.0.0.1" ]; |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 29 | search = [ |
| 30 | "python.local" |
| 31 | ]; |
| 32 | wireless = { |
| 33 | enable = true; |
| 34 | userControlled.enable = true; |
| 35 | networks = { |
Skyler Grey | 603b076 | 2023-03-07 13:14:43 +0000 | [diff] [blame] | 36 | /* "HRSFC-LAN".psk = "@hrsfcStaffPass@"; */ |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 37 | eduroam = { |
| 38 | auth = '' |
| 39 | scan_ssid=1 |
| 40 | proto=WPA2 |
| 41 | key_mgmt=WPA-EAP |
| 42 | eap=PEAP |
| 43 | pairwise=CCMP |
Skyler Grey | e0b26d2 | 2022-10-30 23:05:08 +0000 | [diff] [blame] | 44 | |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 45 | identity="@eduroamUser@" |
| 46 | password="@eduroamPass@" |
Skyler Grey | e0b26d2 | 2022-10-30 23:05:08 +0000 | [diff] [blame] | 47 | |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 48 | phase2="auth=MSCHAPV2" |
| 49 | ''; |
| 50 | }; |
Skyler Grey | 2198f2d | 2023-02-13 09:52:26 +0000 | [diff] [blame] | 51 | "HRSFC Wi-Fi".psk = "@hrsfcGuestPass@"; |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 52 | adelie10 = { |
| 53 | psk = "@adelie10Pass@"; |
| 54 | priority = 500; |
| 55 | }; |
| 56 | robocon-buster_beta.psk = "@roboconProtoboardPass@"; |
Skyler Grey | ac27f24 | 2022-10-31 00:29:57 +0000 | [diff] [blame] | 57 | "RoboCon3665-Sky".psk = "@robocon3665SkyPass@"; |
Skyler Grey | 4d6c69d | 2022-10-31 00:18:55 +0000 | [diff] [blame] | 58 | "RoboCon2022-Beta_team_4".psk = "@robocon2023Beta4Pass@"; |
Skyler Grey | ac27f24 | 2022-10-31 00:29:57 +0000 | [diff] [blame] | 59 | "RoboCon2023-Will".psk = "@robocon2023Will@"; |
Skyler Grey | 664b72e | 2023-01-26 00:40:57 +0000 | [diff] [blame] | 60 | "robot-HRS69420".psk = "@srRobotPassword@"; |
| 61 | "newadelie24".psk = "@newadelie24Pass@"; |
Skyler Grey | ac27f24 | 2022-10-31 00:29:57 +0000 | [diff] [blame] | 62 | } // lib.pipe (lib.range 1 21) [ |
| 63 | (builtins.map builtins.toString) |
| 64 | (builtins.map (team: { |
| 65 | name = "RoboCon2023-Team${team}"; |
| 66 | value = { |
| 67 | psk = "@robocon2023Team${team}@"; |
| 68 | }; |
| 69 | })) |
| 70 | builtins.listToAttrs |
| 71 | ]; |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 72 | environmentFile = config.sops.secrets."wireless.env".path; |
Skyler Grey | f4a835a | 2022-08-20 22:30:48 +0100 | [diff] [blame] | 73 | }; |
| 74 | }; |
Skyler Grey | c8dc35e | 2022-09-01 23:42:28 +0100 | [diff] [blame] | 75 | |
| 76 | hardware.enableRedistributableFirmware = true; |
| 77 | |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 78 | sops.secrets."wireless.env" = { |
| 79 | sopsFile = ../secrets/wireless.env.bin; |
Skyler Grey | e0b3b7d | 2022-09-09 08:14:11 +0100 | [diff] [blame] | 80 | format = "binary"; |
Skyler Grey | e0b3b7d | 2022-09-09 08:14:11 +0100 | [diff] [blame] | 81 | }; |
Skyler Grey | 06cd670 | 2022-10-31 00:06:16 +0000 | [diff] [blame] | 82 | |
| 83 | environment = { |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 84 | persistence."/nix/persist".directories = [ "/var/db/dhcpcd" ]; |
| 85 | systemPackages = [ pkgs.bandwidth ]; |
Skyler Grey | 06cd670 | 2022-10-31 00:06:16 +0000 | [diff] [blame] | 86 | }; |
Skyler Grey | f4a835a | 2022-08-20 22:30:48 +0100 | [diff] [blame] | 87 | }; |
| 88 | } |