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-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  
``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, 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  
``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 

> 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  
> ``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 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  
``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-03 Thread Florian Friesdorf
On Tue, 3 Jan 2012 13:18:27 +0400, Sergey Mironov  wrote:
> 2012/1/2 Lluís Batlle i Rossell 
> 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 
  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


Re: [Nix-dev] wicd managing wireless network

2012-01-03 Thread Sergey Mironov
2012/1/2 Lluís Batlle i Rossell 

> On Mon, Jan 02, 2012 at 01:20:25AM +0100, Florian Friesdorf wrote:
> > On Mon, 2 Jan 2012 02:22:41 +0400, 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?
> >
> > That would be great!
> >
>
> Remember that nixos can also start the wpa supplicant. :)
>

Yes, one should disable wpa_supplicant (networking.enableWLAN if I rememver
correctly) also - wicd runs it by itself when needed.

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

Sergey
From a89e940640d9903b0af3280a0f3a7b4685a6eb34 Mon Sep 17 00:00:00 2001
From: Sergey Mironov 
Date: Mon, 2 Jan 2012 21:23:58 +0100
Subject: [PATCH] intel-5150.nix: add Intel 5150 wireless firmware support

---
 modules/hardware/network/intel-5150.nix |5 +
 modules/installer/scan/not-detected.nix |1 +
 2 files changed, 6 insertions(+), 0 deletions(-)
 create mode 100644 modules/hardware/network/intel-5150.nix

diff --git a/modules/hardware/network/intel-5150.nix b/modules/hardware/network/intel-5150.nix
new file mode 100644
index 000..e32b72d
--- /dev/null
+++ b/modules/hardware/network/intel-5150.nix
@@ -0,0 +1,5 @@
+{pkgs, config, ...}:
+
+{
+  hardware.firmware = [ pkgs.iwlwifi5150ucode ];
+}
diff --git a/modules/installer/scan/not-detected.nix b/modules/installer/scan/not-detected.nix
index 36382a4..34e7147 100644
--- a/modules/installer/scan/not-detected.nix
+++ b/modules/installer/scan/not-detected.nix
@@ -9,6 +9,7 @@ with pkgs.lib;
 [
   ../../hardware/network/intel-4965agn.nix
   ../../hardware/network/intel-5000.nix
+  ../../hardware/network/intel-5150.nix
   ../../hardware/network/intel-6000.nix
   ../../hardware/network/intel-6000g2a.nix
   ../../hardware/network/intel-6000g2b.nix
-- 
1.7.8

From 85c80102aa5f3803ee803552d5f97e62686d39f4 Mon Sep 17 00:00:00 2001
From: Sergey Mironov 
Date: Mon, 2 Jan 2012 21:18:14 +0100
Subject: [PATCH] iwlwifi-5150-ucode: add Intel 5150 wireless firmware package

---
 .../linux/firmware/iwlwifi-5150-ucode/default.nix  |   29 
 pkgs/top-level/all-packages.nix|2 +
 2 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 pkgs/os-specific/linux/firmware/iwlwifi-5150-ucode/default.nix

diff --git a/pkgs/os-specific/linux/firmware/iwlwifi-5150-ucode/default.nix b/pkgs/os-specific/linux/firmware/iwlwifi-5150-ucode/default.nix
new file mode 100644
index 000..0505a94
--- /dev/null
+++ b/pkgs/os-specific/linux/firmware/iwlwifi-5150-ucode/default.nix
@@ -0,0 +1,29 @@
+{stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  name = "iwlwifi-5150-ucode-8.24.2.2";
+  
+  src = fetchurl {
+url = "http://intellinuxwireless.org/iwlwifi/downloads/iwlwifi-5150-ucode-8.24.2.2.tgz";;
+sha256 = "d253e6ff6624639aded67c82df98b2bc4a66eb66400848d5614921d513540cf9";
+  };
+  
+  buildPhase = "true";
+
+  installPhase = ''
+ensureDir "$out"
+chmod -x *
+cp * "$out"
+  '';
+  
+  meta = {
+description = "Firmware for the Intel 5150 wireless card";
+
+longDescription = ''
+  This package provides version 1 of the Intel wireless card
+  firmware.  It contains the `iwlwifi-5150-2.ucode' file.
+'';
+
+homepage = http://intellinuxwireless.org/;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index bbc4a70..f015f54 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -5311,6 +5311,8 @@ let
 
   iwlwifi5000ucode = callPackage ../os-specific/linux/firmware/iwlwifi-5000-ucode { };
 
+  iwlwifi5150ucode = callPackage ../os-specific/linux/firmware/iwlwifi-5150-ucode { };
+
   iwlwifi6000ucode = callPackage ../os-specific/linux/firmware/iwlwifi-6000-ucode { };
 
   iwlwifi6000g2aucode = callPackage ../os-specific/linux/firmware/iwlwifi-6000g2a-ucode { };
-- 
1.7.8

__

Re: [Nix-dev] wicd managing wireless network

2012-01-02 Thread Lluís Batlle i Rossell
On Mon, Jan 02, 2012 at 01:20:25AM +0100, Florian Friesdorf wrote:
> On Mon, 2 Jan 2012 02:22:41 +0400, 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?
> 
> That would be great!
> 

Remember that nixos can also start the wpa supplicant. :)
___
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-01 Thread Florian Friesdorf
On Mon, 2 Jan 2012 02:22:41 +0400, 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?

That would be great!

> Also I've added firmware iwlwifi-5150-ucode staff, using iwlwifi-5000-ucode
> as an example. Should I share a git-style patch via email?

I'd be happy to commit that for you.

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


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


[Nix-dev] wicd managing wireless network

2012-01-01 Thread Sergey Mironov
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?

Also I've added firmware iwlwifi-5150-ucode staff, using iwlwifi-5000-ucode
as an example. Should I share a git-style patch via email?

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