Re: [Nix-dev] How to enable Nginx lua module

2017-04-27 Thread Eike

Hi Erik,

glad you figured it out. Yes, it must be supplied to the
`packageOverrides` function. This way you can define new packages or
override existing ones (by using the same name). Sorry for the delay and
my incomplete reply.

Kind regards
Eike

4levels <4lev...@gmail.com> writes:

> Hi All, I finally got it to work as follows:
>
> nixpkgs.config.packageOverrides = pkgs:
> {
>   nginx = pkgs.nginx.override {
> modules = [
>   pkgs.nginxModules.lua
>   pkgs.nginxModules.dav
>   pkgs.nginxModules.moreheaders
> ];
>   };
> };
>
> Glad I got it working now!
>
> Kind regards,
>
> Erik
>
>
> On Thu, Apr 27, 2017 at 12:56 PM 4levels <4lev...@gmail.com> wrote:
>
>> Hi Eike,
>>
>> could you please tell me where you found that nginx config part in your
>> config?
>> I'm trying my very best but I'm failing miserably to override the nginx
>> modules in my NixOps statements :-(
>>
>> Thanks in advance!
>>
>> Kind regards,
>>
>> Erik
>>
>> On Thu, Apr 27, 2017 at 11:58 AM 4levels <4lev...@gmail.com> wrote:
>>
>>> Hi Eike,
>>>
>>> I'm actually getting infinite recursion errors when I try to add the
>>> following to my sample servers.nix config:
>>>
>>> with import ;
>>> let
>>>   ...
>>> in
>>> {
>>>   vm01 =
>>> { config, pkgs, nodes, nginx, nginxModules, ... }:
>>> nginx.override {
>>>   modules = [
>>> nginxModules.lua
>>>   ];
>>> }
>>> {
>>>   deployment.targetHost = "192.168.1.50";
>>>   ...
>>> };
>>> ...
>>>   };
>>> }
>>>
>>> Fails with error
>>>
>>> ..
>>> while evaluating the module argument `nginx' in ":anon-1:anon-1":
>>> infinite recursion encountered, at
>>> /nix/store/yqvarbfxf3594p7p954b4qjdiwmyagm4-nixos-16.09.tar.gz/lib/modules.nix:150:28
>>>
>>>
>>> On Thu, Apr 27, 2017 at 11:46 AM 4levels <4lev...@gmail.com> wrote:
>>>
>>>> Hi Eike,
>>>>
>>>> I found similar info in the release notes for 16.03.
>>>> I'm struggling to get this into my NixOps statements though, but I'm
>>>> sure I'll figure it out ;-)
>>>>
>>>> Thanks for your swift reply!
>>>>
>>>> Kind regards,
>>>>
>>>> Erik
>>>>
>>>> On Thu, Apr 27, 2017 at 11:33 AM Eike <e...@eknet.org> wrote:
>>>>
>>>>>
>>>>> Hallo Erik,
>>>>>
>>>>> I found this in my config files:
>>>>>
>>>>> { nginx, nginxModules }:
>>>>>
>>>>> nginx.override {
>>>>>   modules =  [
>>>>> nginxModules.rtmp
>>>>> nginxModules.dav
>>>>> nginxModules.moreheaders
>>>>> #nginxModules.lua
>>>>>   ];
>>>>> }
>>>>>
>>>>> But I don't remember why I commented out the lua module. Maybe it didn't
>>>>> work or I don't need it…. And this is nixos-16.09, so maybe things
>>>>> changed here.
>>>>>
>>>>> Kind regards
>>>>> Eike
>>>>>
>>>>> 4levels <4lev...@gmail.com> writes:
>>>>>
>>>>> > Hi Nix Devs,
>>>>> >
>>>>> > I can see that Nginx can be configured to use the lua module, but I
>>>>> can't
>>>>> > seem to find how to enable this module?
>>>>> >
>>>>> > I'm probably overlooking something obvious here, but I checked all
>>>>> files in
>>>>> > https://github.com/NixOS/nixpkgs/blob/16.09/pkgs/servers/http/nginx
>>>>> and I
>>>>> > just don't see how I can enable this.
>>>>> > https://nixos.org/nixos/options.html#nginx also doesn't enlighten me
>>>>> either
>>>>> > :-(
>>>>> >
>>>>> > Kind regards,
>>>>> >
>>>>> > Erik
>>>>> > ___
>>>>> > nix-dev mailing list
>>>>> > nix-dev@lists.science.uu.nl
>>>>> > https://mailman.science.uu.nl/mailman/listinfo/nix-dev
>>>>>
>>>>>
>>>>> --
>>>>> gpg: AD7AC35E
>>>>> finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
>>>>>
>>>>


--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] How to enable Nginx lua module

2017-04-27 Thread Eike

Hallo Erik,

I found this in my config files:

{ nginx, nginxModules }:

nginx.override {
  modules =  [
nginxModules.rtmp
nginxModules.dav
nginxModules.moreheaders
#nginxModules.lua
  ];
}

But I don't remember why I commented out the lua module. Maybe it didn't
work or I don't need it…. And this is nixos-16.09, so maybe things
changed here.

Kind regards
Eike

4levels <4lev...@gmail.com> writes:

> Hi Nix Devs,
>
> I can see that Nginx can be configured to use the lua module, but I can't
> seem to find how to enable this module?
>
> I'm probably overlooking something obvious here, but I checked all files in
> https://github.com/NixOS/nixpkgs/blob/16.09/pkgs/servers/http/nginx and I
> just don't see how I can enable this.
> https://nixos.org/nixos/options.html#nginx also doesn't enlighten me either
> :-(
>
> Kind regards,
>
> Erik
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> https://mailman.science.uu.nl/mailman/listinfo/nix-dev


-- 
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Temporarily not using ~/.nixpkgs/config.nix

2017-03-26 Thread Eike

Oh, thank you! and sorry for not doing the grep myself… :/ 

Linus Heckemann <a...@sphalerite.org> writes:

> On 26/03/17 16:30, Eike wrote:
>> Is there a way to temporarily disable evaluating ~/.nixpkgs/config.nix?
>> I looked at http://nixos.org/nixpkgs/manual/#chap-packageconfig, but
>> couldn't find anything related.
>
> See pkgs/top-level/impure.nix (found by grepping nixpkgs for
> .nixpkgs/config.nix):
>
>> config ? let
>> configFile = getEnv "NIXPKGS_CONFIG";
>> configFile2 = homeDir + "/.config/nixpkgs/config.nix";
>> configFile3 = homeDir + "/.nixpkgs/config.nix"; # obsolete
>>   in
>> if configFile != "" && pathExists configFile then import configFile
>> else if homeDir != "" && pathExists configFile2 then import configFile2
>> else if homeDir != "" && pathExists configFile3 then import configFile3
>> else {}
>
> If you set the environment variable NIXPKGS_CONFIG to point to a file
> containing simply {} that should hopefully help.
>
> Linus
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


-- 
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Temporarily not using ~/.nixpkgs/config.nix

2017-03-26 Thread Eike

Hello,

I ocassionally search packages from previous nixos versions using for
example this command:

nix-env -f 
https://github.com/NixOS/nixpkgs-channels/archive/nixos-16.09.tar.gz -qaP |grep 
linuxPackages

But often that won't work, because my ~/.nixpkgs/config.nix refers to my
customized package set which is setup for the current unstable channel
and so it might not work with nixos-16.09. I then quickly move
~/.nixpkgs away, run the command and move it back.

Is there a way to temporarily disable evaluating ~/.nixpkgs/config.nix?
I looked at http://nixos.org/nixpkgs/manual/#chap-packageconfig, but
couldn't find anything related.

TIA!
-Eike


--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] ImageMagick and xwd

2016-12-06 Thread Eike

Hi Roni,

thank you so much! This works perfectly. I didn't know about the import
command, this is very convenient. 

Thanks again and kind regards
Eike

Roni Choudhury <aicho...@gmail.com> writes:

> Hi Eike-
>
> You have to let *convert* know the image type coming in on stdin:
>
> *xwd -root | convert xwd:- screenshot.jpg*
>
> You may also be interested to know about the *import* command, which comes
> with ImageMagick:
>
> *import -window root screenshot.png*
>
> That command will take a screenshot and automatically convert to an output
> format based on the file extension you choose.
>
> Hope this helps,
>
> roni
>
> On Tue, Nov 29, 2016 at 6:25 AM Eike <e...@eknet.org> wrote:
>
>>
>> Hello,
>>
>> I'm used to do screenshots with xwd and imagemagick like this:
>>
>> xwd -root | convert - screenshot.jpg
>>
>> Currently (17.03pre95306.a24728f (Gorilla)) with imagemagick 6.9.6-2 I
>> cannot convert xwd dumps to jpgs anymore:
>>
>> $ xwd -root | convert - screenshot.jpg
>> convert: no decode delegate for this image format `' @
>> error/constitute.c/ReadImage/504.
>> convert: no images defined `screenshot.jpg' @
>> error/convert.c/ConvertImageCommand/3257.
>>
>> I tested with the version of commit fa6c6dae7 (which is 6.9.5-10)
>> successfully but with the update to 6.9.6-2 (commit 241cd0e5d) it
>> stopped working. So it looks like it is not supported anymore with
>> imagemagick 6.9.6?
>>
>> I could not find related info doing a quick search on the web. Does
>> anyone know more about this?
>>
>> Thanks and regards
>> Eike
>>
>> --
>> gpg: AD7AC35E
>> finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
>> ___
>> nix-dev mailing list
>> nix-dev@lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>


-- 
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] ImageMagick and xwd

2016-11-29 Thread Eike

Hello,

I'm used to do screenshots with xwd and imagemagick like this:

xwd -root | convert - screenshot.jpg

Currently (17.03pre95306.a24728f (Gorilla)) with imagemagick 6.9.6-2 I
cannot convert xwd dumps to jpgs anymore:

$ xwd -root | convert - screenshot.jpg
convert: no decode delegate for this image format `' @ 
error/constitute.c/ReadImage/504.
convert: no images defined `screenshot.jpg' @ 
error/convert.c/ConvertImageCommand/3257.

I tested with the version of commit fa6c6dae7 (which is 6.9.5-10)
successfully but with the update to 6.9.6-2 (commit 241cd0e5d) it
stopped working. So it looks like it is not supported anymore with
imagemagick 6.9.6?

I could not find related info doing a quick search on the web. Does
anyone know more about this?

Thanks and regards
Eike

-- 
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nixos unstable channel

2016-09-27 Thread Eike

Thanks for the info!

Philip Potter <philip.g.pot...@gmail.com> writes:

> There's a discussion on this GitHub issue, though it hasn't been reopened
> yet:
>
> https://github.com/NixOS/nixpkgs/issues/17866
>
>
> On Tuesday, 27 September 2016, Eike <e...@eknet.org> wrote:
>
>>
>> I've been away for two weeks and when doing a `nix-channel --update` it
>> fails due to a http error (22). The nixos unstable channel seems to be
>> gone. At https://nixos.org/channels are all channels but the
>> nixos-unstable.
>>
>> Or did the url change? I couldn't find any hints on the website…. I used
>> to use this url: https://nixos.org/channels/nixos-unstable I found
>> https://nixos.org/releases/nixos/unstable/ … is this the correct url
>> now? Regarding the timestamps the newest file there is from 2013-10-31,
>> so it's not current it seems.
>>
>> Thanks for any hints.
>> Regards
>> Eike
>>
>> --
>> gpg: AD7AC35E
>> finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
>> ___
>> nix-dev mailing list
>> nix-dev@lists.science.uu.nl <javascript:;>
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>


-- 
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] nixos unstable channel

2016-09-27 Thread Eike

I've been away for two weeks and when doing a `nix-channel --update` it
fails due to a http error (22). The nixos unstable channel seems to be
gone. At https://nixos.org/channels are all channels but the
nixos-unstable.

Or did the url change? I couldn't find any hints on the website…. I used
to use this url: https://nixos.org/channels/nixos-unstable I found
https://nixos.org/releases/nixos/unstable/ … is this the correct url
now? Regarding the timestamps the newest file there is from 2013-10-31,
so it's not current it seems.

Thanks for any hints.
Regards
Eike

-- 
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nixops: argument list too long

2016-07-24 Thread Eike

It turns out, that it is my tex package. If I remove it, it deploys
successfully. 

Here is a nix file that I tested with:

{
  network.description = "Test";

  trivial =
{ config, pkgs, ... }:
{

  imports =
  [  ];

  boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" 
"usb_storage" "sd_mod" "sr_mod" ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.extraModulePackages = [ ];
  boot.loader.grub.devices = [ "/dev/sda" ];

  fileSystems."/" =
{ device = "/dev/disk/by-uuid/3bafeea6-2e45-4048-b192-436b5a8f4e3b";
  fsType = "ext4";
};

  fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/f57eea7e-69d2-4629-af51-0fbff1e1a807";
  fsType = "ext2";
};

  swapDevices =
[ { device = "/dev/disk/by-uuid/6488f5b6-9412-4c35-9f1d-ae7bc442410e"; 
} ];

  nix.maxJobs = pkgs.lib.mkDefault 2;

  services.openssh.enable = true;

  environment.systemPackages = with pkgs;
let
  # see https://nixos.org/wiki/TexLive_HOWTO
  tex = texlive.combine {
inherit (texlive) scheme-medium collection-latexextra beamer 
moderncv moderntimeline cm-super inconsolata libertine;
  };
in [ tex ]; # I disable this packages, deploy to physical machine works

#  deployment.targetEnv = "container"; #works in both cases
   deployment.targetEnv = "none";
   deployment.targetHost = "192.168.1.72";
};

}


If I remove the tex package, deployment to a physical machine
works. Otherwise the “Argument list too long” error appears. Deployment
to a nixos container works in both cases.

What is going on?

Regards
Eike



Eike <e...@eknet.org> writes:

> Unfortunately, the configuration.nix is little complex. You can find it
> here [0]. As a test I removed all system packages listed in [1] (that
> are included in [0]) and the error disappeared.
>
> I'll try to make a smaller example that fails.
>
> Eike
>
> [0] 
> https://github.com/eikek/confnix/blob/unstable/systems/lenni/configuration.nix
> [1] https://github.com/eikek/confnix/blob/unstable/common-desktop.nix 
>
> nickbh <nick.b.h@gmail.com> writes:
>
>> That’s odd, I can’t think why that would happen, though I’m sure I
>> don’t know all the workings of nixops. Perhaps someone else on the
>> list might have a clue.
>>
>> If you share the system packages of your config we can see if the
>> error can be replicated.
>>
>>> On 24 Jul 2016, at 13:47, Eike <e...@eknet.org> wrote:
>>> 
>>> 
>>> nixops --version says "1.3.1". I'm running NixOS 16.09pre85931.125
>>> (unstable channel) and installed nixops using `nix-env -i nixops'. I
>>> noticed that when I remove all system packages from configuration.nix,
>>> it doesn't error anymore. So I guess it's because the closure is too
>>> large? This would be too bad for me, because I hoped to manage some
>>> (physical) desktop machines with nixops that have many system packages.
>>> 
>>> Here is the output of nixops info -d lenni. For me it doesn't provide
>>> any hints regarding this problem:
>>> 
>>>Network name: lenni
>>>Network UUID: 745c1905-5050-11e6-b200-90e6baf47cb4
>>>Network description: Lenni
>>>Nix expressions: 
>>> /home/eike/workspace/projects/confnix/systems/lenni/deploy.nix
>>> 
>>>
>>> +---+---+--+---+----+
>>>| Name  | Status| Type | Resource Id 
>>>   | IP address |
>>>
>>> +---+---+--+---++
>>>| lenni | Up / Outdated | none | 
>>> nixops-745c1905-5050-11e6-b200-90e6baf47cb4-lenni |    |
>>>
>>> +---+---+--+---++
>>> 
>>> Thanks a lot and kind regards
>>> Eike
>>> 
>>> 
>>> nickbh <nick.b.h@gmail.com> writes:
>>> 
>>>> Apparently that’s a OS error resulting from a size limit on command
>>>> line args[0]. Were you able to find the cause? If not, what’s your
>>>> 'nixops —version'? Does 'nixops info -d lenni’ show any clues?
>>>> 
>>>> Nick
>>>> 
>>>> [0] http://stackoverflow.com/a/28965439/4386011
>>>>> On 2

