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

2017-05-10 Thread Strahinja Popovic
Thanks Peter, it did the trick :) On Wed, May 10, 2017 at 1:18 AM, Peter Hoeg wrote: > Hi, > > > The proper way to do this is to set up modaliases >> >> Could you please elaborate further? >> > > the alias in the line below depends on the exact PID and VID of your > device

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

2017-05-09 Thread Peter Hoeg
Hi, > The proper way to do this is to set up modaliases Could you please elaborate further? the alias in the line below depends on the exact PID and VID of your device so you may need to adjust it: boot.kernelModules = [ "rt2800usb" ]; boot.extraModprobeConfig = '' alias

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

2017-05-09 Thread Strahinja Popovic
> The proper way to do this is to set up modaliases Could you please elaborate further? On Tue, May 9, 2017 at 3:14 PM, Peter Hoeg wrote: > Hi, > > I would have gone to systemd.services. Slightly uglier looking (bigger >> attrset), but should run after the kernel has loaded its

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

2017-05-09 Thread Peter Hoeg
Hi, 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). Actually,

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

2017-05-09 Thread Strahinja Popovic
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

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

2017-05-09 Thread Peter Hoeg
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,

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

2017-05-09 Thread Strahinja Popovic
Hi everyone, I have made my USB WiFi to work, but I have to call this script whenever I restart the computer. #!/usr/bin/env bash echo "0b05 17e8"|sudo tee /sys/bus/usb/drivers/rt2800usb/new_id What is correct way to make this part of configuration.nix? Cheers, -- Strahinja Popovic