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 | ec37bd7 | 2023-02-26 12:49:42 +0000 | [diff] [blame] | 21 | ''; |
| 22 | }; |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 23 | hostName = "python"; |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 24 | nameservers = [ "1.1.1.1" "1.0.0.1" ]; |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 25 | search = [ |
| 26 | "python.local" |
| 27 | ]; |
| 28 | wireless = { |
| 29 | enable = true; |
| 30 | userControlled.enable = true; |
| 31 | networks = { |
Skyler Grey | 603b076 | 2023-03-07 13:14:43 +0000 | [diff] [blame] | 32 | /* "HRSFC-LAN".psk = "@hrsfcStaffPass@"; */ |
Skyler Grey | 2198f2d | 2023-02-13 09:52:26 +0000 | [diff] [blame] | 33 | "HRSFC Wi-Fi".psk = "@hrsfcGuestPass@"; |
Skyler Grey | 7352702 | 2023-04-06 09:47:07 +0000 | [diff] [blame] | 34 | "UniOfCam-Guest" = {}; |
| 35 | "Premier Inn Free Wi-Fi" = {}; |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 36 | adelie10 = { |
| 37 | psk = "@adelie10Pass@"; |
| 38 | priority = 500; |
| 39 | }; |
| 40 | robocon-buster_beta.psk = "@roboconProtoboardPass@"; |
Skyler Grey | ac27f24 | 2022-10-31 00:29:57 +0000 | [diff] [blame] | 41 | "RoboCon3665-Sky".psk = "@robocon3665SkyPass@"; |
Skyler Grey | 4d6c69d | 2022-10-31 00:18:55 +0000 | [diff] [blame] | 42 | "RoboCon2022-Beta_team_4".psk = "@robocon2023Beta4Pass@"; |
Skyler Grey | ac27f24 | 2022-10-31 00:29:57 +0000 | [diff] [blame] | 43 | "RoboCon2023-Will".psk = "@robocon2023Will@"; |
Skyler Grey | 664b72e | 2023-01-26 00:40:57 +0000 | [diff] [blame] | 44 | "robot-HRS69420".psk = "@srRobotPassword@"; |
| 45 | "newadelie24".psk = "@newadelie24Pass@"; |
Skyler Grey | 7352702 | 2023-04-06 09:47:07 +0000 | [diff] [blame] | 46 | "Lord".psk = "@lordPass@"; |
Skyler Grey | ac27f24 | 2022-10-31 00:29:57 +0000 | [diff] [blame] | 47 | } // lib.pipe (lib.range 1 21) [ |
| 48 | (builtins.map builtins.toString) |
| 49 | (builtins.map (team: { |
| 50 | name = "RoboCon2023-Team${team}"; |
| 51 | value = { |
| 52 | psk = "@robocon2023Team${team}@"; |
| 53 | }; |
| 54 | })) |
| 55 | builtins.listToAttrs |
| 56 | ]; |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 57 | environmentFile = config.sops.secrets."wireless.env".path; |
Skyler Grey | f4a835a | 2022-08-20 22:30:48 +0100 | [diff] [blame] | 58 | }; |
| 59 | }; |
Skyler Grey | c8dc35e | 2022-09-01 23:42:28 +0100 | [diff] [blame] | 60 | |
| 61 | hardware.enableRedistributableFirmware = true; |
| 62 | |
Skyler Grey | f18fe9f | 2022-10-30 23:07:57 +0000 | [diff] [blame] | 63 | sops.secrets."wireless.env" = { |
| 64 | sopsFile = ../secrets/wireless.env.bin; |
Skyler Grey | e0b3b7d | 2022-09-09 08:14:11 +0100 | [diff] [blame] | 65 | format = "binary"; |
Skyler Grey | e0b3b7d | 2022-09-09 08:14:11 +0100 | [diff] [blame] | 66 | }; |
Skyler Grey | 06cd670 | 2022-10-31 00:06:16 +0000 | [diff] [blame] | 67 | |
| 68 | environment = { |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 69 | persistence."/nix/persist".directories = [ "/var/db/dhcpcd" ]; |
| 70 | systemPackages = [ pkgs.bandwidth ]; |
Skyler Grey | 06cd670 | 2022-10-31 00:06:16 +0000 | [diff] [blame] | 71 | }; |
Skyler Grey | f4a835a | 2022-08-20 22:30:48 +0100 | [diff] [blame] | 72 | }; |
| 73 | } |