Merge master into x-updates

This commit is contained in:
Vladimír Čunát
2014-03-21 10:33:45 +01:00
448 changed files with 6699 additions and 1865 deletions
+7 -1
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
+27 -11
View File
@@ -25,12 +25,14 @@
amd = { amd = {
shortName = "amd"; shortName = "amd";
fullName = "AMD License Agreement"; 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; apsl20 = {
# http://opensource.org/licenses/APSL-2.0 shortName = "APSL 2.0";
apsl20 = "APSL 2.0"; fullName = "Apple Public Source License 2.0";
url = http://opensource.org/licenses/APSL-2.0;
};
asl20 = { asl20 = {
shortName = "ASL2.0"; shortName = "ASL2.0";
@@ -80,7 +82,11 @@
url = http://www.eclipse.org/legal/epl-v10.html; 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 = { gpl2Oss = {
shortName = "GPLv2+OSS"; shortName = "GPLv2+OSS";
@@ -88,9 +94,11 @@
url = http://www.mysql.com/about/legal/licensing/foss-exception; url = http://www.mysql.com/about/legal/licensing/foss-exception;
}; };
# GNU General Public License version 2 or later; gpl2Plus = {
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html shortName = "GPLv2+";
gpl2Plus = "GPLv2+"; fullName = "GNU General Public License version 2 or later";
url = http://www.gnu.org/licenses/old-licenses/gpl-2.0.html;
};
gpl3 = { gpl3 = {
shortName = "GPLv3"; shortName = "GPLv3";
@@ -134,7 +142,11 @@
url = https://fedoraproject.org/wiki/Licensing/libtiff; 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 = { lgpl2Plus = {
shortName = "LGPLv2+"; shortName = "LGPLv2+";
@@ -142,7 +154,11 @@
url = http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html; 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 = { lgpl21Plus = {
shortName = "LGPLv2.1+"; shortName = "LGPLv2.1+";
+2
View File
@@ -25,6 +25,7 @@
edwtjo = "Edward Tjörnhammar <ed@cflags.cc>"; edwtjo = "Edward Tjörnhammar <ed@cflags.cc>";
eelco = "Eelco Dolstra <eelco.dolstra@logicblox.com>"; eelco = "Eelco Dolstra <eelco.dolstra@logicblox.com>";
ertes = "Ertugrul Söylemez <es@ertes.de>"; ertes = "Ertugrul Söylemez <es@ertes.de>";
falsifian = "James Cook <james.cook@utoronto.ca>";
garbas = "Rok Garbas <rok@garbas.si>"; garbas = "Rok Garbas <rok@garbas.si>";
goibhniu = "Cillian de Róiste <cillian.deroiste@gmail.com>"; goibhniu = "Cillian de Róiste <cillian.deroiste@gmail.com>";
guibert = "David Guibert <david.guibert@gmail.com>"; guibert = "David Guibert <david.guibert@gmail.com>";
@@ -52,6 +53,7 @@
phreedom = "Evgeny Egorochkin <phreedom@yandex.ru>"; phreedom = "Evgeny Egorochkin <phreedom@yandex.ru>";
pierron = "Nicolas B. Pierron <nixos@nbp.name>"; pierron = "Nicolas B. Pierron <nixos@nbp.name>";
piotr = "Piotr Pietraszkiewicz <ppietrasa@gmail.com>"; piotr = "Piotr Pietraszkiewicz <ppietrasa@gmail.com>";
pkmx = "Chih-Mao Chen <pkmx.tw@gmail.com>";
pSub = "Pascal Wittmann <mail@pascal-wittmann.de>"; pSub = "Pascal Wittmann <mail@pascal-wittmann.de>";
qknight = "Joachim Schiele <js@lastlog.de>"; qknight = "Joachim Schiele <js@lastlog.de>";
raskin = "Michael Raskin <7c6f434c@mail.ru>"; raskin = "Michael Raskin <7c6f434c@mail.ru>";
+4 -5
View File
@@ -31,11 +31,10 @@ rec {
updateName = updater: drv: drv // {name = updater (drv.name);}; updateName = updater: drv: drv // {name = updater (drv.name);};
/* Append a suffix to the name of a package. !!! the suffix should /* Append a suffix to the name of a package (before the version
really be appended *before* the version, at least most of the part). */
time. appendToName = suffix: updateName (name:
*/ let x = builtins.parseDrvName name; in "${x.name}-${suffix}-${x.version}");
appendToName = suffix: updateName (name: "${name}-${suffix}");
/* Apply a function to each derivation and only to derivations in an attrset /* Apply a function to each derivation and only to derivations in an attrset
+3 -4
View File
@@ -18,15 +18,14 @@
<variablelist> <variablelist>
<xsl:for-each select="attrs"> <xsl:for-each select="attrs">
<varlistentry> <varlistentry>
<term> <term xml:id="{generate-id(attr[@name = 'name']/string/@value)}" xlink:href="#{generate-id(attr[@name = 'name']/string/@value)}">
<option> <option>
<xsl:for-each select="attr[@name = 'name']/string"> <xsl:for-each select="attr[@name = 'name']/string">
<xsl:value-of select="@value" /> <xsl:value-of select="@value" />
<xsl:if test="position() != last()">.</xsl:if> <xsl:if test="position() != last()">.</xsl:if>
</xsl:for-each> </xsl:for-each>
</option> </option>
</term> </term>
<listitem> <listitem>
+1 -1
View File
@@ -497,7 +497,7 @@ sub waitForX {
retry sub { retry sub {
my ($status, $out) = $self->execute("journalctl -bu systemd-logind | grep Linked"); my ($status, $out) = $self->execute("journalctl -bu systemd-logind | grep Linked");
return 0 if $status != 0; 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; return 1 if $status == 0;
} }
}); });
+5 -1
View File
@@ -53,7 +53,11 @@ in
}; };
consoleKeyMap = mkOption { consoleKeyMap = mkOption {
type = types.str; type = mkOptionType {
name = "string or path";
check = t: (isString t || types.path.check t);
};
default = "us"; default = "us";
example = "fr"; example = "fr";
description = '' description = ''
+12
View File
@@ -115,6 +115,13 @@
nix-ssh = 104; nix-ssh = 104;
dictd = 105; dictd = 105;
couchdb = 106; 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. # When adding a uid, make sure it doesn't match an existing gid.
@@ -208,6 +215,11 @@
keys = 96; keys = 96;
dictd = 105; dictd = 105;
couchdb = 106; 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. # When adding a gid, make sure it doesn't match an existing uid.
+10
View File
@@ -61,6 +61,7 @@
./security/apparmor.nix ./security/apparmor.nix
./security/apparmor-suid.nix ./security/apparmor-suid.nix
./security/ca.nix ./security/ca.nix
./security/duosec.nix
./security/pam.nix ./security/pam.nix
./security/pam_usb.nix ./security/pam_usb.nix
./security/polkit.nix ./security/polkit.nix
@@ -81,6 +82,8 @@
./services/backup/rsnapshot.nix ./services/backup/rsnapshot.nix
./services/backup/sitecopy-backup.nix ./services/backup/sitecopy-backup.nix
./services/backup/tarsnap.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-endpoint.nix
./services/databases/4store.nix ./services/databases/4store.nix
./services/databases/couchdb.nix ./services/databases/couchdb.nix
@@ -152,6 +155,7 @@
./services/networking/avahi-daemon.nix ./services/networking/avahi-daemon.nix
./services/networking/bind.nix ./services/networking/bind.nix
./services/networking/bitlbee.nix ./services/networking/bitlbee.nix
./services/networking/btsync.nix
./services/networking/connman.nix ./services/networking/connman.nix
./services/networking/cntlm.nix ./services/networking/cntlm.nix
./services/networking/chrony.nix ./services/networking/chrony.nix
@@ -177,6 +181,8 @@
./services/networking/minidlna.nix ./services/networking/minidlna.nix
./services/networking/nat.nix ./services/networking/nat.nix
./services/networking/networkmanager.nix ./services/networking/networkmanager.nix
./services/networking/ngircd.nix
./services/networking/notbit.nix
./services/networking/ntopng.nix ./services/networking/ntopng.nix
./services/networking/ntpd.nix ./services/networking/ntpd.nix
./services/networking/oidentd.nix ./services/networking/oidentd.nix
@@ -189,6 +195,7 @@
./services/networking/rdnssd.nix ./services/networking/rdnssd.nix
./services/networking/rpcbind.nix ./services/networking/rpcbind.nix
./services/networking/sabnzbd.nix ./services/networking/sabnzbd.nix
./services/networking/searx.nix
./services/networking/supybot.nix ./services/networking/supybot.nix
./services/networking/ssh/lshd.nix ./services/networking/ssh/lshd.nix
./services/networking/ssh/sshd.nix ./services/networking/ssh/sshd.nix
@@ -205,6 +212,7 @@
./services/scheduling/cron.nix ./services/scheduling/cron.nix
./services/scheduling/fcron.nix ./services/scheduling/fcron.nix
./services/search/elasticsearch.nix ./services/search/elasticsearch.nix
./services/search/solr.nix
./services/security/clamav.nix ./services/security/clamav.nix
./services/security/haveged.nix ./services/security/haveged.nix
./services/security/fprot.nix ./services/security/fprot.nix
@@ -227,8 +235,10 @@
./services/web-servers/lighttpd/cgit.nix ./services/web-servers/lighttpd/cgit.nix
./services/web-servers/lighttpd/gitweb.nix ./services/web-servers/lighttpd/gitweb.nix
./services/web-servers/nginx/default.nix ./services/web-servers/nginx/default.nix
./services/web-servers/phpfpm.nix
./services/web-servers/tomcat.nix ./services/web-servers/tomcat.nix
./services/web-servers/varnish/default.nix ./services/web-servers/varnish/default.nix
./services/web-servers/winstone.nix
./services/web-servers/zope2.nix ./services/web-servers/zope2.nix
./services/x11/desktop-managers/default.nix ./services/x11/desktop-managers/default.nix
./services/x11/display-managers/auto.nix ./services/x11/display-managers/auto.nix
+2 -1
View File
@@ -116,8 +116,9 @@ in
# This file is read for all shells. # This file is read for all shells.
# Only execute this file once per shell. # 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 if [ -n "$__ETC_ZSHENV_SOURCED" ]; then return; fi
__ETC_ZSHENV_SOURCED=1 export __ETC_ZSHENV_SOURCED=1
${cfg.shellInit} ${cfg.shellInit}
+1
View File
@@ -103,6 +103,7 @@ in zipModules ([]
++ obsolete [ "services" "sshd" "gatewayPorts" ] [ "services" "openssh" "gatewayPorts" ] ++ obsolete [ "services" "sshd" "gatewayPorts" ] [ "services" "openssh" "gatewayPorts" ]
++ obsolete [ "services" "sshd" "permitRootLogin" ] [ "services" "openssh" "permitRootLogin" ] ++ obsolete [ "services" "sshd" "permitRootLogin" ] [ "services" "openssh" "permitRootLogin" ]
++ obsolete [ "services" "xserver" "startSSHAgent" ] [ "services" "xserver" "startOpenSSHAgent" ] ++ obsolete [ "services" "xserver" "startSSHAgent" ] [ "services" "xserver" "startOpenSSHAgent" ]
++ obsolete [ "services" "xserver" "windowManager" "xbmc" ] [ "services" "xserver" "desktopManager" "xbmc" ]
# KDE # KDE
++ deprecated [ "kde" "extraPackages" ] [ "environment" "kdePackages" ] ++ deprecated [ "kde" "extraPackages" ] [ "environment" "kdePackages" ]
+198
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
'');
};
}
+6 -5
View File
@@ -33,8 +33,9 @@ in
service called <literal>tarsnap-backup</literal> which is service called <literal>tarsnap-backup</literal> which is
periodically run by cron, or you may run it on-demand. periodically run by cron, or you may run it on-demand.
See <link xlink:href='http://www.tarsnap.com/gettingstarted.html'>Getting Started</link> See the Tarsnap <link
Tarsnap page. xlink:href='http://www.tarsnap.com/gettingstarted.html'>Getting
Started</link> page.
''; '';
}; };
@@ -46,7 +47,7 @@ in
full name will be full name will be
<literal>label-$(date+"%Y%m%d%H%M%S")</literal>. For <literal>label-$(date+"%Y%m%d%H%M%S")</literal>. For
example, by default your backups will look similar to 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 * * *"; default = "15 01 * * *";
description = '' description = ''
This option defines (in the format used by cron) when This option defines (in the format used by cron) when
tarsnap is run for backups. The default is to update at tarsnap is run for backups. The default is to backup the
01:15 at night every day. specified paths at 01:15 at night every day.
''; '';
}; };
@@ -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;
};
};
};
}
@@ -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;
};
};
}
+9 -24
View File
@@ -1,9 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
with pkgs.lib;
with pkgs.lib;
let let
cfg = config.services.couchdb; cfg = config.services.couchdb;
configFile = pkgs.writeText "couchdb.ini" configFile = pkgs.writeText "couchdb.ini"
'' ''
@@ -19,10 +17,8 @@ let
[log] [log]
file = ${cfg.logFile} file = ${cfg.logFile}
''; '';
configExtraFile = pkgs.writeText "couchdb-extra.ini" cfg.extraConfig;
in in {
{
###### interface ###### 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 # couchdb options: http://docs.couchdb.org/en/latest/config/index.html
databaseDir = mkOption { databaseDir = mkOption {
@@ -153,26 +141,23 @@ in
preStart = preStart =
'' ''
mkdir -p `dirname ${cfg.pidFile}`;
mkdir -p `dirname ${cfg.uriFile}`; mkdir -p `dirname ${cfg.uriFile}`;
mkdir -p `dirname ${cfg.logFile}`; mkdir -p `dirname ${cfg.logFile}`;
touch ${cfg.logFile};
mkdir -p ${cfg.databaseDir}; mkdir -p ${cfg.databaseDir};
mkdir -p ${cfg.viewIndexDir}; mkdir -p ${cfg.viewIndexDir};
chown ${cfg.user}:${cfg.group} `dirname ${cfg.pidFile}`
chown ${cfg.user}:${cfg.group} `dirname ${cfg.uriFile}` if [ "$(id -u)" = 0 ]; then
chown ${cfg.user}:${cfg.group} ${cfg.logFile} chown ${cfg.user}:${cfg.group} `dirname ${cfg.uriFile}`
chown ${cfg.user}:${cfg.group} ${cfg.databaseDir} chown ${cfg.user}:${cfg.group} ${cfg.databaseDir}
chown ${cfg.user}:${cfg.group} ${cfg.viewIndexDir} chown ${cfg.user}:${cfg.group} ${cfg.viewIndexDir}
fi
''; '';
serviceConfig = { serviceConfig = {
PermissionsStartOnly = true; PermissionsStartOnly = true;
User = cfg.user; User = cfg.user;
Group = cfg.group; Group = cfg.group;
Type = "forking"; ExecStart = "${cfg.package}/bin/couchdb -a ${configFile} -a ${pkgs.writeText "couchdb-extra.ini" cfg.extraConfig}";
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";
}; };
}; };
+1 -4
View File
@@ -15,7 +15,7 @@ let
pidFile = "${cfg.pidDir}/mysqld.pid"; pidFile = "${cfg.pidDir}/mysqld.pid";
mysqldOptions = mysqldOptions =
"--user=${cfg.user} --datadir=${cfg.dataDir} " + "--user=${cfg.user} --datadir=${cfg.dataDir} --basedir=${mysql} " +
"--pid-file=${pidFile}"; "--pid-file=${pidFile}";
myCnf = pkgs.writeText "my.cnf" myCnf = pkgs.writeText "my.cnf"
@@ -250,9 +250,6 @@ in
rm /tmp/mysql_init rm /tmp/mysql_init
fi fi
''; # */ ''; # */
serviceConfig.ExecStop =
"${mysql}/bin/mysqladmin ${optionalString (cfg.rootPassword != null) "--user=root --password=\"$(cat ${cfg.rootPassword})\""} shutdown";
}; };
}; };
@@ -190,7 +190,7 @@ in
mkdir -m 0700 -p ${cfg.dataDir} mkdir -m 0700 -p ${cfg.dataDir}
if [ "$(id -u)" = 0 ]; then if [ "$(id -u)" = 0 ]; then
chown -R postgres ${cfg.dataDir} chown -R postgres ${cfg.dataDir}
su -s ${pkgs.stdenv.shell} postgres -c 'initdb -U root' su -s ${pkgs.stdenv.shell} postgres -c initdb
else else
# For non-root operation. # For non-root operation.
initdb initdb
+18 -12
View File
@@ -19,6 +19,7 @@ in
services.gpsd = { services.gpsd = {
enable = mkOption { enable = mkOption {
type = types.bool;
default = false; default = false;
description = '' description = ''
Whether to enable `gpsd', a GPS service daemon. Whether to enable `gpsd', a GPS service daemon.
@@ -26,6 +27,7 @@ in
}; };
device = mkOption { device = mkOption {
type = types.str;
default = "/dev/ttyUSB0"; default = "/dev/ttyUSB0";
description = '' description = ''
A device may be a local serial device for GPS input, or a URL of the form: A device may be a local serial device for GPS input, or a URL of the form:
@@ -35,6 +37,7 @@ in
}; };
readonly = mkOption { readonly = mkOption {
type = types.bool;
default = true; default = true;
description = '' description = ''
Whether to enable the broken-device-safety, otherwise Whether to enable the broken-device-safety, otherwise
@@ -51,6 +54,7 @@ in
}; };
port = mkOption { port = mkOption {
type = types.uniq types.int;
default = 2947; default = 2947;
description = '' description = ''
The port where to listen for TCP connections. The port where to listen for TCP connections.
@@ -58,6 +62,7 @@ in
}; };
debugLevel = mkOption { debugLevel = mkOption {
type = types.uniq types.int;
default = 0; default = 0;
description = '' description = ''
The debugging level. The debugging level.
@@ -85,19 +90,20 @@ in
inherit gid; inherit gid;
}; };
jobs.gpsd = systemd.services.gpsd = {
{ description = "GPSD daemon"; description = "GPSD daemon";
wantedBy = [ "multi-user.target" ];
startOn = "ip-up"; after = [ "network.target" ];
serviceConfig = {
exec = Type = "forking";
'' ExecStart = ''
${pkgs.gpsd}/sbin/gpsd -D "${toString cfg.debugLevel}" \ ${pkgs.gpsd}/sbin/gpsd -D "${toString cfg.debugLevel}" \
-S "${toString cfg.port}" \ -S "${toString cfg.port}" \
${if cfg.readonly then "-b" else ""} \ ${if cfg.readonly then "-b" else ""} \
"${cfg.device}" "${cfg.device}"
''; '';
}; };
};
}; };
+1 -1
View File
@@ -63,7 +63,7 @@ in
services.nixosManual.showManual = mkOption { services.nixosManual.showManual = mkOption {
type = types.bool; type = types.bool;
default = true; default = false;
description = '' description = ''
Whether to show the NixOS manual on one of the virtual Whether to show the NixOS manual on one of the virtual
consoles. consoles.
@@ -168,11 +168,11 @@ in
# shuts off power.) Copied from here: # shuts off power.) Copied from here:
# http://forums.opensuse.org/english/get-technical-help-here/applications/479499-apcupsd-systemd-killpower-issues.html # http://forums.opensuse.org/english/get-technical-help-here/applications/479499-apcupsd-systemd-killpower-issues.html
systemd.services.apcupsd-killpower = { systemd.services.apcupsd-killpower = {
description = "APC UPS Kill Power";
after = [ "shutdown.target" ]; # append umount.target? after = [ "shutdown.target" ]; # append umount.target?
before = [ "final.target" ]; before = [ "final.target" ];
wantedBy = [ "shutdown.target" ]; wantedBy = [ "shutdown.target" ];
unitConfig = { unitConfig = {
Description = "APC UPS Kill Power";
ConditionPathExists = "/run/apcupsd/powerfail"; ConditionPathExists = "/run/apcupsd/powerfail";
DefaultDependencies = "no"; DefaultDependencies = "no";
}; };
+57 -37
View File
@@ -4,17 +4,31 @@ with pkgs.lib;
let let
cfg = config.services.graphite; 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; '' carbonOpts = name: with config.ids; ''
--nodaemon --syslog --prefix=${name} --pidfile /var/run/${name}.pid \ --nodaemon --syslog --prefix=${name} --pidfile ${dataDir}/${name}.pid ${name}
--uid ${toString uids.graphite} --gid ${toString uids.graphite} ${name}
''; '';
carbonEnv = { carbonEnv = {
PYTHONPATH = "${pkgs.python27Packages.carbon}/lib/python2.7/site-packages"; PYTHONPATH = "${pkgs.python27Packages.carbon}/lib/python2.7/site-packages";
GRAPHITE_ROOT = dataDir; GRAPHITE_ROOT = dataDir;
GRAPHITE_CONF_DIR = "/etc/graphite/"; GRAPHITE_CONF_DIR = configDir;
GRAPHITE_STORAGE_DIR = dataDir; GRAPHITE_STORAGE_DIR = dataDir;
}; };
@@ -23,6 +37,14 @@ in {
###### interface ###### interface
options.services.graphite = { options.services.graphite = {
dataDir = mkOption {
type = types.path;
default = "/var/db/graphite";
description = ''
Data directory for graphite.
'';
};
web = { web = {
enable = mkOption { enable = mkOption {
description = "Whether to enable graphite web frontend"; description = "Whether to enable graphite web frontend";
@@ -38,8 +60,8 @@ in {
port = mkOption { port = mkOption {
description = "Graphite web frontend port"; description = "Graphite web frontend port";
default = "8080"; default = 8080;
type = types.str; type = types.int;
}; };
}; };
@@ -152,31 +174,17 @@ in {
###### implementation ###### implementation
config = mkIf (cfg.carbon.enableAggregator || cfg.carbon.enableCache || cfg.carbon.enableRelay || cfg.web.enable) { config = mkIf (cfg.carbon.enableAggregator || cfg.carbon.enableCache || cfg.carbon.enableRelay || cfg.web.enable) {
environment.etc = lists.filter (el: el.source != null) [ systemd.services.carbonCache = {
{ source = writeTextOrNull "carbon.conf" cfg.carbon.config; enable = cfg.carbon.enableCache;
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 {
description = "Graphite Data Storage Backend"; description = "Graphite Data Storage Backend";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ]; after = [ "network-interfaces.target" ];
environment = carbonEnv; 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 = [ restartTriggers = [
pkgs.pythonPackages.carbon pkgs.pythonPackages.carbon
cfg.carbon.config cfg.carbon.config
@@ -185,33 +193,45 @@ in {
cfg.carbon.rewriteRules cfg.carbon.rewriteRules
]; ];
preStart = '' 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"; description = "Carbon Data Aggregator";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ]; after = [ "network-interfaces.target" ];
environment = carbonEnv; 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 = [ restartTriggers = [
pkgs.pythonPackages.carbon cfg.carbon.config cfg.carbon.aggregationRules 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"; description = "Carbon Data Relay";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ]; after = [ "network-interfaces.target" ];
environment = carbonEnv; 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 = [ restartTriggers = [
pkgs.pythonPackages.carbon cfg.carbon.config cfg.carbon.relayRules 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"; description = "Graphite Web Interface";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ]; after = [ "network-interfaces.target" ];
@@ -224,14 +244,15 @@ in {
serviceConfig = { serviceConfig = {
ExecStart = '' ExecStart = ''
${pkgs.python27Packages.waitress}/bin/waitress-serve \ ${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''; --call django.core.handlers.wsgi:WSGIHandler'';
User = "graphite"; User = "graphite";
Group = "graphite"; Group = "graphite";
}; };
preStart = '' preStart = ''
if ! test -e ${dataDir}/db-created; then 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 # populate database
${pkgs.python27Packages.graphite_web}/bin/manage-graphite.py syncdb --noinput ${pkgs.python27Packages.graphite_web}/bin/manage-graphite.py syncdb --noinput
@@ -259,7 +280,6 @@ in {
uid = config.ids.uids.graphite; uid = config.ids.uids.graphite;
description = "Graphite daemon user"; description = "Graphite daemon user";
home = dataDir; home = dataDir;
createHome = true;
}; };
users.extraGroups.graphite.gid = config.ids.gids.graphite; users.extraGroups.graphite.gid = config.ids.gids.graphite;
}; };
+2 -2
View File
@@ -64,13 +64,13 @@ in
graphiteHost = mkOption { graphiteHost = mkOption {
description = "Hostname or IP of Graphite server"; description = "Hostname or IP of Graphite server";
default = "127.0.0.1"; default = config.services.graphite.web.host;
type = types.str; type = types.str;
}; };
graphitePort = mkOption { graphitePort = mkOption {
description = "Port of Graphite server"; description = "Port of Graphite server";
default = 2003; default = config.services.graphite.web.port;
type = types.uniq types.int; type = types.uniq types.int;
}; };
@@ -46,6 +46,16 @@ in
description = "Cache directory."; 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"; startOn = "started network-interfaces";
stopOn = "stopping network-interfaces"; stopOn = "stopping network-interfaces";
preStart = '' preStart = ''
mkdir -m 0755 /afs || true mkdir -p -m 0755 /afs
mkdir -m 0755 -p ${cfg.cacheDirectory} || true mkdir -m 0700 -p ${cfg.cacheDirectory}
${pkgs.module_init_tools}/sbin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true ${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 = '' # Doing this in preStop, because after these commands AFS is basically
umount /afs # 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 ${openafsPkgs}/sbin/afsd -shutdown
rmmod libafs ${pkgs.module_init_tools}/sbin/rmmod libafs
''; '';
}; };
@@ -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 ];
};
}
+14 -1
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 { networking.firewall.checkReversePath = mkOption {
default = kernelHasRPFilter; default = kernelHasRPFilter;
type = types.bool; type = types.bool;
@@ -375,7 +386,9 @@ in
# Optionally respond to ICMPv4 pings. # Optionally respond to ICMPv4 pings.
${optionalString cfg.allowPing '' ${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 # Accept all ICMPv6 messages except redirects and node
+2 -1
View File
@@ -76,8 +76,9 @@ rec {
users.extraUsers = singleton { users.extraUsers = singleton {
name = "kippo"; name = "kippo";
description = "kippo web server privilege separation user"; 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; { systemd.services.kippo = with pkgs; {
description = "Kippo Web Server"; description = "Kippo Web Server";
@@ -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.";
};
};
}
@@ -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;
};
}
@@ -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 ];
};
}
+30 -20
View File
@@ -5,16 +5,22 @@ with pkgs.lib;
let let
cfg = config.services.elasticsearch; cfg = config.services.elasticsearch;
es_home = "/var/lib/elasticsearch"; esConfig = ''
configFile = pkgs.writeText "elasticsearch.yml" ''
network.host: ${cfg.host} network.host: ${cfg.host}
network.port: ${cfg.port} network.port: ${toString cfg.port}
network.tcp.port: ${cfg.tcp_port} network.tcp.port: ${toString cfg.tcp_port}
cluster.name: ${cfg.cluster_name} cluster.name: ${cfg.cluster_name}
${cfg.extraConf} ${cfg.extraConf}
''; '';
configDir = pkgs.buildEnv {
name = "elasticsearch-config";
paths = [
(pkgs.writeTextDir "elasticsearch.yml" esConfig)
(pkgs.writeTextDir "logging.yml" cfg.logging)
];
};
in { in {
###### interface ###### interface
@@ -34,14 +40,14 @@ in {
port = mkOption { port = mkOption {
description = "Elasticsearch port to listen for HTTP traffic"; description = "Elasticsearch port to listen for HTTP traffic";
default = "9200"; default = 9200;
type = types.str; type = types.int;
}; };
tcp_port = mkOption { tcp_port = mkOption {
description = "Elasticsearch port for the node to node communication"; description = "Elasticsearch port for the node to node communication";
default = "9300"; default = 9300;
type = types.str; type = types.int;
}; };
cluster_name = mkOption { cluster_name = mkOption {
@@ -79,27 +85,32 @@ in {
''; '';
type = types.str; type = types.str;
}; };
dataDir = mkOption {
type = types.path;
default = "/var/lib/elasticsearch";
description = ''
Data directory for elasticsearch.
'';
};
}; };
###### implementation ###### implementation
config = mkIf cfg.enable { 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 = { systemd.services.elasticsearch = {
description = "Elasticsearch daemon"; description = "Elasticsearch daemon";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ]; after = [ "network-interfaces.target" ];
environment = { ES_HOME = es_home; }; environment = { ES_HOME = cfg.dataDir; };
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.elasticsearch}/bin/elasticsearch -f -Des.path.conf=/etc/elasticsearch"; ExecStart = "${pkgs.elasticsearch}/bin/elasticsearch -f -Des.path.conf=${configDir}";
User = "elasticsearch"; User = "elasticsearch";
}; };
preStart = ''
mkdir -m 0700 -p ${cfg.dataDir}
if [ "$(id -u)" = 0 ]; then chown -R elasticsearch ${cfg.dataDir}; fi
'';
}; };
environment.systemPackages = [ pkgs.elasticsearch ]; environment.systemPackages = [ pkgs.elasticsearch ];
@@ -108,8 +119,7 @@ in {
name = "elasticsearch"; name = "elasticsearch";
uid = config.ids.uids.elasticsearch; uid = config.ids.uids.elasticsearch;
description = "Elasticsearch daemon user"; description = "Elasticsearch daemon user";
home = es_home; home = cfg.dataDir;
createHome = true;
}; };
}; };
} }
+114
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;
};
};
}
+18 -75
View File
@@ -48,82 +48,25 @@ with pkgs.lib;
config = { config = {
# FIXME: these are mostly copy/pasted from the systemd sources, systemd.services."getty@" =
# which some small modifications, which is annoying. { 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.services."serial-getty@" =
systemd.units."getty@.service".text = { baseUnit = pkgs.runCommand "serial-getty.service" {}
'' ''
[Unit] sed '/ExecStart/ d' < ${config.systemd.package}/example/systemd/system/serial-getty@.service > $out
Description=Getty on %I '';
Documentation=man:agetty(8) serviceConfig.ExecStart =
After=systemd-user-sessions.service plymouth-quit-wait.service let speeds = concatStringsSep "," (map toString config.services.mingetty.serialSpeed);
in "@${pkgs.utillinux}/sbin/agetty agetty --login-program ${pkgs.shadow}/bin/login %I ${speeds}";
# If additional gettys are spawned during boot then we should make restartIfChanged = false;
# 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
'';
environment.etc = singleton environment.etc = singleton
{ # Friendly greeting on the virtual consoles. { # Friendly greeting on the virtual consoles.
+7 -4
View File
@@ -44,6 +44,7 @@ in {
After=systemd-user-sessions.service After=systemd-user-sessions.service
After=plymouth-quit-wait.service After=plymouth-quit-wait.service
After=systemd-logind.service After=systemd-logind.service
After=systemd-vconsole-setup.service
Requires=systemd-logind.service Requires=systemd-logind.service
Before=getty.target Before=getty.target
Conflicts=getty@%i.service Conflicts=getty@%i.service
@@ -62,11 +63,13 @@ in {
X-RestartIfChanged=false 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.services.systemd-vconsole-setup.restartIfChanged = false;
systemd.units."kmsconvt@tty1.service".extraConfig.wait-for-vconsole-setup = "After=systemd-vconsole-setup.service";
services.kmscon.extraConfig = mkIf cfg.hwRender '' services.kmscon.extraConfig = mkIf cfg.hwRender ''
drm drm
@@ -9,6 +9,11 @@ let
user ${cfg.user} ${cfg.group}; user ${cfg.user} ${cfg.group};
daemon off; daemon off;
${cfg.config} ${cfg.config}
${optionalString (cfg.httpConfig != "") ''
http {
${cfg.httpConfig}
}
''}
${cfg.appendConfig} ${cfg.appendConfig}
''; '';
in 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 { stateDir = mkOption {
default = "/var/spool/nginx"; default = "/var/spool/nginx";
description = " description = "
@@ -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;
};
};
};
}
@@ -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;
};
}
@@ -17,7 +17,7 @@ in
# Note: the order in which desktop manager modules are imported here # Note: the order in which desktop manager modules are imported here
# determines the default: later modules (if enabled) are preferred. # determines the default: later modules (if enabled) are preferred.
# E.g., if KDE is enabled, it supersedes xterm. # 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 = { options = {
@@ -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 = environment.systemPackages =
[ gnome3.evince [ gnome3.evince
gnome3.eog gnome3.eog
@@ -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 ];
};
}
@@ -81,7 +81,7 @@ in
environment.pathsToLink = environment.pathsToLink =
[ "/share/xfce4" "/share/themes" "/share/mime" "/share/desktop-directories" "/share/gtksourceview-2.0" ]; [ "/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. # Enable helpful DBus services.
services.udisks2.enable = true; services.udisks2.enable = true;
@@ -16,7 +16,6 @@ in
./wmii.nix ./wmii.nix
./xmonad.nix ./xmonad.nix
./i3.nix ./i3.nix
./xbmc.nix
./herbstluftwm.nix ./herbstluftwm.nix
]; ];
@@ -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 ];
};
}
@@ -128,7 +128,7 @@ while (my ($unit, $state) = each %{$activePrev}) {
$baseName =~ s/\.[a-z]*$//; $baseName =~ s/\.[a-z]*$//;
if (-e $prevUnitFile && ($state->{state} eq "active" || $state->{state} eq "activating")) { 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; push @unitsToStop, $unit;
} }
+3
View File
@@ -203,6 +203,9 @@ in
# To wait for SCSI devices to appear. # To wait for SCSI devices to appear.
"scsi_wait_scan" "scsi_wait_scan"
# Needed by the stage 2 init script.
"rtc_cmos"
]; ];
boot.initrd.kernelModules = boot.initrd.kernelModules =
+9 -4
View File
@@ -131,13 +131,12 @@ if ! mountpoint -q /run; then
mount -t tmpfs -o "mode=0755,size=@runSize@" none /run mount -t tmpfs -o "mode=0755,size=@runSize@" none /run
fi fi
# Create a ramfs on /run/keys to hold secrets that shouldn't # Create a ramfs on /run/keys to hold secrets that shouldn't be
# be written to disk (generally used for nixops, harmless # written to disk (generally used for NixOps, harmless elsewhere).
# elsehwere)
if ! mountpoint -q /run/keys; then if ! mountpoint -q /run/keys; then
rm -rf /run/keys rm -rf /run/keys
mkdir -m 0750 /run/keys mkdir -m 0750 /run/keys
chown root:keys /run/keys chown 0:96 /run/keys
mount -t ramfs none /run/keys mount -t ramfs none /run/keys
fi fi
@@ -162,6 +161,12 @@ echo "running activation script..."
$systemConfig/activate $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. # Record the boot configuration.
ln -sfn "$systemConfig" /run/booted-system ln -sfn "$systemConfig" /run/booted-system
@@ -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 { description = mkOption {
default = ""; default = "";
type = types.str; type = types.str;
@@ -135,6 +141,7 @@ in rec {
restartTriggers = mkOption { restartTriggers = mkOption {
default = []; default = [];
type = types.listOf types.unspecified;
description = '' description = ''
An arbitrary list of items such as derivations. If any item An arbitrary list of items such as derivations. If any item
in the list changes between reconfigurations, the service will in the list changes between reconfigurations, the service will
+64 -62
View File
@@ -11,20 +11,18 @@ let
systemd = cfg.package; systemd = cfg.package;
makeUnit = name: unit: makeUnit = name: unit:
pkgs.runCommand "unit" { preferLocalBuild = true; inherit (unit) text; } if unit.enable then
((if !unit.enable then '' pkgs.runCommand "unit" { preferLocalBuild = true; inherit (unit) text; }
mkdir -p $out ''
ln -s /dev/null $out/${name} mkdir -p $out
'' else if unit.linkTarget != null then '' echo -n "$text" > $out/${name}
mkdir -p $out ''
ln -s ${unit.linkTarget} $out/${name} else
'' else if unit.text != null then '' pkgs.runCommand "unit" { preferLocalBuild = true; }
mkdir -p $out ''
echo -n "$text" > $out/${name} mkdir -p $out
'' else "") + optionalString (unit.extraConfig != {}) '' ln -s /dev/null $out/${name}
mkdir -p $out/${name}.d '';
${concatStringsSep "\n" (mapAttrsToList (n: v: "echo -n \"${v}\" > $out/${name}.d/${n}") unit.extraConfig)}
'');
upstreamUnits = upstreamUnits =
[ # Targets. [ # Targets.
@@ -132,6 +130,11 @@ let
++ optionals cfg.enableEmergencyMode [ ++ optionals cfg.enableEmergencyMode [
"emergency.target" "emergency.target"
"emergency.service" "emergency.service"
]
++ optionals config.services.journald.enableHttpGateway [
"systemd-journal-gatewayd.socket"
"systemd-journal-gatewayd.service"
]; ];
upstreamWants = upstreamWants =
@@ -151,15 +154,23 @@ let
unitConfig = { name, config, ... }: { unitConfig = { name, config, ... }: {
config = { config = {
unitConfig = unitConfig =
{ Requires = concatStringsSep " " config.requires; optionalAttrs (config.requires != [])
Wants = concatStringsSep " " config.wants; { Requires = toString config.requires; }
After = concatStringsSep " " config.after; // optionalAttrs (config.wants != [])
Before = concatStringsSep " " config.before; { Wants = toString config.wants; }
BindsTo = concatStringsSep " " config.bindsTo; // optionalAttrs (config.after != [])
PartOf = concatStringsSep " " config.partOf; { After = toString config.after; }
Conflicts = concatStringsSep " " config.conflicts; // optionalAttrs (config.before != [])
"X-Restart-Triggers" = toString config.restartTriggers; { Before = toString config.before; }
} // optionalAttrs (config.description != "") { // 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; Description = config.description;
}; };
}; };
@@ -167,7 +178,7 @@ let
serviceConfig = { name, config, ... }: { serviceConfig = { name, config, ... }: {
config = mkMerge 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 = path =
[ pkgs.coreutils [ pkgs.coreutils
pkgs.findutils pkgs.findutils
@@ -176,7 +187,7 @@ let
systemd systemd
]; ];
environment.PATH = config.path; environment.PATH = config.path;
} })
(mkIf (config.preStart != "") (mkIf (config.preStart != "")
{ serviceConfig.ExecStartPre = makeJobScript "${name}-pre-start" '' { serviceConfig.ExecStartPre = makeJobScript "${name}-pre-start" ''
#! ${pkgs.stdenv.shell} -e #! ${pkgs.stdenv.shell} -e
@@ -244,6 +255,14 @@ let
(if isList value then value else [value])) (if isList value then value else [value]))
as)); as));
commonUnitText = def:
optionalString (def.baseUnit != null) ''
.include ${def.baseUnit}
'' + ''
[Unit]
${attrsToSection def.unitConfig}
'';
targetToUnit = name: def: targetToUnit = name: def:
{ inherit (def) wantedBy requiredBy enable; { inherit (def) wantedBy requiredBy enable;
text = text =
@@ -255,11 +274,8 @@ let
serviceToUnit = name: def: serviceToUnit = name: def:
{ inherit (def) wantedBy requiredBy enable; { inherit (def) wantedBy requiredBy enable;
text = text = commonUnitText def +
'' ''
[Unit]
${attrsToSection def.unitConfig}
[Service] [Service]
${let env = cfg.globalEnvironment // def.environment; ${let env = cfg.globalEnvironment // def.environment;
in concatMapStrings (n: "Environment=\"${n}=${getAttr n env}\"\n") (attrNames env)} in concatMapStrings (n: "Environment=\"${n}=${getAttr n env}\"\n") (attrNames env)}
@@ -271,11 +287,8 @@ let
socketToUnit = name: def: socketToUnit = name: def:
{ inherit (def) wantedBy requiredBy enable; { inherit (def) wantedBy requiredBy enable;
text = text = commonUnitText def +
'' ''
[Unit]
${attrsToSection def.unitConfig}
[Socket] [Socket]
${attrsToSection def.socketConfig} ${attrsToSection def.socketConfig}
${concatStringsSep "\n" (map (s: "ListenStream=${s}") def.listenStreams)} ${concatStringsSep "\n" (map (s: "ListenStream=${s}") def.listenStreams)}
@@ -284,11 +297,8 @@ let
timerToUnit = name: def: timerToUnit = name: def:
{ inherit (def) wantedBy requiredBy enable; { inherit (def) wantedBy requiredBy enable;
text = text = commonUnitText def +
'' ''
[Unit]
${attrsToSection def.unitConfig}
[Timer] [Timer]
${attrsToSection def.timerConfig} ${attrsToSection def.timerConfig}
''; '';
@@ -296,11 +306,8 @@ let
mountToUnit = name: def: mountToUnit = name: def:
{ inherit (def) wantedBy requiredBy enable; { inherit (def) wantedBy requiredBy enable;
text = text = commonUnitText def +
'' ''
[Unit]
${attrsToSection def.unitConfig}
[Mount] [Mount]
${attrsToSection def.mountConfig} ${attrsToSection def.mountConfig}
''; '';
@@ -308,11 +315,8 @@ let
automountToUnit = name: def: automountToUnit = name: def:
{ inherit (def) wantedBy requiredBy enable; { inherit (def) wantedBy requiredBy enable;
text = text = commonUnitText def +
'' ''
[Unit]
${attrsToSection def.unitConfig}
[Automount] [Automount]
${attrsToSection def.automountConfig} ${attrsToSection def.automountConfig}
''; '';
@@ -372,6 +376,10 @@ let
ln -s ../local-fs.target ../remote-fs.target ../network.target ../nss-lookup.target \ ln -s ../local-fs.target ../remote-fs.target ../network.target ../nss-lookup.target \
../nss-user-lookup.target ../swap.target $out/multi-user.target.wants/ ../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 in
@@ -423,25 +431,9 @@ in
internal = true; internal = true;
description = "The generated unit."; 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 = { 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 { services.logind.extraConfig = mkOption {
default = ""; default = "";
type = types.lines; type = types.lines;
@@ -676,6 +676,8 @@ in
}; };
users.extraGroups.systemd-journal.gid = config.ids.gids.systemd-journal; 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. # Generate timer units for all services that have a startAt value.
systemd.timers = systemd.timers =
+20
View File
@@ -19,6 +19,8 @@ let
sources = map (x: x.source) etc'; sources = map (x: x.source) etc';
targets = map (x: x.target) etc'; targets = map (x: x.target) etc';
modes = map (x: x.mode) etc'; modes = map (x: x.mode) etc';
uids = map (x: x.uid) etc';
gids = map (x: x.gid) etc';
}; };
in 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 = { config = {
+4
View File
@@ -6,6 +6,8 @@ set -f
sources_=($sources) sources_=($sources)
targets_=($targets) targets_=($targets)
modes_=($modes) modes_=($modes)
uids_=($uids)
gids_=($gids)
set +f set +f
for ((i = 0; i < ${#targets_[@]}; i++)); do for ((i = 0; i < ${#targets_[@]}; i++)); do
@@ -35,6 +37,8 @@ for ((i = 0; i < ${#targets_[@]}; i++)); do
if test "${modes_[$i]}" != symlink; then if test "${modes_[$i]}" != symlink; then
echo "${modes_[$i]}" > $out/etc/$target.mode echo "${modes_[$i]}" > $out/etc/$target.mode
echo "${uids_[$i]}" > $out/etc/$target.uid
echo "${gids_[$i]}" > $out/etc/$target.gid
fi fi
fi fi
+8
View File
@@ -60,7 +60,15 @@ sub link {
if ($mode eq "direct-symlink") { if ($mode eq "direct-symlink") {
atomicSymlink readlink("$static/$fn"), $target or warn; atomicSymlink readlink("$static/$fn"), $target or warn;
} else { } 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; copy "$static/$fn", "$target.tmp" or warn;
chown int($uid), int($gid), "$target.tmp" or warn;
chmod oct($mode), "$target.tmp" or warn; chmod oct($mode), "$target.tmp" or warn;
rename "$target.tmp", $target or warn; rename "$target.tmp", $target or warn;
} }
+179 -52
View File
@@ -11,18 +11,30 @@ with pkgs.lib;
let let
cfgSpl = config.boot.spl; cfgSpl = config.boot.spl;
cfgSnapshots = config.services.zfs.autoSnapshot;
inInitrd = any (fs: fs == "zfs") config.boot.initrd.supportedFilesystems; inInitrd = any (fs: fs == "zfs") config.boot.initrd.supportedFilesystems;
inSystem = any (fs: fs == "zfs") config.boot.supportedFilesystems; inSystem = any (fs: fs == "zfs") config.boot.supportedFilesystems;
enableAutoSnapshots = cfgSnapshots.enable;
enableZfs = inInitrd || inSystem || enableAutoSnapshots;
kernel = config.boot.kernelPackages; kernel = config.boot.kernelPackages;
autosnapPkg = pkgs.zfstools.override {
zfs = config.boot.kernelPackages.zfs;
};
zfsAutoSnap = "${autosnapPkg}/bin/zfs-auto-snapshot";
in in
{ {
###### interface ###### interface
options = { options = {
boot.spl.hostid = mkOption { boot.spl.hostid = mkOption {
default = ""; default = "";
example = "0xdeadbeef"; example = "0xdeadbeef";
description = '' description = ''
@@ -34,62 +46,177 @@ in
manually import pools. 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 ###### implementation
config = mkIf ( inInitrd || inSystem ) { config = mkMerge [
(mkIf enableZfs {
boot = { boot = {
kernelModules = [ "spl" "zfs" ] ; kernelModules = [ "spl" "zfs" ] ;
extraModulePackages = [ kernel.zfs kernel.spl ]; extraModulePackages = [ kernel.zfs kernel.spl ];
extraModprobeConfig = mkIf (cfgSpl.hostid != "") '' extraModprobeConfig = mkIf (cfgSpl.hostid != "") ''
options spl spl_hostid=${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
''; '';
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" = { boot.initrd = mkIf inInitrd {
description = "Mount ZFS Volumes"; kernelModules = [ "spl" "zfs" ] ;
after = [ "zpool-import.service" ]; extraUtilsCommands =
wantedBy = [ "local-fs.target" ]; ''
serviceConfig = { cp -v ${kernel.zfs}/sbin/zfs $out/bin
Type = "oneshot"; cp -v ${kernel.zfs}/sbin/zdb $out/bin
RemainAfterExit = true; cp -v ${kernel.zfs}/sbin/zpool $out/bin
restartIfChanged = false; cp -pdv ${kernel.zfs}/lib/lib*.so* $out/lib
ExecStart = "${kernel.zfs}/sbin/zfs mount -a"; cp -pdv ${pkgs.zlib}/lib/lib*.so* $out/lib
ExecStop = "${kernel.zfs}/sbin/zfs umount -a"; '';
postDeviceCommands =
''
zpool import -f -a
'';
}; };
};
system.fsPackages = [ kernel.zfs ]; # XXX: needed? zfs doesn't have (need) a fsck systemd.services."zpool-import" = {
environment.systemPackages = [ kernel.zfs ]; description = "Import zpools";
services.udev.packages = [ kernel.zfs ]; # to hook zvol naming, etc. 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";
};
})
];
} }
+48 -5
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 { macAddress = mkOption {
default = null; default = null;
example = "00:11:22:33:44:55"; example = "00:11:22:33:44:55";
@@ -401,9 +421,11 @@ in
EOF EOF
# Disable or enable IPv6. # Disable or enable IPv6.
if [ -e /proc/sys/net/ipv6/conf/all/disable_ipv6 ]; then ${optionalString (!config.boot.isContainer) ''
echo ${if cfg.enableIPv6 then "0" else "1"} > /proc/sys/net/ipv6/conf/all/disable_ipv6 if [ -e /proc/sys/net/ipv6/conf/all/disable_ipv6 ]; then
fi echo ${if cfg.enableIPv6 then "0" else "1"} > /proc/sys/net/ipv6/conf/all/disable_ipv6
fi
''}
# Set the default gateway. # Set the default gateway.
${optionalString (cfg.defaultGateway != "") '' ${optionalString (cfg.defaultGateway != "") ''
@@ -435,6 +457,7 @@ in
(let mask = (let mask =
if i.prefixLength != null then toString i.prefixLength else if i.prefixLength != null then toString i.prefixLength else
if i.subnetMask != "" then i.subnetMask else "32"; if i.subnetMask != "" then i.subnetMask else "32";
staticIPv6 = cfg.enableIPv6 && i.ipv6Address != null;
in in
{ description = "Configuration of ${i.name}"; { description = "Configuration of ${i.name}";
wantedBy = [ "network-interfaces.target" ]; wantedBy = [ "network-interfaces.target" ];
@@ -468,11 +491,31 @@ in
echo "configuring interface..." echo "configuring interface..."
ip -4 addr flush dev "${i.name}" ip -4 addr flush dev "${i.name}"
ip -4 addr add "${i.ipAddress}/${mask}" 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. # Ensure that the default gateway remains set.
# (Flushing this interface may have removed it.) # (Flushing this interface may have removed it.)
${config.systemd.package}/bin/systemctl try-restart --no-block network-setup.service ${config.systemd.package}/bin/systemctl try-restart --no-block network-setup.service
else
echo "skipping configuring interface"
fi fi
${config.systemd.package}/bin/systemctl start ip-up.target ${config.systemd.package}/bin/systemctl start ip-up.target
'' ''
+1
View File
@@ -14,6 +14,7 @@ with import ../lib/testing.nix { inherit system minimal; };
efi-installer = makeTests (import ./efi-installer.nix); efi-installer = makeTests (import ./efi-installer.nix);
gnome3 = makeTest (import ./gnome3.nix); gnome3 = makeTest (import ./gnome3.nix);
ipv6 = makeTest (import ./ipv6.nix); ipv6 = makeTest (import ./ipv6.nix);
jenkins = makeTest (import ./jenkins.nix);
kde4 = makeTest (import ./kde4.nix); kde4 = makeTest (import ./kde4.nix);
#kexec = makeTest (import ./kexec.nix); #kexec = makeTest (import ./kexec.nix);
login = makeTest (import ./login.nix {}); login = makeTest (import ./login.nix {});
+35
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");
'';
}
+1 -1
View File
@@ -22,6 +22,6 @@ stdenv.mkDerivation rec {
description = "Daemon for exposing legacy ALSA sequencer applications in JACK MIDI system"; description = "Daemon for exposing legacy ALSA sequencer applications in JACK MIDI system";
license = licenses.gpl2; license = licenses.gpl2;
maintainers = [ maintainers.goibhniu ]; maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
}; };
} }
@@ -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;
};
}
@@ -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 ];
};
}
+45 -34
View File
@@ -1,51 +1,62 @@
{ stdenv, fetchurl, scons, boost, pkgconfig, fftw, librdf_raptor2 { stdenv, fetchgit, alsaLib, aubio, boost, cairomm, curl, fftw
, librdf_rasqal, jackaudio, flac, libsamplerate, alsaLib, libxml2 , fftwSinglePrec, flac, glibc, glibmm, gtk, gtkmm, jackaudio
, lilv, lv2, serd, sord, sratom, suil # these are probably optional , libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
, libxslt, libsndfile, libsigcxx, libusb, cairomm, glib, pango , librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
, gtk, glibmm, gtkmm, libgnomecanvas, libgnomecanvasmm, liblo, aubio , libusb, libuuid, libxml2, libxslt, lilv, lv2, makeWrapper, pango
, fftwSinglePrec, libmad, automake, autoconf, libtool, liblrdf, curl }: , perl, pkgconfig, python, serd, sord, sratom, suil }:
let
tag = "3.5.357";
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "ardour-${version}"; name = "ardour-${tag}";
version = "2.8.16";
src = fetchurl { src = fetchgit {
url = "mirror://gentoo/distfiles/${name}.tar.bz2"; url = git://git.ardour.org/ardour/ardour.git;
sha256 = "0h2y0x4yznalllja53anjil2gmgcb26f39zshc4gl1d1kc8k5vip"; rev = "refs/tags/${tag}";
sha256 = "1e026fb9a6ad4179d52c4b578cc3861bdfd3629b9e7b7a7341d431c7d3692c42";
}; };
postPatch = '' buildInputs =
#sed -e "s#/usr/bin/which#type -P#" -i libs/glibmm2/autogen.sh [ alsaLib aubio boost cairomm curl fftw fftwSinglePrec flac glibc
echo '#include "ardour/svn_revision.h"' > libs/ardour/svn_revision.cc glibmm gtk gtkmm jackaudio libgnomecanvas libgnomecanvasmm liblo
echo -e 'namespace ARDOUR {\n extern const char* svn_revision = "2.8.12";\n }\n' >> libs/ardour/svn_revision.cc 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 = [ configurePhase = "python waf configure --optimize --prefix=$out";
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
];
buildPhase = '' buildPhase = "python waf";
mkdir -p $out
export CXX=g++ # For the custom ardour clearlooks gtk-engine to work, it must be
scons PREFIX=$out SYSLIBS=1 install # 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 = with stdenv.lib; {
meta = {
description = "Multi-track hard disk recording software"; description = "Multi-track hard disk recording software";
longDescription = '' longDescription = ''
Broken: use ardour3-svn instead
Also read "The importance of Paying Something" on their homepage, please! Also read "The importance of Paying Something" on their homepage, please!
''; '';
homepage = http://ardour.org/; homepage = http://ardour.org/;
branch = "2"; license = licenses.gpl2;
license = "GPLv2"; platforms = platforms.linux;
maintainers = [ stdenv.lib.maintainers.marcweber ]; maintainers = [ maintainers.goibhniu ];
platforms = stdenv.lib.platforms.linux;
}; };
} }
+2 -2
View File
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "drumkv1-${version}"; name = "drumkv1-${version}";
version = "0.3.6"; version = "0.4.0";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/drumkv1/${name}.tar.gz"; url = "mirror://sourceforge/drumkv1/${name}.tar.gz";
sha256 = "13prman3jlh3xz56675vnnnghnmmbxpq8gqdhv5llgd8ggzhmyjn"; sha256 = "0bhj4liv6c0rw0gsh1zygj4a9vmwl3jdz2j6zzdxbqdk21xq4zpz";
}; };
buildInputs = [ jackaudio libsndfile lv2 qt4 ]; buildInputs = [ jackaudio libsndfile lv2 qt4 ];
+39
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 ];
}
@@ -26,5 +26,6 @@ stdenv.mkDerivation rec {
description = "Gigasampler file access library"; description = "Gigasampler file access library";
license = licenses.gpl2; license = licenses.gpl2;
maintainers = [ maintainers.goibhniu ]; maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
}; };
} }
+33
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;
};
}
+1
View File
@@ -25,5 +25,6 @@ stdenv.mkDerivation rec {
homepage = http://drobilla.net/software/jalv; homepage = http://drobilla.net/software/jalv;
license = licenses.isc; license = licenses.isc;
maintainers = [ maintainers.goibhniu ]; maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
}; };
} }
+1 -1
View File
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "LASH Audio Session Handler"; description = "A Linux Audio Session Handler";
longDescription = '' longDescription = ''
Session management system for GNU/Linux audio applications. Session management system for GNU/Linux audio applications.
''; '';
@@ -21,5 +21,6 @@ stdenv.mkDerivation rec {
description = "A simple tool which maps midi notes to simulated keystrokes"; description = "A simple tool which maps midi notes to simulated keystrokes";
license = licenses.gpl3; license = licenses.gpl3;
maintainers = [ maintainers.goibhniu ]; maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
}; };
} }
+3 -3
View File
@@ -1,11 +1,11 @@
{stdenv, fetchurl, alsaLib }: {stdenv, fetchurl, alsaLib }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "mpg123-1.18.1"; name = "mpg123-1.19.0";
src = fetchurl { src = fetchurl {
url = mirror://sourceforge/mpg123/mpg123-1.18.1.tar.bz2; url = mirror://sourceforge/mpg123/mpg123-1.19.0.tar.bz2;
sha256 = "0bb5hv0qw3ln09xisi7d19gb4p2y69sx3905rdc293q3gr7khvdw"; sha256 = "06xhd68mj9yp0r6l771aq0d7xgnl402a3wm2mvhxmd3w3ph29446";
}; };
buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib; buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
@@ -20,5 +20,6 @@ stdenv.mkDerivation rec {
description = "graphical frontend to LinuxSampler"; description = "graphical frontend to LinuxSampler";
license = licenses.gpl2; license = licenses.gpl2;
maintainers = [ maintainers.goibhniu ]; maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
}; };
} }
@@ -18,7 +18,7 @@ buildPythonPackage {
# XXX, tests fail # XXX, tests fail
doCheck = false; doCheck = false;
src = [ srcs = [
(fetchurl { (fetchurl {
url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-${version}.tar.gz"; url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-${version}.tar.gz";
sha256 = "0ilasi4b0ay8r6v6ba209wsm80fq2nmzigzc5kvphrk71jwypx6z"; sha256 = "0ilasi4b0ay8r6v6ba209wsm80fq2nmzigzc5kvphrk71jwypx6z";
@@ -27,7 +27,7 @@ buildPythonPackage {
url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-plugins-${version}.tar.gz"; url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-plugins-${version}.tar.gz";
sha256 = "1rv08rhdjad8sjhplqsspcf4vkazgkxyshsqmbfbrrk5kvv57ybc"; sha256 = "1rv08rhdjad8sjhplqsspcf4vkazgkxyshsqmbfbrrk5kvv57ybc";
}) })
]; ];
preConfigure = '' preConfigure = ''
# TODO: for now don't a apply gdist overrides, will be needed for shipping icons, gtk, etc # 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}"; sourceRoot = "quodlibet-${version}";
postUnpack = '' postUnpack = ''
# the patch searches for plugins in directory ../plugins # the patch searches for plugins in directory ../plugins
# so link the appropriate directory there # so link the appropriate directory there
ln -sf quodlibet-plugins-${version} plugins ln -sf quodlibet-plugins-${version} plugins
''; '';
patches = [ ./quodlibet-package-plugins.patch ]; patches = [ ./quodlibet-package-plugins.patch ];
buildInputs = stdenv.lib.optionals withGstPlugins [ buildInputs = stdenv.lib.optionals withGstPlugins [
+2 -2
View File
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "samplv1-${version}"; name = "samplv1-${version}";
version = "0.3.6"; version = "0.4.0";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/samplv1/${name}.tar.gz"; url = "mirror://sourceforge/samplv1/${name}.tar.gz";
sha256 = "1fgy9w3mp0p8i1v41a7gmpzzk268k7bp75d4sgzfprikjihc6ary"; sha256 = "04vldwpm4059czwd4i5yv07daqjnzs2zsrld779likans9ib3ri8";
}; };
buildInputs = [ jackaudio libsndfile lv2 qt4 ]; buildInputs = [ jackaudio libsndfile lv2 qt4 ];
+2 -2
View File
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "synthv1-${version}"; name = "synthv1-${version}";
version = "0.3.6"; version = "0.4.0";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/synthv1/${name}.tar.gz"; url = "mirror://sourceforge/synthv1/${name}.tar.gz";
sha256 = "1xj4dk1g546f9fv2c4i7g3f1axrxfrxzk9w1nidhj3686j79nyry"; sha256 = "0zyxja1s74fr95qbwsyykggs3af2ndm2hz1l0avb645xgm93vcfv";
}; };
buildInputs = [ qt4 jackaudio lv2 ]; buildInputs = [ qt4 jackaudio lv2 ];
+26
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 ];
}
@@ -0,0 +1,7 @@
Context:
[TAG 1.3
Simon Michael <simon@joyful.com>**20131103203640
Ignore-this: d12bac373e4aa0e5ffe6c390e1dfe269
]
@@ -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 ];
};
}
+5 -13
View File
@@ -1,28 +1,20 @@
{ stdenv, fetchurl, kdevplatform, cmake, pkgconfig, automoc4, shared_mime_info, { stdenv, fetchurl, kdevplatform, cmake, pkgconfig, automoc4, shared_mime_info,
kdebase_workspace, gettext, perl, okteta }: kdebase_workspace, gettext, perl, okteta, qjson }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
version = "4.3.1"; version = "4.6.0";
pname = "kdevelop"; pname = "kdevelop";
src = fetchurl { src = fetchurl {
url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.bz2"; url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
sha256 = "0015hv39rqhyq1w6jw65lx7ls4l5pc3a2asvd5zsd65831vrfxxs"; sha256 = "1ee9e7b8c46f575dd29d920cfd6284130f2e738a2e1f52dfd97b075fab2e4c73";
}; };
buildInputs = [ kdevplatform kdebase_workspace okteta ]; buildInputs = [ kdevplatform kdebase_workspace okteta qjson ];
nativeBuildInputs = [ cmake pkgconfig automoc4 shared_mime_info gettext perl ]; 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"; NIX_CFLAGS_COMPILE = "-I${okteta}/include/KDE";
meta = with stdenv.lib; { meta = with stdenv.lib; {
+4 -2
View File
@@ -2,10 +2,12 @@
let let
vimrcfile = writeText "vimrc" (if vimrc == null then "" else vimrc); vimrcfile = writeText "vimrc" vimrc;
p = builtins.parseDrvName vim.name;
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "vimwrapper-${vim.version}"; name = "${p.name}-with-vimrc-${p.version}";
buildInputs = [ makeWrapper vim vimrcfile ]; buildInputs = [ makeWrapper vim vimrcfile ];
@@ -1,17 +1,19 @@
{ stdenv, fetchurl, qt4, bison, flex, eigen, boost, mesa, glew, opencsg, cgal { stdenv, fetchurl, qt4, bison, flex, eigen, boost, mesa, glew, opencsg, cgal
, mpfr, gmp , mpfr, gmp, glib, pkgconfig
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2013.06"; version = "2014.03";
name = "openscad-${version}"; name = "openscad-${version}";
src = fetchurl { src = fetchurl {
url = "https://openscad.googlecode.com/files/${name}.src.tar.gz"; url = "http://files.openscad.org/${name}.src.tar.gz";
sha256 = "01r013l8zyfkgmqn05axh3rlfsjwd6j403w5ffl7nby4i2spiw1f"; 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 = '' configurePhase = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${eigen}/include/eigen*) " export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${eigen}/include/eigen*) "
@@ -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;
};
}
@@ -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;
};
}
@@ -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
@@ -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 ];
};
}
+1 -1
View File
@@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
for file in "$out"/bin/* "$out"/share/gnuradio/examples/*/*.py; do for file in "$out"/bin/* "$out"/share/gnuradio/examples/*/*.py; do
wrapProgram "$file" \ wrapProgram "$file" \
--set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") \ --prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath "$out") \
--set MATPLOTLIBRC "$out/share/gnuradio" --set MATPLOTLIBRC "$out/share/gnuradio"
done done
''; '';
+39
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 ];
};
}
+1 -1
View File
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
"--without-powerman" # Until we have it ... "--without-powerman" # Until we have it ...
"--without-cgi" "--without-cgi"
"--without-hal" "--without-hal"
"--with-systemdsystemunitdir=$(out)/etc/systemd/systemd" "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
"--with-udev-dir=$(out)/etc/udev" "--with-udev-dir=$(out)/etc/udev"
]; ];
@@ -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 ];
};
}
+2 -2
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}: , conf? null}:
with stdenv.lib; with stdenv.lib;
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
configFile = optionalString (conf!=null) (writeText "config.def.h" conf); configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h"; 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"; NIX_LDFLAGS = "-lfontconfig";
+6 -5
View File
@@ -1,15 +1,16 @@
{ cabal, alsaCore, alsaMixer, filepath, libXrandr, mtl, parsec { cabal, alsaCore, alsaMixer, filepath, HTTP, libXrandr, mtl
, regexCompat, stm, time, utf8String, wirelesstools, X11, X11Xft , parsec, regexCompat, stm, time, utf8String, wirelesstools, X11
, X11Xft
}: }:
cabal.mkDerivation (self: { cabal.mkDerivation (self: {
pname = "xmobar"; pname = "xmobar";
version = "0.19"; version = "0.20.1";
sha256 = "1lwbww9vpqscip16lqiax2qvfyksxms5xx4n0s61mzw7v61hyxq2"; sha256 = "16jfgn6ciqxrwj6qjhbcpms7mzlbxfaxyxfxp64xvnw626xlpjvk";
isLibrary = false; isLibrary = false;
isExecutable = true; isExecutable = true;
buildDepends = [ buildDepends = [
alsaCore alsaMixer filepath mtl parsec regexCompat stm time alsaCore alsaMixer filepath HTTP mtl parsec regexCompat stm time
utf8String X11 X11Xft utf8String X11 X11Xft
]; ];
extraLibraries = [ libXrandr wirelesstools ]; extraLibraries = [ libXrandr wirelesstools ];
+2 -2
View File
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, xorg, ncurses, freetype, fontconfig, pkgconfig }: { stdenv, fetchurl, xorg, ncurses, freetype, fontconfig, pkgconfig }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "xterm-301"; name = "xterm-303";
src = fetchurl { src = fetchurl {
url = "ftp://invisible-island.net/xterm/${name}.tgz"; url = "ftp://invisible-island.net/xterm/${name}.tgz";
sha256 = "040rarvv18zg0lk7qy0m3n7gv10mh40jic708wvng01z4rlbpfhz"; sha256 = "0n7hay16aam9kfn642ri0wj5yzilbjm3l8znxc2p5dx9pn3rkwla";
}; };
buildInputs = buildInputs =
@@ -275,7 +275,7 @@ in stdenv.mkDerivation rec {
meta = { meta = {
description = "An open source web browser from Google"; description = "An open source web browser from Google";
homepage = http://www.chromium.org/; homepage = http://www.chromium.org/;
maintainers = with maintainers; [ goibhniu chaoflow aszlig ]; maintainers = with maintainers; [ goibhniu chaoflow aszlig wizeman ];
license = licenses.bsd3; license = licenses.bsd3;
platforms = platforms.linux; platforms = platforms.linux;
}; };
@@ -1,18 +1,18 @@
# This file is autogenerated from update.sh in the same directory. # This file is autogenerated from update.sh in the same directory.
{ {
dev = { dev = {
version = "35.0.1862.2"; version = "35.0.1883.0";
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-35.0.1862.2.tar.xz"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-35.0.1883.0.tar.xz";
sha256 = "19426x4x3bnx21qjhqc4sk27k7dnhm1pw84079h6gk0hyjzcwn0f"; sha256 = "0qbv6prxl18y5824pfd13ng9798g561gzb6nypwp502hqr45jvb6";
}; };
beta = { beta = {
version = "34.0.1847.14"; version = "34.0.1847.60";
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-34.0.1847.14.tar.xz"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-34.0.1847.60.tar.xz";
sha256 = "038bz2d40rgjppkalal9ycjhfvkhph926k35v8pc3618z2fy10cn"; sha256 = "1na5d6z4a0wkabn7cj62vyiv3mmvcb6qdvrkyy6fj79h7gk2hb7k";
}; };
stable = { stable = {
version = "33.0.1750.146"; version = "33.0.1750.152";
url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-33.0.1750.146.tar.xz"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-33.0.1750.152.tar.xz";
sha256 = "0x2a5kyaj38661c5s33pywhrwkm8kj2fbr1z940c5al6y2hfgc6m"; sha256 = "0byc23vwn9alsva0jqvwvgnbx2bm7x48m3jln02y4fpf1f265m4z";
}; };
} }
@@ -195,7 +195,7 @@ rec {
meta = { meta = {
description = "Mozilla Firefox - the browser, reloaded"; description = "Mozilla Firefox - the browser, reloaded";
homepage = http://www.mozilla.com/en-US/firefox/; homepage = http://www.mozilla.com/en-US/firefox/;
maintainers = [ stdenv.lib.maintainers.eelco ]; maintainers = with stdenv.lib.maintainers; [ eelco wizeman ];
}; };
passthru = { passthru = {
@@ -2,8 +2,10 @@
, browserName, desktopName, nameSuffix, icon , browserName, desktopName, nameSuffix, icon
}: }:
let p = builtins.parseDrvName browser.name; in
stdenv.mkDerivation { stdenv.mkDerivation {
name = browser.name + "-with-plugins"; name = "${p.name}-with-plugins-${p.version}";
desktopItem = makeDesktopItem { desktopItem = makeDesktopItem {
name = browserName; name = browserName;
@@ -36,7 +36,7 @@
let let
# -> http://get.adobe.com/flashplayer/ # -> http://get.adobe.com/flashplayer/
version = "11.2.202.341"; version = "11.2.202.346";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.system == "x86_64-linux" then
@@ -47,7 +47,7 @@ let
else rec { else rec {
inherit version; inherit version;
url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.x86_64.tar.gz"; 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 else if stdenv.system == "i686-linux" then
if debug then { if debug then {
@@ -58,7 +58,7 @@ let
} else rec { } else rec {
inherit version; inherit version;
url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.i386.tar.gz"; 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"; else throw "Flash Player is not supported on this platform";
@@ -88,5 +88,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "Adobe Flash Player browser plugin"; description = "Adobe Flash Player browser plugin";
homepage = http://www.adobe.com/products/flashplayer/; homepage = http://www.adobe.com/products/flashplayer/;
maintainer = with stdenv.lib.maintainers; [ wizeman ];
license = "unfree";
}; };
} }
@@ -120,8 +120,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "Spark cluster computing"; description = "Spark cluster computing";
homepage = "http://spark.incubator.apache.org"; homepage = "http://spark.incubator.apache.org";
platforms = stdenv.lib.platforms.all;
license = stdenv.lib.licenses.asl20; license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.all;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
}; };
} }
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Integrated IRC client for KDE"; description = "Integrated IRC client for KDE";
repositories.git = git://anongit.kde.org/konversation;
license = "GPL"; license = "GPL";
inherit (kdelibs.meta) maintainers platforms; inherit (kdelibs.meta) maintainers platforms;
}; };
@@ -3,7 +3,7 @@
, gettext, iconv, locale, text, highline, rmail_sup, unicode, gnupg, which }: , gettext, iconv, locale, text, highline, rmail_sup, unicode, gnupg, which }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "20131130"; version = "20140312";
name = "sup-${version}"; name = "sup-${version}";
meta = { meta = {
@@ -18,8 +18,8 @@ stdenv.mkDerivation rec {
src = fetchgit { src = fetchgit {
url = git://github.com/sup-heliotrope/sup.git; url = git://github.com/sup-heliotrope/sup.git;
rev = "a5a1e39034204ac4b05c9171a71164712690b010"; rev = "0cad7b308237c07b8a46149908b2ad4806ac3d1d";
sha256 = "0w2w7dcif1ri1qq81csz7gj45rqd9z7hjd6x29awibybyyqyvj5s"; sha256 = "83534b6ad9fb6aa883d630c927e3a71bd09a646e3254b4eb0cc7a09f69a525bc";
}; };
buildInputs = buildInputs =
@@ -1,30 +1,58 @@
{ stdenv, fetchurl, pkgconfig, intltool, glib, gtk2, gnome2 /*just GConf*/ { stdenv, fetchurl, pkgconfig, intltool, python, pygobject3
, libsoup, libunique, libxslt, webkit_gtk2, json_glib , glib, gnome3, pango, libxml2, libxslt, sqlite, libsoup, glib_networking
, libnotify /*optional*/ }: , webkitgtk, json_glib, gobjectIntrospection, gst_all_1
, libnotify
, makeWrapper
}:
let version = "1.8.15"; let pname = "liferea";
version = "1.10.7";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "liferea-${version}"; name = "${pname}-${version}";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/liferea/Liferea%20Stable/${version}/${name}.tar.bz2"; url = "https://github.com/lwindolf/${pname}/releases/download/v${version}/${name}.tar.bz2";
sha256 = "12hhdl5biwcvr9ds7pdhhvlp4vggjix6xm4z5pnfaz53ai2dnc99"; sha256 = "17kvg44brdz99firr5h5qx8icvadlr7p1cz3xr3437sf5rhj25wh";
}; };
buildInputs = [ buildInputs = with gst_all_1; [
pkgconfig intltool gtk2 gnome2.GConf pkgconfig intltool python
libsoup libunique libxslt webkit_gtk2 json_glib 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 libnotify
makeWrapper
]; ];
preFixup = '' preFixup = ''
rm $out/share/icons/hicolor/icon-theme.cache''; 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 = { meta = {
description = "A GTK-based news feed agregator"; description = "A GTK-based news feed agregator";
homepage = http://lzone.de/liferea/; 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; 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.
'';
}; };
} }
@@ -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;
};
}
@@ -5,11 +5,11 @@ stdenv.mkDerivation rec {
name = pname + "-" + version; name = pname + "-" + version;
pname = "ktorrent"; pname = "ktorrent";
version = "4.2.1"; version = "4.3.1";
src = fetchurl { src = fetchurl {
url = "${meta.homepage}/downloads/${version}/${name}.tar.bz2"; url = "${meta.homepage}/downloads/${version}/${name}.tar.bz2";
sha256 = "1b6w7i1vvq8mlw9yrlxvb51hvaj6rpl8lv9b9zagyl3wcanz73zd"; sha256 = "66094f6833347afb0c49e332f0ec15ec48db652cbe66476840846ffd5ca0e4a1";
}; };
patches = [ ./find-workspace.diff ]; patches = [ ./find-workspace.diff ];
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "KDE integrated BtTorrent client"; description = "KDE integrated BtTorrent client";
homepage = http://ktorrent.org; homepage = http://ktorrent.pwsp.net;
maintainers = with stdenv.lib.maintainers; [ sander urkud ]; maintainers = with stdenv.lib.maintainers; [ sander urkud ];
inherit (libktorrent.meta) platforms; inherit (libktorrent.meta) platforms;
}; };
@@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
''; '';
homepage = http://www.transmissionbt.com/; homepage = http://www.transmissionbt.com/;
license = licenses.gpl2; # parts are under MIT license = licenses.gpl2; # parts are under MIT
maintainers = with maintainers; [ astsmtl vcunat ]; maintainers = with maintainers; [ astsmtl vcunat wizeman ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

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