From 8fb3ea82b7855fae8da0200096cb5c1c6eb69f3c Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 14 Jul 2024 22:16:45 -0500 Subject: [PATCH] Add "reset-wifi-module" as a useful example of writeShellApplication --- flake.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index d883e46..2b5d56a 100644 --- a/flake.nix +++ b/flake.nix @@ -242,7 +242,7 @@ ./nixos/foxtrot.nix - { + ({pkgs, ...}: { home-manager.users.daniel = { imports = with homeManagerModules; [ senpai @@ -252,7 +252,18 @@ linux-desktop-environment-config ]; }; - } + environment.systemPackages = [ + (pkgs.writeShellApplication + { + name = "reset-wifi-module"; + runtimeInputs = with pkgs; [kmod]; + text = '' + modprobe -rv mt7921e + modprobe -v mt7921e + ''; + }) + ]; + }) ]; };