diff --git a/nixos-config/hosts/rin/default.nix b/nixos-config/hosts/rin/default.nix index 8e742da2..240933d3 100644 --- a/nixos-config/hosts/rin/default.nix +++ b/nixos-config/hosts/rin/default.nix @@ -1,9 +1,13 @@ -{lib, flake-inputs, ...}: { +{ + pkgs, + config, + lib, + flake-inputs, + ... +}: { imports = [ flake-inputs.disko.nixosModules.disko - ../../networks/personal.nix - ./hardware-configuration.nix ./disko.nix @@ -15,12 +19,51 @@ sops = { gnupg = lib.mkForce {}; age.keyFile = "/var/lib/sops/host.age"; + secrets.wireless-env = {}; }; networking = { hostName = "rin"; hostId = "e6aaf496"; - wireless.interfaces = ["wlp2s0"]; + wireless = { + enable = lib.mkForce false; + allowAuxiliaryImperativeNetworks = lib.mkForce false; + userControlled.enable = lib.mkForce false; + }; + + networkmanager = { + enable = true; + dns = "systemd-resolved"; + + ensureProfiles = { + environmentFiles = [config.sops.secrets.wireless-env.path]; + + profiles = { + mikan = { + connection = { + id = "mikan"; + type = "wifi"; + }; + + wifi = { + mode = "infrastructure"; + ssid = "mikan"; + }; + + wifi-security = { + key-mgmt = "wpa-psk"; + psk = "$PSK_MIKAN"; + }; + + ipv4.method = "auto"; + ipv6 = { + addr-gen-mode = "default"; + method = "auto"; + }; + }; + }; + }; + }; }; systemd.network = {