Re: [Nix-dev] virutalbox ova - screen settings reset on every restart

2017-07-02 Thread Linus Heckemann
On 02/07/17 11:42, Stephan Sahm wrote:
> Dear NixOS followers,
> 
> I tried to use the nixOS virtualbox
> from 
> https://d3g5gsiof5omrk.cloudfront.net/nixos/17.03/nixos-17.03.1449.2e983f14f6/nixos-17.03.1449.2e983f14f6-x86_64-linux.ova
> 
> 
> It starts correctly, however, if I try to adapt the display scaling or
> resolution to adapt for my 4k screen, the setting is lost on a restart.
> (As KDE tells me to restart for the settings to become active, I never
> actually see a rescaled KDE, but everything is very tiny).
> 
> So the question how to make these display settings be preserved upon
> restart.
> (I successfully isntalled git and okular and cloned some repositories
> and stuff - everything is preserved as it should, only the display
> settings seem to get lost sofar)
> 
> Any help is highly appreciated!,
> best,
> Stephan

Setting X up to inform Plasma of the right resolution might help ­— try
adding

services.xserver.monitorSection = ''
  DisplaySize width height
'';

to your config, where width and height are the real-world dimensions of
the screen (assuming you're running the VM full-screen) in millimetres.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Are mailing lists any good for managing patches? (was: okteta fix build)

2017-06-27 Thread Linus Heckemann
On 27/06/17 19:01, Alexandre Peyroux wrote:
> Certainly but on big projects that have many developers and a lot of PR,
> it loses its charm.

I respectfully disagree. Linux has received contributions from 642 (I
think that qualifies as "many") developers in 2017 alone using this
model. Sure, it's not shiny and Web 2.0 like GitHub, but it works. And
from a maintainer's point of view (this is versus merging in patches
which have been pushed to another host than github):

 - I can view the patches without importing them or working out how to
navigate git web interface xyz (if there is a web interface).

 - I can import the patches directly into my repo. No trying to find the
clone URL on a web interface (if the contributor hasn't sent me the
clone URL itself).

 - I can comment on specific parts of the patches inline without having
to copy and paste fragments into an email, without signing up for an
account on the git host (if that's even possible) and commenting there
(again, if that's even possible).

Of course, these are all possible on github. But it's a proprietary and
centralised service. With the email process, I can do all of this
offline and using only free software.

Overall, this process has the advantage of minimising network
communication and variation in the process for performing the various
tasks that might be necessary.

Hoping but not expecting to have convinced you ;)

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


Re: [Nix-dev] okteta fix build

2017-06-27 Thread Linus Heckemann
On 27/06/17 17:01, Joachim Schiele wrote:
> aszlig pointed out that we have a pointer in the manual to send patches
> to the ML if the user in question does not like github which is a valid
> workflow for me.
> 
> BUT we are stagnating in PRs are the moment (390 open PRs) and having a
> patch per email is overkill. maybe a PR from a different git source
> instead? i would rather like a git based workflow than having to align
> the single files into a commit.

FWIW this *is* a git-based workflow, git comes with the ability to
format patches for emails and import such patches (and was designed with
this in mind for use in the development of linux) — see man
git-format-patch and git-am. I personally think it's fine receiving
patches like this — if volume increases maybe there should be another
list specifically for patches, but at current levels IMHO it's no problem.

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


Re: [Nix-dev] 5 somewhat related questions

2017-06-25 Thread Linus
On 24 June 2017 20:07:27 BST, Matt McHenry  wrote:
>The only major downside of this approach is that I have to always
>remember to give '-I nixpkgs=...' arguments to all the usual nix
>commands.  But that's become pretty second nature to me by now.  :)

You could also set NIX_PATH in one of various locations to avoid having to 
specify it on every invocation.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] How to downgrade or patch freetype-2.7 ?

2017-06-24 Thread Linus Heckemann
On 24/06/17 01:52, Volth wrote:
> There are still at least one place where
> "environment.sessionVariables.LD_LIBRARY_PATH = ..." does not replace
> freetype with a custom-built version: in cgi-scripts run under
> lighttpd service:
> 
> RRD rendered with stock freetype-2.7.1 http://i.imgur.com/HVZ5iPa.png
> RRD rendered with freetype-2.7.1 compiled without subpixel rendering
> (#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 0):
> http://i.imgur.com/Qj4W0Lx.png

That is pretty terrible! Depending on what lighttpd does with the
environment of the scripts, one or more of the following might help (in
order of how nice I think they are as solutions):

0. Link against a working freetype in the first place
1. Set LD_LIBRARY_PATH in environment.variables instead of
environment.sessionVariables so that it affects not only interactive
sessions
2. Set systemd.services.lighttpd.environment.LD_LIBRARY_PATH
3. Use mod_setenv to set LD_LIBRARY_PATH for the CGI scripts.
4. (as an unfortunate last resort) wrap the CGI scripts.


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


Re: [Nix-dev] 5 somewhat related questions

2017-06-23 Thread Linus Heckemann
Hi Klaas,

>> That intuition holds modulo your Q3 - replaying a sequence of
>> nix-env commands would only reproduce the same generations if a)
>> the states of all channels involved were retained (i.e. you'd need
>> to know which nixpkgs-stable you installed from with each command)
>> and b) all the builds were reproduce-able or cached. Nix assumes
>> reproduce-able builds, and so retains the outcomes of building
>> derivations based on a digest of the derivation itself - but if you
>> replayed the same nix-env commands from scratch, you might get
>> (trivially) different outcomes.
>
> Out of those 2 remarks "a" is the big one, especially if the channel 
> you've subscribed to is in fact not the stable one. As far as I
> understand now, there is no solution for this (yet). Good to know
> though.

You can, instead of using nixpkgs/config.nix, write an expression for
your user environment somewhat like this (say software.nix):

let pkgs = import  {}; in
{
  inherit (pkgs) vim ripgrep ;
}

You can install this using:

nix-env -f software.nix -i

If you add the -r flag, the result will not depend on the previous
generation of your user environment. The benefit of this approach is
that you can replace pkgs in order to pin specific versions, for instance…

let
  # System nixpkgs used only to fetch pinned nixpkgs
  bootPkgs = import  {};
  pkgs = import (bootPkgs.fetchFromGitHub {
owner = "nixos";
repo = "nixpkgs";
rev = "d10fe641247e29b72139776cd316333b13ba";
sha256 = "06viplacb5w49yf3rirsn4jdcfssj98f3s1zic0l8raxng7pmdcq";
  }) {};
in {
  inherit (pkgs) vim ripgrep;
};

Which is a bit harder to maintain but should be much less stateful,
depending only on fetchFromGitHub from your current nixpkgs not breaking
compatibility and on github staying up — and importantly, it would allow
reproducing previous generations more easily. You could of course also
factor the fetching out into a separate file which you could import and
have a script to automatically update. I wouldn't be surprised if
someone had already done that somewhere.

In a similar vein of functionality, you could version your user
environment in a git repo with nixpkgs as a submodule and update it
explicitly. This would provide a similar experience and further reduce
the variability.



> The rollbacks will be as-built, so implicitly they capture the state 
> implied by the channels and configuration.nix. However, there's no 
> explicit capture of those - there was discussion relatively recently 
> about capturing configuration.nix into the generation, but it turns 
> out to be a little harder than you'd expect. Likewise, you'd have to 
> somehow capture the state of all the involved channels.
> 
> 
> Do you have a pointer to this discussion? I cannot find it using the 
> keywords you mentioned above.

This was the discussion David Izquierdo linked in his reply:
https://mailman.science.uu.nl/pipermail/nix-dev/2017-April/023403.html

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


Re: [Nix-dev] How to build a Haskell binding to a C++ library (OpenCV) on OS X

2017-06-19 Thread Linus
On 19 June 2017 18:05:36 BST, Bas van Dijk <v.dijk@gmail.com> wrote:
>Thanks Vincent, you are spot on!
>
>I went with the following change:
>
>https://github.com/LumiGuide/haskell-opencv/commit/6b78bc4c431d693b0bc828cc86708882a26f777c
>
>Bas
>
>On 19 June 2017 at 17:00, Vincent Laporte <vincent.lapo...@gmail.com>
>wrote:
>
>> Hi,
>>
>> Notice that if you replace the two occurrences of ‘g++’ by ‘clang++’
>in
>> the file ‘opencv/Setup.hs’, then ‘nix-build’ succeeds.
>>
>> This issue might be reported upstream: they apparently need a
>configure
>> step to select the correct name of the C++ compiler.
>>
>> The following patch also appears to make ‘nix-build’ work.
>>
>> Regards,
>> --
>> Vincent.
>>
>> ```
>> diff --git a/opencv/Setup.hs b/opencv/Setup.hs
>> index 031daa1..3c92176 100644
>> --- a/opencv/Setup.hs
>> +++ b/opencv/Setup.hs
>> @@ -3,6 +3,6 @@ import System.Environment ( getArgs )
>>
>>  main = do
>>  args <- getArgs
>> -let args' | "configure" `elem` args = args ++
>["--with-gcc","g++",
>> "--with-ld","g++"]
>> +let args' | "configure" `elem` args = args
>>| otherwise   = args
>>  defaultMainArgs args'
>> diff --git a/opencv/opencv.nix b/opencv/opencv.nix
>> index a28674c..80ed995 100644
>> --- a/opencv/opencv.nix
>> +++ b/opencv/opencv.nix
>> @@ -103,8 +103,8 @@ mkDerivation ({
>>libraryPkgconfigDepends = [ opencv3 ];
>>
>>configureFlags =
>> -[ "--with-gcc=g++"
>> -  "--with-ld=g++"
>> +[ "--with-gcc=${stdenv.cc}/bin/c++"
>> +  "--with-ld=${stdenv.cc}/bin/c++"
>>  ];
>>
>>hardeningDisable = [ "bindnow" ];
>> ```
>> ___
>> nix-dev mailing list
>> nix-dev@lists.science.uu.nl
>> https://mailman.science.uu.nl/mailman/listinfo/nix-dev
>>

