Re: [Nix-dev] NixON initiative

2016-02-28 Thread deCube.net | Danny Wilson
How about NEON

Nix Expression Object Notation

On 28 feb. 2016, at 15:49, stewart mackenzie  wrote:

> Excellent idea, this removes quite a lot of manual steps.
> 
> Recently wrote some dirty python scripts to automate the checking and 
> replacing of sha256s, this approach would make it trivial, reducing check 
> times from about an hour and growing to mere seconds.
> 
> Though, I do have a reservation about the name. An unbubbled search for NixOS 
> almost always returns a 'did you mean Nixon?' It's infuriating. Clojure's 
> equivalent is Edn.
> 
> Might I encourage a wilder more adventures ... unambiguous name?
> 
> /sjm
> 
> ___
> 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] Installing /nix on nfs-mounted volume possible?

2016-02-09 Thread deCube.net | Danny Wilson
I’ve used a shared nix store between VMs in the past, until the sqlite database 
got corrupted…

If I’d do it again, I would configure a single build VM ( nix.buildMachines ) 
and set nix.maxJobs to 0.   That guarantees all builds are executed on this one 
machine. Any nix store copying after the build will then be a noop, since the 
store is completely shared :-)


What I did to get a bootable /nix store, was this:

https://gist.github.com/vizanto/7568026

Note the per-hostname profile directory:   
/mnt-root/nix/vm-specific/`hostname`/var/nix/profiles
This is done to have intra-vm garbage collection working, since all profiles 
are known.



 

On 9 feb. 2016, at 18:35, Ben Booth  wrote:

> 
>> On Feb 8, 2016, at 10:15 AM, Wout Mertens  wrote:
>> The problem with nfs nix stores is that the metadata is stored in sqlite, 
>> which can't guarantee proper locking on nfs. However, if you only write from 
>> one host, there is no problem.
>> 
>> As for the python stuff, you can run it in a proot, or use nixos which 
>> doesn't have /usr :-)
>> 
> Thanks for your help! I've thought of a new approach: create a NixOS VM, and 
> then export its /nix store as a read-only NFS mount. That way, if a user 
> wants to install software, they can just ssh into the NixOS VM, install it 
> there in an isolated environment, with no NFS locking issues, then that 
> software can be used on any other VM instance. Can you think of any reason 
> that would not work?
> 
> Thanks!
> Ben
> ___
> 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] New NixOS and nixpkgs for SmartOS images released

2016-02-01 Thread deCube.net | Danny Wilson
Hi list!

Today I’m excited to announce 2 new images available for running nix on SmartOS:


1) NixOS as lx-branded zone:

Running NixOS in SmartOS’ container native linux-system-call-table-emulated 
environment:  https://wiki.smartos.org/display/DOC/LX+Branded+Zones
Special thanks to Eelco for helping me at NixCon figure out the special NixOS 
(and udev) settings to make it work!

I’ve tried NixOS 16.03-unstable as well, but that version systemd is too new 
for SmartOS at the moment and doesn’t boot.

Available here:
- http://datasets.at/ui/#!/configure/22ba59c6-8c49-11e5-87e5-7fbffbc05623



2) Nix with nixpkgs-unstable git checkout, bootstrapped for SmartOS:

Version 0.2.0:

Available here:
- http://datasets.at/ui/#!/configure/a33de196-c865-11e5-aa1c-073507bee650

Most notable changes since 0.1.0:
- Nix 1.11.1 stable!
- Built with official nixpkgs repository checkout.  (no more fork!)
- Bootstrapped with this checkout to be exact: 
https://github.com/NixOS/nixpkgs/tree/2c78c7b84b45e9289e4b71abb4b36d95d58579fe



Happy to help anyone willing to try these images :-)

Thanks to the nix community for accepting my pull-requests and being awesome.

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


Re: [Nix-dev] New NixOS and nixpkgs for SmartOS images released

2016-02-01 Thread deCube.net | Danny Wilson
The required settings are in /etc/nixos/hardware-configuration.nix - not on 
github, though I probably should commit it somewhere.

