Merge remote-tracking branch 'origin/master' into gcc-6

This commit is contained in:
Eelco Dolstra 2016-11-01 13:24:30 +01:00
commit 31ea123b9c
1010 changed files with 27776 additions and 9012 deletions

View File

@ -52,6 +52,20 @@ in ...</programlisting>
It's equivalent to <varname>pkgs</varname> in the above example. It's equivalent to <varname>pkgs</varname> in the above example.
</para> </para>
<para>
Note that in previous versions of nixpkgs, this method replaced any changes from <link
linkend="sec-modify-via-packageOverrides">config.packageOverrides</link>,
along with that from previous calls if this function was called repeatedly.
Now those previous changes will be preserved so this function can be "chained" meaningfully.
To recover the old behavior, make sure <varname>config.packageOverrides</varname> is unset,
and call this only once off a "freshly" imported nixpkgs:
<programlisting>let
pkgs = import &lt;nixpkgs&gt; { config: {}; };
newpkgs = pkgs.overridePackages ...;
in ...</programlisting>
</para>
</section> </section>
<section xml:id="sec-pkg-override"> <section xml:id="sec-pkg-override">
@ -85,9 +99,70 @@ in ...</programlisting>
</section> </section>
<section xml:id="sec-pkg-overrideAttrs">
<title>&lt;pkg&gt;.overrideAttrs</title>
<para>
The function <varname>overrideAttrs</varname> allows overriding the
attribute set passed to a <varname>stdenv.mkDerivation</varname> call,
producing a new derivation based on the original one.
This function is available on all derivations produced by the
<varname>stdenv.mkDerivation</varname> function, which is most packages
in the nixpkgs expression <varname>pkgs</varname>.
</para>
<para>
Example usage:
<programlisting>helloWithDebug = pkgs.hello.overrideAttrs (oldAttrs: rec {
separateDebugInfo = true;
});</programlisting>
</para>
<para>
In the above example, the <varname>separateDebugInfo</varname> attribute is
overriden to be true, thus building debug info for
<varname>helloWithDebug</varname>, while all other attributes will be
retained from the original <varname>hello</varname> package.
</para>
<para>
The argument <varname>oldAttrs</varname> is conventionally used to refer to
the attr set originally passed to <varname>stdenv.mkDerivation</varname>.
</para>
<note>
<para>
Note that <varname>separateDebugInfo</varname> is processed only by the
<varname>stdenv.mkDerivation</varname> function, not the generated, raw
Nix derivation. Thus, using <varname>overrideDerivation</varname> will
not work in this case, as it overrides only the attributes of the final
derivation. It is for this reason that <varname>overrideAttrs</varname>
should be preferred in (almost) all cases to
<varname>overrideDerivation</varname>, i.e. to allow using
<varname>sdenv.mkDerivation</varname> to process input arguments, as well
as the fact that it is easier to use (you can use the same attribute
names you see in your Nix code, instead of the ones generated (e.g.
<varname>buildInputs</varname> vs <varname>nativeBuildInputs</varname>,
and involves less typing.
</para>
</note>
</section>
<section xml:id="sec-pkg-overrideDerivation"> <section xml:id="sec-pkg-overrideDerivation">
<title>&lt;pkg&gt;.overrideDerivation</title> <title>&lt;pkg&gt;.overrideDerivation</title>
<warning>
<para>You should prefer <varname>overrideAttrs</varname> in almost all
cases, see its documentation for the reasons why.
<varname>overrideDerivation</varname> is not deprecated and will continue
to work, but is less nice to use and does not have as many abilities as
<varname>overrideAttrs</varname>.
</para>
</warning>
<warning> <warning>
<para>Do not use this function in Nixpkgs as it evaluates a Derivation <para>Do not use this function in Nixpkgs as it evaluates a Derivation
before modifying it, which breaks package abstraction and removes before modifying it, which breaks package abstraction and removes

View File

@ -3,7 +3,7 @@
## User Guide ## User Guide
Several versions of Python are available on Nix as well as a high amount of Several versions of Python are available on Nix as well as a high amount of
packages. The default interpreter is CPython 2.7. packages. The default interpreter is CPython 3.5.
### Using Python ### Using Python
@ -409,36 +409,21 @@ and in this case the `python35` interpreter is automatically used.
### Interpreters ### Interpreters
Versions 2.6, 2.7, 3.3, 3.4 and 3.5 of the CPython interpreter are available on Versions 2.6, 2.7, 3.3, 3.4 and 3.5 of the CPython interpreter are as respectively
Nix and are available as `python26`, `python27`, `python33`, `python34` and `python26`, `python27`, `python33`, `python34` and `python35`. The PyPy interpreter
`python35`. The PyPy interpreter is also available as `pypy`. Currently, the is available as `pypy`. The aliases `python2` and `python3` correspond to respectively `python27` and
aliases `python` and `python3` correspond to respectively `python27` and `python35`. The default interpreter, `python`, maps to `python3`.
`python35`. The Nix expressions for the interpreters can be found in The Nix expressions for the interpreters can be found in
`pkgs/development/interpreters/python`. `pkgs/development/interpreters/python`.
#### Missing modules standard library
The interpreters `python26` and `python27` do not include modules that
require external dependencies. This is done in order to reduce the closure size.
The following modules need to be added as `buildInput` explicitly:
* `python.modules.bsddb`
* `python.modules.curses`
* `python.modules.curses_panel`
* `python.modules.crypt`
* `python.modules.gdbm`
* `python.modules.sqlite3`
* `python.modules.tkinter`
* `python.modules.readline`
For convenience `python27Full` and `python26Full` are provided with all
modules included.
All packages depending on any Python interpreter get appended All packages depending on any Python interpreter get appended
`out/{python.sitePackages}` to `$PYTHONPATH` if such directory `out/{python.sitePackages}` to `$PYTHONPATH` if such directory
exists. exists.
#### Missing `tkinter` module standard library
To reduce closure size the `Tkinter`/`tkinter` is available as a separate package, `pythonPackages.tkinter`.
#### Attributes on interpreters packages #### Attributes on interpreters packages
Each interpreter has the following attributes: Each interpreter has the following attributes:
@ -448,7 +433,7 @@ Each interpreter has the following attributes:
- `buildEnv`. Function to build python interpreter environments with extra packages bundled together. See section *python.buildEnv function* for usage and documentation. - `buildEnv`. Function to build python interpreter environments with extra packages bundled together. See section *python.buildEnv function* for usage and documentation.
- `withPackages`. Simpler interface to `buildEnv`. See section *python.withPackages function* for usage and documentation. - `withPackages`. Simpler interface to `buildEnv`. See section *python.withPackages function* for usage and documentation.
- `sitePackages`. Alias for `lib/${libPrefix}/site-packages`. - `sitePackages`. Alias for `lib/${libPrefix}/site-packages`.
- `executable`. Name of the interpreter executable, ie `python3.4`. - `executable`. Name of the interpreter executable, e.g. `python3.4`.
### Building packages and applications ### Building packages and applications
@ -475,8 +460,9 @@ sets are
and the aliases and the aliases
* `pkgs.pythonPackages` pointing to `pkgs.python27Packages` * `pkgs.python2Packages` pointing to `pkgs.python27Packages`
* `pkgs.python3Packages` pointing to `pkgs.python35Packages` * `pkgs.python3Packages` pointing to `pkgs.python35Packages`
* `pkgs.pythonPackages` pointing to `pkgs.python3Packages`
#### `buildPythonPackage` function #### `buildPythonPackage` function

View File

@ -35,6 +35,7 @@ texlive.combine {
You can list packages e.g. by <command>nix-repl</command>. You can list packages e.g. by <command>nix-repl</command>.
<programlisting> <programlisting>
$ nix-repl $ nix-repl
nix-repl> :l &lt;nixpkgs>
nix-repl> texlive.collection-&lt;TAB> nix-repl> texlive.collection-&lt;TAB>
</programlisting> </programlisting>
</para></listitem> </para></listitem>

View File

@ -56,16 +56,18 @@ rec {
ff = f origArgs; ff = f origArgs;
overrideWith = newArgs: origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs); overrideWith = newArgs: origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs);
in in
if builtins.isAttrs ff then (ff // if builtins.isAttrs ff then (ff // {
{ override = newArgs: makeOverridable f (overrideWith newArgs); override = newArgs: makeOverridable f (overrideWith newArgs);
overrideDerivation = fdrv: overrideDerivation = fdrv:
makeOverridable (args: overrideDerivation (f args) fdrv) origArgs; makeOverridable (args: overrideDerivation (f args) fdrv) origArgs;
}) ${if ff ? overrideAttrs then "overrideAttrs" else null} = fdrv:
else if builtins.isFunction ff then makeOverridable (args: (f args).overrideAttrs fdrv) origArgs;
{ override = newArgs: makeOverridable f (overrideWith newArgs); })
__functor = self: ff; else if builtins.isFunction ff then {
overrideDerivation = throw "overrideDerivation not yet supported for functors"; override = newArgs: makeOverridable f (overrideWith newArgs);
} __functor = self: ff;
overrideDerivation = throw "overrideDerivation not yet supported for functors";
}
else ff; else ff;

View File

@ -10,6 +10,7 @@
aaronschif = "Aaron Schif <aaronschif@gmail.com>"; aaronschif = "Aaron Schif <aaronschif@gmail.com>";
abaldeau = "Andreas Baldeau <andreas@baldeau.net>"; abaldeau = "Andreas Baldeau <andreas@baldeau.net>";
abbradar = "Nikolay Amiantov <ab@fmap.me>"; abbradar = "Nikolay Amiantov <ab@fmap.me>";
abigailbuccaneer = "Abigail Bunyan <abigailbuccaneer@gmail.com>";
aboseley = "Adam Boseley <adam.boseley@gmail.com>"; aboseley = "Adam Boseley <adam.boseley@gmail.com>";
abuibrahim = "Ruslan Babayev <ruslan@babayev.com>"; abuibrahim = "Ruslan Babayev <ruslan@babayev.com>";
acowley = "Anthony Cowley <acowley@gmail.com>"; acowley = "Anthony Cowley <acowley@gmail.com>";
@ -29,6 +30,7 @@
all = "Nix Committers <nix-commits@lists.science.uu.nl>"; all = "Nix Committers <nix-commits@lists.science.uu.nl>";
ambrop72 = "Ambroz Bizjak <ambrop7@gmail.com>"; ambrop72 = "Ambroz Bizjak <ambrop7@gmail.com>";
amiddelk = "Arie Middelkoop <amiddelk@gmail.com>"; amiddelk = "Arie Middelkoop <amiddelk@gmail.com>";
amiloradovsky = "Andrew Miloradovsky <miloradovsky@gmail.com>";
amorsillo = "Andrew Morsillo <andrew.morsillo@gmail.com>"; amorsillo = "Andrew Morsillo <andrew.morsillo@gmail.com>";
AndersonTorres = "Anderson Torres <torres.anderson.85@gmail.com>"; AndersonTorres = "Anderson Torres <torres.anderson.85@gmail.com>";
anderspapitto = "Anders Papitto <anderspapitto@gmail.com>"; anderspapitto = "Anders Papitto <anderspapitto@gmail.com>";
@ -104,8 +106,8 @@
cstrahan = "Charles Strahan <charles@cstrahan.com>"; cstrahan = "Charles Strahan <charles@cstrahan.com>";
cwoac = "Oliver Matthews <oliver@codersoffortune.net>"; cwoac = "Oliver Matthews <oliver@codersoffortune.net>";
DamienCassou = "Damien Cassou <damien@cassou.me>"; DamienCassou = "Damien Cassou <damien@cassou.me>";
dasuxullebt = "Christoph-Simon Senjak <christoph.senjak@googlemail.com>";
danbst = "Danylo Hlynskyi <abcz2.uprola@gmail.com>"; danbst = "Danylo Hlynskyi <abcz2.uprola@gmail.com>";
dasuxullebt = "Christoph-Simon Senjak <christoph.senjak@googlemail.com>";
davidak = "David Kleuker <post@davidak.de>"; davidak = "David Kleuker <post@davidak.de>";
davidrusu = "David Rusu <davidrusu.me@gmail.com>"; davidrusu = "David Rusu <davidrusu.me@gmail.com>";
davorb = "Davor Babic <davor@davor.se>"; davorb = "Davor Babic <davor@davor.se>";
@ -122,6 +124,7 @@
dipinhora = "Dipin Hora <dipinhora+github@gmail.com>"; dipinhora = "Dipin Hora <dipinhora+github@gmail.com>";
dmalikov = "Dmitry Malikov <malikov.d.y@gmail.com>"; dmalikov = "Dmitry Malikov <malikov.d.y@gmail.com>";
dochang = "Desmond O. Chang <dochang@gmail.com>"; dochang = "Desmond O. Chang <dochang@gmail.com>";
domenkozar = "Domen Kozar <domen@dev.si>";
doublec = "Chris Double <chris.double@double.co.nz>"; doublec = "Chris Double <chris.double@double.co.nz>";
drets = "Dmytro Rets <dmitryrets@gmail.com>"; drets = "Dmytro Rets <dmitryrets@gmail.com>";
drewkett = "Andrew Burkett <burkett.andrew@gmail.com>"; drewkett = "Andrew Burkett <burkett.andrew@gmail.com>";
@ -172,12 +175,13 @@
globin = "Robin Gloster <mail@glob.in>"; globin = "Robin Gloster <mail@glob.in>";
gnidorah = "Alex Ivanov <yourbestfriend@opmbx.org>"; gnidorah = "Alex Ivanov <yourbestfriend@opmbx.org>";
goibhniu = "Cillian de Róiste <cillian.deroiste@gmail.com>"; goibhniu = "Cillian de Róiste <cillian.deroiste@gmail.com>";
goodrone = "Andrew Trachenko <goodrone@gmail.com>";
Gonzih = "Max Gonzih <gonzih@gmail.com>"; Gonzih = "Max Gonzih <gonzih@gmail.com>";
goodrone = "Andrew Trachenko <goodrone@gmail.com>";
gpyh = "Yacine Hmito <yacine.hmito@gmail.com>"; gpyh = "Yacine Hmito <yacine.hmito@gmail.com>";
grahamc = "Graham Christensen <graham@grahamc.com>"; grahamc = "Graham Christensen <graham@grahamc.com>";
gridaphobe = "Eric Seidel <eric@seidel.io>"; gridaphobe = "Eric Seidel <eric@seidel.io>";
guibert = "David Guibert <david.guibert@gmail.com>"; guibert = "David Guibert <david.guibert@gmail.com>";
guillaumekoenig = "Guillaume Koenig <guillaume.edward.koenig@gmail.com>";
hakuch = "Jesse Haber-Kucharsky <hakuch@gmail.com>"; hakuch = "Jesse Haber-Kucharsky <hakuch@gmail.com>";
havvy = "Ryan Scheel <ryan.havvy@gmail.com>"; havvy = "Ryan Scheel <ryan.havvy@gmail.com>";
hbunke = "Hendrik Bunke <bunke.hendrik@gmail.com>"; hbunke = "Hendrik Bunke <bunke.hendrik@gmail.com>";
@ -188,7 +192,6 @@
hrdinka = "Christoph Hrdinka <c.nix@hrdinka.at>"; hrdinka = "Christoph Hrdinka <c.nix@hrdinka.at>";
iand675 = "Ian Duncan <ian@iankduncan.com>"; iand675 = "Ian Duncan <ian@iankduncan.com>";
ianwookim = "Ian-Woo Kim <ianwookim@gmail.com>"; ianwookim = "Ian-Woo Kim <ianwookim@gmail.com>";
domenkozar = "Domen Kozar <domen@dev.si>";
igsha = "Igor Sharonov <igor.sharonov@gmail.com>"; igsha = "Igor Sharonov <igor.sharonov@gmail.com>";
ikervagyok = "Balázs Lengyel <ikervagyok@gmail.com>"; ikervagyok = "Balázs Lengyel <ikervagyok@gmail.com>";
j-keck = "Jürgen Keck <jhyphenkeck@gmail.com>"; j-keck = "Jürgen Keck <jhyphenkeck@gmail.com>";
@ -213,11 +216,13 @@
jwiegley = "John Wiegley <johnw@newartisans.com>"; jwiegley = "John Wiegley <johnw@newartisans.com>";
jwilberding = "Jordan Wilberding <jwilberding@afiniate.com>"; jwilberding = "Jordan Wilberding <jwilberding@afiniate.com>";
jzellner = "Jeff Zellner <jeffz@eml.cc>"; jzellner = "Jeff Zellner <jeffz@eml.cc>";
kaiha = "Kai Harries <kai.harries@gmail.com>";
kamilchm = "Kamil Chmielewski <kamil.chm@gmail.com>"; kamilchm = "Kamil Chmielewski <kamil.chm@gmail.com>";
kampfschlaefer = "Arnold Krille <arnold@arnoldarts.de>"; kampfschlaefer = "Arnold Krille <arnold@arnoldarts.de>";
kevincox = "Kevin Cox <kevincox@kevincox.ca>"; kevincox = "Kevin Cox <kevincox@kevincox.ca>";
khumba = "Bryan Gardiner <bog@khumba.net>"; khumba = "Bryan Gardiner <bog@khumba.net>";
KibaFox = "Kiba Fox <kiba.fox@foxypossibilities.com>"; KibaFox = "Kiba Fox <kiba.fox@foxypossibilities.com>";
kierdavis = "Kier Davis <kierdavis@gmail.com>";
kkallio = "Karn Kallio <tierpluspluslists@gmail.com>"; kkallio = "Karn Kallio <tierpluspluslists@gmail.com>";
koral = "Koral <koral@mailoo.org>"; koral = "Koral <koral@mailoo.org>";
kovirobi = "Kovacsics Robert <kovirobi@gmail.com>"; kovirobi = "Kovacsics Robert <kovirobi@gmail.com>";
@ -243,7 +248,6 @@
lucas8 = "Luc Chabassier <luc.linux@mailoo.org>"; lucas8 = "Luc Chabassier <luc.linux@mailoo.org>";
ludo = "Ludovic Courtès <ludo@gnu.org>"; ludo = "Ludovic Courtès <ludo@gnu.org>";
luispedro = "Luis Pedro Coelho <luis@luispedro.org>"; luispedro = "Luis Pedro Coelho <luis@luispedro.org>";
sternenseemann = "Lukas Epple <post@lukasepple.de>";
lukego = "Luke Gorrie <luke@snabb.co>"; lukego = "Luke Gorrie <luke@snabb.co>";
lw = "Sergey Sofeychuk <lw@fmap.me>"; lw = "Sergey Sofeychuk <lw@fmap.me>";
madjar = "Georges Dubus <georges.dubus@compiletoi.net>"; madjar = "Georges Dubus <georges.dubus@compiletoi.net>";
@ -259,10 +263,10 @@
martingms = "Martin Gammelsæter <martin@mg.am>"; martingms = "Martin Gammelsæter <martin@mg.am>";
matejc = "Matej Cotman <cotman.matej@gmail.com>"; matejc = "Matej Cotman <cotman.matej@gmail.com>";
mathnerd314 = "Mathnerd314 <mathnerd314.gph+hs@gmail.com>"; mathnerd314 = "Mathnerd314 <mathnerd314.gph+hs@gmail.com>";
matthewbauer = "Matthew Bauer <mjbauer95@gmail.com>";
matthiasbeyer = "Matthias Beyer <mail@beyermatthias.de>"; matthiasbeyer = "Matthias Beyer <mail@beyermatthias.de>";
maurer = "Matthew Maurer <matthew.r.maurer+nix@gmail.com>"; maurer = "Matthew Maurer <matthew.r.maurer+nix@gmail.com>";
mbakke = "Marius Bakke <mbakke@fastmail.com>"; mbakke = "Marius Bakke <mbakke@fastmail.com>";
matthewbauer = "Matthew Bauer <mjbauer95@gmail.com>";
mbe = "Brandon Edens <brandonedens@gmail.com>"; mbe = "Brandon Edens <brandonedens@gmail.com>";
mboes = "Mathieu Boespflug <mboes@tweag.net>"; mboes = "Mathieu Boespflug <mboes@tweag.net>";
mcmtroffaes = "Matthias C. M. Troffaes <matthias.troffaes@gmail.com>"; mcmtroffaes = "Matthias C. M. Troffaes <matthias.troffaes@gmail.com>";
@ -295,15 +299,16 @@
muflax = "Stefan Dorn <mail@muflax.com>"; muflax = "Stefan Dorn <mail@muflax.com>";
myrl = "Myrl Hex <myrl.0xf@gmail.com>"; myrl = "Myrl Hex <myrl.0xf@gmail.com>";
nand0p = "Fernando Jose Pando <nando@hex7.com>"; nand0p = "Fernando Jose Pando <nando@hex7.com>";
nathan-gs = "Nathan Bijnens <nathan@nathan.gs>";
Nate-Devv = "Nathan Moore <natedevv@gmail.com>"; Nate-Devv = "Nathan Moore <natedevv@gmail.com>";
nathan-gs = "Nathan Bijnens <nathan@nathan.gs>";
nckx = "Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>"; nckx = "Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>";
nequissimus = "Tim Steinbach <tim@nequissimus.com>"; nequissimus = "Tim Steinbach <tim@nequissimus.com>";
nfjinjing = "Jinjing Wang <nfjinjing@gmail.com>"; nfjinjing = "Jinjing Wang <nfjinjing@gmail.com>";
nhooyr = "Anmol Sethi <anmol@aubble.com>"; nhooyr = "Anmol Sethi <anmol@aubble.com>";
nicknovitski = "Nick Novitski <nixpkgs@nicknovitski.com>";
nico202 = "Nicolò Balzarotti <anothersms@gmail.com>"; nico202 = "Nicolò Balzarotti <anothersms@gmail.com>";
notthemessiah = "Brian Cohen <brian.cohen.88@gmail.com>";
NikolaMandic = "Ratko Mladic <nikola@mandic.email>"; NikolaMandic = "Ratko Mladic <nikola@mandic.email>";
notthemessiah = "Brian Cohen <brian.cohen.88@gmail.com>";
np = "Nicolas Pouillard <np.nix@nicolaspouillard.fr>"; np = "Nicolas Pouillard <np.nix@nicolaspouillard.fr>";
nslqqq = "Nikita Mikhailov <nslqqq@gmail.com>"; nslqqq = "Nikita Mikhailov <nslqqq@gmail.com>";
obadz = "obadz <obadz-nixos@obadz.com>"; obadz = "obadz <obadz-nixos@obadz.com>";
@ -344,6 +349,7 @@
proglodyte = "Proglodyte <proglodyte23@gmail.com>"; proglodyte = "Proglodyte <proglodyte23@gmail.com>";
pshendry = "Paul Hendry <paul@pshendry.com>"; pshendry = "Paul Hendry <paul@pshendry.com>";
psibi = "Sibi <sibi@psibi.in>"; psibi = "Sibi <sibi@psibi.in>";
pstn = "Philipp Steinpaß <philipp@xndr.de>";
pSub = "Pascal Wittmann <mail@pascal-wittmann.de>"; pSub = "Pascal Wittmann <mail@pascal-wittmann.de>";
puffnfresh = "Brian McKenna <brian@brianmckenna.org>"; puffnfresh = "Brian McKenna <brian@brianmckenna.org>";
pxc = "Patrick Callahan <patrick.callahan@latitudeengineering.com>"; pxc = "Patrick Callahan <patrick.callahan@latitudeengineering.com>";
@ -377,8 +383,8 @@
rvl = "Rodney Lorrimar <dev+nix@rodney.id.au>"; rvl = "Rodney Lorrimar <dev+nix@rodney.id.au>";
rvlander = "Gaëtan André <rvlander@gaetanandre.eu>"; rvlander = "Gaëtan André <rvlander@gaetanandre.eu>";
ryanartecona = "Ryan Artecona <ryanartecona@gmail.com>"; ryanartecona = "Ryan Artecona <ryanartecona@gmail.com>";
ryantm = "Ryan Mulligan <ryan@ryantm.com>";
ryansydnor = "Ryan Sydnor <ryan.t.sydnor@gmail.com>"; ryansydnor = "Ryan Sydnor <ryan.t.sydnor@gmail.com>";
ryantm = "Ryan Mulligan <ryan@ryantm.com>";
rycee = "Robert Helgesson <robert@rycee.net>"; rycee = "Robert Helgesson <robert@rycee.net>";
ryneeverett = "Ryne Everett <ryneeverett@gmail.com>"; ryneeverett = "Ryne Everett <ryneeverett@gmail.com>";
s1lvester = "Markus Silvester <s1lvester@bockhacker.me>"; s1lvester = "Markus Silvester <s1lvester@bockhacker.me>";
@ -402,8 +408,8 @@
skeidel = "Sven Keidel <svenkeidel@gmail.com>"; skeidel = "Sven Keidel <svenkeidel@gmail.com>";
skrzyp = "Jakub Skrzypnik <jot.skrzyp@gmail.com>"; skrzyp = "Jakub Skrzypnik <jot.skrzyp@gmail.com>";
sleexyz = "Sean Lee <freshdried@gmail.com>"; sleexyz = "Sean Lee <freshdried@gmail.com>";
solson = "Scott Olson <scott@solson.me>";
smironov = "Sergey Mironov <grrwlf@gmail.com>"; smironov = "Sergey Mironov <grrwlf@gmail.com>";
solson = "Scott Olson <scott@solson.me>";
spacefrogg = "Michael Raitza <spacefrogg-nixos@meterriblecrew.net>"; spacefrogg = "Michael Raitza <spacefrogg-nixos@meterriblecrew.net>";
spencerjanssen = "Spencer Janssen <spencerjanssen@gmail.com>"; spencerjanssen = "Spencer Janssen <spencerjanssen@gmail.com>";
spinus = "Tomasz Czyż <tomasz.czyz@gmail.com>"; spinus = "Tomasz Czyż <tomasz.czyz@gmail.com>";
@ -411,6 +417,7 @@
spwhitt = "Spencer Whitt <sw@swhitt.me>"; spwhitt = "Spencer Whitt <sw@swhitt.me>";
SShrike = "Severen Redwood <severen@shrike.me>"; SShrike = "Severen Redwood <severen@shrike.me>";
stephenmw = "Stephen Weinberg <stephen@q5comm.com>"; stephenmw = "Stephen Weinberg <stephen@q5comm.com>";
sternenseemann = "Lukas Epple <post@lukasepple.de>";
steveej = "Stefan Junker <mail@stefanjunker.de>"; steveej = "Stefan Junker <mail@stefanjunker.de>";
swarren83 = "Shawn Warren <shawn.w.warren@gmail.com>"; swarren83 = "Shawn Warren <shawn.w.warren@gmail.com>";
swistak35 = "Rafał Łasocha <me@swistak35.com>"; swistak35 = "Rafał Łasocha <me@swistak35.com>";
@ -442,15 +449,19 @@
twey = "James Twey Kay <twey@twey.co.uk>"; twey = "James Twey Kay <twey@twey.co.uk>";
uralbash = "Svintsov Dmitry <root@uralbash.ru>"; uralbash = "Svintsov Dmitry <root@uralbash.ru>";
urkud = "Yury G. Kudryashov <urkud+nix@ya.ru>"; urkud = "Yury G. Kudryashov <urkud+nix@ya.ru>";
uwap = "uwap <me@uwap.name>";
vandenoever = "Jos van den Oever <jos@vandenoever.info>"; vandenoever = "Jos van den Oever <jos@vandenoever.info>";
vanzef = "Ivan Solyankin <vanzef@gmail.com>"; vanzef = "Ivan Solyankin <vanzef@gmail.com>";
vbgl = "Vincent Laporte <Vincent.Laporte@gmail.com>"; vbgl = "Vincent Laporte <Vincent.Laporte@gmail.com>";
vbmithr = "Vincent Bernardoff <vb@luminar.eu.org>"; vbmithr = "Vincent Bernardoff <vb@luminar.eu.org>";
vcunat = "Vladimír Čunát <vcunat@gmail.com>"; vcunat = "Vladimír Čunát <vcunat@gmail.com>";
veprbl = "Dmitry Kalinkin <veprbl@gmail.com>";
viric = "Lluís Batlle i Rossell <viric@viric.name>"; viric = "Lluís Batlle i Rossell <viric@viric.name>";
vizanto = "Danny Wilson <danny@prime.vc>"; vizanto = "Danny Wilson <danny@prime.vc>";
vklquevs = "vklquevs <vklquevs@gmail.com>";
vlstill = "Vladimír Štill <xstill@fi.muni.cz>"; vlstill = "Vladimír Štill <xstill@fi.muni.cz>";
vmandela = "Venkateswara Rao Mandela <venkat.mandela@gmail.com>"; vmandela = "Venkateswara Rao Mandela <venkat.mandela@gmail.com>";
volhovm = "Mikhail Volkhov <volhovm.cs@gmail.com>";
vozz = "Oliver Hunt <oliver.huntuk@gmail.com>"; vozz = "Oliver Hunt <oliver.huntuk@gmail.com>";
vrthra = "Rahul Gopinath <rahul@gopinath.org>"; vrthra = "Rahul Gopinath <rahul@gopinath.org>";
wedens = "wedens <kirill.wedens@gmail.com>"; wedens = "wedens <kirill.wedens@gmail.com>";
@ -464,6 +475,7 @@
wscott = "Wayne Scott <wsc9tt@gmail.com>"; wscott = "Wayne Scott <wsc9tt@gmail.com>";
wyvie = "Elijah Rum <elijahrum@gmail.com>"; wyvie = "Elijah Rum <elijahrum@gmail.com>";
yarr = "Dmitry V. <savraz@gmail.com>"; yarr = "Dmitry V. <savraz@gmail.com>";
yochai = "Yochai <yochai@titat.info>";
yurrriq = "Eric Bailey <eric@ericb.me>"; yurrriq = "Eric Bailey <eric@ericb.me>";
z77z = "Marco Maggesi <maggesi@math.unifi.it>"; z77z = "Marco Maggesi <maggesi@math.unifi.it>";
zagy = "Christian Zagrodnick <cz@flyingcircus.io>"; zagy = "Christian Zagrodnick <cz@flyingcircus.io>";
@ -471,6 +483,4 @@
zimbatm = "zimbatm <zimbatm@zimbatm.com>"; zimbatm = "zimbatm <zimbatm@zimbatm.com>";
zohl = "Al Zohali <zohl@fmap.me>"; zohl = "Al Zohali <zohl@fmap.me>";
zoomulator = "Kim Simmons <zoomulator@gmail.com>"; zoomulator = "Kim Simmons <zoomulator@gmail.com>";
amiloradovsky = "Andrew Miloradovsky <miloradovsky@gmail.com>";
yochai = "Yochai <yochai@titat.info>";
} }

View File

@ -69,9 +69,13 @@ rec {
# #
# nix-repl> obj # nix-repl> obj
# { __unfix__ = «lambda»; bar = "bar"; extend = «lambda»; foo = "foo + "; foobar = "foo + bar"; } # { __unfix__ = «lambda»; bar = "bar"; extend = «lambda»; foo = "foo + "; foobar = "foo + bar"; }
makeExtensible = rattrs: makeExtensible = makeExtensibleWithCustomName "extend";
# Same as `makeExtensible` but the name of the extending attribute is
# customized.
makeExtensibleWithCustomName = extenderName: rattrs:
fix' rattrs // { fix' rattrs // {
extend = f: makeExtensible (extends f rattrs); ${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);
}; };
# Flip the order of the arguments of a binary function. # Flip the order of the arguments of a binary function.

View File

@ -164,14 +164,6 @@ following incompatible changes:</para>
PHP has been upgraded to 7.0 PHP has been upgraded to 7.0
</para> </para>
</listitem> </listitem>
<listitem>
<para>PHP now scans for extra configuration .ini files in /etc/php.d
instead of /etc. This prevents accidentally loading non-PHP .ini files
that may be in /etc.
</para>
</listitem>
</itemizedlist> </itemizedlist>

View File

@ -61,6 +61,13 @@ following incompatible changes:</para>
<literal>strippedName</literal>. <literal>strippedName</literal>.
</para> </para>
</listitem> </listitem>
<listitem>
<para>PHP now scans for extra configuration .ini files in /etc/php.d
instead of /etc. This prevents accidentally loading non-PHP .ini files
that may be in /etc.
</para>
</listitem>
</itemizedlist> </itemizedlist>

View File

@ -84,7 +84,7 @@ let cfg = config.system.autoUpgrade; in
${config.system.build.nixos-rebuild}/bin/nixos-rebuild switch ${toString cfg.flags} ${config.system.build.nixos-rebuild}/bin/nixos-rebuild switch ${toString cfg.flags}
''; '';
startAt = optionalString cfg.enable cfg.dates; startAt = optional cfg.enable cfg.dates;
}; };
}; };

View File

@ -276,6 +276,7 @@
telegraf = 256; telegraf = 256;
gitlab-runner = 257; gitlab-runner = 257;
postgrey = 258; postgrey = 258;
hound = 259;
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
@ -522,6 +523,7 @@
#telegraf = 256; # unused #telegraf = 256; # unused
gitlab-runner = 257; gitlab-runner = 257;
postgrey = 258; postgrey = 258;
hound = 259;
# When adding a gid, make sure it doesn't match an existing # When adding a gid, make sure it doesn't match an existing
# uid. Users and groups with the same name should have equal # uid. Users and groups with the same name should have equal

View File

@ -77,6 +77,7 @@
./programs/man.nix ./programs/man.nix
./programs/mosh.nix ./programs/mosh.nix
./programs/nano.nix ./programs/nano.nix
./programs/oblogout.nix
./programs/screen.nix ./programs/screen.nix
./programs/shadow.nix ./programs/shadow.nix
./programs/shell.nix ./programs/shell.nix
@ -166,6 +167,7 @@
./services/desktops/gnome3/gnome-keyring.nix ./services/desktops/gnome3/gnome-keyring.nix
./services/desktops/gnome3/gnome-online-accounts.nix ./services/desktops/gnome3/gnome-online-accounts.nix
./services/desktops/gnome3/gnome-online-miners.nix ./services/desktops/gnome3/gnome-online-miners.nix
./services/desktops/gnome3/gnome-terminal-server.nix
./services/desktops/gnome3/gnome-user-share.nix ./services/desktops/gnome3/gnome-user-share.nix
./services/desktops/gnome3/gvfs.nix ./services/desktops/gnome3/gvfs.nix
./services/desktops/gnome3/seahorse.nix ./services/desktops/gnome3/seahorse.nix
@ -312,6 +314,7 @@
./services/monitoring/uptime.nix ./services/monitoring/uptime.nix
./services/monitoring/zabbix-agent.nix ./services/monitoring/zabbix-agent.nix
./services/monitoring/zabbix-server.nix ./services/monitoring/zabbix-server.nix
./services/network-filesystems/cachefilesd.nix
./services/network-filesystems/drbd.nix ./services/network-filesystems/drbd.nix
./services/network-filesystems/netatalk.nix ./services/network-filesystems/netatalk.nix
./services/network-filesystems/nfsd.nix ./services/network-filesystems/nfsd.nix
@ -455,6 +458,7 @@
./services/scheduling/fcron.nix ./services/scheduling/fcron.nix
./services/scheduling/marathon.nix ./services/scheduling/marathon.nix
./services/search/elasticsearch.nix ./services/search/elasticsearch.nix
./services/search/hound.nix
./services/search/kibana.nix ./services/search/kibana.nix
./services/search/solr.nix ./services/search/solr.nix
./services/security/clamav.nix ./services/security/clamav.nix
@ -492,6 +496,7 @@
./services/web-apps/pump.io.nix ./services/web-apps/pump.io.nix
./services/web-apps/tt-rss.nix ./services/web-apps/tt-rss.nix
./services/web-apps/selfoss.nix ./services/web-apps/selfoss.nix
./services/web-apps/quassel-webserver.nix
./services/web-servers/apache-httpd/default.nix ./services/web-servers/apache-httpd/default.nix
./services/web-servers/caddy.nix ./services/web-servers/caddy.nix
./services/web-servers/fcgiwrap.nix ./services/web-servers/fcgiwrap.nix
@ -531,6 +536,7 @@
./services/x11/window-managers/fluxbox.nix ./services/x11/window-managers/fluxbox.nix
./services/x11/window-managers/icewm.nix ./services/x11/window-managers/icewm.nix
./services/x11/window-managers/bspwm.nix ./services/x11/window-managers/bspwm.nix
./services/x11/window-managers/bspwm-unstable.nix
./services/x11/window-managers/metacity.nix ./services/x11/window-managers/metacity.nix
./services/x11/window-managers/none.nix ./services/x11/window-managers/none.nix
./services/x11/window-managers/twm.nix ./services/x11/window-managers/twm.nix

View File

@ -0,0 +1,160 @@
# Global configuration for oblogout.
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.programs.oblogout;
in
{
###### interface
options = {
programs.oblogout = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to install OBLogout and create <filename>/etc/oblogout.conf</filename>.
See <filename>${pkgs.oblogout}/share/doc/README</filename>.
'';
};
opacity = mkOption {
type = types.int;
default = 70;
description = ''
'';
};
bgcolor = mkOption {
type = types.str;
default = "black";
description = ''
'';
};
buttontheme = mkOption {
type = types.str;
default = "simplistic";
description = ''
'';
};
buttons = mkOption {
type = types.str;
default = "cancel, logout, restart, shutdown, suspend, hibernate";
description = ''
'';
};
cancel = mkOption {
type = types.str;
default = "Escape";
description = ''
'';
};
shutdown = mkOption {
type = types.str;
default = "S";
description = ''
'';
};
restart = mkOption {
type = types.str;
default = "R";
description = ''
'';
};
suspend = mkOption {
type = types.str;
default = "U";
description = ''
'';
};
logout = mkOption {
type = types.str;
default = "L";
description = ''
'';
};
lock = mkOption {
type = types.str;
default = "K";
description = ''
'';
};
hibernate = mkOption {
type = types.str;
default = "H";
description = ''
'';
};
clogout = mkOption {
type = types.str;
default = "openbox --exit";
description = ''
'';
};
clock = mkOption {
type = types.str;
default = "";
description = ''
'';
};
cswitchuser = mkOption {
type = types.str;
default = "";
description = ''
'';
};
};
};
###### implementation
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.oblogout ];
environment.etc."oblogout.conf".text = ''
[settings]
usehal = false
[looks]
opacity = ${toString cfg.opacity}
bgcolor = ${cfg.bgcolor}
buttontheme = ${cfg.buttontheme}
buttons = ${cfg.buttons}
[shortcuts]
cancel = ${cfg.cancel}
shutdown = ${cfg.shutdown}
restart = ${cfg.restart}
suspend = ${cfg.suspend}
logout = ${cfg.logout}
lock = ${cfg.lock}
hibernate = ${cfg.hibernate}
[commands]
shutdown = systemctl poweroff
restart = systemctl reboot
suspend = systemctl suspend
hibernate = systemctl hibernate
logout = ${cfg.clogout}
lock = ${cfg.clock}
switchuser = ${cfg.cswitchuser}
'';
};
}

View File

@ -74,7 +74,28 @@ options for the <literal>security.acme</literal> module.</para>
</para> </para>
<programlisting> <programlisting>
security.acme.certs."foo.example.com" = {
webroot = "/var/www/challenges";
email = "foo@example.com";
user = "nginx";
group = "nginx";
postRun = "systemctl restart nginx.service";
};
services.nginx.httpConfig = '' services.nginx.httpConfig = ''
server {
server_name foo.example.com;
listen 80;
listen [::]:80;
location /.well-known/acme-challenge {
root /var/www/challenges;
}
location / {
return 301 https://$host$request_uri;
}
}
server { server {
server_name foo.example.com; server_name foo.example.com;
listen 443 ssl; listen 443 ssl;

View File

@ -104,7 +104,11 @@ in {
description = "Kernel Auditing"; description = "Kernel Auditing";
wantedBy = [ "basic.target" ]; wantedBy = [ "basic.target" ];
unitConfig.ConditionVirtualization = "!container"; unitConfig = {
ConditionVirtualization = "!container";
ConditionSecurity = [ "audit" ];
};
path = [ pkgs.audit ]; path = [ pkgs.audit ];

View File

@ -67,9 +67,9 @@ in
system.requiredKernelConfig = with config.lib.kernelConfig; system.requiredKernelConfig = with config.lib.kernelConfig;
[ (isEnabled "GRKERNSEC") [ (isEnabled "GRKERNSEC")
(isEnabled "PAX") (isEnabled "PAX")
(isYES "GRKERNSEC_SYSCTL") (isYes "GRKERNSEC_SYSCTL")
(isYES "GRKERNSEC_SYSCTL_DISTRO") (isYes "GRKERNSEC_SYSCTL_DISTRO")
(isNO "GRKERNSEC_NO_RBAC") (isNo "GRKERNSEC_NO_RBAC")
]; ];
nixpkgs.config.grsecurity = true; nixpkgs.config.grsecurity = true;

View File

@ -49,7 +49,7 @@ in {
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.str; type = types.lines;
default = ""; default = "";
description = '' description = ''
Extra directives added to to the end of MPD's configuration file, Extra directives added to to the end of MPD's configuration file,

View File

@ -340,6 +340,7 @@ in {
extraConfig = mkOption { extraConfig = mkOption {
default = ""; default = "";
type = types.lines;
description = '' description = ''
Extra configuration for Bacula Director Daemon. Extra configuration for Bacula Director Daemon.
''; '';

View File

@ -5,34 +5,34 @@ with lib;
let let
cfg = config.services.neo4j; cfg = config.services.neo4j;
serverConfig = pkgs.writeText "neo4j-server.properties" '' serverConfig = pkgs.writeText "neo4j.conf" ''
org.neo4j.server.database.location=${cfg.dataDir}/data/graph.db dbms.directories.data=${cfg.dataDir}/data
org.neo4j.server.webserver.address=${cfg.listenAddress} dbms.directories.certificates=${cfg.certDir}
org.neo4j.server.webserver.port=${toString cfg.port} dbms.directories.logs=${cfg.dataDir}/logs
${optionalString cfg.enableHttps '' dbms.directories.plugins=${cfg.dataDir}/plugins
org.neo4j.server.webserver.https.enabled=true dbms.connector.http.type=HTTP
org.neo4j.server.webserver.https.port=${toString cfg.httpsPort} dbms.connector.http.enabled=true
org.neo4j.server.webserver.https.cert.location=${cfg.cert} dbms.connector.http.address=${cfg.listenAddress}:${toString cfg.port}
org.neo4j.server.webserver.https.key.location=${cfg.key} ${optionalString cfg.enableBolt ''
org.neo4j.server.webserver.https.keystore.location=${cfg.dataDir}/data/keystore dbms.connector.bolt.type=BOLT
dbms.connector.bolt.enabled=true
dbms.connector.bolt.tls_level=OPTIONAL
dbms.connector.bolt.address=${cfg.listenAddress}:${toString cfg.boltPort}
''} ''}
org.neo4j.server.webadmin.rrdb.location=${cfg.dataDir}/data/rrd ${optionalString cfg.enableHttps ''
org.neo4j.server.webadmin.data.uri=/db/data/ dbms.connector.https.type=HTTP
org.neo4j.server.webadmin.management.uri=/db/manage/ dbms.connector.https.enabled=true
org.neo4j.server.db.tuning.properties=${cfg.package}/share/neo4j/conf/neo4j.properties dbms.connector.https.encryption=TLS
org.neo4j.server.manage.console_engines=shell dbms.connector.https.address=${cfg.listenAddress}:${toString cfg.httpsPort}
''}
dbms.shell.enabled=true
${cfg.extraServerConfig} ${cfg.extraServerConfig}
''; '';
loggingConfig = pkgs.writeText "logging.properties" cfg.loggingConfig;
wrapperConfig = pkgs.writeText "neo4j-wrapper.conf" '' wrapperConfig = pkgs.writeText "neo4j-wrapper.conf" ''
wrapper.java.additional=-Dorg.neo4j.server.properties=${serverConfig} dbms.jvm.additional=-Dunsupported.dbms.udc.source=tarball
wrapper.java.additional=-Djava.util.logging.config.file=${loggingConfig} dbms.jvm.additional=-XX:+UseConcMarkSweepGC
wrapper.java.additional=-XX:+UseConcMarkSweepGC dbms.jvm.additional=-XX:+CMSClassUnloadingEnabled
wrapper.java.additional=-XX:+CMSClassUnloadingEnabled
wrapper.pidfile=${cfg.dataDir}/neo4j-server.pid
wrapper.name=neo4j
''; '';
in { in {
@ -65,6 +65,18 @@ in {
type = types.int; type = types.int;
}; };
enableBolt = mkOption {
description = "Enable bolt for Neo4j.";
default = true;
type = types.bool;
};
boltPort = mkOption {
description = "Neo4j port to listen for BOLT traffic.";
default = 7687;
type = types.int;
};
enableHttps = mkOption { enableHttps = mkOption {
description = "Enable https for Neo4j."; description = "Enable https for Neo4j.";
default = false; default = false;
@ -77,15 +89,9 @@ in {
type = types.int; type = types.int;
}; };
cert = mkOption { certDir = mkOption {
description = "Neo4j https certificate."; description = "Neo4j TLS certificates directory.";
default = "${cfg.dataDir}/conf/ssl/neo4j.cert"; default = "${cfg.dataDir}/certificates";
type = types.path;
};
key = mkOption {
description = "Neo4j https certificate key.";
default = "${cfg.dataDir}/conf/ssl/neo4j.key";
type = types.path; type = types.path;
}; };
@ -95,26 +101,11 @@ in {
type = types.path; type = types.path;
}; };
loggingConfig = mkOption {
description = "Neo4j logging configuration.";
default = ''
handlers=java.util.logging.ConsoleHandler
.level=INFO
org.neo4j.server.level=INFO
java.util.logging.ConsoleHandler.level=INFO
java.util.logging.ConsoleHandler.formatter=org.neo4j.server.logging.SimpleConsoleFormatter
java.util.logging.ConsoleHandler.filter=org.neo4j.server.logging.NeoLogFilter
'';
type = types.lines;
};
extraServerConfig = mkOption { extraServerConfig = mkOption {
description = "Extra configuration for neo4j server."; description = "Extra configuration for neo4j server.";
default = ""; default = "";
type = types.lines; type = types.lines;
}; };
}; };
###### implementation ###### implementation
@ -124,14 +115,18 @@ in {
description = "Neo4j Daemon"; description = "Neo4j Daemon";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" ]; after = [ "network.target" ];
environment = { NEO4J_INSTANCE = cfg.dataDir; }; environment = {
NEO4J_HOME = "${cfg.package}/share/neo4j";
NEO4J_CONF = "${cfg.dataDir}/conf";
};
serviceConfig = { serviceConfig = {
ExecStart = "${cfg.package}/bin/neo4j console"; ExecStart = "${cfg.package}/bin/neo4j console";
User = "neo4j"; User = "neo4j";
PermissionsStartOnly = true; PermissionsStartOnly = true;
}; };
preStart = '' preStart = ''
mkdir -m 0700 -p ${cfg.dataDir}/{data/graph.db,conf} mkdir -m 0700 -p ${cfg.dataDir}/{data/graph.db,conf,logs}
ln -fs ${serverConfig} ${cfg.dataDir}/conf/neo4j.conf
ln -fs ${wrapperConfig} ${cfg.dataDir}/conf/neo4j-wrapper.conf ln -fs ${wrapperConfig} ${cfg.dataDir}/conf/neo4j-wrapper.conf
if [ "$(id -u)" = 0 ]; then chown -R neo4j ${cfg.dataDir}; fi if [ "$(id -u)" = 0 ]; then chown -R neo4j ${cfg.dataDir}; fi
''; '';
@ -146,5 +141,4 @@ in {
home = cfg.dataDir; home = cfg.dataDir;
}; };
}; };
} }

View File

@ -53,6 +53,13 @@ in
description = "The database directory."; description = "The database directory.";
}; };
configDir = mkOption {
type = types.nullOr types.path;
default = null;
description = "Use this optional config directory instead of using slapd.conf";
example = "/var/db/slapd.d";
};
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
@ -96,7 +103,7 @@ in
mkdir -p ${cfg.dataDir} mkdir -p ${cfg.dataDir}
chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir} chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}
''; '';
serviceConfig.ExecStart = "${openldap.out}/libexec/slapd -u ${cfg.user} -g ${cfg.group} -d 0 -h \"${concatStringsSep " " cfg.urlList}\" -f ${configFile}"; serviceConfig.ExecStart = "${openldap.out}/libexec/slapd -u ${cfg.user} -g ${cfg.group} -d 0 -h \"${concatStringsSep " " cfg.urlList}\" ${if cfg.configDir == null then "-f "+configFile else "-F "+cfg.configDir}";
}; };
users.extraUsers.openldap = users.extraUsers.openldap =

View File

@ -37,6 +37,8 @@ in
services.dbus.packages = [ gnome3.evolution_data_server ]; services.dbus.packages = [ gnome3.evolution_data_server ];
systemd.packages = [ gnome3.evolution_data_server ];
}; };
} }

View File

@ -0,0 +1,44 @@
# GNOME Documents daemon.
{ config, pkgs, lib, ... }:
with lib;
let
gnome3 = config.environment.gnome3.packageSet;
in
{
###### interface
options = {
services.gnome3.gnome-terminal-server = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable GNOME Terminal server service,
needed for gnome-terminal.
'';
};
};
};
###### implementation
config = mkIf config.services.gnome3.gnome-terminal-server.enable {
environment.systemPackages = [ gnome3.gnome_terminal ];
services.dbus.packages = [ gnome3.gnome_terminal ];
systemd.packages = [ gnome3.gnome_terminal ];
};
}

View File

@ -37,6 +37,8 @@ in
services.dbus.packages = [ gnome3.gvfs ]; services.dbus.packages = [ gnome3.gvfs ];
systemd.packages = [ gnome3.gvfs ];
services.udev.packages = [ pkgs.libmtp.bin ]; services.udev.packages = [ pkgs.libmtp.bin ];
}; };

View File

@ -37,6 +37,8 @@ in
services.dbus.packages = [ gnome3.tracker ]; services.dbus.packages = [ gnome3.tracker ];
systemd.packages = [ gnome3.tracker ];
}; };
} }

View File

@ -28,7 +28,7 @@ in {
}; };
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.brltty}/bin/brltty --no-daemon"; ExecStart = "${pkgs.brltty}/bin/brltty --no-daemon";
Type = "simple"; # Change to notidy after next releae Type = "notify";
TimeoutStartSec = 5; TimeoutStartSec = 5;
TimeoutStopSec = 10; TimeoutStopSec = 10;
Restart = "always"; Restart = "always";

View File

@ -40,7 +40,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.str; type = types.lines;
default = ""; default = "";
description = "Additional configuration variables for TLP"; description = "Additional configuration variables for TLP";
}; };

View File

@ -111,7 +111,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.str; type = types.lines;
default = ""; default = "";
example = "mail_debug = yes"; example = "mail_debug = yes";
description = "Additional entries to put verbatim into Dovecot's config file."; description = "Additional entries to put verbatim into Dovecot's config file.";

View File