Re: [Nix-dev] nixops: argument list too long

2016-07-24 Thread Eike

Unfortunately, the configuration.nix is little complex. You can find it
here [0]. As a test I removed all system packages listed in [1] (that
are included in [0]) and the error disappeared.

I'll try to make a smaller example that fails.

Eike

[0] 
https://github.com/eikek/confnix/blob/unstable/systems/lenni/configuration.nix
[1] https://github.com/eikek/confnix/blob/unstable/common-desktop.nix 

nickbh <nick.b.h@gmail.com> writes:

> That’s odd, I can’t think why that would happen, though I’m sure I
> don’t know all the workings of nixops. Perhaps someone else on the
> list might have a clue.
>
> If you share the system packages of your config we can see if the
> error can be replicated.
>
>> On 24 Jul 2016, at 13:47, Eike <e...@eknet.org> wrote:
>> 
>> 
>> nixops --version says "1.3.1". I'm running NixOS 16.09pre85931.125
>> (unstable channel) and installed nixops using `nix-env -i nixops'. I
>> noticed that when I remove all system packages from configuration.nix,
>> it doesn't error anymore. So I guess it's because the closure is too
>> large? This would be too bad for me, because I hoped to manage some
>> (physical) desktop machines with nixops that have many system packages.
>> 
>> Here is the output of nixops info -d lenni. For me it doesn't provide
>> any hints regarding this problem:
>> 
>>Network name: lenni
>>Network UUID: 745c1905-5050-11e6-b200-90e6baf47cb4
>>Network description: Lenni
>>Nix expressions: 
>> /home/eike/workspace/projects/confnix/systems/lenni/deploy.nix
>> 
>>
>> +---+---+--+---++
>>| Name  | Status| Type | Resource Id  
>>  | IP address |
>>
>> +---+---+--+---++
>>| lenni | Up / Outdated | none | 
>> nixops-745c1905-5050-11e6-b200-90e6baf47cb4-lenni ||
>>
>> +---+---+--+---++
>> 
>> Thanks a lot and kind regards
>> Eike
>> 
>> 
>> nickbh <nick.b.h@gmail.com> writes:
>> 
>>> Apparently that’s a OS error resulting from a size limit on command
>>> line args[0]. Were you able to find the cause? If not, what’s your
>>> 'nixops —version'? Does 'nixops info -d lenni’ show any clues?
>>> 
>>> Nick
>>> 
>>> [0] http://stackoverflow.com/a/28965439/4386011
>>>> On 22 Jul 2016, at 22:53, Eike <e...@eknet.org> wrote:
>>>> 
>>>> 
>>>> Hello,
>>>> 
>>>> I start using nixops and want to deploy from one machine to
>>>> another. Both have NixOS running. This is the nix file I feed to nixops
>>>> create:
>>>> 
>>>>   {
>>>> network.description = "Lenni";
>>>> lenni =
>>>>   { config, pkgs, ... }:
>>>>   {
>>>> imports = [ ./configuration.nix ];
>>>> 
>>>> deployment.targetEnv = "none";
>>>> deployment.targetHost = "192.168.1.72";
>>>>   };
>>>>   }
>>>> 
>>>> The configuration.nix is the same file I used with `nixos-rebuild`
>>>> directly on the target machine.
>>>> 
>>>> When I run nixops deploy it builds the configuration and then quits with
>>>> “[Errno 7] Argument list too long” error:
>>>> 
>>>>   $ nixops deploy -d lenni
>>>>   building all machine configurations...
>>>>   lenni> copying closure...
>>>>   error: [Errno 7] Argument list too long
>>>> 
>>>> I'm not sure what I did wrong and could not find anything useful when
>>>> searching the internet. Can someone help me out here?
>>>> 
>>>> Thanks and regards
>>>> Eike
>>>> 
>>>> 
>>>> -- 
>>>> gpg: AD7AC35E
>>>> finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
>>>> ___
>>>> nix-dev mailing list
>>>> nix-dev@lists.science.uu.nl
>>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>> 
>> 
>> -- 
>> gpg: AD7AC35E
>> finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E


-- 
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nixops: argument list too long

2016-07-24 Thread Eike

nixops --version says "1.3.1". I'm running NixOS 16.09pre85931.125
(unstable channel) and installed nixops using `nix-env -i nixops'. I
noticed that when I remove all system packages from configuration.nix,
it doesn't error anymore. So I guess it's because the closure is too
large? This would be too bad for me, because I hoped to manage some
(physical) desktop machines with nixops that have many system packages.

Here is the output of nixops info -d lenni. For me it doesn't provide
any hints regarding this problem:

Network name: lenni
Network UUID: 745c1905-5050-11e6-b200-90e6baf47cb4
Network description: Lenni
Nix expressions: 
/home/eike/workspace/projects/confnix/systems/lenni/deploy.nix


+---+---+--+---++
| Name  | Status| Type | Resource Id
   | IP address |

+---+---+--+---++
| lenni | Up / Outdated | none | 
nixops-745c1905-5050-11e6-b200-90e6baf47cb4-lenni ||

+---+---+--+---++

Thanks a lot and kind regards
Eike


nickbh <nick.b.h@gmail.com> writes:

> Apparently that’s a OS error resulting from a size limit on command
> line args[0]. Were you able to find the cause? If not, what’s your
> 'nixops —version'? Does 'nixops info -d lenni’ show any clues?
>
> Nick
>
> [0] http://stackoverflow.com/a/28965439/4386011
>> On 22 Jul 2016, at 22:53, Eike <e...@eknet.org> wrote:
>> 
>> 
>> Hello,
>> 
>> I start using nixops and want to deploy from one machine to
>> another. Both have NixOS running. This is the nix file I feed to nixops
>> create:
>> 
>>{
>>  network.description = "Lenni";
>>  lenni =
>>{ config, pkgs, ... }:
>>{
>>  imports = [ ./configuration.nix ];
>> 
>>  deployment.targetEnv = "none";
>>  deployment.targetHost = "192.168.1.72";
>>};
>>}
>> 
>> The configuration.nix is the same file I used with `nixos-rebuild`
>> directly on the target machine.
>> 
>> When I run nixops deploy it builds the configuration and then quits with
>> “[Errno 7] Argument list too long” error:
>> 
>>$ nixops deploy -d lenni
>>building all machine configurations...
>>lenni> copying closure...
>>error: [Errno 7] Argument list too long
>> 
>> I'm not sure what I did wrong and could not find anything useful when
>> searching the internet. Can someone help me out here?
>> 
>> Thanks and regards
>> Eike
>> 
>> 
>> -- 
>> gpg: AD7AC35E
>> finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
>> ___
>> nix-dev mailing list
>> nix-dev@lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev


-- 
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] nixops: argument list too long

2016-07-22 Thread Eike

Hello,

I start using nixops and want to deploy from one machine to
another. Both have NixOS running. This is the nix file I feed to nixops
create:

{
  network.description = "Lenni";
  lenni =
{ config, pkgs, ... }:
{
  imports = [ ./configuration.nix ];

  deployment.targetEnv = "none";
  deployment.targetHost = "192.168.1.72";
};
}

The configuration.nix is the same file I used with `nixos-rebuild`
directly on the target machine.

When I run nixops deploy it builds the configuration and then quits with
“[Errno 7] Argument list too long” error:

$ nixops deploy -d lenni
building all machine configurations...
lenni> copying closure...
error: [Errno 7] Argument list too long

I'm not sure what I did wrong and could not find anything useful when
searching the internet. Can someone help me out here?

Thanks and regards
Eike


-- 
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Set date/time manually

2016-06-15 Thread Eike


Bjørn Forsman <bjorn.fors...@gmail.com> writes:

> On 15 June 2016 at 16:36, Eike <e...@eknet.org> wrote:
>>
>> sorry, I meant to write `sudo date +%Y%m%d -s "20180210`.
>>
> Your command works for me. ("date" returns the new date.) But for
> testing purposes, I'd have a look at faketime instead: nix-env -iA
> nixos.libfaketime.

It's strange, the date command works here fine, too. At work I'm running
nixos in a vm, maybe this makes a difference…. But thanks for mentioning
libfaketime, I didn't know about it and it is exactly what I need.

Thanks and regards
Eike

-- 
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Set date/time manually

2016-06-15 Thread Eike

sorry, I meant to write `sudo date +%Y%m%d -s "20180210`.

Eike <e...@eknet.org> writes:

> Hello NixOS experts,
>
> I want to test applications if they would work some time in the future
> and so I thought to change the date using timedatectl. But it says that
> it is not possible to use it on NixOS. The date command also doesn't
> seem to work: the date/time is not changed after doing for example `sudo
> date +%Y%m%d "20180210"`.
>
> How can I temporarily set the system time some value?
>
> Thanks for your advice
> Eike
> ___
> 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


[Nix-dev] Set date/time manually

2016-06-15 Thread Eike

Hello NixOS experts,

I want to test applications if they would work some time in the future
and so I thought to change the date using timedatectl. But it says that
it is not possible to use it on NixOS. The date command also doesn't
seem to work: the date/time is not changed after doing for example `sudo
date +%Y%m%d "20180210"`.

How can I temporarily set the system time some value?

Thanks for your advice
Eike
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] mcaffee on nixos?

2016-05-07 Thread Eike

That are great pointers, thank you!

Raahul Kumar  writes:

> In regards to packaging .deb
>
> http://anderspapitto.com/posts/2015-02-28-deb-installation-nixos.html
> https://www.reddit.com/r/NixOS/comments/3yvbyq/what_are_the_nixos_gotchas_for_the_debian_user/
>
> Alternative source code method:
> https://nixos.org/nixpkgs/manual/#chap-quick-start
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] mcaffee on nixos?

2016-05-07 Thread Eike

Hi Raahul,

thanks for your answer. I know there exists binaries for linux. I could
extract the zip from the mcaffee install script. It contains two deb and
two rpm packages and it looks for dpkg or rpm to install them. I think I
could probably extract the contents from the rpm/deb packages but then I
need to patch the binaries so that they find the shared libs on nixos,
right?  How can I do this, I'd guess with `patchelf` but I'm not sure
how to use it correctly.

Thanks and regards
Eike


Raahul Kumar <raahul.ku...@gmail.com> writes:

> Mcafee agent for linux does exist, so you can install it. Why your IT
> department is stark raving mad is another, pertinent question though.
> No one has packaged this for nix, so you will have to do the job yourself,
> because I can't imagine any demand for this.
>
> http://www.mcafee.com/au/downloads/endpoint-protection/products/virusscan-enterprise-for-linux.aspx
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] mcaffee on nixos?

2016-05-07 Thread Eike

zimbatm  writes:

> Would running mcaffee in a windows VM count ? :p
>

That would be an option I could well live with ;-) but I'm afraid it
doesn't count…

-- 
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] mcaffee on nixos?

2016-05-06 Thread Eike

Hi all,

I may be allowed to install my favorite Linux distro on my corporate
notebook (a mac…). But there is the requirement that I run a mcaffee
agent. Does possibly anyone has experience with that? Is it feasible or
should I not bother and install Debian?


Thanks for any hints!
Regards
Eike

-- 
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Understanding NIX_PATH

2015-06-13 Thread Eike

Yes, I know. My question is more why does it exist by default and is set
to some non-existent path? I didn't tweak this variable myself. Does it
maybe only apply to non-NixOS systems that use Nix?

Thanks
Eike

Luca Bruno lethalma...@gmail.com writes:

 It's just there if someone wants to use that path.

 On Sat, Jun 13, 2015 at 1:58 PM, Eike e...@eknet.org wrote:


 oh how embarrassing. I didn't see this although looking at it for sooo
 long.

 One thing I don't understand: what does 'nixpkgs=/etc/nixos/nixpkgs'
 mean in NIX_PATH? It doesn't exist on my system, so I gues it is
 referring to something…?

 thank you very much!
 Eike

 Luca Bruno lethalma...@gmail.com writes:

  I think because you are using the nixpkgs-unstable instead of
  nixos-unstable, hence the NIX_PATH is wrong. Does /nix/var/nix/
  profiles/per-user/root/channels/nixos/nixpkgs/nixos exist? If not, your
  NIX_PATH is wrong.
 
  On Sat, Jun 13, 2015 at 12:54 PM, Eike e...@eknet.org wrote:
 
 
  Hello all,
 
  I just encountered a problem that I cannot figure out myself. I switched
  from the 14.12 channel to the unstable channel (in NixOS) and when doing
  nixos-rebuild build I get the following:
 
  # nix-channel --list
  nixos https://nixos.org/channels/nixpkgs-unstable
 
  # nixos-rebuild build
  building Nix...
  error: file ‘nixpkgs/nixos’ was not found in the Nix search path
 (add
  it using $NIX_PATH or -I)
  error: file ‘nixpkgs/nixos’ was not found in the Nix search path
 (add
  it using $NIX_PATH or -I)
  error: file ‘nixpkgs’ was not found in the Nix search path (add it
  using $NIX_PATH or -I)
  /tmp/nixos-rebuild.lH7Hoj/nix
  building the system configuration...
  error: file ‘nixpkgs/nixos’ was not found in the Nix search path
 (add
  it using $NIX_PATH or -I)
 
  My nix env is this:
 
  # env |grep -i ^nix
  NIX_PROFILES=/run/current-system/sw /nix/var/nix/profiles/default
  /root/.nix-profile
  NIX_CONF_DIR=/etc/nix
 
 
 NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixpkgs=/etc/nixos/nixpkgs:nixos-config=/etc/nixos/configuration.nix
  NIX_OTHER_STORES=/run/nix/remote-stores/*/nix
  NIXPKGS_CONFIG=/etc/nix/nixpkgs-config.nix
  NIX_USER_PROFILE_DIR=/nix/var/nix/profiles/per-user/root
 
  I can see that the 'nixpkgs=/etc/nixos/nixpkgs' part in NIX_PATH points
  to a non-existing thing. But it always did so and the command works in
  the same env if the 14.12 channel is active.
 
  I always wondered about why is nixpkgs pointing to a non-existing thing?
 
  And why is the unstable channel not building for me?
 
  Thank you and kind regards
  Eike
  ___
  nix-dev mailing list
  nix-dev@lists.science.uu.nl
  http://lists.science.uu.nl/mailman/listinfo/nix-dev
 

 --
 gpg: AD7AC35E
 finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E


--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Understanding NIX_PATH

2015-06-13 Thread Eike

oh how embarrassing. I didn't see this although looking at it for sooo
long.

One thing I don't understand: what does 'nixpkgs=/etc/nixos/nixpkgs'
mean in NIX_PATH? It doesn't exist on my system, so I gues it is
referring to something…?

thank you very much!
Eike

Luca Bruno lethalma...@gmail.com writes:

 I think because you are using the nixpkgs-unstable instead of
 nixos-unstable, hence the NIX_PATH is wrong. Does /nix/var/nix/
 profiles/per-user/root/channels/nixos/nixpkgs/nixos exist? If not, your
 NIX_PATH is wrong.

 On Sat, Jun 13, 2015 at 12:54 PM, Eike e...@eknet.org wrote:


 Hello all,

 I just encountered a problem that I cannot figure out myself. I switched
 from the 14.12 channel to the unstable channel (in NixOS) and when doing
 nixos-rebuild build I get the following:

 # nix-channel --list
 nixos https://nixos.org/channels/nixpkgs-unstable

 # nixos-rebuild build
 building Nix...
 error: file ‘nixpkgs/nixos’ was not found in the Nix search path (add
 it using $NIX_PATH or -I)
 error: file ‘nixpkgs/nixos’ was not found in the Nix search path (add
 it using $NIX_PATH or -I)
 error: file ‘nixpkgs’ was not found in the Nix search path (add it
 using $NIX_PATH or -I)
 /tmp/nixos-rebuild.lH7Hoj/nix
 building the system configuration...
 error: file ‘nixpkgs/nixos’ was not found in the Nix search path (add
 it using $NIX_PATH or -I)

 My nix env is this:

 # env |grep -i ^nix
 NIX_PROFILES=/run/current-system/sw /nix/var/nix/profiles/default
 /root/.nix-profile
 NIX_CONF_DIR=/etc/nix

 NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixpkgs=/etc/nixos/nixpkgs:nixos-config=/etc/nixos/configuration.nix
 NIX_OTHER_STORES=/run/nix/remote-stores/*/nix
 NIXPKGS_CONFIG=/etc/nix/nixpkgs-config.nix
 NIX_USER_PROFILE_DIR=/nix/var/nix/profiles/per-user/root

 I can see that the 'nixpkgs=/etc/nixos/nixpkgs' part in NIX_PATH points
 to a non-existing thing. But it always did so and the command works in
 the same env if the 14.12 channel is active.

 I always wondered about why is nixpkgs pointing to a non-existing thing?

 And why is the unstable channel not building for me?

 Thank you and kind regards
 Eike
 ___
 nix-dev mailing list
 nix-dev@lists.science.uu.nl
 http://lists.science.uu.nl/mailman/listinfo/nix-dev