I believe stdenv also sets the CC and CXX environment variables to the 
preferred C compiler, which could be useful to avoid additional nix code.

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


[Nix-commits] [NixOS/nixpkgs] 4fc077: vdrift: fix build (#26522)

2017-06-13 Thread Linus Heckemann
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 4fc077bfeee8e09980a75f19823400e46cbd5063
  
https://github.com/NixOS/nixpkgs/commit/4fc077bfeee8e09980a75f19823400e46cbd5063
  Author: Linus Heckemann <g...@sphalerite.org>
  Date:   2017-06-13 (Tue, 13 Jun 2017)

  Changed paths:
M pkgs/games/vdrift/default.nix

  Log Message:
  ---
  vdrift: fix build (#26522)

Had been broken since 7bf7f1976545666ba958034f7e61062595338f84


___
nix-commits mailing list
nix-comm...@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-commits


Re: [Nix-dev] weird garbage output inside nix-shell

2017-06-11 Thread Linus
>> I kind of thought I shouldn't even be able to launch vim from inside
>> my shell if it's not listed as a buildDep.
>
>It looks to me that nix-shell _extends_ the environment it is run in.
>So, if you run nix-shell in an environment which contains vim, you have
>vim inside nix-shell.

Correct — unless you use the --pure option in which case the environment is 
cleared before adding the build inputs.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] weird garbage output inside nix-shell

2017-06-09 Thread Linus Heckemann
On 07/06/17 14:24, Roni Choudhury wrote:
> On Wed, Jun 7, 2017 at 12:14 AM Samuel Leathers <dis...@gmail.com
> <mailto:dis...@gmail.com>> wrote:
> 
> I use nix-shell --run zsh. I alias that to nshell.
> 
> Thanks, Sam, this is a great idea! On this note, do you know of a good
> way to update the prompt to reflect the nix-shell environment I'm in?
> i.e., is there a way to *name* the nix-shell env, and get access to that
> name through an environment variable?

Since everything that's passed to stdenv.mkDerivation ends up as an
environment variable, you can use the "name" environment variable. In my
case, my prompt function contains:

if [[ $IN_NIX_SHELL ]]; then
  printf "(%s)" "${name:-nix-shell}"
fi


> I wanted to add that even if I don't drop into zsh as my first act in
> the nix-shell, I still get that weird output from executables not in the
> environment (such as `zsh` and `git`). If anyone has any insight or can
> answer my other question, that would be great.

This is guesswork, but it could be locale-related. Do you use UTF-8
locales everywhere, or do you use other encodings that might mess up if
interpreted as UTF-8? Does setting LC_ALL=en_US.UTF-8 within the shell help?


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


[Nix-commits] [NixOS/nixpkgs] 3c3a25: jing-trang: use jre_headless

2017-06-07 Thread Linus Heckemann
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 3c3a25acc5ccc7685b8f31db97cd8dbcd6c62cfe
  
https://github.com/NixOS/nixpkgs/commit/3c3a25acc5ccc7685b8f31db97cd8dbcd6c62cfe
  Author: Linus Heckemann <g...@sphalerite.org>
  Date:   2017-06-07 (Wed, 07 Jun 2017)

  Changed paths:
M pkgs/tools/text/xml/jing-trang/default.nix

  Log Message:
  ---
  jing-trang: use jre_headless

This halves its closure size.


___
nix-commits mailing list
nix-comm...@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-commits


Re: [Nix-dev] Evaluation time vs build time

2017-05-31 Thread Linus Heckemann
On 31/05/17 18:01, Judson Lester wrote:
> All,
> 
> Please take this with a grain of salt. I'm trying to clarify my
> understanding of Nix, and I've started to develop a kind of precept that
> I don't know that I've seen documented anywhere. It may well be a
> sophomore misunderstanding, and if such I don't want it to be taken up
> as gospel. I think the most succinct way to put it would be:
> 
> nix expressions cannot 'makedepend'
> 
> In other words, values in a nix expression can't be computed from the
> sources used to build an application.
> 
> This is because (and here I'm sketchier) nix-build (upon which `nix-env
> --install` /et al/ are based) evaluates the expressions, and calls to
> 'derivation' that are executed, as a side effect, "queue up" builds.
> Once a derivation is actually produced (iow, when the evaluation
> completes), the queue of derivation builds are run. Since the
> expression's evaluation is complete before the derivation builds happen,
> the sources aren't available at evaluation time.
> 
> One of the consequences of this are the family of *2nix tools that
> exist: per-language library dependency manifests (like a Gemfile or
> package.json) wouldn't be available if the corresponding builder
> function just said "gitfetch this repo and build from it", so setting
> those packages up requires the extra step of getting the appropriate
> manifest files, running a simple tool on them, and pointing the
> expression to the tool's results.
> 
> Another, more profound consequence, is that the set of expressions is in
> some sense "complete" - they fully describe where to get and how to
> build packages, where a solution that admitted "makedepend" would blur
> that line and allow code to determine at packaging time what to include
> in the store.
> 
> My question is, basically, is that true? Do I understand this correctly?
> Even if I do, I'm sure there's details an nuances that could be expanded on.

As far as I understand it, it's mostly true — I believe it *is* actually
possible, just strongly discouraged and absolutely not accepted in
nixpkgs because (iiuc) of the mess of dependencies it can create.

However, I don't fully understand all the ins and outs of this and may
be wrong.

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


Re: [Nix-dev] Polkit action files installed via nix-env don't appear to be recognised by Polkit/Pkexec/Pkaction

2017-05-31 Thread Linus Heckemann
On 31/05/17 08:42, Roger Qiu wrote:
> Good response! This would be a great info in a wiki somewhere.

Thank you! Maybe I'll add it to the nixos-users wiki.


>> To allow nix-env as root to install polkit actions, you could probably
> add /nix/var/nix/profiles/default to polkit's search path.
> 
> Disregarding it being a bad idea, how is this possible? Are you
> suggesting overriding the derivation during package build of polkit?

I'm suggesting not adding it to the search path and using systemPackages
instead ;)

As for how to add it to the search path, I really don't know. In the
best case, you can do this in a configuration file somewhere; in the
worst case this would require a patch to polkit.

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


Re: [Nix-dev] Polkit action files installed via nix-env don't appear to be recognised by Polkit/Pkexec/Pkaction

2017-05-31 Thread Linus Heckemann
On 31/05/17 07:47, Roger Qiu wrote:
> Yea that seems right, allowing users to nix-env install things,
> everything must be unprivileged, allowing the usage of such polkit files
> in nix-env means the users can make use of pkexec to elevate to root
> when executing anything.
> 
> However in non-package manager use cases, installing such a package with
> `make install` would require super user privileges to install the action
> policy file into /usr/share/polkit-1/actions. Therefore nix-env could
> make use of such a fact, and instead suggest the user to install using
> `sudo nix-env` if the package has a polkit policy file. This would
> prevent such a security hole, since the user must be root to be able to
> install such a package. Such suggestions could be encoded in the nix
> expression file.
> 
> Which brings up the next question, would installing via `sudo nix-env`
> setup the polkit policy files properly such that polkit will know about it?

No. nix-env modifies the default, not the system profile (when running
as root) because modifying the system profile requires activating it.

What you'd want in this case is usually to add the package in question
to environment.systemPackages and use nixos-rebuild switch to switch to
the new generation. This results in the policy files ending up in
/run/current-system/sw/share/polkit-1/actions, providing the
security.polkit.enable option is set to true. That way the configuration
is declarative which is more consistent with "The NixOS way".

To allow nix-env as root to install polkit actions, you could probably
add /nix/var/nix/profiles/default to polkit's search path. This is a bad
idea compared to using the systemwide declarative configuration for
several reasons though:

 - The changes won't be picked up automatically, you would have to
restart polkit.service yourself. When using the system configuration,
this is done by the activation script.

 - The packages won't be updated together with the rest of the system.
This could be a security issue depending on whether you remember to run
nix-env -u as root as frequently as nixos-rebuild.

 - The configuration isn't declarative and there's no single source of
truth for where rules come from! This is the norm on most other
distributions of course, but who really wants a less transparent system?

So overall I recommend adding any packages whose polkit actions you want
available to systemPackages rather than using nix-env to manage them.

Best regards,
Linus
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] concatAttrs :: [attrSet] -> attrSet ?

2017-05-28 Thread Linus Heckemann
On 28/05/17 13:18, Sergiu Ivanov wrote:
> Hello,
> 
> I found myself in the need of a function which would take a list of
> Nix attribute sets and concatenate them to produce one big attribute
> set:
> 
> nix-repl> concatAttrs [ {x=1;} {y=2;} ]
> {x=1; y=2;}
> 
> I did quite some research online and in nixpkgs source tree and found
> a lot of cool functions, but nothing resembling to concatAttrs.
> 
> Does such a function exist?
> 
> 
> In the meantime, I ended up writing the following definition:
> 
> concatAttrs = attrList: pkgs.lib.fold (x: y: x // y) {} attrList;
> 
> Do you see any isssues with such an implementation?
> 

Looks like a sensible way to do it to me, though I'd be surprised if it
doesn't already exist in nixpkgs.

Do keep in mind that // is not commutative — the order matters when the
two sets contain the same key — but other than that I don't see any
issues. You might also want to look at the merging logic used for nixos
modules (lib/modules.nix), although that's significantly more complex.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Disappearing X session on some systems

2017-05-28 Thread Linus Heckemann
On 28/05/17 07:17, Kirill Elagin wrote:
> Is there anything noteworthy in the X log? dmesg?
> Surely it doesn’t just disappear without saying anything at all, right?

This stuff should be in the journal, but it isn't in the case of lightdm
[26172].

The X server may also crash without any further information as to why.
This could be [21026] or [25476] at play. Enabling coredumps [1] and
waiting for it to happen again could also help elucidate the issue.

[1]: https://nixos.org/nixos/options.html#coredump
[21026]: https://github.com/NixOS/nixpkgs/issues/21026
[25476]: https://github.com/NixOS/nixpkgs/issues/25476
[26172]: https://github.com/NixOS/nixpkgs/issues/26172
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] confusing rollback / generation system

2017-05-18 Thread Linus
On 18 May 2017 23:40:22 BST, Stefan Huchler  wrote:
>Vladimír Čunát  writes:
>
>> Oh, you mean the system-wide profile?  (i.e.
>> /nix/var/nix/profiles/system)  That's the root's profile.  If you use
>> `nix-env` as root, it will operate on that by default.  You typically
>> need elevated privileges, but it's probably possible to change
>> permissions of that directory...
>
>At least for --list-generations operation that is not true tested on 2
>machines. I have to set the system-directory parameter to get access to
>it.
>
>bash-4.4# nix-env --list-generations
>  16   2017-01-10 09:28:31   (current)
>
>bash-4.4# nix-env --list-generations -p /nix/var/nix/profiles/system
>  71   2017-04-02 20:01:34   
>  72   2017-04-23 15:36:07   (current)
>
>___
>nix-dev mailing list
>nix-dev@lists.science.uu.nl
>https://mailman.science.uu.nl/mailman/listinfo/nix-dev

Yes, nix-env as root operates on the *default* profile (which applies to all 
users but is independent of nixos-rebuild) and not the *system* profile (which 
is operated on by nixos-rebuild) by default.

I totally agree that this is confusing and that it would be nice to perform 
operations on the system profile using the same set of commands as for other 
profiles, as some can't be performed without using the wordy nix-env -p 
/nix/var/nix/profiles/system. The options provided by nix-collect-garbage are 
far too limited, and affect user profiles in addition to the system profile, 
and AFAIU using nix-env -p /nix/var/nix/profiles/system --switch-to-generation 
xyz won't go as intended.

In short: I think nixos-rebuild should support the same generation-management 
commands as nix-env (--list-generations, --delete-generations, 
--switch-to-generation, don't know if there are any more I've missed) for 
consistency and ease of use. Deleting system generations and leaving user 
profiles alone is currently a pain, unnecessarily so.


(All this IMHO)___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] why has each revision / generation not a own configuration.nix

2017-05-16 Thread Linus Heckemann
On 16/05/17 17:43, zimbatm wrote:
> How do you find back which git revision was used to produce a given
> NixOS profile?
> 
> Maybe nixos-rebuild should be extended to include that in the revision
> name, and if the git repo is dirty.

I'm planning to implement the reverse approach on my system: have some
sort of rebuild hook commit the state of the repo to a separate branch
and include useful information (nixpkgs version, derivation hash of the
resulting system) in the commit message. This allows greater
reproducibility and provides far more helpful information (a snapshot of
the full config) than simply "repo was dirty".

I'll reply if/when I get this working.

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


[Nix-commits] [NixOS/nixpkgs] 995d41: nvidia stable: 375.39 -> 375.66

2017-05-11 Thread Linus Heckemann
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 995d41c09197803624a419114b5c5cd2c90e46bc
  
https://github.com/NixOS/nixpkgs/commit/995d41c09197803624a419114b5c5cd2c90e46bc
  Author: Linus Heckemann <g...@sphalerite.org>
  Date:   2017-05-11 (Thu, 11 May 2017)

  Changed paths:
M pkgs/os-specific/linux/nvidia-x11/default.nix
M pkgs/os-specific/linux/nvidia-x11/generic.nix

  Log Message:
  ---
  nvidia stable: 375.39 -> 375.66


  Commit: 89ce83688cda03df01307bc74bfa3950a4d5266e
  
https://github.com/NixOS/nixpkgs/commit/89ce83688cda03df01307bc74bfa3950a4d5266e
  Author: Linus Heckemann <g...@sphalerite.org>
  Date:   2017-05-11 (Thu, 11 May 2017)

  Changed paths:
M pkgs/os-specific/linux/nvidia-x11/generic.nix

  Log Message:
  ---
  nvidia-x11: fix linux 4.10 patch URL


Compare: https://github.com/NixOS/nixpkgs/compare/ed5cb7311814...89ce83688cda___
nix-commits mailing list
nix-comm...@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-commits


[Nix-commits] [NixOS/nixpkgs] 11272e: camlistore: use buildGoPackage

2017-05-09 Thread Linus Heckemann
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 11272e930f751e726e46ca1c9c84a82f2fc33b78
  
https://github.com/NixOS/nixpkgs/commit/11272e930f751e726e46ca1c9c84a82f2fc33b78
  Author: Linus Heckemann <g...@sphalerite.org>
  Date:   2017-05-09 (Tue, 09 May 2017)

  Changed paths:
M pkgs/applications/misc/camlistore/default.nix

  Log Message:
  ---
  camlistore: use buildGoPackage

this removes go references from the package

fixes #25346


___
nix-commits mailing list
nix-comm...@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-commits


[Nix-commits] [NixOS/nixpkgs] 96b83f: weechat: fix guile plugin

2017-04-27 Thread Linus Heckemann
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 96b83f66a2182261ecd68d9c978b60b634cba45f
  
https://github.com/NixOS/nixpkgs/commit/96b83f66a2182261ecd68d9c978b60b634cba45f
  Author: Linus Heckemann <g...@sphalerite.org>
  Date:   2017-04-27 (Thu, 27 Apr 2017)

  Changed paths:
M pkgs/top-level/all-packages.nix

  Log Message:
  ---
  weechat: fix guile plugin

Fixes #25270


___
nix-commits mailing list
nix-comm...@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-commits


Re: [Nix-dev] Failure to boot after hibernate

2017-04-24 Thread Linus Heckemann
On 24/04/17 11:33, Bas van Dijk wrote:
> On 24 April 2017 at 12:20, Danylo Hlynskyi  wrote:
>> Probably too late, but can you boot with hibernate=no kernel parameter?
> 
> Hi Danylo, thanks. Unfortunately I can't edit the kernel parameters.
> My system is using the default EFI loader and isn't using grub which
> does allow editing the kernel command line.
If it's systemd-boot, which it probably is, it does in fact allow
editing unless you disable it in its config — I think you just press E
to edit the command line.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


[Nix-commits] [NixOS/nixpkgs] be65d2: nixpkgs manual: Remove obsolete warning (#21117)

2017-04-23 Thread Linus Heckemann
  Branch: refs/heads/release-17.03
  Home:   https://github.com/NixOS/nixpkgs
  Commit: be65d233c1b83501e0c82fdbd67d0ecf3ebefb99
  
https://github.com/NixOS/nixpkgs/commit/be65d233c1b83501e0c82fdbd67d0ecf3ebefb99
  Author: Linus Heckemann <g...@sphalerite.org>
  Date:   2017-04-23 (Sun, 23 Apr 2017)

  Changed paths:
M doc/multiple-output.xml

  Log Message:
  ---
  nixpkgs manual: Remove obsolete warning (#21117)

PR #815 has already been cherry-picked into the default nix version 1.11.8.
(cherry picked from commit 5c7f4669a7880bc2f929271ae4fdbdc2ba8e2a8b)


___
nix-commits mailing list
nix-comm...@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-commits


[Nix-commits] [NixOS/nixpkgs] 5c7f46: nixpkgs manual: Remove obsolete warning (#21117)

2017-04-23 Thread Linus Heckemann
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 5c7f4669a7880bc2f929271ae4fdbdc2ba8e2a8b
  
https://github.com/NixOS/nixpkgs/commit/5c7f4669a7880bc2f929271ae4fdbdc2ba8e2a8b
  Author: Linus Heckemann <g...@sphalerite.org>
  Date:   2017-04-23 (Sun, 23 Apr 2017)

  Changed paths:
M doc/multiple-output.xml

  Log Message:
  ---
  nixpkgs manual: Remove obsolete warning (#21117)

PR #815 has already been cherry-picked into the default nix version 1.11.8.


___
nix-commits mailing list
nix-comm...@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-commits


Re: [Nix-dev] tigervnc service?

2017-04-23 Thread Linus Heckemann
On 23/04/17 06:07, Tim Sears wrote:
> Thanks Volth. That preStart bit got me a bit further. I am running the
> awesome window manager and getting the error:
> 
> awesome: main:619: cannot open display (error 1)
> 
> That leads to the server and ssh tunnel shutting down before anything
> appears on the remote client side.
> 
> Using lightdm and awesome for my physical workstation. Not sure I am
> starting X properly as far as vncserver is concerned.
> 
> My xstartup file looks like this...
> 
> #!/nix/store/hi4j75r312lsjhpdln9p8blyixs59hbs-bash-4.4-p12/bin/bash
> echo xstartup-start | systemd-cat -t "vncserver"
> while [ true ]; do
> /nix/store/dglxfr7ivy7hrx2scrli9acsrx0nxicj-awesome-4.1/bin/awesome :1 ;
> sleep 1; done

awesome doesn't take the display as an argument, by the looks of it. Try
using

DISPLAY=:1 ${awesome}/bin/awesome

instead of awesome :1.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Presenting nix-index: a file-not-found utility

2017-04-22 Thread Linus Heckemann
On 22/04/17 07:45, Linus Heckemann wrote:
> On 22/04/17 07:03, Danylo Hlynskyi wrote:
>> Great!
>> A question: what does it mean when expression is in round parents?
>>
>> (wineUnstable.out)2,141 r
>> /nix/store/cl7b6kw7y8cqkpy4pnwwq4iqmaiw52d0-xextproto-7.3.0/include/X11/extensions/secur.h
>>
> 
> https://github.com/bennofs/nix-index/blob/master/src/bin/nix-locate.rs#L110-L112
> 
> That it's not a top-level package.
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> https://mailman.science.uu.nl/mailman/listinfo/nix-dev
> 


No, sorry, that's wrong — I misinterpreted the source code. The long
usage description explains it though:

* we can't know the precise attribute path for every package, so if you
see the syntax `(attr)`
  in the output, that means that `attr` is not the target package but
that it
  depends (perhaps indirectly) on the package that contains the searched
file. Example:

  $ nix-locate 'bin/xmonad'
  (xmonad-with-packages.out)  0 s
/nix/store/nl581g5kv3m2xnmmfgb678n91d7ll4vv-ghc-8.0.2-with-packages/bin/xmonad

  This means that we don't know what nixpkgs attribute produces
/nix/store/nl581g5kv3m2xnmmfgb678n91d7ll4vv-ghc-8.0.2-with-packages,
  but we know that `xmonad-with-packages.out` requires it.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Presenting nix-index: a file-not-found utility

2017-04-22 Thread Linus Heckemann
On 22/04/17 07:03, Danylo Hlynskyi wrote:
> Great!
> A question: what does it mean when expression is in round parents?
> 
> (wineUnstable.out)2,141 r
> /nix/store/cl7b6kw7y8cqkpy4pnwwq4iqmaiw52d0-xextproto-7.3.0/include/X11/extensions/secur.h
> 

https://github.com/bennofs/nix-index/blob/master/src/bin/nix-locate.rs#L110-L112

That it's not a top-level package.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
https://mailman.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Overriding python with python3 in vim_configurable.customize

2017-04-04 Thread Linus Heckemann
On 04/04/17 17:40, zimbatm wrote:
> Look into pkgs/top-level/all-packages.nix. I would start by copying the
> definition of vim_configurable from there and set the python argument.
> 
> 
> On Tue, 4 Apr 2017, 14:08 Ben Zhang,  > wrote:
> 
> From the source code, it doesn’t seem to accept a python argument
> 
> (https://github.com/nicknovitski/nixpkgs/blob/master/pkgs/misc/vim-plugins/vim-utils.nix#L291-L295).
> Is there another way to override `python` with `python3`
> (https://github.com/NixOS/nixpkgs/pull/8125#issuecomment-169471686)?
> 


Another potential option would be using package overrides [1] to pass
python3 as python to the vim package — something like

   packageOverrides = pkgs: {
  vim = pkgs.vim.override { python = pkgs.python3 };
   };

[1]: https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides


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


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

2017-03-26 Thread Linus Heckemann
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


Re: [Nix-dev] How do you work on big packages?

2017-03-17 Thread Linus Heckemann
On 17/03/17 16:00, Volth wrote:
> What could be done here?
nix-shell, and the upstream recommended build procedure.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] how to find packages by file?

2017-03-15 Thread Linus Heckemann
On 14/03/17 20:24, Roni Choudhury wrote:
> So my second question is, *how do I know whether a package
> has .lib or .dev attributes?*

I know of two options for this:

 1. Look at the expressions in a nixpkgs checkout; a good starting point
is usually all-packages.nix to find the actual expression and its
outputs attribute.

 2. Use nix-repl — `nix-repl ''` will give you a REPL for the
nix language with autocompletion for that sort of thing, which can be
very helpful.

> A followup question: *if I didn't have libpangocairo.* already in my
> store, how would I know which package delivers it?*

Hopefully by grepping a nixpkgs checkout. Sometimes the library names
don't exactly correspond to expression names, and sometimes they're not
in the expressions at all; I'm not really sure what can be done about
that, unless there's an index of the files each derivation contains
floating about somewhere — I know there's at least a subset of that, for
implementing the command-not-found functionality that tells you what to
install to make commands available. I tried this with your example of
pangocairo and found this line, from some Haskell bindings...

  "gi-pangocairo" = callPackage
({ mkDerivation, base, bytestring, Cabal, containers, gi-cairo
 , gi-glib, gi-gobject, gi-pango, gobjectIntrospection, haskell-gi
 , haskell-gi-base, pango, system-cairo, system-pango, text
 , transformers
 }:

so at that point I'd try looking in the pango and cairo-related
packages... Not really ideal, but I don't know if there is a better way.

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


Re: [Nix-dev] NixOS 17.03 Beta, 16.09 Security Support Timeline

2017-03-09 Thread Linus Heckemann
On 09/03/17 10:26, Oliver Charles wrote:
> sudo: /run/current-system/sw/bin/sudo must be owned by uid 0 and have
> the setuid bit set

Are you just adding sudo to systemPackages rather than using the option
security.sudo.enable?

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


Re: [Nix-dev] nixos-rebuild switch error

2017-03-07 Thread Linus Heckemann
Hi Tilo,

On 07/03/17 07:30, Tilo Schwarz wrote:
> *** Downloading
> ‘https://cache.nixos.org/nar/1krfkq7lilh69g6ha7gxpck184x7nqwhxh1c51zmsc2p13fqrii4.nar.xz’
> (signed by ‘cache.nixos.org-1’) to
> ‘/nix/store/psxqsm2rx0is5yp6sh9bkh4pvsvhpw1b-appres-1.0.4’...
> curl: (6) Couldn't resolve host 'cache.nixos.org <http://cache.nixos.org>'
> /nix/store/lymkrlb84c8v3pmi9xlw8d3dh3g20q1c-xz-5.2.2-bin/bin/xz:
> (stdin): File format not recognized
> error: unexpected end-of-file
> download of
> ‘https://cache.nixos.org/nar/1krfkq7lilh69g6ha7gxpck184x7nqwhxh1c51zmsc2p13fqrii4.nar.xz’
> failed: No such file or directory
> could not download
> ‘/nix/store/psxqsm2rx0is5yp6sh9bkh4pvsvhpw1b-appres-1.0.4’ from any
> binary cache
these are the key lines; particularly
> curl: (6) Couldn't resolve host 'cache.nixos.org <http://cache.nixos.org>'
This failure is caused by a flaky internet connection, so it makes sense
that trying again would fix it. Nothing to be concerned about, besides
perhaps the poor UX, making it very unclear what the actual cause of the
failure is :)

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


Re: [Nix-dev] 'nixos-stable' channel?

2017-03-06 Thread Linus Heckemann
On 06/03/17 15:03, Domen Kožar wrote:
> It's something like 15min of work to parse http://nixos.org/channels/
> and point to the latest channel if someone needs this.
> 
> Officially this is a very bad idea, since people will want us to 
> support it.

Isn't the point to just have it refer to the version of NixOS that *is*
being supported? I don't see how parsing http://nixos.org/channels will
convey that information — 17.03 has existed for longer than it's been
supported, no? I.e. stable rather than latest.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Explicitly selecting sources for "src" in stdenv.mkDerivation?

2017-02-16 Thread Linus Heckemann
On 16/02/17 12:28, Freddy Rietdijk wrote:
>> src = [ ./subproject-A/schema.sql ./subproject-A/lib ];
> 
> Each of the files you mentioned here will be stored in a separate store
> path. You could write a simple function that takes a list of derivations
> and copies the contents of those derivations in a new output.

Or use symlinkJoin, which does that but without the copying.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-commits] [NixOS/nixpkgs] b4cd25: Manual: document users.users..hashedPassword

2017-02-13 Thread Linus Heckemann
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: b4cd251c54e8a07cfcb8cb46c53083f2f6c7a573
  
https://github.com/NixOS/nixpkgs/commit/b4cd251c54e8a07cfcb8cb46c53083f2f6c7a573
  Author: Linus Heckemann <g...@sphalerite.org>
  Date:   2017-02-13 (Mon, 13 Feb 2017)

  Changed paths:
M nixos/doc/manual/configuration/user-mgmt.xml

  Log Message:
  ---
  Manual: document users.users..hashedPassword


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


[Nix-commits] [NixOS/nixpkgs] 98bd72: systemd-boot: allow setting editor security option...

2017-01-21 Thread Linus Heckemann
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 98bd722d1dae747c5786497b8689415d2bebf78f
  
https://github.com/NixOS/nixpkgs/commit/98bd722d1dae747c5786497b8689415d2bebf78f
  Author: Linus Heckemann <g...@sphalerite.org>
  Date:   2017-01-21 (Sat, 21 Jan 2017)

  Changed paths:
M nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
M nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix

  Log Message:
  ---
  systemd-boot: allow setting editor security option (#21853)


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


Re: [Nix-dev] Remapping Console Key Bindings

2017-01-05 Thread Linus Arver
FWIW I convert Caps Lock to Hyper key which I use as my XMonad mod-key. You
can see my config here:
https://github.com/listx/syscfg/blob/master/nixos/base.nix#L44

On Thu, Jan 5, 2017 at 10:52 AM stewart mackenzie 
wrote:

> services.xserver.xkbOptions = "grp:alt_space_toggle, ctrl:swapcaps";
> ___
> 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-commits] [NixOS/nixpkgs] da70d3: SDL2: split derivation

2016-12-25 Thread Linus Heckemann
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: da70d3da0f11b22eac77756b39b349215e06b2e3
  
https://github.com/NixOS/nixpkgs/commit/da70d3da0f11b22eac77756b39b349215e06b2e3
  Author: Linus Heckemann <g...@sphalerite.org>
  Date:   2016-12-26 (Mon, 26 Dec 2016)

  Changed paths:
M pkgs/development/libraries/SDL2/default.nix

  Log Message:
  ---
  SDL2: split derivation


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


[Nix-commits] [NixOS/nixpkgs] d568cb: google-apputils: enable for py3k (#21079)

2016-12-11 Thread Linus Heckemann
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: d568cb971be3c1a9f732e2d254baf74dff84fa2a
  
https://github.com/NixOS/nixpkgs/commit/d568cb971be3c1a9f732e2d254baf74dff84fa2a
  Author: Linus Heckemann <g...@sphalerite.org>
  Date:   2016-12-11 (Sun, 11 Dec 2016)

  Changed paths:
M pkgs/top-level/python-packages.nix

  Log Message:
  ---
  google-apputils: enable for py3k (#21079)

No apparent reason for it being disabled per #21061. I guess we'll find
out if there was a reason.


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


[Nix-commits] [NixOS/nixpkgs] 9aca55: endless sky: init at 0.9.4

2016-12-11 Thread Linus Heckemann
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 9aca55e79d62468ef230350026b41947d0472309
  
https://github.com/NixOS/nixpkgs/commit/9aca55e79d62468ef230350026b41947d0472309
  Author: Linus Heckemann <g...@sphalerite.org>
  Date:   2016-12-11 (Sun, 11 Dec 2016)

  Changed paths:
M lib/maintainers.nix
A pkgs/games/endless-sky/default.nix
A pkgs/games/endless-sky/fixes.patch
M pkgs/top-level/all-packages.nix

  Log Message:
  ---
  endless sky: init at 0.9.4


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


Re: [Nix-dev] X server & Emacs crashes in 16.09

2016-11-10 Thread Linus Arver
On Thu, Nov 10, 2016 at 07:26:18PM +0100, Milan Zamazal wrote:
> Since I upgraded to 16.09, I've been experiencing quite frequent
> (several times per week) segmentation faults of X server or Emacs on my
> computer.  That has never happened before the upgrade and AFAICT no
> other application suffers from that problem.
> 
> Is this a known problem?

Not that I am aware. FWIW I've been on 16.09 (have been on the 16.09
channel within a week of it going live) and have not seen any X or Emacs
crashes. Still, you are probably on to something.

> Any idea what can be wrong?

Well, could you provide some details? Going by the template in the
Nixpkgs issue tracker (if you click on "New issue"), here's what you can
report:

* System: (NixOS: `nixos-version`, Ubuntu/Fedora: `lsb_release -a`, ...)
* Nix version: (run `nix-env --version`)
* Nixpkgs version: (run `nix-instantiate --eval '' -A 
lib.nixpkgsVersion`)

I think it's worth opening a new issue on Nixpkgs instead of continuing
this on the list.

Best,
Linus

> 
> Thanks for any help,
> Milan
> 
> ___
> 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] Fwd: Re: qutebrowser very unstable

2016-11-03 Thread Linus Arver
On Thu, Nov 03, 2016 at 09:30:37PM +, Taeer Bar-Yam wrote:
> Should we update the qutebrowser package to use the QtWebEngine backend (i.e. 
> enable the --backend webengine flag)?

+1

I have noticed crashes before as well but was too lazy to say anything
on the list.

> I don't feel like I have the authority to make this decision; do other people 
> who use qutebrowser want to weigh in? What's the etiquite here?

I think just opening a ticket (or pull request) on the Nixpkgs github
repo is the standard way of doing things. E.g., here's an example of an
open ticket related to qutebrowser: 
https://github.com/NixOS/nixpkgs/issues/2

Linus

> Forwarding Florian Bruhin's message of November 3, 2016 5:18 pm:
> ...
> The new QtWebEngine backend is pretty usable already when you install
> qutebrowser from git and launch with --backend webengine. There are
> only some smaller features missing, support for the last big missing
> feature (downloads) will land somewhen next week probably.
> ...
> Florian
> ___
> 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] How to use MySQL

2016-10-05 Thread Linus Arver
Hello Tomasz,

On Mon, Oct 03, 2016 at 09:33:24AM +0100, Tomasz Czyż wrote:
> By looking at errors you pasted I assume you are not using proper
> configuration or default configuration is used when you don't provide any.
> And by default probably paths are set to /var/lib which is writeable only
> by root or system services.
> 
> To run mysql in userspace you need to adjust all those paths in your
> configuration to point to directories accessible/writeable by user.
> 
> I'm not sure if this actually worth the effort.

After browsing the mysql.nix file [1] in depth, I've reached the same
conclusion. There's a great deal of customization that happens in there
and it was not clear how to modify it to get a minimum working example
that plays nicely with `nix-env -iA nixos.mysql55`. I could fork that
derivation and apply my own changes and create a modified package, but
again that seemed like too much effort.

Using GitHub code search I was able to find a sample configuration [2].
For posterity, this is what I added to my configuration.nix:

services.mysql = {
  enable = true;
  dataDir = "/var/db/mysql";
  package = pkgs.mysql;
};

The

dataDir = "/var/db/mysql";

line was to keep with tradition in
other Linux distros that package MySQL. (Funnily enough, the link at [1]
suggests the same, but only as a comment. [3]) Lastly the

package = pkgs.mysql;

line seems mandatory as the manual does not state a default
value for it. With this configuration, I am able to run `mysql` and
connect to the mysqld server instance (which is running as follows ---
`ps aux' output):

mysql30247  0.0  0.6 772632 99388 ?Ssl  Oct04   0:02 
/nix/store/piv5d6085k35h43n5smdv9g7cs1zrh4w-mariadb-10.1.17/bin/mysqld 
--defaults-extra-file=/nix/store/vlx9v98ll7gx00c2s79maf9axiql6ij7-my.cnf 
--user=mysql --datadir=/var/db/mysql 
--basedir=/nix/store/piv5d6085k35h43n5smdv9g7cs1zrh4w-mariadb-10.1.17 
--pid-file=/run/mysqld/mysqld.pid

> You could try to run mysql using nixos-container, so you run mysql as
> "service" but in container and you can start/stop the container whenever
> you want (and it's easier to start because you can use system level
> "service" inside).

I am not familiar with nixos-container --- but I'll keep it in mind for
the future.

Thanks again for your help!

Linus

[1]: 
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/databases/mysql.nix
[2]: 
https://github.com/search?q=%22services.mysql%22+extension%3Anix=searchresults=Code=%E2%9C%93
[3]: 
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/databases/mysql.nix#L76

> 
> 2016-10-03 9:30 GMT+01:00 Tomasz Czyż <tomasz.c...@gmail.com>:
> 
> > Linus,
> >
> > by installing it with nix-env you install only the binary and all
> > application execution is in user hands. By using "service" in
> > configuration.nix you actually start a daemon (like /etc/init.d/mysql in
> > ubuntu for instance).
> >
> > If you want to start it in user space you have to follow exactly the same
> > steps as in other distros when you are not using /etc/init.d/ or upstart or
> > whatever system level daemon manager.
> >
> > If you want to try to reproduce what "service" is doing in your userspace,
> > you can check config of service and try to execture those commands in
> > userspace:
> >
> > https://github.com/NixOS/nixpkgs/blob/master/nixos/
> > modules/services/databases/mysql.nix
> >
> > So you can see, that configuration is generated first and then service is
> > started with
> >
> > serviceConfig.ExecStart = "${mysql}/bin/mysqld
> > --defaults-extra-file=${myCnf} ${mysqldOptions}";
> >
> >
> > 2016-10-03 9:21 GMT+01:00 Linus Arver <linusar...@gmail.com>:
> >
> >> Hello all,
> >>
> >> I want to install and use MySQL on NixOS, but am not sure how to
> >> proceed. I've managed to do
> >>
> >> nix-env -iA nixos.mysql55
> >>
> >> but trying to get it to run is difficult. Here is what I tried:
> >>
> >> [月 03 0:50:47] - l_k0 ~/prog/sqfmm/mysql
> >>  > mysql
> >> ERROR 2002 (HY000): Can't connect to local MySQL server through
> >> socket '/run/mysqld/mysqld.sock' (2)
> >> [月 03 0:50:53] 1 - l_k0 ~/prog/sqfmm/mysql
> >>  > systemctl start mysqld
> >>  AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
> >> Authentication is required to start 'mysqld.service'.
> >> Multiple identities can be used for authentication:
> >>  1.  System administrator (root)
> >>  2.  Linus Arver (l)
> >>

[Nix-dev] How to use MySQL

2016-10-03 Thread Linus Arver
Hello all,

I want to install and use MySQL on NixOS, but am not sure how to
proceed. I've managed to do

nix-env -iA nixos.mysql55

but trying to get it to run is difficult. Here is what I tried:

[月 03 0:50:47] - l_k0 ~/prog/sqfmm/mysql
 > mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/run/mysqld/mysqld.sock' (2)
[月 03 0:50:53] 1 - l_k0 ~/prog/sqfmm/mysql
 > systemctl start mysqld
 AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'mysqld.service'.
Multiple identities can be used for authentication:
 1.  System administrator (root)
     2.  Linus Arver (l)
Choose identity to authenticate as (1-2): 2
Password: 
 AUTHENTICATION COMPLETE ===
Failed to start mysqld.service: Unit mysqld.service not found.
[月 03 0:52:33] 5 - l_k0 ~/prog/sqfmm/mysql
 > systemctl start mysql 
 AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'mysql.service'.
Multiple identities can be used for authentication:
 1.  System administrator (root)
 2.  Linus Arver (l)
Choose identity to authenticate as (1-2): 2
Password: 
 AUTHENTICATION COMPLETE ===
Failed to start mysql.service: Unit mysql.service not found.
[月 03 0:52:57] 5 - l_k0 ~/prog/sqfmm/mysql
 > mysqld
161003  0:53:16 [Note] mysqld (mysqld 5.5.50) starting as process 12363 ...
161003  0:53:16 [Warning] Can't create test file 
/var/lib/mysql/k0.lower-test
161003  0:53:16 [Warning] Can't create test file 
/var/lib/mysql/k0.lower-test
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2)
161003  0:53:16 [ERROR] Aborting

161003  0:53:16 [Note] mysqld: Shutdown complete

[月 03 0:53:16] 1 - l_k0 ~/prog/sqfmm/mysql
 > mysqld_safe
161003 00:54:16 mysqld_safe Logging to '/var/lib/mysql/k0.err'.
touch: cannot touch '/var/lib/mysql/k0.err': No such file or directory
chmod: cannot access '/var/lib/mysql/k0.err': No such file or directory
mkdir: cannot create directory ‘/run/mysqld’: Permission denied
chown: invalid user: ‘mysql’
chmod: cannot access '/run/mysqld': No such file or directory
161003 00:54:16 mysqld_safe Starting mysqld daemon with databases from 
/var/lib/mysql
/home/l/.nix-profile/bin/mysqld_safe: line 128: /var/lib/mysql/k0.err: No 
such file or directory
/home/l/.nix-profile/bin/mysqld_safe: line 165: /var/lib/mysql/k0.err: No 
such file or directory
touch: cannot touch '/var/lib/mysql/k0.err': No such file or directory
chown: invalid user: ‘mysql’
chmod: cannot access '/var/lib/mysql/k0.err': No such file or directory
161003 00:54:16 mysqld_safe mysqld from pid file /var/lib/mysql/k0.pid ended
/home/l/.nix-profile/bin/mysqld_safe: line 128: /var/lib/mysql/k0.err: No 
such file or directory

The attempt to run *mysqld_safe* was taken from the official docs at
http://dev.mysql.com/doc/refman/5.6/en/starting-server.html.

I see that there are several configuration options for MySQL
(services.mysql.*) defined in the NixOS manual
(https://nixos.org/nixos/manual/options.html#opt-services.mysql.enable)
but this seems to be for enabling it as a service that starts
unconditionally on every boot (configuration.nix), which I want to avoid.

How do I start MySQL without touching configuration.nix? If
configuration.nix is the only sane/preferred way to use MySQL on NixOS,
then is there a resource/wiki/blogpost that discusses a minimal example?
I don't mind trial-and-error with editing my system configs but seeing a
second-hand account of the entire process would be very helpful.

Please forgive me if I have missed any obvious documentation.

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


[Nix-commits] [NixOS/nixpkgs] 511bb2: baekmuk-ttf: switch to base32 encoded src.sha256

2016-09-01 Thread Linus Arver
  Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: 511bb286892e800827c4add915bb008bd2a82de3
  
https://github.com/NixOS/nixpkgs/commit/511bb286892e800827c4add915bb008bd2a82de3
  Author: Linus Arver <linusar...@gmail.com>
  Date:   2016-09-01 (Thu, 01 Sep 2016)

  Changed paths:
M pkgs/data/fonts/baekmuk-ttf/default.nix

  Log Message:
  ---
  baekmuk-ttf: switch to base32 encoded src.sha256

Closes https://github.com/NixOS/nixpkgs/pull/18166


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


Re: [Nix-dev] Latex package to handle unicode characters?

2016-06-01 Thread Linus Arver
On Sun, May 29, 2016 at 04:56:12PM -0700, Jeffrey David Johnson wrote:
> I get the following error when exporting some markdown to PDF with pandoc:
> 
> An error occured: PDF creation failed:
> ! Package inputenc Error: Unicode char \u8:  not set up for use with 
> LaTeX.
> 
> See the inputenc package documentation for explanation.
> Type  H   for immediate help.
>  ...  
>   
> l.150   Evolutionary Analysis}
> 
> Try running pandoc with --latex-engine=xelatex.
> 
> I could hunt this one character down, but is there a package I could add to 
> my texlive environment that might help handle this type of problem in general?

I used to use the texliveFull package, which included xelatex.

FWIW, I no longer use texliveFull; instead I use a Docker container for
all TeX-related things as it is much simpler to use along with
negligible maintenence costs, if at all.

> So far I just use the standard one:
> 
> myTexLive = texlive.combine {
>   inherit (texlive) scheme-small;
> };
> 
> Don't see any mention of xelatex in nixpkgs.

That's probably because it still comes with texliveFull, which is what
most people use I imagine.

> Ideally I'd like to handle all of unicode, but just skipping any unrenderable 
> characters would be OK too, since I gather latex doesn't do that yet?

AFAIK, Latex never dealt with Unicode natively. Xelatex has much simpler
font support (fontspec) so I've always opted for Xelatex from the beginning.

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


Re: [Nix-dev] NixOS won't boot anymore in certain generations, don't know why (Stage-1 error)

2015-06-04 Thread Linus Arver
Hello Matthias,

 When rebooting, I booted into my newest generation, which was 109 by
 this time. But I got an error in stage 1, telling me that my root
 partition couldn't be mounted as the device did not come up (LUKS
 encrypted SSD, root on /dev/sda2). It asked me
 
 dm_mod loaded?

FWIW, this is probably relevant:
http://lists.science.uu.nl/pipermail/nix-dev/2015-May/017198.html

. I was hit with that regression some weeks ago and had to cherry-pick
the bugfix commit from Nixpkgs.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Nix loves Haskell: the video

2015-05-23 Thread Linus Arver
 Interesting. Shame the recording cut off at the questions. I didn't know
 you could nix-env -qaP haskellPackages to display the ng package set: we
 just had a person ask about that in #nixos yesterday!

Likewise, but for me I had to prefix the argument with nixpkgs. like
this:

$ nix-env -qaP -A nixpkgs.haskellPackages

.

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


Re: [Nix-dev] per-project nix-shell for Ruby (Gemfile) projects?

2015-05-14 Thread Linus Arver
On Tue, May 12, 2015 at 11:03:58PM +0200, Rok Garbas wrote:
 hi linus,
 
 you might find a recent thread on mailing list interesting.
 http://article.gmane.org/gmane.linux.distributions.nixos/15702

Hello Rok!

I did read that thread, but I can't really understand how to adapt it
for installing a single gem and making it available in the current
environment. The example in there is for building the sup mail reader; I
followed the instructions and packaged the 'minitest' gem, but even
though I install it with

nix-env -i minitest

and see it in my 'nix-env -q' like this:

minitest-5.6.1

the Ruby script I wrote that uses it cannot find it.

What I want to do is write a single Ruby file (which defines a Class or
Module) that depends on a particular gem. I need, e.g.,

require 'foo'

class Bar
...
end

to work.

How do NixOS users go about this? On Arch Linux, I use Rbenv to download
various Ruby versions, and then use 'bundle install' in a project's root
folder containing the Gemfile to get all the gems installed for the
currently active Ruby version.

I realize that I can just do the same thing on Nix, but I get a feeling
that the current tooling allows us to use the Nix mechanisms to achieve
the same thing (and avoid, e.g., re-downloading Rails or activerecord
every single time we start a new Rails project).

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


[Nix-dev] per-project nix-shell for Ruby (Gemfile) projects?

2015-05-10 Thread Linus Arver
Hello,

I am still very new to Nix and NixOS so please bear with me.

I followed the instructions in the Nixpkgs manual[1] as well as the
original announcement[2] to create a regular Nix package, which I could
install by putting

minitest = self.callPackage ./ruby/minitest {};

into my ~/.nixpkgs/config.nix. This allows me to install minitest into
my current Nix profile.

If I have a Ruby project/app that has a single Gemfile, is there a way
to create a 'shell.nix' file for it, like the command

cabal2nix --shell .  shell.nix

