diff --git a/README.md b/README.md index c7b38033..b9cd0c44 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ home-manager switch -b backup --flake /etc/nixos/git ![Gruv'd Hyprland](./screenshot.png "Hyprland with a Gruvboxy theme") --- # To Do List +* [ ] Add copealnd-5g psk keys to secrets.yaml in a format that matches the Telegraf token * [ ] Look into Remote Builds - [Link](https://nixos.org/manual/nix/stable/advanced-topics/distributed-builds.html) * [ ] Raspberry Pi 1: * [ ] Set up Tailscale with pre-auth keys (services.tailscale.authKeyFile, add the key to secrets/secrets.yaml) diff --git a/nixos/common/modules/wireless.nix b/nixos/common/modules/wireless.nix new file mode 100644 index 00000000..0d3dd92e --- /dev/null +++ b/nixos/common/modules/wireless.nix @@ -0,0 +1,21 @@ +{pkgs, config, ...}: { + # Enable wireless + + # Set up the secrets file for the token: + sops.secrets.copeland-5g-psk = { + sopsFile = ../../../secrets/secrets.yaml; + }; + + networking = { + wireless = { + environmentFiles = [ /run/secrets/wireless-psk ]; + enable = true; + networks = { + "copeland-5g" = { + hidden = false; + psk = $copeland-5g-psk; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/nixos/hosts/nixos-rpi4-01/default.nix b/nixos/hosts/nixos-rpi4-01/default.nix index ccb46072..b406340b 100644 --- a/nixos/hosts/nixos-rpi4-01/default.nix +++ b/nixos/hosts/nixos-rpi4-01/default.nix @@ -4,6 +4,8 @@ { config, lib, pkgs, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") + ../../common/services/wireless.nix + ]; # Use the extlinux boot loader. (NixOS wants to enable GRUB by default)