@ -1,17 +1,16 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with pkgs;
with lib; with lib;
let let
cfg = config.services.opensmtpd; cfg = config.services.opensmtpd;
conf = writeText "smtpd.conf" cfg.serverConfiguration; conf = pkgs.writeText "smtpd.conf" cfg.serverConfiguration;
args = concatStringsSep " " cfg.extraServerArgs; args = concatStringsSep " " cfg.extraServerArgs;
sendmail = pkgs.runCommand "opensmtpd-sendmail" {} '' sendmail = pkgs.runCommand "opensmtpd-sendmail" {} ''
mkdir -p $out/bin mkdir -p $out/bin
ln -s ${opensmtpd}/sbin/smtpctl $out/bin/sendmail ln -s ${pkgs.opensmtpd}/sbin/smtpctl $out/bin/sendmail
''; '';
in { in {
@ -48,21 +47,19 @@ in {
}; };
serverConfiguration = mkOption { serverConfiguration = mkOption {
type = types.string; type = types.lines;
default = "";
example = '' example = ''
listen on lo listen on lo
accept for any deliver to lmtp localhost:24 accept for any deliver to lmtp localhost:24
''; '';
description = '' description = ''
The contents of the smtpd.conf configuration file. See the The contents of the smtpd.conf configuration file. See the
OpenSMTPD documentation for syntax information. If this option OpenSMTPD documentation for syntax information.
is left empty, the OpenSMTPD server will not start.
''; '';
}; };
procPackages = mkOption { procPackages = mkOption {
type = types.listOf types.path; type = types.listOf types.package;
default = []; default = [];
description = '' description = ''
Packages to search for filters, tables, queues, and schedulers. Packages to search for filters, tables, queues, and schedulers.
@ -100,12 +97,11 @@ in {
systemd.services.opensmtpd = let systemd.services.opensmtpd = let
procEnv = pkgs.buildEnv { procEnv = pkgs.buildEnv {
name = "opensmtpd-procs"; name = "opensmtpd-procs";
paths = [ opensmtpd ] ++ cfg.procPackages; paths = [ pkgs.opensmtpd ] ++ cfg.procPackages;
pathsToLink = [ "/libexec/opensmtpd" ]; pathsToLink = [ "/libexec/opensmtpd" ];
}; };
in { in {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
wants = [ "network.target" ];
after = [ "network.target" ]; after = [ "network.target" ];
preStart = '' preStart = ''
mkdir -p /var/spool/smtpd mkdir -p /var/spool/smtpd
@ -119,7 +115,7 @@ in {
chown smtpq.root /var/spool/smtpd/purge chown smtpq.root /var/spool/smtpd/purge
chmod 700 /var/spool/smtpd/purge chmod 700 /var/spool/smtpd/purge
''; '';
serviceConfig.ExecStart = "${opensmtpd}/sbin/smtpd -d -f ${conf} ${args}"; serviceConfig.ExecStart = "${pkgs.opensmtpd}/sbin/smtpd -d -f ${conf} ${args}";
environment.OPENSMTPD_PROC_PATH = "${procEnv}/libexec/opensmtpd"; environment.OPENSMTPD_PROC_PATH = "${procEnv}/libexec/opensmtpd";
}; };

View File

@ -53,7 +53,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.str; type = types.lines;
description = '' description = ''
Extra configuration for bepasty server to be appended on the Extra configuration for bepasty server to be appended on the
configuration. configuration.

View File

@ -2,6 +2,10 @@
with lib; with lib;
let
cfg = config.services.dictd;
in
{ {
###### interface ###### interface
@ -20,7 +24,7 @@ with lib;
DBs = mkOption { DBs = mkOption {
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = with pkgs.dictdDBs; [ wiktionary wordnet ];
example = [ pkgs.dictdDBs.nld2eng ]; example = [ pkgs.dictdDBs.nld2eng ];
description = ''List of databases to make available.''; description = ''List of databases to make available.'';
}; };
@ -34,8 +38,8 @@ with lib;
config = let dictdb = pkgs.dictDBCollector { dictlist = map (x: { config = let dictdb = pkgs.dictDBCollector { dictlist = map (x: {
name = x.name; name = x.name;
filename = x; } ) config.services.dictd.DBs; }; filename = x; } ) cfg.DBs; };
in mkIf config.services.dictd.enable { in mkIf cfg.enable {
# get the command line client on system path to make some use of the service # get the command line client on system path to make some use of the service
environment.systemPackages = [ pkgs.dict ]; environment.systemPackages = [ pkgs.dict ];

View File

@ -463,6 +463,7 @@ in {
systemd.services.gitlab = { systemd.services.gitlab = {
after = [ "network.target" "postgresql.service" "redis.service" ]; after = [ "network.target" "postgresql.service" "redis.service" ];
requires = [ "gitlab-sidekiq.service" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
environment = gitlabEnv; environment = gitlabEnv;
path = with pkgs; [ path = with pkgs; [

View File

@ -53,7 +53,7 @@ in
systemd.services.nix-gc = systemd.services.nix-gc =
{ description = "Nix Garbage Collector"; { description = "Nix Garbage Collector";
script = "exec ${config.nix.package.out}/bin/nix-collect-garbage ${cfg.options}"; script = "exec ${config.nix.package.out}/bin/nix-collect-garbage ${cfg.options}";
startAt = optionalString cfg.automatic cfg.dates; startAt = optional cfg.automatic cfg.dates;
}; };
}; };

View File

@ -41,7 +41,7 @@ in
systemd.services.nix-optimise = systemd.services.nix-optimise =
{ description = "Nix Store Optimiser"; { description = "Nix Store Optimiser";
serviceConfig.ExecStart = "${config.nix.package}/bin/nix-store --optimise"; serviceConfig.ExecStart = "${config.nix.package}/bin/nix-store --optimise";
startAt = optional cfg.automatic cfg.dates; startAt = optionals cfg.automatic cfg.dates;
}; };
}; };

View File

@ -71,7 +71,7 @@ in {
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.str; type = types.lines;
default = ""; default = "";
description = "Extra configuration in configuration.yml"; description = "Extra configuration in configuration.yml";
}; };

View File

@ -107,7 +107,7 @@ in {
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.string; type = types.lines;
default = ""; default = "";
description = '' description = ''
Extra configuration options for Bosun. You should describe your Extra configuration options for Bosun. You should describe your

View File

@ -167,7 +167,7 @@ in {
CACHE_TYPE: 'filesystem' CACHE_TYPE: 'filesystem'
CACHE_DIR: '/tmp/graphite-api-cache' CACHE_DIR: '/tmp/graphite-api-cache'
''; '';
type = types.str; type = types.lines;
}; };
}; };

View File

@ -100,6 +100,7 @@ in
extraConfig = mkOption { extraConfig = mkOption {
default = ""; default = "";
type = types.lines;
description = '' description = ''
<filename>munin-node.conf</filename> extra configuration. See <filename>munin-node.conf</filename> extra configuration. See
<link xlink:href='http://munin-monitoring.org/wiki/munin-node.conf' /> <link xlink:href='http://munin-monitoring.org/wiki/munin-node.conf' />

View File

@ -50,6 +50,7 @@ in {
systemd.services.riemann-health = { systemd.services.riemann-health = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
path = [ procps ];
serviceConfig = { serviceConfig = {
User = "riemanntools"; User = "riemanntools";
ExecStart = "${healthLauncher}/bin/riemann-health"; ExecStart = "${healthLauncher}/bin/riemann-health";

View File

@ -53,6 +53,7 @@ in
extraConfig = mkOption { extraConfig = mkOption {
default = ""; default = "";
type = types.lines;
description = '' description = ''
Configuration that is injected verbatim into the configuration file. Configuration that is injected verbatim into the configuration file.
''; '';

View File

@ -0,0 +1,59 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.services.cachefilesd;
cfgFile = pkgs.writeText "cachefilesd.conf" ''
dir ${cfg.cacheDir}
${cfg.extraConfig}
'';
in
{
options = {
services.cachefilesd = {
enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable cachefilesd network filesystems caching daemon.";
};
cacheDir = mkOption {
type = types.str;
default = "/var/cache/fscache";
description = "Directory to contain filesystem cache.";
};
extraConfig = mkOption {
type = types.lines;
default = "";
example = "brun 10%";
description = "Additional configuration file entries. See cachefilesd.conf(5) for more information.";
};
};
};
###### implementation
config = mkIf cfg.enable {
systemd.services.cachefilesd = {
description = "Local network file caching management daemon";
wantedBy = [ "multi-user.target" ];
path = [ pkgs.kmod pkgs.cachefilesd ];
script = ''
modprobe -qab cachefiles
mkdir -p ${cfg.cacheDir}
chmod 700 ${cfg.cacheDir}
exec cachefilesd -n -f ${cfgFile}
'';
};
};
}

View File

@ -153,6 +153,7 @@ in
''; '';
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
default = ""; default = "";
example = '' example = ''
# specify whether SSL is required # specify whether SSL is required
@ -173,6 +174,7 @@ in
replication = { replication = {
enable = mkEnableOption "XtreemFS DIR replication plugin"; enable = mkEnableOption "XtreemFS DIR replication plugin";
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
example = '' example = ''
# participants of the replication including this replica # participants of the replication including this replica
babudb.repl.participant.0 = 192.168.0.10 babudb.repl.participant.0 = 192.168.0.10
@ -269,6 +271,7 @@ in
''; '';
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
example = '' example = ''
osd_check_interval = 300 osd_check_interval = 300
no_atime = true no_atime = true
@ -307,6 +310,7 @@ in
replication = { replication = {
enable = mkEnableOption "XtreemFS MRC replication plugin"; enable = mkEnableOption "XtreemFS MRC replication plugin";
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
example = '' example = ''
# participants of the replication including this replica # participants of the replication including this replica
babudb.repl.participant.0 = 192.168.0.10 babudb.repl.participant.0 = 192.168.0.10
@ -385,6 +389,7 @@ in
''; '';
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
example = '' example = ''
local_clock_renewal = 0 local_clock_renewal = 0
remote_time_sync = 30000 remote_time_sync = 30000

View File

@ -20,13 +20,27 @@ in
default = false; default = false;
type = types.bool; type = types.bool;
description = '' description = ''
Whenever to enable the atftpd TFTP server. Whether to enable the atftpd TFTP server. By default, the server
binds to address 0.0.0.0.
'';
};
extraOptions = mkOption {
default = [];
type = types.listOf types.str;
example = literalExample ''
[ "--bind-address 192.168.9.1"
"--verbose=7"
]
'';
description = ''
Extra command line arguments to pass to atftp.
''; '';
}; };
root = mkOption { root = mkOption {
default = "/var/empty"; default = "/srv/tftp";
type = types.str; type = types.path;
description = '' description = ''
Document root directory for the atftpd. Document root directory for the atftpd.
''; '';
@ -39,11 +53,11 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.services.atftpd = { systemd.services.atftpd = {
description = "atftpd TFTP server"; description = "TFTP Server";
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
# runs as nobody # runs as nobody
serviceConfig.ExecStart = "${pkgs.atftp}/sbin/atftpd --daemon --no-fork --bind-address 0.0.0.0 ${cfg.root}"; serviceConfig.ExecStart = "${pkgs.atftp}/sbin/atftpd --daemon --no-fork ${lib.concatStringsSep " " cfg.extraOptions} ${cfg.root}";
}; };
}; };

View File

@ -175,11 +175,20 @@ in
environment.systemPackages = [ pkgs.avahi ]; environment.systemPackages = [ pkgs.avahi ];
systemd.sockets.avahi-daemon =
{ description = "Avahi mDNS/DNS-SD Stack Activation Socket";
listenStreams = [ "/var/run/avahi-daemon/socket" ];
wantedBy = [ "sockets.target" ];
};
systemd.services.avahi-daemon = systemd.services.avahi-daemon =
{ description = "Avahi daemon"; { description = "Avahi mDNS/DNS-SD Stack";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
# Receive restart event after resume requires = [ "avahi-daemon.socket" ];
partOf = [ "post-resume.target" ];
serviceConfig."NotifyAccess" = "main";
serviceConfig."BusName" = "org.freedesktop.Avahi";
serviceConfig."Type" = "dbus";
path = [ pkgs.coreutils pkgs.avahi ]; path = [ pkgs.coreutils pkgs.avahi ];

View File

@ -113,6 +113,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
default = ""; default = "";
description = " description = "
Extra lines to be added verbatim to the generated named configuration file. Extra lines to be added verbatim to the generated named configuration file.

View File

@ -51,6 +51,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
default = ""; default = "";
description = '' description = ''
Extra configuration directives that should be added to Extra configuration directives that should be added to

View File

@ -1,11 +0,0 @@
pubs=($pubs)
hosts=($hosts)
lines="''\n"
for ((i = 0; i < ${#pubs[*]}; i++)); do
addr=$($cjdns/bin/publictoip6 ${pubs[i]})
lines="${lines}$addr ${hosts[i]}\n"
done
lines="${lines}''"
echo -ne $lines > $out

View File

@ -28,21 +28,18 @@ let
}; };
}; };
peers = mapAttrsToList (n: v: v) (cfg.ETHInterface.connectTo // cfg.UDPInterface.connectTo); # Additional /etc/hosts entries for peers with an associated hostname
cjdnsExtraHosts = import (pkgs.runCommand "cjdns-hosts" {}
pubs = toString (map (p: if p.hostname == "" then "" else p.publicKey) peers); # Generate a builder that produces an output usable as a Nix string value
hosts = toString (map (p: if p.hostname == "" then "" else p.hostname) peers); ''
exec >$out
cjdnsHosts = echo \'\'
if hosts != "" then ${concatStringsSep "\n" (mapAttrsToList (k: v:
import (pkgs.stdenv.mkDerivation { optionalString (v.hostname != "")
name = "cjdns-hosts"; "echo $(${pkgs.cjdns}/bin/publictoip6 ${x.key}) ${x.host}")
builder = ./cjdns-hosts.sh; (cfg.ETHInterface.connectTo // cfg.UDPInterface.connectTo))}
echo \'\'
inherit (pkgs) cjdns; '');
inherit pubs hosts;
})
else "";
parseModules = x: parseModules = x:
x // { connectTo = mapAttrs (name: value: { inherit (value) password publicKey; }) x.connectTo; }; x // { connectTo = mapAttrs (name: value: { inherit (value) password publicKey; }) x.connectTo; };
@ -95,8 +92,8 @@ in
}; };
confFile = mkOption { confFile = mkOption {
type = types.str; type = types.nullOr types.path;
default = ""; default = null;
example = "/etc/cjdroute.conf"; example = "/etc/cjdroute.conf";
description = '' description = ''
Ignore all other cjdns options and load configuration from this file. Ignore all other cjdns options and load configuration from this file.
@ -112,14 +109,14 @@ in
"49275fut6tmzu354pq70sr5b95qq0vj" "49275fut6tmzu354pq70sr5b95qq0vj"
]; ];
description = '' description = ''
Any remote cjdns nodes that offer these passwords on Any remote cjdns nodes that offer these passwords on
connection will be allowed to route through this node. connection will be allowed to route through this node.
''; '';
}; };
admin = { admin = {
bind = mkOption { bind = mkOption {
type = types.string; type = types.str;
default = "127.0.0.1:11234"; default = "127.0.0.1:11234";
description = '' description = ''
Bind the administration port to this address and port. Bind the administration port to this address and port.
@ -129,7 +126,7 @@ in
UDPInterface = { UDPInterface = {
bind = mkOption { bind = mkOption {
type = types.string; type = types.str;
default = ""; default = "";
example = "192.168.1.32:43211"; example = "192.168.1.32:43211";
description = '' description = ''
@ -154,6 +151,7 @@ in
ETHInterface = { ETHInterface = {
bind = mkOption { bind = mkOption {
type = types.str;
default = ""; default = "";
example = "eth0"; example = "eth0";
description = description =
@ -201,7 +199,7 @@ in
}; };
config = mkIf config.services.cjdns.enable { config = mkIf cfg.enable {
boot.kernelModules = [ "tun" ]; boot.kernelModules = [ "tun" ];
@ -212,7 +210,7 @@ in
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" ]; after = [ "network.target" ];
preStart = if cfg.confFile != "" then "" else '' preStart = if cfg.confFile != null then "" else ''
[ -e /etc/cjdns.keys ] && source /etc/cjdns.keys [ -e /etc/cjdns.keys ] && source /etc/cjdns.keys
if [ -z "$CJDNS_PRIVATE_KEY" ]; then if [ -z "$CJDNS_PRIVATE_KEY" ]; then
@ -228,13 +226,13 @@ in
fi fi
if [ -z "$CJDNS_ADMIN_PASSWORD" ]; then if [ -z "$CJDNS_ADMIN_PASSWORD" ]; then
echo "CJDNS_ADMIN_PASSWORD=$(${pkgs.coreutils}/bin/head -c 96 /dev/urandom | ${pkgs.coreutils}/bin/tr -dc A-Za-z0-9)" \ echo "CJDNS_ADMIN_PASSWORD=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 96)" \
>> /etc/cjdns.keys >> /etc/cjdns.keys
fi fi
''; '';
script = ( script = (
if cfg.confFile != "" then "${pkg}/bin/cjdroute < ${cfg.confFile}" else if cfg.confFile != null then "${pkg}/bin/cjdroute < ${cfg.confFile}" else
'' ''
source /etc/cjdns.keys source /etc/cjdns.keys
echo '${cjdrouteConf}' | sed \ echo '${cjdrouteConf}' | sed \
@ -247,13 +245,16 @@ in
serviceConfig = { serviceConfig = {
Type = "forking"; Type = "forking";
Restart = "on-failure"; Restart = "on-failure";
ProtectHome = true;
PrivateTmp = true;
}; };
}; };
networking.extraHosts = "${cjdnsHosts}"; networking.extraHosts = cjdnsExtraHosts;
assertions = [ assertions = [
{ assertion = ( cfg.ETHInterface.bind != "" || cfg.UDPInterface.bind != "" || cfg.confFile != "" ); { assertion = ( cfg.ETHInterface.bind != "" || cfg.UDPInterface.bind != "" || cfg.confFile != null );
message = "Neither cjdns.ETHInterface.bind nor cjdns.UDPInterface.bind defined."; message = "Neither cjdns.ETHInterface.bind nor cjdns.UDPInterface.bind defined.";
} }
{ assertion = config.networking.enableIPv6; { assertion = config.networking.enableIPv6;

View File

@ -61,6 +61,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
default = ""; default = "";
description = "Verbatim contents of <filename>cntlm.conf</filename>."; description = "Verbatim contents of <filename>cntlm.conf</filename>.";
}; };

View File

@ -89,7 +89,7 @@ in
extraConfig = mkOption { extraConfig = mkOption {
default = ""; default = "";
type = str; type = lines;
description = '' description = ''
Extra configuration. Contents will be added verbatim to the configuration file. Extra configuration. Contents will be added verbatim to the configuration file.
''; '';

View File

@ -47,6 +47,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
default = ""; default = "";
example = '' example = ''
option subnet-mask 255.255.255.0; option subnet-mask 255.255.255.0;

View File

@ -35,7 +35,11 @@ in
options = { options = {
services.dnscrypt-proxy = { services.dnscrypt-proxy = {
enable = mkEnableOption "DNSCrypt client proxy"; enable = mkOption {
default = false;
type = types.bool;
description = "Whether to enable the DNSCrypt client proxy";
};
localAddress = mkOption { localAddress = mkOption {
default = "127.0.0.1"; default = "127.0.0.1";

View File

@ -49,8 +49,8 @@
<para> <para>
<programlisting> <programlisting>
{ {
services.dnsmasq.enable = true; services.dnsmasq.enable = true;
services.dnsmasq.servers = [ "127.0.0.1#43" ]; services.dnsmasq.servers = [ "127.0.0.1#43" ];
} }
</programlisting> </programlisting>
</para> </para>
@ -60,12 +60,9 @@
<para> <para>
<programlisting> <programlisting>
{ {
networking.nameservers = [ "127.0.0.1" ]; networking.nameservers = [ "127.0.0.1" ];
services.unbound.enable = true; services.unbound.enable = true;
services.unbound.forwardAddresses = [ "127.0.0.1@43" ]; services.unbound.forwardAddresses = [ "127.0.0.1@43" ];
services.unbound.extraConfig = ''
do-not-query-localhost: no
'';
} }
</programlisting> </programlisting>
</para> </para>

View File

@ -140,7 +140,7 @@ in
ieee80211n=1 ieee80211n=1
ht_capab=[HT40-][SHORT-GI-40][DSSS_CCK-40] ht_capab=[HT40-][SHORT-GI-40][DSSS_CCK-40]
''; '';
type = types.string; type = types.lines;
description = "Extra configuration options to put in hostapd.conf."; description = "Extra configuration options to put in hostapd.conf.";
}; };
}; };

View File

@ -46,7 +46,7 @@ rec {
}; };
extraConfig = mkOption { extraConfig = mkOption {
default = ""; default = "";
type = types.string; type = types.lines;
description = ''Extra verbatim configuration added to the end of kippo.cfg.''; description = ''Extra verbatim configuration added to the end of kippo.cfg.'';
}; };
}; };

View File

@ -230,7 +230,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.str; type = types.lines;
default = ""; default = "";
description = "Extra configuration to put into mumur.ini."; description = "Extra configuration to put into mumur.ini.";
}; };

View File

@ -198,6 +198,9 @@ in {
{ source = "${networkmanager_l2tp}/etc/NetworkManager/VPN/nm-l2tp-service.name"; { source = "${networkmanager_l2tp}/etc/NetworkManager/VPN/nm-l2tp-service.name";
target = "NetworkManager/VPN/nm-l2tp-service.name"; target = "NetworkManager/VPN/nm-l2tp-service.name";
} }
{ source = "${networkmanager_strongswan}/etc/NetworkManager/VPN/nm-strongswan-service.name";
target = "NetworkManager/VPN/nm-strongswan-service.name";
}
] ++ optional (cfg.appendNameservers == [] || cfg.insertNameservers == []) ] ++ optional (cfg.appendNameservers == [] || cfg.insertNameservers == [])
{ source = overrideNameserversScript; { source = overrideNameserversScript;
target = "NetworkManager/dispatcher.d/02overridedns"; target = "NetworkManager/dispatcher.d/02overridedns";

View File

@ -47,7 +47,7 @@ with lib;
export HOME=/tmp export HOME=/tmp
mkdir /var/log/openfire || true mkdir /var/log/openfire || true
mkdir /etc/openfire || true mkdir /etc/openfire || true
for i in ${openfire}/conf.inst/*; do for i in ${pkgs.openfire}/conf.inst/*; do
if ! test -f /etc/openfire/$(basename $i); then if ! test -f /etc/openfire/$(basename $i); then
cp $i /etc/openfire/ cp $i /etc/openfire/
fi fi

View File

@ -56,6 +56,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
default = "" ; default = "" ;
description = '' description = ''
Extra configuration. Contents will be added verbatim to the configuration file. Extra configuration. Contents will be added verbatim to the configuration file.

View File

@ -195,6 +195,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
default = ''''; default = '''';
description = "Additional prosody configuration"; description = "Additional prosody configuration";
}; };

View File

@ -244,7 +244,7 @@ in
description = "Target configuration"; description = "Target configuration";
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.string; type = types.lines;
default = ""; default = "";
description = "Any additional customization not already included."; description = "Any additional customization not already included.";
}; };

View File

@ -242,7 +242,7 @@ in
systemd = systemd =
let let
service = sshd-service =
{ description = "SSH Daemon"; { description = "SSH Daemon";
wantedBy = optional (!cfg.startWhenNeeded) "multi-user.target"; wantedBy = optional (!cfg.startWhenNeeded) "multi-user.target";
@ -253,16 +253,8 @@ in
environment.LD_LIBRARY_PATH = nssModulesPath; environment.LD_LIBRARY_PATH = nssModulesPath;
preStart = wants = [ "sshd-keygen.service" ];
'' after = [ "sshd-keygen.service" ];
mkdir -m 0755 -p /etc/ssh
${flip concatMapStrings cfg.hostKeys (k: ''
if ! [ -f "${k.path}" ]; then
ssh-keygen -t "${k.type}" ${if k ? bits then "-b ${toString k.bits}" else ""} -f "${k.path}" -N ""
fi
'')}
'';
serviceConfig = serviceConfig =
{ ExecStart = { ExecStart =
@ -278,6 +270,26 @@ in
PIDFile = "/run/sshd.pid"; PIDFile = "/run/sshd.pid";
}); });
}; };
sshd-keygen-service =
{ description = "SSH Host Key Generation";
path = [ cfgc.package ];
script =
''
mkdir -m 0755 -p /etc/ssh
${flip concatMapStrings cfg.hostKeys (k: ''
if ! [ -f "${k.path}" ]; then
ssh-keygen -t "${k.type}" ${if k ? bits then "-b ${toString k.bits}" else ""} -f "${k.path}" -N ""
fi
'')}
'';
serviceConfig = {
Type = "oneshot";
RemainAfterExit = "yes";
};
};
in in
if cfg.startWhenNeeded then { if cfg.startWhenNeeded then {
@ -289,11 +301,13 @@ in
socketConfig.Accept = true; socketConfig.Accept = true;
}; };
services."sshd@" = service; services.sshd-keygen = sshd-keygen-service;
services."sshd@" = sshd-service;
} else { } else {
services.sshd = service; services.sshd-keygen = sshd-keygen-service;
services.sshd = sshd-service;
}; };

View File

@ -34,7 +34,8 @@ let
''; '';
in in
{ description = "Supplicant ${iface}${optionalString (iface=="WLAN"||iface=="LAN") " %I"}"; { description = "Supplicant ${iface}${optionalString (iface=="WLAN"||iface=="LAN") " %I"}";
wantedBy = [ "network.target" ] ++ deps; wantedBy = [ "multi-user.target" ] ++ deps;
wants = [ "network.target" ];
bindsTo = deps; bindsTo = deps;
after = deps; after = deps;
before = [ "network.target" ]; before = [ "network.target" ];

View File

@ -3,46 +3,11 @@
with lib; with lib;
let let
cfg = config.services.syncthing; cfg = config.services.syncthing;
defaultUser = "syncthing"; defaultUser = "syncthing";
in {
header = {
description = "Syncthing service";
after = [ "network.target" ];
environment = {
STNORESTART = "yes";
STNOUPGRADE = "yes";
inherit (cfg) all_proxy;
} // config.networking.proxy.envVars;
};
service = {
Restart = "on-failure";
SuccessExitStatus = "2 3 4";
RestartForceExitStatus="3 4";
};
iNotifyHeader = {
description = "Syncthing Inotify File Watcher service";
after = [ "network.target" "syncthing.service" ];
requires = [ "syncthing.service" ];
};
iNotifyService = {
SuccessExitStatus = "2";
RestartForceExitStatus = "3";
Restart = "on-failure";
};
in
{
###### interface ###### interface
options = { options = {
services.syncthing = { services.syncthing = {
enable = mkEnableOption '' enable = mkEnableOption ''
@ -100,6 +65,19 @@ in
''; '';
}; };
openDefaultPorts = mkOption {
type = types.bool;
default = false;
example = literalExample "true";
description = ''
Open the default ports in the firewall:
- TCP 22000 for transfers
- UDP 21027 for discovery
If multiple users are running syncthing on this machine, you will need to manually open a set of ports for each instance and leave this disabled.
Alternatively, if are running only a single instance on this machine using the default ports, enable this.
'';
};
package = mkOption { package = mkOption {
type = types.package; type = types.package;
default = pkgs.syncthing; default = pkgs.syncthing;
@ -117,6 +95,14 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
networking.firewall = mkIf cfg.openDefaultPorts {
allowedTCPPorts = [ 22000 ];
allowedUDPPorts = [ 21027 ];
};
systemd.packages = [ pkgs.syncthing ]
++ lib.optional cfg.useInotify pkgs.syncthing-inotify;
users = mkIf (cfg.user == defaultUser) { users = mkIf (cfg.user == defaultUser) {
extraUsers."${defaultUser}" = extraUsers."${defaultUser}" =
{ group = cfg.group; { group = cfg.group;
@ -131,39 +117,44 @@ in
}; };
systemd.services = { systemd.services = {
syncthing = mkIf cfg.systemService (header // { syncthing = mkIf cfg.systemService {
wants = mkIf cfg.useInotify [ "syncthing-inotify.service" ]; description = "Syncthing service";
wantedBy = [ "multi-user.target" ]; after = [ "network.target" ];
serviceConfig = service // { environment = {
User = cfg.user; STNORESTART = "yes";
Group = cfg.group; STNOUPGRADE = "yes";
PermissionsStartOnly = true; inherit (cfg) all_proxy;
ExecStart = "${cfg.package}/bin/syncthing -no-browser -home=${cfg.dataDir}"; } // config.networking.proxy.envVars;
}; wants = mkIf cfg.useInotify [ "syncthing-inotify.service" ];
});
syncthing-inotify = mkIf (cfg.systemService && cfg.useInotify) (iNotifyHeader // {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = iNotifyService // { serviceConfig = {
Restart = "on-failure";
SuccessExitStatus = "2 3 4";
RestartForceExitStatus="3 4";
User = cfg.user; User = cfg.user;
ExecStart = "${pkgs.syncthing-inotify.bin}/bin/syncthing-inotify -home=${cfg.dataDir} -logflags=0"; Group = cfg.group;
}; PermissionsStartOnly = true;
}); ExecStart = "${cfg.package}/bin/syncthing -no-browser -home=${cfg.dataDir}";
};
systemd.user.services = {
syncthing = header // {
serviceConfig = service // {
ExecStart = "${cfg.package}/bin/syncthing -no-browser";
}; };
}; };
syncthing-inotify = mkIf cfg.useInotify (iNotifyHeader // { syncthing-resume = {
serviceConfig = iNotifyService // { wantedBy = [ "suspend.target" ];
ExecStart = "${pkgs.syncthing-inotify.bin}/bin/syncthing-inotify -logflags=0"; };
};
});
};
syncthing-inotify = mkIf (cfg.systemService && cfg.useInotify) {
description = "Syncthing Inotify File Watcher service";
after = [ "network.target" "syncthing.service" ];
requires = [ "syncthing.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
SuccessExitStatus = "2";
RestartForceExitStatus = "3";
Restart = "on-failure";
User = cfg.user;
ExecStart = "${pkgs.syncthing-inotify.bin}/bin/syncthing-inotify -home=${cfg.dataDir} -logflags=0";
};
};
};
}; };
} }

View File

@ -13,12 +13,13 @@ with lib;
default = false; default = false;
description = '' description = ''
Whether to enable tftpd, a Trivial File Transfer Protocol server. Whether to enable tftpd, a Trivial File Transfer Protocol server.
The server will be run as an xinetd service.
''; '';
}; };
services.tftpd.path = mkOption { services.tftpd.path = mkOption {
type = types.path; type = types.path;
default = "/home/tftp"; default = "/srv/tftp";
description = '' description = ''
Where the tftp server files are stored. Where the tftp server files are stored.
''; '';

View File

@ -79,7 +79,7 @@ in
extraConfig = mkOption { extraConfig = mkOption {
default = ""; default = "";
type = types.str; type = types.lines;
description = '' description = ''
Extra unbound config. See Extra unbound config. See
<citerefentry><refentrytitle>unbound.conf</refentrytitle><manvolnum>8 <citerefentry><refentrytitle>unbound.conf</refentrytitle><manvolnum>8

View File

@ -128,9 +128,11 @@ in {
in { in {
description = "WPA Supplicant"; description = "WPA Supplicant";
after = [ "network.target" ] ++ lib.concatMap deviceUnit ifaces; after = lib.concatMap deviceUnit ifaces;
before = [ "network.target" ];
wants = [ "network.target" ];
requires = lib.concatMap deviceUnit ifaces; requires = lib.concatMap deviceUnit ifaces;
wantedBy = [ "network-online.target" ]; wantedBy = [ "multi-user.target" ];
path = [ pkgs.wpa_supplicant ]; path = [ pkgs.wpa_supplicant ];

View File

@ -124,7 +124,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.string; type = types.lines;
default = ""; default = "";
description = "Extra configuration-lines added to the section of the service."; description = "Extra configuration-lines added to the section of the service.";
}; };

View File

@ -26,53 +26,35 @@ let
}; };
# Keep znc.conf in nix store, then symlink or copy into `dataDir`, depending on `mutable`. # Keep znc.conf in nix store, then symlink or copy into `dataDir`, depending on `mutable`.
notNull = a: ! isNull a;
mkZncConf = confOpts: '' mkZncConf = confOpts: ''
// Also check http://en.znc.in/wiki/Configuration Version = 1.6.3
AnonIPLimit = 10
ConnectDelay = 5
# Add `LoadModule = x` for each module...
${concatMapStrings (n: "LoadModule = ${n}\n") confOpts.modules} ${concatMapStrings (n: "LoadModule = ${n}\n") confOpts.modules}
MaxBufferSize = 500
ProtectWebSessions = true
SSLCertFile = ${cfg.dataDir}/znc.pem
ServerThrottle = 30
Skin = dark-clouds
StatusPrefix = *
Version = 1.2
<Listener listener0> <Listener l>
AllowIRC = true Port = ${toString confOpts.port}
AllowWeb = true
IPv4 = true IPv4 = true
IPv6 = false IPv6 = true
Port = ${if confOpts.useSSL then "+" else ""}${toString confOpts.port}
SSL = ${if confOpts.useSSL then "true" else "false"} SSL = ${if confOpts.useSSL then "true" else "false"}
</Listener> </Listener>
<User ${confOpts.userName}> <User ${confOpts.userName}>
Admin = true
Allow = *
AltNick = ${confOpts.nick}_
AppendTimestamp = false
AutoClearChanBuffer = false
Buffer = 150
ChanModes = +stn
DenyLoadMod = false
DenySetBindHost = false
Ident = ident
JoinTries = 10
MaxJoins = 0
MaxNetworks = 1
MultiClients = true
Nick = ${confOpts.nick}
PrependTimestamp = true
QuitMsg = Quit
RealName = ${confOpts.nick}
TimestampFormat = [%H:%M:%S]
${concatMapStrings (n: "LoadModule = ${n}\n") confOpts.userModules}
${confOpts.passBlock} ${confOpts.passBlock}
Admin = true
Nick = ${confOpts.nick}
AltNick = ${confOpts.nick}_
Ident = ${confOpts.nick}
RealName = ${confOpts.nick}
${concatMapStrings (n: "LoadModule = ${n}\n") confOpts.userModules}
${ lib.concatStringsSep "\n" (lib.mapAttrsToList (name: net: ''
<Network ${name}>
${concatMapStrings (m: "LoadModule = ${m}\n") net.modules}
Server = ${net.server} ${if net.useSSL then "+" else ""}${toString net.port}
${concatMapStrings (c: "<Chan #${c}>\n</Chan>\n") net.channels}
</Network>
'') confOpts.networks) }
</User> </User>
${confOpts.extraZncConf} ${confOpts.extraZncConf}
''; '';
@ -84,6 +66,62 @@ let
else mkZncConf cfg.confOptions; else mkZncConf cfg.confOptions;
}; };
networkOpts = { ... }: {
options = {
server = mkOption {
type = types.str;
example = "chat.freenode.net";
description = ''
IRC server address.
'';
};
port = mkOption {
type = types.int;
default = 6697;
example = 6697;
description = ''
IRC server port.
'';
};
useSSL = mkOption {
type = types.bool;
default = true;
description = ''
Whether to use SSL to connect to the IRC server.
'';
};
modulePackages = mkOption {
type = types.listOf types.package;
default = [];
example = [ "pkgs.zncModules.push" "pkgs.zncModules.fish" ];
description = ''
External ZNC modules to build.
'';
};
modules = mkOption {
type = types.listOf types.str;
default = [ "simple_away" ];
example = literalExample "[ simple_away sasl ]";
description = ''
ZNC modules to load.
'';
};
channels = mkOption {
type = types.listOf types.str;
default = [];
example = [ "nixos" ];
description = ''
IRC channels to join.
'';
};
};
};
in in
{ {
@ -111,6 +149,15 @@ in
''; '';
}; };
group = mkOption {
default = "";
example = "users";
type = types.string;
description = ''
Group to own the ZNCserver process.
'';
};
dataDir = mkOption { dataDir = mkOption {
default = "/var/lib/znc/"; default = "/var/lib/znc/";
example = "/home/john/.znc/"; example = "/home/john/.znc/";
@ -125,27 +172,16 @@ in
example = "See: http://wiki.znc.in/Configuration"; example = "See: http://wiki.znc.in/Configuration";
type = types.lines; type = types.lines;
description = '' description = ''
The contents of the `znc.conf` file to use when creating it. Config file as generated with `znc --makeconf` to use for the whole ZNC configuration.
If specified, `confOptions` will be ignored, and this value, as-is, will be used. If specified, `confOptions` will be ignored, and this value, as-is, will be used.
If left empty, a conf file with default values will be used. If left empty, a conf file with default values will be used.
Recommended to generate with `znc --makeconf` command.
''; '';
}; };
/* TODO: add to the documentation of the current module:
Values to use when creating a `znc.conf` file.
confOptions = {
modules = [ "log" ];
userName = "john";
nick = "johntron";
};
*/
confOptions = { confOptions = {
modules = mkOption { modules = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = [ "partyline" "webadmin" "adminlog" "log" ]; default = [ "webadmin" "adminlog" ];
example = [ "partyline" "webadmin" "adminlog" "log" ]; example = [ "partyline" "webadmin" "adminlog" "log" ];
description = '' description = ''
A list of modules to include in the `znc.conf` file. A list of modules to include in the `znc.conf` file.
@ -154,8 +190,8 @@ in
userModules = mkOption { userModules = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = [ ]; default = [ "chansaver" "controlpanel" ];
example = [ "fish" "push" ]; example = [ "chansaver" "controlpanel" "fish" "push" ];
description = '' description = ''
A list of user modules to include in the `znc.conf` file. A list of user modules to include in the `znc.conf` file.
''; '';
@ -166,29 +202,42 @@ in
example = "johntron"; example = "johntron";
type = types.string; type = types.string;
description = '' description = ''
The user name to use when generating the `znc.conf` file. The user name used to log in to the ZNC web admin interface.
This is the user name used by the user logging into the ZNC web admin.
''; '';
}; };
networks = mkOption {
default = { };
type = types.loaOf types.optionSet;
description = ''
IRC networks to connect the user to.
'';
options = [ networkOpts ];
example = {
"freenode" = {
server = "chat.freenode.net";
port = 6697;
ssl = true;
modules = [ "simple_away" ];
};
};
};
nick = mkOption { nick = mkOption {
default = "znc-user"; default = "znc-user";
example = "john"; example = "john";
type = types.string; type = types.string;
description = '' description = ''
The IRC nick to use when generating the `znc.conf` file. The IRC nick.
''; '';
}; };
passBlock = mkOption { passBlock = mkOption {
default = defaultPassBlock; example = defaultPassBlock;
example = "Must be the block generated by the `znc --makepass` command.";
type = types.string; type = types.string;
description = '' description = ''
The pass block to use when generating the `znc.conf` file. Generate with znc --makepass.
This is the password used by the user logging into the ZNC web admin. This is the password used to log in to the ZNC web admin interface.
This is the block generated by the `znc --makepass` command.
!!! If not specified, please change this after starting the service. !!!
''; '';
}; };
@ -206,7 +255,7 @@ in
example = true; example = true;
type = types.bool; type = types.bool;
description = '' description = ''
Indicates whether the ZNC server should use SSL when listening on the specified port. Indicates whether the ZNC server should use SSL when listening on the specified port. A self-signed certificate will be generated.
''; '';
}; };
@ -214,7 +263,7 @@ in
default = ""; default = "";
type = types.lines; type = types.lines;
description = '' description = ''
Extra config to `znc.conf` file Extra config to `znc.conf` file.
''; '';
}; };
}; };
@ -265,6 +314,7 @@ in
after = [ "network.service" ]; after = [ "network.service" ];
serviceConfig = { serviceConfig = {
User = cfg.user; User = cfg.user;
Group = cfg.group;
Restart = "always"; Restart = "always";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID"; ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID";

View File

@ -0,0 +1,123 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.hound;
in {
options = {
services.hound = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the hound code search daemon.
'';
};
user = mkOption {
default = "hound";
type = types.str;
description = ''
User the hound daemon should execute under.
'';
};
group = mkOption {
default = "hound";
type = types.str;
description = ''
Group the hound daemon should execute under.
'';
};
extraGroups = mkOption {
type = types.listOf types.str;
default = [ ];
example = [ "dialout" ];
description = ''
List of extra groups that the "hound" user should be a part of.
'';
};
home = mkOption {
default = "/var/lib/hound";
type = types.path;
description = ''
The path to use as hound's $HOME. If the default user
"hound" is configured then this is the home of the "hound"
user.
'';
};
package = mkOption {
default = pkgs.hound;
description = ''
Package for running hound.
'';
};
config = mkOption {
type = types.str;
description = ''
The full configuration of the Hound daemon. Note the dbpath
should be an absolute path to a writable location on disk.
'';
example = ''
{
"max-concurrent-indexers" : 2,
"dbpath" : "''${services.hound.home}/data",
"repos" : {
"nixpkgs": {
"url" : "https://www.github.com/NixOS/nixpkgs.git"
}
}
}
'';
};
listen = mkOption {
type = types.str;
default = "0.0.0.0:6080";
example = "127.0.0.1:6080 or just :6080";
description = ''
Listen on this IP:port / :port
'';
};
};
};
config = mkIf cfg.enable {
users.extraGroups = optional (cfg.group == "hound") {
name = "hound";
gid = config.ids.gids.hound;
};
users.extraUsers = optional (cfg.user == "hound") {
name = "hound";
description = "hound code search";
createHome = true;
home = cfg.home;
group = cfg.group;
extraGroups = cfg.extraGroups;
uid = config.ids.uids.hound;
};
systemd.services.hound = {
description = "Hound Code Search";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
User = cfg.user;
Group = cfg.group;
WorkingDirectory = cfg.home;
ExecStartPre = "${pkgs.git}/bin/git config --global --replace-all http.sslCAinfo /etc/ssl/certs/ca-certificates.crt";
ExecStart = "${cfg.package}/bin/houndd" +
" -addr ${cfg.listen}" +
" -conf ${pkgs.writeText "hound.json" cfg.config}";
};
path = [ pkgs.git ];
};
};
}

View File

@ -0,0 +1,99 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.quassel-webserver;
quassel-webserver = cfg.pkg;
settings = ''
module.exports = {
default: {
host: '${cfg.quasselCoreHost}', // quasselcore host
port: ${toString cfg.quasselCorePort}, // quasselcore port
initialBacklogLimit: ${toString cfg.initialBacklogLimit}, // Amount of backlogs to fetch per buffer on connection
backlogLimit: ${toString cfg.backlogLimit}, // Amount of backlogs to fetch per buffer after first retrieval
securecore: ${if cfg.secureCore then "true" else "false"}, // Connect to the core using SSL
theme: '${cfg.theme}' // Default UI theme
},
themes: ['default', 'darksolarized'], // Available themes
forcedefault: ${if cfg.forceHostAndPort then "true" else "false"}, // Will force default host and port to be used, and will hide the corresponding fields in the UI
prefixpath: '${cfg.prefixPath}' // Configure this if you use a reverse proxy
};
'';
settingsFile = pkgs.writeText "settings-user.js" settings;
in {
options = {
services.quassel-webserver = {
enable = mkOption {
default = false;
type = types.bool;
description = "Whether to enable the quassel webclient service";
};
pkg = mkOption {
default = pkgs.quassel-webserver;
description = "The quassel-webserver package";
};
quasselCoreHost = mkOption {
default = "";
type = types.str;
description = "The default host of the quassel core";
};
quasselCorePort = mkOption {
default = 4242;
type = types.int;
description = "The default quassel core port";
};
initialBacklogLimit = mkOption {
default = 20;
type = types.int;
description = "Amount of backlogs to fetch per buffer on connection";
};
backlogLimit = mkOption {
default = 100;
type = types.int;
description = "Amount of backlogs to fetch per buffer after first retrieval";
};
secureCore = mkOption {
default = true;
type = types.bool;
description = "Connect to the core using SSL";
};
theme = mkOption {
default = "default";
type = types.str;
description = "default or darksolarized";
};
prefixPath = mkOption {
default = "";
type = types.str;
description = "Configure this if you use a reverse proxy. Must start with a '/'";
example = "/quassel";
};
port = mkOption {
default = 60443;
type = types.int;
description = "The port the quassel webserver should listen on";
};
useHttps = mkOption {
default = true;
type = types.bool;
description = "Whether the quassel webserver connection should be a https connection";
};
forceHostAndPort = mkOption {
default = false;
type = types.bool;
description = "Force the users to use the quasselCoreHost and quasselCorePort defaults";
};
};
};
config = mkIf cfg.enable {
systemd.services.quassel-webserver = {
description = "A web server/client for Quassel";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${quassel-webserver}/lib/node_modules/quassel-webserver/bin/www -p ${toString cfg.port} -m ${if cfg.useHttps == true then "https" else "http"} -c ${settingsFile}";
};
};
};
}

View File

@ -288,6 +288,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
default = ""; default = "";
example = example =
'' ''

View File

@ -164,6 +164,7 @@ in
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
default = ""; default = "";
example = example =
'' ''

View File

@ -102,7 +102,6 @@ in
pkgs.setuptools pkgs.setuptools
pkgs.pythonPackages.genshi pkgs.pythonPackages.genshi
pkgs.pythonPackages.psycopg2 pkgs.pythonPackages.psycopg2
pkgs.python.modules.sqlite3
subversion subversion
]; ];
}; };

View File

@ -212,6 +212,7 @@ in
example = "[ \"en_GB\" \"de_DE\" ];"; example = "[ \"en_GB\" \"de_DE\" ];";
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.lines;
default = ""; default = "";
example = example =
'' ''

View File

@ -392,6 +392,8 @@ in
security.acme.certs = filterAttrs (n: v: v != {}) ( security.acme.certs = filterAttrs (n: v: v != {}) (
mapAttrs (vhostName: vhostConfig: mapAttrs (vhostName: vhostConfig:
optionalAttrs vhostConfig.enableACME { optionalAttrs vhostConfig.enableACME {
user = cfg.user;
group = cfg.group;
webroot = vhostConfig.acmeRoot; webroot = vhostConfig.acmeRoot;
extraDomains = genAttrs vhostConfig.serverAliases (alias: null); extraDomains = genAttrs vhostConfig.serverAliases (alias: null);
postRun = '' postRun = ''

View File

@ -82,7 +82,7 @@ in {
environment.gnome3.packageSet = mkOption { environment.gnome3.packageSet = mkOption {
default = null; default = null;
example = literalExample "pkgs.gnome3_20"; example = literalExample "pkgs.gnome3_22";
description = "Which GNOME 3 package set to use."; description = "Which GNOME 3 package set to use.";
apply = p: if p == null then pkgs.gnome3 else p; apply = p: if p == null then pkgs.gnome3 else p;
}; };
@ -108,6 +108,7 @@ in {
services.gnome3.gnome-documents.enable = mkDefault true; services.gnome3.gnome-documents.enable = mkDefault true;
services.gnome3.gnome-keyring.enable = true; services.gnome3.gnome-keyring.enable = true;
services.gnome3.gnome-online-accounts.enable = mkDefault true; services.gnome3.gnome-online-accounts.enable = mkDefault true;
services.gnome3.gnome-terminal-server.enable = mkDefault true;
services.gnome3.gnome-user-share.enable = mkDefault true; services.gnome3.gnome-user-share.enable = mkDefault true;
services.gnome3.gvfs.enable = true; services.gnome3.gvfs.enable = true;
services.gnome3.seahorse.enable = mkDefault true; services.gnome3.seahorse.enable = mkDefault true;

View File

@ -61,9 +61,11 @@ in
pkgs.lxqt.obconf-qt pkgs.lxqt.obconf-qt
pkgs.lxqt.pavucontrol-qt pkgs.lxqt.pavucontrol-qt
pkgs.lxqt.pcmanfm-qt pkgs.lxqt.pcmanfm-qt
pkgs.lxqt.qlipper
pkgs.lxqt.qps pkgs.lxqt.qps
pkgs.lxqt.qterminal pkgs.lxqt.qterminal
pkgs.lxqt.qtermwidget pkgs.lxqt.qtermwidget
pkgs.lxqt.screengrab
pkgs.menu-cache pkgs.menu-cache
pkgs.openbox # default window manager pkgs.openbox # default window manager
pkgs.qt5.qtsvg # provides QT5 plugins for svg icons pkgs.qt5.qtsvg # provides QT5 plugins for svg icons

View File

@ -95,9 +95,8 @@ in
services.xserver.displayManager.job = services.xserver.displayManager.job =
{ {
environment = { environment = {
GDM_X_SERVER = "${cfg.xserverBin} ${cfg.xserverArgs}"; GDM_X_SERVER_EXTRA_ARGS = "${cfg.xserverArgs}";
GDM_SESSIONS_DIR = "${cfg.session.desktops}"; GDM_SESSIONS_DIR = "${cfg.session.desktops}";
XDG_CONFIG_DIRS = "${gnome3.gnome_settings_daemon}/etc/xdg";
# Find the mouse # Find the mouse
XCURSOR_PATH = "~/.icons:${config.system.path}/share/icons"; XCURSOR_PATH = "~/.icons:${config.system.path}/share/icons";
}; };
@ -108,10 +107,12 @@ in
systemd.services.display-manager.wants = [ "systemd-machined.service" ]; systemd.services.display-manager.wants = [ "systemd-machined.service" ];
systemd.services.display-manager.after = [ "systemd-machined.service" ]; systemd.services.display-manager.after = [ "systemd-machined.service" ];
systemd.services.display-manager.path = [ gnome3.gnome_shell gnome3.caribou pkgs.xorg.xhost pkgs.dbus_tools ]; systemd.services.display-manager.path = [ gnome3.gnome_session ];
services.dbus.packages = [ gdm ]; services.dbus.packages = [ gdm ];
systemd.user.services.dbus.wantedBy = [ "default.target" ];
programs.dconf.profiles.gdm = "${gdm}/share/dconf/profile/gdm"; programs.dconf.profiles.gdm = "${gdm}/share/dconf/profile/gdm";
# Use AutomaticLogin if delay is zero, because it's immediate. # Use AutomaticLogin if delay is zero, because it's immediate.

View File

@ -207,6 +207,9 @@ in
services.dbus.enable = true; services.dbus.enable = true;
services.dbus.packages = [ lightdm ]; services.dbus.packages = [ lightdm ];
# lightdm uses the accounts daemon to rember language/window-manager per user
services.accounts-daemon.enable = true;
security.pam.services.lightdm = { security.pam.services.lightdm = {
allowNullPassword = true; allowNullPassword = true;
startSession = true; startSession = true;

View File

@ -86,7 +86,7 @@ in
}; };
extraConfig = mkOption { extraConfig = mkOption {
type = types.str; type = types.lines;
default = ""; default = "";
example = '' example = ''
[Autologin] [Autologin]

View File

@ -0,0 +1,48 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.windowManager.bspwm-unstable;
in
{
options = {
services.xserver.windowManager.bspwm-unstable = {
enable = mkEnableOption "bspwm-unstable";
startThroughSession = mkOption {
type = with types; bool;
default = false;
description = "
Start the window manager through the script defined in
sessionScript. Defaults to the the bspwm-session script
provided by bspwm
";
};
sessionScript = mkOption {
default = "${pkgs.bspwm-unstable}/bin/bspwm-session";
defaultText = "(pkgs.bspwm-unstable)/bin/bspwm-session";
description = "
The start-session script to use. Defaults to the
provided bspwm-session script from the bspwm package.
Does nothing unless `bspwm.startThroughSession` is enabled
";
};
};
};
config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton {
name = "bspwm-unstable";
start = if cfg.startThroughSession
then cfg.sessionScript
else ''
export _JAVA_AWT_WM_NONREPARENTING=1
SXHKD_SHELL=/bin/sh ${pkgs.sxhkd-unstable}/bin/sxhkd -f 100 &
${pkgs.bspwm-unstable}/bin/bspwm
'';
};
environment.systemPackages = [ pkgs.bspwm-unstable ];
};
}

View File

@ -10,6 +10,7 @@ in
imports = [ imports = [
./afterstep.nix ./afterstep.nix
./bspwm.nix ./bspwm.nix
./bspwm-unstable.nix
./compiz.nix ./compiz.nix
./dwm.nix ./dwm.nix
./exwm.nix ./exwm.nix

View File

@ -515,6 +515,7 @@ in
{ description = "X11 Server"; { description = "X11 Server";
after = [ "systemd-udev-settle.service" "local-fs.target" "acpid.service" "systemd-logind.service" ]; after = [ "systemd-udev-settle.service" "local-fs.target" "acpid.service" "systemd-logind.service" ];
wants = [ "systemd-udev-settle.service" ];
restartIfChanged = false; restartIfChanged = false;

View File

@ -214,8 +214,8 @@ in
"hid_generic" "hid_lenovo" "hid_generic" "hid_lenovo"
"hid_apple" "hid_logitech_dj" "hid_lenovo_tpkbd" "hid_roccat" "hid_apple" "hid_logitech_dj" "hid_lenovo_tpkbd" "hid_roccat"
# Misc. stuff. # Misc. keyboard stuff.
"pcips2" "atkbd" "pcips2" "atkbd" "i8042"
# Temporary fix for https://github.com/NixOS/nixpkgs/issues/18451 # Temporary fix for https://github.com/NixOS/nixpkgs/issues/18451
# Remove as soon as upstream gets fixed - marking it: # Remove as soon as upstream gets fixed - marking it:

View File

@ -498,8 +498,7 @@ eval "exec $logOutFd>&- $logErrFd>&-"
# #
# Storage daemons are distinguished by an @ in front of their command line: # Storage daemons are distinguished by an @ in front of their command line:
# https://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons/ # https://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons/
local pidsToKill="$(pgrep -v -f '^@')" for pid in $(pgrep -v -f '^@'); do
for pid in $pidsToKill; do
# Make sure we don't kill kernel processes, see #15226 and: # Make sure we don't kill kernel processes, see #15226 and:
# http://stackoverflow.com/questions/12213445/identifying-kernel-threads # http://stackoverflow.com/questions/12213445/identifying-kernel-threads
readlink "/proc/$pid/exe" &> /dev/null || continue readlink "/proc/$pid/exe" &> /dev/null || continue

View File

@ -41,41 +41,43 @@ let
]; ];
instanceOptions = { instanceOptions = {
options = {
execConfig = mkOption { execConfig = mkOption {
default = {}; default = {};
example = { Parameters = "/bin/sh"; }; example = { Parameters = "/bin/sh"; };
type = types.addCheck (types.attrsOf unitOption) checkExec; type = types.addCheck (types.attrsOf unitOption) checkExec;
description = '' description = ''
Each attribute in this set specifies an option in the Each attribute in this set specifies an option in the
<literal>[Exec]</literal> section of this unit. See <literal>[Exec]</literal> section of this unit. See
<citerefentry><refentrytitle>systemd.nspawn</refentrytitle> <citerefentry><refentrytitle>systemd.nspawn</refentrytitle>
<manvolnum>5</manvolnum></citerefentry> for details. <manvolnum>5</manvolnum></citerefentry> for details.
''; '';
}; };
filesConfig = mkOption { filesConfig = mkOption {
default = {}; default = {};
example = { Bind = [ "/home/alice" ]; }; example = { Bind = [ "/home/alice" ]; };
type = types.addCheck (types.attrsOf unitOption) checkFiles; type = types.addCheck (types.attrsOf unitOption) checkFiles;
description = '' description = ''
Each attribute in this set specifies an option in the Each attribute in this set specifies an option in the
<literal>[Files]</literal> section of this unit. See <literal>[Files]</literal> section of this unit. See
<citerefentry><refentrytitle>systemd.nspawn</refentrytitle> <citerefentry><refentrytitle>systemd.nspawn</refentrytitle>
<manvolnum>5</manvolnum></citerefentry> for details. <manvolnum>5</manvolnum></citerefentry> for details.
''; '';
}; };
networkConfig = mkOption { networkConfig = mkOption {
default = {}; default = {};
example = { Private = false; }; example = { Private = false; };
type = types.addCheck (types.attrsOf unitOption) checkNetwork; type = types.addCheck (types.attrsOf unitOption) checkNetwork;
description = '' description = ''
Each attribute in this set specifies an option in the Each attribute in this set specifies an option in the
<literal>[Network]</literal> section of this unit. See <literal>[Network]</literal> section of this unit. See
<citerefentry><refentrytitle>systemd.nspawn</refentrytitle> <citerefentry><refentrytitle>systemd.nspawn</refentrytitle>
<manvolnum>5</manvolnum></citerefentry> for details. <manvolnum>5</manvolnum></citerefentry> for details.
''; '';
};
}; };
}; };
@ -99,8 +101,7 @@ in {
systemd.nspawn = mkOption { systemd.nspawn = mkOption {
default = {}; default = {};
type = types.attrsOf types.optionSet; type = with types; attrsOf (submodule instanceOptions);
options = [ instanceOptions ];
description = "Definition of systemd-nspawn configurations."; description = "Definition of systemd-nspawn configurations.";
}; };

View File

@ -316,7 +316,7 @@ in rec {
startAt = mkOption { startAt = mkOption {
type = with types; either str (listOf str); type = with types; either str (listOf str);
default = ""; default = [];
example = "Sun 14:00:00"; example = "Sun 14:00:00";
description = '' description = ''
Automatically start this unit at the given date/time, which Automatically start this unit at the given date/time, which
@ -326,6 +326,7 @@ in rec {
to adding a corresponding timer unit with to adding a corresponding timer unit with
<option>OnCalendar</option> set to the value given here. <option>OnCalendar</option> set to the value given here.
''; '';
apply = v: if isList v then v else [ v ];
}; };
}; };

View File

@ -777,7 +777,7 @@ in
{ wantedBy = [ "timers.target" ]; { wantedBy = [ "timers.target" ];
timerConfig.OnCalendar = service.startAt; timerConfig.OnCalendar = service.startAt;
}) })
(filterAttrs (name: service: service.enable && service.startAt != "") cfg.services); (filterAttrs (name: service: service.enable && service.startAt != []) cfg.services);
# Generate timer units for all services that have a startAt value. # Generate timer units for all services that have a startAt value.
systemd.user.timers = systemd.user.timers =
@ -785,7 +785,7 @@ in
{ wantedBy = [ "timers.target" ]; { wantedBy = [ "timers.target" ];
timerConfig.OnCalendar = service.startAt; timerConfig.OnCalendar = service.startAt;
}) })
(filterAttrs (name: service: service.startAt != "") cfg.user.services); (filterAttrs (name: service: service.startAt != []) cfg.user.services);
systemd.sockets.systemd-journal-gatewayd.wantedBy = systemd.sockets.systemd-journal-gatewayd.wantedBy =
optional config.services.journald.enableHttpGateway "sockets.target"; optional config.services.journald.enableHttpGateway "sockets.target";

View File

@ -245,6 +245,7 @@ in rec {
tests.gnome3-gdm = callTest tests/gnome3-gdm.nix {}; tests.gnome3-gdm = callTest tests/gnome3-gdm.nix {};
tests.grsecurity = callTest tests/grsecurity.nix {}; tests.grsecurity = callTest tests/grsecurity.nix {};
tests.hibernate = callTest tests/hibernate.nix {}; tests.hibernate = callTest tests/hibernate.nix {};
tests.hound = callTest tests/hound.nix {};
tests.i3wm = callTest tests/i3wm.nix {}; tests.i3wm = callTest tests/i3wm.nix {};
tests.installer = callSubTests tests/installer.nix {}; tests.installer = callSubTests tests/installer.nix {};
tests.influxdb = callTest tests/influxdb.nix {}; tests.influxdb = callTest tests/influxdb.nix {};

58
nixos/tests/hound.nix Normal file
View File

@ -0,0 +1,58 @@
# Test whether `houndd` indexes nixpkgs
import ./make-test.nix ({ pkgs, ... } : {
name = "hound";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ grahamc ];
};
machine = { config, pkgs, ... }: {
services.hound = {
enable = true;
config = ''
{
"max-concurrent-indexers": 1,
"dbpath": "/var/lib/hound/data",
"repos": {
"nix": {
"url": "file:///var/lib/hound/my-git"
}
}
}
'';
};
systemd.services.houndseed = {
description = "seed hound with a git repo";
requiredBy = [ "hound.service" ];
before = [ "hound.service" ];
serviceConfig = {
User = "hound";
Group = "hound";
WorkingDirectory = "/var/lib/hound";
};
path = [ pkgs.git ];
script = ''
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git init my-git --bare
git init my-git-clone
cd my-git-clone
echo 'hi nix!' > hello
git add hello
git commit -m "hello there :)"
git remote add origin /var/lib/hound/my-git
git push origin master
'';
};
};
testScript =
'' startAll;
$machine->waitForUnit("network.target");
$machine->waitForUnit("hound.service");
$machine->waitForOpenPort(6080);
$machine->succeed('curl http://127.0.0.1:6080/api/v1/search\?stats\=fosho\&repos\=\*\&rng=%3A20\&q\=hi\&files\=\&i=nope | grep "Filename" | grep "hello"');
'';
})

View File

@ -11,10 +11,10 @@ let
#!${pkgs.stdenv.shell} -xe #!${pkgs.stdenv.shell} -xe
export PATH="${lib.makeBinPath [ pkgs.coreutils pkgs.utillinux ]}" export PATH="${lib.makeBinPath [ pkgs.coreutils pkgs.utillinux ]}"
mkdir -p /var/run/dbus mkdir -p /run/dbus
cat > /etc/passwd <<EOF cat > /etc/passwd <<EOF
root:x:0:0::/root:/bin/false root:x:0:0::/root:/bin/false
messagebus:x:1:1::/var/run/dbus:/bin/false messagebus:x:1:1::/run/dbus:/bin/false
EOF EOF
cat > /etc/group <<EOF cat > /etc/group <<EOF
root:x:0: root:x:0:

View File

@ -3,7 +3,7 @@
, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf , libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile , librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
, libusb, libuuid, libxml2, libxslt, lilv-svn, lv2, makeWrapper, pango , libusb, libuuid, libxml2, libxslt, lilv-svn, lv2, makeWrapper, pango
, perl, pkgconfig, python, rubberband, serd, sord-svn, sratom, suil, taglib, vampSDK }: , perl, pkgconfig, python2, rubberband, serd, sord-svn, sratom, suil, taglib, vampSDK }:
let let
@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
glibmm graphviz gtkmm2 libjack2 libgnomecanvas libgnomecanvasmm liblo glibmm graphviz gtkmm2 libjack2 libgnomecanvas libgnomecanvasmm liblo
libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv-svn lv2 libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv-svn lv2
makeWrapper pango perl pkgconfig python rubberband serd sord-svn sratom suil taglib vampSDK makeWrapper pango perl pkgconfig python2 rubberband serd sord-svn sratom suil taglib vampSDK
]; ];
patchPhase = '' patchPhase = ''
@ -52,12 +52,12 @@ stdenv.mkDerivation rec {
patchShebangs ./tools/ patchShebangs ./tools/
''; '';
configurePhase = "python waf configure --optimize --docs --with-backends=jack,alsa --prefix=$out"; configurePhase = "${python2.interpreter} waf configure --optimize --docs --with-backends=jack,alsa --prefix=$out";
buildPhase = "python waf"; buildPhase = "${python2.interpreter} waf";
installPhase = '' installPhase = ''
python waf install ${python2.interpreter} waf install
# Install desktop file # Install desktop file
mkdir -p "$out/share/applications" mkdir -p "$out/share/applications"

View File

@ -3,7 +3,7 @@
, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf , libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile , librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
, libusb, libuuid, libxml2, libxslt, lilv-svn, lv2, makeWrapper, pango , libusb, libuuid, libxml2, libxslt, lilv-svn, lv2, makeWrapper, pango
, perl, pkgconfig, python, rubberband, serd, sord-svn, sratom, suil, taglib, vampSDK }: , perl, pkgconfig, python2, rubberband, serd, sord-svn, sratom, suil, taglib, vampSDK }:
let let
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
glibmm graphviz gtkmm2 libjack2 libgnomecanvas libgnomecanvasmm liblo glibmm graphviz gtkmm2 libjack2 libgnomecanvas libgnomecanvasmm liblo
libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv-svn lv2 libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv-svn lv2
makeWrapper pango perl pkgconfig python rubberband serd sord-svn sratom suil taglib vampSDK makeWrapper pango perl pkgconfig python2 rubberband serd sord-svn sratom suil taglib vampSDK
]; ];
# ardour's wscript has a "tarball" target but that required the git revision # ardour's wscript has a "tarball" target but that required the git revision
@ -46,12 +46,12 @@ stdenv.mkDerivation rec {
patchShebangs ./tools/ patchShebangs ./tools/
''; '';
configurePhase = "python waf configure --optimize --docs --with-backends=jack,alsa --prefix=$out"; configurePhase = "${python2.interpreter} waf configure --optimize --docs --with-backends=jack,alsa --prefix=$out";
buildPhase = "python waf"; buildPhase = "${python2.interpreter} waf";
installPhase = '' installPhase = ''
python waf install ${python2.interpreter} waf install
# Install desktop file # Install desktop file
mkdir -p "$out/share/applications" mkdir -p "$out/share/applications"
cat > "$out/share/applications/ardour.desktop" << EOF cat > "$out/share/applications/ardour.desktop" << EOF

View File

@ -3,7 +3,7 @@
, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf , libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile , librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
, libusb, libuuid, libxml2, libxslt, lilv-svn, lv2, makeWrapper , libusb, libuuid, libxml2, libxslt, lilv-svn, lv2, makeWrapper
, perl, pkgconfig, python, rubberband, serd, sord-svn, sratom , perl, pkgconfig, python2, rubberband, serd, sord-svn, sratom
, taglib, vampSDK, dbus, fftw, pango, suil, libarchive }: , taglib, vampSDK, dbus, fftw, pango, suil, libarchive }:
let let
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
glibmm graphviz gtkmm2 libjack2 libgnomecanvas libgnomecanvasmm liblo glibmm graphviz gtkmm2 libjack2 libgnomecanvas libgnomecanvasmm liblo
libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv-svn lv2 libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv-svn lv2
makeWrapper pango perl pkgconfig python rubberband serd sord-svn makeWrapper pango perl pkgconfig python2 rubberband serd sord-svn
sratom suil taglib vampSDK libarchive sratom suil taglib vampSDK libarchive
]; ];
@ -47,12 +47,12 @@ stdenv.mkDerivation rec {
patchShebangs ./tools/ patchShebangs ./tools/
''; '';
configurePhase = "python waf configure --optimize --docs --with-backends=jack,alsa --prefix=$out"; configurePhase = "${python2.interpreter} waf configure --optimize --docs --with-backends=jack,alsa --prefix=$out";
buildPhase = "python waf"; buildPhase = "${python2.interpreter} waf";
installPhase = '' installPhase = ''
python waf install ${python2.interpreter} waf install
# Install desktop file # Install desktop file
mkdir -p "$out/share/applications" mkdir -p "$out/share/applications"

View File

@ -3,12 +3,12 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.9.10"; version = "0.9.11";
name = "drumgizmo-${version}"; name = "drumgizmo-${version}";
src = fetchurl { src = fetchurl {
url = "http://www.drumgizmo.org/releases/${name}/${name}.tar.gz"; url = "http://www.drumgizmo.org/releases/${name}/${name}.tar.gz";
sha256 = "142si734lsyywxhn7msiz053ir96kl5im3h1jql3vhcb4807f3d1"; sha256 = "04hf3nhccwr98n2081rrvfccz50nly6k3gbk9zxccp1522qz5xvf";
}; };
configureFlags = [ "--enable-lv2" ]; configureFlags = [ "--enable-lv2" ];

View File

@ -1,15 +1,15 @@
{ stdenv, fetchurl, libjack2, libsndfile, lv2, qt4 }: { stdenv, fetchurl, libjack2, alsaLib, libsndfile, liblo, lv2, qt5 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "drumkv1-${version}"; name = "drumkv1-${version}";
version = "0.7.1"; version = "0.7.6";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/drumkv1/${name}.tar.gz"; url = "mirror://sourceforge/drumkv1/${name}.tar.gz";
sha256 = "0mpf8akqaakg7vbn8gba0ns64hzhn5xzh1qxqpchcv32swn21cq4"; sha256 = "0cl1rbj26nsbvg9wzsh2j8xlx69xjxn29x46ypmy3939zbk81bi6";
}; };
buildInputs = [ libjack2 libsndfile lv2 qt4 ]; buildInputs = [ libjack2 alsaLib libsndfile liblo lv2 qt5.qtbase qt5.qttools ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "An old-school drum-kit sampler synthesizer with stereo fx"; description = "An old-school drum-kit sampler synthesizer with stereo fx";

View File

@ -1,10 +1,10 @@
{ stdenv, fetchurl, cmake, fftw, gtkmm2, libxcb, lv2, pkgconfig, xorg }: { stdenv, fetchurl, cmake, fftw, gtkmm2, libxcb, lv2, pkgconfig, xorg }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "eq10q-${version}"; name = "eq10q-${version}";
version = "2.0"; version = "2.1";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/project/eq10q/${name}.tar.gz"; url = "mirror://sourceforge/project/eq10q/${name}.tar.gz";
sha256 = "08vlfly0qqrfqiwpn5g5php680icpk97pwnwjadmj5syhgvi0i3h"; sha256 = "0brrr6ydsppi4zzn3vcgl0zgq5r8jmlcap1hpr3k43yvlwggb880";
}; };
buildInputs = [ cmake fftw gtkmm2 libxcb lv2 pkgconfig xorg.libpthreadstubs xorg.libXdmcp xorg.libxshmfence ]; buildInputs = [ cmake fftw gtkmm2 libxcb lv2 pkgconfig xorg.libpthreadstubs xorg.libXdmcp xorg.libxshmfence ];

View File

@ -30,7 +30,7 @@ pythonPackages.buildPythonApplication rec {
]; ];
propagatedBuildInputs = with pythonPackages; [ propagatedBuildInputs = with pythonPackages; [
feedparser dbus-python mygpoclient sqlite3 pygtk eyeD3 feedparser dbus-python mygpoclient pygtk eyeD3
] ++ stdenv.lib.optional ipodSupport libgpod; ] ++ stdenv.lib.optional ipodSupport libgpod;
checkPhase = '' checkPhase = ''

View File

@ -62,5 +62,8 @@ in nodePackages.buildNodePackage rec {
Groove Basin supports Last.fm scrobbling. Groove Basin supports Last.fm scrobbling.
''; '';
# groovebasin was built with nodejs 0.10 which reached end of LTS
# in October 216, it doesn't built with nodejs 4.x
broken = true;
}; };
} }

View File

@ -1,23 +1,24 @@
{ stdenv, fetchurl { stdenv, fetchurl
, pkgconfig, cmake, perl, ffmpeg , pkgconfig, cmake
, docbook_xml_dtd_45, docbook_xsl, libxslt , docbook_xml_dtd_45, docbook_xsl, libxslt
, phonon, automoc4, chromaprint, id3lib , python, ffmpeg, mp4v2, flac, libogg, libvorbis
, taglib, mp4v2, flac, libogg, libvorbis , phonon, automoc4, chromaprint, id3lib, taglib
, qt, zlib, readline , qt, zlib, readline
, makeWrapper , makeWrapper
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "kid3-${meta.version}"; name = "kid3-${version}";
version = "3.4.2";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/project/kid3/kid3/${meta.version}/${name}.tar.gz"; url = "mirror://sourceforge/project/kid3/kid3/${version}/${name}.tar.gz";
sha256 = "12sa54mg1b3wkagmh5yi20ski8km9d199lk0a1yfxy0ffjfld7js"; sha256 = "0gka4na583015jyqva18g85q7vnkjdk0iji2jp88di3kpvqhf1sw";
}; };
buildInputs = with stdenv.lib; buildInputs = with stdenv.lib;
[ pkgconfig cmake perl ffmpeg docbook_xml_dtd_45 docbook_xsl libxslt [ pkgconfig cmake python ffmpeg docbook_xml_dtd_45 docbook_xsl libxslt
phonon automoc4 chromaprint id3lib taglib mp4v2 flac libogg libvorbis phonon automoc4 chromaprint id3lib taglib mp4v2 flac libogg libvorbis
qt zlib readline makeWrapper ]; qt zlib readline makeWrapper ];
@ -33,7 +34,6 @@ stdenv.mkDerivation rec {
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
version = "3.3.0";
description = "A simple and powerful audio tag editor"; description = "A simple and powerful audio tag editor";
longDescription = '' longDescription = ''
If you want to easily tag multiple MP3, Ogg/Vorbis, FLAC, MPC, If you want to easily tag multiple MP3, Ogg/Vorbis, FLAC, MPC,
@ -71,4 +71,4 @@ stdenv.mkDerivation rec {
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }
# TODO: Qt5 support # TODO: Qt5 support - not so urgent!

View File

@ -1,6 +1,6 @@
{ stdenv, fetchgit, pythonPackages }: { stdenv, fetchgit, python2Packages }:
pythonPackages.buildPythonApplication rec { python2Packages.buildPythonApplication rec {
name = "lastwatch-${version}"; name = "lastwatch-${version}";
namePrefix = ""; namePrefix = "";
version = "0.4.1"; version = "0.4.1";
@ -11,14 +11,12 @@ pythonPackages.buildPythonApplication rec {
sha256 = "0nlng3595j5jvnikk8i5hb915zak5zsmfn2306cc4gfcns9xzjwp"; sha256 = "0nlng3595j5jvnikk8i5hb915zak5zsmfn2306cc4gfcns9xzjwp";
}; };
pythonPath = [ propagatedBuildInputs = with python2Packages; [
pythonPackages.pyinotify pyinotify
pythonPackages.pylast pylast
pythonPackages.mutagen mutagen
]; ];
propagatedBuildInputs = pythonPath;
meta = { meta = {
homepage = "https://github.com/aszlig/LastWatch"; homepage = "https://github.com/aszlig/LastWatch";
description = "An inotify-based last.fm audio scrobbler"; description = "An inotify-based last.fm audio scrobbler";

Some files were not shown because too many files have changed in this diff Show More