Merge master into x-updates

This commit is contained in:
Vladimír Čunát 2014-03-21 10:33:45 +01:00
commit 466595859f
448 changed files with 6699 additions and 1865 deletions

View file

@ -1 +1,7 @@
import ./pkgs/top-level/all-packages.nix
if ! builtins ? nixVersion || builtins.compareVersions "1.6" builtins.nixVersion == 1 then
abort "This version of Nixpkgs requires Nix >= 1.6, please upgrade!"
else
import ./pkgs/top-level/all-packages.nix

View file

@ -25,12 +25,14 @@
amd = {
shortName = "amd";
fullName = "AMD License Agreement";
url = "http://developer.amd.com/amd-license-agreement/";
};
url = http://developer.amd.com/amd-license-agreement/;
};#
# Apple Public Source License 2.0;
# http://opensource.org/licenses/APSL-2.0
apsl20 = "APSL 2.0";
apsl20 = {
shortName = "APSL 2.0";
fullName = "Apple Public Source License 2.0";
url = http://opensource.org/licenses/APSL-2.0;
};
asl20 = {
shortName = "ASL2.0";
@ -80,7 +82,11 @@
url = http://www.eclipse.org/legal/epl-v10.html;
};
gpl2 = "GPLv2";
gpl2 = {
shortName = "GPLv2";
fullName = "GNU General Public License version 2";
url = http://www.gnu.org/licenses/old-licenses/gpl-2.0.html;
};
gpl2Oss = {
shortName = "GPLv2+OSS";
@ -88,9 +94,11 @@
url = http://www.mysql.com/about/legal/licensing/foss-exception;
};
# GNU General Public License version 2 or later;
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
gpl2Plus = "GPLv2+";
gpl2Plus = {
shortName = "GPLv2+";
fullName = "GNU General Public License version 2 or later";
url = http://www.gnu.org/licenses/old-licenses/gpl-2.0.html;
};
gpl3 = {
shortName = "GPLv3";
@ -134,7 +142,11 @@
url = https://fedoraproject.org/wiki/Licensing/libtiff;
};
lgpl2 = "LGPLv2";
lgpl2 = {
shortName = "LGPLv2";
fullName = "GNU Library General Public License version 2";
url = http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html;
};
lgpl2Plus = {
shortName = "LGPLv2+";
@ -142,7 +154,11 @@
url = http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html;
};
lgpl21 = "LGPLv2.1";
lgpl21 = {
shortName = "LGPLv2.1";
fullName = "GNU Lesser General Public License version 2.1";
url = http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html;
};
lgpl21Plus = {
shortName = "LGPLv2.1+";

View file

@ -25,6 +25,7 @@
edwtjo = "Edward Tjörnhammar <ed@cflags.cc>";
eelco = "Eelco Dolstra <eelco.dolstra@logicblox.com>";
ertes = "Ertugrul Söylemez <es@ertes.de>";
falsifian = "James Cook <james.cook@utoronto.ca>";
garbas = "Rok Garbas <rok@garbas.si>";
goibhniu = "Cillian de Róiste <cillian.deroiste@gmail.com>";
guibert = "David Guibert <david.guibert@gmail.com>";
@ -52,6 +53,7 @@
phreedom = "Evgeny Egorochkin <phreedom@yandex.ru>";
pierron = "Nicolas B. Pierron <nixos@nbp.name>";
piotr = "Piotr Pietraszkiewicz <ppietrasa@gmail.com>";
pkmx = "Chih-Mao Chen <pkmx.tw@gmail.com>";
pSub = "Pascal Wittmann <mail@pascal-wittmann.de>";
qknight = "Joachim Schiele <js@lastlog.de>";
raskin = "Michael Raskin <7c6f434c@mail.ru>";

View file

@ -31,11 +31,10 @@ rec {
updateName = updater: drv: drv // {name = updater (drv.name);};
/* Append a suffix to the name of a package. !!! the suffix should
really be appended *before* the version, at least most of the
time.
*/
appendToName = suffix: updateName (name: "${name}-${suffix}");
/* Append a suffix to the name of a package (before the version
part). */
appendToName = suffix: updateName (name:
let x = builtins.parseDrvName name; in "${x.name}-${suffix}-${x.version}");
/* Apply a function to each derivation and only to derivations in an attrset

View file

@ -18,15 +18,14 @@
<variablelist>
<xsl:for-each select="attrs">
<varlistentry>
<term>
<option>
<term xml:id="{generate-id(attr[@name = 'name']/string/@value)}" xlink:href="#{generate-id(attr[@name = 'name']/string/@value)}">
<option>
<xsl:for-each select="attr[@name = 'name']/string">
<xsl:value-of select="@value" />
<xsl:if test="position() != last()">.</xsl:if>
</xsl:for-each>
</option>
</option>
</term>
<listitem>

View file

@ -497,7 +497,7 @@ sub waitForX {
retry sub {
my ($status, $out) = $self->execute("journalctl -bu systemd-logind | grep Linked");
return 0 if $status != 0;
my ($status, $out) = $self->execute("xwininfo -root > /dev/null 2>&1");
($status, $out) = $self->execute("xwininfo -root > /dev/null 2>&1");
return 1 if $status == 0;
}
});

View file

@ -53,7 +53,11 @@ in
};
consoleKeyMap = mkOption {
type = types.str;
type = mkOptionType {
name = "string or path";
check = t: (isString t || types.path.check t);
};
default = "us";
example = "fr";
description = ''

View file

@ -115,6 +115,13 @@
nix-ssh = 104;
dictd = 105;
couchdb = 106;
searx = 107;
kippo = 108;
jenkins = 109;
systemd-journal-gateway = 110;
notbit = 111;
ngircd = 112;
btsync = 113;
# When adding a uid, make sure it doesn't match an existing gid.
@ -208,6 +215,11 @@
keys = 96;
dictd = 105;
couchdb = 106;
searx = 107;
kippo = 108;
jenkins = 109;
systemd-journal-gateway = 110;
notbit = 111;
# When adding a gid, make sure it doesn't match an existing uid.

View file

@ -61,6 +61,7 @@
./security/apparmor.nix
./security/apparmor-suid.nix
./security/ca.nix
./security/duosec.nix
./security/pam.nix
./security/pam_usb.nix
./security/polkit.nix
@ -81,6 +82,8 @@
./services/backup/rsnapshot.nix
./services/backup/sitecopy-backup.nix
./services/backup/tarsnap.nix
./services/continuous-integration/jenkins/default.nix
./services/continuous-integration/jenkins/slave.nix
./services/databases/4store-endpoint.nix
./services/databases/4store.nix
./services/databases/couchdb.nix
@ -152,6 +155,7 @@
./services/networking/avahi-daemon.nix
./services/networking/bind.nix
./services/networking/bitlbee.nix
./services/networking/btsync.nix
./services/networking/connman.nix
./services/networking/cntlm.nix
./services/networking/chrony.nix
@ -177,6 +181,8 @@
./services/networking/minidlna.nix
./services/networking/nat.nix
./services/networking/networkmanager.nix
./services/networking/ngircd.nix
./services/networking/notbit.nix
./services/networking/ntopng.nix
./services/networking/ntpd.nix
./services/networking/oidentd.nix
@ -189,6 +195,7 @@
./services/networking/rdnssd.nix
./services/networking/rpcbind.nix
./services/networking/sabnzbd.nix
./services/networking/searx.nix
./services/networking/supybot.nix
./services/networking/ssh/lshd.nix
./services/networking/ssh/sshd.nix
@ -205,6 +212,7 @@
./services/scheduling/cron.nix
./services/scheduling/fcron.nix
./services/search/elasticsearch.nix
./services/search/solr.nix
./services/security/clamav.nix
./services/security/haveged.nix
./services/security/fprot.nix
@ -227,8 +235,10 @@
./services/web-servers/lighttpd/cgit.nix
./services/web-servers/lighttpd/gitweb.nix
./services/web-servers/nginx/default.nix
./services/web-servers/phpfpm.nix
./services/web-servers/tomcat.nix
./services/web-servers/varnish/default.nix
./services/web-servers/winstone.nix
./services/web-servers/zope2.nix
./services/x11/desktop-managers/default.nix
./services/x11/display-managers/auto.nix

View file

@ -116,8 +116,9 @@ in
# This file is read for all shells.
# Only execute this file once per shell.
# But don't clobber the environment of interactive non-login children!
if [ -n "$__ETC_ZSHENV_SOURCED" ]; then return; fi
__ETC_ZSHENV_SOURCED=1
export __ETC_ZSHENV_SOURCED=1
${cfg.shellInit}

View file

@ -103,6 +103,7 @@ in zipModules ([]
++ obsolete [ "services" "sshd" "gatewayPorts" ] [ "services" "openssh" "gatewayPorts" ]
++ obsolete [ "services" "sshd" "permitRootLogin" ] [ "services" "openssh" "permitRootLogin" ]
++ obsolete [ "services" "xserver" "startSSHAgent" ] [ "services" "xserver" "startOpenSSHAgent" ]
++ obsolete [ "services" "xserver" "windowManager" "xbmc" ] [ "services" "xserver" "desktopManager" "xbmc" ]
# KDE
++ deprecated [ "kde" "extraPackages" ] [ "environment" "kdePackages" ]

View file

@ -0,0 +1,198 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.security.duosec;
boolToStr = b: if b then "yes" else "no";
configFile = ''
[duo]
ikey=${cfg.ikey}
skey=${cfg.skey}
host=${cfg.host}
${optionalString (cfg.group != "") ("group="+cfg.group)}
failmode=${cfg.failmode}
pushinfo=${boolToStr cfg.pushinfo}
autopush=${boolToStr cfg.autopush}
motd=${boolToStr cfg.motd}
prompts=${toString cfg.prompts}
accept_env_factor=${boolToStr cfg.acceptEnvFactor}
fallback_local_ip=${boolToStr cfg.fallbackLocalIP}
'';
loginCfgFile = optional cfg.ssh.enable
{ source = pkgs.writeText "login_duo.conf" configFile;
mode = "0600";
uid = config.ids.uids.sshd;
target = "duo/login_duo.conf";
};
pamCfgFile = optional cfg.pam.enable
{ source = pkgs.writeText "pam_duo.conf" configFile;
mode = "0600";
uid = config.ids.uids.sshd;
target = "duo/pam_duo.conf";
};
in
{
options = {
security.duosec = {
ssh.enable = mkOption {
type = types.bool;
default = false;
description = "If enabled, protect SSH logins with Duo Security.";
};
pam.enable = mkOption {
type = types.bool;
default = false;
description = "If enabled, protect logins with Duo Security using PAM support.";
};
ikey = mkOption {
type = types.str;
description = "Integration key.";
};
skey = mkOption {
type = types.str;
description = "Secret key.";
};
host = mkOption {
type = types.str;
description = "Duo API hostname.";
};
group = mkOption {
type = types.str;
default = "";
description = "Use Duo authentication for users only in this group.";
};
failmode = mkOption {
type = types.str;
default = "safe";
description = ''
On service or configuration errors that prevent Duo
authentication, fail "safe" (allow access) or "secure" (deny
access). The default is "safe".
'';
};
pushinfo = mkOption {
type = types.bool;
default = false;
description = ''
Include information such as the command to be executed in
the Duo Push message.
'';
};
autopush = mkOption {
type = types.bool;
default = false;
description = ''
If <literal>true</literal>, Duo Unix will automatically send
a push login request to the users phone, falling back on a
phone call if push is unavailable. If
<literal>false</literal>, the user will be prompted to
choose an authentication method. When configured with
<literal>autopush = yes</literal>, we recommend setting
<literal>prompts = 1</literal>.
'';
};
motd = mkOption {
type = types.bool;
default = false;
description = ''
Print the contents of <literal>/etc/motd</literal> to screen
after a succesful login.
'';
};
prompts = mkOption {
type = types.int;
default = 3;
description = ''
If a user fails to authenticate with a second factor, Duo
Unix will prompt the user to authenticate again. This option
sets the maximum number of prompts that Duo Unix will
display before denying access. Must be 1, 2, or 3. Default
is 3.
For example, when <literal>prompts = 1</literal>, the user
will have to successfully authenticate on the first prompt,
whereas if <literal>prompts = 2</literal>, if the user
enters incorrect information at the initial prompt, he/she
will be prompted to authenticate again.
When configured with <literal>autopush = true</literal>, we
recommend setting <literal>prompts = 1</literal>.
'';
};
acceptEnvFactor = mkOption {
type = types.bool;
default = false;
description = ''
Look for factor selection or passcode in the
<literal>$DUO_PASSCODE</literal> environment variable before
prompting the user for input.
When $DUO_PASSCODE is non-empty, it will override
autopush. The SSH client will need SendEnv DUO_PASSCODE in
its configuration, and the SSH server will similarily need
AcceptEnv DUO_PASSCODE.
'';
};
fallbackLocalIP = mkOption {
type = types.bool;
default = false;
description = ''
Duo Unix reports the IP address of the authorizing user, for
the purposes of authorization and whitelisting. If Duo Unix
cannot detect the IP address of the client, setting
<literal>fallbackLocalIP = yes</literal> will cause Duo Unix
to send the IP address of the server it is running on.
If you are using IP whitelisting, enabling this option could
cause unauthorized logins if the local IP is listed in the
whitelist.
'';
};
};
};
config = mkIf (cfg.ssh.enable || cfg.pam.enable) {
assertions =
[ { assertion = cfg.failmode == "safe" || cfg.failmode == "secure";
message = "Invalid value for failmode (must be safe or secure).";
}
{ assertion = cfg.prompts == 1 || cfg.prompts == 2 || cfg.prompts == 3;
message = "Invalid value for prompts (must be 1, 2, or 3).";
}
{ assertion = !cfg.pam.enable;
message = "PAM support is currently not implemented.";
}
];
environment.systemPackages = [ pkgs.duo-unix ];
security.setuidPrograms = [ "login_duo" ];
environment.etc = loginCfgFile ++ pamCfgFile;
/* If PAM *and* SSH are enabled, then don't do anything special.
If PAM isn't used, set the default SSH-only options. */
services.openssh.extraConfig = mkIf (cfg.ssh.enable || cfg.pam.enable) (
if cfg.pam.enable then "UseDNS no" else ''
# Duo Security configuration
ForceCommand ${config.security.wrapperDir}/login_duo
PermitTunnel no
AllowTcpForwarding no
'');
};
}

View file

@ -33,8 +33,9 @@ in
service called <literal>tarsnap-backup</literal> which is
periodically run by cron, or you may run it on-demand.
See <link xlink:href='http://www.tarsnap.com/gettingstarted.html'>Getting Started</link>
Tarsnap page.
See the Tarsnap <link
xlink:href='http://www.tarsnap.com/gettingstarted.html'>Getting
Started</link> page.
'';
};
@ -46,7 +47,7 @@ in
full name will be
<literal>label-$(date+"%Y%m%d%H%M%S")</literal>. For
example, by default your backups will look similar to
<literal>nixos-20140301021501</literal>.
<literal>nixos-20140301011501</literal>.
'';
};
@ -110,8 +111,8 @@ in
default = "15 01 * * *";
description = ''
This option defines (in the format used by cron) when
tarsnap is run for backups. The default is to update at
01:15 at night every day.
tarsnap is run for backups. The default is to backup the
specified paths at 01:15 at night every day.
'';
};

View file

@ -0,0 +1,118 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.jenkins;
in {
options = {
services.jenkins = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the jenkins continuous integration server.
'';
};
user = mkOption {
default = "jenkins";
type = with types; string;
description = ''
User the jenkins server should execute under.
'';
};
group = mkOption {
default = "jenkins";
type = with types; string;
description = ''
User the jenkins server should execute under.
'';
};
home = mkOption {
default = "/var/lib/jenkins";
type = with types; string;
description = ''
The path to use as JENKINS_HOME. If the default user "jenkins" is configured then
this is the home of the "jenkins" user.
'';
};
port = mkOption {
default = 8080;
type = types.uniq types.int;
description = ''
Specifies port number on which the jenkins HTTP interface listens. The default is 8080
'';
};
packages = mkOption {
default = [ pkgs.stdenv pkgs.git pkgs.jdk pkgs.openssh pkgs.nix ];
type = types.listOf types.package;
description = ''
Packages to add to PATH for the jenkins process.
'';
};
environment = mkOption {
default = { NIX_REMOTE = "daemon"; };
type = with types; attrsOf string;
description = ''
Additional environment variables to be passed to the jenkins process.
The environment will always include JENKINS_HOME.
'';
};
};
};
config = mkIf cfg.enable {
users.extraGroups = optional (cfg.group == "jenkins") {
name = "jenkins";
gid = config.ids.gids.jenkins;
};
users.extraUsers = optional (cfg.user == "jenkins") {
name = "jenkins";
description = "jenkins user";
createHome = true;
home = cfg.home;
group = cfg.group;
useDefaultShell = true;
uid = config.ids.uids.jenkins;
};
systemd.services.jenkins = {
description = "Jenkins Continuous Integration Server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
environment = {
JENKINS_HOME = cfg.home;
} // cfg.environment;
path = cfg.packages;
script = ''
${pkgs.jdk}/bin/java -jar ${pkgs.jenkins} --httpPort=${toString cfg.port}
'';
postStart = ''
until ${pkgs.curl}/bin/curl -s -L localhost:${toString cfg.port} ; do
sleep 10
done
while true ; do
index=`${pkgs.curl}/bin/curl -s -L localhost:${toString cfg.port}`
if [[ !("$index" =~ 'Please wait while Jenkins is restarting' ||
"$index" =~ 'Please wait while Jenkins is getting ready to work') ]]; then
exit 0
fi
sleep 30
done
'';
serviceConfig = {
User = cfg.user;
};
};
};
}

View file

@ -0,0 +1,67 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.jenkinsSlave;
masterCfg = config.services.jenkins;
in {
options = {
services.jenkinsSlave = {
# todo:
# * assure the profile of the jenkins user has a JRE and any specified packages. This would
# enable ssh slaves.
# * Optionally configure the node as a jenkins ad-hoc slave. This would imply configuration
# properties for the master node.
enable = mkOption {
type = types.bool;
default = false;
description = ''
If true the system will be configured to work as a jenkins slave.
If the system is also configured to work as a jenkins master then this has no effect.
In progress: Currently only assures the jenkins user is configured.
'';
};
user = mkOption {
default = "jenkins";
type = with types; string;
description = ''
User the jenkins slave agent should execute under.
'';
};
group = mkOption {
default = "jenkins";
type = with types; string;
description = ''
User the jenkins slave agent should execute under.
'';
};
home = mkOption {
default = "/var/lib/jenkins";
type = with types; string;
description = ''
The path to use as JENKINS_HOME. If the default user "jenkins" is configured then
this is the home of the "jenkins" user.
'';
};
};
};
config = mkIf (cfg.enable && !masterCfg.enable) {
users.extraGroups = optional (cfg.group == "jenkins") {
name = "jenkins";
gid = config.ids.gids.jenkins;
};
users.extraUsers = optional (cfg.user == "jenkins") {
name = "jenkins";
description = "jenkins user";
createHome = true;
home = cfg.home;
group = cfg.group;
useDefaultShell = true;
uid = config.ids.uids.jenkins;
};
};
}

View file

@ -1,9 +1,7 @@
{ config, pkgs, ... }:
with pkgs.lib;
with pkgs.lib;
let
cfg = config.services.couchdb;
configFile = pkgs.writeText "couchdb.ini"
''
@ -19,10 +17,8 @@ let
[log]
file = ${cfg.logFile}
'';
configExtraFile = pkgs.writeText "couchdb-extra.ini" cfg.extraConfig;
in
{
in {
###### interface
@ -64,14 +60,6 @@ in
'';
};
pidFile = mkOption {
type = types.path;
default = "/var/run/couchdb/couchdb.pid";
description = ''
pid file.
'';
};
# couchdb options: http://docs.couchdb.org/en/latest/config/index.html
databaseDir = mkOption {
@ -153,26 +141,23 @@ in
preStart =
''
mkdir -p `dirname ${cfg.pidFile}`;
mkdir -p `dirname ${cfg.uriFile}`;
mkdir -p `dirname ${cfg.logFile}`;
touch ${cfg.logFile};
mkdir -p ${cfg.databaseDir};
mkdir -p ${cfg.viewIndexDir};
chown ${cfg.user}:${cfg.group} `dirname ${cfg.pidFile}`
chown ${cfg.user}:${cfg.group} `dirname ${cfg.uriFile}`
chown ${cfg.user}:${cfg.group} ${cfg.logFile}
chown ${cfg.user}:${cfg.group} ${cfg.databaseDir}
chown ${cfg.user}:${cfg.group} ${cfg.viewIndexDir}
if [ "$(id -u)" = 0 ]; then
chown ${cfg.user}:${cfg.group} `dirname ${cfg.uriFile}`
chown ${cfg.user}:${cfg.group} ${cfg.databaseDir}
chown ${cfg.user}:${cfg.group} ${cfg.viewIndexDir}
fi
'';
serviceConfig = {
PermissionsStartOnly = true;
User = cfg.user;
Group = cfg.group;
Type = "forking";
ExecStart = "${cfg.package}/bin/couchdb -b -o /dev/null -e /dev/null -p ${cfg.pidFile} -a ${configFile} -a ${configExtraFile}";
ExecStop = "${cfg.package}/bin/couchdb -d";
ExecStart = "${cfg.package}/bin/couchdb -a ${configFile} -a ${pkgs.writeText "couchdb-extra.ini" cfg.extraConfig}";
};
};

View file

@ -15,7 +15,7 @@ let
pidFile = "${cfg.pidDir}/mysqld.pid";
mysqldOptions =
"--user=${cfg.user} --datadir=${cfg.dataDir} " +
"--user=${cfg.user} --datadir=${cfg.dataDir} --basedir=${mysql} " +
"--pid-file=${pidFile}";
myCnf = pkgs.writeText "my.cnf"
@ -250,9 +250,6 @@ in
rm /tmp/mysql_init
fi
''; # */
serviceConfig.ExecStop =
"${mysql}/bin/mysqladmin ${optionalString (cfg.rootPassword != null) "--user=root --password=\"$(cat ${cfg.rootPassword})\""} shutdown";
};
};

View file

@ -190,7 +190,7 @@ in
mkdir -m 0700 -p ${cfg.dataDir}
if [ "$(id -u)" = 0 ]; then
chown -R postgres ${cfg.dataDir}
su -s ${pkgs.stdenv.shell} postgres -c 'initdb -U root'
su -s ${pkgs.stdenv.shell} postgres -c initdb
else
# For non-root operation.
initdb

View file