for cabalized Haskell projects/apps?

Cheers,
Linus

[1] https://nixos.org/nixpkgs/manual/#ssec-language-ruby
[2] http://lists.science.uu.nl/pipermail/nix-dev/2015-January/015780.html
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] NixOS on a machine with only one user

2015-04-24 Thread Linus Arver
On Fri, Apr 24, 2015 at 04:23:39PM +, Amy de Buitléir wrote:
 NixOS noob here. I'm using NixOS on a machine with only one user (me).
 What's the best strategy for installing packages?
 
 Installing into the global system environment
 - or -
 Installing into a normal user profile 
 
 It seems that the second method would be a bit more convenient, especially
 if I add and remove new software frequently. Which I do.

Hi Amy,

I also use NixOS on machines where I am the sole user. I try out
packages in the normal user profile first with `nix-env -i` and then if
I end up sticking with it, move it into the global system environment in
`/etc/nixos/configuration.nix`. I try to keep my user profile minimal or
empty.

I am also very new to NixOS, but the above method seems to work well. I
keep track of the system configuration with git, so that's a nice added
bonus.

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


Re: [Nix-dev] some basic questions from a new NixOS user

2011-12-01 Thread Linus Arver
Hello Peter,

On Thu, Dec 01, 2011 at 08:55:26AM +0100, Peter Simons wrote:
 Hi Linus,
 
   The nix-env -qaP \* command does work, but I am unable to make sense
   of the output. For example, there is this line:
  
   nixpkgs_sys.haskellPackages_ghc704_no_profiling.xmonad  
 haskell-xmonad-ghc7.0.4-0.10
  
   I can see that the second column is the package name, but what is the
   first column? How do I use it so I can use the nix-env -iA syntax?
 
 That attribute path is what nix-env -iA expects, i.e.:
 
   nix-env -iA nixpkgs_sys.haskellPackages_ghc704_no_profiling.xmonad
 

