[Nix-dev] [NixOS] How to incorporate my Bash script in configuration.nix?

David Izquierdo thecofee at gmail.com
Tue May 9 16:47:11 CEST 2017


I would have gone to systemd.services. Slightly uglier looking (bigger 
attrset), but should run after the kernel has loaded its modules. I'd 
say it would be ideal to have it be "PartOf = networking.target" and/or 
"Before = dhcpd.service" (or whatever networking thingy you use).


On 09/05/17 13:26, Strahinja Popovic wrote:
> Thanks for help Peter,
>
> But I have in dmesg now:
>
> [    2.027361] stage-2-init:
> /nix/store/zv42ylc0jangv5kv437577qq79v3xq5n-nixos-system-strale-17.03.1033.99dfb6dce3/activate:
> line 136: /sys/bus/usb/drivers/rt2800usb/new_id: No such file or directory
>
> How to make it to wait for kernel module?
>
> On Tue, May 9, 2017 at 9:44 AM, Peter Hoeg <peter at hoeg.com> wrote:
>
>> Hi,
>>
>>    I have made my USB WiFi to work,
>>>    but I have to call this script whenever I restart the computer.
>>>
>> you can do it this way:
>>
>> system.activationScripts = {
>>   rt2800usb = {
>>     text = ''
>>       echo "0b05 17e8" > /sys/bus/usb/drivers/rt2800usb/new_id
>>     '';
>>     deps = [];
>>   };
>> };
>>
>> --
>> Regards,
>> Peter
>>
>
>
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> https://mailman.science.uu.nl/mailman/listinfo/nix-dev



More information about the nix-dev mailing list