@ -19,6 +19,7 @@ in
services.gpsd = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable `gpsd', a GPS service daemon.
@ -26,6 +27,7 @@ in
};
device = mkOption {
type = types.str;
default = "/dev/ttyUSB0";
description = ''
A device may be a local serial device for GPS input, or a URL of the form:
@ -35,6 +37,7 @@ in
};
readonly = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable the broken-device-safety, otherwise
@ -51,6 +54,7 @@ in
};
port = mkOption {
type = types.uniq types.int;
default = 2947;
description = ''
The port where to listen for TCP connections.
@ -58,6 +62,7 @@ in
};
debugLevel = mkOption {
type = types.uniq types.int;
default = 0;
description = ''
The debugging level.
@ -85,19 +90,20 @@ in
inherit gid;
};
jobs.gpsd =
{ description = "GPSD daemon";
startOn = "ip-up";
exec =
''
${pkgs.gpsd}/sbin/gpsd -D "${toString cfg.debugLevel}" \
-S "${toString cfg.port}" \
${if cfg.readonly then "-b" else ""} \
"${cfg.device}"
'';
systemd.services.gpsd = {
description = "GPSD daemon";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Type = "forking";
ExecStart = ''
${pkgs.gpsd}/sbin/gpsd -D "${toString cfg.debugLevel}" \
-S "${toString cfg.port}" \
${if cfg.readonly then "-b" else ""} \
"${cfg.device}"
'';
};
};
};

View file

@ -63,7 +63,7 @@ in
services.nixosManual.showManual = mkOption {
type = types.bool;
default = true;
default = false;
description = ''
Whether to show the NixOS manual on one of the virtual
consoles.

View file

@ -168,11 +168,11 @@ in
# shuts off power.) Copied from here:
# http://forums.opensuse.org/english/get-technical-help-here/applications/479499-apcupsd-systemd-killpower-issues.html
systemd.services.apcupsd-killpower = {
description = "APC UPS Kill Power";
after = [ "shutdown.target" ]; # append umount.target?
before = [ "final.target" ];
wantedBy = [ "shutdown.target" ];
unitConfig = {
Description = "APC UPS Kill Power";
ConditionPathExists = "/run/apcupsd/powerfail";
DefaultDependencies = "no";
};

View file

@ -4,17 +4,31 @@ with pkgs.lib;
let
cfg = config.services.graphite;
writeTextOrNull = f: t: if t == null then null else pkgs.writeText f t;
writeTextOrNull = f: t: if t == null then null else pkgs.writeTextDir f t;
dataDir = cfg.dataDir;
configDir = pkgs.buildEnv {
name = "graphite-config";
paths = lists.filter (el: el != null) [
(writeTextOrNull "carbon.conf" cfg.carbon.config)
(writeTextOrNull "storage-agregation.conf" cfg.carbon.storageAggregation)
(writeTextOrNull "storage-schemas.conf" cfg.carbon.storageSchemas)
(writeTextOrNull "blacklist.conf" cfg.carbon.blacklist)
(writeTextOrNull "whitelist.conf" cfg.carbon.whitelist)
(writeTextOrNull "rewrite-rules.conf" cfg.carbon.rewriteRules)
(writeTextOrNull "relay-rules.conf" cfg.carbon.relayRules)
(writeTextOrNull "aggregation-rules.conf" cfg.carbon.aggregationRules)
];
};
dataDir = "/var/db/graphite";
carbonOpts = name: with config.ids; ''
--nodaemon --syslog --prefix=${name} --pidfile /var/run/${name}.pid \
--uid ${toString uids.graphite} --gid ${toString uids.graphite} ${name}
--nodaemon --syslog --prefix=${name} --pidfile ${dataDir}/${name}.pid ${name}
'';
carbonEnv = {
PYTHONPATH = "${pkgs.python27Packages.carbon}/lib/python2.7/site-packages";
GRAPHITE_ROOT = dataDir;
GRAPHITE_CONF_DIR = "/etc/graphite/";
GRAPHITE_CONF_DIR = configDir;
GRAPHITE_STORAGE_DIR = dataDir;
};
@ -23,6 +37,14 @@ in {
###### interface
options.services.graphite = {
dataDir = mkOption {
type = types.path;
default = "/var/db/graphite";
description = ''
Data directory for graphite.
'';
};
web = {
enable = mkOption {
description = "Whether to enable graphite web frontend";
@ -38,8 +60,8 @@ in {
port = mkOption {
description = "Graphite web frontend port";
default = "8080";
type = types.str;
default = 8080;
type = types.int;
};
};
@ -152,31 +174,17 @@ in {
###### implementation
config = mkIf (cfg.carbon.enableAggregator || cfg.carbon.enableCache || cfg.carbon.enableRelay || cfg.web.enable) {
environment.etc = lists.filter (el: el.source != null) [
{ source = writeTextOrNull "carbon.conf" cfg.carbon.config;
target = "graphite/carbon.conf"; }
{ source = writeTextOrNull "storage-agregation.conf" cfg.carbon.storageAggregation;
target = "graphite/storage-agregation.conf"; }
{ source = writeTextOrNull "storage-schemas.conf" cfg.carbon.storageSchemas;
target = "graphite/storage-schemas.conf"; }
{ source = writeTextOrNull "blacklist.conf" cfg.carbon.blacklist;
target = "graphite/blacklist.conf"; }
{ source = writeTextOrNull "whitelist.conf" cfg.carbon.whitelist;
target = "graphite/whitelist.conf"; }
{ source = writeTextOrNull "rewrite-rules.conf" cfg.carbon.rewriteRules;
target = "graphite/rewrite-rules.conf"; }
{ source = writeTextOrNull "relay-rules.conf" cfg.carbon.relayRules;
target = "graphite/relay-rules.conf"; }
{ source = writeTextOrNull "aggregation-rules.conf" cfg.carbon.aggregationRules;
target = "graphite/aggregation-rules.conf"; }
];
systemd.services.carbonCache = mkIf cfg.carbon.enableCache {
systemd.services.carbonCache = {
enable = cfg.carbon.enableCache;
description = "Graphite Data Storage Backend";
wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ];
environment = carbonEnv;
serviceConfig.ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-cache"}";
serviceConfig = {
ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-cache"}";
User = "graphite";
Group = "graphite";
};
restartTriggers = [
pkgs.pythonPackages.carbon
cfg.carbon.config
@ -185,33 +193,45 @@ in {
cfg.carbon.rewriteRules
];
preStart = ''
mkdir -p ${dataDir}/whisper
mkdir -m 0700 -p ${cfg.dataDir}/whisper
if [ "$(id -u)" = 0 ]; then chown -R graphite:graphite ${cfg.dataDir}; fi
'';
};
systemd.services.carbonAggregator = mkIf cfg.carbon.enableAggregator {
systemd.services.carbonAggregator = {
enable = cfg.carbon.enableAggregator;
description = "Carbon Data Aggregator";
wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ];
environment = carbonEnv;
serviceConfig.ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-aggregator"}";
serviceConfig = {
ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-aggregator"}";
User = "graphite";
Group = "graphite";
};
restartTriggers = [
pkgs.pythonPackages.carbon cfg.carbon.config cfg.carbon.aggregationRules
];
};
systemd.services.carbonRelay = mkIf cfg.carbon.enableRelay {
systemd.services.carbonRelay = {
enable = cfg.carbon.enableRelay;
description = "Carbon Data Relay";
wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ];
environment = carbonEnv;
serviceConfig.ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-relay"}";
serviceConfig = {
ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-relay"}";
User = "graphite";
Group = "graphite";
};
restartTriggers = [
pkgs.pythonPackages.carbon cfg.carbon.config cfg.carbon.relayRules
];
};
systemd.services.graphiteWeb = mkIf cfg.web.enable {
systemd.services.graphiteWeb = {
enable = cfg.web.enable;
description = "Graphite Web Interface";
wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ];
@ -224,14 +244,15 @@ in {
serviceConfig = {
ExecStart = ''
${pkgs.python27Packages.waitress}/bin/waitress-serve \
--host=${cfg.web.host} --port=${cfg.web.port} \
--host=${cfg.web.host} --port=${toString cfg.web.port} \
--call django.core.handlers.wsgi:WSGIHandler'';
User = "graphite";
Group = "graphite";
};
preStart = ''
if ! test -e ${dataDir}/db-created; then
mkdir -p ${dataDir}/{whisper/,log/webapp/}
mkdir -m 0700 -p ${dataDir}/{whisper/,log/webapp/}
if [ "$(id -u)" = 0 ]; then chown -R graphite:graphite ${cfg.dataDir}; fi
# populate database
${pkgs.python27Packages.graphite_web}/bin/manage-graphite.py syncdb --noinput
@ -259,7 +280,6 @@ in {
uid = config.ids.uids.graphite;
description = "Graphite daemon user";
home = dataDir;
createHome = true;
};
users.extraGroups.graphite.gid = config.ids.gids.graphite;
};

View file

@ -64,13 +64,13 @@ in
graphiteHost = mkOption {
description = "Hostname or IP of Graphite server";
default = "127.0.0.1";
default = config.services.graphite.web.host;
type = types.str;
};
graphitePort = mkOption {
description = "Port of Graphite server";
default = 2003;
default = config.services.graphite.web.port;
type = types.uniq types.int;
};

View file

@ -46,6 +46,16 @@ in
description = "Cache directory.";
};
crypt = mkOption {
default = false;
description = "Whether to enable (weak) protocol encryption.";
};
sparse = mkOption {
default = false;
description = "Minimal cell list in /afs.";
};
};
};
@ -70,18 +80,23 @@ in
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
preStart = ''
mkdir -m 0755 /afs || true
mkdir -m 0755 -p ${cfg.cacheDirectory} || true
preStart = ''
mkdir -p -m 0755 /afs
mkdir -m 0700 -p ${cfg.cacheDirectory}
${pkgs.module_init_tools}/sbin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true
${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} -dynroot -fakestat
'';
${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} ${if cfg.sparse then "-dynroot-sparse" else "-dynroot"} -fakestat -afsdb
${openafsPkgs}/bin/fs setcrypt ${if cfg.crypt then "on" else "off"}
'';
postStop = ''
umount /afs
# Doing this in preStop, because after these commands AFS is basically
# stopped, so systemd has nothing to do, just noticing it. If done in
# postStop, then we get a hang + kernel oops, because AFS can't be
# stopped simply by sending signals to processes.
preStop = ''
${pkgs.utillinux}/bin/umount /afs
${openafsPkgs}/sbin/afsd -shutdown
rmmod libafs
'';
${pkgs.module_init_tools}/sbin/rmmod libafs
'';
};

View file

@ -0,0 +1,280 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.btsync;
listenAddr = cfg.httpListenAddr + ":" + (toString cfg.httpListenPort);
boolStr = x: if x then "true" else "false";
optionalEmptyStr = b: v: optionalString (b != "") v;
webUIConfig = optionalString cfg.enableWebUI
''
"webui":
{
${optionalEmptyStr cfg.httpLogin "\"login\": \"${cfg.httpLogin}\","}
${optionalEmptyStr cfg.httpPass "\"password\": \"${cfg.httpPass}\","}
${optionalEmptyStr cfg.apiKey "\"api_key\": \"${cfg.apiKey}\","}
"listen": "${listenAddr}"
}
'';
knownHosts = e:
optionalString (e ? "knownHosts")
(concatStringsSep "," (map (v: "\"${v}\"") e."knownHosts"));
sharedFoldersRecord = with pkgs.lib;
concatStringsSep "," (map (entry:
let helper = attr: v:
if (entry ? attr) then boolStr entry.attr else boolStr v;
in
''
{
"secret": "${entry.secret}",
"dir": "${entry.directory}",
"use_relay_server": ${helper "useRelayServer" true},
"use_tracker": ${helper "useTracker" true},
"use_dht": ${helper "useDHT" false},
"search_lan": ${helper "searchLAN" true},
"use_sync_trash": ${helper "useSyncTrash" true},
"known_hosts": [${knownHosts entry}]
}
'') cfg.sharedFolders);
sharedFoldersConfig = optionalString (cfg.sharedFolders != [])
''
"shared_folders":
[
${sharedFoldersRecord}
]
'';
configFile = pkgs.writeText "btsync.config"
''
{
"device_name": "${cfg.deviceName}",
"storage_path": "/var/lib/btsync",
"listening_port": ${toString cfg.listeningPort},
"use_gui": false,
"check_for_updates": ${boolStr cfg.checkForUpdates},
"use_upnp": ${boolStr cfg.useUpnp},
"download_limit": ${toString cfg.downloadLimit},
"upload_limit": ${toString cfg.uploadLimit},
"lan_encrypt_data": ${boolStr cfg.encryptLAN},
${webUIConfig}
${sharedFoldersConfig}
}
'';
in
{
options = {
services.btsync = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
If enabled, start the Bittorrent Sync daemon. Once enabled,
you can interact with the service through the Web UI, or
configure it in your NixOS configuration. Enabling the
<literal>btsync</literal> service also installs a
multi-instance systemd unit which can be used to start
user-specific copies of the daemon. Once installed, you can
use <literal>systemctl start btsync@user</literal> to start
the daemon only for user <literal>user</literal>, using the
configuration file located at
<literal>$HOME/.config/btsync.conf</literal>
'';
};
deviceName = mkOption {
type = types.str;
example = "Voltron";
description = ''
Name of the Bittorrent Sync device.
'';
};
listeningPort = mkOption {
type = types.int;
default = 0;
example = 44444;
description = ''
Listening port. Defaults to 0 which randomizes the port.
'';
};
checkForUpdates = mkOption {
type = types.bool;
default = true;
description = ''
Determines whether to check for updates and alert the user
about them in the UI.
'';
};
useUpnp = mkOption {
type = types.bool;
default = true;
description = ''
Use Universal Plug-n-Play (UPnP)
'';
};
downloadLimit = mkOption {
type = types.int;
default = 0;
example = 1024;
description = ''
Download speed limit. 0 is unlimited (default).
'';
};
uploadLimit = mkOption {
type = types.int;
default = 0;
example = 1024;
description = ''
Upload speed limit. 0 is unlimited (default).
'';
};
httpListenAddr = mkOption {
type = types.str;
default = "0.0.0.0";
example = "1.2.3.4";
description = ''
HTTP address to bind to.
'';
};
httpListenPort = mkOption {
type = types.int;
default = 9000;
description = ''
HTTP port to bind on.
'';
};
httpLogin = mkOption {
type = types.str;
example = "allyourbase";
description = ''
HTTP web login username.
'';
};
httpPass = mkOption {
type = types.str;
example = "arebelongtous";
description = ''
HTTP web login password.
'';
};
encryptLAN = mkOption {
type = types.bool;
default = true;
description = "Encrypt LAN data.";
};
enableWebUI = mkOption {
type = types.bool;
default = false;
description = ''
Enable Web UI for administration. Bound to the specified
<literal>httpListenAddress</literal> and
<literal>httpListenPort</literal>.
'';
};
apiKey = mkOption {
type = types.str;
default = "";
description = "API key, which enables the developer API.";
};
sharedFolders = mkOption {
default = [];
example =
[ { secret = "AHMYFPCQAHBM7LQPFXQ7WV6Y42IGUXJ5Y";
directory = "/home/user/sync_test";
useRelayServer = true;
useTracker = true;
useDHT = false;
searchLAN = true;
useSyncTrash = true;
knownHosts =
[ "192.168.1.2:4444"
"192.168.1.3:4444"
];
}
];
description = ''
Shared folder list. If enabled, web UI must be
disabled. Secrets can be generated using <literal>btsync
--generate-secret</literal>. Note that this secret will be
put inside the Nix store, so it is realistically not very
secret.
'';
};
};
};
config = mkIf cfg.enable {
assertions =
[ { assertion = cfg.deviceName != "";
message = "Device name cannot be empty.";
}
{ assertion = cfg.enableWebUI -> cfg.sharedFolders == [];
message = "If using shared folders, the web UI cannot be enabled.";
}
{ assertion = cfg.apiKey != "" -> cfg.enableWebUI;
message = "If you're using an API key, you must enable the web server.";
}
# TODO FIXME: the README says not specifying the login/pass means it
# should disable authentication, but apparently it doesn't?
{ assertion = cfg.enableWebUI -> cfg.httpLogin != "" && cfg.httpPass != "";
message = "If using the web UI, you must configure a login/password.";
}
# TODO FIXME: assert the existence of sharedFolder directories?
];
users.extraUsers.btsync = {
description = "Bittorrent Sync Service user";
home = "/var/lib/btsync";
createHome = true;
uid = config.ids.uids.btsync;
};
systemd.services.btsync = with pkgs; {
description = "Bittorrent Sync Service";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Restart = "on-abort";
User = "btsync";
ExecStart =
"${bittorrentSync}/bin/btsync --nodaemon --config ${configFile}";
};
};
systemd.services."btsync@" = with pkgs; {
description = "Bittorrent Sync Service for %i";
after = [ "network.target" ];
serviceConfig = {
Restart = "on-abort";
User = "%i";
ExecStart =
"${bittorrentSync}/bin/btsync --nodaemon --config %h/.config/btsync.conf";
};
};
environment.systemPackages = [ pkgs.bittorrentSync ];
};
}

View file

@ -171,6 +171,17 @@ in
'';
};
networking.firewall.pingLimit = mkOption {
default = null;
type = types.nullOr (types.separatedString " ");
description =
''
If pings are allowed, this allows setting rate limits
on them. If non-null, this option should be in the form
of flags like "-limit 1/minute -limit-burst 5"
'';
};
networking.firewall.checkReversePath = mkOption {
default = kernelHasRPFilter;
type = types.bool;
@ -375,7 +386,9 @@ in
# Optionally respond to ICMPv4 pings.
${optionalString cfg.allowPing ''
iptables -A nixos-fw -p icmp --icmp-type echo-request -j nixos-fw-accept
iptables -A nixos-fw -p icmp --icmp-type echo-request ${optionalString (cfg.pingLimit != null)
"-m limit ${cfg.pingLimit} "
}-j nixos-fw-accept
''}
# Accept all ICMPv6 messages except redirects and node

View file

@ -76,8 +76,9 @@ rec {
users.extraUsers = singleton {
name = "kippo";
description = "kippo web server privilege separation user";
uid = 108; # why does config.ids.uids.kippo give an error?
};
users.extraGroups = singleton { name = "kippo"; };
users.extraGroups = singleton { name = "kippo";gid=108; };
systemd.services.kippo = with pkgs; {
description = "Kippo Web Server";

View file

@ -0,0 +1,58 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.ngircd;
configFile = pkgs.stdenv.mkDerivation {
name = "ngircd.conf";
text = cfg.config;
preferLocalBuild = true;
buildCommand = ''
echo -n "$text" > $out
${cfg.package}/sbin/ngircd --config $out --configtest
'';
};
in {
options = {
services.ngircd = {
enable = mkEnableOption "the ngircd IRC server";
config = mkOption {
description = "The ngircd configuration (see ngircd.conf(5)).";
type = types.lines;
};
package = mkOption {
description = "The ngircd package.";
type = types.package;
default = pkgs.ngircd;
};
};
};
config = mkIf cfg.enable {
#!!! TODO: Use ExecReload (see https://github.com/NixOS/nixpkgs/issues/1988)
systemd.services.ngircd = {
description = "The ngircd IRC server";
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${cfg.package}/sbin/ngircd --config ${configFile} --nodaemon";
serviceConfig.User = "ngircd";
};
users.extraUsers.ngircd = {
uid = config.ids.uids.ngircd;
description = "ngircd user.";
};
};
}

View file

@ -0,0 +1,93 @@
{ config, pkgs, ... }:
let
cfg = config.services.notbit;
varDir = "/var/lib/notbit";
sendmail = pkgs.stdenv.mkDerivation {
name = "notbit-wrapper";
buildInputs = [ pkgs.makeWrapper ];
propagatedBuildInputs = [ pkgs.notbit ];
buildCommand = ''
mkdir -p $out/bin
makeWrapper ${pkgs.notbit}/bin/notbit-sendmail $out/bin/notbit-system-sendmail \
--set XDG_RUNTIME_DIR ${varDir}
'';
};
in
with pkgs.lib;
{
### configuration
options = {
services.notbit = {
enable = mkOption {
type = types.uniq types.bool;
default = false;
description = ''
Enables the notbit daemon and provides a sendmail binary named `notbit-system-sendmail` for sending mail over the system instance of notbit. Users must be in the notbit group in order to send mail over the system notbit instance. Currently mail recipt is not supported.
'';
};
port = mkOption {
type = types.uniq types.int;
default = 8443;
description = "The port which the daemon listens for other bitmessage clients";
};
nice = mkOption {
type = types.uniq types.int;
default = 10;
description = "Set the nice level for the notbit daemon";
};
};
};
### implementation
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.notbit sendmail ];
systemd.services.notbit = {
description = "Notbit daemon";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.notbit ];
environment = { XDG_RUNTIME_DIR = varDir; };
postStart = ''
[ ! -f "${varDir}/addr" ] && notbit-keygen > ${varDir}/addr
chmod 0640 ${varDir}/{addr,notbit/notbit-ipc.lock}
chmod 0750 ${varDir}/notbit/{,notbit-ipc}
'';
serviceConfig = {
Type = "forking";
ExecStart = "${pkgs.notbit}/bin/notbit -d -p ${toString cfg.port}";
User = "notbit";
Group = "notbit";
UMask = "0077";
WorkingDirectory = varDir;
Nice = cfg.nice;
};
};
users.extraUsers.notbit = {
group = "notbit";
description = "Notbit daemon user";
home = varDir;
createHome = true;
uid = config.ids.uids.notbit;
};
users.extraGroups.notbit.gid = config.ids.gids.notbit;
};
}

View file

@ -0,0 +1,75 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.searx;
configFile = cfg.configFile;
in
{
###### interface
options = {
services.searx = {
enable = mkOption {
default = false;
description = "
Whether to enable the Searx server. See https://github.com/asciimoo/searx
";
};
configFile = mkOption {
default = "";
description = "
The path of the Searx server configuration file. If no file
is specified, a default file is used (default config file has
debug mode enabled).
";
};
};
};
###### implementation
config = mkIf config.services.searx.enable {
users.extraUsers.searx =
{ uid = config.ids.uids.searx;
description = "Searx user";
createHome = true;
home = "/var/lib/searx";
};
users.extraGroups.searx =
{ gid = config.ids.gids.searx;
};
systemd.services.searx =
{
description = "Searx server, the meta search engine.";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = "searx";
ExecStart = "${pkgs.pythonPackages.searx}/bin/searx-run";
};
} // (optionalAttrs (configFile != "") {
environment.SEARX_SETTINGS_PATH = configFile;
});
environment.systemPackages = [ pkgs.pythonPackages.searx ];
};
}

View file

@ -5,16 +5,22 @@ with pkgs.lib;
let
cfg = config.services.elasticsearch;
es_home = "/var/lib/elasticsearch";
configFile = pkgs.writeText "elasticsearch.yml" ''
esConfig = ''
network.host: ${cfg.host}
network.port: ${cfg.port}
network.tcp.port: ${cfg.tcp_port}
network.port: ${toString cfg.port}
network.tcp.port: ${toString cfg.tcp_port}
cluster.name: ${cfg.cluster_name}
${cfg.extraConf}
'';
configDir = pkgs.buildEnv {
name = "elasticsearch-config";
paths = [
(pkgs.writeTextDir "elasticsearch.yml" esConfig)
(pkgs.writeTextDir "logging.yml" cfg.logging)
];
};
in {
###### interface
@ -34,14 +40,14 @@ in {
port = mkOption {
description = "Elasticsearch port to listen for HTTP traffic";
default = "9200";
type = types.str;
default = 9200;
type = types.int;
};
tcp_port = mkOption {
description = "Elasticsearch port for the node to node communication";
default = "9300";
type = types.str;
default = 9300;
type = types.int;
};
cluster_name = mkOption {
@ -79,27 +85,32 @@ in {
'';
type = types.str;
};
dataDir = mkOption {
type = types.path;
default = "/var/lib/elasticsearch";
description = ''
Data directory for elasticsearch.
'';
};
};
###### implementation
config = mkIf cfg.enable {
environment.etc = [
{ source = configFile;
target = "elasticsearch/elasticsearch.yml"; }
{ source = pkgs.writeText "logging.yml" cfg.logging;
target = "elasticsearch/logging.yml"; }
];
systemd.services.elasticsearch = {
description = "Elasticsearch daemon";
wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ];
environment = { ES_HOME = es_home; };
environment = { ES_HOME = cfg.dataDir; };
serviceConfig = {
ExecStart = "${pkgs.elasticsearch}/bin/elasticsearch -f -Des.path.conf=/etc/elasticsearch";
ExecStart = "${pkgs.elasticsearch}/bin/elasticsearch -f -Des.path.conf=${configDir}";
User = "elasticsearch";
};
preStart = ''
mkdir -m 0700 -p ${cfg.dataDir}
if [ "$(id -u)" = 0 ]; then chown -R elasticsearch ${cfg.dataDir}; fi
'';
};
environment.systemPackages = [ pkgs.elasticsearch ];
@ -108,8 +119,7 @@ in {
name = "elasticsearch";
uid = config.ids.uids.elasticsearch;
description = "Elasticsearch daemon user";
home = es_home;
createHome = true;
home = cfg.dataDir;
};
};
}

View file

@ -0,0 +1,114 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.solr;
in {
options = {
services.solr = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Enables the solr service.
'';
};
javaPackage = mkOption {
type = types.package;
default = pkgs.openjre;
description = ''
Which Java derivation to use for running solr.
'';
};
solrPackage = mkOption {
type = types.package;
default = pkgs.solr;
description = ''
Which solr derivation to use for running solr.
'';
};
log4jConfiguration = mkOption {
type = types.lines;
default = ''
log4j.rootLogger=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
'';
description = ''
Contents of the <literal>log4j.properties</literal> used. By default,
everything is logged to stdout (picked up by systemd) with level INFO.
'';
};
user = mkOption {
type = types.str;
description = ''
The user that should run the solr process and.
the working directories.
'';
};
group = mkOption {
type = types.str;
description = ''
The group that will own the working directory.
'';
};
solrHome = mkOption {
type = types.str;
description = ''
The solr home directory. It is your own responsibility to
make sure this directory contains a working solr configuration,
and is writeable by the the user running the solr service.
Failing to do so, the solr will not start properly.
'';
};
extraJavaOptions = mkOption {
type = types.listOf types.str;
default = [];
description = ''
Extra command line options given to the java process running
solr.
'';
};
extraWinstoneOptions = mkOption {
type = types.listOf types.str;
default = [];
description = ''
Extra command line options given to the Winstone, which is
the servlet container hosting solr.
'';
};
};
};
config = mkIf cfg.enable {
services.winstone.solr = {
serviceName = "solr";
inherit (cfg) user group javaPackage;
warFile = "${cfg.solrPackage}/lib/solr.war";
extraOptions = [
"--commonLibFolder=${cfg.solrPackage}/lib/ext"
] ++ cfg.extraWinstoneOptions;
extraJavaOptions = [
"-Dsolr.solr.home=${cfg.solrHome}"
"-Dlog4j.configuration=file://${pkgs.writeText "log4j.properties" cfg.log4jConfiguration}"
] ++ cfg.extraJavaOptions;
};
};
}

View file

@ -48,82 +48,25 @@ with pkgs.lib;
config = {
# FIXME: these are mostly copy/pasted from the systemd sources,
# which some small modifications, which is annoying.
systemd.services."getty@" =
{ baseUnit = pkgs.runCommand "getty.service" {}
''
sed '/ExecStart/ d' < ${config.systemd.package}/example/systemd/system/getty@.service > $out
'';
serviceConfig.ExecStart = "@${pkgs.utillinux}/sbin/agetty agetty --noclear --login-program ${pkgs.shadow}/bin/login %I 38400";
restartIfChanged = false;
};
# Generate a separate job for each tty.
systemd.units."getty@.service".text =
''
[Unit]
Description=Getty on %I
Documentation=man:agetty(8)
After=systemd-user-sessions.service plymouth-quit-wait.service
# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes
ConditionPathExists=/dev/tty0
[Service]
Environment=TERM=linux
Environment=LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive
ExecStart=@${pkgs.utillinux}/sbin/agetty agetty --noclear --login-program ${pkgs.shadow}/bin/login %I 38400
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes # set to no to prevent clearing the screen
KillMode=process
IgnoreSIGPIPE=no
# Some login implementations ignore SIGTERM, so we send SIGHUP
# instead, to ensure that login terminates cleanly.
KillSignal=SIGHUP
X-RestartIfChanged=false
'';
systemd.units."serial-getty@.service".text = let
speeds = with pkgs.lib; concatStringsSep "," (map toString config.services.mingetty.serialSpeed);
in ''
[Unit]
Description=Serial Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
BindsTo=dev-%i.device
After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes
[Service]
Environment=TERM=linux
Environment=LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive
ExecStart=@${pkgs.utillinux}/sbin/agetty agetty --login-program ${pkgs.shadow}/bin/login %I ${speeds}
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
# Some login implementations ignore SIGTERM, so we send SIGHUP
# instead, to ensure that login terminates cleanly.
KillSignal=SIGHUP
X-RestartIfChanged=false
'';
systemd.services."serial-getty@" =
{ baseUnit = pkgs.runCommand "serial-getty.service" {}
''
sed '/ExecStart/ d' < ${config.systemd.package}/example/systemd/system/serial-getty@.service > $out
'';
serviceConfig.ExecStart =
let speeds = concatStringsSep "," (map toString config.services.mingetty.serialSpeed);
in "@${pkgs.utillinux}/sbin/agetty agetty --login-program ${pkgs.shadow}/bin/login %I ${speeds}";
restartIfChanged = false;
};
environment.etc = singleton
{ # Friendly greeting on the virtual consoles.

View file

@ -44,6 +44,7 @@ in {
After=systemd-user-sessions.service
After=plymouth-quit-wait.service
After=systemd-logind.service
After=systemd-vconsole-setup.service
Requires=systemd-logind.service
Before=getty.target
Conflicts=getty@%i.service
@ -62,11 +63,13 @@ in {
X-RestartIfChanged=false
'';
systemd.units."autovt@.service".linkTarget = "${config.systemd.units."kmsconvt@.service".unit}/kmsconvt@.service";
systemd.units."autovt@.service".unit = pkgs.runCommand "unit" { }
''
mkdir -p $out
ln -s ${config.systemd.units."kmsconvt@.service".unit}/kmsconvt@.service $out/autovt@.service
'';
systemd.services."systemd-vconsole-setup".restartIfChanged = false;
systemd.units."kmsconvt@tty1.service".extraConfig.wait-for-vconsole-setup = "After=systemd-vconsole-setup.service";
systemd.services.systemd-vconsole-setup.restartIfChanged = false;
services.kmscon.extraConfig = mkIf cfg.hwRender ''
drm

View file

@ -9,6 +9,11 @@ let
user ${cfg.user} ${cfg.group};
daemon off;
${cfg.config}
${optionalString (cfg.httpConfig != "") ''
http {
${cfg.httpConfig}
}
''}
${cfg.appendConfig}
'';
in
@ -51,6 +56,12 @@ in
'';
};
httpConfig = mkOption {
type = types.lines;
default = "";
description = "Configuration lines to be appended inside of the http {} block.";
};
stateDir = mkOption {
default = "/var/spool/nginx";
description = "

View file

@ -0,0 +1,77 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.phpfpm;
stateDir = "/run/phpfpm";
pidFile = "${stateDir}/phpfpm.pid";
cfgFile = pkgs.writeText "phpfpm.conf" ''
[global]
pid = ${pidFile}
error_log = syslog
daemonize = yes
${cfg.extraConfig}
${concatStringsSep "\n" (mapAttrsToList (n: v: "[${n}]\n${v}") cfg.poolConfigs)}
'';
in {
options = {
services.phpfpm = {
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Extra configuration that should be put in the global section of
the PHP FPM configuration file. Do not specify the options
<literal>pid</literal>, <literal>error_log</literal> or
<literal>daemonize</literal> here, since they are generated by
NixOS.
'';
};
poolConfigs = mkOption {
type = types.attrsOf types.lines;
default = {};
example = {
mypool = ''
listen = /run/phpfpm/mypool
user = nobody
pm = dynamic
pm.max_children = 75
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 500
'';
};
description = ''
A mapping between PHP FPM pool names and their configurations.
See the documentation on <literal>php-fpm.conf</literal> for
details on configuration directives. If no pools are defined,
the phpfpm service is disabled.
'';
};
};
};
config = mkIf (cfg.poolConfigs != {}) {
systemd.services.phpfpm = {
wantedBy = [ "multi-user.target" ];
preStart = ''
mkdir -p "${stateDir}"
'';
serviceConfig = {
ExecStart = "${pkgs.php54}/sbin/php-fpm -y ${cfgFile}";
PIDFile = pidFile;
};
};
};
}

View file

@ -0,0 +1,129 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.winstone;
winstoneOpts = { name, ... }: {
options = {
name = mkOption {
default = name;
internal = true;
};
serviceName = mkOption {
type = types.str;
description = ''
The name of the systemd service. By default, it is
derived from the winstone instance name.
'';
};
warFile = mkOption {
type = types.str;
description = ''
The WAR file that Winstone should serve.
'';
};
javaPackage = mkOption {
type = types.package;
default = pkgs.openjre;
description = ''
Which Java derivation to use for running Winstone.
'';
};
user = mkOption {
type = types.str;
description = ''
The user that should run this Winstone process and
own the working directory.
'';
};
group = mkOption {
type = types.str;
description = ''
The group that will own the working directory.
'';
};
workDir = mkOption {
type = types.str;
description = ''
The working directory for this Winstone instance. Will
contain extracted webapps etc. The directory will be
created if it doesn't exist.
'';
};
extraJavaOptions = mkOption {
type = types.listOf types.str;
default = [];
description = ''
Extra command line options given to the java process running
Winstone.
'';
};
extraOptions = mkOption {
type = types.listOf types.str;
default = [];
description = ''
Extra command line options given to the Winstone process.
'';
};
};
config = {
workDir = mkDefault "/run/winstone/${name}";
serviceName = mkDefault "winstone-${name}";
};
};
mkService = cfg: let
opts = concatStringsSep " " (cfg.extraOptions ++ [
"--warfile ${cfg.warFile}"
]);
javaOpts = concatStringsSep " " (cfg.extraJavaOptions ++ [
"-Djava.io.tmpdir=${cfg.workDir}"
"-jar ${pkgs.winstone}/lib/winstone.jar"
]);
in {
wantedBy = [ "multi-user.target" ];
description = "winstone service for ${cfg.name}";
preStart = ''
mkdir -p "${cfg.workDir}"
chown ${cfg.user}:${cfg.group} "${cfg.workDir}"
'';
serviceConfig = {
ExecStart = "${cfg.javaPackage}/bin/java ${javaOpts} ${opts}";
User = cfg.user;
PermissionsStartOnly = true;
};
};
in {
options = {
services.winstone = mkOption {
default = {};
type = types.attrsOf types.optionSet;
options = [ winstoneOpts ];
description = ''
Defines independent Winstone services, each serving one WAR-file.
'';
};
};
config = mkIf (cfg != {}) {
systemd.services = mapAttrs' (n: c: nameValuePair c.serviceName (mkService c)) cfg;
};
}

View file

@ -17,7 +17,7 @@ in
# Note: the order in which desktop manager modules are imported here
# determines the default: later modules (if enabled) are preferred.
# E.g., if KDE is enabled, it supersedes xterm.
imports = [ ./none.nix ./xterm.nix ./xfce.nix ./kde4.nix ./e17.nix ./gnome3.nix ];
imports = [ ./none.nix ./xterm.nix ./xfce.nix ./kde4.nix ./e17.nix ./gnome3.nix ./xbmc.nix ];
options = {

View file

@ -43,7 +43,7 @@ in {
'';
};
environment.variables.GIO_EXTRA_MODULES = "${gnome3.dconf}/lib/gio/modules";
environment.variables.GIO_EXTRA_MODULES = [ "${gnome3.dconf}/lib/gio/modules" ];
environment.systemPackages =
[ gnome3.evince
gnome3.eog

View file

@ -0,0 +1,31 @@
{ pkgs, config, ... }:
with pkgs.lib;
let
cfg = config.services.xserver.desktopManager.xbmc;
in
{
options = {
services.xserver.desktopManager.xbmc = {
enable = mkOption {
default = false;
example = true;
description = "Enable the xbmc multimedia center.";
};
};
};
config = mkIf cfg.enable {
services.xserver.desktopManager.session = [{
name = "xbmc";
start = ''
${pkgs.xbmc}/bin/xbmc --lircdev /var/run/lirc/lircd --standalone &
waitPID=$!
'';
}];
environment.systemPackages = [ pkgs.xbmc ];
};
}

View file

@ -81,7 +81,7 @@ in
environment.pathsToLink =
[ "/share/xfce4" "/share/themes" "/share/mime" "/share/desktop-directories" "/share/gtksourceview-2.0" ];
environment.variables.GIO_EXTRA_MODULES = "${pkgs.xfce.gvfs}/lib/gio/modules";
environment.variables.GIO_EXTRA_MODULES = [ "${pkgs.xfce.gvfs}/lib/gio/modules" ];
# Enable helpful DBus services.
services.udisks2.enable = true;

View file

@ -16,7 +16,6 @@ in
./wmii.nix
./xmonad.nix
./i3.nix
./xbmc.nix
./herbstluftwm.nix
];

View file

@ -1,31 +0,0 @@
{pkgs, config, ...}:
let
inherit (pkgs.lib) mkOption mkIf;
cfg = config.services.xserver.windowManager.xbmc;
in
{
options = {
services.xserver.windowManager.xbmc = {
enable = mkOption {
default = false;
example = true;
description = "Enable the xbmc multimedia center.";
};
};
};
config = mkIf cfg.enable {
services.xserver.windowManager = {
session = [{
name = "xbmc";
start = "
${pkgs.xbmc}/bin/xbmc --lircdev /var/run/lirc/lircd --standalone &
waitPID=$!
";
}];
};
environment.systemPackages = [ pkgs.xbmc ];
};
}

View file

@ -128,7 +128,7 @@ while (my ($unit, $state) = each %{$activePrev}) {
$baseName =~ s/\.[a-z]*$//;
if (-e $prevUnitFile && ($state->{state} eq "active" || $state->{state} eq "activating")) {
if (! -e $newUnitFile) {
if (! -e $newUnitFile || abs_path($newUnitFile) eq "/dev/null") {
push @unitsToStop, $unit;
}

View file

@ -203,6 +203,9 @@ in
# To wait for SCSI devices to appear.
"scsi_wait_scan"
# Needed by the stage 2 init script.
"rtc_cmos"
];
boot.initrd.kernelModules =

View file

@ -131,13 +131,12 @@ if ! mountpoint -q /run; then
mount -t tmpfs -o "mode=0755,size=@runSize@" none /run
fi
# Create a ramfs on /run/keys to hold secrets that shouldn't
# be written to disk (generally used for nixops, harmless
# elsehwere)
# Create a ramfs on /run/keys to hold secrets that shouldn't be
# written to disk (generally used for NixOps, harmless elsewhere).
if ! mountpoint -q /run/keys; then
rm -rf /run/keys
mkdir -m 0750 /run/keys
chown root:keys /run/keys
chown 0:96 /run/keys
mount -t ramfs none /run/keys
fi
@ -162,6 +161,12 @@ echo "running activation script..."
$systemConfig/activate
# Restore the system time from the hardware clock. We do this after
# running the activation script to be sure that /etc/localtime points
# at the current time zone.
hwclock --hctosys
# Record the boot configuration.
ln -sfn "$systemConfig" /run/booted-system

View file

@ -41,6 +41,12 @@ in rec {
'';
};
baseUnit = mkOption {
type = types.nullOr types.path;
default = null;
description = "Path to an upstream unit file on which the NixOS unit configuration will be based.";
};
description = mkOption {
default = "";
type = types.str;
@ -135,6 +141,7 @@ in rec {
restartTriggers = mkOption {
default = [];
type = types.listOf types.unspecified;
description = ''
An arbitrary list of items such as derivations. If any item
in the list changes between reconfigurations, the service will

View file

@ -11,20 +11,18 @@ let
systemd = cfg.package;
makeUnit = name: unit:
pkgs.runCommand "unit" { preferLocalBuild = true; inherit (unit) text; }
((if !unit.enable then ''
mkdir -p $out
ln -s /dev/null $out/${name}
'' else if unit.linkTarget != null then ''
mkdir -p $out
ln -s ${unit.linkTarget} $out/${name}
'' else if unit.text != null then ''
mkdir -p $out
echo -n "$text" > $out/${name}
'' else "") + optionalString (unit.extraConfig != {}) ''
mkdir -p $out/${name}.d
${concatStringsSep "\n" (mapAttrsToList (n: v: "echo -n \"${v}\" > $out/${name}.d/${n}") unit.extraConfig)}
'');
if unit.enable then
pkgs.runCommand "unit" { preferLocalBuild = true; inherit (unit) text; }
''
mkdir -p $out
echo -n "$text" > $out/${name}
''
else
pkgs.runCommand "unit" { preferLocalBuild = true; }
''
mkdir -p $out
ln -s /dev/null $out/${name}
'';
upstreamUnits =
[ # Targets.
@ -132,6 +130,11 @@ let
++ optionals cfg.enableEmergencyMode [
"emergency.target"
"emergency.service"
]
++ optionals config.services.journald.enableHttpGateway [
"systemd-journal-gatewayd.socket"
"systemd-journal-gatewayd.service"
];
upstreamWants =
@ -151,15 +154,23 @@ let
unitConfig = { name, config, ... }: {
config = {
unitConfig =
{ Requires = concatStringsSep " " config.requires;
Wants = concatStringsSep " " config.wants;
After = concatStringsSep " " config.after;
Before = concatStringsSep " " config.before;
BindsTo = concatStringsSep " " config.bindsTo;
PartOf = concatStringsSep " " config.partOf;
Conflicts = concatStringsSep " " config.conflicts;
"X-Restart-Triggers" = toString config.restartTriggers;
} // optionalAttrs (config.description != "") {
optionalAttrs (config.requires != [])
{ Requires = toString config.requires; }
// optionalAttrs (config.wants != [])
{ Wants = toString config.wants; }
// optionalAttrs (config.after != [])
{ After = toString config.after; }
// optionalAttrs (config.before != [])
{ Before = toString config.before; }
// optionalAttrs (config.bindsTo != [])
{ BindsTo = toString config.bindsTo; }
// optionalAttrs (config.partOf != [])
{ PartOf = toString config.partOf; }
// optionalAttrs (config.conflicts != [])
{ Conflicts = toString config.conflicts; }
// optionalAttrs (config.restartTriggers != [])
{ X-Restart-Triggers = toString config.restartTriggers; }
// optionalAttrs (config.description != "") {
Description = config.description;
};
};
@ -167,7 +178,7 @@ let
serviceConfig = { name, config, ... }: {
config = mkMerge
[ { # Default path for systemd services. Should be quite minimal.
[ (mkIf (config.baseUnit == null) { # Default path for systemd services. Should be quite minimal.
path =
[ pkgs.coreutils
pkgs.findutils
@ -176,7 +187,7 @@ let
systemd
];
environment.PATH = config.path;
}
})
(mkIf (config.preStart != "")
{ serviceConfig.ExecStartPre = makeJobScript "${name}-pre-start" ''
#! ${pkgs.stdenv.shell} -e
@ -244,6 +255,14 @@ let
(if isList value then value else [value]))
as));
commonUnitText = def:
optionalString (def.baseUnit != null) ''
.include ${def.baseUnit}
'' + ''
[Unit]
${attrsToSection def.unitConfig}
'';
targetToUnit = name: def:
{ inherit (def) wantedBy requiredBy enable;
text =
@ -255,11 +274,8 @@ let
serviceToUnit = name: def:
{ inherit (def) wantedBy requiredBy enable;
text =
text = commonUnitText def +
''
[Unit]
${attrsToSection def.unitConfig}
[Service]
${let env = cfg.globalEnvironment // def.environment;
in concatMapStrings (n: "Environment=\"${n}=${getAttr n env}\"\n") (attrNames env)}
@ -271,11 +287,8 @@ let
socketToUnit = name: def:
{ inherit (def) wantedBy requiredBy enable;
text =
text = commonUnitText def +
''
[Unit]
${attrsToSection def.unitConfig}
[Socket]
${attrsToSection def.socketConfig}
${concatStringsSep "\n" (map (s: "ListenStream=${s}") def.listenStreams)}
@ -284,11 +297,8 @@ let
timerToUnit = name: def:
{ inherit (def) wantedBy requiredBy enable;
text =
text = commonUnitText def +
''
[Unit]
${attrsToSection def.unitConfig}
[Timer]
${attrsToSection def.timerConfig}
'';
@ -296,11 +306,8 @@ let
mountToUnit = name: def:
{ inherit (def) wantedBy requiredBy enable;
text =
text = commonUnitText def +
''
[Unit]
${attrsToSection def.unitConfig}
[Mount]
${attrsToSection def.mountConfig}
'';
@ -308,11 +315,8 @@ let
automountToUnit = name: def:
{ inherit (def) wantedBy requiredBy enable;
text =
text = commonUnitText def +
''
[Unit]
${attrsToSection def.unitConfig}
[Automount]
${attrsToSection def.automountConfig}
'';
@ -372,6 +376,10 @@ let
ln -s ../local-fs.target ../remote-fs.target ../network.target ../nss-lookup.target \
../nss-user-lookup.target ../swap.target $out/multi-user.target.wants/
${ optionalString config.services.journald.enableHttpGateway ''
ln -s ../systemd-journal-gatewayd.service $out/multi-user-target.wants/
''}
''; # */
in
@ -423,25 +431,9 @@ in
internal = true;
description = "The generated unit.";
};
linkTarget = mkOption {
default = null;
description = "The file to symlink this target to.";
type = types.nullOr types.path;
};
extraConfig = mkOption {
default = {};
example = { "foo@1.conf" = "X-RestartIfChanged=false"; };
type = types.attrsOf types.lines;
description = ''
Extra files to be appended to the configuration for the unit.
This can be used to override configuration for a unit provided
by systemd or another package, or to override only a single instance
of a template unit.
'';
};
};
config = {
unit = makeUnit name config;
unit = mkDefault (makeUnit name config);
};
};
};
@ -567,6 +559,14 @@ in
'';
};
services.journald.enableHttpGateway = mkOption {
default = false;
type = types.bool;
description = ''
Enable journal http gateway
'';
};
services.logind.extraConfig = mkOption {
default = "";
type = types.lines;
@ -676,6 +676,8 @@ in
};
users.extraGroups.systemd-journal.gid = config.ids.gids.systemd-journal;
users.extraUsers.systemd-journal-gateway.uid = config.ids.uids.systemd-journal-gateway;
users.extraGroups.systemd-journal-gateway.gid = config.ids.gids.systemd-journal-gateway;
# Generate timer units for all services that have a startAt value.
systemd.timers =

View file

@ -19,6 +19,8 @@ let
sources = map (x: x.source) etc';
targets = map (x: x.target) etc';
modes = map (x: x.mode) etc';
uids = map (x: x.uid) etc';
gids = map (x: x.gid) etc';
};
in
@ -87,6 +89,24 @@ in
'';
};
uid = mkOption {
default = 0;
type = types.int;
description = ''
UID of created file. Only takes affect when the file is
copied (that is, the mode is not 'symlink').
'';
};
gid = mkOption {
default = 0;
type = types.int;
description = ''
GID of created file. Only takes affect when the file is
copied (that is, the mode is not 'symlink').
'';
};
};
config = {

View file

@ -6,6 +6,8 @@ set -f
sources_=($sources)
targets_=($targets)
modes_=($modes)
uids_=($uids)
gids_=($gids)
set +f
for ((i = 0; i < ${#targets_[@]}; i++)); do
@ -35,6 +37,8 @@ for ((i = 0; i < ${#targets_[@]}; i++)); do
if test "${modes_[$i]}" != symlink; then
echo "${modes_[$i]}" > $out/etc/$target.mode
echo "${uids_[$i]}" > $out/etc/$target.uid
echo "${gids_[$i]}" > $out/etc/$target.gid
fi
fi

View file

@ -60,7 +60,15 @@ sub link {
if ($mode eq "direct-symlink") {
atomicSymlink readlink("$static/$fn"), $target or warn;
} else {
open UID, "<$_.uid";
my $uid = <UID>; chomp $uid;
close UID;
open GID, "<$_.gid";
my $gid = <GID>; chomp $gid;
close GID;
copy "$static/$fn", "$target.tmp" or warn;
chown int($uid), int($gid), "$target.tmp" or warn;
chmod oct($mode), "$target.tmp" or warn;
rename "$target.tmp", $target or warn;
}

View file

@ -11,18 +11,30 @@ with pkgs.lib;
let
cfgSpl = config.boot.spl;
cfgSnapshots = config.services.zfs.autoSnapshot;
inInitrd = any (fs: fs == "zfs") config.boot.initrd.supportedFilesystems;
inSystem = any (fs: fs == "zfs") config.boot.supportedFilesystems;
enableAutoSnapshots = cfgSnapshots.enable;
enableZfs = inInitrd || inSystem || enableAutoSnapshots;
kernel = config.boot.kernelPackages;
autosnapPkg = pkgs.zfstools.override {
zfs = config.boot.kernelPackages.zfs;
};
zfsAutoSnap = "${autosnapPkg}/bin/zfs-auto-snapshot";
in
{
###### interface
options = {
boot.spl.hostid = mkOption {
options = {
boot.spl.hostid = mkOption {
default = "";
example = "0xdeadbeef";
description = ''
@ -34,62 +46,177 @@ in
manually import pools.
'';
};
services.zfs.autoSnapshot = {
enable = mkOption {
default = false;
type = types.bool;
description = ''
Enable the (OpenSolaris-compatible) ZFS auto-snapshotting service.
Note that you must set the <literal>com.sun:auto-snapshot</literal>
property to <literal>true</literal> on all datasets which you wish
to auto-snapshot.
You can override a child dataset to use, or not use auto-snapshotting
by setting its flag with the given interval:
<literal>zfs set com.sun:auto-snapshot:weekly=false DATASET</literal>
'';
};
frequent = mkOption {
default = 4;
type = types.int;
description = ''
Number of frequent (15-minute) auto-snapshots that you wish to keep.
'';
};
hourly = mkOption {
default = 24;
type = types.int;
description = ''
Number of hourly auto-snapshots that you wish to keep.
'';
};
daily = mkOption {
default = 7;
type = types.int;
description = ''
Number of daily auto-snapshots that you wish to keep.
'';
};
weekly = mkOption {
default = 4;
type = types.int;
description = ''
Number of weekly auto-snapshots that you wish to keep.
'';
};
monthly = mkOption {
default = 12;
type = types.int;
description = ''
Number of monthly auto-snapshots that you wish to keep.
'';
};
};
};
###### implementation
config = mkIf ( inInitrd || inSystem ) {
boot = {
kernelModules = [ "spl" "zfs" ] ;
extraModulePackages = [ kernel.zfs kernel.spl ];
extraModprobeConfig = mkIf (cfgSpl.hostid != "") ''
options spl spl_hostid=${cfgSpl.hostid}
'';
};
boot.initrd = mkIf inInitrd {
kernelModules = [ "spl" "zfs" ] ;
extraUtilsCommands =
''
cp -v ${kernel.zfs}/sbin/zfs $out/bin
cp -v ${kernel.zfs}/sbin/zdb $out/bin
cp -v ${kernel.zfs}/sbin/zpool $out/bin
cp -pdv ${kernel.zfs}/lib/lib*.so* $out/lib
cp -pdv ${pkgs.zlib}/lib/lib*.so* $out/lib
config = mkMerge [
(mkIf enableZfs {
boot = {
kernelModules = [ "spl" "zfs" ] ;
extraModulePackages = [ kernel.zfs kernel.spl ];
extraModprobeConfig = mkIf (cfgSpl.hostid != "") ''
options spl spl_hostid=${cfgSpl.hostid}
'';
postDeviceCommands =
''
zpool import -f -a -d /dev
'';
};
systemd.services."zpool-import" = {
description = "Import zpools";
after = [ "systemd-udev-settle.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
restartIfChanged = false;
ExecStart = "${kernel.zfs}/sbin/zpool import -f -a -d /dev";
};
};
systemd.services."zfs-mount" = {
description = "Mount ZFS Volumes";
after = [ "zpool-import.service" ];
wantedBy = [ "local-fs.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
restartIfChanged = false;
ExecStart = "${kernel.zfs}/sbin/zfs mount -a";
ExecStop = "${kernel.zfs}/sbin/zfs umount -a";
boot.initrd = mkIf inInitrd {
kernelModules = [ "spl" "zfs" ] ;
extraUtilsCommands =
''
cp -v ${kernel.zfs}/sbin/zfs $out/bin
cp -v ${kernel.zfs}/sbin/zdb $out/bin
cp -v ${kernel.zfs}/sbin/zpool $out/bin
cp -pdv ${kernel.zfs}/lib/lib*.so* $out/lib
cp -pdv ${pkgs.zlib}/lib/lib*.so* $out/lib
'';
postDeviceCommands =
''
zpool import -f -a
'';
};
};
system.fsPackages = [ kernel.zfs ]; # XXX: needed? zfs doesn't have (need) a fsck
environment.systemPackages = [ kernel.zfs ];
services.udev.packages = [ kernel.zfs ]; # to hook zvol naming, etc.
};
systemd.services."zpool-import" = {
description = "Import zpools";
after = [ "systemd-udev-settle.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${kernel.zfs}/sbin/zpool import -f -a";
};
restartIfChanged = false;
};
systemd.services."zfs-mount" = {
description = "Mount ZFS Volumes";
after = [ "zpool-import.service" ];
wantedBy = [ "local-fs.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${kernel.zfs}/sbin/zfs mount -a";
ExecStop = "${kernel.zfs}/sbin/zfs umount -a";
};
restartIfChanged = false;
};
system.fsPackages = [ kernel.zfs ]; # XXX: needed? zfs doesn't have (need) a fsck
environment.systemPackages = [ kernel.zfs ];
services.udev.packages = [ kernel.zfs ]; # to hook zvol naming, etc.
})
(mkIf enableAutoSnapshots {
systemd.services."zfs-snapshot-frequent" = {
description = "ZFS auto-snapshotting every 15 mins";
after = [ "zpool-import.service" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "${zfsAutoSnap} frequent ${toString cfgSnapshots.frequent}";
};
restartIfChanged = false;
startAt = "*:15,30,45";
};
systemd.services."zfs-snapshot-hourly" = {
description = "ZFS auto-snapshotting every hour";
after = [ "zpool-import.service" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "${zfsAutoSnap} hourly ${toString cfgSnapshots.hourly}";
};
restartIfChanged = false;
startAt = "hourly";
};
systemd.services."zfs-snapshot-daily" = {
description = "ZFS auto-snapshotting every day";
after = [ "zpool-import.service" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "${zfsAutoSnap} daily ${toString cfgSnapshots.daily}";
};
restartIfChanged = false;
startAt = "daily";
};
systemd.services."zfs-snapshot-weekly" = {
description = "ZFS auto-snapshotting every week";
after = [ "zpool-import.service" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "${zfsAutoSnap} weekly ${toString cfgSnapshots.weekly}";
};
restartIfChanged = false;
startAt = "weekly";
};
systemd.services."zfs-snapshot-monthly" = {
description = "ZFS auto-snapshotting every month";
after = [ "zpool-import.service" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "${zfsAutoSnap} monthly ${toString cfgSnapshots.monthly}";
};
restartIfChanged = false;
startAt = "monthly";
};
})
];
}

View file

@ -50,6 +50,26 @@ let
'';
};
ipv6Address = mkOption {
default = null;
example = "2001:1470:fffd:2098::e006";
type = types.nullOr types.string;
description = ''
IPv6 address of the interface. Leave empty to configure the
interface using NDP.
'';
};
ipv6prefixLength = mkOption {
default = 64;
example = 64;
type = types.int;
description = ''
Subnet mask of the interface, specified as the number of
bits in the prefix (<literal>64</literal>).
'';
};
macAddress = mkOption {
default = null;
example = "00:11:22:33:44:55";
@ -401,9 +421,11 @@ in
EOF
# Disable or enable IPv6.
if [ -e /proc/sys/net/ipv6/conf/all/disable_ipv6 ]; then
echo ${if cfg.enableIPv6 then "0" else "1"} > /proc/sys/net/ipv6/conf/all/disable_ipv6
fi
${optionalString (!config.boot.isContainer) ''
if [ -e /proc/sys/net/ipv6/conf/all/disable_ipv6 ]; then
echo ${if cfg.enableIPv6 then "0" else "1"} > /proc/sys/net/ipv6/conf/all/disable_ipv6
fi
''}
# Set the default gateway.
${optionalString (cfg.defaultGateway != "") ''
@ -435,6 +457,7 @@ in
(let mask =
if i.prefixLength != null then toString i.prefixLength else
if i.subnetMask != "" then i.subnetMask else "32";
staticIPv6 = cfg.enableIPv6 && i.ipv6Address != null;
in
{ description = "Configuration of ${i.name}";
wantedBy = [ "network-interfaces.target" ];
@ -468,11 +491,31 @@ in
echo "configuring interface..."
ip -4 addr flush dev "${i.name}"
ip -4 addr add "${i.ipAddress}/${mask}" dev "${i.name}"
restart_network_setup=true
else
echo "skipping configuring interface"
fi
''
+ optionalString (staticIPv6)
''
# Only do a flush/add if it's necessary. This is
# useful when the Nix store is accessed via this
# interface (e.g. in a QEMU VM test).
if ! ip -6 -o a show dev "${i.name}" | grep "${i.ipv6Address}/${toString i.ipv6prefixLength}"; then
echo "configuring interface..."
ip -6 addr flush dev "${i.name}"
ip -6 addr add "${i.ipv6Address}/${toString i.ipv6prefixLength}" dev "${i.name}"
restart_network_setup=true
else
echo "skipping configuring interface"
fi
''
+ optionalString (i.ipAddress != null || staticIPv6)
''
if [ restart_network_setup = true ]; then
# Ensure that the default gateway remains set.
# (Flushing this interface may have removed it.)
${config.systemd.package}/bin/systemctl try-restart --no-block network-setup.service
else
echo "skipping configuring interface"
fi
${config.systemd.package}/bin/systemctl start ip-up.target
''

View file

@ -14,6 +14,7 @@ with import ../lib/testing.nix { inherit system minimal; };
efi-installer = makeTests (import ./efi-installer.nix);
gnome3 = makeTest (import ./gnome3.nix);
ipv6 = makeTest (import ./ipv6.nix);
jenkins = makeTest (import ./jenkins.nix);
kde4 = makeTest (import ./kde4.nix);
#kexec = makeTest (import ./kexec.nix);
login = makeTest (import ./login.nix {});

35
nixos/tests/jenkins.nix Normal file
View file

@ -0,0 +1,35 @@
# verifies:
# 1. jenkins service starts on master node
# 2. jenkins user can be extended on both master and slave
# 3. jenkins service not started on slave node
{ pkgs, ... }:
{
nodes = {
master = { pkgs, config, ... }: {
services.jenkins.enable = true;
# should have no effect
services.jenkinsSlave.enable = true;
users.extraUsers.jenkins.extraGroups = [ "users" ];
};
slave = { pkgs, config, ... }: {
services.jenkinsSlave.enable = true;
users.extraUsers.jenkins.extraGroups = [ "users" ];
};
};
testScript = ''
startAll;
$master->waitForUnit("jenkins");
print $master->execute("sudo -u jenkins groups");
$master->mustSucceed("sudo -u jenkins groups | grep jenkins | grep users");
print $slave->execute("sudo -u jenkins groups");
$slave->mustSucceed("sudo -u jenkins groups | grep jenkins | grep users");
$slave->mustFail("systemctl status jenkins.service");
'';
}

View file

@ -22,6 +22,6 @@ stdenv.mkDerivation rec {
description = "Daemon for exposing legacy ALSA sequencer applications in JACK MIDI system";
license = licenses.gpl2;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,27 @@
{ stdenv, fetchurl, cairo, gtk, gtkmm, lv2, lvtk, pkgconfig, python }:
stdenv.mkDerivation rec {
name = "ams-lv2-${version}";
version = "1.0.2";
src = fetchurl {
url = "https://github.com/blablack/ams-lv2/archive/v${version}.tar.gz";
sha256 = "0fa1ghf6qahbhj9j1ciyw0hr6nngwksa37hbs651mlz0fn7lz4xm";
};
buildInputs = [ cairo gtk gtkmm lv2 lvtk pkgconfig python ];
configurePhase = "python waf configure --prefix=$out";
buildPhase = "python waf";
installPhase = "python waf install";
meta = with stdenv.lib; {
description = "An LV2 port of the internal modules found in Alsa Modular Synth";
homepage = http://objectivewave.wordpress.com/ams-lv2;
license = licenses.gpl3;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
};
}

View file

@ -1,62 +0,0 @@
{ stdenv, fetchgit, alsaLib, aubio, boost, cairomm, curl, fftw
, fftwSinglePrec, flac, glibc, glibmm, gtk, gtkmm, jackaudio
, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
, libusb, libuuid, libxml2, libxslt, lilv, lv2, makeWrapper, pango
, perl, pkgconfig, python, serd, sord, sratom, suil }:
let
tag = "3.5.357";
in
stdenv.mkDerivation rec {
name = "ardour-${tag}";
src = fetchgit {
url = git://git.ardour.org/ardour/ardour.git;
rev = "refs/tags/${tag}";
sha256 = "1e026fb9a6ad4179d52c4b578cc3861bdfd3629b9e7b7a7341d431c7d3692c42";
};
buildInputs =
[ alsaLib aubio boost cairomm curl fftw fftwSinglePrec flac glibc
glibmm gtk gtkmm jackaudio libgnomecanvas libgnomecanvasmm liblo
libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv lv2
makeWrapper pango perl pkgconfig python serd sord sratom suil
];
patchPhase = ''
# The funny revision number is from `git describe rev`
printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${tag}-gce4d125\"; }\n' > libs/ardour/revision.cc
# Note the different version number
sed -i '33i rev = \"3.5-357-gce4d125\"' wscript
sed 's|/usr/include/libintl.h|${glibc}/include/libintl.h|' -i wscript
sed -e 's|^#!/usr/bin/perl.*$|#!${perl}/bin/perl|g' -i tools/fmt-bindings
sed -e 's|^#!/usr/bin/env.*$|#!${perl}/bin/perl|g' -i tools/*.pl
'';
configurePhase = "python waf configure --optimize --prefix=$out";
buildPhase = "python waf";
# For the custom ardour clearlooks gtk-engine to work, it must be
# moved to a directory called "engines" and added to GTK_PATH
installPhase = ''
python waf install
mkdir -pv $out/gtk2/engines
cp build/libs/clearlooks-newer/libclearlooks.so $out/gtk2/engines/
wrapProgram $out/bin/ardour3 --prefix GTK_PATH : $out/gtk2
'';
meta = with stdenv.lib; {
description = "Multi-track hard disk recording software";
longDescription = ''
Also read "The importance of Paying Something" on their homepage, please!
'';
homepage = http://ardour.org/;
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ maintainers.goibhniu ];
};
}

View file

@ -1,51 +1,62 @@
{ stdenv, fetchurl, scons, boost, pkgconfig, fftw, librdf_raptor2
, librdf_rasqal, jackaudio, flac, libsamplerate, alsaLib, libxml2
, lilv, lv2, serd, sord, sratom, suil # these are probably optional
, libxslt, libsndfile, libsigcxx, libusb, cairomm, glib, pango
, gtk, glibmm, gtkmm, libgnomecanvas, libgnomecanvasmm, liblo, aubio
, fftwSinglePrec, libmad, automake, autoconf, libtool, liblrdf, curl }:
{ stdenv, fetchgit, alsaLib, aubio, boost, cairomm, curl, fftw
, fftwSinglePrec, flac, glibc, glibmm, gtk, gtkmm, jackaudio
, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
, libusb, libuuid, libxml2, libxslt, lilv, lv2, makeWrapper, pango
, perl, pkgconfig, python, serd, sord, sratom, suil }:
let
tag = "3.5.357";
in
stdenv.mkDerivation rec {
name = "ardour-${version}";
version = "2.8.16";
name = "ardour-${tag}";
src = fetchurl {
url = "mirror://gentoo/distfiles/${name}.tar.bz2";
sha256 = "0h2y0x4yznalllja53anjil2gmgcb26f39zshc4gl1d1kc8k5vip";
src = fetchgit {
url = git://git.ardour.org/ardour/ardour.git;
rev = "refs/tags/${tag}";
sha256 = "1e026fb9a6ad4179d52c4b578cc3861bdfd3629b9e7b7a7341d431c7d3692c42";
};
postPatch = ''
#sed -e "s#/usr/bin/which#type -P#" -i libs/glibmm2/autogen.sh
echo '#include "ardour/svn_revision.h"' > libs/ardour/svn_revision.cc
echo -e 'namespace ARDOUR {\n extern const char* svn_revision = "2.8.12";\n }\n' >> libs/ardour/svn_revision.cc
buildInputs =
[ alsaLib aubio boost cairomm curl fftw fftwSinglePrec flac glibc
glibmm gtk gtkmm jackaudio libgnomecanvas libgnomecanvasmm liblo
libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv lv2
makeWrapper pango perl pkgconfig python serd sord sratom suil
];
patchPhase = ''
# The funny revision number is from `git describe rev`
printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${tag}-gce4d125\"; }\n' > libs/ardour/revision.cc
# Note the different version number
sed -i '33i rev = \"3.5-357-gce4d125\"' wscript
sed 's|/usr/include/libintl.h|${glibc}/include/libintl.h|' -i wscript
sed -e 's|^#!/usr/bin/perl.*$|#!${perl}/bin/perl|g' -i tools/fmt-bindings
sed -e 's|^#!/usr/bin/env.*$|#!${perl}/bin/perl|g' -i tools/*.pl
'';
buildInputs = [
scons boost pkgconfig fftw librdf_raptor2 librdf_rasqal jackaudio
flac libsamplerate alsaLib libxml2 libxslt libsndfile libsigcxx
#lilv lv2 serd sord sratom suil
libusb cairomm glib pango gtk glibmm gtkmm libgnomecanvas libgnomecanvasmm liblrdf
liblo aubio fftwSinglePrec libmad autoconf automake libtool curl
];
configurePhase = "python waf configure --optimize --prefix=$out";
buildPhase = ''
mkdir -p $out
export CXX=g++
scons PREFIX=$out SYSLIBS=1 install
buildPhase = "python waf";
# For the custom ardour clearlooks gtk-engine to work, it must be
# moved to a directory called "engines" and added to GTK_PATH
installPhase = ''
python waf install
mkdir -pv $out/gtk2/engines
cp build/libs/clearlooks-newer/libclearlooks.so $out/gtk2/engines/
wrapProgram $out/bin/ardour3 --prefix GTK_PATH : $out/gtk2
'';
installPhase = ":";
meta = {
meta = with stdenv.lib; {
description = "Multi-track hard disk recording software";
longDescription = ''
Broken: use ardour3-svn instead
Also read "The importance of Paying Something" on their homepage, please!
'';
homepage = http://ardour.org/;
branch = "2";
license = "GPLv2";
maintainers = [ stdenv.lib.maintainers.marcweber ];
platforms = stdenv.lib.platforms.linux;
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ maintainers.goibhniu ];
};
}

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "drumkv1-${version}";
version = "0.3.6";
version = "0.4.0";
src = fetchurl {
url = "mirror://sourceforge/drumkv1/${name}.tar.gz";
sha256 = "13prman3jlh3xz56675vnnnghnmmbxpq8gqdhv5llgd8ggzhmyjn";
sha256 = "0bhj4liv6c0rw0gsh1zygj4a9vmwl3jdz2j6zzdxbqdk21xq4zpz";
};
buildInputs = [ jackaudio libsndfile lv2 qt4 ];

View file

@ -0,0 +1,39 @@
{ stdenv, fetchurl, pkgconfig
, libsndfile, pulseaudio
}:
let
version = "5.8.2";
in stdenv.mkDerivation rec {
name = "ekho-${version}";
meta = with stdenv.lib; {
description = "Chinese text-to-speech software";
homepage = "http://www.eguidedog.net/ekho.php";
longDescription = ''
Ekho () is a free, open source and multilingual text-to-speech (TTS)
software. It supports Cantonese (Chinese dialect spoken in Hong Kong and
part of Guangdong province), Mandarin (standard Chinese), Zhaoan Hakka
(a dialect in Taiwan), Tibetan, Ngangien (an ancient Chinese before
Yuan Dynasty) and Korean (in trial).
'';
license = licenses.gpl2Plus;
platforms = platforms.linux;
hydraPlatforms = [];
maintainers = with maintainers; [ iyzsong ];
};
src = fetchurl {
url = "mirror://sourceforge/e-guidedog/Ekho/${version}/${name}.tar.xz";
sha256 = "0ym6lpcpsvwvsiwlzkl1509a2hljwcw7synngrmqjq1n49ww00nj";
};
preConfigure = with stdenv.lib; ''
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE ${optionalString stdenv.is64bit "-D_x86_64"}"
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -DEKHO_DATA_PATH=\"$out/share/ekho-data\""
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libsndfile pulseaudio ];
}

View file

@ -26,5 +26,6 @@ stdenv.mkDerivation rec {
description = "Gigasampler file access library";
license = licenses.gpl2;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,33 @@
{ stdenv, fetchsvn, boost, ganv, glibmm, gtk, gtkmm, jackaudio, lilv
, lv2, pkgconfig, python, raul, serd, sord, sratom, suil
}:
stdenv.mkDerivation rec {
name = "ingen-svn-${rev}";
rev = "5317";
src = fetchsvn {
url = "http://svn.drobilla.net/lad/trunk/ingen";
rev = rev;
sha256 = "0zm3wbv9qsingjyr95nwin3khmnf3wq3fz2xa6p420dpcy6qnl4x";
};
buildInputs = [
boost ganv glibmm gtk gtkmm jackaudio lilv lv2 pkgconfig python
raul serd sord sratom suil
];
configurePhase = "python waf configure --prefix=$out";
buildPhase = "python waf";
installPhase = "python waf install";
meta = with stdenv.lib; {
description = "A modular audio processing system using JACK and LV2 or LADSPA plugins";
homepage = http://drobilla.net/software/ingen;
license = licenses.gpl3;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
};
}

View file

@ -25,5 +25,6 @@ stdenv.mkDerivation rec {
homepage = http://drobilla.net/software/jalv;
license = licenses.isc;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
};
}

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
'';
meta = with stdenv.lib; {
description = "LASH Audio Session Handler";
description = "A Linux Audio Session Handler";
longDescription = ''
Session management system for GNU/Linux audio applications.
'';

View file

@ -21,5 +21,6 @@ stdenv.mkDerivation rec {
description = "A simple tool which maps midi notes to simulated keystrokes";
license = licenses.gpl3;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
};
}

View file

@ -1,11 +1,11 @@
{stdenv, fetchurl, alsaLib }:
stdenv.mkDerivation {
name = "mpg123-1.18.1";
name = "mpg123-1.19.0";
src = fetchurl {
url = mirror://sourceforge/mpg123/mpg123-1.18.1.tar.bz2;
sha256 = "0bb5hv0qw3ln09xisi7d19gb4p2y69sx3905rdc293q3gr7khvdw";
url = mirror://sourceforge/mpg123/mpg123-1.19.0.tar.bz2;
sha256 = "06xhd68mj9yp0r6l771aq0d7xgnl402a3wm2mvhxmd3w3ph29446";
};
buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;

View file

@ -20,5 +20,6 @@ stdenv.mkDerivation rec {
description = "graphical frontend to LinuxSampler";
license = licenses.gpl2;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
};
}

View file

@ -18,7 +18,7 @@ buildPythonPackage {
# XXX, tests fail
doCheck = false;
src = [
srcs = [
(fetchurl {
url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-${version}.tar.gz";
sha256 = "0ilasi4b0ay8r6v6ba209wsm80fq2nmzigzc5kvphrk71jwypx6z";
@ -27,7 +27,7 @@ buildPythonPackage {
url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-plugins-${version}.tar.gz";
sha256 = "1rv08rhdjad8sjhplqsspcf4vkazgkxyshsqmbfbrrk5kvv57ybc";
})
];
];
preConfigure = ''
# TODO: for now don't a apply gdist overrides, will be needed for shipping icons, gtk, etc
@ -35,11 +35,13 @@ buildPythonPackage {
'';
sourceRoot = "quodlibet-${version}";
postUnpack = ''
# the patch searches for plugins in directory ../plugins
# so link the appropriate directory there
ln -sf quodlibet-plugins-${version} plugins
'';
patches = [ ./quodlibet-package-plugins.patch ];
buildInputs = stdenv.lib.optionals withGstPlugins [

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "samplv1-${version}";
version = "0.3.6";
version = "0.4.0";
src = fetchurl {
url = "mirror://sourceforge/samplv1/${name}.tar.gz";
sha256 = "1fgy9w3mp0p8i1v41a7gmpzzk268k7bp75d4sgzfprikjihc6ary";
sha256 = "04vldwpm4059czwd4i5yv07daqjnzs2zsrld779likans9ib3ri8";
};
buildInputs = [ jackaudio libsndfile lv2 qt4 ];

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "synthv1-${version}";
version = "0.3.6";
version = "0.4.0";
src = fetchurl {
url = "mirror://sourceforge/synthv1/${name}.tar.gz";
sha256 = "1xj4dk1g546f9fv2c4i7g3f1axrxfrxzk9w1nidhj3686j79nyry";
sha256 = "0zyxja1s74fr95qbwsyykggs3af2ndm2hz1l0avb645xgm93vcfv";
};
buildInputs = [ qt4 jackaudio lv2 ];

View file

@ -0,0 +1,26 @@
{ stdenv, fetchurl, cmake, pkgconfig
, qt4, jackaudio
}:
let
version = "0.5.1";
in stdenv.mkDerivation rec {
name = "vmpk-${version}";
meta = with stdenv.lib; {
description = "Virtual MIDI Piano Keyboard";
homepage = "http://vmpk.sourceforge.net/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ iyzsong ];
};
src = fetchurl {
url = "mirror://sourceforge/vmpk/${version}/${name}.tar.bz2";
sha256 = "11fqnxgs9hr9255d93n7lazxzjwn8jpmn23nywdksh0pb1ffvfrc";
};
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ qt4 jackaudio ];
}

View file

@ -0,0 +1,7 @@
Context:
[TAG 1.3
Simon Michael <simon@joyful.com>**20131103203640
Ignore-this: d12bac373e4aa0e5ffe6c390e1dfe269
]

View file

@ -0,0 +1,34 @@
# To automatically load darcsum when needed, add the following to your emacs init file:
#
# (autoload 'darcsum-changes "darcsum" nil t)
# (autoload 'darcsum-whatsnew "darcsum" nil t)
# (autoload 'darcsum-view "darcsum" nil t)
#
# (These lines were copied from 50darcsum.el in the darcsum repository.)
{ fetchdarcs, stdenv }:
stdenv.mkDerivation {
name = "darcsum-1.3";
src = fetchdarcs {
url = http://hub.darcs.net/simon/darcsum;
context = ./darcs_context;
sha256 = "18dyk2apmnjapd604a5njfqwjri1mc7lgjaajy9phicpibgdrwzh";
};
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
install -d "$out/share/emacs/site-lisp"
install darcsum.el "$out/share/emacs/site-lisp"
'';
meta = {
description = "A pcl-cvs like interface for managing darcs patches.";
homepage = "http://hub.darcs.net/simon/darcsum";
license = "GPLv2+";
maintainers = [ stdenv.lib.maintainers.falsifian ];
};
}

View file

@ -1,28 +1,20 @@
{ stdenv, fetchurl, kdevplatform, cmake, pkgconfig, automoc4, shared_mime_info,
kdebase_workspace, gettext, perl, okteta }:
kdebase_workspace, gettext, perl, okteta, qjson }:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
version = "4.3.1";
version = "4.6.0";
pname = "kdevelop";
src = fetchurl {
url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.bz2";
sha256 = "0015hv39rqhyq1w6jw65lx7ls4l5pc3a2asvd5zsd65831vrfxxs";
url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
sha256 = "1ee9e7b8c46f575dd29d920cfd6284130f2e738a2e1f52dfd97b075fab2e4c73";
};
buildInputs = [ kdevplatform kdebase_workspace okteta ];
buildInputs = [ kdevplatform kdebase_workspace okteta qjson ];
nativeBuildInputs = [ cmake pkgconfig automoc4 shared_mime_info gettext perl ];
patches =
[ ( fetchurl {
url = https://git.reviewboard.kde.org/r/105211/diff/raw/;
name = "okteta-0.9.patch"; # fixes build with KDE-4.9.x
sha256 = "1mvqhw7jr1vi66l3jgam3slyfafcvwy4g3iapfi69dpfnzhmcxl0";
} )
];
NIX_CFLAGS_COMPILE = "-I${okteta}/include/KDE";
meta = with stdenv.lib; {

View file

@ -2,10 +2,12 @@
let
vimrcfile = writeText "vimrc" (if vimrc == null then "" else vimrc);
vimrcfile = writeText "vimrc" vimrc;
p = builtins.parseDrvName vim.name;
in stdenv.mkDerivation rec {
name = "vimwrapper-${vim.version}";
name = "${p.name}-with-vimrc-${p.version}";
buildInputs = [ makeWrapper vim vimrcfile ];

View file

@ -1,17 +1,19 @@
{ stdenv, fetchurl, qt4, bison, flex, eigen, boost, mesa, glew, opencsg, cgal
, mpfr, gmp
, mpfr, gmp, glib, pkgconfig
}:
stdenv.mkDerivation rec {
version = "2013.06";
version = "2014.03";
name = "openscad-${version}";
src = fetchurl {
url = "https://openscad.googlecode.com/files/${name}.src.tar.gz";
sha256 = "01r013l8zyfkgmqn05axh3rlfsjwd6j403w5ffl7nby4i2spiw1f";
url = "http://files.openscad.org/${name}.src.tar.gz";
sha256 = "1hv1lmq1ayhlvrz5sqipg650xryq25a9k22ysdw0dsrwg9ixqpw6";
};
buildInputs = [ qt4 bison flex eigen boost mesa glew opencsg cgal gmp mpfr ];
buildInputs = [
qt4 bison flex eigen boost mesa glew opencsg cgal mpfr gmp glib pkgconfig
];
configurePhase = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${eigen}/include/eigen*) "

View file

@ -0,0 +1,56 @@
{ fetchurl, stdenv, m4, glibc, gtk3, libexif, libgphoto2, libsoup, libxml2, vala, sqlite, webkit
, pkgconfig, gnome3, gst_all_1, which, udev, libraw, glib, json_glib, gettext, desktop_file_utils
, lcms2, gdk_pixbuf, librsvg, makeWrapper }:
# for dependencies see http://www.yorba.org/projects/shotwell/install/
let
rest = stdenv.mkDerivation rec {
name = "rest-0.7.12";
src = fetchurl {
url = "mirror://gnome/sources/rest/0.7/${name}.tar.xz";
sha256 = "0fmg7fq5fx0jg3ryk71kwdkspsvj42acxy9imk7vznkqj29a9zqn";
};
configureFlags = "--with-ca-certificates=/etc/ssl/certs/ca-bundle.crt";
buildInputs = [ pkgconfig glib libsoup ];
};
in stdenv.mkDerivation rec {
version = "0.15.1";
name = "shotwell-${version}";
src = fetchurl {
url = "mirror://gnome/sources/shotwell/0.15/${name}.tar.xz";
sha256 = "12qbqba226q9wb0m31xx8w0m968sr1n18qa4mbz75wblhwws0j7b";
};
NIX_CFLAGS_COMPILE = "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include";
configureFlags = [ "--disable-gsettings-convert-install" ];
preConfigure = ''
patchShebangs .
'';
postInstall = ''
wrapProgram "$out/bin/shotwell" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3}/share:$out/share"
'';
buildInputs = [ m4 glibc gtk3 libexif libgphoto2 libsoup libxml2 vala sqlite webkit pkgconfig
gst_all_1.gstreamer gst_all_1.gst-plugins-base gnome3.libgee which udev gnome3.gexiv2
libraw rest json_glib gettext desktop_file_utils glib lcms2 gdk_pixbuf librsvg
makeWrapper ];
meta = with stdenv.lib; {
description = "Popular photo organizer for the GNOME desktop";
homepage = http://www.yorba.org/projects/shotwell/;
license = licenses.lgpl21Plus;
maintainers = with maintainers; [iElectric];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,56 @@
{ stdenv, fetchurl, boost, cairo, gettext, glibmm, gtk, gtkmm
, libsigcxx, libtool, libxmlxx, pango, pkgconfig, imagemagick
, intltool
}:
let
version = "0.64.1";
ETL = stdenv.mkDerivation rec {
name = "ETL-0.04.17";
src = fetchurl {
url = "mirror://sourceforge/synfig/${name}.tar.gz";
sha256 = "13kpiswgcpsif9fwcplqr0405aqavqn390cjnivkn3pxv0d2q8iy";
};
};
synfig = stdenv.mkDerivation rec {
name = "synfig-${version}";
src = fetchurl {
url = "mirror://sourceforge/synfig/synfig-${version}.tar.gz";
sha256 = "1b4ksxnqbaq4rxlvasmrvk7z4jvjbsg4ns3cns2qcnz64dyvbgda";
};
patches = [ ./synfig-cstring.patch ];
buildInputs = [
ETL boost cairo gettext glibmm libsigcxx libtool libxmlxx pango
pkgconfig
];
configureFlags = [ "--with-boost-libdir=${boost}/lib" ];
};
in
stdenv.mkDerivation rec {
name = "synfigstudio-${version}";
src = fetchurl {
url = "mirror://sourceforge/synfig/${name}.tar.gz";
sha256 = "0nl6vpsn5dcjd5qhbrmd0j4mr3wddvymkg9414m77cdpz4l8b9v2";
};
buildInputs = [
ETL boost cairo gettext glibmm gtk gtkmm imagemagick intltool
intltool libsigcxx libtool libxmlxx pkgconfig synfig
];
meta = with stdenv.lib; {
description = "A 2D animation program";
homepage = http://www.synfig.org;
license = licenses.gpl2Plus;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,12 @@
http://www.synfig.org/issues/thebuggenie/synfig/issues/438
--- a/src/modules/mod_png/trgt_png.cpp
+++ b/src/modules/mod_png/trgt_png.cpp
@@ -39,6 +39,7 @@
#include <algorithm>
#include <functional>
#include <ETL/misc>
+#include <cstring>
#endif

View file

@ -0,0 +1,35 @@
{ stdenv, fetchgit, cmake, pkgconfig, boost, gnuradio, rtl-sdr, uhd
, makeWrapper
, pythonSupport ? true, python, swig
}:
assert pythonSupport -> python != null && swig != null;
stdenv.mkDerivation rec {
name = "gnuradio-osmosdr-${version}";
version = "0.1.0";
src = fetchgit {
url = "git://git.osmocom.org/gr-osmosdr";
rev = "refs/tags/v${version}";
sha256 = "112zfvnr6fjvhdc06ihi2sb0dp441qy7jq8rvr81nbyv3r8jspj4";
};
buildInputs = [
cmake pkgconfig boost gnuradio rtl-sdr uhd makeWrapper
] ++ stdenv.lib.optionals pythonSupport [ python swig ];
postInstall = ''
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
done
'';
meta = with stdenv.lib; {
description = "Gnuradio block for OsmoSDR and rtl-sdr";
homepage = http://sdr.osmocom.org/trac/wiki/GrOsmoSDR;
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];
};
}

View file

@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
for file in "$out"/bin/* "$out"/share/gnuradio/examples/*/*.py; do
wrapProgram "$file" \
--set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") \
--prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath "$out") \
--set MATPLOTLIBRC "$out/share/gnuradio"
done
'';

View file

@ -0,0 +1,39 @@
{ stdenv, fetchurl, qt4, gnuradio, boost, gnuradio-osmosdr
# drivers (optional):
, rtl-sdr
, pulseaudioSupport ? true, pulseaudio
}:
assert pulseaudioSupport -> pulseaudio != null;
stdenv.mkDerivation rec {
name = "gqrx-${version}";
version = "2.2.0";
src = fetchurl {
url = "mirror://sourceforge/project/gqrx/${version}/${name}-src.tar.gz";
sha256 = "15ncx2shh43skph7sj3jvmkls9cbbbysld49c8xd23fhdsxanj9x";
};
buildInputs = [
qt4 gnuradio boost gnuradio-osmosdr rtl-sdr
] ++ stdenv.lib.optionals pulseaudioSupport [ pulseaudio ];
configurePhase = ''qmake PREFIX="$out"'';
meta = with stdenv.lib; {
description = "Software defined radio (SDR) receiver";
longDescription = ''
Gqrx is a software defined radio receiver powered by GNU Radio and the Qt
GUI toolkit. It can process I/Q data from many types of input devices,
including Funcube Dongle Pro/Pro+, rtl-sdr, HackRF, and Universal
Software Radio Peripheral (USRP) devices.
'';
homepage = http://gqrx.dk/;
# Some of the code comes from the Cutesdr project, with a BSD license, but
# it's currently unknown which version of the BSD license that is.
license = licenses.gpl3Plus;
platforms = platforms.linux; # should work on Darwin / OS X too
maintainers = [ maintainers.bjornfor ];
};
}

View file

@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
"--without-powerman" # Until we have it ...
"--without-cgi"
"--without-hal"
"--with-systemdsystemunitdir=$(out)/etc/systemd/systemd"
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
"--with-udev-dir=$(out)/etc/udev"
];

View file

@ -0,0 +1,30 @@
{ stdenv, fetchgit, cmake, pkgconfig, libusb1 }:
stdenv.mkDerivation rec {
name = "rtl-sdr-${version}";
version = "0.5.3";
src = fetchgit {
url = "git://git.osmocom.org/rtl-sdr.git";
rev = "refs/tags/v${version}";
sha256 = "00r5d08r12zzkd0xggd7l7p4r2278rzdhqdaihwjlajmr9qd3hs1";
};
buildInputs = [ cmake pkgconfig libusb1 ];
# Building with -DINSTALL_UDEV_RULES=ON tries to install udev rules to
# /etc/udev/rules.d/, and there is no option to install elsewhere. So install
# rules manually.
postInstall = ''
mkdir -p "$out/etc/udev/rules.d/"
cp ../rtl-sdr.rules "$out/etc/udev/rules.d/99-rtl-sdr.rules"
'';
meta = with stdenv.lib; {
description = "Turns your Realtek RTL2832 based DVB dongle into a SDR receiver";
homepage = http://sdr.osmocom.org/trac/wiki/rtl-sdr;
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];
};
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, writeText, libX11, ncurses, libXext, libXft, fontconfig
{ stdenv, fetchurl, pkgconfig, writeText, libX11, ncurses, libXext, libXft, fontconfig
, conf? null}:
with stdenv.lib;
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
buildInputs = [ libX11 ncurses libXext libXft fontconfig ];
buildInputs = [ pkgconfig libX11 ncurses libXext libXft fontconfig ];
NIX_LDFLAGS = "-lfontconfig";

View file

@ -1,15 +1,16 @@
{ cabal, alsaCore, alsaMixer, filepath, libXrandr, mtl, parsec
, regexCompat, stm, time, utf8String, wirelesstools, X11, X11Xft
{ cabal, alsaCore, alsaMixer, filepath, HTTP, libXrandr, mtl
, parsec, regexCompat, stm, time, utf8String, wirelesstools, X11
, X11Xft
}:
cabal.mkDerivation (self: {
pname = "xmobar";
version = "0.19";
sha256 = "1lwbww9vpqscip16lqiax2qvfyksxms5xx4n0s61mzw7v61hyxq2";
version = "0.20.1";
sha256 = "16jfgn6ciqxrwj6qjhbcpms7mzlbxfaxyxfxp64xvnw626xlpjvk";
isLibrary = false;
isExecutable = true;
buildDepends = [
alsaCore alsaMixer filepath mtl parsec regexCompat stm time
alsaCore alsaMixer filepath HTTP mtl parsec regexCompat stm time
utf8String X11 X11Xft
];
extraLibraries = [ libXrandr wirelesstools ];

View file

@ -1,11 +1,11 @@
{ stdenv, fetchurl, xorg, ncurses, freetype, fontconfig, pkgconfig }:
stdenv.mkDerivation rec {
name = "xterm-301";
name = "xterm-303";
src = fetchurl {
url = "ftp://invisible-island.net/xterm/${name}.tgz";
sha256 = "040rarvv18zg0lk7qy0m3n7gv10mh40jic708wvng01z4rlbpfhz";
sha256 = "0n7hay16aam9kfn642ri0wj5yzilbjm3l8znxc2p5dx9pn3rkwla";
};
buildInputs =

View file

@ -275,7 +275,7 @@ in stdenv.mkDerivation rec {
meta = {
description = "An open source web browser from Google";
homepage = http://www.chromium.org/;
maintainers = with maintainers; [ goibhniu chaoflow aszlig ];
maintainers = with maintainers; [ goibhniu chaoflow aszlig wizeman ];
license = licenses.bsd3;
platforms = platforms.linux;
};

View file

@ -1,18 +1,18 @@
# This file is autogenerated from update.sh in the same directory.
{
dev = {
version = "35.0.1862.2";
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-35.0.1862.2.tar.xz";
sha256 = "19426x4x3bnx21qjhqc4sk27k7dnhm1pw84079h6gk0hyjzcwn0f";
version = "35.0.1883.0";
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-35.0.1883.0.tar.xz";
sha256 = "0qbv6prxl18y5824pfd13ng9798g561gzb6nypwp502hqr45jvb6";
};
beta = {
version = "34.0.1847.14";
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-34.0.1847.14.tar.xz";
sha256 = "038bz2d40rgjppkalal9ycjhfvkhph926k35v8pc3618z2fy10cn";
version = "34.0.1847.60";
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-34.0.1847.60.tar.xz";
sha256 = "1na5d6z4a0wkabn7cj62vyiv3mmvcb6qdvrkyy6fj79h7gk2hb7k";
};
stable = {
version = "33.0.1750.146";
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-33.0.1750.146.tar.xz";
sha256 = "0x2a5kyaj38661c5s33pywhrwkm8kj2fbr1z940c5al6y2hfgc6m";
version = "33.0.1750.152";
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-33.0.1750.152.tar.xz";
sha256 = "0byc23vwn9alsva0jqvwvgnbx2bm7x48m3jln02y4fpf1f265m4z";
};
}

View file

@ -195,7 +195,7 @@ rec {
meta = {
description = "Mozilla Firefox - the browser, reloaded";
homepage = http://www.mozilla.com/en-US/firefox/;
maintainers = [ stdenv.lib.maintainers.eelco ];
maintainers = with stdenv.lib.maintainers; [ eelco wizeman ];
};
passthru = {

View file

@ -2,8 +2,10 @@
, browserName, desktopName, nameSuffix, icon
}:
let p = builtins.parseDrvName browser.name; in
stdenv.mkDerivation {
name = browser.name + "-with-plugins";
name = "${p.name}-with-plugins-${p.version}";
desktopItem = makeDesktopItem {
name = browserName;

View file

@ -36,7 +36,7 @@
let
# -> http://get.adobe.com/flashplayer/
version = "11.2.202.341";
version = "11.2.202.346";
src =
if stdenv.system == "x86_64-linux" then
@ -47,7 +47,7 @@ let
else rec {
inherit version;
url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.x86_64.tar.gz";
sha256 = "0d1ic70awdig0v699svmq8mmnil8xmmwsap30sgi0r94saxmq49j";
sha256 = "19jgiw5f0ksxqgi6jkla4qq7gx9gnn9jmpjgqanb7mhl5fdl0v55";
}
else if stdenv.system == "i686-linux" then
if debug then {
@ -58,7 +58,7 @@ let
} else rec {
inherit version;
url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.i386.tar.gz";
sha256 = "0bfz1id4035jnkwy4xm0dj8l9lygrrzqdbf8dgc9pcy8c63d1hac";
sha256 = "01f4zady0r0n5rfqq2285svc13wiypmfrm8fnirmr5lpwl5d89ra";
}
else throw "Flash Player is not supported on this platform";
@ -88,5 +88,7 @@ stdenv.mkDerivation {
meta = {
description = "Adobe Flash Player browser plugin";
homepage = http://www.adobe.com/products/flashplayer/;
maintainer = with stdenv.lib.maintainers; [ wizeman ];
license = "unfree";
};
}

View file

@ -120,8 +120,8 @@ stdenv.mkDerivation rec {
meta = {
description = "Spark cluster computing";
homepage = "http://spark.incubator.apache.org";
platforms = stdenv.lib.platforms.all;
license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.all;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
};
}

View file

@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "Integrated IRC client for KDE";
repositories.git = git://anongit.kde.org/konversation;
license = "GPL";
inherit (kdelibs.meta) maintainers platforms;
};

View file

@ -3,7 +3,7 @@
, gettext, iconv, locale, text, highline, rmail_sup, unicode, gnupg, which }:
stdenv.mkDerivation rec {
version = "20131130";
version = "20140312";
name = "sup-${version}";
meta = {
@ -18,8 +18,8 @@ stdenv.mkDerivation rec {
src = fetchgit {
url = git://github.com/sup-heliotrope/sup.git;
rev = "a5a1e39034204ac4b05c9171a71164712690b010";
sha256 = "0w2w7dcif1ri1qq81csz7gj45rqd9z7hjd6x29awibybyyqyvj5s";
rev = "0cad7b308237c07b8a46149908b2ad4806ac3d1d";
sha256 = "83534b6ad9fb6aa883d630c927e3a71bd09a646e3254b4eb0cc7a09f69a525bc";
};
buildInputs =

View file

@ -1,30 +1,58 @@
{ stdenv, fetchurl, pkgconfig, intltool, glib, gtk2, gnome2 /*just GConf*/
, libsoup, libunique, libxslt, webkit_gtk2, json_glib
, libnotify /*optional*/ }:
{ stdenv, fetchurl, pkgconfig, intltool, python, pygobject3
, glib, gnome3, pango, libxml2, libxslt, sqlite, libsoup, glib_networking
, webkitgtk, json_glib, gobjectIntrospection, gst_all_1
, libnotify
, makeWrapper
}:
let version = "1.8.15";
let pname = "liferea";
version = "1.10.7";
in
stdenv.mkDerivation rec {
name = "liferea-${version}";
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://sourceforge/liferea/Liferea%20Stable/${version}/${name}.tar.bz2";
sha256 = "12hhdl5biwcvr9ds7pdhhvlp4vggjix6xm4z5pnfaz53ai2dnc99";
url = "https://github.com/lwindolf/${pname}/releases/download/v${version}/${name}.tar.bz2";
sha256 = "17kvg44brdz99firr5h5qx8icvadlr7p1cz3xr3437sf5rhj25wh";
};
buildInputs = [
pkgconfig intltool gtk2 gnome2.GConf
libsoup libunique libxslt webkit_gtk2 json_glib
buildInputs = with gst_all_1; [
pkgconfig intltool python
glib gnome3.gtk pango libxml2 libxslt sqlite libsoup
webkitgtk json_glib gobjectIntrospection gnome3.gsettings_desktop_schemas
gnome3.libpeas gnome3.dconf
gst-plugins-base gst-plugins-good gst-plugins-bad
gnome3.libgnome_keyring
libnotify
makeWrapper
];
preFixup = ''
rm $out/share/icons/hicolor/icon-theme.cache'';
postInstall = ''
for f in "$out"/bin/*; do
wrapProgram "$f" \
--prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${pygobject3})" \
--prefix LD_LIBRARY_PATH : "${gnome3.libgnome_keyring}/lib" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules:${glib_networking}/lib/gio/modules" \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gnome3.gnome_icon_theme}/share:${gnome3.gsettings_desktop_schemas}/share:${gnome3.gtk}/share:$out/share"
done
'';
meta = {
description = "A GTK-based news feed agregator";
homepage = http://lzone.de/liferea/;
maintainers = [ stdenv.lib.maintainers.vcunat ];
license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [ vcunat romildo ];
platforms = stdenv.lib.platforms.linux;
longDescription = ''
Liferea (Linux Feed Reader) is an RSS/RDF feed reader.
It's intended to be a clone of the Windows-only FeedReader.
It can be used to maintain a list of subscribed feeds,
browse through their items, and show their contents.
'';
};
}

View file

@ -0,0 +1,24 @@
{ stdenv, fetchgit, autoconf, automake, pkgconfig, openssl }:
stdenv.mkDerivation rec {
name = "notbit-0.2-28-g06f9160";
src = fetchgit {
url = "git://git.busydoingnothing.co.uk/notbit";
rev = "06f916081836de12f8e57a9f50c95d4d1b51627f";
sha256 = "d5c38eea1d9ca213bfbea5c88350478a5088b5532e939de9680d72e60aa65288";
};
buildInputs = [ autoconf automake pkgconfig openssl ];
preConfigure = "autoreconf -vfi";
meta = with stdenv.lib; {
homepage = http://busydoingnothing.co.uk/notbit/;
description = "A minimal bitmessage client";
license = licenses.mit;
# This is planned to change when the project officially supports other platforms
platforms = platforms.linux;
};
}

View file

@ -5,11 +5,11 @@ stdenv.mkDerivation rec {
name = pname + "-" + version;
pname = "ktorrent";
version = "4.2.1";
version = "4.3.1";
src = fetchurl {
url = "${meta.homepage}/downloads/${version}/${name}.tar.bz2";
sha256 = "1b6w7i1vvq8mlw9yrlxvb51hvaj6rpl8lv9b9zagyl3wcanz73zd";
sha256 = "66094f6833347afb0c49e332f0ec15ec48db652cbe66476840846ffd5ca0e4a1";
};
patches = [ ./find-workspace.diff ];
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
meta = {
description = "KDE integrated BtTorrent client";
homepage = http://ktorrent.org;
homepage = http://ktorrent.pwsp.net;
maintainers = with stdenv.lib.maintainers; [ sander urkud ];
inherit (libktorrent.meta) platforms;
};

View file

@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
'';
homepage = http://www.transmissionbt.com/;
license = licenses.gpl2; # parts are under MIT
maintainers = with maintainers; [ astsmtl vcunat ];
maintainers = with maintainers; [ astsmtl vcunat wizeman ];
platforms = platforms.linux;
};
}

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