Re: [Nix-dev] wicd managing wireless network

2012-01-05 Thread roconnor

On Mon, 2 Jan 2012, Sergey Mironov wrote:


I have successfully set up wpa2 wireless network using wicd, but it was not 
that easy. The problem is that dhclient doesn't ignore wlan0 interface by 
default and wicd
doesn't take this fact into account correctly. With just
  networking = {
    wicd.enable = true;
    # useDHCP is true by default
  };

I would get both wicd and dhclient managing wlan0 interface (well, wicd didn't 
detect wireless interface originally, that was me who typed 'wlan0' into it's 
gui settings
dialog). The worst thing here is the fact that as a result, wicd logs completly 
wrong 'bad password' errors. Probably, one should do something to prevent this 
situation,
maybe one of the following:
- prevent (wicd.enable == true  useDHCP == true) condition
- add wireless interfaces like wlan0 to the dhclien's list of ignored 
interfaces in /etc/nixos/nixos/modules/services/networking/dhclient.nix
I will be glad to try myself in fixing it. At least, should I add a wiki 
article describing the problem and solution as is?


I wouldn't mind some expert help getting wicd working properly.  I barely 
know what I'm doing.


For me, it is a matter that I have no idea how to use wpa_supplicant. 
AFAIK I have to reconfigure my system every time I take my laptop to a new 
cafe, not that I know how to configure my system for a new wireless 
network.


--
Russell O'Connor  http://r6.ca/
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] wicd managing wireless network

2012-01-05 Thread Alexander Foremny
It is true that you have to reconfigure your system every time you add a
*new* wireless network you want to connect to, specifically you have to
reconfigure every time you change /etc/wpa_supplicant.conf and want to make
the changes active. However, once configured wpa_supplicant will take care
of getting you connected automagically.

It is really much less painful as I think you are assuming.

I set up a preliminary Wiki page to help getting you and other users
started.

https://nixos.org/wiki/Wireless_networking