--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Understanding NIX_PATH

2015-06-13 Thread Eike

Hello all,

I just encountered a problem that I cannot figure out myself. I switched
from the 14.12 channel to the unstable channel (in NixOS) and when doing
nixos-rebuild build I get the following:

# nix-channel --list
nixos https://nixos.org/channels/nixpkgs-unstable

# nixos-rebuild build
building Nix...
error: file ‘nixpkgs/nixos’ was not found in the Nix search path (add it 
using $NIX_PATH or -I)
error: file ‘nixpkgs/nixos’ was not found in the Nix search path (add it 
using $NIX_PATH or -I)
error: file ‘nixpkgs’ was not found in the Nix search path (add it using 
$NIX_PATH or -I)
/tmp/nixos-rebuild.lH7Hoj/nix
building the system configuration...
error: file ‘nixpkgs/nixos’ was not found in the Nix search path (add it 
using $NIX_PATH or -I)

My nix env is this:

# env |grep -i ^nix
NIX_PROFILES=/run/current-system/sw /nix/var/nix/profiles/default 
/root/.nix-profile
NIX_CONF_DIR=/etc/nix

NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixpkgs=/etc/nixos/nixpkgs:nixos-config=/etc/nixos/configuration.nix
NIX_OTHER_STORES=/run/nix/remote-stores/*/nix
NIXPKGS_CONFIG=/etc/nix/nixpkgs-config.nix
NIX_USER_PROFILE_DIR=/nix/var/nix/profiles/per-user/root

I can see that the 'nixpkgs=/etc/nixos/nixpkgs' part in NIX_PATH points
to a non-existing thing. But it always did so and the command works in
the same env if the 14.12 channel is active.

I always wondered about why is nixpkgs pointing to a non-existing thing?

And why is the unstable channel not building for me?

Thank you and kind regards
Eike
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] sbcl image executables and patch-elf

2015-05-12 Thread Eike

Hi Tomas,

thank you for the explanation. I'm not familiar at all with the C world
as you just saw.

Regards
Eike

Tomas Hlavaty tomas.hlav...@knowledgetools.de writes:

 Hi Eike,

 I just found out that this is the strip utility from binutils and I'm
 wondering how it can do such a harm…

 strip does what it is supposed to do.  In the usual C world, executables
 can contain lots of other information, e.g. debugging symbols etc.
 strip removes this additional information while it is not usually needed
 on production systems and take significant amount of space.

 However, you tried to create a self-contained sbcl executable
 application in one executable file.  This means that the lisp image
 (usually a separate file) is concatenated to the executable file.  If
 you run strip on this executable, it will remove the lisp image,
 breaking the application.

 Cheers,

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


[Nix-dev] sbcl image executables and patch-elf

2015-05-11 Thread Eike

Hi there,

I'm making a program in common lisp using sbcl. I then create a
executable image which results in quite a big file since the whole lisp
is packaged up. When I use nix to build this app, the file that ends up
in nix-store is tiny and not working. It seems to me that the patch-elf
process is stripping things off, but that's just a guess.

Here is a mini example. Install sbcl and do this

$ echo '(defun main () (format t Hello World!~%))'  hello.lisp
$ sbcl --load hello.lisp --eval '(sb-ext:save-lisp-and-die hello :toplevel 
(lambda() (main) 0) :executable t)'

then there is a 'hello' executable with about 50mb. Running it prints
the message to stdout.

The same process in a 'hello/default.nix' like this:

{ pkgs ? import nixpkgs {} }:
pkgs.stdenv.mkDerivation {
  name = hello-0.0.1;
  src = ./.;
  buildPhase = ''
echo '(defun main () (format t Hello World!~%))'  hello.lisp
${pkgs.sbcl}/bin/sbcl --load hello.lisp --eval 
'(sb-ext:save-lisp-and-die hello :toplevel (lambda() (main) 0) :executable t)'
ls -lha *
  '';
  installPhase = ''
mkdir -p $out/bin
cp hello $out/bin
  '';
}

Building it with 'nix-build hello' produces this:

these derivations will be built:
  /nix/store/7f6dp34myppgf3r0nfkdcxkinwp81g16-hello-0.0.1.drv
building path(s) ‘/nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1’
building /nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1
unpacking sources
unpacking source archive /nix/store/dxk9zf3zd78j63g8ysbfsnmwwsf1gb02-hello
source root is hello
patching sources
configuring
no configure script, doing nothing
building
This is SBCL 1.2.5.nixos, an implementation of ANSI Common Lisp.
More information about SBCL is available at http://www.sbcl.org/.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
[undoing binding stack and other enclosing state... done]
[saving current Lisp image into hello:
writing 5680 bytes from the read-only space at 0x2000
writing 3120 bytes from the static space at 0x2010
writing 50462720 bytes from the dynamic space at 0x10
done]
-rw-r--r-- 1 nixbld1 nixbld 410 May 11 08:11 default.nix
-rwxr-xr-x 1 nixbld1 nixbld 49M May 11 08:11 hello
-rw-r--r-- 1 nixbld1 nixbld  44 May 11 08:11 hello.lisp
installing
post-installation fixup
patching ELF executables and libraries in 
/nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1
/nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1/bin/hello
gzipping man pages in 
/nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1
stripping (with flags -S) in 
/nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1/bin
patching script interpreter paths in 
/nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1
/nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1

The hello executable was 49M after building it. But the one in nix-store
is this:

l -lha result/bin   

~
insgesamt 272K
dr-xr-xr-x 2 root nixbld 4,0K  1. Jan 1970  .
dr-xr-xr-x 3 root nixbld 4,0K  1. Jan 1970  ..
-r-xr-xr-x 6 root root   262K  1. Jan 1970  hello

What' wrong here?

Thanks in advance!
Eike
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] sbcl image executables corrupted

2015-05-11 Thread Eike

I just tried putting the executable file inside a different directory
than 'bin' and this is working. It is not stripped/whatever -- only when
installed in the bin/ directory. Sorry about the confusion with
patchelf, I shouldn't put a wild guess in the title. It probably hasn't
anything to do with this problem. But I find these to lines in the
output of nix-build suspicious:

patching ELF executables and libraries in 
/nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1
stripping (with flags -S) in 
/nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1/bin

and one of it starts with patching ELF I don't know what's going
on here. Any hints are much appreciated.

Thanks and regards
Eike

Eike e...@eknet.org writes:

 Hi there,

 I'm making a program in common lisp using sbcl. I then create a
 executable image which results in quite a big file since the whole lisp
 is packaged up. When I use nix to build this app, the file that ends up
 in nix-store is tiny and not working. It seems to me that the patch-elf
 process is stripping things off, but that's just a guess.

 Here is a mini example. Install sbcl and do this

 $ echo '(defun main () (format t Hello World!~%))'  hello.lisp
 $ sbcl --load hello.lisp --eval '(sb-ext:save-lisp-and-die hello :toplevel 
 (lambda() (main) 0) :executable t)'

 then there is a 'hello' executable with about 50mb. Running it prints
 the message to stdout.

 The same process in a 'hello/default.nix' like this:

 { pkgs ? import nixpkgs {} }:
 pkgs.stdenv.mkDerivation {
   name = hello-0.0.1;
   src = ./.;
   buildPhase = ''
 echo '(defun main () (format t Hello World!~%))'  hello.lisp
 ${pkgs.sbcl}/bin/sbcl --load hello.lisp --eval 
 '(sb-ext:save-lisp-and-die hello :toplevel (lambda() (main) 0) :executable 
 t)'
 ls -lha *
   '';
   installPhase = ''
 mkdir -p $out/bin
 cp hello $out/bin
   '';
 }

 Building it with 'nix-build hello' produces this:

 these derivations will be built:
   /nix/store/7f6dp34myppgf3r0nfkdcxkinwp81g16-hello-0.0.1.drv
 building path(s) ‘/nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1’
 building /nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1
 unpacking sources
 unpacking source archive /nix/store/dxk9zf3zd78j63g8ysbfsnmwwsf1gb02-hello
 source root is hello
 patching sources
 configuring
 no configure script, doing nothing
 building
 This is SBCL 1.2.5.nixos, an implementation of ANSI Common Lisp.
 More information about SBCL is available at http://www.sbcl.org/.

 SBCL is free software, provided as is, with absolutely no warranty.
 It is mostly in the public domain; some portions are provided under
 BSD-style licenses.  See the CREDITS and COPYING files in the
 distribution for more information.
 [undoing binding stack and other enclosing state... done]
 [saving current Lisp image into hello:
 writing 5680 bytes from the read-only space at 0x2000
 writing 3120 bytes from the static space at 0x2010
 writing 50462720 bytes from the dynamic space at 0x10
 done]
 -rw-r--r-- 1 nixbld1 nixbld 410 May 11 08:11 default.nix
 -rwxr-xr-x 1 nixbld1 nixbld 49M May 11 08:11 hello
 -rw-r--r-- 1 nixbld1 nixbld  44 May 11 08:11 hello.lisp
 installing
 post-installation fixup
 patching ELF executables and libraries in 
 /nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1
 /nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1/bin/hello
 gzipping man pages in 
 /nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1
 stripping (with flags -S) in 
 /nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1/bin
 patching script interpreter paths in 
 /nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1
 /nix/store/2rhdmlbiklrrsh660ix0db415xyi46wn-hello-0.0.1

 The hello executable was 49M after building it. But the one in nix-store
 is this:

 l -lha result/bin 
   
 ~
 insgesamt 272K
 dr-xr-xr-x 2 root nixbld 4,0K  1. Jan 1970  .
 dr-xr-xr-x 3 root nixbld 4,0K  1. Jan 1970  ..
 -r-xr-xr-x 6 root root   262K  1. Jan 1970  hello

 What' wrong here?

 Thanks in advance!
 Eike
 ___
 nix-dev mailing list
 nix-dev@lists.science.uu.nl
 http://lists.science.uu.nl/mailman/listinfo/nix-dev

--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] sbcl image executables and patch-elf

2015-05-11 Thread Eike

Hi Thomas,

thanks for your reply; somehow I missed your response as yet. I just
found out that this is the strip utility from binutils and I'm wondering
how it can do such a harm…

Thanks again
Eike

Tomas Hlavaty tomas.hlav...@knowledgetools.de writes:

 Hi Eike,

 I'm making a program in common lisp using sbcl. I then create a
 executable image which results in quite a big file since the whole
 lisp is packaged up. When I use nix to build this app, the file that
 ends up in nix-store is tiny and not working. It seems to me that the
 patch-elf process is stripping things off, but that's just a guess.

 try:

dontStrip = true;

 in your build expression.

 Cheers,

 Tomas

--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] How to develop with chicken and emacs

2015-04-21 Thread Eike

Ertugrul Söylemez ert...@gmx.de writes:

 The way I do this is to fire up a Makefile from Emacs.  The Makefile
 uses nix-shell to start the actual builder:

 nix-shell --pure --command ./Setup build

 This is an indirection, but it makes sure that the environment the
 builder sees is (fairly close to) the environment the build script
 would see when you use nix-build.  And indeed, you can actually use
 nix-build as well, although you probably don't want to, because it
 rebuilds the whole thing all the time.

 That's a good tip! I will start with this. But it still wouldn't allow
 me to use the interactive features of emacs, if I understand
 correctly?  It would be great to evaluate expressions inside emacs
 without building the whole app.

 Well, you can invoke nix-shell instead of the regular shell from within
 Emacs.  Getting an inferior mode or any other tighter integration to
 work, if there is one, could be more difficult.  One thing you can do is
 to make Emacs part of a project-specific development environment using
 myEnvFun.  The wiki should help you with this.  Alternatively many
 integration modes allow you to specify the command used for invoking the
 helper programs.

You're right, an email from Moritz Ulrich taught me about the same thing
(setting 'scheme-program-name'). That is quite obvious, sometimes it
seems I can't think to the next step.

Thanks again!

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


Re: [Nix-dev] How to develop with chicken and emacs

2015-04-19 Thread Eike

Hi Ertugrul,

thank you very much for your reply.

Ertugrul Söylemez ert...@gmx.de writes:

 My experience with Chicken is limited, but what you are describing
 sounds about right.  It is indeed the way we develop software with the
 help of Nix.  In Haskell land cabal2nix generates both an expression for
 your project and a (separate) expression that drops you into a shell
 with all the dependencies in scope.

The longer I think about the nix-shell approach, the better I like it. I
can now distribute the complete development environment along with the
source code. That's really great!

 But the real problem is, that my emacs doesn't know about this
 environment. I don't know how to handle this (besides starting a new
 emacs from the nix-shell shell, which I don't want).

 The way I do this is to fire up a Makefile from Emacs.  The Makefile
 uses nix-shell to start the actual builder:

 nix-shell --pure --command ./Setup build

 This is an indirection, but it makes sure that the environment the
 builder sees is (fairly close to) the environment the build script would
 see when you use nix-build.  And indeed, you can actually use nix-build
 as well, although you probably don't want to, because it rebuilds the
 whole thing all the time.

That's a good tip! I will start with this. But it still wouldn't allow
me to use the interactive features of emacs, if I understand correctly?
It would be great to evaluate expressions inside emacs without building
the whole app.

 I hope this helps.

It did, thank you.

Regards
Eike

--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] How to develop with chicken and emacs

2015-04-18 Thread Eike

Hi,

I'm about to learn scheme and installed chicken for this. I'm now trying
to install some chicken eggs. The command `chicken-install` does not
work out of the box, since it tries to install the packages into the nix
store.

I found out about the egg2nix program and saw, that the
'chicken-eggs.nix' file contains many eggs and that the egg2nix program
uses it. So, right now I'm starting a shell like this

nix-shell -p egg2nix

This drops me in a shell, where the eggs are setup via
CHICKEN_REPOSITORY_EXTRA and CHICKEN_INCLUDE_PATH. That's a step
forward, but it still feels strange. Maybe just because I'm not used to
it… Is this a recommended way for developing? (I probably should create
my own nix file to make this env I guess)

But the real problem is, that my emacs doesn't know about this
environment. I don't know how to handle this (besides starting a
new emacs from the nix-shell shell, which I don't want).

Can someone share the setup he or she is using with chicken and nixos or
give me some hints/links to this?

Thanks and regards
Eike

--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] spamassassin module

2015-02-17 Thread Eike

Hello,

I'm trying to add spamassassin to my email setup. So I added this to my
configuration.nix:

services.spamassassin = {
  enable = true;
  debug = true;
};

I then tried with `systemctl start spamd' which failed, because of
missing configs (I should admit now, that I'm very new to
spamassassin). The error message suggests to run `sa-update', so I did
with this result:

Timeout::_run: check: no loaded plugin implements 'check_main': cannot scan!
Check the necessary '.pre' files are in the config directory.

Some searches later, I found out that there are missing config files in
/etc/spamassassin (the instructions in spamassassin/default.nix specify
this as CONFDIR). I then copied all files from
${pkgs.spamassassin}/share/spamassassin/* to /etc/spamassassin to make
the sa-update command work. After that spamd started.

Would it make sense to symlink those files from the spamassassin module?
Or did I miss something and should go back and read spamassassins
manual(s) first?

Thanks and regards,
Eike

--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Make Firefox/Chrome use OpenJDK instead of Oracle JDK?

2015-02-15 Thread Eike

Hello Chad,


Chad Joan writes:

 In my first attempt, I tried to follow the wiki advice, including the jre
 = true suggestion, but with ignoring the suggestion to download Oracle JDK
 in advance.  Predictably, when I ran nixos-rebuild switch, it failed and
 complained about needing Oracle JDK to be manually downloaded.

I think you can use icedtea = true instead of jre. This uses icedtea
variant of openjdk.

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


Re: [Nix-dev] exclude $out/lib when building system-path

2015-01-29 Thread Eike

Luca Bruno writes:

 On 29/01/2015 15:32, Eike wrote:
 Hi all,

 I'm building a (java) program that produces a $out/lib folder with some
 things in it. But it is not a linux program, just using a similiar
 directory structure. Thus I don't want it to be linked into the
 environment. Is there an option to prevent nix from doing so?

 I've looked at nixos/modules/config/system-path.nix and found the option
 `pathsToLink' which seem responsible for this -- but I can't figure out
 to go on. I'd like to exclude just the one derivation from linking.

 Thanks and regards
 First of all, linking /lib to the system env shouldn't be a problem,
 because projects aren't going to use that.
 Second, I'm planning to remove /lib from being linked. But needs some
 testing and probably several fixes to nixos modules that assume /lib
 being linked.

Thanks for your reply. I know that's not really a problem (the contents
in the lib directory are quite unusable to other programs). I have
similiar such packages that all have this lib directory and nix
complains about link collisions if I want to install many of them. But
these are ignored, it's only a convenience thing… I was just wondering
that I might missed an option or something.

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


[Nix-dev] exclude $out/lib when building system-path

2015-01-29 Thread Eike

Hi all,

I'm building a (java) program that produces a $out/lib folder with some
things in it. But it is not a linux program, just using a similiar
directory structure. Thus I don't want it to be linked into the
environment. Is there an option to prevent nix from doing so?

I've looked at nixos/modules/config/system-path.nix and found the option
`pathsToLink' which seem responsible for this -- but I can't figure out
to go on. I'd like to exclude just the one derivation from linking.

Thanks and regards
Eike

--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Managing private Nix packages outside the Nixpkgs tree

2015-01-17 Thread Eike

Hello Matthias,

I wanted to manage my private packages as well and I got most
inspiration from aszlig's vuizvui (thank you!). I can show what I'm
doing to achieve this, but I'm new to nixos myself, so take this with a
good grain of salt.

AFAICS, its enough to specify your own definitions in
`nixpkgs.packageOverrides'. This takes the original package collection
and returns a map with new/overriden packages. I have this setup:

common.nix (imported in all machine configs):
nixpkgs = {
  config = {
allowUnfree = true;
packageOverrides = import ./pkgs;
  };
};

then ./pkgs/default.nix looks like this:
pkgs:
let
  callPackage = pkgs.lib.callPackageWith(pkgs // custom);
  custom = {
cdparanoiax = callPackage ./cdparanoiax {};
...other packages...
  };
in custom

Since the callPackage function is redefined that way, you can have
dependencies between your own packages. Then each directory in pkgs is a
package definition just like it is done in nixpkgs. I can then add
`pkgs.cdparanoiax' to `environment.systemPackages'.

hth with the your first question, can't help with the second one…

Regards
Eike


Matthias Beyer writes:

 Hi nixos-ML,

 So, I tried to ask Sander van de Burg soem questions which are related
 to one blog article of him, but unfortunately my mail server bounced
 the mail back to me, telling me that his mail address is not valid.

 So, I'm posting the email here, hopefully I can get an answer on the
 topic from you guys:

 On 16-01-2015 23:52:36, Matthias Beyer wrote:
 Hi Sander,

 I have a question which could be or is related to the problem you
 solved in your blog post about managing private nix packages outside
 of the nixpkgs tree.

 My Problem is that I want to build a package out of vim_configurable
 and a set of vim plugins I specify myself and install the whole
 package as system package. So basically, it should look like this in
 my configuration.nix:

 systemPackages = [ ... myVimPackage ... ];

 I tried to follow the configuration here[0], but I'm completely lost
 and I don't understand most of it.

 I specified my vim plugin packages like aszlig did here[1], but
 returing only a set of plugin packages at the end, no vimrc (which I
 want to out-source into another package, for modularity).

 My overall setup for my configuration looks like this:

 ~/config/nixos/ # dir with _all_ nixos confs
 ./base-configuration.nix# default shell, bootloaded, etc
 ./nox.nix   # Machine nox
 ./pkgs/ # Dir, holding package lists
 ./basePackages.nix  # whereas each of these returns an
 ./desktopPackages.nix   # array or packages
 ./developPackages.nix
 ./services  # Dir, holding service definitions
 ./redshift.nix
 ./x.nix

 My `nox.nix` looks basically like this:

 { config, pkgs, ... }:

 let
   configDir = /home/m/config/nixos;
 in

 {
   imports = [
 # Base configuration
 ${configDir}/base-configuration.nix

 # Users
 ${configDir}/users/m.nix

 # Services
 ${configDir}/services/x.i3.nix
 ${configDir}/services/redshift.nix
   ];

   # Define on which hard drive you want to install Grub.
   boot.loader.grub.device = /dev/sda;

   networking.hostName = nox;

   environment.systemPackages = let
 basePkgs= import ${configDir}/pkgs/basePackages.nix pkgs;
 devPkgs = import ${configDir}/pkgs/devPackages.nix pkgs;
 desktopPkgs = import ${configDir}/pkgs/desktopPackages.nix pkgs;
   in
 basePkgs ++ devPkgs ++ desktopPkgs;

 }

 And I would like to put my vim package into basePackages.nix:


 pkgs: [
   pkgs.acpitool
   pkgs.coreutils
   pkgs.mosh
   # here goes my vim package
   # ...
 ]

 ---

 So, in your blog post[2], you described how to maintain packages
 outside of the nixos package tree, which is what I want, I guess.

 How to approach this?

 Is this even the right approach for the problem? Or am I heading
 for the wrong way?

 The second part of the question would be how to write a package which
 defines the vimrc file, as aszlig does here[3]? Is this even
 feasible?

 I hope you can help me with my problem(s) and teach me how to do
 things right!

 I'd love to say See you at FOSDEM, then, but unfortunately my exams
 are exactly around this weekend, so I can not participate! :-(
 I hope there will be a nixos spring nearby my home some time, thought.

 [0]: https://github.com/aszlig/vuizvui
 [1]: 
 https://github.com/aszlig/vuizvui/blob/3e9771d4dce455fd68c8cadcbff6ba695625c372/pkgs/vim/default.nix#L5
 [2]: 
 http://sandervanderburg.blogspot.de/2014/07/managing-private-nix-packages-outside.html
 [3]: https://github.com/aszlig/vuizvui/blob/master/pkgs/vim/default.nix#L236

 --
 Mit freundlichen Grüßen,
 Kind regards,
 Matthias Beyer

Re: [Nix-dev] Freeze on boot, bug in nouveau or related module

2015-01-13 Thread Eike

Hello Vladimír,

thanks for your reply! This is already good to know. I can't completely
stop thinking of a hardware problem… but the provider said, they've
changed ram chips and it didn't stop after that. My plan is now try
bisecting it, since there are only 68 commits in between the two states
-- and then to try the nvidia driver and see what happens.

Regards,
Eike

Vladimír Čunát writes:

 Hello,
 it's really strange, as I don't see any change in 139ead2..0667587 that
 could cause such a thing.

 Vladimir


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

--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D  E59C B412 C5F5 AD7A C35E
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Freeze on boot, bug in nouveau or related module

2015-01-12 Thread Eike

Dear all,

I have run into a problem after updating my server to the latest 14.12
release (14.12.298.0667587). I lost the server after a reboot and it
turned out that it freezed during boot while running

systemd-udevd[1382]: worker [1389] failed while handling 
'/devices/pci:00/:00:03.0/:02:00.0'

This device is the grahpic card. A few lines before, there is

BUG: unable to handle kernel paging request at c90012d93000

right after loading the fbcon module. This did not happen with
14.12.231.139ead2, although the kernel version was the same.

I use the generated hardware-configuration.nix unchanged. My first naive
guess was that a memory chip is broken, but booting the old version
always works, which makes this unlikely imho. A log excerpt is below
this mail.

Has someone seen this before? I'm not sure what caused this error. I
would think either the nouveau or only the fbcon module…?

Any thoughts on this are much welcome! I can provide more information,
if needed.


Thanks and regards
Eike


-- Reboot --
Jan 11 12:40:52 skyros systemd-journal[1365]: Runtime journal is using 8.0M 
(max allowed 300.3M, trying to leave 450.5M free of 2.9G available → current 
limit 300.3M).
Jan 11 12:40:53 skyros systemd-journal[1365]: Permanent journal is using 1.6G 
(max allowed 4.0G, trying to leave 4.0G free of 1.2T available → current limit 
4.0G).
Jan 11 12:40:53 skyros systemd-journal[1365]: Time spent on flushing to /var is 
661.705ms for 2 entries.
Jan 11 12:40:53 skyros kernel: Initializing cgroup subsys cpuset
Jan 11 12:40:53 skyros kernel: Initializing cgroup subsys cpu
Jan 11 12:40:53 skyros kernel: Initializing cgroup subsys cpuacct
Jan 11 12:40:53 skyros kernel: Linux version 3.14.27 (nixbld@localhost) (gcc 
version 4.8.3 (GCC) ) #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970
Jan 11 12:40:54 skyros kernel: Command line: 
BOOT_IMAGE=(md/0)/nix/store/w0ml58bivg2jyczpjm66rl3c7vklnbkj-linux-3.14.27/bzImage
 
systemConfig=/nix/store/gjci7k6kix4ygdgvzpvybavpazn9h4x6-nixos-14.12.298.0667587
 init=/nix/store/gjci7k6kix4ygdgvzpvybavpazn9h4x6-nixos-14.12.298.0667587/init 
loglevel=4
Jan 11 12:40:54 skyros kernel: e820: BIOS-provided physical RAM map:
Jan 11 12:40:54 skyros kernel: BIOS-e820: [mem 
0x-0x0009ebff] usable
Jan 11 12:40:54 skyros kernel: BIOS-e820: [mem 
0x0009ec00-0x0009] reserved
Jan 11 12:40:54 skyros kernel: BIOS-e820: [mem 
0x000e-0x000f] reserved
Jan 11 12:40:54 skyros kernel: BIOS-e820: [mem 
0x0010-0xbf77] usable
Jan 11 12:40:54 skyros kernel: BIOS-e820: [mem 
0xbf78-0xbf78dfff] ACPI data
Jan 11 12:40:54 skyros kernel: BIOS-e820: [mem 
0xbf78e000-0xbf7c] ACPI NVS
Jan 11 12:40:54 skyros kernel: BIOS-e820: [mem 
0xbf7d-0xbf7d] reserved
Jan 11 12:40:54 skyros kernel: BIOS-e820: [mem 
0xbf7ec000-0xbfff] reserved
Jan 11 12:40:54 skyros kernel: BIOS-e820: [mem 
0xfee0-0xfee00fff] reserved
Jan 11 12:40:54 skyros kernel: BIOS-e820: [mem 
0xffc0-0x] reserved
Jan 11 12:40:54 skyros kernel: BIOS-e820: [mem 
0x0001-0x00033fff] usable
Jan 11 12:40:54 skyros kernel: NX (Execute Disable) protection: active
Jan 11 12:40:54 skyros kernel: SMBIOS 2.5 present.
Jan 11 12:40:54 skyros kernel: DMI: MSI MS-7522/MSI X58 Pro (MS-7522)  , BIOS 
V8.14B8 11/09/2012

Jan 11 12:40:54 skyros kernel: nouveau  [ DRM] 0xC592: Parsing digital 
output script table
Jan 11 12:40:54 skyros kernel: nouveau  [ DRM] MM: using M2MF for buffer 
copies
Jan 11 12:40:54 skyros kernel: nouveau  [ DRM] Setting dpms mode 3 on TV 
encoder (output 3)
Jan 11 12:40:54 skyros kernel: nouveau :02:00.0: No connectors reported 
connected with modes
Jan 11 12:40:54 skyros kernel: [drm] Cannot find any crtc or sizes - going 
1024x768
Jan 11 12:40:54 skyros kernel: nouveau  [ DRM] allocated 1024x768 fb: 
0x9000, bo 88032a10b400
Jan 11 12:40:54 skyros kernel: fbcon: nouveaufb (fb0) is primary device
Jan 11 12:40:54 skyros kernel: BUG: unable to handle kernel paging request at 
c90012d93000
Jan 11 12:40:56 skyros kernel: IP: [a0b5379b] 
nouveau_bo_wr32+0x1b/0x30 [nouveau]
Jan 11 12:40:56 skyros kernel: PGD 33300f067 PUD 333030067 PMD 32a2f2067 PTE 0
Jan 11 12:40:56 skyros kernel: Oops: 0002 [#1] SMP
Jan 11 12:40:56 skyros kernel: Modules linked in: nouveau(+) fbcon bitblit 
softcursor font tileblit video ttm drm_kms_helper drm agpgart i2c_algo_bit 
i2c_core evdev mac_hid gpio_ich mxm_wmi coretemp crc32c_intel serio_raw 
tpm_infineon r8169 tpm_tis acpi_cpufreq mii wmi processor tpm microcode 
snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd soundcore thermal_sys button 
shpchp hwmon nf_conntrack_ftp lpc_ich nf_conntrack i7core_edac edac_core 
configs loop cpufreq_ondemand kvm_intel kvm ipv6 autofs4 ext4 crc16 jbd2 
mbcache raid1 md_mod sd_mod crc_t10dif

Re: [Nix-dev] Insert a ${} literally

2014-11-19 Thread Eike

Hi Vladimír,

Vladimír Čunát writes:

 Hi,
 you need to anti-quote the ${ occurences. That's by \ in
 quotation-mark-delimited strings and by double-apostrophe in
 double-apostrophe-delimited strings. Details are in the manual:
 http://nixos.org/nix/manual/#ssec-values

Thank you very much! I just missed this part from the manual.

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