aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/turris-wifi.nix
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-04-14 18:18:30 +0200
committerKarel Kočí <cynerd@email.cz>2022-04-14 18:18:30 +0200
commit94f863d84acb5340c3c999f1fa06678f7a5df9f5 (patch)
treeec38540ddd274d5a43661fccdcf229c111f883e0 /nixos/modules/turris-wifi.nix
parent51bda2b636e35a64b2ff25dd676d124f4b11b6e0 (diff)
downloadnixturris-94f863d84acb5340c3c999f1fa06678f7a5df9f5.tar.gz
nixturris-94f863d84acb5340c3c999f1fa06678f7a5df9f5.tar.bz2
nixturris-94f863d84acb5340c3c999f1fa06678f7a5df9f5.zip
nixos: add turris-wifi modules
Diffstat (limited to 'nixos/modules/turris-wifi.nix')
-rw-r--r--nixos/modules/turris-wifi.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixos/modules/turris-wifi.nix b/nixos/modules/turris-wifi.nix
new file mode 100644
index 0000000..bd74523
--- /dev/null
+++ b/nixos/modules/turris-wifi.nix
@@ -0,0 +1,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") [
+ ];
+
+ };
+}