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 | 06cd670 | 2022-10-31 00:06:16 +0000 | [diff] [blame] | 8 | dhcpcd.extraConfig = '' |
| 9 | timeout 0 |
| 10 | leasetime -1 |
| 11 | ipv6 off |
| 12 | noipv6rs |
| 13 | ipv4only |
| 14 | noarp |
| 15 | |
Skyler Grey | 664b72e | 2023-01-26 00:40:57 +0000 | [diff] [blame] | 16 | ssid HRSFC Guest |
| 17 | static ip_address=10.0.48.79/8 |
| 18 | static routers=10.0.0.1 |
| 19 | |
Skyler Grey | 06cd670 | 2022-10-31 00:06:16 +0000 | [diff] [blame] | 20 | ssid eduroam |
| 21 | static ip_address=10.0.48.79/8 |
| 22 | static routers=10.0.0.1 |
| 23 | ''; |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 24 | hostName = "python"; |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 25 | nameservers = [ "1.1.1.1" "1.0.0.1" ]; |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 26 | 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 Grey | e0b26d2 | 2022-10-30 23:05:08 +0000 | [diff] [blame] | 40 | |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 41 | identity="@eduroamUser@" |
| 42 | password="@eduroamPass@" |
Skyler Grey | e0b26d2 | 2022-10-30 23:05:08 +0000 | [diff] [blame] | 43 | |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 44 | 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 Grey | ac27f24 | 2022-10-31 00:29:57 +0000 | [diff] [blame] | 53 | "RoboCon3665-Sky".psk = "@robocon3665SkyPass@"; |
Skyler Grey | 4d6c69d | 2022-10-31 00:18:55 +0000 | [diff] [blame] | 54 | "RoboCon2022-Beta_team_4".psk = "@robocon2023Beta4Pass@"; |
Skyler Grey | ac27f24 | 2022-10-31 00:29:57 +0000 | [diff] [blame] | 55 | "RoboCon2023-Will".psk = "@robocon2023Will@"; |
Skyler Grey | 664b72e | 2023-01-26 00:40:57 +0000 | [diff] [blame] | 56 | "robot-HRS69420".psk = "@srRobotPassword@"; |
| 57 | "newadelie24".psk = "@newadelie24Pass@"; |
Skyler Grey | ac27f24 | 2022-10-31 00:29:57 +0000 | [diff] [blame] | 58 | } // 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 Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 68 | environmentFile = config.sops.secrets."wireless.env".path; |
Skyler Grey | f4a835a | 2022-08-20 22:30:48 +0100 | [diff] [blame] | 69 | }; |
| 70 | }; |
Skyler Grey | c8dc35e | 2022-09-01 23:42:28 +0100 | [diff] [blame] | 71 | |
| 72 | hardware.enableRedistributableFirmware = true; |
| 73 | |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 74 | sops.secrets."wireless.env" = { |
| 75 | sopsFile = ../secrets/wireless.env.bin; |
Skyler Grey | e0b3b7d | 2022-09-09 08:14:11 +0100 | [diff] [blame] | 76 | format = "binary"; |
Skyler Grey | e0b3b7d | 2022-09-09 08:14:11 +0100 | [diff] [blame] | 77 | }; |
Skyler Grey | 06cd670 | 2022-10-31 00:06:16 +0000 | [diff] [blame] | 78 | |
| 79 | environment = { |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 80 | persistence."/nix/persist".directories = [ "/var/db/dhcpcd" ]; |
| 81 | systemPackages = [ pkgs.bandwidth ]; |
Skyler Grey | 06cd670 | 2022-10-31 00:06:16 +0000 | [diff] [blame] | 82 | }; |
Skyler Grey | f4a835a | 2022-08-20 22:30:48 +0100 | [diff] [blame] | 83 | }; |
| 84 | } |