Ah, how silly of me. I tried out the command above and indeed it works
fine.

 Note that haskellPackages_ghc704_no_profiling and haskellPackages
 are synonymous at the moment.

I see. So, for the record, you can do:

$ nix-env -iA nixpkgs_sys.haskellPackages_ghc704_no_profiling.xmonad

or

$ nix-env -iA nixpkgs_sys.haskellPackages.xmonad

to install xmonad as a regular user. Cool stuff!

   The nix-env manpage explicitly says nix-env -qaA '*' gives the
   attribute paths. Could this be a typo in the manpage?
 
 Yes, it is. :-) I'll commit a fix.

Great. Thanks again, Peter!

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


Re: [Nix-dev] some basic questions from a new NixOS user

2011-11-30 Thread Linus Arver
On Wed, Nov 30, 2011 at 05:45:37PM +0100, Peter Simons wrote:
 Hi Linus,
 
   I see that you're on NixOS as well. You might remember me from the
   Arch-Haskell list some time ago...
 
 ah, of course! Now that you've mentioned it, I recognize your name. :-)
 After supporting Haskell on ArchLinux for a while, I found that most of
 the tasks I had to do (i.e. figure out which packages need to be rebuilt
 after an update, etc.) come for free with Nix, so I switched to NixOS a
 while ago.

I see... my reason for trying out NixOS is simple: it is the only OS
that I know of which uses a functional package manager. It's like the
epiphany I had when I started programming in Haskell... suddenly, all
imperative paradigms looked really, really dangerous and ugly to me.

Maybe one day, the concept of functional package managers will spread to
other OSes. I mean, with nix-collect-garbage, I can't see any downsides
to using NixOS. The way I see it, Nix is to packages as git/hg/svn is to
source code because it introduces commits (generations) and branches
(profiles) to package managers! It's the way of the future!

   $ nix-env -i haskell-ghc7.0.4
 
 You probably want to install ghc-7.0.4-wrapper into your profile
 instead of ghc-7.0.4. The wrapper ensures that the real compiler is
 called with all those extra paths on the command-line that are required
 to make GHC see the library packages installed in the profile.
 
 NixOS has those wrappers for many packages (like gcc, python, and so on)
 for precisely that purpose. It's a bit of inconvenience at first, but in
 the long run the benefits outweigh the extra effort.

Ah, that makes sense. Unfortunately (or fortunately?), there is no need
for me to install xmonad with nix-env: I actually ended up just doing
everything in configuration.nix, by adopting the configuration Shea Levy
posted in this thread (thanks, Shea!!), which installed
ghc/xmonad/xmonad-contrib correctly (all modules are recognized by
ghci!).

   Strangely, I can't use this convenient syntax, because nix throws an
   error:
  
   $ nix-env -iA haskellPackages.{xmonad,ghc}
   error: attribute `haskellPackages' in selection path `haskellPackages' 
 not found
  
   I've already done a nixos-checkout, so, I don't understand why my
   freshly-installed NixOS is coughing up this error...
 
 The exact attribute path that you have to use depends on the way your
 system is installed. nix-env -qaP \* should print the proper paths for
 your system.

The nix-env -qaP \* command does work, but I am unable to make sense
of the output. For example, there is this line:

nixpkgs_sys.haskellPackages_ghc704_no_profiling.xmonad  
haskell-xmonad-ghc7.0.4-0.10

I can see that the second column is the package name, but what is the
first column? How do I use it so I can use the nix-env -iA syntax?

   $ nix-env -qaA '*'
   warning: you probably meant to specify the argument '*' to show all 
 packages
   error: attribute `*' in selection path `*' not found
 
 I guess that you meant to use the P option instead of A?

No, because the nix-env manpage explicitly says nix-env -qaA '*' gives
the attribute paths. Could this be a typo in the manpage?

Anyway, thanks to everyone's help, I've got a running system with Xmonad
+ urxvt + zsh. So things are looking 99% identical to my 2+ year Arch
Linux setups on my other machines... :)

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


Re: [Nix-dev] some basic questions from a new NixOS user

2011-11-30 Thread Linus Arver
On Thu, Dec 01, 2011 at 06:33:08AM +0100, Nicolas Pierron wrote:
 Hi Linus,
 
 On Thu, Dec 1, 2011 at 03:37, Linus Arver linusar...@gmail.com wrote:
  On Sat, Nov 26, 2011 at 02:42:03PM -0800, Linus Arver wrote:
  On Fri, Nov 25, 2011 at 12:35:01AM +0100, Nicolas Pierron wrote:
   Hi Linus,
  
   On Thu, Nov 24, 2011 at 22:44, Linus Arver linusar...@gmail.com wrote:
On Thu, Nov 24, 2011 at 07:00:29PM +0100, Nicolas Pierron wrote:
   chsh does not work if you reference your user inside NixOS
   configuration file, the reason is that each time you boot, NixOS
   activation script will update /etc/passwd file with the list of users
   and shells.  But you can update your shell inside your
   configuration.nix file.  Have a look at one module of my
   configurations:
  
   https://svn.nixos.org/repos/nix/configurations/trunk/misc/nicolas.b.pierron/common/user.nix
 
  Thanks for this. I adapted the
 
    users.extraUsers = [
      { name = nicolas;
        uid = 1000;
        group = users;
        extraGroups = [ wheel share ];
        description = Nicolas Pierron;
        home = /home/nicolas;
        shell = pkgs.zsh + /bin/zsh;
      }
    ];
 
    users.extraGroups = [
      { name = share;
        gid = 1001;
      }
    ];
 
    environment.systemPackages = [
      pkgs.zsh
    ];
 
  I just wanted to point out to future zsh users for NixOS that using the
  above setting will work if you are inside an X process, because the bash
  shell that runs the X stuff sources /etc/bashrc, /etc/profile for all
  the right global system PATHs (see
  /etc/nixos/nixos/modules/programs/bash/bash.nix). But if you log in from
  a virtual console tty (e.g., CTRL+ALT+F1), or if you SSH in, your zsh
  won't source the abovementioned files, resulting in an unusable shell.
 
 What I did on my server was to add the following lines in /etc/zshenv file.
 
 emulate bash
 alias shopt=false
 . /etc/profile
 unalias shopt
 emulate zsh

Every day, I learn something new. Thanks.

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


Re: [Nix-dev] some basic questions from a new NixOS user

2011-11-29 Thread Linus Arver
Hi Peter!

I see that you're on NixOS as well. You might remember me from the
Arch-Haskell list some time ago...

On Tue, Nov 29, 2011 at 06:02:33PM +0100, Peter Simons wrote:
 Hi Linus,
 
   But I must ask, how did you install xmonad? I tried nix-env -i
   xmonad but it did not work [...]
 
 Haskell packages that contain library code generally depend on the
 version of the compiler they've been built with. Almost all Haskell
 packages have the appropriate compiler version baked into their package
 name. Consequently, there are many different versions of XMonad:
 
   $ nix-env -qaP \* | grep xmonad-ghc
   haskellPackages_ghc6104.xmonad   
 haskell-xmonad-ghc6.10.4-0.10
   haskellPackages_ghc6123.xmonad   
 haskell-xmonad-ghc6.12.3-0.10
   haskellPackages_ghc704_no_profiling.xmonad   
 haskell-xmonad-ghc7.0.4-0.10
   haskellPackages_ghc704_profiling.xmonad  
 haskell-xmonad-ghc7.0.4-0.10-profiling
   haskellPackages_ghc721.xmonad
 haskell-xmonad-ghc7.2.1-0.10
   haskellPackages_ghc722.xmonad
 haskell-xmonad-ghc7.2.2-0.10
 
 Which version is preferable to you depends on the compiler that you
 prefer. At the moment, I would recommend to stick to GHC 7.0.4.

Yes, I got this impression from seeing all the different xmonad/ghc
packages with the different versions. I did

$ nix-env -qa \*  pkgs

and kept that file around as a sort of primitive reference for all the
available packages, and that's how I learned about all the different
versions. I did something like

$ nix-env -i haskell-xmonad-ghc7.0.4
$ nix-env -i haskell-ghc7.0.4

to get my Haskell packages installd.

   Strangely, it appears that the haskell packages cannot see each other
   properly, because I cannot use any of the xmonad-contrib modules in
   my xmonad.hs, even though I've installed xmonad-contrib. I can fire
   up ghci, but I can't even load up the XMonad Haskell module,
   either. Strange...
 
 I cannot reproduce that problem:
 
   $ nix-env -iA haskellPackages.{xmonad,ghc}
   installing `haskell-xmonad-ghc7.0.4-0.10'
   installing `ghc-7.0.4-wrapper'
   building path(s) 
 `/nix/store/6k520bqkbmcbqgl1s1371jr7zj2774b9-user-environment'
   created 7452 symlinks in user environment
   $ ghci
   GHCi, version 7.0.4: http://www.haskell.org/ghc/  :? for help
   Loading package ghc-prim ... linking ... done.
   Loading package integer-gmp ... linking ... done.
   Loading package base ... linking ... done.
   Loading package ffi-1.0 ... linking ... done.
   Prelude :m XMonad
   Prelude XMonad :browse
   (--) :: (Monad m, Data.Monoid.Monoid a) = m Bool - m a - m a
   class Num a = Data.Bits.Bits a where
   [...]

If I had known about the simple haskellPackages.foo syntax I would
have used it with my nix-env invocations! Another thing to add to the
wiki...

Strangely, I can't use this convenient syntax, because nix throws an
error:

$ nix-env -iA haskellPackages.{xmonad,ghc}
error: attribute `haskellPackages' in selection path `haskellPackages' not 
found

I've already done a nixos-checkout, so, I don't understand why my
freshly-installed NixOS is coughing up this error...

 Generally speaking, GHC can see all Haskell packages that have been
 installed into the same profile as the compiler itself.

Evidently, my newbie, trial-and-error attempt to install xmonad/ghc with
nix-env has already broken my Haskell-package setup...

I just read the manual for nix-env to find out more about the -A flag,
and found this sentence: To find out the attribute paths of available
packages, use nix-env -qaA '*'. Unfortunately, this does not work for
me:

$ nix-env -qaA '*'
warning: you probably meant to specify the argument '*' to show all packages
error: attribute `*' in selection path `*' not found

It appears that something has gone horribly wrong...

-Linus

P.S. I apologize in advance for any typos in the error messages/console
output --- the problematic NixOS install on my spare laptop is not in a
workable state so I'm just copying everything by hand into another
laptop to send these emails.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] some basic questions from a new NixOS user

2011-11-29 Thread Linus Arver
Hello Shea,

On Tue, Nov 29, 2011 at 12:46:16PM -0500, Shea Levy wrote:
 Hi all,
 
 I'm coming to this thread late and haven't read it all, but in case it's 
 useful I have working nixos configurations that use xmonad available 
 online. I don't use nix-env to install anything on my nixos systems, 
 just nixos-rebuild for it all.
 
 See 
 https://github.com/shlevy/dotfiles/blob/master/nixos/common-configuration.nix 
 for the nixos configuration. If I remember correctly, the relevant parts 
 are the bottom half of environment.x11Packages and the services.xserver 
 stuff.
 
 See https://github.com/shlevy/dotfiles/tree/master/xmonad for the xmonad 
 configuration files I use. I symlink the relevant ones to my home directory.
 
 Cheers,
 Shea

Thank you for the links!  I am in the process of incorporating your
configuration style (using just nixos-rebuild for everything)... I will
report back after the big rebuild finishes.

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


Re: [Nix-dev] some basic questions from a new NixOS user

2011-11-28 Thread Linus Arver
On Sat, Nov 26, 2011 at 09:20:34PM -0700, Kevin Quick wrote:
 On Sat, 26 Nov 2011 15:42:03 -0700, Linus Arver
 linusar...@gmail.com wrote:
 
 this in my configuration.nix:
services.xserver = {
 enable = true;
 layout = us;
# Automatic login as regular user (no need to put up with entering
 # password)
 displayManager = {
 auto = {
 enable = true;
 user = l; # login as l
 };
 };
# Enable XMonad
 windowManager = {
 xmonad.enable = true;
 };
 };
 
 I have:
 
   services.xserver = {
 enable = true;
 ...
 windowManager.xmonad.enable = true;
 windowManager.default = xmonad;
 ...
   };
 
 This seems to work fine. 

Thanks! I added

windowManager.default = xmonad;

into my configuration and now xmonad finally starts up automatically on
boot!

 Although xmonad restarts itself out of
 your .xmonad directory, the main version is available:
 
 $ which xmonad
 /home/kquick/.nix-profile/bin/xmonad
 $ ls -lh `which xmonad`
 lrwxrwxrwx 1 root nixbld 67 Nov  2 12:59
 /home/kquick/.nix-profile/bin/xmonad -
 /nix/store/f6zlgcyhy76k2kal3v47vmj5bsvpm3px-xmonad-0.9.2/bin/xmonad
 $

So, I stated in my previous email that I thought the xmonad-related
things in configuration.nix were essentially broken. I've since
installed xmonad with nix-env, and now xmonad is in my path.

But I must ask, how did you install xmonad? I tried nix-env -i xmonad
but it did not work, so I looked into all the available packages and
found haskell-xmonad-ghc7.0.4 which is what I ended up installing.

Strangely, it appears that the haskell packages cannot see each other
properly, because I cannot use any of the xmonad-contrib modules in my
xmonad.hs, even though I've installed xmonad-contrib. I can fire up
ghci, but I can't even load up the XMonad Haskell module, either.
Strange...

I guess this is the price you have to pay to run an exotic setup on an
alpha-stage OS...

 I did a nixos-rebuild switch, but xmonad does not get started.
 
 In my experience there are some elements that cannot switch and a
 reboot is required; I don't recall if xmonad was one of these, but
 it may be if X is not restarted by the switch.

First, let me clarify my poor choice of words --- what I really meant
was: I did a 'nix-rebuild switch', but xmonad does not get started
after I reboot into the new configuration. But yes, your point still
stands --- X and xmonad do not get restarted immediately after
nixos-rebuild switch. I did read somewhere in the manual that not all
processes get restarted (or that NixOS *tries* to restart all services
if it can), so this quirk won't confuse newbies, I think.

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


Re: [Nix-dev] some basic questions from a new NixOS user

2011-11-24 Thread Linus Arver
On Thu, Nov 24, 2011 at 08:21:25AM +0100, Marc Weber wrote:
 You're welcome.
 
  1a. I've added a new user account with useradd, per the manual, and
 
 3 ways: 
 1) /var/run/current-system/sw/bin/ like installation by configuration.nix
 2) system wide root installation ? (not sure about it)
 3) user installation.
 
 All can be rolled back. nix-env --list-generations etc (see man or do
 --help).

Ah, I did not know about nix-env --list-generations. This is great!
I'll add a wiki entry about this.

 
  environment.systemPackages = [
  pkgs.zsh
  pkgs.git
  pkgs.rxvt-unicode
  ];
 Looks fine to me.
  

Thanks.

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


[Nix-dev] some basic questions from a new NixOS user

2011-11-23 Thread Linus Arver
Hello all,

I'm new to this list. I just installed NixOS on a spare laptop of mine
(with the minimum CD) by following the manual at
http://hydra.nixos.org/build/1568621/download/1/nixos/manual.html. The
system boots into the slim login manager at startup, since I enabled the
services.xserver portion in /etc/nixos/configuration.nix.

Anyway, here are some questions.

1a. I've added a new user account with useradd, per the manual, and
have done a couple installations of software with `nix-env -i'. This is
great, but I'm curious --- what is the preferred way to install
software? The wiki page at http://nixos.org/wiki/Install/remove_software
says that there are two ways to install software --- system-wide (by
editing environment.systemPackages), and per-user (by just doing nix-env
-i [package]). My understanding is that in order to get the advertised
advantages of NixOS's rollback functionality, you have to do system-wide
installs because the whole nixos-rebuild command only looks at
/etc/nixos/configuration.nix. I.e., there is no way to rollback the
system on a per-user basis. So, do most people on here have a very long
environment.systemPackages definition in their configuration.nix,
defining all system-wide packages?

1b. If I wanted zsh, git, and rxvt-unicode to be available system-wide,
can I do:

environment.systemPackages = [
pkgs.zsh
pkgs.git
pkgs.rxvt-unicode
];

in my configuration.nix? There does not seem to be any documentation
regarding the syntax for this.

2. If I do nix-env -i as the root user, then the installation is only
for the root user, correct?

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