2012/1/5 rocon...@theorem.ca

 On Mon, 2 Jan 2012, Sergey Mironov wrote:

  I have successfully set up wpa2 wireless network using wicd, but it was
 not that easy. The problem is that dhclient doesn't ignore wlan0 interface
 by default and wicd
 doesn't take this fact into account correctly. With just
   networking = {
 wicd.enable = true;
 # useDHCP is true by default
   };

 I would get both wicd and dhclient managing wlan0 interface (well, wicd
 didn't detect wireless interface originally, that was me who typed 'wlan0'
 into it's gui settings
 dialog). The worst thing here is the fact that as a result, wicd logs
 completly wrong 'bad password' errors. Probably, one should do something to
 prevent this situation,
 maybe one of the following:
 - prevent (wicd.enable == true  useDHCP == true) condition
 - add wireless interfaces like wlan0 to the dhclien's list of ignored
 interfaces in /etc/nixos/nixos/modules/**services/networking/dhclient.**
 nix
 I will be glad to try myself in fixing it. At least, should I add a wiki
 article describing the problem and solution as is?


 I wouldn't mind some expert help getting wicd working properly.  I barely
 know what I'm doing.

 For me, it is a matter that I have no idea how to use wpa_supplicant.
 AFAIK I have to reconfigure my system every time I take my laptop to a new
 cafe, not that I know how to configure my system for a new wireless network.

 --
 Russell O'Connor  http://r6.ca/
 ``All talk about `theft,''' the general counsel of the American Graphophone
 Company wrote, ``is the merest claptrap, for there exists no property in
 ideas musical, literary or artistic, except as defined by statute.''
 ___
 nix-dev mailing list
 nix-dev@lists.science.uu.nl
 http://lists.science.uu.nl/mailman/listinfo/nix-dev


___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] wicd managing wireless network

2012-01-05 Thread roconnor
On Thu, 5 Jan 2012, Alexander Foremny wrote:

 It is true that you have to reconfigure your system every time you add a 
 *new* wireless network you want to connect to, specifically you have to 
 reconfigure every time
 you change /etc/wpa_supplicant.conf and want to make the changes active. 
 However, once configured wpa_supplicant will take care of getting you 
 connected automagically.
 
 It is really much less painful as I think you are assuming.
 
 I set up a preliminary Wiki page to help getting you and other users started.
 
 https://nixos.org/wiki/Wireless_networking

Why isn't wpa_supplicant.conf managed by NixOS?  If I need to restart 
networking services when wpa_supplicant.conf changes, then the 
configuration file ought to be managed by NixOS.

Your tutorial doesn't talk about how to scan for wireless networks to find 
the SSID that you want.

All in all, your tutorial has convinced me that using wpa_supplicant is as 
painful as I was assuming.

-- 
Russell O'Connor  http://r6.ca/
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] wicd managing wireless network

2012-01-05 Thread Yury G. Kudryashov
rocon...@theorem.ca wrote:

 On Thu, 5 Jan 2012, Alexander Foremny wrote:
 
 It is true that you have to reconfigure your system every time you add a
 *new* wireless network you want to connect to, specifically you have to
 reconfigure every time you change /etc/wpa_supplicant.conf and want to
 make the changes active. However, once configured wpa_supplicant will
 take care of getting you connected automagically.
 
 It is really much less painful as I think you are assuming.
 
 I set up a preliminary Wiki page to help getting you and other users
 started.
 
 https://nixos.org/wiki/Wireless_networking
 
 Why isn't wpa_supplicant.conf managed by NixOS?
Because it contains passwords.
 Your tutorial doesn't talk about how to scan for wireless networks to find
 the SSID that you want.
sudo iwlist scan
 
 All in all, your tutorial has convinced me that using wpa_supplicant is as
 painful as I was assuming.
 
P.S.: I hope that I'll have some time to add NetworkManager nixos service.
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] wicd managing wireless network

2012-01-05 Thread roconnor
On Thu, 5 Jan 2012, Yury G.  Kudryashov wrote:

 https://nixos.org/wiki/Wireless_networking

 Why isn't wpa_supplicant.conf managed by NixOS?
 Because it contains passwords.

Ah, I see.

;_;

-- 
Russell O'Connor  http://r6.ca/
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] wicd managing wireless network

2012-01-05 Thread Petr Rockai
Hi,

rocon...@theorem.ca writes:

 Why isn't wpa_supplicant.conf managed by NixOS?
 Because it contains passwords.
 Ah, I see.

For the record, I keep a /etc/nixos/wpa-supplicant.nix which I require
from configuration.nix and that says environment.etc = [ {
source = pkgs.writeText wpa_supplicant.conf ''
  ...
'';
target = wpa_supplicant.conf;
} ];

(plus the requisite boilerplate, stolen from hardware-configuration.nix)

The advantage is that I don't need to think about wpa_supplicant.conf
when cloning my configuration, which I tend to do between two
laptops. (I keep /etc/nixos in version control, so I can push and pull
changes around conveniently...)

Yours,
   Petr

-- 
id' Ash = Ash; id' Dust = Dust; id' _ = undefined
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] wicd managing wireless network

2012-01-03 Thread Florian Friesdorf
On Tue, 3 Jan 2012 13:18:27 +0400, Sergey Mironov ier...@gmail.com wrote:
 2012/1/2 Lluís Batlle i Rossell vi...@viric.name
 Yes, one should disable wpa_supplicant (networking.enableWLAN if I rememver
 correctly) also - wicd runs it by itself when needed.

On the other hand wpa_supplicant itself does a rather good job,
too. With wicd I have/had the issue of a plethora of dchlients running
at some point.

Also it seems that nowadays it is enough for wpa_supplicant to know the
essid and psk, now details necessary any more.

 Patches for Intel 5150 firmware are in attach. 0001-intel-... is for nixos,
 0001-iwlfifi is for nixpkgs.

Thx, I committed them.

-- 
Florian Friesdorf f...@chaoflow.net
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: f...@chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC


pgpR5DiaytHM7.pgp
Description: PGP signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev