aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/turris-wifi.nix
blob: bd74523a5653adba0deb2f76b0b76f2de416f006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ config, lib, pkgs, ... }:

with lib;

let

  cnf = config.turris.wifi;

in {

  options = {
    turris.wifi = {
      enable = mkOption {
        type = types.bool;
        default = true;
        description = "Enable Turris WiFi configuration";
      };
    };
  };

  config = mkIf cnf.enable {
    # Needed for Ath10k firmware
    hardware.firmware = with pkgs; [ firmwareLinuxNonfree ];

    # The additional administration packages
    environment.systemPackages =  with pkgs; [
      iw
    ] ++ optionals (config.turris.board == "mox") [
    ] ++ optionals (config.turris.board == "omnia") [
    ];

  };
}