All packages the https://nixos.org/channels/nixos-15.09/ channel, so... yes!


On 1 feb. 2016, at 18:03, Franz Pletz <fpl...@fnordicwalking.de> wrote:

> On Mon, 1 Feb 2016 16:18:17 +0100
> "deCube.net | Danny Wilson" <da...@decube.net> wrote:
> 
>> 1) NixOS as lx-branded zone:
>> 
>> Running NixOS in SmartOS’ container native
>> linux-system-call-table-emulated environment:
>> https://wiki.smartos.org/display/DOC/LX+Branded+Zones Special thanks
>> to Eelco for helping me at NixCon figure out the special NixOS (and
>> udev) settings to make it work!
> 
> Awesome! Much appreciated! We have a project that is using SmartOS for
> virtualization where this will come in handy! I will try to test this
> in the next few days.
> 
> Out of curiosity, does this work with the regular nixpkgs release-15.09
> branch? What configuration options did you use? Do you maybe have that
> on github somewhere or should I just look in the configuration.nix in
> the zone?
> 
> Cheers,
> Franz
> ___
> 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] Nix 1.11 released

2016-01-21 Thread deCube.net | Danny Wilson
Congrats on the release! :-)

When will nixpkgs/master be updated?
( 
https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/package-management/nix/default.nix#L91
 )

I’d like to release a new SmartOS-nixpkgs image, for the first time with 
nixpkgs from the official git repo.

Cheers,
Danny



On 20 jan. 2016, at 11:27, Eelco Dolstra  wrote:

> Hi,
> 
> On 19/01/16 14:19, Eelco Dolstra wrote:
> 
>> I'm pleased to announce the availability of a new stable release of the
>> Nix package manager.  Release 1.11 can be found at
> 
> Unfortunately 1.11 had a show-stopper bug, so there is a new release 1.11.1
> which can be found at
> 
>  http://hydra.nixos.org/release/nix/nix-1.11.1
> 
> and
> 
>  http://nixos.org/releases/nix/nix-1.11.1
> 
> -- 
> Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
> ___
> 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] Real documentation, aka "Let's kill the wiki"

2015-11-21 Thread deCube.net | Danny Wilson

On 21 nov. 2015, at 01:59, Mathnerd314  wrote:

> On Wed, Nov 18, 2015 at 7:04 AM, Hajo Möller  wrote:
> "Documentation should teach, not tell."
> As Rok said, handing somebody who is learning a new language a
> dictionary would not help them learn.

He said you can’t learn Spanish from just a dictionary.  It may help learn of 
course.


> This is wrong. You can do fine with a dictionary and a few months:
> http://www.theguardian.com/education/2012/nov/09/learn-language-in-three-months
> "When I went online in search of Lingala resources, the only textbook I could 
> find was a US Foreign Service Institute handbook printed in 1963 – when 
> central Africa was still a front of the cold war – and a scanned copy of a 
> 1,109-word Lingala-English dictionary."
> 
> The key here is that he did not have to learn everything at once; he split it 
> up into many small chunks (vocabulary, in his case) that could be focused on 
> independently.
> 
> His most obvious failing once he went to Africa was that he hadn't practiced 
> listening or making complete sentences; some extra hours with a native 
> brought it to an acceptable level.

So... not wrong after all!  A "dictionary alone" was not enough, he had to be 
taught by a native.

https://www.xkcd.com/386/   :-)



> The applicability of said anecdote to NixOS is left as an exercise for the 
> reader.
> 
> -- Mathnerd314
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev




signature.asc
Description: Message signed with OpenPGP using GPGMail
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Real documentation, aka "Let's kill the wiki"

2015-11-18 Thread deCube.net | Danny Wilson

On 18 nov. 2015, at 16:00, Augustin Borsu  wrote:

> What about having a documentation field in pkgs that allows for markdown?
> Can't get closer to the code than that.


This.
Documentation that’s seperated from code always rots.  Even when you hire 
technical writers...

Related talk from a Technical writer about how Google fixed their docs:  
https://youtu.be/EnB8GtPuauw?t=6m18s

> 
> Also generating an html doc of all the options of a package,
> their default value and maybe a comment by the author of the package
> and an example config would go a lng way.
> 
> Le 18/11/15 15:04, Hajo Möller a écrit :
>> As mentioned in another thread, Rok Garbas proposed to remove the wiki
>> and replace it with "real documentation". I fully support this.
>> 
>> To follow up on this proposal I suggest we decide what real
>> documentation should look like, so let us reiterate his main points:
>> 
>> "Why do we write documentation?"
>> Is it just to remind ourselves about details, or also for helping the
>> readers reach an advanced level of understanding? It should be the both.
>> 
>> "There needs to be a clear definition of how documentation is written."
>> We already have coding conventions, but there is no clear how-to for
>> writing good documentation. Maybe (professional) technical writers can
>> chime in here?
>> 
>> "Documentation should teach, not tell."
>> As Rok said, handing somebody who is learning a new language a
>> dictionary would not help them learn.
>> It is not possible for us to get an immediate reaction to pinpoint the
>> exact moment our documentation becomes incomprehensible, having our
>> documentation follow a well-defined pattern should help here.
>> This also means we need to hold our users' hands, leading them
>> step-by-step through complex procedures instead of directly presenting
>> results.
>> 
>> "You should never tell somebody to read the source."
>> Even though the source code should be self-explanatory (and often is,
>> see the files in nixpkgs/lib for well-commented examples), having real
>> documentation in the form of a manual helps keep everything in the same
>> place. This way there can be a single location where users come to when
>> they are lost.
>> 
>> "The manual is good, but not made for beginners."
>> Rok suggests to have tutorials teaching the basics of Nix and NixOS.
>> Although I generally agree, I am not sure where to place those tutorials
>> and what they should cover. Should they be on people's blogs, aggregated
>> in the planet.nixos.org?
>> 
>> "Let's kill the wiki, it's not documentation but an abomination."
>> Unmoderated wikis tend to contain outdated or just plain wrong
>> information, it is then arguably better to have no documentation at all
>> than a wiki teaching the wrong things. Also, developers asking (possibly
>> misunderstanding) users to fix the wiki could lead to a scenario where
>> the blind lead the blind.
>> 
>> 
> 
> ___
> 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] Let's switch the default shell in Nixpks / NixOS to csh

2015-04-01 Thread deCube.net | Danny Wilson
It shouldn’t be difficult, if only...

While adding support for SmartOS I’ve encountered many  “autoconf” packages 
that claim to be shell agnostic, yet are riddled with BASH-isms. SmartOS comes 
with KSH installed in /bin/sh by default, that’s how I noticed.

In order to make some progress and not have to patch pretty much every package, 
I ended up forcibly replacing the #!/bin/sh shebang on every script before 
buidling:  
https://github.com/vizanto/nixpkgs/commit/152344c19aa1f8839fc3360eef826d803901a2f8


Best regards,
Danny

 
On 1 apr. 2015, at 23:26, Peter Simons sim...@cryp.to wrote:

 Hi guys,
 
 the default builder in Nixpkgs (and pretty much all other shell code in all 
 our
 packages) assumes that it's interpreted by bash. Now, we've had a lot of
 trouble with bash recently:
 
 - crazy security vulnerabilities;
 
 - auto completion is slow, gives unexpected results, or doesn't work at all;
 
 - /bin/sh is not bash on many non-NixOS host systems; and
 
 - many of other problems.
 
 This makes me wonder whether maybe we should switch all shell scripting in
 Nixpkgs to csh? Wouldn't that solve a lot of problems? I've heard experts 
 say
 that csh is generally considered superior for scripting tasks because of its
 more intuitive syntax.
 
 Now, the only minor obstacle is to transition the existing package base from
 bash to csh. That wouldn't be difficult to accomplish, though. There's
 probably a bash2csh converter available somewhere that we could use.
 
 Of course, for consistency's sake we'd have to make csh the only supported
 user shell for accounts on NixOS machines too. We don't want our users messing
 with other shells. All that diversity will just make our lives harder as
 developers. These people will drive us crazy with bug reports on Github,
 complaining about how they freaky bash environment no longer works with
 nix-shell etc., and that's just going to be a maintenance nightmare. It's
 probably better to decide once and for all that Nix supports only csh and
 move on to other, more important things.
 
 Anyway, let me know that you think. Shall I prepare a pull request?
 
 Best regards,
 Peter
 
 ___
 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] patch problem

2013-11-30 Thread deCube.net | Danny Wilson
Hoi Roelof,

My guess is you didn’t read the error message. :-D

Do you know about the nix-env -K option ( —keep-failed).  It keeps the failed 
build in a folder in /tmp.
There you can see that extracting cjs-2.0.0.tar.gz creates another directory 
where all the source files are.

But your patch: 
https://github.com/roelof1967/nixpkgs/blob/master/pkgs/desktops/cinnamon/fix_configure_ac_gobject.patch#L12
  says the file is located in a Folder called “a/“ (or “b/“)

So to fix this you can change “a/  and   “b/   to   cjs-2.0.0/

Good luck x-)


PS: It’s actually very annoying Nix doesnt cd to the extracted source directory 
in the patchPhase as patch files become tied to a specific package version, but 
I guess there’s a good reason for this behaviour ...



On 30 nov. 2013, at 17:20, Roelof Wobben rwob...@hotmail.com wrote:

 Hello, 
 
 Here is my repo : https://github.com/roelof1967/nixpkgs
 
 When I try to patch cjs.nix which is in pkgs/desktops/cinnamon  the patch 
 fails 
 
 But when I patch the file on the real file it is not a problem.
 
 Can anyone explain what is the difference here ?
 So why do the patch fail on the cjs derivation.
 
 Roelof
 
 ___
 nix-dev mailing list
 nix-dev@lists.science.uu.nl
 http://lists.science.uu.nl/mailman/listinfo/nix-dev



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] nix-dev Digest, Vol 101, Issue 24

2013-11-20 Thread deCube.net | Danny Wilson
Got booting with /nix mounted through NFS working … :-)
https://gist.github.com/vizanto/7568026

Any idea/suggestions how to remount /nix without “nolock” during stage2?


 
On 18 nov. 2013, at 19:33, nix-dev-requ...@lists.science.uu.nl wrote:

 Date: Mon, 18 Nov 2013 16:01:13 +0100
 From: Eelco Dolstra eelco.dols...@logicblox.com
 Subject: Re: [Nix-dev] Mount /nix/store from NFS during Stage 1 boot
 To: nix-dev@lists.science.uu.nl
 Message-ID: 528a2bb9.2020...@logicblox.com
 Content-Type: text/plain; charset=windows-1252
 
 Hi,
 
 On 18/11/13 14:22, deCube.net | Danny Wilson wrote:
 
 I?m having 2 issues:
 1) DHCP is not queried during stage 1.
 
 BusyBox (used in the initrd) contains a DHCP client called udhcpc that might 
 be
 useful here.
 
 Googling around it looks like NFS mounting at boot was supported back in 
 2011, but this is no longer the case?
 
 It has never been supported in any real sense, but people may have gotten it 
 to
 work.
 
 -- 
 Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/

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


Re: [Nix-dev] nix-dev Digest, Vol 101, Issue 25

2013-11-19 Thread deCube.net | Danny Wilson
Turns out I need nolock, but more importantly: add “nfsv3 to 
initrd.availableKernelModules …
Nix’ full dependency management makes me expect too much :P

Is there an easy way to remount with locks enabled in stage 2?


On 19 nov. 2013, at 03:31, nix-dev-requ...@lists.science.uu.nl wrote:

 Date: Mon, 18 Nov 2013 21:44:18 +0100
 From: Rickard Nilsson rickard.nils...@telia.com
 Subject: Re: [Nix-dev] Mount /nix/store from NFS during Stage 1 boot
 To: nix-dev@lists.science.uu.nl
 Message-ID: 528a7c22.6020...@telia.com
 Content-Type: text/plain; charset=windows-1252; format=flowed
 
 On 11/18/2013 04:01 PM, Eelco Dolstra wrote:
 Hi,
 
 On 18/11/13 14:22, deCube.net | Danny Wilson wrote:
 
 I?m having 2 issues:
 1) DHCP is not queried during stage 1.
 
 BusyBox (used in the initrd) contains a DHCP client called udhcpc that might 
 be
 useful here.
 
 Googling around it looks like NFS mounting at boot was supported back in 
 2011, but this is no longer the case?
 
 It has never been supported in any real sense, but people may have gotten it 
 to
 work.
 
 Try using the nolock mount option. It works for me.
 
   / Rickard



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Mount /nix/store from NFS during Stage 1 boot

2013-11-18 Thread deCube.net | Danny Wilson
Hi list,

I have another challenge for you :-)

I’m trying to get /nix/store mounted during boot from an NFS server. I 
completed nixos-install successfully on this NFS mount.


I’m having 2 issues:
1) DHCP is not queried during stage 1.
   - worked around this for now by booting into recovery shell and assigning 
static ip

2) mount -vvv -t nfs  with any combination of options gives me immediately: 
“Protocol not supported”


Googling around it looks like NFS mounting at boot was supported back in 2011, 
but this is no longer the case?


Cheers


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] ZFS root boot

2013-11-09 Thread deCube.net | Danny Wilson
No newlines needed :D

[root@nixos:~]# uname -a
Linux elon 3.4.67 #1-NixOS SMP Thu Oct 24 13:12:48 UTC 2013 x86_64 GNU/Linux


Summarized everything here for future reference: 
https://gist.github.com/vizanto/7374277

Hopefully that will save someone a day of pain :-/

Thanks!


On 8 nov. 2013, at 17:36, Ricardo M. Correia rcorr...@wizy.org wrote:

 I'm not sure, but you might have to use this syntax instead:
 
 boot.initrd.postDeviceCommands =
   ''
 zpool import -f -a -d /dev/cciss
   '';
 
 ... because of newlines. Notice that I'm not using double quotes, I'm using 2 
 single quotes.
 
 
 On Fri, Nov 8, 2013 at 5:18 PM, Ricardo M. Correia rcorr...@wizy.org wrote:
 I think the problem may be that NixOS is only importing pools in the /dev 
 directory, and not /dev/cciss... see modules/tasks/filesystems/zfs.nix:
 
  51 boot.initrd = mkIf inInitrd {
  52   kernelModules = [ spl zfs ] ;
 (...)
  61   postDeviceCommands =
  62 ''
  63   zpool import -f -a -d /dev
  64 '';
  65 };
 
 Can you add the option:
 
 boot.initrd.postDeviceCommands = zpool import -f -a -d /dev/cciss; 
 
 ... to your configuration.nix and see if it works?
 
 
 On Fri, Nov 8, 2013 at 5:01 PM, deCube.net | Danny Wilson da...@decube.net 
 wrote:
 I found something, after adding boot.shell_on_fail:
 https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/filesystems/zfs.nix#L63
 
 this imports nothing for me.
 
 If I run in the shell…
 # zpool import -f -a -d /dev/cciss
 
 then my rpool is imported! and I can finally boot :D
 
 How to fix this permanently?
 
 On 8 nov. 2013, at 16:50, deCube.net | Danny Wilson da...@decube.net wrote:
 
  Still no luck.
 
   NixOS Stage 1 
 
  loading module spl
  loading module zfs
  loading module dm_mod
  running udev…
  starting device mapper and LVM…
   No volume groups found
  mounting rpool/ROOT/nixos on /…
  mount: mounting rpool on /mnt-root/ failed: No such file or directory
 
 
  I’ve also tried using  device = rpool”;  like you have.
 
  Do I have to recreate the pool with nixos on rpool instead of 
  rpool/ROOT/nixos ?! :-(
 
 
 



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev