Re: [Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-06 Thread nixos

No I don't have `system.copySystemConfiguration=true` set :-(
Luckily I documented my recent efforts in some gists.
I managed to install NixOS on ZFS here: 
https://gist.github.com/awesomefireduck/c763e168a62a0ef559a1fb9473261459
And my (yet untested) attempt at PCI passthrough here: 
https://gist.github.com/awesomefireduck/1be07805081a4d7a51c527e452b87b26

There is still some missing, but nothing I can't handle, I guess.
This is a great time to enable my ZFS snapshots... :-/

Does anyone know why `system.copySystemConfiguration` is set to false 
by default? It seems like it would be better to default this to true, 
right?
Or at least have this listed in the generated config? 
(`nixos-generate-config`)


Anyway, I'll be okay, thanks folks!!

Sincerely,
Vince
 
On Thursday, April 6, 2017 4:58 PM, Sergiu Ivanov <siva...@colimite.fr> 
wrote:

 

Hi Vince,

Thus quoth  ni...@vince.lol  at 14:12 on Thu, Apr 06 2017:
I acidentally removed my /etc/nixos/configuration.nix is there any 
way

I can get it back?

Citing directly from:

 
http://stackoverflow.com/questions/28603773/recover-accidentally-deleted-configuration-nix-file

 '''
 system.copySystemConfiguration

 If enabled, copies the NixOS configuration file $NIXOS_CONFIG 
(usually

 /etc/nixos/configuration.nix) to the system store path.

 Type:"boolean"

 Default:false

 Declared by: 
 

 '''

Do you happen to have this option set to true?
/me goes and sets it to true on his system

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


[Nix-dev] [Help] Accidentally removed configuration.nix

2017-04-06 Thread nixos

Hi all,

I acidentally removed my /etc/nixos/configuration.nix is there any way 
I can get it back?


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


[Nix-dev] Help wanted with Nixos on ZFS in an encrypted LUKS volume

2017-04-03 Thread nixos

Hi fellow Nix enthusiasts,

I'm trying to install Nixos on a ZFS root filesystem which in turn 
resides in an encrypted volume (using LUKS).
I already succeeded in a minimal ZFS install on an unencrypted 
partition, and I also succeeded in installing in an encrypted LUKS 
volume with ext4 as root fs.
But with the combination I get errors during stage 1; the zpool that 
contains the root dataset cannot be imported. This occurs after I enter 
the correct LUKS passphrase.
This made me question if this is at all possible (it should, shouldn't 
it?). Could some of you please take a look? I documented most of it in 
the gist here: 
https://gist.github.com/awesomefireduck/ffea6517042af87b8b7ef6ea1c7d50e3 
. If you need more information I'd be happy to supply it.


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


[Nix-dev] Using bundlerEnv to create a rails development environment

2015-04-06 Thread ml+nixos
Hello,

I am trying to use bundlerEnv to create a development environment I'll
use with nix-shell in the context of a rails application.

When I am launching nix-shell, I would like the following to happen:

- having all the needed gems my application depend on installed
- start any dependent services (databases for example) until the shell
  is gone

Currently I have the following `default.nix` in my test dev folder:

---
with (import nixpkgs {});

let
   project_name = myproject;
   ruby = pkgs.ruby_2_2_0;

   env = bundlerEnv {
  name = project_name;

  inherit ruby;
  gemfile = ./Gemfile;
  lockfile = ./Gemfile.lock;
  gemset = ./gemset.nix;
   };
in

stdenv.mkDerivation {
   name = project_name;
   src = null;
   buildInputs = [ env postgresql ];

   shellHook = ''
  set -e;
  export PGDATA=/var/dev-srv/pg-${project_name}
  export PATH=${env}/bin:$PATH
  export GEM_HOME=${env}/lib

  if [ ! -d $PGDATA ]; then
 initdb
  fi

  if [ $autostart-postgres ]; then
 pg_ctl -D $PGDATA -l ~/code/myproject/log/pg.log start
 trap 'pg_ctl -D $PGDATA stop' EXIT
  fi
   '';
}
---

Which is basically a tentative to smach together multiple stuff I found
for other development environment and bundlerEnv.

This start and stop the postgresql database when I go in nix-shell, but
it does not load all the gems correctly (they are installed, but not all
available to ruby). This is what happen when i call rake in the
nix-shell:

---
Could not find i18n-0.7.0 in any of the sources
Run `bundle install` to install missing gems.
---

Note that I am a total noob when it come to Nix currently, so it does
not surprise me that this is not working!

Can somebody help me on this?

Best regards,

-- 
Mayeu a.k.a Matthieu
http://6x9.fr
GPG: A016 F2D8 0472 1186 1B33  A419 22B1 0496 B00D A693


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


[Nix-dev] topgit: make usage of $PAGER more POSIX-compatible

2014-09-09 Thread nixos
topgit: make usage of $PAGER more POSIX-compatible
---

diff --git \
a/pkgs/applications/version-management/git-and-tools/topgit/default.nix \
b/pkgs/applications/version-management/git-and-tools/topgit/default.nix
index 195f6f3..adeeae9 100644
--- a/pkgs/applications/version-management/git-and-tools/topgit/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/topgit/default.nix
@@ -8,6 +8,10 @@ stdenv.mkDerivation rec {
 sha256 = 1z9x42a0cmn8n2n961qcfl522nd6j9a3dpx1jbqfp24ddrk5zd94;
   };
 
+  # thanks to MarcWeber, Lethalman, and tv:
+  #   https://github.com/greenrd/topgit/issues/36
+  patches = [ ./pager-bug.patch ];
+
   configurePhase = makeFlags=prefix=$out;
 
   postInstall = ''
diff --git \
a/pkgs/applications/version-management/git-and-tools/topgit/pager-bug.patch \
b/pkgs/applications/version-management/git-and-tools/topgit/pager-bug.patch
new file mode 100644
index 000..0345762
--- /dev/null
+++ b/pkgs/applications/version-management/git-and-tools/topgit/pager-bug.patch
@@ -0,0 +1,12 @@
+diff -Naur a/tg.sh b/tg.sh
+--- a/tg.sh2013-03-09 22:04:06.0 +0900
 b/tg.sh2014-09-09 11:02:09.118639436 +0900
+@@ -413,7 +413,7 @@
+   pager_fifo=${tg_tmp_dir:-${HOME}}/.tg-pager
+   mkfifo -m 600 $pager_fifo
+ 
+-  $TG_PAGER  $pager_fifo 
++  eval $TG_PAGER  $pager_fifo 
+   exec  $pager_fifo# dup2(pager_fifo.in, 1)
+ 
+   # this is needed so e.g. `git diff` will still colorize it's output if


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


Re: [Nix-dev] run-time dependency missing in cabal-install

2012-11-09 Thread nixos cabal dummy
 Need the 'dummies' fix to same problem:
cabal install  (and other cabal commands) says that 
 ar is missing on a fresh nix install.
 
... 
 P.S. geekosaur says this is a ghc problem, not a cabal-install???
Need 'dummies' fix, nevertheless
, 
Also using
 
 cabal-install-0.14.0 
 
 ghc-7.4.1-wrapper 
 
 on i686
 




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