Merge remote-tracking branch 'origin/master' into gcc-6
This commit is contained in:
commit
31ea123b9c
|
@ -52,6 +52,20 @@ in ...</programlisting>
|
|||
It's equivalent to <varname>pkgs</varname> in the above example.
|
||||
</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 <nixpkgs> { config: {}; };
|
||||
newpkgs = pkgs.overridePackages ...;
|
||||
in ...</programlisting>
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-pkg-override">
|
||||
|
@ -85,9 +99,70 @@ in ...</programlisting>
|
|||
|
||||
</section>
|
||||
|
||||
<section xml:id="sec-pkg-overrideAttrs">
|
||||
<title><pkg>.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">
|
||||
<title><pkg>.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>
|
||||
<para>Do not use this function in Nixpkgs as it evaluates a Derivation
|
||||
before modifying it, which breaks package abstraction and removes
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
## User Guide
|
||||
|
||||
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
|
||||
|
||||
|
@ -409,36 +409,21 @@ and in this case the `python35` interpreter is automatically used.
|
|||
|
||||
### Interpreters
|
||||
|
||||
Versions 2.6, 2.7, 3.3, 3.4 and 3.5 of the CPython interpreter are available on
|
||||
Nix and are available as `python26`, `python27`, `python33`, `python34` and
|
||||
`python35`. The PyPy interpreter is also available as `pypy`. Currently, the
|
||||
aliases `python` and `python3` correspond to respectively `python27` and
|
||||
`python35`. The Nix expressions for the interpreters can be found in
|
||||
Versions 2.6, 2.7, 3.3, 3.4 and 3.5 of the CPython interpreter are as respectively
|
||||
`python26`, `python27`, `python33`, `python34` and `python35`. The PyPy interpreter
|
||||
is available as `pypy`. The aliases `python2` and `python3` correspond to respectively `python27` and
|
||||
`python35`. The default interpreter, `python`, maps to `python3`.
|
||||
The Nix expressions for the interpreters can be found in
|
||||
`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
|
||||
`out/{python.sitePackages}` to `$PYTHONPATH` if such directory
|
||||
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
|
||||
|
||||
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.
|
||||
- `withPackages`. Simpler interface to `buildEnv`. See section *python.withPackages function* for usage and documentation.
|
||||
- `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
|
||||
|
||||
|
@ -475,8 +460,9 @@ sets are
|
|||
|
||||
and the aliases
|
||||
|
||||
* `pkgs.pythonPackages` pointing to `pkgs.python27Packages`
|
||||
* `pkgs.python2Packages` pointing to `pkgs.python27Packages`
|
||||
* `pkgs.python3Packages` pointing to `pkgs.python35Packages`
|
||||
* `pkgs.pythonPackages` pointing to `pkgs.python3Packages`
|
||||
|
||||
#### `buildPythonPackage` function
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ texlive.combine {
|
|||
You can list packages e.g. by <command>nix-repl</command>.
|
||||
<programlisting>
|
||||
$ nix-repl
|
||||
nix-repl> :l <nixpkgs>
|
||||
nix-repl> texlive.collection-<TAB>
|
||||
</programlisting>
|
||||
</para></listitem>
|
||||
|
|
|
@ -56,13 +56,15 @@ rec {
|
|||
ff = f origArgs;
|
||||
overrideWith = newArgs: origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs);
|
||||
in
|
||||
if builtins.isAttrs ff then (ff //
|
||||
{ override = newArgs: makeOverridable f (overrideWith newArgs);
|
||||
if builtins.isAttrs ff then (ff // {
|
||||
override = newArgs: makeOverridable f (overrideWith newArgs);
|
||||
overrideDerivation = fdrv:
|
||||
makeOverridable (args: overrideDerivation (f args) fdrv) origArgs;
|
||||
${if ff ? overrideAttrs then "overrideAttrs" else null} = fdrv:
|
||||
makeOverridable (args: (f args).overrideAttrs fdrv) origArgs;
|
||||
})
|
||||
else if builtins.isFunction ff then
|
||||
{ override = newArgs: makeOverridable f (overrideWith newArgs);
|
||||
else if builtins.isFunction ff then {
|
||||
override = newArgs: makeOverridable f (overrideWith newArgs);
|
||||
__functor = self: ff;
|
||||
overrideDerivation = throw "overrideDerivation not yet supported for functors";
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
aaronschif = "Aaron Schif <aaronschif@gmail.com>";
|
||||
abaldeau = "Andreas Baldeau <andreas@baldeau.net>";
|
||||
abbradar = "Nikolay Amiantov <ab@fmap.me>";
|
||||
abigailbuccaneer = "Abigail Bunyan <abigailbuccaneer@gmail.com>";
|
||||
aboseley = "Adam Boseley <adam.boseley@gmail.com>";
|
||||
abuibrahim = "Ruslan Babayev <ruslan@babayev.com>";
|
||||
acowley = "Anthony Cowley <acowley@gmail.com>";
|
||||
|
@ -29,6 +30,7 @@
|
|||
all = "Nix Committers <nix-commits@lists.science.uu.nl>";
|
||||
ambrop72 = "Ambroz Bizjak <ambrop7@gmail.com>";
|
||||
amiddelk = "Arie Middelkoop <amiddelk@gmail.com>";
|
||||
amiloradovsky = "Andrew Miloradovsky <miloradovsky@gmail.com>";
|
||||
amorsillo = "Andrew Morsillo <andrew.morsillo@gmail.com>";
|
||||
AndersonTorres = "Anderson Torres <torres.anderson.85@gmail.com>";
|
||||
anderspapitto = "Anders Papitto <anderspapitto@gmail.com>";
|
||||
|
@ -104,8 +106,8 @@
|
|||
cstrahan = "Charles Strahan <charles@cstrahan.com>";
|
||||
cwoac = "Oliver Matthews <oliver@codersoffortune.net>";
|
||||
DamienCassou = "Damien Cassou <damien@cassou.me>";
|
||||
dasuxullebt = "Christoph-Simon Senjak <christoph.senjak@googlemail.com>";
|
||||
danbst = "Danylo Hlynskyi <abcz2.uprola@gmail.com>";
|
||||
dasuxullebt = "Christoph-Simon Senjak <christoph.senjak@googlemail.com>";
|
||||
davidak = "David Kleuker <post@davidak.de>";
|
||||
davidrusu = "David Rusu <davidrusu.me@gmail.com>";
|
||||
davorb = "Davor Babic <davor@davor.se>";
|
||||
|
@ -122,6 +124,7 @@
|
|||
dipinhora = "Dipin Hora <dipinhora+github@gmail.com>";
|
||||
dmalikov = "Dmitry Malikov <malikov.d.y@gmail.com>";
|
||||
dochang = "Desmond O. Chang <dochang@gmail.com>";
|
||||
domenkozar = "Domen Kozar <domen@dev.si>";
|
||||
doublec = "Chris Double <chris.double@double.co.nz>";
|
||||
drets = "Dmytro Rets <dmitryrets@gmail.com>";
|
||||
drewkett = "Andrew Burkett <burkett.andrew@gmail.com>";
|
||||
|
@ -172,12 +175,13 @@
|
|||
globin = "Robin Gloster <mail@glob.in>";
|
||||
gnidorah = "Alex Ivanov <yourbestfriend@opmbx.org>";
|
||||
goibhniu = "Cillian de Róiste <cillian.deroiste@gmail.com>";
|
||||
goodrone = "Andrew Trachenko <goodrone@gmail.com>";
|
||||
Gonzih = "Max Gonzih <gonzih@gmail.com>";
|
||||
goodrone = "Andrew Trachenko <goodrone@gmail.com>";
|
||||
gpyh = "Yacine Hmito <yacine.hmito@gmail.com>";
|
||||
grahamc = "Graham Christensen <graham@grahamc.com>";
|
||||
gridaphobe = "Eric Seidel <eric@seidel.io>";
|
||||
guibert = "David Guibert <david.guibert@gmail.com>";
|
||||
guillaumekoenig = "Guillaume Koenig <guillaume.edward.koenig@gmail.com>";
|
||||
hakuch = "Jesse Haber-Kucharsky <hakuch@gmail.com>";
|
||||
havvy = "Ryan Scheel <ryan.havvy@gmail.com>";
|
||||
hbunke = "Hendrik Bunke <bunke.hendrik@gmail.com>";
|
||||
|
@ -188,7 +192,6 @@
|
|||
hrdinka = "Christoph Hrdinka <c.nix@hrdinka.at>";
|
||||
iand675 = "Ian Duncan <ian@iankduncan.com>";
|
||||
ianwookim = "Ian-Woo Kim <ianwookim@gmail.com>";
|
||||
domenkozar = "Domen Kozar <domen@dev.si>";
|
||||
igsha = "Igor Sharonov <igor.sharonov@gmail.com>";
|
||||
ikervagyok = "Balázs Lengyel <ikervagyok@gmail.com>";
|
||||
j-keck = "Jürgen Keck <jhyphenkeck@gmail.com>";
|
||||
|
@ -213,11 +216,13 @@
|
|||
jwiegley = "John Wiegley <johnw@newartisans.com>";
|
||||
jwilberding = "Jordan Wilberding <jwilberding@afiniate.com>";
|
||||
jzellner = "Jeff Zellner <jeffz@eml.cc>";
|
||||
kaiha = "Kai Harries <kai.harries@gmail.com>";
|
||||
kamilchm = "Kamil Chmielewski <kamil.chm@gmail.com>";
|
||||
kampfschlaefer = "Arnold Krille <arnold@arnoldarts.de>";
|
||||
kevincox = "Kevin Cox <kevincox@kevincox.ca>";
|
||||
khumba = "Bryan Gardiner <bog@khumba.net>";
|
||||
KibaFox = "Kiba Fox <kiba.fox@foxypossibilities.com>";
|
||||
kierdavis = "Kier Davis <kierdavis@gmail.com>";
|
||||
kkallio = "Karn Kallio <tierpluspluslists@gmail.com>";
|
||||
koral = "Koral <koral@mailoo.org>";
|
||||
kovirobi = "Kovacsics Robert <kovirobi@gmail.com>";
|
||||
|
@ -243,7 +248,6 @@
|
|||
lucas8 = "Luc Chabassier <luc.linux@mailoo.org>";
|
||||
ludo = "Ludovic Courtès <ludo@gnu.org>";
|
||||
luispedro = "Luis Pedro Coelho <luis@luispedro.org>";
|
||||
sternenseemann = "Lukas Epple <post@lukasepple.de>";
|
||||
lukego = "Luke Gorrie <luke@snabb.co>";
|
||||
lw = "Sergey Sofeychuk <lw@fmap.me>";
|
||||
madjar = "Georges Dubus <georges.dubus@compiletoi.net>";
|
||||
|
@ -259,10 +263,10 @@
|
|||
martingms = "Martin Gammelsæter <martin@mg.am>";
|
||||
matejc = "Matej Cotman <cotman.matej@gmail.com>";
|
||||
mathnerd314 = "Mathnerd314 <mathnerd314.gph+hs@gmail.com>";
|
||||
matthewbauer = "Matthew Bauer <mjbauer95@gmail.com>";
|
||||
matthiasbeyer = "Matthias Beyer <mail@beyermatthias.de>";
|
||||
maurer = "Matthew Maurer <matthew.r.maurer+nix@gmail.com>";
|
||||
mbakke = "Marius Bakke <mbakke@fastmail.com>";
|
||||
matthewbauer = "Matthew Bauer <mjbauer95@gmail.com>";
|
||||
mbe = "Brandon Edens <brandonedens@gmail.com>";
|
||||
mboes = "Mathieu Boespflug <mboes@tweag.net>";
|
||||
mcmtroffaes = "Matthias C. M. Troffaes <matthias.troffaes@gmail.com>";
|
||||
|
@ -295,15 +299,16 @@
|
|||
muflax = "Stefan Dorn <mail@muflax.com>";
|
||||
myrl = "Myrl Hex <myrl.0xf@gmail.com>";
|
||||
nand0p = "Fernando Jose Pando <nando@hex7.com>";
|
||||
nathan-gs = "Nathan Bijnens <nathan@nathan.gs>";
|
||||
Nate-Devv = "Nathan Moore <natedevv@gmail.com>";
|
||||
nathan-gs = "Nathan Bijnens <nathan@nathan.gs>";
|
||||
nckx = "Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>";
|
||||
nequissimus = "Tim Steinbach <tim@nequissimus.com>";
|
||||
nfjinjing = "Jinjing Wang <nfjinjing@gmail.com>";
|
||||
nhooyr = "Anmol Sethi <anmol@aubble.com>";
|
||||
nicknovitski = "Nick Novitski <nixpkgs@nicknovitski.com>";
|
||||
nico202 = "Nicolò Balzarotti <anothersms@gmail.com>";
|
||||
notthemessiah = "Brian Cohen <brian.cohen.88@gmail.com>";
|
||||
NikolaMandic = "Ratko Mladic <nikola@mandic.email>";
|
||||
notthemessiah = "Brian Cohen <brian.cohen.88@gmail.com>";
|
||||
np = "Nicolas Pouillard <np.nix@nicolaspouillard.fr>";
|
||||
nslqqq = "Nikita Mikhailov <nslqqq@gmail.com>";
|
||||
obadz = "obadz <obadz-nixos@obadz.com>";
|
||||
|
@ -344,6 +349,7 @@
|
|||
proglodyte = "Proglodyte <proglodyte23@gmail.com>";
|
||||
pshendry = "Paul Hendry <paul@pshendry.com>";
|
||||
psibi = "Sibi <sibi@psibi.in>";
|
||||
pstn = "Philipp Steinpaß <philipp@xndr.de>";
|
||||
pSub = "Pascal Wittmann <mail@pascal-wittmann.de>";
|
||||
puffnfresh = "Brian McKenna <brian@brianmckenna.org>";
|
||||
pxc = "Patrick Callahan <patrick.callahan@latitudeengineering.com>";
|
||||
|
@ -377,8 +383,8 @@
|
|||
rvl = "Rodney Lorrimar <dev+nix@rodney.id.au>";
|
||||
rvlander = "Gaëtan André <rvlander@gaetanandre.eu>";
|
||||
ryanartecona = "Ryan Artecona <ryanartecona@gmail.com>";
|
||||
ryantm = "Ryan Mulligan <ryan@ryantm.com>";
|
||||
ryansydnor = "Ryan Sydnor <ryan.t.sydnor@gmail.com>";
|
||||
ryantm = "Ryan Mulligan <ryan@ryantm.com>";
|
||||
rycee = "Robert Helgesson <robert@rycee.net>";
|
||||
ryneeverett = "Ryne Everett <ryneeverett@gmail.com>";
|
||||
s1lvester = "Markus Silvester <s1lvester@bockhacker.me>";
|
||||
|
@ -402,8 +408,8 @@
|
|||
skeidel = "Sven Keidel <svenkeidel@gmail.com>";
|
||||
skrzyp = "Jakub Skrzypnik <jot.skrzyp@gmail.com>";
|
||||
sleexyz = "Sean Lee <freshdried@gmail.com>";
|
||||
solson = "Scott Olson <scott@solson.me>";
|
||||
smironov = "Sergey Mironov <grrwlf@gmail.com>";
|
||||
solson = "Scott Olson <scott@solson.me>";
|
||||
spacefrogg = "Michael Raitza <spacefrogg-nixos@meterriblecrew.net>";
|
||||
spencerjanssen = "Spencer Janssen <spencerjanssen@gmail.com>";
|
||||
spinus = "Tomasz Czyż <tomasz.czyz@gmail.com>";
|
||||
|
@ -411,6 +417,7 @@
|
|||
spwhitt = "Spencer Whitt <sw@swhitt.me>";
|
||||
SShrike = "Severen Redwood <severen@shrike.me>";
|
||||
stephenmw = "Stephen Weinberg <stephen@q5comm.com>";
|
||||
sternenseemann = "Lukas Epple <post@lukasepple.de>";
|
||||
steveej = "Stefan Junker <mail@stefanjunker.de>";
|
||||
swarren83 = "Shawn Warren <shawn.w.warren@gmail.com>";
|
||||
swistak35 = "Rafał Łasocha <me@swistak35.com>";
|
||||
|
@ -442,15 +449,19 @@
|
|||
twey = "James ‘Twey’ Kay <twey@twey.co.uk>";
|
||||
uralbash = "Svintsov Dmitry <root@uralbash.ru>";
|
||||
urkud = "Yury G. Kudryashov <urkud+nix@ya.ru>";
|
||||
uwap = "uwap <me@uwap.name>";
|
||||
vandenoever = "Jos van den Oever <jos@vandenoever.info>";
|
||||
vanzef = "Ivan Solyankin <vanzef@gmail.com>";
|
||||
vbgl = "Vincent Laporte <Vincent.Laporte@gmail.com>";
|
||||
vbmithr = "Vincent Bernardoff <vb@luminar.eu.org>";
|
||||
vcunat = "Vladimír Čunát <vcunat@gmail.com>";
|
||||
veprbl = "Dmitry Kalinkin <veprbl@gmail.com>";
|
||||
viric = "Lluís Batlle i Rossell <viric@viric.name>";
|
||||
vizanto = "Danny Wilson <danny@prime.vc>";
|
||||
vklquevs = "vklquevs <vklquevs@gmail.com>";
|
||||
vlstill = "Vladimír Štill <xstill@fi.muni.cz>";
|
||||
vmandela = "Venkateswara Rao Mandela <venkat.mandela@gmail.com>";
|
||||
volhovm = "Mikhail Volkhov <volhovm.cs@gmail.com>";
|
||||
vozz = "Oliver Hunt <oliver.huntuk@gmail.com>";
|
||||
vrthra = "Rahul Gopinath <rahul@gopinath.org>";
|
||||
wedens = "wedens <kirill.wedens@gmail.com>";
|
||||
|
@ -464,6 +475,7 @@
|
|||
wscott = "Wayne Scott <wsc9tt@gmail.com>";
|
||||
wyvie = "Elijah Rum <elijahrum@gmail.com>";
|
||||
yarr = "Dmitry V. <savraz@gmail.com>";
|
||||
yochai = "Yochai <yochai@titat.info>";
|
||||
yurrriq = "Eric Bailey <eric@ericb.me>";
|
||||
z77z = "Marco Maggesi <maggesi@math.unifi.it>";
|
||||
zagy = "Christian Zagrodnick <cz@flyingcircus.io>";
|
||||
|
@ -471,6 +483,4 @@
|
|||
zimbatm = "zimbatm <zimbatm@zimbatm.com>";
|
||||
zohl = "Al Zohali <zohl@fmap.me>";
|
||||
zoomulator = "Kim Simmons <zoomulator@gmail.com>";
|
||||
amiloradovsky = "Andrew Miloradovsky <miloradovsky@gmail.com>";
|
||||
yochai = "Yochai <yochai@titat.info>";
|
||||
}
|
||||
|
|
|
@ -69,9 +69,13 @@ rec {
|
|||
#
|
||||
# nix-repl> obj
|
||||
# { __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 // {
|
||||
extend = f: makeExtensible (extends f rattrs);
|
||||
${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);
|
||||
};
|
||||
|
||||
# Flip the order of the arguments of a binary function.
|
||||
|
|
|
@ -164,14 +164,6 @@ following incompatible changes:</para>
|
|||
PHP has been upgraded to 7.0
|
||||
</para>
|
||||
</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>
|
||||
|
||||
|
||||
|
|
|
@ -61,6 +61,13 @@ following incompatible changes:</para>
|
|||
<literal>strippedName</literal>.
|
||||
</para>
|
||||
</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>
|
||||
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ let cfg = config.system.autoUpgrade; in
|
|||
${config.system.build.nixos-rebuild}/bin/nixos-rebuild switch ${toString cfg.flags}
|
||||
'';
|
||||
|
||||
startAt = optionalString cfg.enable cfg.dates;
|
||||
startAt = optional cfg.enable cfg.dates;
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -276,6 +276,7 @@
|
|||
telegraf = 256;
|
||||
gitlab-runner = 257;
|
||||
postgrey = 258;
|
||||
hound = 259;
|
||||
|
||||
# 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
|
||||
gitlab-runner = 257;
|
||||
postgrey = 258;
|
||||
hound = 259;
|
||||
|
||||
# When adding a gid, make sure it doesn't match an existing
|
||||
# uid. Users and groups with the same name should have equal
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
./programs/man.nix
|
||||
./programs/mosh.nix
|
||||
./programs/nano.nix
|
||||
./programs/oblogout.nix
|
||||
./programs/screen.nix
|
||||
./programs/shadow.nix
|
||||
./programs/shell.nix
|
||||
|
@ -166,6 +167,7 @@
|
|||
./services/desktops/gnome3/gnome-keyring.nix
|
||||
./services/desktops/gnome3/gnome-online-accounts.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/gvfs.nix
|
||||
./services/desktops/gnome3/seahorse.nix
|
||||
|
@ -312,6 +314,7 @@
|
|||
./services/monitoring/uptime.nix
|
||||
./services/monitoring/zabbix-agent.nix
|
||||
./services/monitoring/zabbix-server.nix
|
||||
./services/network-filesystems/cachefilesd.nix
|
||||
./services/network-filesystems/drbd.nix
|
||||
./services/network-filesystems/netatalk.nix
|
||||
./services/network-filesystems/nfsd.nix
|
||||
|
@ -455,6 +458,7 @@
|
|||
./services/scheduling/fcron.nix
|
||||
./services/scheduling/marathon.nix
|
||||
./services/search/elasticsearch.nix
|
||||
./services/search/hound.nix
|
||||
./services/search/kibana.nix
|
||||
./services/search/solr.nix
|
||||
./services/security/clamav.nix
|
||||
|
@ -492,6 +496,7 @@
|
|||
./services/web-apps/pump.io.nix
|
||||
./services/web-apps/tt-rss.nix
|
||||
./services/web-apps/selfoss.nix
|
||||
./services/web-apps/quassel-webserver.nix
|
||||
./services/web-servers/apache-httpd/default.nix
|
||||
./services/web-servers/caddy.nix
|
||||
./services/web-servers/fcgiwrap.nix
|
||||
|
@ -531,6 +536,7 @@
|
|||
./services/x11/window-managers/fluxbox.nix
|
||||
./services/x11/window-managers/icewm.nix
|
||||
./services/x11/window-managers/bspwm.nix
|
||||
./services/x11/window-managers/bspwm-unstable.nix
|
||||
./services/x11/window-managers/metacity.nix
|
||||
./services/x11/window-managers/none.nix
|
||||
./services/x11/window-managers/twm.nix
|
||||
|
|
|
@ -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}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -74,7 +74,28 @@ options for the <literal>security.acme</literal> module.</para>
|
|||
</para>
|
||||
|
||||
<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 = ''
|
||||
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_name foo.example.com;
|
||||
listen 443 ssl;
|
||||
|
|
|
@ -104,7 +104,11 @@ in {
|
|||
description = "Kernel Auditing";
|
||||
wantedBy = [ "basic.target" ];
|
||||
|
||||
unitConfig.ConditionVirtualization = "!container";
|
||||
unitConfig = {
|
||||
ConditionVirtualization = "!container";
|
||||
ConditionSecurity = [ "audit" ];
|
||||
};
|
||||
|
||||
|
||||
path = [ pkgs.audit ];
|
||||
|
||||
|
|
|
@ -67,9 +67,9 @@ in
|
|||
system.requiredKernelConfig = with config.lib.kernelConfig;
|
||||
[ (isEnabled "GRKERNSEC")
|
||||
(isEnabled "PAX")
|
||||
(isYES "GRKERNSEC_SYSCTL")
|
||||
(isYES "GRKERNSEC_SYSCTL_DISTRO")
|
||||
(isNO "GRKERNSEC_NO_RBAC")
|
||||
(isYes "GRKERNSEC_SYSCTL")
|
||||
(isYes "GRKERNSEC_SYSCTL_DISTRO")
|
||||
(isNo "GRKERNSEC_NO_RBAC")
|
||||
];
|
||||
|
||||
nixpkgs.config.grsecurity = true;
|
||||
|
|
|
@ -49,7 +49,7 @@ in {
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.str;
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Extra directives added to to the end of MPD's configuration file,
|
||||
|
|
|
@ -340,6 +340,7 @@ in {
|
|||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Extra configuration for Bacula Director Daemon.
|
||||
'';
|
||||
|
|
|
@ -5,34 +5,34 @@ with lib;
|
|||
let
|
||||
cfg = config.services.neo4j;
|
||||
|
||||
serverConfig = pkgs.writeText "neo4j-server.properties" ''
|
||||
org.neo4j.server.database.location=${cfg.dataDir}/data/graph.db
|
||||
org.neo4j.server.webserver.address=${cfg.listenAddress}
|
||||
org.neo4j.server.webserver.port=${toString cfg.port}
|
||||
${optionalString cfg.enableHttps ''
|
||||
org.neo4j.server.webserver.https.enabled=true
|
||||
org.neo4j.server.webserver.https.port=${toString cfg.httpsPort}
|
||||
org.neo4j.server.webserver.https.cert.location=${cfg.cert}
|
||||
org.neo4j.server.webserver.https.key.location=${cfg.key}
|
||||
org.neo4j.server.webserver.https.keystore.location=${cfg.dataDir}/data/keystore
|
||||
serverConfig = pkgs.writeText "neo4j.conf" ''
|
||||
dbms.directories.data=${cfg.dataDir}/data
|
||||
dbms.directories.certificates=${cfg.certDir}
|
||||
dbms.directories.logs=${cfg.dataDir}/logs
|
||||
dbms.directories.plugins=${cfg.dataDir}/plugins
|
||||
dbms.connector.http.type=HTTP
|
||||
dbms.connector.http.enabled=true
|
||||
dbms.connector.http.address=${cfg.listenAddress}:${toString cfg.port}
|
||||
${optionalString cfg.enableBolt ''
|
||||
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
|
||||
org.neo4j.server.webadmin.data.uri=/db/data/
|
||||
org.neo4j.server.webadmin.management.uri=/db/manage/
|
||||
org.neo4j.server.db.tuning.properties=${cfg.package}/share/neo4j/conf/neo4j.properties
|
||||
org.neo4j.server.manage.console_engines=shell
|
||||
${optionalString cfg.enableHttps ''
|
||||
dbms.connector.https.type=HTTP
|
||||
dbms.connector.https.enabled=true
|
||||
dbms.connector.https.encryption=TLS
|
||||
dbms.connector.https.address=${cfg.listenAddress}:${toString cfg.httpsPort}
|
||||
''}
|
||||
dbms.shell.enabled=true
|
||||
${cfg.extraServerConfig}
|
||||
'';
|
||||
|
||||
loggingConfig = pkgs.writeText "logging.properties" cfg.loggingConfig;
|
||||
|
||||
wrapperConfig = pkgs.writeText "neo4j-wrapper.conf" ''
|
||||
wrapper.java.additional=-Dorg.neo4j.server.properties=${serverConfig}
|
||||
wrapper.java.additional=-Djava.util.logging.config.file=${loggingConfig}
|
||||
wrapper.java.additional=-XX:+UseConcMarkSweepGC
|
||||
wrapper.java.additional=-XX:+CMSClassUnloadingEnabled
|
||||
wrapper.pidfile=${cfg.dataDir}/neo4j-server.pid
|
||||
wrapper.name=neo4j
|
||||
dbms.jvm.additional=-Dunsupported.dbms.udc.source=tarball
|
||||
dbms.jvm.additional=-XX:+UseConcMarkSweepGC
|
||||
dbms.jvm.additional=-XX:+CMSClassUnloadingEnabled
|
||||
'';
|
||||
|
||||
in {
|
||||
|
@ -65,6 +65,18 @@ in {
|
|||
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 {
|
||||
description = "Enable https for Neo4j.";
|
||||
default = false;
|
||||
|
@ -77,15 +89,9 @@ in {
|
|||
type = types.int;
|
||||
};
|
||||
|
||||
cert = mkOption {
|
||||
description = "Neo4j https certificate.";
|
||||
default = "${cfg.dataDir}/conf/ssl/neo4j.cert";
|
||||
type = types.path;
|
||||
};
|
||||
|
||||
key = mkOption {
|
||||
description = "Neo4j https certificate key.";
|
||||
default = "${cfg.dataDir}/conf/ssl/neo4j.key";
|
||||
certDir = mkOption {
|
||||
description = "Neo4j TLS certificates directory.";
|
||||
default = "${cfg.dataDir}/certificates";
|
||||
type = types.path;
|
||||
};
|
||||
|
||||
|
@ -95,26 +101,11 @@ in {
|
|||
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 {
|
||||
description = "Extra configuration for neo4j server.";
|
||||
default = "";
|
||||
type = types.lines;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
@ -124,14 +115,18 @@ in {
|
|||
description = "Neo4j Daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
environment = { NEO4J_INSTANCE = cfg.dataDir; };
|
||||
environment = {
|
||||
NEO4J_HOME = "${cfg.package}/share/neo4j";
|
||||
NEO4J_CONF = "${cfg.dataDir}/conf";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.package}/bin/neo4j console";
|
||||
User = "neo4j";
|
||||
PermissionsStartOnly = true;
|
||||
};
|
||||
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
|
||||
if [ "$(id -u)" = 0 ]; then chown -R neo4j ${cfg.dataDir}; fi
|
||||
'';
|
||||
|
@ -146,5 +141,4 @@ in {
|
|||
home = cfg.dataDir;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -53,6 +53,13 @@ in
|
|||
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 {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
|
@ -96,7 +103,7 @@ in
|
|||
mkdir -p ${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 =
|
||||
|
|
|
@ -37,6 +37,8 @@ in
|
|||
|
||||
services.dbus.packages = [ gnome3.evolution_data_server ];
|
||||
|
||||
systemd.packages = [ gnome3.evolution_data_server ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -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 ];
|
||||
|
||||
};
|
||||
|
||||
}
|
|
@ -37,6 +37,8 @@ in
|
|||
|
||||
services.dbus.packages = [ gnome3.gvfs ];
|
||||
|
||||
systemd.packages = [ gnome3.gvfs ];
|
||||
|
||||
services.udev.packages = [ pkgs.libmtp.bin ];
|
||||
|
||||
};
|
||||
|
|
|
@ -37,6 +37,8 @@ in
|
|||
|
||||
services.dbus.packages = [ gnome3.tracker ];
|
||||
|
||||
systemd.packages = [ gnome3.tracker ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ in {
|
|||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.brltty}/bin/brltty --no-daemon";
|
||||
Type = "simple"; # Change to notidy after next releae
|
||||
Type = "notify";
|
||||
TimeoutStartSec = 5;
|
||||
TimeoutStopSec = 10;
|
||||
Restart = "always";
|
||||
|
|
|
@ -40,7 +40,7 @@ in
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.str;
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Additional configuration variables for TLP";
|
||||
};
|
||||
|
|
|
@ -111,7 +111,7 @@ in
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.str;
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = "mail_debug = yes";
|
||||
description = "Additional entries to put verbatim into Dovecot's config file.";
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with pkgs;
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.opensmtpd;
|
||||
conf = writeText "smtpd.conf" cfg.serverConfiguration;
|
||||
conf = pkgs.writeText "smtpd.conf" cfg.serverConfiguration;
|
||||
args = concatStringsSep " " cfg.extraServerArgs;
|
||||
|
||||
sendmail = pkgs.runCommand "opensmtpd-sendmail" {} ''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${opensmtpd}/sbin/smtpctl $out/bin/sendmail
|
||||
ln -s ${pkgs.opensmtpd}/sbin/smtpctl $out/bin/sendmail
|
||||
'';
|
||||
|
||||
in {
|
||||
|
@ -48,21 +47,19 @@ in {
|
|||
};
|
||||
|
||||
serverConfiguration = mkOption {
|
||||
type = types.string;
|
||||
default = "";
|
||||
type = types.lines;
|
||||
example = ''
|
||||
listen on lo
|
||||
accept for any deliver to lmtp localhost:24
|
||||
'';
|
||||
description = ''
|
||||
The contents of the smtpd.conf configuration file. See the
|
||||
OpenSMTPD documentation for syntax information. If this option
|
||||
is left empty, the OpenSMTPD server will not start.
|
||||
OpenSMTPD documentation for syntax information.
|
||||
'';
|
||||
};
|
||||
|
||||
procPackages = mkOption {
|
||||
type = types.listOf types.path;
|
||||
type = types.listOf types.package;
|
||||
default = [];
|
||||
description = ''
|
||||
Packages to search for filters, tables, queues, and schedulers.
|
||||
|
@ -100,12 +97,11 @@ in {
|
|||
systemd.services.opensmtpd = let
|
||||
procEnv = pkgs.buildEnv {
|
||||
name = "opensmtpd-procs";
|
||||
paths = [ opensmtpd ] ++ cfg.procPackages;
|
||||
paths = [ pkgs.opensmtpd ] ++ cfg.procPackages;
|
||||
pathsToLink = [ "/libexec/opensmtpd" ];
|
||||
};
|
||||
in {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network.target" ];
|
||||
after = [ "network.target" ];
|
||||
preStart = ''
|
||||
mkdir -p /var/spool/smtpd
|
||||
|
@ -119,7 +115,7 @@ in {
|
|||
chown smtpq.root /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";
|
||||
};
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ in
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.str;
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Extra configuration for bepasty server to be appended on the
|
||||
configuration.
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.dictd;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
@ -20,7 +24,7 @@ with lib;
|
|||
|
||||
DBs = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [];
|
||||
default = with pkgs.dictdDBs; [ wiktionary wordnet ];
|
||||
example = [ pkgs.dictdDBs.nld2eng ];
|
||||
description = ''List of databases to make available.'';
|
||||
};
|
||||
|
@ -34,8 +38,8 @@ with lib;
|
|||
|
||||
config = let dictdb = pkgs.dictDBCollector { dictlist = map (x: {
|
||||
name = x.name;
|
||||
filename = x; } ) config.services.dictd.DBs; };
|
||||
in mkIf config.services.dictd.enable {
|
||||
filename = x; } ) cfg.DBs; };
|
||||
in mkIf cfg.enable {
|
||||
|
||||
# get the command line client on system path to make some use of the service
|
||||
environment.systemPackages = [ pkgs.dict ];
|
||||
|
|
|
@ -463,6 +463,7 @@ in {
|
|||
|
||||
systemd.services.gitlab = {
|
||||
after = [ "network.target" "postgresql.service" "redis.service" ];
|
||||
requires = [ "gitlab-sidekiq.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment = gitlabEnv;
|
||||
path = with pkgs; [
|
||||
|
|
|
@ -53,7 +53,7 @@ in
|
|||
systemd.services.nix-gc =
|
||||
{ description = "Nix Garbage Collector";
|
||||
script = "exec ${config.nix.package.out}/bin/nix-collect-garbage ${cfg.options}";
|
||||
startAt = optionalString cfg.automatic cfg.dates;
|
||||
startAt = optional cfg.automatic cfg.dates;
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -41,7 +41,7 @@ in
|
|||
systemd.services.nix-optimise =
|
||||
{ description = "Nix Store Optimiser";
|
||||
serviceConfig.ExecStart = "${config.nix.package}/bin/nix-store --optimise";
|
||||
startAt = optional cfg.automatic cfg.dates;
|
||||
startAt = optionals cfg.automatic cfg.dates;
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -71,7 +71,7 @@ in {
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.str;
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Extra configuration in configuration.yml";
|
||||
};
|
||||
|
|
|
@ -107,7 +107,7 @@ in {
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.string;
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Extra configuration options for Bosun. You should describe your
|
||||
|
|
|
@ -167,7 +167,7 @@ in {
|
|||
CACHE_TYPE: 'filesystem'
|
||||
CACHE_DIR: '/tmp/graphite-api-cache'
|
||||
'';
|
||||
type = types.str;
|
||||
type = types.lines;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -100,6 +100,7 @@ in
|
|||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
description = ''
|
||||
<filename>munin-node.conf</filename> extra configuration. See
|
||||
<link xlink:href='http://munin-monitoring.org/wiki/munin-node.conf' />
|
||||
|
|
|
@ -50,6 +50,7 @@ in {
|
|||
|
||||
systemd.services.riemann-health = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ procps ];
|
||||
serviceConfig = {
|
||||
User = "riemanntools";
|
||||
ExecStart = "${healthLauncher}/bin/riemann-health";
|
||||
|
|
|
@ -53,6 +53,7 @@ in
|
|||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Configuration that is injected verbatim into the configuration 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}
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -153,6 +153,7 @@ in
|
|||
'';
|
||||
};
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
# specify whether SSL is required
|
||||
|
@ -173,6 +174,7 @@ in
|
|||
replication = {
|
||||
enable = mkEnableOption "XtreemFS DIR replication plugin";
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
example = ''
|
||||
# participants of the replication including this replica
|
||||
babudb.repl.participant.0 = 192.168.0.10
|
||||
|
@ -269,6 +271,7 @@ in
|
|||
'';
|
||||
};
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
example = ''
|
||||
osd_check_interval = 300
|
||||
no_atime = true
|
||||
|
@ -307,6 +310,7 @@ in
|
|||
replication = {
|
||||
enable = mkEnableOption "XtreemFS MRC replication plugin";
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
example = ''
|
||||
# participants of the replication including this replica
|
||||
babudb.repl.participant.0 = 192.168.0.10
|
||||
|
@ -385,6 +389,7 @@ in
|
|||
'';
|
||||
};
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
example = ''
|
||||
local_clock_renewal = 0
|
||||
remote_time_sync = 30000
|
||||
|
|
|
@ -20,13 +20,27 @@ in
|
|||
default = false;
|
||||
type = types.bool;
|
||||
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 {
|
||||
default = "/var/empty";
|
||||
type = types.str;
|
||||
default = "/srv/tftp";
|
||||
type = types.path;
|
||||
description = ''
|
||||
Document root directory for the atftpd.
|
||||
'';
|
||||
|
@ -39,11 +53,11 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
|
||||
systemd.services.atftpd = {
|
||||
description = "atftpd TFTP server";
|
||||
description = "TFTP Server";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
# 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}";
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -175,11 +175,20 @@ in
|
|||
|
||||
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 =
|
||||
{ description = "Avahi daemon";
|
||||
{ description = "Avahi mDNS/DNS-SD Stack";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
# Receive restart event after resume
|
||||
partOf = [ "post-resume.target" ];
|
||||
requires = [ "avahi-daemon.socket" ];
|
||||
|
||||
serviceConfig."NotifyAccess" = "main";
|
||||
serviceConfig."BusName" = "org.freedesktop.Avahi";
|
||||
serviceConfig."Type" = "dbus";
|
||||
|
||||
path = [ pkgs.coreutils pkgs.avahi ];
|
||||
|
||||
|
|
|
@ -113,6 +113,7 @@ in
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "
|
||||
Extra lines to be added verbatim to the generated named configuration file.
|
||||
|
|
|
@ -51,6 +51,7 @@ in
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Extra configuration directives that should be added to
|
||||
|
|
|
@ -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
|
|
@ -28,21 +28,18 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
peers = mapAttrsToList (n: v: v) (cfg.ETHInterface.connectTo // cfg.UDPInterface.connectTo);
|
||||
|
||||
pubs = toString (map (p: if p.hostname == "" then "" else p.publicKey) peers);
|
||||
hosts = toString (map (p: if p.hostname == "" then "" else p.hostname) peers);
|
||||
|
||||
cjdnsHosts =
|
||||
if hosts != "" then
|
||||
import (pkgs.stdenv.mkDerivation {
|
||||
name = "cjdns-hosts";
|
||||
builder = ./cjdns-hosts.sh;
|
||||
|
||||
inherit (pkgs) cjdns;
|
||||
inherit pubs hosts;
|
||||
})
|
||||
else "";
|
||||
# Additional /etc/hosts entries for peers with an associated hostname
|
||||
cjdnsExtraHosts = import (pkgs.runCommand "cjdns-hosts" {}
|
||||
# Generate a builder that produces an output usable as a Nix string value
|
||||
''
|
||||
exec >$out
|
||||
echo \'\'
|
||||
${concatStringsSep "\n" (mapAttrsToList (k: v:
|
||||
optionalString (v.hostname != "")
|
||||
"echo $(${pkgs.cjdns}/bin/publictoip6 ${x.key}) ${x.host}")
|
||||
(cfg.ETHInterface.connectTo // cfg.UDPInterface.connectTo))}
|
||||
echo \'\'
|
||||
'');
|
||||
|
||||
parseModules = x:
|
||||
x // { connectTo = mapAttrs (name: value: { inherit (value) password publicKey; }) x.connectTo; };
|
||||
|
@ -95,8 +92,8 @@ in
|
|||
};
|
||||
|
||||
confFile = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
example = "/etc/cjdroute.conf";
|
||||
description = ''
|
||||
Ignore all other cjdns options and load configuration from this file.
|
||||
|
@ -119,7 +116,7 @@ in
|
|||
|
||||
admin = {
|
||||
bind = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "127.0.0.1:11234";
|
||||
description = ''
|
||||
Bind the administration port to this address and port.
|
||||
|
@ -129,7 +126,7 @@ in
|
|||
|
||||
UDPInterface = {
|
||||
bind = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "";
|
||||
example = "192.168.1.32:43211";
|
||||
description = ''
|
||||
|
@ -154,6 +151,7 @@ in
|
|||
|
||||
ETHInterface = {
|
||||
bind = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
example = "eth0";
|
||||
description =
|
||||
|
@ -201,7 +199,7 @@ in
|
|||
|
||||
};
|
||||
|
||||
config = mkIf config.services.cjdns.enable {
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
boot.kernelModules = [ "tun" ];
|
||||
|
||||
|
@ -212,7 +210,7 @@ in
|
|||
wantedBy = [ "multi-user.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
|
||||
|
||||
if [ -z "$CJDNS_PRIVATE_KEY" ]; then
|
||||
|
@ -228,13 +226,13 @@ in
|
|||
fi
|
||||
|
||||
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
|
||||
fi
|
||||
'';
|
||||
|
||||
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
|
||||
echo '${cjdrouteConf}' | sed \
|
||||
|
@ -247,13 +245,16 @@ in
|
|||
serviceConfig = {
|
||||
Type = "forking";
|
||||
Restart = "on-failure";
|
||||
|
||||
ProtectHome = true;
|
||||
PrivateTmp = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking.extraHosts = "${cjdnsHosts}";
|
||||
networking.extraHosts = cjdnsExtraHosts;
|
||||
|
||||
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.";
|
||||
}
|
||||
{ assertion = config.networking.enableIPv6;
|
||||
|
|
|
@ -61,6 +61,7 @@ in
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Verbatim contents of <filename>cntlm.conf</filename>.";
|
||||
};
|
||||
|
|
|
@ -89,7 +89,7 @@ in
|
|||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
type = str;
|
||||
type = lines;
|
||||
description = ''
|
||||
Extra configuration. Contents will be added verbatim to the configuration file.
|
||||
'';
|
||||
|
|
|
@ -47,6 +47,7 @@ in
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
option subnet-mask 255.255.255.0;
|
||||
|
|
|
@ -35,7 +35,11 @@ in
|
|||
|
||||
options = {
|
||||
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 {
|
||||
default = "127.0.0.1";
|
||||
|
|
|
@ -63,9 +63,6 @@
|
|||
networking.nameservers = [ "127.0.0.1" ];
|
||||
services.unbound.enable = true;
|
||||
services.unbound.forwardAddresses = [ "127.0.0.1@43" ];
|
||||
services.unbound.extraConfig = ''
|
||||
do-not-query-localhost: no
|
||||
'';
|
||||
}
|
||||
</programlisting>
|
||||
</para>
|
||||
|
|
|
@ -140,7 +140,7 @@ in
|
|||
ieee80211n=1
|
||||
ht_capab=[HT40-][SHORT-GI-40][DSSS_CCK-40]
|
||||
'';
|
||||
type = types.string;
|
||||
type = types.lines;
|
||||
description = "Extra configuration options to put in hostapd.conf.";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -46,7 +46,7 @@ rec {
|
|||
};
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
type = types.string;
|
||||
type = types.lines;
|
||||
description = ''Extra verbatim configuration added to the end of kippo.cfg.'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -230,7 +230,7 @@ in
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.str;
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Extra configuration to put into mumur.ini.";
|
||||
};
|
||||
|
|
|
@ -198,6 +198,9 @@ in {
|
|||
{ source = "${networkmanager_l2tp}/etc/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 == [])
|
||||
{ source = overrideNameserversScript;
|
||||
target = "NetworkManager/dispatcher.d/02overridedns";
|
||||
|
|
|
@ -47,7 +47,7 @@ with lib;
|
|||
export HOME=/tmp
|
||||
mkdir /var/log/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
|
||||
cp $i /etc/openfire/
|
||||
fi
|
||||
|
|
|
@ -56,6 +56,7 @@ in
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "" ;
|
||||
description = ''
|
||||
Extra configuration. Contents will be added verbatim to the configuration file.
|
||||
|
|
|
@ -195,6 +195,7 @@ in
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = '''';
|
||||
description = "Additional prosody configuration";
|
||||
};
|
||||
|
|
|
@ -244,7 +244,7 @@ in
|
|||
description = "Target configuration";
|
||||
};
|
||||
extraConfig = mkOption {
|
||||
type = types.string;
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Any additional customization not already included.";
|
||||
};
|
||||
|
|
|
@ -242,7 +242,7 @@ in
|
|||
|
||||
systemd =
|
||||
let
|
||||
service =
|
||||
sshd-service =
|
||||
{ description = "SSH Daemon";
|
||||
|
||||
wantedBy = optional (!cfg.startWhenNeeded) "multi-user.target";
|
||||
|
@ -253,16 +253,8 @@ in
|
|||
|
||||
environment.LD_LIBRARY_PATH = nssModulesPath;
|
||||
|
||||
preStart =
|
||||
''
|
||||
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
|
||||
'')}
|
||||
'';
|
||||
wants = [ "sshd-keygen.service" ];
|
||||
after = [ "sshd-keygen.service" ];
|
||||
|
||||
serviceConfig =
|
||||
{ ExecStart =
|
||||
|
@ -278,6 +270,26 @@ in
|
|||
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
|
||||
|
||||
if cfg.startWhenNeeded then {
|
||||
|
@ -289,11 +301,13 @@ in
|
|||
socketConfig.Accept = true;
|
||||
};
|
||||
|
||||
services."sshd@" = service;
|
||||
services.sshd-keygen = sshd-keygen-service;
|
||||
services."sshd@" = sshd-service;
|
||||
|
||||
} else {
|
||||
|
||||
services.sshd = service;
|
||||
services.sshd-keygen = sshd-keygen-service;
|
||||
services.sshd = sshd-service;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -34,7 +34,8 @@ let
|
|||
'';
|
||||
in
|
||||
{ description = "Supplicant ${iface}${optionalString (iface=="WLAN"||iface=="LAN") " %I"}";
|
||||
wantedBy = [ "network.target" ] ++ deps;
|
||||
wantedBy = [ "multi-user.target" ] ++ deps;
|
||||
wants = [ "network.target" ];
|
||||
bindsTo = deps;
|
||||
after = deps;
|
||||
before = [ "network.target" ];
|
||||
|
|
|
@ -3,46 +3,11 @@
|
|||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.syncthing;
|
||||
defaultUser = "syncthing";
|
||||
|
||||
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
|
||||
|
||||
{
|
||||
|
||||
in {
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.syncthing = {
|
||||
|
||||
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 {
|
||||
type = types.package;
|
||||
default = pkgs.syncthing;
|
||||
|
@ -117,6 +95,14 @@ in
|
|||
|
||||
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) {
|
||||
extraUsers."${defaultUser}" =
|
||||
{ group = cfg.group;
|
||||
|
@ -131,39 +117,44 @@ in
|
|||
};
|
||||
|
||||
systemd.services = {
|
||||
syncthing = mkIf cfg.systemService (header // {
|
||||
syncthing = mkIf cfg.systemService {
|
||||
description = "Syncthing service";
|
||||
after = [ "network.target" ];
|
||||
environment = {
|
||||
STNORESTART = "yes";
|
||||
STNOUPGRADE = "yes";
|
||||
inherit (cfg) all_proxy;
|
||||
} // config.networking.proxy.envVars;
|
||||
wants = mkIf cfg.useInotify [ "syncthing-inotify.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = service // {
|
||||
serviceConfig = {
|
||||
Restart = "on-failure";
|
||||
SuccessExitStatus = "2 3 4";
|
||||
RestartForceExitStatus="3 4";
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
PermissionsStartOnly = true;
|
||||
ExecStart = "${cfg.package}/bin/syncthing -no-browser -home=${cfg.dataDir}";
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
syncthing-inotify = mkIf (cfg.systemService && cfg.useInotify) (iNotifyHeader // {
|
||||
syncthing-resume = {
|
||||
wantedBy = [ "suspend.target" ];
|
||||
};
|
||||
|
||||
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 = iNotifyService // {
|
||||
serviceConfig = {
|
||||
SuccessExitStatus = "2";
|
||||
RestartForceExitStatus = "3";
|
||||
Restart = "on-failure";
|
||||
User = cfg.user;
|
||||
ExecStart = "${pkgs.syncthing-inotify.bin}/bin/syncthing-inotify -home=${cfg.dataDir} -logflags=0";
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
systemd.user.services = {
|
||||
syncthing = header // {
|
||||
serviceConfig = service // {
|
||||
ExecStart = "${cfg.package}/bin/syncthing -no-browser";
|
||||
};
|
||||
};
|
||||
|
||||
syncthing-inotify = mkIf cfg.useInotify (iNotifyHeader // {
|
||||
serviceConfig = iNotifyService // {
|
||||
ExecStart = "${pkgs.syncthing-inotify.bin}/bin/syncthing-inotify -logflags=0";
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -13,12 +13,13 @@ with lib;
|
|||
default = false;
|
||||
description = ''
|
||||
Whether to enable tftpd, a Trivial File Transfer Protocol server.
|
||||
The server will be run as an xinetd service.
|
||||
'';
|
||||
};
|
||||
|
||||
services.tftpd.path = mkOption {
|
||||
type = types.path;
|
||||
default = "/home/tftp";
|
||||
default = "/srv/tftp";
|
||||
description = ''
|
||||
Where the tftp server files are stored.
|
||||
'';
|
||||
|
|
|
@ -79,7 +79,7 @@ in
|
|||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
type = types.str;
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Extra unbound config. See
|
||||
<citerefentry><refentrytitle>unbound.conf</refentrytitle><manvolnum>8
|
||||
|
|
|
@ -128,9 +128,11 @@ in {
|
|||
in {
|
||||
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;
|
||||
wantedBy = [ "network-online.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
path = [ pkgs.wpa_supplicant ];
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ in
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.string;
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "Extra configuration-lines added to the section of the service.";
|
||||
};
|
||||
|
|
|
@ -26,53 +26,35 @@ let
|
|||
};
|
||||
|
||||
# Keep znc.conf in nix store, then symlink or copy into `dataDir`, depending on `mutable`.
|
||||
notNull = a: ! isNull a;
|
||||
mkZncConf = confOpts: ''
|
||||
// Also check http://en.znc.in/wiki/Configuration
|
||||
|
||||
AnonIPLimit = 10
|
||||
ConnectDelay = 5
|
||||
# Add `LoadModule = x` for each module...
|
||||
Version = 1.6.3
|
||||
${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>
|
||||
AllowIRC = true
|
||||
AllowWeb = true
|
||||
<Listener l>
|
||||
Port = ${toString confOpts.port}
|
||||
IPv4 = true
|
||||
IPv6 = false
|
||||
Port = ${if confOpts.useSSL then "+" else ""}${toString confOpts.port}
|
||||
IPv6 = true
|
||||
SSL = ${if confOpts.useSSL then "true" else "false"}
|
||||
</Listener>
|
||||
|
||||
<User ${confOpts.userName}>
|
||||
${confOpts.passBlock}
|
||||
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
|
||||
AltNick = ${confOpts.nick}_
|
||||
Ident = ${confOpts.nick}
|
||||
RealName = ${confOpts.nick}
|
||||
TimestampFormat = [%H:%M:%S]
|
||||
${concatMapStrings (n: "LoadModule = ${n}\n") confOpts.userModules}
|
||||
|
||||
${confOpts.passBlock}
|
||||
${ 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>
|
||||
${confOpts.extraZncConf}
|
||||
'';
|
||||
|
@ -84,6 +66,62 @@ let
|
|||
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
|
||||
|
||||
{
|
||||
|
@ -111,6 +149,15 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
default = "";
|
||||
example = "users";
|
||||
type = types.string;
|
||||
description = ''
|
||||
Group to own the ZNCserver process.
|
||||
'';
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
default = "/var/lib/znc/";
|
||||
example = "/home/john/.znc/";
|
||||
|
@ -125,27 +172,16 @@ in
|
|||
example = "See: http://wiki.znc.in/Configuration";
|
||||
type = types.lines;
|
||||
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 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 = {
|
||||
modules = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "partyline" "webadmin" "adminlog" "log" ];
|
||||
default = [ "webadmin" "adminlog" ];
|
||||
example = [ "partyline" "webadmin" "adminlog" "log" ];
|
||||
description = ''
|
||||
A list of modules to include in the `znc.conf` file.
|
||||
|
@ -154,8 +190,8 @@ in
|
|||
|
||||
userModules = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
example = [ "fish" "push" ];
|
||||
default = [ "chansaver" "controlpanel" ];
|
||||
example = [ "chansaver" "controlpanel" "fish" "push" ];
|
||||
description = ''
|
||||
A list of user modules to include in the `znc.conf` file.
|
||||
'';
|
||||
|
@ -166,29 +202,42 @@ in
|
|||
example = "johntron";
|
||||
type = types.string;
|
||||
description = ''
|
||||
The user name to use when generating the `znc.conf` file.
|
||||
This is the user name used by the user logging into the ZNC web admin.
|
||||
The user name used to log in to the ZNC web admin interface.
|
||||
'';
|
||||
};
|
||||
|
||||
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 {
|
||||
default = "znc-user";
|
||||
example = "john";
|
||||
type = types.string;
|
||||
description = ''
|
||||
The IRC nick to use when generating the `znc.conf` file.
|
||||
The IRC nick.
|
||||
'';
|
||||
};
|
||||
|
||||
passBlock = mkOption {
|
||||
default = defaultPassBlock;
|
||||
example = "Must be the block generated by the `znc --makepass` command.";
|
||||
example = defaultPassBlock;
|
||||
type = types.string;
|
||||
description = ''
|
||||
The pass block to use when generating the `znc.conf` file.
|
||||
This is the password used by the user logging into the ZNC web admin.
|
||||
This is the block generated by the `znc --makepass` command.
|
||||
!!! If not specified, please change this after starting the service. !!!
|
||||
Generate with znc --makepass.
|
||||
This is the password used to log in to the ZNC web admin interface.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -206,7 +255,7 @@ in
|
|||
example = true;
|
||||
type = types.bool;
|
||||
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 = "";
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Extra config to `znc.conf` file
|
||||
Extra config to `znc.conf` file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -265,6 +314,7 @@ in
|
|||
after = [ "network.service" ];
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
Restart = "always";
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||
ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID";
|
||||
|
|
|
@ -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 ];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -288,6 +288,7 @@ in
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example =
|
||||
''
|
||||
|
|
|
@ -164,6 +164,7 @@ in
|
|||
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example =
|
||||
''
|
||||
|
|
|
@ -102,7 +102,6 @@ in
|
|||
pkgs.setuptools
|
||||
pkgs.pythonPackages.genshi
|
||||
pkgs.pythonPackages.psycopg2
|
||||
pkgs.python.modules.sqlite3
|
||||
subversion
|
||||
];
|
||||
};
|
||||
|
|
|
@ -212,6 +212,7 @@ in
|
|||
example = "[ \"en_GB\" \"de_DE\" ];";
|
||||
};
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example =
|
||||
''
|
||||
|
|
|
@ -392,6 +392,8 @@ in
|
|||
security.acme.certs = filterAttrs (n: v: v != {}) (
|
||||
mapAttrs (vhostName: vhostConfig:
|
||||
optionalAttrs vhostConfig.enableACME {
|
||||
user = cfg.user;
|
||||
group = cfg.group;
|
||||
webroot = vhostConfig.acmeRoot;
|
||||
extraDomains = genAttrs vhostConfig.serverAliases (alias: null);
|
||||
postRun = ''
|
||||
|
|
|
@ -82,7 +82,7 @@ in {
|
|||
|
||||
environment.gnome3.packageSet = mkOption {
|
||||
default = null;
|
||||
example = literalExample "pkgs.gnome3_20";
|
||||
example = literalExample "pkgs.gnome3_22";
|
||||
description = "Which GNOME 3 package set to use.";
|
||||
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-keyring.enable = 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.gvfs.enable = true;
|
||||
services.gnome3.seahorse.enable = mkDefault true;
|
||||
|
|
|
@ -61,9 +61,11 @@ in
|
|||
pkgs.lxqt.obconf-qt
|
||||
pkgs.lxqt.pavucontrol-qt
|
||||
pkgs.lxqt.pcmanfm-qt
|
||||
pkgs.lxqt.qlipper
|
||||
pkgs.lxqt.qps
|
||||
pkgs.lxqt.qterminal
|
||||
pkgs.lxqt.qtermwidget
|
||||
pkgs.lxqt.screengrab
|
||||
pkgs.menu-cache
|
||||
pkgs.openbox # default window manager
|
||||
pkgs.qt5.qtsvg # provides QT5 plugins for svg icons
|
||||
|
|
|
@ -95,9 +95,8 @@ in
|
|||
services.xserver.displayManager.job =
|
||||
{
|
||||
environment = {
|
||||
GDM_X_SERVER = "${cfg.xserverBin} ${cfg.xserverArgs}";
|
||||
GDM_X_SERVER_EXTRA_ARGS = "${cfg.xserverArgs}";
|
||||
GDM_SESSIONS_DIR = "${cfg.session.desktops}";
|
||||
XDG_CONFIG_DIRS = "${gnome3.gnome_settings_daemon}/etc/xdg";
|
||||
# Find the mouse
|
||||
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.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 ];
|
||||
|
||||
systemd.user.services.dbus.wantedBy = [ "default.target" ];
|
||||
|
||||
programs.dconf.profiles.gdm = "${gdm}/share/dconf/profile/gdm";
|
||||
|
||||
# Use AutomaticLogin if delay is zero, because it's immediate.
|
||||
|
|
|
@ -207,6 +207,9 @@ in
|
|||
services.dbus.enable = true;
|
||||
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 = {
|
||||
allowNullPassword = true;
|
||||
startSession = true;
|
||||
|
|
|
@ -86,7 +86,7 @@ in
|
|||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.str;
|
||||
type = types.lines;
|
||||
default = "";
|
||||
example = ''
|
||||
[Autologin]
|
||||
|
|
|
@ -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 ];
|
||||
};
|
||||
}
|
|
@ -10,6 +10,7 @@ in
|
|||
imports = [
|
||||
./afterstep.nix
|
||||
./bspwm.nix
|
||||
./bspwm-unstable.nix
|
||||
./compiz.nix
|
||||
./dwm.nix
|
||||
./exwm.nix
|
||||
|
|
|
@ -515,6 +515,7 @@ in
|
|||
{ description = "X11 Server";
|
||||
|
||||
after = [ "systemd-udev-settle.service" "local-fs.target" "acpid.service" "systemd-logind.service" ];
|
||||
wants = [ "systemd-udev-settle.service" ];
|
||||
|
||||
restartIfChanged = false;
|
||||
|
||||
|
|
|
@ -214,8 +214,8 @@ in
|
|||
"hid_generic" "hid_lenovo"
|
||||
"hid_apple" "hid_logitech_dj" "hid_lenovo_tpkbd" "hid_roccat"
|
||||
|
||||
# Misc. stuff.
|
||||
"pcips2" "atkbd"
|
||||
# Misc. keyboard stuff.
|
||||
"pcips2" "atkbd" "i8042"
|
||||
|
||||
# Temporary fix for https://github.com/NixOS/nixpkgs/issues/18451
|
||||
# Remove as soon as upstream gets fixed - marking it:
|
||||
|
|
|
@ -498,8 +498,7 @@ eval "exec $logOutFd>&- $logErrFd>&-"
|
|||
#
|
||||
# Storage daemons are distinguished by an @ in front of their command line:
|
||||
# https://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons/
|
||||
local pidsToKill="$(pgrep -v -f '^@')"
|
||||
for pid in $pidsToKill; do
|
||||
for pid in $(pgrep -v -f '^@'); do
|
||||
# Make sure we don't kill kernel processes, see #15226 and:
|
||||
# http://stackoverflow.com/questions/12213445/identifying-kernel-threads
|
||||
readlink "/proc/$pid/exe" &> /dev/null || continue
|
||||
|
|
|
@ -41,6 +41,7 @@ let
|
|||
];
|
||||
|
||||
instanceOptions = {
|
||||
options = {
|
||||
|
||||
execConfig = mkOption {
|
||||
default = {};
|
||||
|
@ -77,6 +78,7 @@ let
|
|||
<manvolnum>5</manvolnum></citerefentry> for details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
@ -99,8 +101,7 @@ in {
|
|||
|
||||
systemd.nspawn = mkOption {
|
||||
default = {};
|
||||
type = types.attrsOf types.optionSet;
|
||||
options = [ instanceOptions ];
|
||||
type = with types; attrsOf (submodule instanceOptions);
|
||||
description = "Definition of systemd-nspawn configurations.";
|
||||
};
|
||||
|
||||
|
|
|
@ -316,7 +316,7 @@ in rec {
|
|||
|
||||
startAt = mkOption {
|
||||
type = with types; either str (listOf str);
|
||||
default = "";
|
||||
default = [];
|
||||
example = "Sun 14:00:00";
|
||||
description = ''
|
||||
Automatically start this unit at the given date/time, which
|
||||
|
@ -326,6 +326,7 @@ in rec {
|
|||
to adding a corresponding timer unit with
|
||||
<option>OnCalendar</option> set to the value given here.
|
||||
'';
|
||||
apply = v: if isList v then v else [ v ];
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -777,7 +777,7 @@ in
|
|||
{ wantedBy = [ "timers.target" ];
|
||||
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.
|
||||
systemd.user.timers =
|
||||
|
@ -785,7 +785,7 @@ in
|
|||
{ wantedBy = [ "timers.target" ];
|
||||
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 =
|
||||
optional config.services.journald.enableHttpGateway "sockets.target";
|
||||
|
|
|
@ -245,6 +245,7 @@ in rec {
|
|||
tests.gnome3-gdm = callTest tests/gnome3-gdm.nix {};
|
||||
tests.grsecurity = callTest tests/grsecurity.nix {};
|
||||
tests.hibernate = callTest tests/hibernate.nix {};
|
||||
tests.hound = callTest tests/hound.nix {};
|
||||
tests.i3wm = callTest tests/i3wm.nix {};
|
||||
tests.installer = callSubTests tests/installer.nix {};
|
||||
tests.influxdb = callTest tests/influxdb.nix {};
|
||||
|
|
|
@ -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"');
|
||||
|
||||
'';
|
||||
})
|
|
@ -11,10 +11,10 @@ let
|
|||
#!${pkgs.stdenv.shell} -xe
|
||||
export PATH="${lib.makeBinPath [ pkgs.coreutils pkgs.utillinux ]}"
|
||||
|
||||
mkdir -p /var/run/dbus
|
||||
mkdir -p /run/dbus
|
||||
cat > /etc/passwd <<EOF
|
||||
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
|
||||
cat > /etc/group <<EOF
|
||||
root:x:0:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
|
||||
, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
|
||||
, 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
|
||||
|
||||
|
@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
|
|||
glibmm graphviz gtkmm2 libjack2 libgnomecanvas libgnomecanvasmm liblo
|
||||
libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
|
||||
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 = ''
|
||||
|
@ -52,12 +52,12 @@ stdenv.mkDerivation rec {
|
|||
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 = ''
|
||||
python waf install
|
||||
${python2.interpreter} waf install
|
||||
|
||||
# Install desktop file
|
||||
mkdir -p "$out/share/applications"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
|
||||
, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
|
||||
, 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
|
||||
|
||||
|
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
|||
glibmm graphviz gtkmm2 libjack2 libgnomecanvas libgnomecanvasmm liblo
|
||||
libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
|
||||
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
|
||||
|
@ -46,12 +46,12 @@ stdenv.mkDerivation rec {
|
|||
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 = ''
|
||||
python waf install
|
||||
${python2.interpreter} waf install
|
||||
# Install desktop file
|
||||
mkdir -p "$out/share/applications"
|
||||
cat > "$out/share/applications/ardour.desktop" << EOF
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
|
||||
, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
|
||||
, 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 }:
|
||||
|
||||
let
|
||||
|
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
|||
glibmm graphviz gtkmm2 libjack2 libgnomecanvas libgnomecanvasmm liblo
|
||||
libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
|
||||
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
|
||||
];
|
||||
|
||||
|
@ -47,12 +47,12 @@ stdenv.mkDerivation rec {
|
|||
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 = ''
|
||||
python waf install
|
||||
${python2.interpreter} waf install
|
||||
|
||||
# Install desktop file
|
||||
mkdir -p "$out/share/applications"
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.9.10";
|
||||
version = "0.9.11";
|
||||
name = "drumgizmo-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.drumgizmo.org/releases/${name}/${name}.tar.gz";
|
||||
sha256 = "142si734lsyywxhn7msiz053ir96kl5im3h1jql3vhcb4807f3d1";
|
||||
sha256 = "04hf3nhccwr98n2081rrvfccz50nly6k3gbk9zxccp1522qz5xvf";
|
||||
};
|
||||
|
||||
configureFlags = [ "--enable-lv2" ];
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
{ stdenv, fetchurl, libjack2, libsndfile, lv2, qt4 }:
|
||||
{ stdenv, fetchurl, libjack2, alsaLib, libsndfile, liblo, lv2, qt5 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "drumkv1-${version}";
|
||||
version = "0.7.1";
|
||||
version = "0.7.6";
|
||||
|
||||
src = fetchurl {
|
||||
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; {
|
||||
description = "An old-school drum-kit sampler synthesizer with stereo fx";
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ stdenv, fetchurl, cmake, fftw, gtkmm2, libxcb, lv2, pkgconfig, xorg }:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "eq10q-${version}";
|
||||
version = "2.0";
|
||||
version = "2.1";
|
||||
src = fetchurl {
|
||||
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 ];
|
||||
|
|
|
@ -30,7 +30,7 @@ pythonPackages.buildPythonApplication rec {
|
|||
];
|
||||
|
||||
propagatedBuildInputs = with pythonPackages; [
|
||||
feedparser dbus-python mygpoclient sqlite3 pygtk eyeD3
|
||||
feedparser dbus-python mygpoclient pygtk eyeD3
|
||||
] ++ stdenv.lib.optional ipodSupport libgpod;
|
||||
|
||||
checkPhase = ''
|
||||
|
|
|
@ -62,5 +62,8 @@ in nodePackages.buildNodePackage rec {
|
|||
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
{ stdenv, fetchurl
|
||||
, pkgconfig, cmake, perl, ffmpeg
|
||||
, pkgconfig, cmake
|
||||
, docbook_xml_dtd_45, docbook_xsl, libxslt
|
||||
, phonon, automoc4, chromaprint, id3lib
|
||||
, taglib, mp4v2, flac, libogg, libvorbis
|
||||
, python, ffmpeg, mp4v2, flac, libogg, libvorbis
|
||||
, phonon, automoc4, chromaprint, id3lib, taglib
|
||||
, qt, zlib, readline
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
name = "kid3-${meta.version}";
|
||||
name = "kid3-${version}";
|
||||
version = "3.4.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/kid3/kid3/${meta.version}/${name}.tar.gz";
|
||||
sha256 = "12sa54mg1b3wkagmh5yi20ski8km9d199lk0a1yfxy0ffjfld7js";
|
||||
url = "mirror://sourceforge/project/kid3/kid3/${version}/${name}.tar.gz";
|
||||
sha256 = "0gka4na583015jyqva18g85q7vnkjdk0iji2jp88di3kpvqhf1sw";
|
||||
};
|
||||
|
||||
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
|
||||
qt zlib readline makeWrapper ];
|
||||
|
||||
|
@ -33,7 +34,6 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
version = "3.3.0";
|
||||
description = "A simple and powerful audio tag editor";
|
||||
longDescription = ''
|
||||
If you want to easily tag multiple MP3, Ogg/Vorbis, FLAC, MPC,
|
||||
|
@ -71,4 +71,4 @@ stdenv.mkDerivation rec {
|
|||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
# TODO: Qt5 support
|
||||
# TODO: Qt5 support - not so urgent!
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, fetchgit, pythonPackages }:
|
||||
{ stdenv, fetchgit, python2Packages }:
|
||||
|
||||
pythonPackages.buildPythonApplication rec {
|
||||
python2Packages.buildPythonApplication rec {
|
||||
name = "lastwatch-${version}";
|
||||
namePrefix = "";
|
||||
version = "0.4.1";
|
||||
|
@ -11,14 +11,12 @@ pythonPackages.buildPythonApplication rec {
|
|||
sha256 = "0nlng3595j5jvnikk8i5hb915zak5zsmfn2306cc4gfcns9xzjwp";
|
||||
};
|
||||
|
||||
pythonPath = [
|
||||
pythonPackages.pyinotify
|
||||
pythonPackages.pylast
|
||||
pythonPackages.mutagen
|
||||
propagatedBuildInputs = with python2Packages; [
|
||||
pyinotify
|
||||
pylast
|
||||
mutagen
|
||||
];
|
||||
|
||||
propagatedBuildInputs = pythonPath;
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/aszlig/LastWatch";
|
||||
description = "An inotify-based last.fm audio scrobbler";
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue