Merge branch 'master' into closure-size
This commit is contained in:
commit
5b0352a6a4
6
.mention-bot
Normal file
6
.mention-bot
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
// users in this list will never be mentioned by mention-bot
|
||||
"userBlacklist": [
|
||||
"civodul"
|
||||
]
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
let requiredVersion = "1.10"; in
|
||||
let requiredVersion = import ./lib/minver.nix; in
|
||||
|
||||
if ! builtins ? nixVersion || builtins.compareVersions requiredVersion builtins.nixVersion == 1 then
|
||||
|
||||
|
|
109
doc/configuration.xml
Normal file
109
doc/configuration.xml
Normal file
|
@ -0,0 +1,109 @@
|
|||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-packageconfig">
|
||||
|
||||
<title><filename>~/.nixpkgs/config.nix</filename>: global configuration</title>
|
||||
|
||||
<para>Nix packages can be configured to allow or deny certain options.</para>
|
||||
|
||||
<para>To apply the configuration edit
|
||||
<filename>~/.nixpkgs/config.nix</filename> and set it like
|
||||
|
||||
<programlisting>
|
||||
{
|
||||
allowUnfree = true;
|
||||
}
|
||||
</programlisting>
|
||||
|
||||
and will allow the Nix package manager to install unfree licensed packages.</para>
|
||||
|
||||
<para>The configuration as listed also applies to NixOS under
|
||||
<option>nixpkgs.config</option> set.</para>
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
<para>Allow installing of packages that are distributed under
|
||||
unfree license by setting <programlisting>allowUnfree =
|
||||
true;</programlisting> or deny them by setting it to
|
||||
<literal>false</literal>.</para>
|
||||
|
||||
<para>Same can be achieved by setting the environment variable:
|
||||
|
||||
<programlisting>
|
||||
$ export NIXPKGS_ALLOW_UNFREE=1
|
||||
</programlisting>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Whenever unfree packages are not allowed, single packages
|
||||
can still be allowed by a predicate function that accepts package
|
||||
as an argument and should return a boolean:
|
||||
|
||||
<programlisting>
|
||||
allowUnfreePredicate = (pkg: ...);
|
||||
</programlisting>
|
||||
|
||||
Example to allow flash player only:
|
||||
|
||||
<programlisting>
|
||||
allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "flashplayer-" pkg.name);
|
||||
</programlisting>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Whenever unfree packages are not allowed, packages can still
|
||||
be whitelisted by their license:
|
||||
|
||||
<programlisting>
|
||||
whitelistedLicenses = with stdenv.lib.licenses; [ amd wtfpl ];
|
||||
</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>In addition to whitelisting licenses which are denied by the
|
||||
<literal>allowUnfree</literal> setting, you can also explicitely
|
||||
deny installation of packages which have a certain license:
|
||||
|
||||
<programlisting>
|
||||
blacklistedLicenses = with stdenv.lib.licenses; [ agpl3 gpl3 ];
|
||||
</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
<para>A complete list of licenses can be found in the file
|
||||
<filename>lib/licenses.nix</filename> of the nix package tree.</para>
|
||||
|
||||
|
||||
<!--============================================================-->
|
||||
|
||||
<section xml:id="sec-modify-via-packageOverrides"><title>Modify
|
||||
packages via <literal>packageOverrides</literal></title>
|
||||
|
||||
<para>You can define a function called
|
||||
<varname>packageOverrides</varname> in your local
|
||||
<filename>~/.nixpkgs/config</filename> to overide nix packages. It
|
||||
must be a function that takes pkgs as an argument and return modified
|
||||
set of packages.
|
||||
|
||||
<programlisting>
|
||||
{
|
||||
packageOverrides = pkgs: rec {
|
||||
foo = pkgs.foo.override { ... };
|
||||
};
|
||||
}
|
||||
</programlisting>
|
||||
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</chapter>
|
|
@ -88,6 +88,13 @@ in ...</programlisting>
|
|||
<section xml:id="sec-pkg-overrideDerivation">
|
||||
<title><pkg>.overrideDerivation</title>
|
||||
|
||||
<warning>
|
||||
<para>Do not use this function in Nixpkgs. Because it breaks
|
||||
package abstraction and doesn’t provide error checking for
|
||||
function arguments, it is only intended for ad-hoc customisation
|
||||
(such as in <filename>~/.nixpkgs/config.nix</filename>).</para>
|
||||
</warning>
|
||||
|
||||
<para>
|
||||
The function <varname>overrideDerivation</varname> is usually available for all the
|
||||
derivations in the nixpkgs expression (<varname>pkgs</varname>).
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-language-support">
|
||||
|
|
|
@ -33,7 +33,7 @@ the package. The value of a meta-attribute must be a string.</para>
|
|||
command-line using <command>nix-env</command>:
|
||||
|
||||
<screen>
|
||||
$ nix-env -qa hello --meta --json
|
||||
$ nix-env -qa hello --json
|
||||
{
|
||||
"hello": {
|
||||
"meta": {
|
||||
|
|
|
@ -1,88 +0,0 @@
|
|||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="chap-packageconfig">
|
||||
|
||||
<title><filename>~/.nixpkgs/config.nix</filename>: global configuration</title>
|
||||
|
||||
<para>
|
||||
Nix packages can be configured to allow or deny certain options.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To apply the configuration edit <filename>~/.nixpkgs/config.nix</filename>
|
||||
and set it like
|
||||
<programlisting>{
|
||||
allowUnfree = true;
|
||||
}</programlisting>
|
||||
and will allow the Nix package manager to install unfree licensed packages.
|
||||
|
||||
The configuration as listed also applies to NixOS under <option>nixpkgs.config</option> set.
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Allow installing of packages that are distributed under unfree license by setting
|
||||
<programlisting>allowUnfree = true;</programlisting>
|
||||
or deny them by setting it to <literal>false</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Same can be achieved by setting the environment variable:
|
||||
<programlisting>$ export NIXPKGS_ALLOW_UNFREE=1</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Whenever unfree packages are not allowed, single packages can
|
||||
still be allowed by a predicate function that accepts package
|
||||
as an argument and should return a boolean:
|
||||
<programlisting>allowUnfreePredicate = (pkg: ...);</programlisting>
|
||||
|
||||
Example to allow flash player only:
|
||||
<programlisting>allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "flashplayer-" pkg.name);</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Whenever unfree packages are not allowed, packages can still be
|
||||
whitelisted by their license:
|
||||
<programlisting>whitelistedLicenses = with stdenv.lib.licenses; [ amd wtfpl ];</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
In addition to whitelisting licenses which are denied by the
|
||||
<literal>allowUnfree</literal> setting, you can also explicitely
|
||||
deny installation of packages which have a certain license:
|
||||
<programlisting>blacklistedLicenses = with stdenv.lib.licenses; [ agpl3 gpl3 ];</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>
|
||||
A complete list of licenses can be found in the file
|
||||
<filename>lib/licenses.nix</filename> of the nix package tree.
|
||||
</para>
|
||||
|
||||
<section xml:id="sec-modify-via-packageOverrides"><title>Modify
|
||||
packages via <literal>packageOverrides</literal></title>
|
||||
|
||||
<para>
|
||||
|
||||
You can define a function called <varname>packageOverrides</varname>
|
||||
in your local <filename>~/.nixpkgs/config</filename> to overide nix
|
||||
packages. It must be a function that takes pkgs as an argument and
|
||||
return modified set of packages.
|
||||
|
||||
<programlisting>{
|
||||
packageOverrides = pkgs: rec {
|
||||
foo = pkgs.foo.override { ... };
|
||||
};
|
||||
}</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</chapter>
|
|
@ -270,7 +270,7 @@ Additional information.
|
|||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>If staging is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days, merge into master, then resume development on staging. <link xlink:href="http://hydra.nixos.org/jobset/nixpkgs/staging#tabs-evaluations">Keep an eye on the staging evaluations here</link>.</para>
|
||||
<para>If staging is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days, merge into master, then resume development on staging. <link xlink:href="http://hydra.nixos.org/jobset/nixpkgs/staging#tabs-evaluations">Keep an eye on the staging evaluations here</link>. If any fixes for staging happen to be already in master, then master can be merged into staging.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
eikek = "Eike Kettner <eike.kettner@posteo.de>";
|
||||
elasticdog = "Aaron Bull Schaefer <aaron@elasticdog.com>";
|
||||
ellis = "Ellis Whitehead <nixos@ellisw.net>";
|
||||
emery = "Emery Hemingway <emery@vfemail.net>";
|
||||
ehmry = "Emery Hemingway <emery@vfemail.net>";
|
||||
enolan = "Echo Nolan <echo@echonolan.net>";
|
||||
epitrochoid = "Mabry Cervin <mpcervin@uncg.edu>";
|
||||
ericbmerritt = "Eric Merritt <eric@afiniate.com>";
|
||||
|
@ -182,7 +182,7 @@
|
|||
malyn = "Michael Alyn Miller <malyn@strangeGizmo.com>";
|
||||
manveru = "Michael Fellinger <m.fellinger@gmail.com>";
|
||||
marcweber = "Marc Weber <marco-oweber@gmx.de>";
|
||||
markWot = "Markus Wotringer <markus@wotringer.de";
|
||||
markWot = "Markus Wotringer <markus@wotringer.de>";
|
||||
maurer = "Matthew Maurer <matthew.r.maurer+nix@gmail.com>";
|
||||
matejc = "Matej Cotman <cotman.matej@gmail.com>";
|
||||
mathnerd314 = "Mathnerd314 <mathnerd314.gph+hs@gmail.com>";
|
||||
|
@ -207,6 +207,7 @@
|
|||
muflax = "Stefan Dorn <mail@muflax.com>";
|
||||
nathan-gs = "Nathan Bijnens <nathan@nathan.gs>";
|
||||
nckx = "Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>";
|
||||
nequissimus = "Tim Steinbach <tim@nequissimus.com>";
|
||||
nico202 = "Nicolò Balzarotti <anothersms@gmail.com>";
|
||||
notthemessiah = "Brian Cohen <brian.cohen.88@gmail.com>";
|
||||
np = "Nicolas Pouillard <np.nix@nicolaspouillard.fr>";
|
||||
|
@ -218,9 +219,11 @@
|
|||
olcai = "Erik Timan <dev@timan.info>";
|
||||
orbitz = "Malcolm Matalka <mmatalka@gmail.com>";
|
||||
osener = "Ozan Sener <ozan@ozansener.com>";
|
||||
oxij = "Jan Malakhovski <oxij@oxij.org>";
|
||||
page = "Carles Pagès <page@cubata.homelinux.net>";
|
||||
paholg = "Paho Lurie-Gregg <paho@paholg.com>";
|
||||
pakhfn = "Fedor Pakhomov <pakhfn@gmail.com>";
|
||||
palo = "Ingolf Wanger <palipalo9@googlemail.com>";
|
||||
pashev = "Igor Pashev <pashev.igor@gmail.com>";
|
||||
pesterhazy = "Paulus Esterhazy <pesterhazy@gmail.com>";
|
||||
phausmann = "Philipp Hausmann <nix@314.ch>";
|
||||
|
@ -286,6 +289,7 @@
|
|||
tailhook = "Paul Colomiets <paul@colomiets.name>";
|
||||
taktoa = "Remy Goldschmidt <taktoa@gmail.com>";
|
||||
telotortium = "Robert Irelan <rirelan@gmail.com>";
|
||||
thall = "Niclas Thall <niclas.thall@gmail.com>";
|
||||
thammers = "Tobias Hammerschmidt <jawr@gmx.de>";
|
||||
the-kenny = "Moritz Ulrich <moritz@tarn-vedra.de>";
|
||||
theuni = "Christian Theune <ct@flyingcircus.io>";
|
||||
|
|
2
lib/minver.nix
Normal file
2
lib/minver.nix
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Expose the minimum required version for evaluating Nixpkgs
|
||||
"1.10"
|
|
@ -8,8 +8,9 @@ rec {
|
|||
openbsd = ["i686-openbsd" "x86_64-openbsd"];
|
||||
netbsd = ["i686-netbsd" "x86_64-netbsd"];
|
||||
cygwin = ["i686-cygwin" "x86_64-cygwin"];
|
||||
unix = linux ++ darwin ++ freebsd ++ openbsd;
|
||||
all = linux ++ darwin ++ cygwin ++ freebsd ++ openbsd;
|
||||
illumos = ["x86_64-solaris"];
|
||||
unix = linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos;
|
||||
all = linux ++ darwin ++ cygwin ++ freebsd ++ openbsd ++ netbsd ++ illumos;
|
||||
none = [];
|
||||
allBut = platforms: lists.filter (x: !(builtins.elem x platforms)) all;
|
||||
mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux"];
|
||||
|
|
|
@ -54,6 +54,10 @@ rec {
|
|||
# try to guess the right output of each pkg
|
||||
(map (pkg: pkg.lib or (pkg.out or pkg)) pkgs);
|
||||
|
||||
# Construct a binary search path (such as $PATH) containing the
|
||||
# binaries for a set of packages, e.g. "${pkg1}/bin:${pkg2}/bin:...".
|
||||
makeBinPath = makeSearchPath "bin";
|
||||
|
||||
|
||||
# Idem for Perl search paths.
|
||||
makePerlPath = makeSearchPath "lib/perl5/site_perl";
|
||||
|
|
|
@ -193,9 +193,9 @@ rec {
|
|||
|
||||
nullOr = elemType: mkOptionType {
|
||||
name = "null or ${elemType.name}";
|
||||
check = x: builtins.isNull x || elemType.check x;
|
||||
check = x: x == null || elemType.check x;
|
||||
merge = loc: defs:
|
||||
let nrNulls = count (def: isNull def.value) defs; in
|
||||
let nrNulls = count (def: def.value == null) defs; in
|
||||
if nrNulls == length defs then null
|
||||
else if nrNulls != 0 then
|
||||
throw "The option `${showOption loc}' is defined both null and not null, in ${showFiles (getFiles defs)}."
|
||||
|
@ -230,8 +230,15 @@ rec {
|
|||
substSubModules = m: submodule m;
|
||||
};
|
||||
|
||||
enum = values: mkOptionType {
|
||||
name = "one of ${concatStringsSep ", " values}";
|
||||
enum = values:
|
||||
let
|
||||
show = v:
|
||||
if builtins.isString v then ''"${v}"''
|
||||
else if builtins.isInt v then builtins.toString v
|
||||
else ''<${builtins.typeOf v}>'';
|
||||
in
|
||||
mkOptionType {
|
||||
name = "one of ${concatMapStringsSep ", " show values}";
|
||||
check = flip elem values;
|
||||
merge = mergeOneOption;
|
||||
};
|
||||
|
|
|
@ -1,73 +1,124 @@
|
|||
#! /run/current-system/sw/bin/perl -w
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i perl -p perl perlPackages.NetAmazonS3 nixUnstable
|
||||
|
||||
# This command uploads tarballs to tarballs.nixos.org, the
|
||||
# content-addressed cache used by fetchurl as a fallback for when
|
||||
# upstream tarballs disappear or change. Usage:
|
||||
#
|
||||
# 1) To upload a single file:
|
||||
#
|
||||
# $ copy-tarballs.pl --file /path/to/tarball.tar.gz
|
||||
#
|
||||
# 2) To upload all files obtained via calls to fetchurl in a Nix derivation:
|
||||
#
|
||||
# $ copy-tarballs.pl --expr '(import <nixpkgs> {}).hello'
|
||||
|
||||
use strict;
|
||||
use XML::Simple;
|
||||
use warnings;
|
||||
use File::Basename;
|
||||
use File::Path;
|
||||
use File::Copy 'cp';
|
||||
use IPC::Open2;
|
||||
use JSON;
|
||||
use Net::Amazon::S3;
|
||||
use Nix::Store;
|
||||
|
||||
my $myDir = dirname($0);
|
||||
# S3 setup.
|
||||
my $aws_access_key_id = $ENV{'AWS_ACCESS_KEY_ID'} or die;
|
||||
my $aws_secret_access_key = $ENV{'AWS_SECRET_ACCESS_KEY'} or die;
|
||||
|
||||
my $tarballsCache = $ENV{'NIX_TARBALLS_CACHE'} // "/tarballs";
|
||||
my $s3 = Net::Amazon::S3->new(
|
||||
{ aws_access_key_id => $aws_access_key_id,
|
||||
aws_secret_access_key => $aws_secret_access_key,
|
||||
retry => 1,
|
||||
});
|
||||
|
||||
my $xml = `nix-instantiate --eval-only --xml --strict '<nixpkgs/maintainers/scripts/find-tarballs.nix>'`;
|
||||
die "$0: evaluation failed\n" if $? != 0;
|
||||
my $bucket = $s3->bucket("nixpkgs-tarballs") or die;
|
||||
|
||||
my $data = XMLin($xml) or die;
|
||||
sub alreadyMirrored {
|
||||
my ($algo, $hash) = @_;
|
||||
return defined $bucket->get_key("$algo/$hash");
|
||||
}
|
||||
|
||||
mkpath($tarballsCache);
|
||||
mkpath("$tarballsCache/md5");
|
||||
mkpath("$tarballsCache/sha1");
|
||||
mkpath("$tarballsCache/sha256");
|
||||
sub uploadFile {
|
||||
my ($fn, $name) = @_;
|
||||
|
||||
foreach my $file (@{$data->{list}->{attrs}}) {
|
||||
my $url = $file->{attr}->{url}->{string}->{value};
|
||||
my $algo = $file->{attr}->{type}->{string}->{value};
|
||||
my $hash = $file->{attr}->{hash}->{string}->{value};
|
||||
my $md5_16 = hashFile("md5", 0, $fn) or die;
|
||||
my $sha1_16 = hashFile("sha1", 0, $fn) or die;
|
||||
my $sha256_32 = hashFile("sha256", 1, $fn) or die;
|
||||
my $sha256_16 = hashFile("sha256", 0, $fn) or die;
|
||||
my $sha512_32 = hashFile("sha512", 1, $fn) or die;
|
||||
my $sha512_16 = hashFile("sha512", 0, $fn) or die;
|
||||
|
||||
my $mainKey = "sha512/$sha512_16";
|
||||
|
||||
# Upload the file as sha512/<hash-in-base-16>.
|
||||
print STDERR "uploading $fn to $mainKey...\n";
|
||||
$bucket->add_key_filename($mainKey, $fn, { 'x-amz-meta-original-name' => $name })
|
||||
or die "failed to upload $fn to $mainKey\n";
|
||||
|
||||
# Create redirects from the other hash types.
|
||||
sub redirect {
|
||||
my ($name, $dest) = @_;
|
||||
#print STDERR "linking $name to $dest...\n";
|
||||
$bucket->add_key($name, "", { 'x-amz-website-redirect-location' => "/" . $dest })
|
||||
or die "failed to create redirect from $name to $dest\n";
|
||||
}
|
||||
redirect "md5/$md5_16", $mainKey;
|
||||
redirect "sha1/$sha1_16", $mainKey;
|
||||
redirect "sha256/$sha256_32", $mainKey;
|
||||
redirect "sha256/$sha256_16", $mainKey;
|
||||
redirect "sha512/$sha512_32", $mainKey;
|
||||
}
|
||||
|
||||
my $op = $ARGV[0] // "";
|
||||
|
||||
if ($op eq "--file") {
|
||||
my $fn = $ARGV[1] // die "$0: --file requires a file name\n";
|
||||
if (alreadyMirrored("sha512", hashFile("sha512", 0, $fn))) {
|
||||
print STDERR "$fn is already mirrored\n";
|
||||
} else {
|
||||
uploadFile($fn, basename $fn);
|
||||
}
|
||||
}
|
||||
|
||||
elsif ($op eq "--expr") {
|
||||
|
||||
# Evaluate find-tarballs.nix.
|
||||
my $expr = $ARGV[1] // die "$0: --expr requires a Nix expression\n";
|
||||
my $pid = open(JSON, "-|", "nix-instantiate", "--eval-only", "--json", "--strict",
|
||||
"<nixpkgs/maintainers/scripts/find-tarballs.nix>",
|
||||
"--arg", "expr", $expr);
|
||||
my $stdout = <JSON>;
|
||||
waitpid($pid, 0);
|
||||
die "$0: evaluation failed\n" if $?;
|
||||
close JSON;
|
||||
|
||||
my $fetches = decode_json($stdout);
|
||||
|
||||
print STDERR "evaluation returned ", scalar(@{$fetches}), " tarballs\n";
|
||||
|
||||
# Check every fetchurl call discovered by find-tarballs.nix.
|
||||
my $mirrored = 0;
|
||||
my $have = 0;
|
||||
foreach my $fetch (@{$fetches}) {
|
||||
my $url = $fetch->{url};
|
||||
my $algo = $fetch->{type};
|
||||
my $hash = $fetch->{hash};
|
||||
|
||||
if ($url !~ /^http:/ && $url !~ /^https:/ && $url !~ /^ftp:/ && $url !~ /^mirror:/) {
|
||||
print STDERR "skipping $url (unsupported scheme)\n";
|
||||
next;
|
||||
}
|
||||
|
||||
$url =~ /([^\/]+)$/;
|
||||
my $fn = $1;
|
||||
|
||||
if (!defined $fn) {
|
||||
print STDERR "skipping $url (no file name)\n";
|
||||
if (alreadyMirrored($algo, $hash)) {
|
||||
$have++;
|
||||
next;
|
||||
}
|
||||
|
||||
if ($fn =~ /[&?=%]/ || $fn =~ /^\./) {
|
||||
print STDERR "skipping $url (bad character in file name)\n";
|
||||
next;
|
||||
}
|
||||
|
||||
if ($fn !~ /[a-zA-Z]/) {
|
||||
print STDERR "skipping $url (no letter in file name)\n";
|
||||
next;
|
||||
}
|
||||
|
||||
if ($fn !~ /[0-9]/) {
|
||||
print STDERR "skipping $url (no digit in file name)\n";
|
||||
next;
|
||||
}
|
||||
|
||||
if ($fn !~ /[-_\.]/) {
|
||||
print STDERR "skipping $url (no dash/dot/underscore in file name)\n";
|
||||
next;
|
||||
}
|
||||
|
||||
my $dstPath = "$tarballsCache/$fn";
|
||||
|
||||
next if -e $dstPath;
|
||||
|
||||
print "downloading $url to $dstPath...\n";
|
||||
print STDERR "mirroring $url...\n";
|
||||
|
||||
next if $ENV{DRY_RUN};
|
||||
|
||||
# Download the file using nix-prefetch-url.
|
||||
$ENV{QUIET} = 1;
|
||||
$ENV{PRINT_PATH} = 1;
|
||||
my $fh;
|
||||
|
@ -79,19 +130,13 @@ foreach my $file (@{$data->{list}->{attrs}}) {
|
|||
}
|
||||
<$fh>; my $storePath = <$fh>; chomp $storePath;
|
||||
|
||||
die unless -e $storePath;
|
||||
uploadFile($storePath, $url);
|
||||
$mirrored++;
|
||||
}
|
||||
|
||||
cp($storePath, $dstPath) or die;
|
||||
|
||||
my $md5 = hashFile("md5", 0, $storePath) or die;
|
||||
symlink("../$fn", "$tarballsCache/md5/$md5");
|
||||
|
||||
my $sha1 = hashFile("sha1", 0, $storePath) or die;
|
||||
symlink("../$fn", "$tarballsCache/sha1/$sha1");
|
||||
|
||||
my $sha256 = hashFile("sha256", 0, $storePath) or die;
|
||||
symlink("../$fn", "$tarballsCache/sha256/$sha256");
|
||||
|
||||
$sha256 = hashFile("sha256", 1, $storePath) or die;
|
||||
symlink("../$fn", "$tarballsCache/sha256/$sha256");
|
||||
print STDERR "mirrored $mirrored files, already have $have files\n";
|
||||
}
|
||||
|
||||
else {
|
||||
die "Syntax: $0 --file FILENAME | --expr EXPR\n";
|
||||
}
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
with import ../.. { };
|
||||
with lib;
|
||||
|
||||
{ expr ? removeAttrs (import ../../pkgs/top-level/release.nix { }) [ "tarball" "unstable" ] }:
|
||||
|
||||
let
|
||||
|
||||
root = removeAttrs (import ../../pkgs/top-level/release.nix { }) [ "tarball" "unstable" ];
|
||||
root = expr;
|
||||
|
||||
uniqueUrls = map (x: x.file) (genericClosure {
|
||||
startSet = map (file: { key = file.url; inherit file; }) urls;
|
||||
|
@ -15,7 +17,10 @@ let
|
|||
|
||||
urls = map (drv: { url = head drv.urls; hash = drv.outputHash; type = drv.outputHashAlgo; }) fetchurlDependencies;
|
||||
|
||||
fetchurlDependencies = filter (drv: drv.outputHash or "" != "" && drv ? urls) dependencies;
|
||||
fetchurlDependencies =
|
||||
filter
|
||||
(drv: drv.outputHash or "" != "" && drv.outputHashMode == "flat" && drv.postFetch or "" == "" && drv ? urls)
|
||||
dependencies;
|
||||
|
||||
dependencies = map (x: x.value) (genericClosure {
|
||||
startSet = map keyDrv (derivationsIn' root);
|
||||
|
|
|
@ -12,7 +12,7 @@ git_data="$(echo "$raw_git_log" | grep 'Author:' |
|
|||
# Also there are a few manual entries
|
||||
maintainers="$(cat "$(dirname "$0")/../../lib/maintainers.nix" |
|
||||
grep '=' | sed -re 's/\\"/''/g;
|
||||
s/ *([^ =]*) *= *" *(.*[^ ]) *[<](.*)[>] *".*/\1\t\2\t\3/')"
|
||||
s/[ ]*([^ =]*)[ ]*=[ ]*" *(.*[^ ]) *[<](.*)[>] *".*/\1\t\2\t\3/')"
|
||||
git_lines="$( ( echo "$git_data";
|
||||
cat "$(dirname "$0")/vanity-manual-equalities.txt") | sort |uniq)"
|
||||
|
||||
|
|
|
@ -104,6 +104,15 @@ nginx.override {
|
|||
You can (still) use the <literal>html-tidy</literal> package, which got updated
|
||||
to a stable release from this new upstream.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>extraDeviceOptions</literal> argument is removed
|
||||
from <literal>bumblebee</literal> package. Instead there are
|
||||
now two separate arguments: <literal>extraNvidiaDeviceOptions</literal>
|
||||
and <literal>extraNouveauDeviceOptions</literal> for setting
|
||||
extra X11 options for nvidia and nouveau drivers, respectively.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</section>
|
||||
|
|
|
@ -96,6 +96,15 @@ in
|
|||
example = "http://127.0.0.1:3128";
|
||||
};
|
||||
|
||||
allProxy = lib.mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = cfg.proxy.default;
|
||||
description = ''
|
||||
This option specifies the all_proxy environment variable.
|
||||
'';
|
||||
example = "http://127.0.0.1:3128";
|
||||
};
|
||||
|
||||
noProxy = lib.mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
|
@ -183,6 +192,8 @@ in
|
|||
rsync_proxy = cfg.proxy.rsyncProxy;
|
||||
} // optionalAttrs (cfg.proxy.ftpProxy != null) {
|
||||
ftp_proxy = cfg.proxy.ftpProxy;
|
||||
} // optionalAttrs (cfg.proxy.allProxy != null) {
|
||||
all_proxy = cfg.proxy.allProxy;
|
||||
} // optionalAttrs (cfg.proxy.noProxy != null) {
|
||||
no_proxy = cfg.proxy.noProxy;
|
||||
};
|
||||
|
|
|
@ -2,10 +2,20 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.hardware.bumblebee;
|
||||
|
||||
kernel = config.boot.kernelPackages;
|
||||
bumblebee = if config.hardware.bumblebee.connectDisplay
|
||||
then pkgs.bumblebee_display
|
||||
else pkgs.bumblebee;
|
||||
|
||||
useNvidia = cfg.driver == "nvidia";
|
||||
|
||||
bumblebee = pkgs.bumblebee.override {
|
||||
inherit useNvidia;
|
||||
useDisplayDevice = cfg.connectDisplay;
|
||||
};
|
||||
|
||||
primus = pkgs.primus.override {
|
||||
inherit useNvidia;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
|
@ -29,6 +39,7 @@ in
|
|||
type = types.str;
|
||||
description = ''Group for bumblebee socket'';
|
||||
};
|
||||
|
||||
hardware.bumblebee.connectDisplay = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
|
@ -40,26 +51,30 @@ in
|
|||
Only nvidia driver is supported so far.
|
||||
'';
|
||||
};
|
||||
|
||||
hardware.bumblebee.driver = mkOption {
|
||||
default = "nvidia";
|
||||
type = types.enum [ "nvidia" "nouveau" ];
|
||||
description = ''
|
||||
Set driver used by bumblebeed. Supported are nouveau and nvidia.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf config.hardware.bumblebee.enable {
|
||||
boot.blacklistedKernelModules = [ "nouveau" "nvidia" ];
|
||||
boot.kernelModules = [ "bbswitch" ];
|
||||
boot.extraModulePackages = [ kernel.bbswitch kernel.nvidia_x11 ];
|
||||
boot.extraModulePackages = [ kernel.bbswitch ] ++ optional useNvidia kernel.nvidia_x11;
|
||||
|
||||
environment.systemPackages = [ bumblebee pkgs.primus ];
|
||||
environment.systemPackages = [ bumblebee primus ];
|
||||
|
||||
systemd.services.bumblebeed = {
|
||||
description = "Bumblebee Hybrid Graphics Switcher";
|
||||
wantedBy = [ "display-manager.service" ];
|
||||
path = [ kernel.bbswitch bumblebee ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${bumblebee}/bin/bumblebeed --use-syslog -g ${config.hardware.bumblebee.group}";
|
||||
Restart = "always";
|
||||
RestartSec = 60;
|
||||
CPUSchedulingPolicy = "idle";
|
||||
ExecStart = "${bumblebee}/bin/bumblebeed --use-syslog -g ${cfg.group} --driver ${cfg.driver}";
|
||||
};
|
||||
environment.LD_LIBRARY_PATH="/run/opengl-driver/lib/";
|
||||
environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -237,6 +237,7 @@
|
|||
calibre-server = 213;
|
||||
heapster = 214;
|
||||
bepasty = 215;
|
||||
pumpio = 216;
|
||||
|
||||
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
|
||||
|
||||
|
@ -451,6 +452,7 @@
|
|||
xtreemfs = 212;
|
||||
calibre-server = 213;
|
||||
bepasty = 215;
|
||||
pumpio = 216;
|
||||
|
||||
# When adding a gid, make sure it doesn't match an existing
|
||||
# uid. Users and groups with the same name should have equal
|
||||
|
|
|
@ -312,6 +312,7 @@
|
|||
./services/networking/lambdabot.nix
|
||||
./services/networking/mailpile.nix
|
||||
./services/networking/minidlna.nix
|
||||
./services/networking/miniupnpd.nix
|
||||
./services/networking/mstpd.nix
|
||||
./services/networking/murmur.nix
|
||||
./services/networking/namecoind.nix
|
||||
|
@ -401,6 +402,7 @@
|
|||
./services/ttys/agetty.nix
|
||||
./services/ttys/gpm.nix
|
||||
./services/ttys/kmscon.nix
|
||||
./services/web-apps/pump.io.nix
|
||||
./services/web-servers/apache-httpd/default.nix
|
||||
./services/web-servers/fcgiwrap.nix
|
||||
./services/web-servers/jboss/default.nix
|
||||
|
@ -506,6 +508,7 @@
|
|||
./virtualisation/amazon-options.nix
|
||||
./virtualisation/openvswitch.nix
|
||||
./virtualisation/parallels-guest.nix
|
||||
./virtualisation/rkt.nix
|
||||
./virtualisation/virtualbox-guest.nix
|
||||
./virtualisation/virtualbox-host.nix
|
||||
./virtualisation/vmware-guest.nix
|
||||
|
|
|
@ -65,7 +65,7 @@ in {
|
|||
type = types.str;
|
||||
description = ''
|
||||
Verbatim configuration file contents.
|
||||
See http://www.rabbitmq.com/configure.htm
|
||||
See http://www.rabbitmq.com/configure.html
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ enableRDW = config.networking.networkmanager.enable;
|
|||
|
||||
tlp = pkgs.tlp.override {
|
||||
inherit enableRDW;
|
||||
kmod = config.system.sbin.modprobe;
|
||||
};
|
||||
|
||||
# XXX: We can't use writeTextFile + readFile here because it triggers
|
||||
|
@ -69,6 +68,8 @@ in
|
|||
ExecStart = "${tlp}/bin/tlp init start";
|
||||
ExecStop = "${tlp}/bin/tlp init stop";
|
||||
};
|
||||
|
||||
environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
|
||||
};
|
||||
|
||||
tlp-sleep = {
|
||||
|
@ -87,6 +88,8 @@ in
|
|||
ExecStart = "${tlp}/bin/tlp suspend";
|
||||
ExecStop = "${tlp}/bin/tlp resume";
|
||||
};
|
||||
|
||||
environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ let
|
|||
http_settings:
|
||||
self_signed_cert: false
|
||||
repos_path: "${cfg.stateDir}/repositories"
|
||||
secret_file: "${cfg.stateDir}/config/gitlab_shell_secret"
|
||||
log_file: "${cfg.stateDir}/log/gitlab-shell.log"
|
||||
redis:
|
||||
bin: ${pkgs.redis}/bin/redis-cli
|
||||
|
@ -142,7 +143,7 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ gitlab-runner pkgs.gitlab-shell ];
|
||||
environment.systemPackages = [ pkgs.git gitlab-runner pkgs.gitlab-shell ];
|
||||
|
||||
assertions = [
|
||||
{ assertion = cfg.databasePassword != "";
|
||||
|
@ -154,7 +155,6 @@ in {
|
|||
services.redis.enable = mkDefault true;
|
||||
# We use postgres as the main data store.
|
||||
services.postgresql.enable = mkDefault true;
|
||||
services.postgresql.package = mkDefault pkgs.postgresql;
|
||||
# Use postfix to send out mails.
|
||||
services.postfix.enable = mkDefault true;
|
||||
|
||||
|
@ -209,6 +209,23 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
systemd.services.gitlab-git-http-server = {
|
||||
after = [ "network.target" "gitlab.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment.HOME = "${cfg.stateDir}/home";
|
||||
path = with pkgs; [
|
||||
gitAndTools.git
|
||||
openssh
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "gitlab";
|
||||
Group = "gitlab";
|
||||
TimeoutSec = "300";
|
||||
ExecStart = "${pkgs.gitlab-git-http-server}/bin/gitlab-git-http-server -listenUmask 0 -listenNetwork unix -listenAddr ${cfg.stateDir}/tmp/sockets/gitlab-git-http-server.socket -authBackend http://localhost:8080 ${cfg.stateDir}/repositories";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.gitlab = {
|
||||
after = [ "network.target" "postgresql.service" "redis.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
@ -219,6 +236,8 @@ in {
|
|||
environment.GITLAB_APPLICATION_LOG_PATH = "${cfg.stateDir}/log/application.log";
|
||||
environment.GITLAB_SATELLITES_PATH = "${cfg.stateDir}/satellites";
|
||||
environment.GITLAB_SHELL_PATH = "${pkgs.gitlab-shell}";
|
||||
environment.GITLAB_SHELL_CONFIG_PATH = "${cfg.stateDir}/shell/config.yml";
|
||||
environment.GITLAB_SHELL_SECRET_PATH = "${cfg.stateDir}/config/gitlab_shell_secret";
|
||||
environment.GITLAB_REPOSITORIES_PATH = "${cfg.stateDir}/repositories";
|
||||
environment.GITLAB_SHELL_HOOKS_PATH = "${cfg.stateDir}/shell/hooks";
|
||||
environment.BUNDLE_GEMFILE = "${pkgs.gitlab}/share/gitlab/Gemfile";
|
||||
|
@ -247,7 +266,7 @@ in {
|
|||
rm -rf ${cfg.stateDir}/config
|
||||
mkdir -p ${cfg.stateDir}/config
|
||||
# TODO: What exactly is gitlab-shell doing with the secret?
|
||||
head -c 20 /dev/urandom > ${cfg.stateDir}/config/gitlab_shell_secret
|
||||
tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c 20 > ${cfg.stateDir}/config/gitlab_shell_secret
|
||||
mkdir -p ${cfg.stateDir}/home/.ssh
|
||||
touch ${cfg.stateDir}/home/.ssh/authorized_keys
|
||||
|
||||
|
@ -272,6 +291,7 @@ in {
|
|||
fi
|
||||
fi
|
||||
|
||||
${bundler}/bin/bundle exec rake -f ${pkgs.gitlab}/share/gitlab/Rakefile db:migrate RAILS_ENV=production
|
||||
# Install the shell required to push repositories
|
||||
ln -fs ${pkgs.writeText "config.yml" gitlabShellYml} ${cfg.stateDir}/shell/config.yml
|
||||
export GITLAB_SHELL_CONFIG_PATH=""${cfg.stateDir}/shell/config.yml
|
||||
|
@ -296,5 +316,4 @@ in {
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ in
|
|||
services.mingetty.helpLine = mkIf cfg.showManual
|
||||
"\nPress <Alt-F${toString cfg.ttyNumber}> for the NixOS manual.";
|
||||
|
||||
services.nixosManual.browser = mkDefault "${pkgs.w3m}/bin/w3m";
|
||||
services.nixosManual.browser = mkDefault "${pkgs.w3m-nox}/bin/w3m";
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ in {
|
|||
|
||||
assertions = [
|
||||
{ assertion = cfg.databasePassword != "";
|
||||
message = "databasePassword must be set";
|
||||
message = "services.redmine.databasePassword must be set";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ in
|
|||
|
||||
options = {
|
||||
|
||||
services.teamviewer.enable = mkEnableOption "teamviewer daemon";
|
||||
services.teamviewer.enable = mkEnableOption "TeamViewer daemon";
|
||||
|
||||
};
|
||||
|
||||
|
@ -27,9 +27,9 @@ in
|
|||
systemd.services.teamviewerd = {
|
||||
description = "TeamViewer remote control daemon";
|
||||
|
||||
wantedBy = [ "graphical.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "NetworkManager-wait-online.service" "network.target" ];
|
||||
preStart = "mkdir -pv /var/tmp/teamviewer10/{logs,config}";
|
||||
preStart = "mkdir -pv /var/lib/teamviewer /var/log/teamviewer";
|
||||
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
|
|
|
@ -73,28 +73,27 @@ in
|
|||
###### implementation
|
||||
|
||||
config = mkIf config.services.cntlm.enable {
|
||||
|
||||
services.cntlm.netbios_hostname = mkDefault config.networking.hostName;
|
||||
|
||||
users.extraUsers = singleton {
|
||||
name = "cntlm";
|
||||
description = "cntlm system-wide daemon";
|
||||
home = "/var/empty";
|
||||
};
|
||||
|
||||
jobs.cntlm =
|
||||
{ description = "CNTLM is an NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy";
|
||||
|
||||
startOn = "started network-interfaces";
|
||||
|
||||
daemonType = "fork";
|
||||
|
||||
exec =
|
||||
''
|
||||
systemd.services.cntlm = {
|
||||
description = "CNTLM is an NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
User = "cntlm";
|
||||
ExecStart = ''
|
||||
${pkgs.cntlm}/bin/cntlm -U cntlm \
|
||||
-c ${pkgs.writeText "cntlm_config" cfg.extraConfig}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.cntlm.netbios_hostname = mkDefault config.networking.hostName;
|
||||
|
||||
users.extraUsers.cntlm = {
|
||||
name = "cntlm";
|
||||
description = "cntlm system-wide daemon";
|
||||
home = "/var/empty";
|
||||
};
|
||||
|
||||
services.cntlm.extraConfig =
|
||||
''
|
||||
|
@ -109,7 +108,6 @@ in
|
|||
Listen ${toString port}
|
||||
'') cfg.port}
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ let
|
|||
password=${config.services.ddclient.password}
|
||||
protocol=${config.services.ddclient.protocol}
|
||||
server=${config.services.ddclient.server}
|
||||
ssl=${if config.services.ddclient.ssl then "yes" else "yes"}
|
||||
ssl=${if config.services.ddclient.ssl then "yes" else "no"}
|
||||
wildcard=YES
|
||||
${config.services.ddclient.domain}
|
||||
${config.services.ddclient.extraConfig}
|
||||
|
|
|
@ -53,11 +53,13 @@ in
|
|||
default = false;
|
||||
description = ''
|
||||
Enable putting a wireless interface into infrastructure mode,
|
||||
allowing other wireless devices to associate with the wireless interface and do
|
||||
wireless networking. A simple access point will enable hostapd.wpa, and
|
||||
hostapd.wpa_passphrase, hostapd.ssid, dhcpd on the wireless interface to
|
||||
provide IP addresses to the associated stations, and nat (from the wireless
|
||||
interface to an upstream interface).
|
||||
allowing other wireless devices to associate with the wireless
|
||||
interface and do wireless networking. A simple access point will
|
||||
<option>enable hostapd.wpa</option>,
|
||||
<option>hostapd.wpaPassphrase</option>, and
|
||||
<option>hostapd.ssid</option>, as well as DHCP on the wireless
|
||||
interface to provide IP addresses to the associated stations, and
|
||||
NAT (from the wireless interface to an upstream interface).
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -73,7 +75,10 @@ in
|
|||
default = "nl80211";
|
||||
example = "hostapd";
|
||||
type = types.string;
|
||||
description = "Which driver hostapd will use. Most things will probably use the default.";
|
||||
description = ''
|
||||
Which driver <command>hostapd</command> will use.
|
||||
Most applications will probably use the default.
|
||||
'';
|
||||
};
|
||||
|
||||
ssid = mkOption {
|
||||
|
@ -87,7 +92,10 @@ in
|
|||
default = "b";
|
||||
example = "g";
|
||||
type = types.string;
|
||||
description = "Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g";
|
||||
description = ''
|
||||
Operation mode.
|
||||
(a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g).
|
||||
'';
|
||||
};
|
||||
|
||||
channel = mkOption {
|
||||
|
@ -97,8 +105,9 @@ in
|
|||
description =
|
||||
''
|
||||
Channel number (IEEE 802.11)
|
||||
Please note that some drivers do not use this value from hostapd and the
|
||||
channel will need to be configured separately with iwconfig.
|
||||
Please note that some drivers do not use this value from
|
||||
<command>hostapd</command> and the channel will need to be configured
|
||||
separately with <command>iwconfig</command>.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -106,12 +115,16 @@ in
|
|||
default = "wheel";
|
||||
example = "network";
|
||||
type = types.string;
|
||||
description = "members of this group can control hostapd";
|
||||
description = ''
|
||||
Members of this group can control <command>hostapd</command>.
|
||||
'';
|
||||
};
|
||||
|
||||
wpa = mkOption {
|
||||
default = true;
|
||||
description = "enable WPA (IEEE 802.11i/D3.0) to authenticate to the access point";
|
||||
description = ''
|
||||
Enable WPA (IEEE 802.11i/D3.0) to authenticate with the access point.
|
||||
'';
|
||||
};
|
||||
|
||||
wpaPassphrase = mkOption {
|
||||
|
@ -121,8 +134,9 @@ in
|
|||
description =
|
||||
''
|
||||
WPA-PSK (pre-shared-key) passphrase. Clients will need this
|
||||
passphrase to associate with this access point. Warning: This passphrase will
|
||||
get put into a world-readable file in the nix store.
|
||||
passphrase to associate with this access point.
|
||||
Warning: This passphrase will get put into a world-readable file in
|
||||
the Nix store!
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -134,7 +148,7 @@ in
|
|||
ht_capab=[HT40-][SHORT-GI-40][DSSS_CCK-40]
|
||||
'';
|
||||
type = types.string;
|
||||
description = "Extra configuration options to put in the hostapd.conf";
|
||||
description = "Extra configuration options to put in hostapd.conf.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
70
nixos/modules/services/networking/miniupnpd.nix
Normal file
70
nixos/modules/services/networking/miniupnpd.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.miniupnpd;
|
||||
configFile = pkgs.writeText "miniupnpd.conf" ''
|
||||
ext_ifname=${cfg.externalInterface}
|
||||
enable_natpmp=${if cfg.natpmp then "yes" else "no"}
|
||||
enable_upnp=${if cfg.upnp then "yes" else "no"}
|
||||
|
||||
${concatMapStrings (range: ''
|
||||
listening_ip=${range}
|
||||
'') cfg.internalIPs}
|
||||
|
||||
${cfg.appendConfig}
|
||||
'';
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.miniupnpd = {
|
||||
enable = mkEnableOption "MiniUPnP daemon";
|
||||
|
||||
externalInterface = mkOption {
|
||||
type = types.str;
|
||||
description = ''
|
||||
Name of the external interface.
|
||||
'';
|
||||
};
|
||||
|
||||
internalIPs = mkOption {
|
||||
type = types.listOf types.str;
|
||||
example = [ "192.168.1.0/24" ];
|
||||
description = ''
|
||||
The IP address ranges to listen on.
|
||||
'';
|
||||
};
|
||||
|
||||
natpmp = mkEnableOption "NAT-PMP support";
|
||||
|
||||
upnp = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to enable UPNP support.
|
||||
'';
|
||||
};
|
||||
|
||||
appendConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Configuration lines appended to the MiniUPnP config.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.miniupnpd = {
|
||||
description = "MiniUPnP daemon";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.miniupnpd ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.miniupnpd}/bin/miniupnpd -d -f ${configFile}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -300,22 +300,8 @@ in
|
|||
options = {
|
||||
services.nsd = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable the NSD authoritative domain name server.
|
||||
'';
|
||||
};
|
||||
|
||||
bind8Stats = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = ''
|
||||
Wheter to enable BIND8 like statisics.
|
||||
'';
|
||||
};
|
||||
enable = mkEnableOption "NSD authoritative DNS server";
|
||||
bind8Stats = mkEnableOption "BIND8 like statistics";
|
||||
|
||||
rootServer = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -483,13 +469,7 @@ in
|
|||
|
||||
|
||||
ratelimit = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable ratelimit capabilities.
|
||||
'';
|
||||
};
|
||||
enable = mkEnableOption "ratelimit capabilities";
|
||||
|
||||
size = mkOption {
|
||||
type = types.int;
|
||||
|
@ -548,13 +528,7 @@ in
|
|||
|
||||
|
||||
remoteControl = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Wheter to enable remote control via nsd-control(8).
|
||||
'';
|
||||
};
|
||||
enable = mkEnableOption "remote control via nsd-control";
|
||||
|
||||
interfaces = mkOption {
|
||||
type = types.listOf types.str;
|
||||
|
|
|
@ -57,7 +57,7 @@ in {
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
preStart = if isNull cfg.configFile then null
|
||||
preStart = if isNull cfg.configFile then ""
|
||||
else ''
|
||||
ln -sf ${pkgs.writeText "config.js" cfg.configFile} \
|
||||
${shoutHome}/config.js
|
||||
|
|
|
@ -118,7 +118,7 @@ in
|
|||
systemd.services.strongswan = {
|
||||
description = "strongSwan IPSec Service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = with pkgs; [ kmod iproute iptables utillinux ]; # XXX Linux
|
||||
path = with pkgs; [ config.system.sbin.modprobe iproute iptables utillinux ]; # XXX Linux
|
||||
wants = [ "keys.target" ];
|
||||
after = [ "network.target" "keys.target" ];
|
||||
environment = {
|
||||
|
|
|
@ -124,10 +124,15 @@ in
|
|||
${pkgs.xz.out}/lib/liblzma*.so* mr,
|
||||
${pkgs.libgcrypt.out}/lib/libgcrypt*.so* mr,
|
||||
${pkgs.libgpgerror.out}/lib/libgpg-error*.so* mr,
|
||||
${pkgs.libnghttp2.out}/lib/libnghttp2*.so* mr,
|
||||
${pkgs.c-ares.out}/lib/libcares*.so* mr,
|
||||
${pkgs.libcap.out}/lib/libcap*.so* mr,
|
||||
${pkgs.attr.out}/lib/libattr*.so* mr,
|
||||
|
||||
@{PROC}/sys/kernel/random/uuid r,
|
||||
@{PROC}/sys/vm/overcommit_memory r,
|
||||
|
||||
${pkgs.openssl}/etc/** r,
|
||||
${pkgs.transmission}/share/transmission/** r,
|
||||
|
||||
owner ${settingsDir}/** rw,
|
||||
|
|
364
nixos/modules/services/web-apps/pump.io.nix
Normal file
364
nixos/modules/services/web-apps/pump.io.nix
Normal file
|
@ -0,0 +1,364 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.pumpio;
|
||||
dataDir = "/var/lib/pump.io";
|
||||
user = "pumpio";
|
||||
|
||||
configOptions = {
|
||||
driver = if cfg.driver == "disk" then null else cfg.driver;
|
||||
params = ({ } //
|
||||
(if cfg.driver == "disk" then {
|
||||
dir = dataDir;
|
||||
} else { }) //
|
||||
(if cfg.driver == "mongodb" || cfg.driver == "redis" then {
|
||||
host = cfg.dbHost;
|
||||
port = cfg.dbPort;
|
||||
dbname = cfg.dbName;
|
||||
dbuser = cfg.dbUser;
|
||||
dbpass = cfg.dbPassword;
|
||||
} else { }) //
|
||||
(if cfg.driver == "memcached" then {
|
||||
host = cfg.dbHost;
|
||||
port = cfg.dbPort;
|
||||
} else { }) //
|
||||
cfg.driverParams);
|
||||
|
||||
secret = cfg.secret;
|
||||
|
||||
address = cfg.address;
|
||||
port = cfg.port;
|
||||
|
||||
noweb = false;
|
||||
urlPort = cfg.urlPort;
|
||||
hostname = cfg.hostname;
|
||||
favicon = cfg.favicon;
|
||||
|
||||
site = cfg.site;
|
||||
owner = cfg.owner;
|
||||
ownerURL = cfg.ownerURL;
|
||||
|
||||
key = cfg.sslKey;
|
||||
cert = cfg.sslCert;
|
||||
bounce = false;
|
||||
|
||||
spamhost = cfg.spamHost;
|
||||
spamclientid = cfg.spamClientId;
|
||||
spamclientsecret = cfg.spamClientSecret;
|
||||
|
||||
requireEmail = cfg.requireEmail;
|
||||
smtpserver = cfg.smtpHost;
|
||||
smtpport = cfg.smtpPort;
|
||||
smtpuser = cfg.smtpUser;
|
||||
smtppass = cfg.smtpPassword;
|
||||
smtpusessl = cfg.smtpUseSSL;
|
||||
smtpfrom = cfg.smtpFrom;
|
||||
|
||||
nologger = false;
|
||||
uploaddir = "${dataDir}/uploads";
|
||||
debugClient = false;
|
||||
firehose = cfg.firehose;
|
||||
disableRegistration = cfg.disableRegistration;
|
||||
} //
|
||||
(if cfg.port < 1024 then {
|
||||
serverUser = user; # have pump.io listen then drop privileges
|
||||
} else { }) //
|
||||
cfg.extraConfig;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
|
||||
services.pumpio = {
|
||||
|
||||
enable = mkEnableOption "Pump.io social streams server";
|
||||
|
||||
secret = mkOption {
|
||||
type = types.str;
|
||||
example = "my dog has fleas";
|
||||
description = ''
|
||||
A session-generating secret, server-wide password. Warning:
|
||||
this is stored in cleartext in the Nix store!
|
||||
'';
|
||||
};
|
||||
|
||||
site = mkOption {
|
||||
type = types.str;
|
||||
example = "Awesome Sauce";
|
||||
description = "Name of the server";
|
||||
};
|
||||
|
||||
owner = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
example = "Awesome Inc.";
|
||||
description = "Name of owning entity, if you want to link to it.";
|
||||
};
|
||||
|
||||
ownerURL = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
example = "https://pump.io";
|
||||
description = "URL of owning entity, if you want to link to it.";
|
||||
};
|
||||
|
||||
address = mkOption {
|
||||
type = types.str;
|
||||
default = "localhost";
|
||||
description = ''
|
||||
Web server listen address.
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
default = 31337;
|
||||
description = ''
|
||||
Port to listen on. Defaults to 31337, which is suitable for
|
||||
running behind a reverse proxy. For a standalone server,
|
||||
use 443.
|
||||
'';
|
||||
};
|
||||
|
||||
hostname = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
The hostname of the server, used for generating
|
||||
URLs. Defaults to "localhost" which doesn't do much for you.
|
||||
'';
|
||||
};
|
||||
|
||||
urlPort = mkOption {
|
||||
type = types.int;
|
||||
default = 443;
|
||||
description = ''
|
||||
Port to use for generating URLs. This basically has to be
|
||||
either 80 or 443 because the host-meta and Webfinger
|
||||
protocols don't make any provision for HTTP/HTTPS servers
|
||||
running on other ports.
|
||||
'';
|
||||
};
|
||||
|
||||
favicon = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = ''
|
||||
Local filesystem path to the favicon.ico file to use. This
|
||||
will be served as "/favicon.ico" by the server.
|
||||
'';
|
||||
};
|
||||
|
||||
sslKey = mkOption {
|
||||
type = types.path;
|
||||
example = "${dataDir}/myserver.key";
|
||||
default = "";
|
||||
description = ''
|
||||
The path to the server certificate private key. The
|
||||
certificate is required, but it can be self-signed.
|
||||
'';
|
||||
};
|
||||
|
||||
sslCert = mkOption {
|
||||
type = types.path;
|
||||
example = "${dataDir}/myserver.crt";
|
||||
default = "";
|
||||
description = ''
|
||||
The path to the server certificate. The certificate is
|
||||
required, but it can be self-signed.
|
||||
'';
|
||||
};
|
||||
|
||||
firehose = mkOption {
|
||||
type = types.str;
|
||||
default = "ofirehose.com";
|
||||
description = ''
|
||||
Firehose host running the ofirehose software. Defaults to
|
||||
"ofirehose.com". Public notices will be ping this firehose
|
||||
server and from there go out to search engines and the
|
||||
world. If you want to disconnect from the public web, set
|
||||
this to something falsy.
|
||||
'';
|
||||
};
|
||||
|
||||
disableRegistration = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Disables registering new users on the site through the Web
|
||||
or the API.
|
||||
'';
|
||||
};
|
||||
|
||||
requireEmail = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Require an e-mail address to register.";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
default = { };
|
||||
description = ''
|
||||
Extra configuration options which are serialized to json and added
|
||||
to the pump.io.json config file.
|
||||
'';
|
||||
};
|
||||
|
||||
driver = mkOption {
|
||||
type = types.enum [ "mongodb" "disk" "lrucache" "memcached" "redis" ];
|
||||
default = "mongodb";
|
||||
description = "Type of database. Corresponds to a nodejs databank driver.";
|
||||
};
|
||||
|
||||
driverParams = mkOption {
|
||||
default = { };
|
||||
description = "Extra parameters for the driver.";
|
||||
};
|
||||
|
||||
dbHost = mkOption {
|
||||
type = types.str;
|
||||
default = "localhost";
|
||||
description = "The database host to connect to.";
|
||||
};
|
||||
|
||||
dbPort = mkOption {
|
||||
type = types.int;
|
||||
default = 27017;
|
||||
description = "The port that the database is listening on.";
|
||||
};
|
||||
|
||||
dbName = mkOption {
|
||||
type = types.str;
|
||||
default = "pumpio";
|
||||
description = "The name of the database to use.";
|
||||
};
|
||||
|
||||
dbUser = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
The username. Defaults to null, meaning no authentication.
|
||||
'';
|
||||
};
|
||||
|
||||
dbPassword = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
The password corresponding to dbUser. Warning: this is
|
||||
stored in cleartext in the Nix store!
|
||||
'';
|
||||
};
|
||||
|
||||
smtpHost = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "localhost";
|
||||
description = ''
|
||||
Server to use for sending transactional email. If it's not
|
||||
set up, no email is sent and features like password recovery
|
||||
and email notification won't work.
|
||||
'';
|
||||
};
|
||||
|
||||
smtpPort = mkOption {
|
||||
type = types.int;
|
||||
default = 25;
|
||||
description = ''
|
||||
Port to connect to on SMTP server.
|
||||
'';
|
||||
};
|
||||
|
||||
smtpUser = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Username to use to connect to SMTP server. Might not be
|
||||
necessary for some servers.
|
||||
'';
|
||||
};
|
||||
|
||||
smtpPassword = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Password to use to connect to SMTP server. Might not be
|
||||
necessary for some servers. Warning: this is stored in
|
||||
cleartext in the Nix store!
|
||||
'';
|
||||
};
|
||||
|
||||
smtpUseSSL = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Only use SSL with the SMTP server. By default, a SSL
|
||||
connection is negotiated using TLS. You may need to change
|
||||
the smtpPort value if you set this.
|
||||
'';
|
||||
};
|
||||
|
||||
smtpFrom = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Email address to use in the "From:" header of outgoing
|
||||
notifications. Defaults to 'no-reply@' plus the site
|
||||
hostname.
|
||||
'';
|
||||
};
|
||||
|
||||
spamHost = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Host running activityspam software to use to test updates
|
||||
for spam.
|
||||
'';
|
||||
};
|
||||
spamClientId = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "OAuth pair for spam server.";
|
||||
};
|
||||
spamClientSecret = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
OAuth pair for spam server. Warning: this is
|
||||
stored in cleartext in the Nix store!
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services."pump.io" =
|
||||
{ description = "pump.io social network stream server";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.ExecStart = "${pkgs.pumpio}/bin/pump -c /etc/pump.io.json";
|
||||
serviceConfig.User = if cfg.port < 1024 then "root" else user;
|
||||
serviceConfig.Group = user;
|
||||
};
|
||||
|
||||
environment.etc."pump.io.json" = {
|
||||
mode = "0440";
|
||||
gid = config.ids.gids.pumpio;
|
||||
text = builtins.toJSON configOptions;
|
||||
};
|
||||
|
||||
users.extraGroups.pumpio.gid = config.ids.gids.pumpio;
|
||||
users.extraUsers.pumpio = {
|
||||
group = "pumpio";
|
||||
uid = config.ids.uids.pumpio;
|
||||
description = "Pump.io user";
|
||||
home = dataDir;
|
||||
createHome = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -70,7 +70,7 @@ let
|
|||
"proxyuserpwd" => "",
|
||||
|
||||
/* List of trusted domains, to prevent host header poisoning ownCloud is only using these Host headers */
|
||||
'trusted_domains' => array('${config.trustedDomain}'),
|
||||
${if config.trustedDomain != "" then "'trusted_domains' => array('${config.trustedDomain}')," else ""}
|
||||
|
||||
/* Theme to use for ownCloud */
|
||||
"theme" => "",
|
||||
|
@ -331,7 +331,7 @@ let
|
|||
*/
|
||||
'share_folder' => '/',
|
||||
|
||||
'version' => '${pkgs.owncloud.version}',
|
||||
'version' => '${config.package.version}',
|
||||
|
||||
'openssl' => '${pkgs.openssl}/bin/openssl'
|
||||
|
||||
|
@ -345,16 +345,15 @@ rec {
|
|||
|
||||
extraConfig =
|
||||
''
|
||||
ServerName ${config.siteName}
|
||||
ServerAdmin ${config.adminAddr}
|
||||
DocumentRoot ${documentRoot}
|
||||
${if config.urlPrefix != "" then "Alias ${config.urlPrefix} ${config.package}" else ''
|
||||
|
||||
RewriteEngine On
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
|
||||
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
|
||||
''}
|
||||
|
||||
<Directory ${pkgs.owncloud}>
|
||||
${builtins.readFile "${pkgs.owncloud}/.htaccess"}
|
||||
<Directory ${config.package}>
|
||||
${builtins.readFile "${config.package}/.htaccess"}
|
||||
</Directory>
|
||||
'';
|
||||
|
||||
|
@ -362,12 +361,29 @@ rec {
|
|||
{ name = "OC_CONFIG_PATH"; value = "${config.dataDir}/config/"; }
|
||||
];
|
||||
|
||||
documentRoot = pkgs.owncloud;
|
||||
documentRoot = if config.urlPrefix == "" then config.package else null;
|
||||
|
||||
enablePHP = true;
|
||||
|
||||
options = {
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.owncloud70;
|
||||
example = literalExample "pkgs.owncloud70";
|
||||
description = ''
|
||||
PostgreSQL package to use.
|
||||
'';
|
||||
};
|
||||
|
||||
urlPrefix = mkOption {
|
||||
default = "";
|
||||
example = "/owncloud";
|
||||
description = ''
|
||||
The URL prefix under which the owncloud service appears.
|
||||
'';
|
||||
};
|
||||
|
||||
id = mkOption {
|
||||
default = "main";
|
||||
description = ''
|
||||
|
@ -552,7 +568,7 @@ rec {
|
|||
cp ${owncloudConfig} ${config.dataDir}/config/config.php
|
||||
mkdir -p ${config.dataDir}/storage
|
||||
mkdir -p ${config.dataDir}/apps
|
||||
cp -r ${pkgs.owncloud}/apps/* ${config.dataDir}/apps/
|
||||
cp -r ${config.package}/apps/* ${config.dataDir}/apps/
|
||||
chmod -R ug+rw ${config.dataDir}
|
||||
chmod -R o-rwx ${config.dataDir}
|
||||
chown -R wwwrun:wwwrun ${config.dataDir}
|
||||
|
@ -566,7 +582,11 @@ rec {
|
|||
${pkgs.sudo}/bin/sudo -u postgres ${pkgs.postgresql}/bin/psql -h "/tmp" -U postgres -d ${config.dbName} -Atw -c "$QUERY" || true
|
||||
fi
|
||||
|
||||
${php}/bin/php ${pkgs.owncloud}/occ upgrade || true
|
||||
if [ -e ${config.package}/config/ca-bundle.crt ]; then
|
||||
cp -f ${config.package}/config/ca-bundle.crt ${config.dataDir}/config/
|
||||
fi
|
||||
|
||||
${php}/bin/php ${config.package}/occ upgrade >> ${config.dataDir}/upgrade.log || true
|
||||
|
||||
chown wwwrun:wwwrun ${config.dataDir}/owncloud.log || true
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ with lib;
|
|||
|
||||
let
|
||||
|
||||
version = "4.3";
|
||||
version = "4.3.1";
|
||||
fullversion = "${version}";
|
||||
|
||||
# Our bare-bones wp-config.php file using the above settings
|
||||
|
@ -74,7 +74,7 @@ let
|
|||
owner = "WordPress";
|
||||
repo = "WordPress";
|
||||
rev = "${fullversion}";
|
||||
sha256 = "0sz5jjhjpwqis8336gyq9a77cr4sf8zahd1y4pzmpvpzn9cn503y";
|
||||
sha256 = "1rk10vcv4z9p04hfzc0wkbilrgx7m9ssyr6c3w6vw3vl1bcgqxza";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
|
|
|
@ -108,16 +108,26 @@ in
|
|||
kdeApps.okular
|
||||
kdeApps.print-manager
|
||||
|
||||
# Oxygen icons moved to KDE Frameworks 5.16 and later.
|
||||
(kdeApps.oxygen-icons or kf5.oxygen-icons5)
|
||||
pkgs.hicolor_icon_theme
|
||||
|
||||
plasma5.kde-gtk-config
|
||||
pkgs.orion # GTK theme, nearly identical to Breeze
|
||||
]
|
||||
|
||||
# Plasma 5.5 and later has a Breeze GTK theme.
|
||||
# If it is not available, Orion is very similar to Breeze.
|
||||
++ lib.optional (!(lib.hasAttr "breeze-gtk" plasma5)) pkgs.orion
|
||||
|
||||
# Install Breeze icons if available
|
||||
++ lib.optional (lib.hasAttr "breeze-icons" kf5) kf5.breeze-icons
|
||||
|
||||
# Optional hardware support features
|
||||
++ lib.optional config.hardware.bluetooth.enable plasma5.bluedevil
|
||||
++ lib.optional config.networking.networkmanager.enable plasma5.plasma-nm
|
||||
++ lib.optional config.hardware.pulseaudio.enable plasma5.plasma-pa
|
||||
++ lib.optional config.powerManagement.enable plasma5.powerdevil
|
||||
|
||||
++ lib.optionals cfg.phonon.gstreamer.enable
|
||||
[
|
||||
pkgs.phonon_backend_gstreamer
|
||||
|
@ -135,6 +145,7 @@ in
|
|||
pkgs.gst_all_1.gst-plugins-bad
|
||||
pkgs.gst_all_1.gst-libav # for mp3 playback
|
||||
]
|
||||
|
||||
++ lib.optionals cfg.phonon.vlc.enable
|
||||
[
|
||||
pkgs.phonon_qt5_backend_vlc
|
||||
|
@ -166,6 +177,14 @@ in
|
|||
# Extra UDEV rules used by Solid
|
||||
services.udev.packages = [ pkgs.media-player-info ];
|
||||
|
||||
services.xserver.displayManager.sddm = {
|
||||
theme = "breeze";
|
||||
themes = [
|
||||
plasma5.plasma-workspace
|
||||
(kdeApps.oxygen-icons or kf5.oxygen-icons5)
|
||||
];
|
||||
};
|
||||
|
||||
security.pam.services.kde = { allowNullPassword = true; };
|
||||
|
||||
};
|
||||
|
|
|
@ -0,0 +1,121 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
dmcfg = config.services.xserver.displayManager;
|
||||
ldmcfg = dmcfg.lightdm;
|
||||
cfg = ldmcfg.greeters.gtk;
|
||||
|
||||
inherit (pkgs) stdenv lightdm writeScript writeText;
|
||||
|
||||
theme = cfg.theme.package;
|
||||
icons = cfg.iconTheme.package;
|
||||
|
||||
# The default greeter provided with this expression is the GTK greeter.
|
||||
# Again, we need a few things in the environment for the greeter to run with
|
||||
# fonts/icons.
|
||||
wrappedGtkGreeter = stdenv.mkDerivation {
|
||||
name = "lightdm-gtk-greeter";
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
|
||||
buildCommand = ''
|
||||
# This wrapper ensures that we actually get themes
|
||||
makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \
|
||||
$out/greeter \
|
||||
--prefix PATH : "${pkgs.glibc.bin}/bin" \
|
||||
--set GDK_PIXBUF_MODULE_FILE "${pkgs.gdk_pixbuf.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \
|
||||
--set GTK_PATH "${theme}:${pkgs.gtk3.out}" \
|
||||
--set GTK_EXE_PREFIX "${theme}" \
|
||||
--set GTK_DATA_PREFIX "${theme}" \
|
||||
--set XDG_DATA_DIRS "${theme}/share:${icons}/share" \
|
||||
--set XDG_CONFIG_HOME "${theme}/share"
|
||||
|
||||
cat - > $out/lightdm-gtk-greeter.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Name=LightDM Greeter
|
||||
Comment=This runs the LightDM Greeter
|
||||
Exec=$out/greeter
|
||||
Type=Application
|
||||
EOF
|
||||
'';
|
||||
};
|
||||
|
||||
gtkGreeterConf = writeText "lightdm-gtk-greeter.conf"
|
||||
''
|
||||
[greeter]
|
||||
theme-name = ${cfg.theme.name}
|
||||
icon-theme-name = ${cfg.iconTheme.name}
|
||||
background = ${ldmcfg.background}
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
||||
services.xserver.displayManager.lightdm.greeters.gtk = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable lightdm-gtk-greeter as the lightdm greeter.
|
||||
'';
|
||||
};
|
||||
|
||||
theme = {
|
||||
|
||||
package = mkOption {
|
||||
type = types.path;
|
||||
default = pkgs.gnome3.gnome_themes_standard;
|
||||
description = ''
|
||||
The package path that contains the theme given in the name option.
|
||||
'';
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "Adwaita";
|
||||
description = ''
|
||||
Name of the theme to use for the lightdm-gtk-greeter.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
|
||||
package = mkOption {
|
||||
type = types.path;
|
||||
default = pkgs.gnome3.defaultIconTheme;
|
||||
description = ''
|
||||
The package path that contains the icon theme given in the name option.
|
||||
'';
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "Adwaita";
|
||||
description = ''
|
||||
Name of the icon theme to use for the lightdm-gtk-greeter.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf (ldmcfg.enable && cfg.enable) {
|
||||
|
||||
services.xserver.displayManager.lightdm.greeter = mkDefault {
|
||||
package = wrappedGtkGreeter;
|
||||
name = "lightdm-gtk-greeter";
|
||||
};
|
||||
|
||||
environment.etc."lightdm/lightdm-gtk-greeter.conf".source = gtkGreeterConf;
|
||||
|
||||
};
|
||||
}
|
|
@ -18,38 +18,6 @@ let
|
|||
exec ${dmcfg.xserverBin} ${dmcfg.xserverArgs}
|
||||
'';
|
||||
|
||||
theme = pkgs.gnome3.gnome_themes_standard;
|
||||
icons = pkgs.gnome3.defaultIconTheme;
|
||||
|
||||
# The default greeter provided with this expression is the GTK greeter.
|
||||
# Again, we need a few things in the environment for the greeter to run with
|
||||
# fonts/icons.
|
||||
wrappedGtkGreeter = stdenv.mkDerivation {
|
||||
name = "lightdm-gtk-greeter";
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
|
||||
buildCommand = ''
|
||||
# This wrapper ensures that we actually get themes
|
||||
makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \
|
||||
$out/greeter \
|
||||
--prefix PATH : "${pkgs.glibc.bin}/bin" \
|
||||
--set GDK_PIXBUF_MODULE_FILE "${pkgs.gdk_pixbuf.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \
|
||||
--set GTK_PATH "${theme}:${pkgs.gtk3.out}" \
|
||||
--set GTK_EXE_PREFIX "${theme}" \
|
||||
--set GTK_DATA_PREFIX "${theme}" \
|
||||
--set XDG_DATA_DIRS "${theme}/share:${icons}/share" \
|
||||
--set XDG_CONFIG_HOME "${theme}/share"
|
||||
|
||||
cat - > $out/lightdm-gtk-greeter.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Name=LightDM Greeter
|
||||
Comment=This runs the LightDM Greeter
|
||||
Exec=$out/greeter
|
||||
Type=Application
|
||||
EOF
|
||||
'';
|
||||
};
|
||||
|
||||
usersConf = writeText "users.conf"
|
||||
''
|
||||
[UserList]
|
||||
|
@ -72,34 +40,42 @@ let
|
|||
${cfg.extraSeatDefaults}
|
||||
'';
|
||||
|
||||
gtkGreeterConf = writeText "lightdm-gtk-greeter.conf"
|
||||
''
|
||||
[greeter]
|
||||
theme-name = Adwaita
|
||||
icon-theme-name = Adwaita
|
||||
background = ${cfg.background}
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
# Note: the order in which lightdm greeter modules are imported
|
||||
# here determines the default: later modules (if enable) are
|
||||
# preferred.
|
||||
imports = [
|
||||
./lightdm-greeters/gtk.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
|
||||
services.xserver.displayManager.lightdm = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable lightdm as the display manager.
|
||||
'';
|
||||
};
|
||||
|
||||
greeter = mkOption {
|
||||
greeter = {
|
||||
package = mkOption {
|
||||
type = types.path;
|
||||
description = ''
|
||||
The LightDM greeter to login via. The package should be a directory
|
||||
containing a .desktop file matching the name in the 'name' option.
|
||||
'';
|
||||
default = {
|
||||
name = "lightdm-gtk-greeter";
|
||||
package = wrappedGtkGreeter;
|
||||
|
||||
};
|
||||
name = mkOption {
|
||||
type = types.string;
|
||||
description = ''
|
||||
The name of a .desktop file in the directory specified
|
||||
in the 'package' option.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -135,7 +111,6 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
environment.etc."lightdm/lightdm-gtk-greeter.conf".source = gtkGreeterConf;
|
||||
environment.etc."lightdm/lightdm.conf".source = lightdmConf;
|
||||
environment.etc."lightdm/users.conf".source = usersConf;
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@ let
|
|||
cfg = dmcfg.sddm;
|
||||
xEnv = config.systemd.services."display-manager".environment;
|
||||
|
||||
sddm = pkgs.sddm.override { inherit (cfg) themes; };
|
||||
|
||||
xserverWrapper = pkgs.writeScript "xserver-wrapper" ''
|
||||
#!/bin/sh
|
||||
${concatMapStrings (n: "export ${n}=\"${getAttr n xEnv}\"\n") (attrNames xEnv)}
|
||||
|
@ -22,6 +24,8 @@ let
|
|||
|
||||
[Theme]
|
||||
Current=${cfg.theme}
|
||||
ThemeDir=${sddm}/share/sddm/themes
|
||||
FacesDir=${sddm}/share/sddm/faces
|
||||
|
||||
[Users]
|
||||
MaximumUid=${toString config.ids.uids.nixbld}
|
||||
|
@ -86,6 +90,14 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
themes = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [];
|
||||
description = ''
|
||||
Extra packages providing themes.
|
||||
'';
|
||||
};
|
||||
|
||||
autoLogin = mkOption {
|
||||
default = {};
|
||||
description = ''
|
||||
|
@ -146,8 +158,7 @@ in
|
|||
services.xserver.displayManager.job = {
|
||||
logsXsession = true;
|
||||
|
||||
#execCmd = "${pkgs.sddm}/bin/sddm";
|
||||
execCmd = "exec ${pkgs.sddm}/bin/sddm";
|
||||
execCmd = "exec ${sddm}/bin/sddm";
|
||||
};
|
||||
|
||||
security.pam.services = {
|
||||
|
|
|
@ -8,10 +8,7 @@ in
|
|||
{
|
||||
###### interface
|
||||
options = {
|
||||
services.xserver.windowManager.afterstep.enable = mkOption {
|
||||
default = false;
|
||||
description = "Enable the Afterstep window manager.";
|
||||
};
|
||||
services.xserver.windowManager.afterstep.enable = mkEnableOption "afterstep";
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
|
|
@ -8,12 +8,7 @@ in
|
|||
|
||||
{
|
||||
options = {
|
||||
services.xserver.windowManager.bspwm.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable the bspwm window manager.";
|
||||
};
|
||||
services.xserver.windowManager.bspwm.enable = mkEnableOption "bspwm";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -8,14 +8,7 @@ in
|
|||
|
||||
{
|
||||
options = {
|
||||
services.xserver.windowManager.clfswm = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable the clfswm tiling window manager.";
|
||||
};
|
||||
};
|
||||
services.xserver.windowManager.clfswm.enable = mkEnableOption "clfswm";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -15,10 +15,7 @@ in
|
|||
|
||||
services.xserver.windowManager.compiz = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Enable the Compiz window manager.";
|
||||
};
|
||||
enable = mkEnableOption "compiz";
|
||||
|
||||
renderingFlag = mkOption {
|
||||
default = "";
|
||||
|
|
|
@ -12,6 +12,7 @@ in
|
|||
./bspwm.nix
|
||||
./clfswm.nix
|
||||
./compiz.nix
|
||||
./dwm.nix
|
||||
./fluxbox.nix
|
||||
./herbstluftwm.nix
|
||||
./i3.nix
|
||||
|
|
37
nixos/modules/services/x11/window-managers/dwm.nix
Normal file
37
nixos/modules/services/x11/window-managers/dwm.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.xserver.windowManager.dwm;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
services.xserver.windowManager.dwm.enable = mkEnableOption "dwm";
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.xserver.windowManager.session = singleton
|
||||
{ name = "dwm";
|
||||
start =
|
||||
''
|
||||
${pkgs.dwm}/bin/dwm &
|
||||
waitPID=$!
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.dwm ];
|
||||
|
||||
};
|
||||
|
||||
}
|
|
@ -8,10 +8,7 @@ in
|
|||
{
|
||||
###### interface
|
||||
options = {
|
||||
services.xserver.windowManager.fluxbox.enable = mkOption {
|
||||
default = false;
|
||||
description = "Enable the Fluxbox window manager.";
|
||||
};
|
||||
services.xserver.windowManager.fluxbox.enable = mkEnableOption "fluxbox";
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
|
|
@ -8,12 +8,7 @@ in
|
|||
|
||||
{
|
||||
options = {
|
||||
services.xserver.windowManager.herbstluftwm.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable the herbstluftwm window manager.";
|
||||
};
|
||||
services.xserver.windowManager.herbstluftwm.enable = mkEnableOption "herbstluftwm";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -9,11 +9,7 @@ in
|
|||
{
|
||||
options = {
|
||||
services.xserver.windowManager.i3 = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable the i3 tiling window manager.";
|
||||
};
|
||||
enable = mkEnableOption "i3";
|
||||
|
||||
configFile = mkOption {
|
||||
default = null;
|
||||
|
|
|
@ -8,7 +8,7 @@ in
|
|||
{
|
||||
###### interface
|
||||
options = {
|
||||
services.xserver.windowManager.icewm.enable = mkEnableOption "oroborus";
|
||||
services.xserver.windowManager.icewm.enable = mkEnableOption "icewm";
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
|
|
@ -12,13 +12,7 @@ in
|
|||
|
||||
{
|
||||
options = {
|
||||
|
||||
services.xserver.windowManager.metacity.enable = mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable the metacity window manager.";
|
||||
};
|
||||
|
||||
services.xserver.windowManager.metacity.enable = mkEnableOption "metacity";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -8,13 +8,7 @@ in
|
|||
|
||||
{
|
||||
options = {
|
||||
services.xserver.windowManager.notion = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable the notion tiling window manager.";
|
||||
};
|
||||
};
|
||||
services.xserver.windowManager.notion.enable = mkEnableOption "notion";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{lib, pkgs, config, ...}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
inherit (lib) mkOption mkIf;
|
||||
cfg = config.services.xserver.windowManager.openbox;
|
||||
|
@ -7,13 +8,7 @@ in
|
|||
|
||||
{
|
||||
options = {
|
||||
services.xserver.windowManager.openbox = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable the Openbox window manager.";
|
||||
};
|
||||
};
|
||||
services.xserver.windowManager.openbox.enable = mkEnableOption "oroborus";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -8,10 +8,7 @@ in
|
|||
{
|
||||
###### interface
|
||||
options = {
|
||||
services.xserver.windowManager.ratpoison.enable = mkOption {
|
||||
default = false;
|
||||
description = "Enable the Ratpoison window manager.";
|
||||
};
|
||||
services.xserver.windowManager.ratpoison.enable = mkEnableOption "ratpoison";
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
|
|
@ -8,10 +8,7 @@ in
|
|||
{
|
||||
###### interface
|
||||
options = {
|
||||
services.xserver.windowManager.sawfish.enable = mkOption {
|
||||
default = false;
|
||||
description = "Enable the Sawfish window manager.";
|
||||
};
|
||||
services.xserver.windowManager.sawfish.enable = mkEnableOption "sawfish";
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
|
|
@ -9,13 +9,7 @@ in
|
|||
|
||||
{
|
||||
options = {
|
||||
services.xserver.windowManager.spectrwm = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable the spectrwm window manager.";
|
||||
};
|
||||
};
|
||||
services.xserver.windowManager.spectrwm.enable = mkEnableOption "spectrwm";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -8,14 +8,7 @@ in
|
|||
|
||||
{
|
||||
options = {
|
||||
services.xserver.windowManager.stumpwm = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable the stumpwm tiling window manager.";
|
||||
};
|
||||
};
|
||||
services.xserver.windowManager.stumpwm.enable = mkEnableOption "stumpwm";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -13,12 +13,7 @@ in
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.xserver.windowManager.twm.enable = mkOption {
|
||||
default = false;
|
||||
description = "Enable the twm window manager.";
|
||||
};
|
||||
|
||||
services.xserver.windowManager.twm.enable = mkEnableOption "twm";
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -8,10 +8,7 @@ in
|
|||
{
|
||||
###### interface
|
||||
options = {
|
||||
services.xserver.windowManager.windowmaker.enable = mkOption {
|
||||
default = false;
|
||||
description = "Enable the Windowmaker window manager.";
|
||||
};
|
||||
services.xserver.windowManager.windowmaker.enable = mkEnableOption "windowmaker";
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ config, lib, pkgs, options, modulesPath }:
|
||||
{ config, lib, pkgs, options, modulesPath, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
inherit (lib) mkOption mkIf singleton;
|
||||
cfg = config.services.xserver.windowManager.wmii;
|
||||
|
@ -7,11 +8,7 @@ let
|
|||
in
|
||||
{
|
||||
options = {
|
||||
services.xserver.windowManager.wmii.enable = mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable the wmii window manager.";
|
||||
};
|
||||
services.xserver.windowManager.wmii.enable = mkEnableOption "wmii";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{pkgs, lib, config, ...}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
inherit (lib) mkOption mkIf optionals literalExample;
|
||||
cfg = config.services.xserver.windowManager.xmonad;
|
||||
|
@ -13,12 +14,7 @@ in
|
|||
{
|
||||
options = {
|
||||
services.xserver.windowManager.xmonad = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable the xmonad window manager.";
|
||||
};
|
||||
|
||||
enable = mkEnableOption "xmonad";
|
||||
haskellPackages = mkOption {
|
||||
default = pkgs.haskellPackages;
|
||||
defaultText = "pkgs.haskellPackages";
|
||||
|
|
|
@ -470,7 +470,7 @@ in
|
|||
] ++ flip concatMap cfg.mirroredBoots (args: [
|
||||
{
|
||||
assertion = args.devices != [ ];
|
||||
message = "A boot path cannot have an empty devices string in ${arg.path}";
|
||||
message = "A boot path cannot have an empty devices string in ${args.path}";
|
||||
}
|
||||
{
|
||||
assertion = hasPrefix "/" args.path;
|
||||
|
|
|
@ -148,6 +148,12 @@ let
|
|||
|
||||
# Misc.
|
||||
"systemd-sysctl.service"
|
||||
"dbus-org.freedesktop.timedate1.service"
|
||||
"dbus-org.freedesktop.locale1.service"
|
||||
"dbus-org.freedesktop.hostname1.service"
|
||||
"systemd-timedated.service"
|
||||
"systemd-localed.service"
|
||||
"systemd-hostnamed.service"
|
||||
]
|
||||
|
||||
++ cfg.additionalUpstreamSystemUnits;
|
||||
|
|
|
@ -56,6 +56,8 @@ in
|
|||
# it has a restart trigger.
|
||||
systemd.services."systemd-vconsole-setup" =
|
||||
{ wantedBy = [ "multi-user.target" ];
|
||||
before = [ "display-manager.service" ];
|
||||
after = [ "systemd-udev-settle.service" ];
|
||||
restartTriggers = [ vconsoleConf ];
|
||||
};
|
||||
|
||||
|
|
170
nixos/modules/virtualisation/azure-agent.nix
Normal file
170
nixos/modules/virtualisation/azure-agent.nix
Normal file
|
@ -0,0 +1,170 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.virtualisation.azure.agent;
|
||||
|
||||
waagent = with pkgs; stdenv.mkDerivation rec {
|
||||
name = "waagent-2.0";
|
||||
src = pkgs.fetchgit {
|
||||
url = https://github.com/Phreedom/WALinuxAgent.git;
|
||||
rev = "9dba81c7b1239c7971ec96e405e403c7cd224e6b";
|
||||
sha256 = "0khxk3ns3z37v26f2qj6m3m698a0vqpc9bxg5p7fyr3xza5gzwhs";
|
||||
};
|
||||
buildInputs = [ makeWrapper python pythonPackages.wrapPython ];
|
||||
runtimeDeps = [ findutils gnugrep gawk coreutils openssl openssh
|
||||
nettools # for hostname
|
||||
procps # for pidof
|
||||
shadow # for useradd, usermod
|
||||
utillinux # for (u)mount, fdisk, sfdisk, mkswap
|
||||
parted
|
||||
];
|
||||
pythonPath = [ pythonPackages.pyasn1 ];
|
||||
|
||||
configurePhase = false;
|
||||
buildPhase = false;
|
||||
|
||||
installPhase = ''
|
||||
substituteInPlace config/99-azure-product-uuid.rules \
|
||||
--replace /bin/chmod "${coreutils}/bin/chmod"
|
||||
mkdir -p $out/lib/udev/rules.d
|
||||
cp config/*.rules $out/lib/udev/rules.d
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp waagent $out/bin/
|
||||
chmod +x $out/bin/waagent
|
||||
|
||||
wrapProgram "$out/bin/waagent" \
|
||||
--prefix PYTHONPATH : $PYTHONPATH \
|
||||
--prefix PATH : "${makeSearchPath "bin" runtimeDeps}"
|
||||
'';
|
||||
};
|
||||
|
||||
provisionedHook = pkgs.writeScript "provisioned-hook" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
${config.systemd.package}/bin/systemctl start provisioned.target
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options.virtualisation.azure.agent.enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable the Windows Azure Linux Agent.";
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [ {
|
||||
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
|
||||
message = "Azure not currently supported on ${pkgs.stdenv.system}";
|
||||
} {
|
||||
assertion = config.networking.networkmanager.enable == false;
|
||||
message = "Windows Azure Linux Agent is not compatible with NetworkManager";
|
||||
} ];
|
||||
|
||||
boot.initrd.kernelModules = [ "ata_piix" ];
|
||||
networking.firewall.allowedUDPPorts = [ 68 ];
|
||||
|
||||
|
||||
environment.etc."waagent.conf".text = ''
|
||||
#
|
||||
# Windows Azure Linux Agent Configuration
|
||||
#
|
||||
|
||||
Role.StateConsumer=${provisionedHook}
|
||||
|
||||
# Enable instance creation
|
||||
Provisioning.Enabled=y
|
||||
|
||||
# Password authentication for root account will be unavailable.
|
||||
Provisioning.DeleteRootPassword=n
|
||||
|
||||
# Generate fresh host key pair.
|
||||
Provisioning.RegenerateSshHostKeyPair=y
|
||||
|
||||
# Supported values are "rsa", "dsa" and "ecdsa".
|
||||
Provisioning.SshHostKeyPairType=ed25519
|
||||
|
||||
# Monitor host name changes and publish changes via DHCP requests.
|
||||
Provisioning.MonitorHostName=y
|
||||
|
||||
# Decode CustomData from Base64.
|
||||
Provisioning.DecodeCustomData=n
|
||||
|
||||
# Execute CustomData after provisioning.
|
||||
Provisioning.ExecuteCustomData=n
|
||||
|
||||
# Format if unformatted. If 'n', resource disk will not be mounted.
|
||||
ResourceDisk.Format=y
|
||||
|
||||
# File system on the resource disk
|
||||
# Typically ext3 or ext4. FreeBSD images should use 'ufs2' here.
|
||||
ResourceDisk.Filesystem=ext4
|
||||
|
||||
# Mount point for the resource disk
|
||||
ResourceDisk.MountPoint=/mnt/resource
|
||||
|
||||
# Respond to load balancer probes if requested by Windows Azure.
|
||||
LBProbeResponder=y
|
||||
|
||||
# Enable logging to serial console (y|n)
|
||||
# When stdout is not enough...
|
||||
# 'y' if not set
|
||||
Logs.Console=y
|
||||
|
||||
# Enable verbose logging (y|n)
|
||||
Logs.Verbose=n
|
||||
|
||||
# Root device timeout in seconds.
|
||||
OS.RootDeviceScsiTimeout=300
|
||||
'';
|
||||
|
||||
services.udev.packages = [ waagent ];
|
||||
|
||||
networking.dhcpcd.persistent = true;
|
||||
|
||||
services.logrotate = {
|
||||
enable = true;
|
||||
config = ''
|
||||
/var/log/waagent.log {
|
||||
compress
|
||||
monthly
|
||||
rotate 6
|
||||
notifempty
|
||||
missingok
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.targets.provisioned = {
|
||||
description = "Services Requiring Azure VM provisioning to have finished";
|
||||
wantedBy = [ "sshd.service" ];
|
||||
before = [ "sshd.service" ];
|
||||
};
|
||||
|
||||
|
||||
systemd.services.waagent = {
|
||||
wantedBy = [ "sshd.service" ];
|
||||
before = [ "sshd.service" ];
|
||||
after = [ "ip-up.target" ];
|
||||
wants = [ "ip-up.target" ];
|
||||
|
||||
path = [ pkgs.e2fsprogs ];
|
||||
description = "Windows Azure Agent Service";
|
||||
unitConfig.ConditionPathExists = "/etc/waagent.conf";
|
||||
serviceConfig = {
|
||||
ExecStart = "${waagent}/bin/waagent -daemon";
|
||||
Type = "simple";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
|
@ -4,6 +4,9 @@ with lib;
|
|||
{
|
||||
imports = [ ../profiles/headless.nix ];
|
||||
|
||||
require = [ ./azure-agent.nix ];
|
||||
virtualisation.azure.agent.enable = true;
|
||||
|
||||
boot.kernelParams = [ "console=ttyS0" "earlyprintk=ttyS0" "rootdelay=300" "panic=1" "boot.panic_on_fail" ];
|
||||
boot.initrd.kernelModules = [ "hv_vmbus" "hv_netvsc" "hv_utils" "hv_storvsc" ];
|
||||
|
||||
|
|
|
@ -98,8 +98,8 @@ in
|
|||
systemd.services.fetch-ssh-keys =
|
||||
{ description = "Fetch host keys and authorized_keys for root user";
|
||||
|
||||
wantedBy = [ "sshd.service" ];
|
||||
before = [ "sshd.service" ];
|
||||
wantedBy = [ "sshd.service" "waagent.service" ];
|
||||
before = [ "sshd.service" "waagent.service" ];
|
||||
after = [ "local-fs.target" ];
|
||||
|
||||
path = [ pkgs.coreutils ];
|
||||
|
@ -108,14 +108,14 @@ in
|
|||
eval "$(base64 --decode /metadata/CustomData.bin)"
|
||||
if ! [ -z "$ssh_host_ecdsa_key" ]; then
|
||||
echo "downloaded ssh_host_ecdsa_key"
|
||||
echo "$ssh_host_ecdsa_key" > /etc/ssh/ssh_host_ecdsa_key
|
||||
chmod 600 /etc/ssh/ssh_host_ecdsa_key
|
||||
echo "$ssh_host_ecdsa_key" > /etc/ssh/ssh_host_ed25519_key
|
||||
chmod 600 /etc/ssh/ssh_host_ed25519_key
|
||||
fi
|
||||
|
||||
if ! [ -z "$ssh_host_ecdsa_key_pub" ]; then
|
||||
echo "downloaded ssh_host_ecdsa_key_pub"
|
||||
echo "$ssh_host_ecdsa_key_pub" > /etc/ssh/ssh_host_ecdsa_key.pub
|
||||
chmod 644 /etc/ssh/ssh_host_ecdsa_key.pub
|
||||
echo "$ssh_host_ecdsa_key_pub" > /etc/ssh/ssh_host_ed25519_key.pub
|
||||
chmod 644 /etc/ssh/ssh_host_ed25519_key.pub
|
||||
fi
|
||||
|
||||
if ! [ -z "$ssh_root_auth_key" ]; then
|
||||
|
|
|
@ -21,7 +21,6 @@ with lib;
|
|||
imports = [
|
||||
../profiles/qemu-guest.nix
|
||||
../profiles/headless.nix
|
||||
./ec2-data.nix
|
||||
];
|
||||
|
||||
fileSystems."/".device = "/dev/disk/by-label/nixos";
|
||||
|
|
62
nixos/modules/virtualisation/rkt.nix
Normal file
62
nixos/modules/virtualisation/rkt.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.virtualisation.rkt;
|
||||
in
|
||||
{
|
||||
options.virtualisation.rkt = {
|
||||
enable = mkEnableOption "rkt metadata service";
|
||||
|
||||
gc = {
|
||||
automatic = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = "Automatically run the garbage collector at a specific time.";
|
||||
};
|
||||
|
||||
dates = mkOption {
|
||||
default = "03:15";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Specification (in the format described by
|
||||
<citerefentry><refentrytitle>systemd.time</refentrytitle>
|
||||
<manvolnum>5</manvolnum></citerefentry>) of the time at
|
||||
which the garbage collector will run.
|
||||
'';
|
||||
};
|
||||
|
||||
options = mkOption {
|
||||
default = "--grace-period=24h";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Options given to <filename>rkt gc</filename> when the
|
||||
garbage collector is run automatically.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.rkt ];
|
||||
|
||||
systemd.services.rkt = {
|
||||
description = "rkt metadata service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.rkt}/bin/rkt metadata-service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.rkt-gc = {
|
||||
description = "rkt garbage collection";
|
||||
startAt = optionalString cfg.gc.automatic cfg.gc.dates;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.rkt}/bin/rkt gc ${cfg.gc.options}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -83,6 +83,7 @@ in rec {
|
|||
(all nixos.tests.openssh)
|
||||
(all nixos.tests.printing)
|
||||
(all nixos.tests.proxy)
|
||||
(all nixos.tests.sddm)
|
||||
(all nixos.tests.simple)
|
||||
(all nixos.tests.udisks2)
|
||||
(all nixos.tests.xfce)
|
||||
|
|
|
@ -283,9 +283,11 @@ in rec {
|
|||
tests.peerflix = callTest tests/peerflix.nix {};
|
||||
tests.printing = callTest tests/printing.nix {};
|
||||
tests.proxy = callTest tests/proxy.nix {};
|
||||
tests.pumpio = callTest tests/pump.io.nix {};
|
||||
tests.quake3 = callTest tests/quake3.nix {};
|
||||
tests.runInMachine = callTest tests/run-in-machine.nix {};
|
||||
tests.sddm = callTest tests/sddm.nix {};
|
||||
tests.sddm-kde5 = callTest tests/sddm-kde5.nix {};
|
||||
tests.simple = callTest tests/simple.nix {};
|
||||
tests.tomcat = callTest tests/tomcat.nix {};
|
||||
tests.udisks2 = callTest tests/udisks2.nix {};
|
||||
|
|
|
@ -26,8 +26,8 @@ import ./make-test.nix (
|
|||
</head>
|
||||
<body onload="javascript:document.title='startup done'">
|
||||
<img src="file://${pkgs.fetchurl {
|
||||
url = "http://nixos.org/logo/nixos.svg";
|
||||
sha256 = "0p2iaqcx2cj24xqycfw1pi4i5461gnn0034lafpi99ph435x6z68";
|
||||
url = "http://nixos.org/logo/nixos-hex.svg";
|
||||
sha256 = "0wxpp65npdw2cg8m0cxc9qff1sb3b478cxpg1741d8951g948rg8";
|
||||
}}" />
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -25,7 +25,7 @@ in
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "cjdns";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ emery ];
|
||||
maintainers = [ ehmry ];
|
||||
};
|
||||
|
||||
nodes = rec
|
||||
|
|
|
@ -171,7 +171,7 @@ let
|
|||
];
|
||||
|
||||
virtualisation.diskSize = 8 * 1024;
|
||||
virtualisation.memorySize = 768;
|
||||
virtualisation.memorySize = 1024;
|
||||
virtualisation.writableStore = true;
|
||||
|
||||
# Use a small /dev/vdb as the root disk for the
|
||||
|
|
|
@ -80,6 +80,7 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||
};
|
||||
|
||||
# Test whether systemd-udevd automatically loads modules for our hardware.
|
||||
$machine->succeed("systemctl start systemd-udev-settle.service");
|
||||
subtest "udev-auto-load", sub {
|
||||
$machine->waitForUnit('systemd-udev-settle.service');
|
||||
$machine->succeed('lsmod | grep psmouse');
|
||||
|
|
94
nixos/tests/pump.io.nix
Normal file
94
nixos/tests/pump.io.nix
Normal file
|
@ -0,0 +1,94 @@
|
|||
# This test runs pump.io with mongodb, listing on port 443.
|
||||
|
||||
import ./make-test.nix ({ pkgs, ...} : let
|
||||
snakeOilKey = ''
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCqVemio78R41Tz
|
||||
MnR2zFD/wFT0iScOpFkuytNmuPf28FLaa9wSBWmuAGbEi7wBIfw8/bUqFBTQp2G1
|
||||
m1cmcCKxhmvvOkGs89eM131s1lW/bXU3zYso4e7724kHwU65jRlQs6cFWIlmW7V5
|
||||
3HQobP05dy+zPpujPPSlOQ0qYViR1s+RgZI8r0wS2ZDsliNtQwBLJSIvX6XVnXLo
|
||||
F/HmF4/ySJ9pL2AxQXCwZE8SfCzHpArs9COIqTaAuwB79kxWSFQJewmab74BXiM6
|
||||
9FMCtHON24Pl7OR9sRJHH8rMEzUumppmUeCNEzABjzQQ7svR18cmbzRWetp0tT9Y
|
||||
7rj6URHHAgMBAAECggEAGmbCldDnlrAzxJY3cwpsK5f2EwkHIr/aiuQpLCzTUlUh
|
||||
onVBYRGxtaSeSSyXcV2BKTrxz5nZOBYZkPqI4Y5T8kwxgpz2/QW2jUABUtNN6yPe
|
||||
HU4gma+bSTJX5PnTZ/M0z0tpQezdLx5b3I2M+48ZGMUegZvcp8qU6N8U6VK5VbFD
|
||||
DMTGL4b+Kc9HScRkCJjU3FfQcqf9Ml5w9jzHSeHImYEDrG0nX8N8EImRCBXbgxCl
|
||||
5XT1h6LFUGdr+N6n2w56+6l8OZZVmwj1NdF6NJybUQl4Y7b0niA+5czzjRt/YUjZ
|
||||
HW0fXmx3XlbYGWYdMdS+VaIW6pkUpm8kZkqjngqLwQKBgQDfhbFQmg9lsJQ8/dQZ
|
||||
WzRNsozHKWkQiZbW5sXBWygJbAB3Hc8gvQkuZe9TVyF99cznRj6ro6pGZjP0rTdY
|
||||
3ACTL+ygRArcIR6VsJCIr6nPvBLpOoNb8TQeKPmHC2gnSP9zaT/K2lldYISKNaYQ
|
||||
0seB2gvZhIgMgWtZtmb3jdgl9wKBgQDDFdknXgvFgB+y96//9wTu2WWuE5yQ5yB7
|
||||
utAcHNO9rx5X1tJqxymYh+iE8HUN25By+96SpNMQFI+0wNGVB00YWNBKtyepimWN
|
||||
EUCojTy+MIXIjrLcvviEePsI4TPWYf8XtZeiYtcczYrt/wPQUYaDb8LBRfpIfmhr
|
||||
rCGW93s+sQKBgEDOKTeeQyKPjJsWWL01RTfVsZ04s155FcOeyu0heb0plAT1Ho12
|
||||
YUgTg8zc8Tfs4QiYxCjNXdvlW+Dvq6FWv8/s0CUzNRbXf1+U/oKys4AoHi+CqH0q
|
||||
tJqd9KKjuwHQ10dl13n/znMVPbg4j7pG8lMCnfblxvAhQbeT+8yAUo/HAoGBAL3t
|
||||
/n4KXNGK3NHDvXEp0H6t3wWsiEi3DPQJO+Wy1x8caCFCv5c/kaqz3tfWt0+njSm1
|
||||
N8tzdx13tzVWaHV8Jz3l8dxcFtxEJnxB6L5wy0urOAS7kT3DG3b1xgmuH2a//7fY
|
||||
jumE60NahcER/2eIh7pdS7IZbAO6NfVmH0m4Zh/xAoGAbquh60sAfLC/1O2/4Xom
|
||||
PHS7z2+TNpwu4ou3nspxfigNQcTWzzzTVFLnaTPg+HKbLRXSWysjssmmj5u3lCyc
|
||||
S2M9xuhApa9CrN/udz4gEojRVsTla/gyLifIZ3CtTn2QEQiIJEMxM+59KAlkgUBo
|
||||
9BeZ03xTaEZfhVZ9bEN30Ak=
|
||||
-----END PRIVATE KEY-----
|
||||
'';
|
||||
|
||||
snakeOilCert = ''
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICvjCCAaagAwIBAgIJANhA6+PPhomZMA0GCSqGSIb3DQEBCwUAMBcxFTATBgNV
|
||||
BAMMDGIwOTM0YWMwYWZkNTAeFw0xNTExMzAxNzQ3MzVaFw0yNTExMjcxNzQ3MzVa
|
||||
MBcxFTATBgNVBAMMDGIwOTM0YWMwYWZkNTCCASIwDQYJKoZIhvcNAQEBBQADggEP
|
||||
ADCCAQoCggEBAKpV6aKjvxHjVPMydHbMUP/AVPSJJw6kWS7K02a49/bwUtpr3BIF
|
||||
aa4AZsSLvAEh/Dz9tSoUFNCnYbWbVyZwIrGGa+86Qazz14zXfWzWVb9tdTfNiyjh
|
||||
7vvbiQfBTrmNGVCzpwVYiWZbtXncdChs/Tl3L7M+m6M89KU5DSphWJHWz5GBkjyv
|
||||
TBLZkOyWI21DAEslIi9fpdWdcugX8eYXj/JIn2kvYDFBcLBkTxJ8LMekCuz0I4ip
|
||||
NoC7AHv2TFZIVAl7CZpvvgFeIzr0UwK0c43bg+Xs5H2xEkcfyswTNS6ammZR4I0T
|
||||
MAGPNBDuy9HXxyZvNFZ62nS1P1juuPpREccCAwEAAaMNMAswCQYDVR0TBAIwADAN
|
||||
BgkqhkiG9w0BAQsFAAOCAQEAd2w9rxi6qF9WV8L3rHnTE7uu0ldtdgJlCASx6ouj
|
||||
TleOnjfEg+kH8r8UbmRV5vsTDn1Qp5JGDYxfytRUQwLb1zTLde0xotx37E3LY8Wr
|
||||
sD6Al4t8sHywB/hc5dy29TgG0iyG8LKZrkwytLvDZ814W3OwpN2rpEz6pdizdHNn
|
||||
jsoDEngZiDHvLjIyE0cDkFXkeYMGXOnBUeOcu4nfu4C5eKs3nXGGAcNDbDRIuLoE
|
||||
BZExUBY+YSs6JBvh5tvRqLVW0Dz0akEcjb/jhwS2LmDip8Pdoxx4Q1jPKEu38zrr
|
||||
Vd5WD2HJhLb9u0UxVp9vfWIUDgydopV5ZmWCQ5YvNepb1w==
|
||||
-----END CERTIFICATE-----
|
||||
'';
|
||||
|
||||
makePump = { opts ? { } }:
|
||||
{
|
||||
enable = true;
|
||||
sslCert = pkgs.writeText "snakeoil.cert" snakeOilCert;
|
||||
sslKey = pkgs.writeText "snakeoil.pem" snakeOilKey;
|
||||
secret = "test";
|
||||
site = "test";
|
||||
} // opts;
|
||||
|
||||
in {
|
||||
name = "pumpio";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ rvl ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
one =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services = {
|
||||
pumpio = makePump { opts = {
|
||||
port = 443;
|
||||
}; };
|
||||
mongodb.enable = true;
|
||||
mongodb.extraConfig = ''
|
||||
nojournal = true
|
||||
'';
|
||||
};
|
||||
systemd.services.mongodb.unitConfig.Before = "pump.io.service";
|
||||
systemd.services.mongodb.unitConfig.RequiredBy = "pump.io.service";
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
|
||||
$one->waitForUnit("pump.io.service");
|
||||
$one->waitUntilSucceeds("curl -k https://localhost");
|
||||
'';
|
||||
})
|
29
nixos/tests/sddm-kde5.nix
Normal file
29
nixos/tests/sddm-kde5.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "sddm";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ ttuegel ];
|
||||
};
|
||||
|
||||
machine = { lib, ... }: {
|
||||
imports = [ ./common/user-account.nix ];
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.sddm = {
|
||||
enable = true;
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "alice";
|
||||
};
|
||||
};
|
||||
services.xserver.windowManager.default = "icewm";
|
||||
services.xserver.windowManager.icewm.enable = true;
|
||||
services.xserver.desktopManager.default = "none";
|
||||
services.xserver.desktopManager.kde5.enable = true;
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
|
||||
testScript = { nodes, ... }: ''
|
||||
startAll;
|
||||
$machine->waitForWindow("^IceWM ");
|
||||
'';
|
||||
})
|
|
@ -1,13 +1,13 @@
|
|||
{ stdenv, fetchurl, db4, boost, openssl, miniupnpc, unzip }:
|
||||
{ stdenv, fetchzip, db4, boost, openssl, miniupnpc, unzip }:
|
||||
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.3.80";
|
||||
name = "namecoind-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
src = fetchzip {
|
||||
url = "https://github.com/namecoin/namecoin/archive/nc${version}.tar.gz";
|
||||
sha256 = "1755mqxpg91wg9hf0ibpj59sdzfmhh73yrpi7hfi2ipabkwmlpiz";
|
||||
sha256 = "0mbkhj7y3f4vbqp5q3zk27bzqlk2kq71rcgivvj06w29fzd64mw6";
|
||||
};
|
||||
|
||||
buildInputs = [ db4 boost openssl unzip miniupnpc ];
|
||||
|
|
31
pkgs/applications/audio/aj-snapshot/default.nix
Normal file
31
pkgs/applications/audio/aj-snapshot/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ stdenv, fetchurl, alsaLib, jack2Full, minixml, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = packageName + "-" + version ;
|
||||
packageName = "aj-snapshot" ;
|
||||
version = "0.9.6" ;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/${packageName}/${name}.tar.bz2";
|
||||
sha256 = "12n2h3609fbvsnnwrwma4m55iyv6lcv1v3q5pznz2w6f12wf0c9z";
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
buildInputs = [ alsaLib minixml jack2Full pkgconfig ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Tool for storing/restoring JACK and/or ALSA connections to/from cml files";
|
||||
longDescription = ''
|
||||
Aj-snapshot is a small program that can be used to make snapshots of the connections made between JACK and/or ALSA clients.
|
||||
Because JACK can provide both audio and MIDI support to programs, aj-snapshot can store both types of connections for JACK.
|
||||
ALSA, on the other hand, only provides routing facilities for MIDI clients.
|
||||
You can also run aj-snapshot in daemon mode if you want to have your connections continually restored.
|
||||
'';
|
||||
|
||||
homepage = http://aj-snapshot.sourceforge.net/;
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.palo ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
|
@ -1,22 +1,120 @@
|
|||
{ stdenv, fetchgit, ncurses, pkgconfig, alsaLib, flac, libmad, ffmpeg, libvorbis, libmpc, mp4v2, libcue, libpulseaudio}:
|
||||
{ stdenv, fetchFromGitHub, ncurses, pkgconfig
|
||||
|
||||
, alsaSupport ? stdenv.isLinux, alsaLib ? null
|
||||
# simple fallback for everyone else
|
||||
, aoSupport ? !stdenv.isLinux, libao ? null
|
||||
, jackSupport ? false, libjack ? null
|
||||
, samplerateSupport ? jackSupport, libsamplerate ? null
|
||||
, ossSupport ? false, alsaOss ? null
|
||||
, pulseaudioSupport ? false, libpulseaudio ? null
|
||||
|
||||
# TODO: add these
|
||||
#, artsSupport
|
||||
#, roarSupport
|
||||
#, sndioSupport
|
||||
#, sunSupport
|
||||
#, waveoutSupport
|
||||
|
||||
, cddbSupport ? true, libcddb ? null
|
||||
, cdioSupport ? true, libcdio ? null
|
||||
, cueSupport ? true, libcue ? null
|
||||
, discidSupport ? true, libdiscid ? null
|
||||
, ffmpegSupport ? true, ffmpeg ? null
|
||||
, flacSupport ? true, flac ? null
|
||||
, madSupport ? true, libmad ? null
|
||||
, mikmodSupport ? true, libmikmod ? null
|
||||
, modplugSupport ? true, libmodplug ? null
|
||||
, mpcSupport ? true, libmpcdec ? null
|
||||
, tremorSupport ? false, tremor ? null
|
||||
, vorbisSupport ? true, libvorbis ? null
|
||||
, wavpackSupport ? true, wavpack ? null
|
||||
|
||||
# can't make these work, something is broken
|
||||
#, aacSupport ? true, faac ? null
|
||||
#, mp4Support ? true, mp4v2 ? null
|
||||
#, opusSupport ? true, opusfile ? null
|
||||
|
||||
# not in nixpkgs
|
||||
#, vtxSupport ? true, libayemu ? null
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
assert samplerateSupport -> jackSupport;
|
||||
|
||||
# vorbis and tremor are mutually exclusive
|
||||
assert vorbisSupport -> !tremorSupport;
|
||||
assert tremorSupport -> !vorbisSupport;
|
||||
|
||||
let
|
||||
|
||||
mkFlag = b: f: dep: if b
|
||||
then { flags = [ f ]; deps = [ dep ]; }
|
||||
else { flags = []; deps = []; };
|
||||
|
||||
opts = [
|
||||
# Audio output
|
||||
(mkFlag alsaSupport "CONFIG_ALSA=y" alsaLib)
|
||||
(mkFlag aoSupport "CONFIG_AO=y" libao)
|
||||
(mkFlag jackSupport "CONFIG_JACK=y" libjack)
|
||||
(mkFlag samplerateSupport "CONFIG_SAMPLERATE=y" libsamplerate)
|
||||
(mkFlag ossSupport "CONFIG_OSS=y" alsaOss)
|
||||
(mkFlag pulseaudioSupport "CONFIG_PULSE=y" libpulseaudio)
|
||||
|
||||
#(mkFlag artsSupport "CONFIG_ARTS=y")
|
||||
#(mkFlag roarSupport "CONFIG_ROAR=y")
|
||||
#(mkFlag sndioSupport "CONFIG_SNDIO=y")
|
||||
#(mkFlag sunSupport "CONFIG_SUN=y")
|
||||
#(mkFlag waveoutSupport "CONFIG_WAVEOUT=y")
|
||||
|
||||
# Input file formats
|
||||
(mkFlag cddbSupport "CONFIG_CDDB=y" libcddb)
|
||||
(mkFlag cdioSupport "CONFIG_CDIO=y" libcdio)
|
||||
(mkFlag cueSupport "CONFIG_CUE=y" libcue)
|
||||
(mkFlag discidSupport "CONFIG_DISCID=y" libdiscid)
|
||||
(mkFlag ffmpegSupport "CONFIG_FFMPEG=y" ffmpeg)
|
||||
(mkFlag flacSupport "CONFIG_FLAC=y" flac)
|
||||
(mkFlag madSupport "CONFIG_MAD=y" libmad)
|
||||
(mkFlag mikmodSupport "CONFIG_MIKMOD=y" libmikmod)
|
||||
(mkFlag modplugSupport "CONFIG_MODPLUG=y" libmodplug)
|
||||
(mkFlag mpcSupport "CONFIG_MPC=y" libmpcdec)
|
||||
(mkFlag tremorSupport "CONFIG_TREMOR=y" tremor)
|
||||
(mkFlag vorbisSupport "CONFIG_VORBIS=y" libvorbis)
|
||||
(mkFlag wavpackSupport "CONFIG_WAVPACK=y" wavpack)
|
||||
|
||||
#(mkFlag opusSupport "CONFIG_OPUS=y" opusfile)
|
||||
#(mkFlag mp4Support "CONFIG_MP4=y" mp4v2)
|
||||
#(mkFlag aacSupport "CONFIG_AAC=y" faac)
|
||||
|
||||
#(mkFlag vtxSupport "CONFIG_VTX=y" libayemu)
|
||||
];
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cmus-${version}";
|
||||
version = "2.6.0";
|
||||
version = "2.7.0";
|
||||
|
||||
src = fetchgit {
|
||||
url = https://github.com/cmus/cmus.git;
|
||||
rev = "46b71032da827d22d4fae5bf2afcc4c9afef568c";
|
||||
sha256 = "1hkqifll5ryf3ljp3w1dxz1p8m6rk34fpazc6vwavis6ga310hka";
|
||||
src = fetchFromGitHub {
|
||||
owner = "cmus";
|
||||
repo = "cmus";
|
||||
rev = "0306cc74c5073a85cf8619c61da5b94a3f863eaa";
|
||||
sha256 = "18w9mznb843nzkrcqvshfha51mlpdl92zlvb5wfc5dpgrbf37728";
|
||||
};
|
||||
|
||||
configurePhase = "./configure prefix=$out";
|
||||
patches = [ ./option-debugging.patch ];
|
||||
|
||||
buildInputs = [ ncurses pkgconfig alsaLib flac libmad ffmpeg libvorbis libmpc mp4v2 libcue libpulseaudio ];
|
||||
configurePhase = "./configure " + concatStringsSep " " ([
|
||||
"prefix=$out"
|
||||
"CONFIG_WAV=y"
|
||||
] ++ concatMap (a: a.flags) opts);
|
||||
|
||||
buildInputs = [ ncurses pkgconfig ] ++ concatMap (a: a.deps) opts;
|
||||
|
||||
meta = {
|
||||
description = "Small, fast and powerful console music player for Linux and *BSD";
|
||||
homepage = https://cmus.github.io/;
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
maintainers = [ stdenv.lib.maintainers.oxij ];
|
||||
};
|
||||
}
|
||||
|
|
42
pkgs/applications/audio/cmus/option-debugging.patch
Normal file
42
pkgs/applications/audio/cmus/option-debugging.patch
Normal file
|
@ -0,0 +1,42 @@
|
|||
Shows build and link errors in configure for ease of debugging which
|
||||
options require what.
|
||||
diff --git a/scripts/checks.sh b/scripts/checks.sh
|
||||
index 64cbbf3..fab4d9b 100644
|
||||
--- a/scripts/checks.sh
|
||||
+++ b/scripts/checks.sh
|
||||
@@ -425,7 +425,7 @@ try_compile()
|
||||
echo "$1" > $__src || exit 1
|
||||
shift
|
||||
__cmd="$CC -c $CFLAGS $@ $__src -o $__obj"
|
||||
- $CC -c $CFLAGS "$@" $__src -o $__obj 2>/dev/null
|
||||
+ $CC -c $CFLAGS "$@" $__src -o $__obj
|
||||
;;
|
||||
cxx)
|
||||
__src=`tmp_file prog.cc`
|
||||
@@ -433,7 +433,7 @@ try_compile()
|
||||
echo "$1" > $__src || exit 1
|
||||
shift
|
||||
__cmd="$CXX -c $CXXFLAGS $@ $__src -o $__obj"
|
||||
- $CXX -c $CXXFLAGS "$@" $__src -o $__obj 2>/dev/null
|
||||
+ $CXX -c $CXXFLAGS "$@" $__src -o $__obj
|
||||
;;
|
||||
esac
|
||||
return $?
|
||||
@@ -451,7 +451,7 @@ try_compile_link()
|
||||
echo "$1" > $__src || exit 1
|
||||
shift
|
||||
__cmd="$CC $__src -o $__exe $CFLAGS $LDFLAGS $@"
|
||||
- $CC $__src -o $__exe $CFLAGS $LDFLAGS "$@" 2>/dev/null
|
||||
+ $CC $__src -o $__exe $CFLAGS $LDFLAGS "$@"
|
||||
;;
|
||||
cxx)
|
||||
__src=`tmp_file prog.cc`
|
||||
@@ -459,7 +459,7 @@ try_compile_link()
|
||||
echo "$1" > $__src || exit 1
|
||||
shift
|
||||
__cmd="$CXX $__src -o $__exe $CXXFLAGS $CXXLDFLAGS $@"
|
||||
- $CXX $__src -o $__exe $CXXFLAGS $CXXLDFLAGS "$@" 2>/dev/null
|
||||
+ $CXX $__src -o $__exe $CXXFLAGS $CXXLDFLAGS "$@"
|
||||
;;
|
||||
esac
|
||||
return $?
|
|
@ -9,6 +9,7 @@
|
|||
, wavSupport ? true, libsndfile ? null
|
||||
, cdaSupport ? true, libcdio ? null, libcddb ? null
|
||||
, aacSupport ? true, faad2 ? null
|
||||
, midiSupport ? false, wildmidi ? null
|
||||
, wavpackSupport ? false, wavpack ? null
|
||||
, ffmpegSupport ? false, ffmpeg ? null
|
||||
# misc plugins
|
||||
|
@ -44,6 +45,7 @@ assert alsaSupport -> alsaLib != null;
|
|||
assert pulseSupport -> libpulseaudio != null;
|
||||
assert resamplerSupport -> libsamplerate != null;
|
||||
assert overloadSupport -> zlib != null;
|
||||
assert midiSupport -> wildmidi != null;
|
||||
assert wavpackSupport -> wavpack != null;
|
||||
assert remoteSupport -> curl != null;
|
||||
|
||||
|
@ -73,6 +75,7 @@ stdenv.mkDerivation rec {
|
|||
++ optional pulseSupport libpulseaudio
|
||||
++ optional resamplerSupport libsamplerate
|
||||
++ optional overloadSupport zlib
|
||||
++ optional midiSupport wildmidi
|
||||
++ optional wavpackSupport wavpack
|
||||
++ optional remoteSupport curl
|
||||
;
|
||||
|
|
|
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
|||
{ description = "Auditory binaural-beat generator";
|
||||
homepage = http://gnaural.sourceforge.net/;
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.emery ];
|
||||
maintainers = [ maintainers.ehmry ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ stdenv.mkDerivation {
|
|||
meta = with stdenv.lib;
|
||||
{ description = "Collection of audio level meters with GUI in LV2 plugin format";
|
||||
homepage = http://x42.github.io/meters.lv2/;
|
||||
maintainers = with maintainers; [ emery ];
|
||||
maintainers = with maintainers; [ ehmry ];
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
{ stdenv, fetchurl, python, pythonPackages, cdparanoia, cdrdao
|
||||
{ stdenv, fetchgit, python, pythonPackages, cdparanoia, cdrdao
|
||||
, pygobject, gst_python, gst_plugins_base, gst_plugins_good
|
||||
, setuptools, utillinux, makeWrapper, substituteAll }:
|
||||
, setuptools, utillinux, makeWrapper, substituteAll, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "morituri-${version}";
|
||||
version = "0.2.3";
|
||||
version = "0.2.3.20151109";
|
||||
namePrefix = "";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://thomas.apestaart.org/download/morituri/${name}.tar.bz2";
|
||||
sha256 = "1b30bs1y8azl04izsrl01gw9ys0lhzkn5afxi4p8qbiri2h4v210";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/thomasvs/morituri.git";
|
||||
fetchSubmodules = true;
|
||||
rev = "135b2f7bf27721177e3aeb1d26403f1b29116599";
|
||||
sha256 = "1ccxq1spny6xgd7nqwn13n9nqa00ay0nhflg3vbdkvbirh8fgxwq";
|
||||
};
|
||||
|
||||
pythonPath = [
|
||||
pygobject gst_python pythonPackages.musicbrainzngs
|
||||
pythonPackages.pycdio pythonPackages.pyxdg setuptools
|
||||
pythonPackages.CDDB
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
buildInputs = [
|
||||
python cdparanoia cdrdao utillinux makeWrapper
|
||||
gst_plugins_base gst_plugins_good
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
diff -Nurp morituri-0.2.3-orig/doc/Makefile.in morituri-0.2.3/doc/Makefile.in
|
||||
--- morituri-0.2.3-orig/doc/Makefile.in 2014-12-23 12:44:46.222410092 +0100
|
||||
+++ morituri-0.2.3/doc/Makefile.in 2014-12-23 12:46:49.619756940 +0100
|
||||
@@ -486,7 +486,7 @@ morituri.ics: $(top_srcdir)/morituri.doa
|
||||
-moap doap -f $(top_srcdir)/morituri.doap ical > morituri.ics
|
||||
diff --git a/doc/Makefile.am b/doc/Makefile.am
|
||||
index c115c2c..78c883e 100644
|
||||
--- a/doc/Makefile.am
|
||||
+++ b/doc/Makefile.am
|
||||
@@ -24,7 +24,7 @@ morituri.ics: $(top_srcdir)/morituri.doap
|
||||
man_MANS = rip.1
|
||||
|
||||
rip.1: $(top_srcdir)/morituri/extern/python-command/scripts/help2man $(top_srcdir)/morituri
|
||||
- PYTHONPATH=$(top_srcdir) $(PYTHON) $(top_srcdir)/morituri/extern/python-command/scripts/help2man morituri.rip.main.Rip rip > rip.1
|
||||
|
@ -10,9 +11,10 @@ diff -Nurp morituri-0.2.3-orig/doc/Makefile.in morituri-0.2.3/doc/Makefile.in
|
|||
|
||||
clean-local:
|
||||
@rm -rf reference
|
||||
diff -Nurp morituri-0.2.3-orig/morituri/common/program.py morituri-0.2.3/morituri/common/program.py
|
||||
--- morituri-0.2.3-orig/morituri/common/program.py 2014-12-23 12:44:46.218410048 +0100
|
||||
+++ morituri-0.2.3/morituri/common/program.py 2014-12-23 12:46:49.647757245 +0100
|
||||
diff --git a/morituri/common/program.py b/morituri/common/program.py
|
||||
index d340fdd..15cb751 100644
|
||||
--- a/morituri/common/program.py
|
||||
+++ b/morituri/common/program.py
|
||||
@@ -92,13 +92,13 @@ class Program(log.Loggable):
|
||||
"""
|
||||
Load the given device.
|
||||
|
@ -38,19 +40,12 @@ diff -Nurp morituri-0.2.3-orig/morituri/common/program.py morituri-0.2.3/moritur
|
|||
|
||||
def getFastToc(self, runner, toc_pickle, device):
|
||||
"""
|
||||
diff -Nurp morituri-0.2.3-orig/morituri/extern/python-command/scripts/help2man morituri-0.2.3/morituri/extern/python-command/scripts/help2man
|
||||
--- morituri-0.2.3-orig/morituri/extern/python-command/scripts/help2man 2014-12-23 12:44:46.206409916 +0100
|
||||
+++ morituri-0.2.3/morituri/extern/python-command/scripts/help2man 2014-12-23 12:46:49.631757074 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!@python@/bin/python
|
||||
|
||||
# -*- Mode: Python -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
diff -Nurp morituri-0.2.3-orig/morituri/program/cdparanoia.py morituri-0.2.3/morituri/program/cdparanoia.py
|
||||
--- morituri-0.2.3-orig/morituri/program/cdparanoia.py 2014-12-23 12:44:46.202409873 +0100
|
||||
+++ morituri-0.2.3/morituri/program/cdparanoia.py 2014-12-23 12:46:49.659757376 +0100
|
||||
@@ -278,7 +278,7 @@ class ReadTrackTask(log.Loggable, task.T
|
||||
Submodule morituri/extern/python-command contains modified content
|
||||
diff --git a/morituri/program/cdparanoia.py b/morituri/program/cdparanoia.py
|
||||
index 46176d5..fce14a5 100644
|
||||
--- a/morituri/program/cdparanoia.py
|
||||
+++ b/morituri/program/cdparanoia.py
|
||||
@@ -278,7 +278,7 @@ class ReadTrackTask(log.Loggable, task.Task):
|
||||
stopTrack, stopOffset)
|
||||
|
||||
bufsize = 1024
|
||||
|
@ -68,9 +63,10 @@ diff -Nurp morituri-0.2.3-orig/morituri/program/cdparanoia.py morituri-0.2.3/mor
|
|||
_VERSION_RE,
|
||||
"%(version)s %(release)s")
|
||||
|
||||
diff -Nurp morituri-0.2.3-orig/morituri/program/cdrdao.py morituri-0.2.3/morituri/program/cdrdao.py
|
||||
--- morituri-0.2.3-orig/morituri/program/cdrdao.py 2014-12-23 12:44:46.202409873 +0100
|
||||
+++ morituri-0.2.3/morituri/program/cdrdao.py 2014-12-23 12:46:49.667757463 +0100
|
||||
diff --git a/morituri/program/cdrdao.py b/morituri/program/cdrdao.py
|
||||
index c6fba64..c4d0306 100644
|
||||
--- a/morituri/program/cdrdao.py
|
||||
+++ b/morituri/program/cdrdao.py
|
||||
@@ -257,7 +257,7 @@ class CDRDAOTask(ctask.PopenTask):
|
||||
|
||||
def start(self, runner):
|
||||
|
|
|
@ -35,7 +35,7 @@ buildPythonPackage {
|
|||
meta = with stdenv.lib; {
|
||||
homepage = "http://musicbrainz.org/doc/MusicBrainz_Picard";
|
||||
description = "The official MusicBrainz tagger";
|
||||
maintainers = with maintainers; [ emery ];
|
||||
maintainers = with maintainers; [ ehmry ];
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
{ stdenv, fetchurl, alsaLib, boost, cairo, cmake, fftwSinglePrec, fltk
|
||||
, libjack2, libsndfile, lv2, mesa, minixml, pkgconfig, zlib, xorg
|
||||
, libjack2, libsndfile, readline, lv2, mesa, minixml, pkgconfig, zlib, xorg
|
||||
}:
|
||||
|
||||
assert stdenv ? glibc;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "yoshimi-${version}";
|
||||
version = "1.3.6";
|
||||
version = "1.3.7.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/yoshimi/${name}.tar.bz2";
|
||||
sha256 = "0c2y59m945rrspnwdxmixk92z9nfiayxdxh582gf15nj8bvkh1l6";
|
||||
sha256 = "13xc1x8jrr2rn26jx4dini692ww3771d5j5xf7f56ixqr7mmdhvz";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
alsaLib boost cairo fftwSinglePrec fltk libjack2 libsndfile lv2 mesa
|
||||
alsaLib boost cairo fftwSinglePrec fltk libjack2 libsndfile readline lv2 mesa
|
||||
minixml zlib xorg.libpthreadstubs
|
||||
];
|
||||
|
||||
|
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
preConfigure = "cd src";
|
||||
|
||||
cmakeFlags = [ "-DFLTK_MATH_LIBRARY=${stdenv.glibc.out}/lib/libm.so" ];
|
||||
cmakeFlags = [ "-DFLTK_MATH_LIBRARY=${stdenv.glibc.out}/lib/libm.so -DCMAKE_INSTALL_DATAROOTDIR=$out" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "high quality software synthesizer based on ZynAddSubFX";
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{ stdenv, fetchurl, alsaLib, cmake, libjack2, fftw, fltk13, libjpeg
|
||||
, minixml, pkgconfig, zlib
|
||||
, minixml, pkgconfig, zlib, liblo
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "zynaddsubfx-${version}";
|
||||
version = "2.4.4";
|
||||
version = "2.5.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/zynaddsubfx/zynaddsubfx-${version}.tar.xz";
|
||||
sha256 = "15byz08p5maf3v8l1zz11xan6s0qcfasjf1b81xc8rffh13x5f53";
|
||||
url = "mirror://sourceforge/zynaddsubfx/zynaddsubfx-${version}.tar.gz";
|
||||
sha256 = "11yrady7xwfrzszkk2fvq81ymv99mq474h60qnirk27khdygk24m";
|
||||
};
|
||||
|
||||
buildInputs = [ alsaLib libjack2 fftw fltk13 libjpeg minixml zlib ];
|
||||
buildInputs = [ alsaLib libjack2 fftw fltk13 libjpeg minixml zlib liblo ];
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -19,6 +19,6 @@ stdenv.mkDerivation rec {
|
|||
homepage = http://zynaddsubfx.sourceforge.net;
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.goibhniu ];
|
||||
maintainers = [ maintainers.goibhniu maintainers.palo ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
{ stdenv, fetchpatch, makeQtWrapper, fetchFromGitHub, cmake, pkgconfig, libxcb, libpthreadstubs
|
||||
, libXdmcp, libXau, qtbase, qtdeclarative, qttools, pam, systemd }:
|
||||
{ stdenv, makeQtWrapper, fetchFromGitHub
|
||||
, cmake, pkgconfig, libxcb, libpthreadstubs, lndir
|
||||
, libXdmcp, libXau, qtbase, qtdeclarative, qttools, pam, systemd
|
||||
, themes
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.13.0";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "sddm-${version}";
|
||||
|
||||
unwrapped = stdenv.mkDerivation rec {
|
||||
name = "sddm-unwrapped-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sddm";
|
||||
|
@ -19,9 +22,11 @@ stdenv.mkDerivation rec {
|
|||
./0002-fix-ConfigReader-QStringList-corruption.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake makeQtWrapper pkgconfig qttools ];
|
||||
nativeBuildInputs = [ cmake pkgconfig qttools ];
|
||||
|
||||
buildInputs = [ libxcb libpthreadstubs libXdmcp libXau qtbase qtdeclarative pam systemd ];
|
||||
buildInputs = [
|
||||
libxcb libpthreadstubs libXdmcp libXau qtbase qtdeclarative pam systemd
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCONFIG_FILE=/etc/sddm.conf"
|
||||
|
@ -38,17 +43,38 @@ stdenv.mkDerivation rec {
|
|||
export cmakeFlags="$cmakeFlags -DQT_IMPORTS_DIR=$out/lib/qt5/qml -DCMAKE_INSTALL_SYSCONFDIR=$out/etc -DSYSTEMD_SYSTEM_UNIT_DIR=$out/lib/systemd/system"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
wrapQtProgram $out/bin/sddm
|
||||
wrapQtProgram $out/bin/sddm-greeter
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "QML based X11 display manager";
|
||||
homepage = https://github.com/sddm/sddm;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
maintainers = with maintainers; [ abbradar ttuegel ];
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "sddm-${version}";
|
||||
phases = "installPhase";
|
||||
|
||||
nativeBuildInputs = [ lndir makeQtWrapper ];
|
||||
buildInputs = [ unwrapped ] ++ themes;
|
||||
inherit themes;
|
||||
inherit unwrapped;
|
||||
|
||||
installPhase = ''
|
||||
makeQtWrapper "$unwrapped/bin/sddm" "$out/bin/sddm"
|
||||
|
||||
mkdir -p "$out/share/sddm"
|
||||
for pkg in $unwrapped $themes; do
|
||||
local sddmDir="$pkg/share/sddm"
|
||||
if [[ -d "$sddmDir" ]]; then
|
||||
lndir -silent "$sddmDir" "$out/share/sddm"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
inherit (unwrapped) meta;
|
||||
}
|
||||
|
|
|
@ -106,16 +106,16 @@ rec {
|
|||
|
||||
anyedittools = buildEclipsePlugin rec {
|
||||
name = "anyedit-${version}";
|
||||
version = "2.5.0.201510241327";
|
||||
version = "2.6.0.201511291145";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "http://andrei.gmxhome.de/eclipse/features/AnyEditTools_${version}.jar";
|
||||
sha256 = "01qaxg1b4n7y7g1xdkx1bnmpwqydln270mk14l4pl35q3c88s5nc";
|
||||
sha256 = "1vllci75qcd28b6hn2jz29l6cabxx9ql5i6l9cwq9rxp49dhc96b";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "https://github.com/iloveeclipse/anyedittools/releases/download/2.5.0/de.loskutov.anyedit.AnyEditTools_${version}.jar";
|
||||
sha256 = "0m4qxkscl5xih8x1znbrih4jh28wky4l62spfif9zw0s7mgl117c";
|
||||
url = "https://github.com/iloveeclipse/anyedittools/releases/download/2.6.0/de.loskutov.anyedit.AnyEditTools_${version}.jar";
|
||||
sha256 = "0mgq0ylfa7srjf7azyx0kbahlsjf0sdpazqphzx4f0bfn1l328s4";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -317,11 +317,11 @@ rec {
|
|||
|
||||
scala = buildEclipseUpdateSite rec {
|
||||
name = "scala-${version}";
|
||||
version = "4.1.1.20150911";
|
||||
version = "4.1.1.20151201";
|
||||
|
||||
src = fetchzip {
|
||||
url = "http://download.scala-ide.org/sdk/lithium/e44/scala211/stable/update-site.zip";
|
||||
sha256 = "03g24sjivm7kzy64wwjs4ihf9vrb6703lb7bx3jafxzcwqm0pj1i";
|
||||
sha256 = "19iqaha9c5n5hkyn83xj8znkvshm4823d65zigbj97fz8gzrr0la";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -335,16 +335,16 @@ rec {
|
|||
|
||||
testng = buildEclipsePlugin rec {
|
||||
name = "testng-${version}";
|
||||
version = "6.9.10.201511281504";
|
||||
version = "6.9.10.201512020421";
|
||||
|
||||
srcFeature = fetchurl {
|
||||
url = "http://beust.com/eclipse/features/org.testng.eclipse_${version}.jar";
|
||||
sha256 = "1kjaifa1fc16yh82bzp5xa5pn3kgrpgc5jq55lyvgz29vjj6ss97";
|
||||
url = "http://beust.com/eclipse-old/eclipse_${version}/features/org.testng.eclipse_${version}.jar";
|
||||
sha256 = "17y0cb1xprldjav14iy2sinv7lcw4xnjs2fwz9gl41m9m1c0hajk";
|
||||
};
|
||||
|
||||
srcPlugin = fetchurl {
|
||||
url = "http://beust.com/eclipse/plugins/org.testng.eclipse_${version}.jar";
|
||||
sha256 = "1njz4ynjwnhjjbsszfgqyjn2ixxzjv8qvnc7dqz8jldrz3jrjf07";
|
||||
url = "http://beust.com/eclipse-old/eclipse_${version}/plugins/org.testng.eclipse_${version}.jar";
|
||||
sha256 = "1iwq0ifk9l56z11vhy5yscvl8l1xk6igkp103v9vwvcx6nlmkfgc";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ stdenv, fetchurl, ncurses, xlibsWrapper, libXaw, libXpm, Xaw3d
|
||||
, pkgconfig, gettext, libXft, dbus, libpng, libjpeg, libungif
|
||||
, libtiff, librsvg, texinfo, gconf, libxml2, imagemagick, gnutls
|
||||
, alsaLib, cairo, acl, gpm, AppKit
|
||||
, alsaLib, cairo, acl, gpm, AppKit, CoreWLAN, Kerberos, GSS, ImageIO
|
||||
, withX ? !stdenv.isDarwin
|
||||
, withGTK3 ? false, gtk3 ? null
|
||||
, withGTK2 ? true, gtk2
|
||||
|
@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
|
|||
++ stdenv.lib.optional (withX && withGTK3) gtk3
|
||||
++ stdenv.lib.optional (stdenv.isDarwin && withX) cairo;
|
||||
|
||||
propagatedBuildInputs = stdenv.lib.optional stdenv.isDarwin AppKit;
|
||||
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ AppKit GSS ImageIO ];
|
||||
|
||||
configureFlags =
|
||||
if stdenv.isDarwin
|
||||
|
|
1337
pkgs/applications/editors/emacs-modes/elpa-packages.json
Normal file
1337
pkgs/applications/editors/emacs-modes/elpa-packages.json
Normal file
File diff suppressed because it is too large
Load diff
42
pkgs/applications/editors/emacs-modes/elpa-packages.nix
Normal file
42
pkgs/applications/editors/emacs-modes/elpa-packages.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
pkgs: with pkgs;
|
||||
|
||||
let
|
||||
|
||||
inherit (stdenv.lib) makeScope mapAttrs;
|
||||
|
||||
json = builtins.readFile ./elpa-packages.json;
|
||||
manifest = builtins.fromJSON json;
|
||||
|
||||
mkPackage = self: name: recipe:
|
||||
let drv =
|
||||
{ elpaBuild, stdenv, fetchurl }:
|
||||
let fetch = { inherit fetchurl; }."${recipe.fetch.tag}"
|
||||
or (abort "emacs-${name}: unknown fetcher '${recipe.fetch.tag}'");
|
||||
args = builtins.removeAttrs recipe.fetch [ "tag" ];
|
||||
src = fetch args;
|
||||
in elpaBuild {
|
||||
pname = name;
|
||||
inherit (recipe) version;
|
||||
inherit src;
|
||||
deps =
|
||||
let lookupDep = d:
|
||||
self."${d}" or (abort "emacs-${name}: missing dependency ${d}");
|
||||
in map lookupDep recipe.deps;
|
||||
meta = {
|
||||
homepage = "http://elpa.gnu.org/packages/${name}.html";
|
||||
license = stdenv.lib.licenses.free;
|
||||
};
|
||||
};
|
||||
in self.callPackage drv {};
|
||||
|
||||
packages = self:
|
||||
let
|
||||
elpaPackages = mapAttrs (mkPackage self) manifest;
|
||||
|
||||
elpaBuild = import ../../../build-support/emacs/melpa.nix {
|
||||
inherit (pkgs) lib stdenv fetchurl texinfo;
|
||||
inherit (self) emacs;
|
||||
};
|
||||
in elpaPackages // { inherit elpaBuild elpaPackages; };
|
||||
|
||||
in makeScope pkgs.newScope packages
|
|
@ -297,13 +297,13 @@ in
|
|||
|
||||
phpstorm = buildPhpStorm rec {
|
||||
name = "phpstorm-${version}";
|
||||
version = "9.0";
|
||||
build = "PS-141.1912";
|
||||
version = "10.0.1";
|
||||
build = "PS-143.382";
|
||||
description = "Professional IDE for Web and PHP developers";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
|
||||
sha256 = "1n6p8xiv0nrs6yf0250mpga291msnrfamv573dva9f17cc3df2pp";
|
||||
sha256 = "12bqil8pxzmbv8a7pxn2529ph2x7szr3wvkvgxaisydm463kpdk8";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -311,7 +311,7 @@ in
|
|||
name = "webstorm-${version}";
|
||||
version = "10.0.4";
|
||||
build = "141.1550";
|
||||
description = "Professional IDE for Web and JavaScript devlopment";
|
||||
description = "Professional IDE for Web and JavaScript development";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
|
||||
|
|
|
@ -15,15 +15,15 @@ with stdenv.lib;
|
|||
|
||||
let
|
||||
|
||||
version = "0.1.0";
|
||||
version = "0.1.1";
|
||||
|
||||
# Note: this is NOT the libvterm already in nixpkgs, but some NIH silliness:
|
||||
neovimLibvterm = let version = "2015-02-23"; in stdenv.mkDerivation {
|
||||
neovimLibvterm = let version = "2015-11-06"; in stdenv.mkDerivation {
|
||||
name = "neovim-libvterm-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
sha256 = "0i2h74jrx4fy90sv57xj8g4lbjjg4nhrq2rv6rz576fmqfpllcc5";
|
||||
rev = "20ad1396c178c72873aeeb2870bd726f847acb70";
|
||||
sha256 = "0f9r0wnr9ajcdd6as24igmch0n8s1annycb9f4k0vg6fngwaypy9";
|
||||
rev = "04781d37ce5af3f580376dc721bd3b89c434966b";
|
||||
repo = "libvterm";
|
||||
owner = "neovim";
|
||||
};
|
||||
|
@ -63,7 +63,7 @@ let
|
|||
name = "neovim-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
sha256 = "1704f3dqf5p6hicpzf0pi21n6ymylra9prsm4azvqp86allmvnfx";
|
||||
sha256 = "0crswjslp687yp1cpn7nmm0j2sccqhcxryzxv1s81cgpai0fzf60";
|
||||
rev = "v${version}";
|
||||
repo = "neovim";
|
||||
owner = "neovim";
|
||||
|
|
|
@ -69,7 +69,7 @@ stdenv.mkDerivation {
|
|||
{ description = "Set of integrated tools for the R language";
|
||||
homepage = http://www.rstudio.com/;
|
||||
license = licenses.agpl3;
|
||||
maintainers = [ maintainers.emery ];
|
||||
maintainers = [ maintainers.ehmry ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -43,6 +43,8 @@ stdenv.mkDerivation rec {
|
|||
];
|
||||
};
|
||||
|
||||
__impureHostDeps = [ "/dev/ptmx" ];
|
||||
|
||||
# To fix the trouble in vim73, that it cannot cross-build with this patch
|
||||
# to bypass a configure script check that cannot be done cross-building.
|
||||
# http://groups.google.com/group/vim_dev/browse_thread/thread/66c02efd1523554b?pli=1
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue