strip trailing whitespace; no functional change
svn path=/nixos/trunk/; revision=29285
This commit is contained in:
parent
f5e8d35f8e
commit
eb6e1310b8
209 changed files with 1296 additions and 1296 deletions
|
@ -3,7 +3,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
|
||||
|
||||
eval = import ./lib/eval-config.nix {
|
||||
inherit system;
|
||||
modules = [ configuration ];
|
||||
|
@ -26,7 +26,7 @@ let
|
|||
{ virtualisation.useBootLoader = true; }
|
||||
];
|
||||
}).config;
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
swapDevices = [
|
||||
{ device = "/dev/sdb1"; }
|
||||
];
|
||||
|
||||
|
||||
services = {
|
||||
openssh = {
|
||||
enable = true;
|
||||
|
|
|
@ -18,15 +18,15 @@
|
|||
swapDevices = [
|
||||
{ device = "/dev/sda2"; }
|
||||
];
|
||||
|
||||
|
||||
services = {
|
||||
sshd = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
fonts = {
|
||||
enableFontConfig = false;
|
||||
fonts = {
|
||||
enableFontConfig = false;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
boot = {
|
||||
grubDevice = "/dev/sda";
|
||||
};
|
||||
|
||||
|
||||
fileSystems = [
|
||||
{ mountPoint = "/";
|
||||
device = "/dev/sda1";
|
||||
|
@ -10,7 +10,7 @@
|
|||
];
|
||||
|
||||
services = {
|
||||
|
||||
|
||||
sshd = {
|
||||
enable = true;
|
||||
};
|
||||
|
@ -28,9 +28,9 @@
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
, revision ? "HEAD"
|
||||
}:
|
||||
|
||||
let
|
||||
let
|
||||
|
||||
# To prevent infinite recursion, remove system.path from the
|
||||
# options. Not sure why this happens.
|
||||
|
@ -59,7 +59,7 @@ in rec {
|
|||
|
||||
ln -s ${pkgs.docbook5_xsl}/xml/xsl/docbook/images $dst/
|
||||
cp ${./style.css} $dst/style.css
|
||||
|
||||
|
||||
ensureDir $out/nix-support
|
||||
echo "doc manual $dst manual.html" >> $out/nix-support/hydra-build-products
|
||||
'';
|
||||
|
@ -93,4 +93,4 @@ in rec {
|
|||
'';
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ rec {
|
|||
|
||||
inherit pkgs;
|
||||
|
||||
|
||||
|
||||
# Build a virtual network from an attribute set `{ machine1 =
|
||||
# config1; ... machineN = configN; }', where `machineX' is the
|
||||
# hostname and `configX' is a NixOS system configuration. Each
|
||||
|
@ -38,7 +38,7 @@ rec {
|
|||
assignIPAddresses = nodes:
|
||||
|
||||
let
|
||||
|
||||
|
||||
machines = lib.attrNames nodes;
|
||||
|
||||
machinesNumbered = lib.zipTwoLists machines (lib.range 1 254);
|
||||
|
@ -47,7 +47,7 @@ rec {
|
|||
[ ( { config, pkgs, nodes, ... }:
|
||||
let
|
||||
interfacesNumbered = lib.zipTwoLists config.virtualisation.vlans (lib.range 1 255);
|
||||
interfaces =
|
||||
interfaces =
|
||||
lib.flip map interfacesNumbered ({ first, second }:
|
||||
{ name = "eth${toString second}";
|
||||
ipAddress = "192.168.${toString first}.${toString m.second}";
|
||||
|
@ -58,12 +58,12 @@ rec {
|
|||
{ key = "ip-address";
|
||||
config =
|
||||
{ networking.hostName = m.first;
|
||||
|
||||
|
||||
networking.interfaces = interfaces;
|
||||
|
||||
|
||||
networking.primaryIPAddress =
|
||||
lib.optionalString (interfaces != []) (lib.head interfaces).ipAddress;
|
||||
|
||||
|
||||
# Put the IP addresses of all VMs in this machine's
|
||||
# /etc/hosts file. If a machine has multiple
|
||||
# interfaces, use the IP address corresponding to
|
||||
|
@ -74,7 +74,7 @@ rec {
|
|||
lib.optionalString (config.networking.primaryIPAddress != "")
|
||||
("${config.networking.primaryIPAddress} " +
|
||||
"${config.networking.hostName}\n"));
|
||||
|
||||
|
||||
virtualisation.qemu.options =
|
||||
lib.flip map interfacesNumbered
|
||||
({ first, second }: qemuNICFlags second first m.second);
|
||||
|
|
|
@ -36,7 +36,7 @@ stdenv.mkDerivation {
|
|||
name = "iso9660-image";
|
||||
builder = ./make-iso9660-image.sh;
|
||||
buildInputs = [perl cdrkit];
|
||||
|
||||
|
||||
inherit isoName bootable bootImage compressImage volumeID pathsFromGraph;
|
||||
|
||||
# !!! should use XML.
|
||||
|
@ -46,7 +46,7 @@ stdenv.mkDerivation {
|
|||
# !!! should use XML.
|
||||
objects = map (x: x.object) storeContents;
|
||||
symlinks = map (x: x.symlink) storeContents;
|
||||
|
||||
|
||||
# For obtaining the closure of `storeContents'.
|
||||
exportReferencesGraph =
|
||||
map (x: [("closure-" + baseNameOf x.object) x.object]) storeContents;
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
stdenv.mkDerivation {
|
||||
name = "squashfs.img";
|
||||
|
||||
|
||||
buildInputs = [perl squashfsTools];
|
||||
|
||||
|
||||
# For obtaining the closure of `storeContents'.
|
||||
exportReferencesGraph =
|
||||
map (x: [("closure-" + baseNameOf x) x]) storeContents;
|
||||
|
@ -18,7 +18,7 @@ stdenv.mkDerivation {
|
|||
''
|
||||
# Add the closures of the top-level store objects.
|
||||
storePaths=$(perl ${pathsFromGraph} closure-*)
|
||||
|
||||
|
||||
# Also include a manifest of the closures in a format suitable
|
||||
# for nix-store --load-db.
|
||||
printRegistration=1 perl ${pathsFromGraph} closure-* > nix-path-registration
|
||||
|
|
|
@ -21,7 +21,7 @@ stdenv.mkDerivation {
|
|||
name = "tarball";
|
||||
builder = ./make-system-tarball.sh;
|
||||
buildInputs = [perl xz];
|
||||
|
||||
|
||||
inherit fileName pathsFromGraph;
|
||||
|
||||
# !!! should use XML.
|
||||
|
@ -31,7 +31,7 @@ stdenv.mkDerivation {
|
|||
# !!! should use XML.
|
||||
objects = map (x: x.object) storeContents;
|
||||
symlinks = map (x: x.symlink) storeContents;
|
||||
|
||||
|
||||
# For obtaining the closure of `storeContents'.
|
||||
exportReferencesGraph =
|
||||
map (x: [("closure-" + baseNameOf x.object) x.object]) storeContents;
|
||||
|
|
|
@ -14,13 +14,13 @@ rec {
|
|||
buildInputs = [ makeWrapper perl ];
|
||||
|
||||
unpackPhase = "true";
|
||||
|
||||
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
cp ${./test-driver/test-driver.pl} $out/bin/nixos-test-driver
|
||||
chmod u+x $out/bin/nixos-test-driver
|
||||
|
||||
|
||||
libDir=$out/lib/perl5/site_perl
|
||||
mkdir -p $libDir
|
||||
cp ${./test-driver/Machine.pm} $libDir/Machine.pm
|
||||
|
@ -38,9 +38,9 @@ rec {
|
|||
runTests = driver:
|
||||
stdenv.mkDerivation {
|
||||
name = "vm-test-run";
|
||||
|
||||
|
||||
requiredSystemFeatures = [ "kvm" ];
|
||||
|
||||
|
||||
buildInputs = [ pkgs.libxslt ];
|
||||
|
||||
buildCommand =
|
||||
|
@ -49,7 +49,7 @@ rec {
|
|||
|
||||
LOGFILE=$out/log.xml tests='eval $ENV{testScript}; die $@ if $@;' ${driver}/bin/nixos-test-driver || failed=1
|
||||
|
||||
# Generate a pretty-printed log.
|
||||
# Generate a pretty-printed log.
|
||||
xsltproc --output $out/log.html ${./test-driver/log2html.xsl} $out/log.xml
|
||||
ln -s ${./test-driver/logfile.css} $out/logfile.css
|
||||
ln -s ${./test-driver/treebits.js} $out/treebits.js
|
||||
|
@ -96,12 +96,12 @@ rec {
|
|||
done
|
||||
|
||||
find $TMPDIR/gcov -name "*.gcda" -exec chmod 644 {} \;
|
||||
|
||||
|
||||
echo "producing info..."
|
||||
${pkgs.lcov}/bin/geninfo --ignore-errors source,gcov $TMPDIR/gcov --output-file $TMPDIR/app.info
|
||||
cat $TMPDIR/app.info >> $TMPDIR/full.info
|
||||
done
|
||||
|
||||
|
||||
echo "making report..."
|
||||
mkdir -p $out/coverage
|
||||
${pkgs.lcov}/bin/genhtml --show-details $TMPDIR/full.info -o $out/coverage
|
||||
|
@ -131,11 +131,11 @@ rec {
|
|||
if builtins.isFunction t.testScript
|
||||
then t.testScript { inherit nodes; }
|
||||
else t.testScript;
|
||||
|
||||
|
||||
vlans = map (m: m.config.virtualisation.vlans) (lib.attrValues nodes);
|
||||
|
||||
vms = map (m: m.config.system.build.vm) (lib.attrValues nodes);
|
||||
|
||||
|
||||
# Generate onvenience wrappers for running the test driver
|
||||
# interactively with the specified network, and for starting the
|
||||
# VMs from the command line.
|
||||
|
@ -161,11 +161,11 @@ rec {
|
|||
''; # "
|
||||
|
||||
test = runTests driver;
|
||||
|
||||
|
||||
report = makeReport test;
|
||||
};
|
||||
|
||||
|
||||
|
||||
runInMachine =
|
||||
{ drv
|
||||
, machine
|
||||
|
@ -181,12 +181,12 @@ rec {
|
|||
|
||||
buildrunner = writeText "vm-build" ''
|
||||
source $1
|
||||
|
||||
|
||||
${coreutils}/bin/mkdir -p $TMPDIR
|
||||
cd $TMPDIR
|
||||
|
||||
|
||||
$origBuilder $origArgs
|
||||
|
||||
|
||||
exit $?
|
||||
'';
|
||||
|
||||
|
@ -211,10 +211,10 @@ rec {
|
|||
builder = "${bash}/bin/sh";
|
||||
args = ["-e" vmRunCommand];
|
||||
origArgs = attrs.args;
|
||||
origBuilder = attrs.builder;
|
||||
origBuilder = attrs.builder;
|
||||
});
|
||||
|
||||
|
||||
|
||||
runInMachineWithX = { require ? [], ... } @ args:
|
||||
let
|
||||
client =
|
||||
|
@ -238,7 +238,7 @@ rec {
|
|||
'';
|
||||
} // args);
|
||||
|
||||
|
||||
|
||||
simpleTest = as: (makeTest ({ ... }: as)).test;
|
||||
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# there dependencies to track problems and their sources.
|
||||
|
||||
let
|
||||
|
||||
|
||||
evalFun = {
|
||||
extraArgs ? {}
|
||||
}: import ../lib/eval-config.nix {
|
||||
|
|
|
@ -35,8 +35,8 @@ let
|
|||
enableFontDir = mkOption {
|
||||
default = false;
|
||||
description = "
|
||||
Whether to create a directory with links to all fonts in share -
|
||||
so user can configure vncserver script one time (I mean per-user
|
||||
Whether to create a directory with links to all fonts in share -
|
||||
so user can configure vncserver script one time (I mean per-user
|
||||
vncserver, so global service is not a good solution).
|
||||
";
|
||||
};
|
||||
|
@ -122,7 +122,7 @@ let
|
|||
for i in \$list ; do
|
||||
fontDirs=\"\$fontDirs \$(dirname \$i)\";
|
||||
done;
|
||||
mkdir -p \$out/share/X11-fonts/;
|
||||
mkdir -p \$out/share/X11-fonts/;
|
||||
find \$fontDirs -type f -o -type l | while read i; do
|
||||
j=\"\${i##*/}\"
|
||||
if ! test -e \"\$out/share/X11-fonts/\${j}\"; then
|
||||
|
@ -142,7 +142,7 @@ let
|
|||
x11Fonts = with localDefs; stdenv.mkDerivation rec {
|
||||
name = "X11-fonts";
|
||||
builder = writeScript (name + "-builder")
|
||||
(textClosure localDefs
|
||||
(textClosure localDefs
|
||||
[installPhase doForceShare doPropagate]);
|
||||
meta = {
|
||||
description = "
|
||||
|
@ -169,7 +169,7 @@ in
|
|||
];
|
||||
|
||||
environment.shellInit =
|
||||
''
|
||||
''
|
||||
export FONTCONFIG_FILE=/etc/fonts/fonts.conf
|
||||
'';
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ let
|
|||
description = "Kerberos Domain Controller";
|
||||
};
|
||||
|
||||
kerberosAdminServer = mkOption {
|
||||
kerberosAdminServer = mkOption {
|
||||
default = "kerberos.mit.edu";
|
||||
description = "Kerberos Admin Server";
|
||||
};
|
||||
|
|
|
@ -69,7 +69,7 @@ mkIf config.users.ldap.enable {
|
|||
'';
|
||||
target = "ldap.conf";
|
||||
}
|
||||
|
||||
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ let
|
|||
Additional entries to be appended to <filename>/etc/hosts</filename>.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
in
|
||||
|
|
|
@ -28,7 +28,7 @@ in
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
powerManagement = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -44,7 +44,7 @@ in
|
|||
default = "";
|
||||
description = "Commands executed after the system resumes from suspend-to-RAM.";
|
||||
};
|
||||
|
||||
|
||||
powerUpCommands = mkOption {
|
||||
default = "";
|
||||
example = "${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda";
|
||||
|
@ -66,11 +66,11 @@ in
|
|||
it goes to suspend or hibernation.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
@ -86,11 +86,11 @@ in
|
|||
target = "pm/sleep.d/00sleep-hook";
|
||||
};
|
||||
|
||||
boot.kernelModules =
|
||||
[ "acpi_cpufreq" "cpufreq_performance" "cpufreq_powersave" "cpufreq_ondemand"
|
||||
boot.kernelModules =
|
||||
[ "acpi_cpufreq" "cpufreq_performance" "cpufreq_powersave" "cpufreq_ondemand"
|
||||
"p4_clockmod"
|
||||
];
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ let cfg = config.hardware.pulseaudio; in
|
|||
{
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
hardware.pulseaudio.enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
|
@ -26,7 +26,7 @@ let cfg = config.hardware.pulseaudio; in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
|
@ -46,7 +46,7 @@ let cfg = config.hardware.pulseaudio; in
|
|||
''}
|
||||
'';
|
||||
}
|
||||
|
||||
|
||||
] ++ optionals cfg.enable
|
||||
[ # Write an /etc/asound.conf that causes all ALSA applications to
|
||||
# be re-routed to the PulseAudio server through ALSA's Pulse
|
||||
|
@ -57,16 +57,16 @@ let cfg = config.hardware.pulseaudio; in
|
|||
pcm_type.pulse {
|
||||
lib ${pkgs.alsaPlugins}/lib/alsa-lib/libasound_module_pcm_pulse.so
|
||||
}
|
||||
|
||||
|
||||
pcm.!default {
|
||||
type pulse
|
||||
hint.description "Default Audio Device (via PulseAudio)"
|
||||
}
|
||||
|
||||
|
||||
ctl_type.pulse {
|
||||
lib ${pkgs.alsaPlugins}/lib/alsa-lib/libasound_module_ctl_pulse.so
|
||||
}
|
||||
|
||||
|
||||
ctl.!default {
|
||||
type pulse
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ let cfg = config.hardware.pulseaudio; in
|
|||
|
||||
# Allow PulseAudio to get realtime priority using rtkit.
|
||||
security.rtkit.enable = true;
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,6 @@ with pkgs.lib;
|
|||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ with pkgs.lib;
|
|||
{
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
swapDevices = mkOption {
|
||||
|
@ -30,7 +30,7 @@ with pkgs.lib;
|
|||
options = {config, options, ...}: {
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
device = mkOption {
|
||||
example = "/dev/sda3";
|
||||
type = types.string;
|
||||
|
@ -64,9 +64,9 @@ with pkgs.lib;
|
|||
else
|
||||
mkNotdef;
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@ with pkgs.lib;
|
|||
let
|
||||
|
||||
cfg = config.environment;
|
||||
|
||||
|
||||
requiredPackages =
|
||||
[ config.system.sbin.modprobe # must take precedence over module_init_tools
|
||||
config.system.sbin.mount # must take precedence over util-linux
|
||||
|
@ -91,7 +91,7 @@ let
|
|||
description = ''
|
||||
The packages you want in the boot environment.
|
||||
'';
|
||||
|
||||
|
||||
apply = list: pkgs.buildEnv {
|
||||
name = "system-path";
|
||||
paths = list;
|
||||
|
@ -109,11 +109,11 @@ let
|
|||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ let
|
|||
default = [];
|
||||
example = "map (x : x.ini) (with pkgs.unixODBCDrivers; [ mysql psql psqlng ] )";
|
||||
description = ''
|
||||
specifies unix odbc drivers to be registered at /etc/odbcinst.ini.
|
||||
specifies unix odbc drivers to be registered at /etc/odbcinst.ini.
|
||||
Maybe you also want to add pkgs.unixODBC to the system path to get a
|
||||
command line client t connnect to odbc databases.
|
||||
'';
|
||||
|
@ -30,10 +30,10 @@ mkIf (config.environment.unixODBCDrivers != []) {
|
|||
require = [
|
||||
options
|
||||
];
|
||||
|
||||
|
||||
environment = {
|
||||
etc = [
|
||||
{ source =
|
||||
{ source =
|
||||
let inis = config.environment.unixODBCDrivers;
|
||||
in pkgs.writeText "odbcinst.ini" (pkgs.lib.concatStringsSep "\n" inis);
|
||||
target = "odbcinst.ini";
|
||||
|
|
|
@ -6,7 +6,7 @@ let
|
|||
|
||||
ids = config.ids;
|
||||
|
||||
|
||||
|
||||
# User accounts to be created/updated by NixOS.
|
||||
users =
|
||||
let
|
||||
|
@ -46,7 +46,7 @@ let
|
|||
# Groups to be created/updated by NixOS.
|
||||
groups =
|
||||
let
|
||||
defaultGroups =
|
||||
defaultGroups =
|
||||
[ { name = "root";
|
||||
gid = ids.gids.root;
|
||||
}
|
||||
|
@ -108,10 +108,10 @@ let
|
|||
# having an empty password, and not having a password.
|
||||
serializedUser = u: "${u.name}\n${u.description}\n${toString u.uid}\n${u.group}\n${toString (concatStringsSep "," u.extraGroups)}\n${u.home}\n${u.shell}\n${toString u.createHome}\n${if u.password != null then "X" + u.password else ""}\n${toString u.isSystemUser}\n";
|
||||
serializedGroup = g: "${g.name}\n${toString g.gid}";
|
||||
|
||||
|
||||
# keep this extra file so that cat can be used to pass special chars such as "`" which is used in the avahi daemon
|
||||
usersFile = pkgs.writeText "users" (concatStrings (map serializedUser users));
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -119,7 +119,7 @@ in
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
users.extraUsers = mkOption {
|
||||
default = [];
|
||||
example =
|
||||
|
@ -152,7 +152,7 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
@ -230,7 +230,7 @@ in
|
|||
system.activationScripts.groups = stringAfter [ "rootPasswd" "binsh" "etc" "var" ]
|
||||
''
|
||||
echo "updating groups..."
|
||||
|
||||
|
||||
while true; do
|
||||
read name || break
|
||||
read gid
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
networking.enableIntel2100BGFirmware = pkgs.lib.mkOption {
|
||||
default = false;
|
||||
type = pkgs.lib.types.bool;
|
||||
|
@ -22,13 +22,13 @@
|
|||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
||||
config = pkgs.lib.mkIf config.networking.enableIntel2100BGFirmware {
|
||||
|
||||
|
||||
# Warning: setting this option requires acceptance of the firmware
|
||||
# license, see http://ipw2100.sourceforge.net/firmware.php?fid=2.
|
||||
hardware.firmware = [ pkgs.ipw2100fw ];
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
networking.enableIntel2200BGFirmware = pkgs.lib.mkOption {
|
||||
default = false;
|
||||
type = pkgs.lib.types.bool;
|
||||
|
@ -22,13 +22,13 @@
|
|||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
||||
config = pkgs.lib.mkIf config.networking.enableIntel2200BGFirmware {
|
||||
|
||||
|
||||
# Warning: setting this option requires acceptance of the firmware
|
||||
# license, see http://ipw2200.sourceforge.net/firmware.php?fid=7.
|
||||
hardware.firmware = [ pkgs.ipw2200fw ];
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
networking.enableIntel3945ABGFirmware = pkgs.lib.mkOption {
|
||||
default = false;
|
||||
type = pkgs.lib.types.bool;
|
||||
|
@ -19,11 +19,11 @@
|
|||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
||||
config = pkgs.lib.mkIf config.networking.enableIntel3945ABGFirmware {
|
||||
|
||||
|
||||
hardware.firmware = [ pkgs.iwlwifi3945ucode ];
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
networking.enableRT73Firmware = pkgs.lib.mkOption {
|
||||
default = false;
|
||||
type = pkgs.lib.types.bool;
|
||||
|
@ -18,9 +18,9 @@
|
|||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
||||
config = pkgs.lib.mkIf config.networking.enableRT73Firmware {
|
||||
hardware.firmware = [ pkgs.rt73fw ];
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
networking.enableRTL8192cFirmware = pkgs.lib.mkOption {
|
||||
default = false;
|
||||
type = pkgs.lib.types.bool;
|
||||
|
@ -18,9 +18,9 @@
|
|||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
||||
config = pkgs.lib.mkIf config.networking.enableRTL8192cFirmware {
|
||||
hardware.firmware = [ pkgs.rtl8192cfw ];
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -10,6 +10,6 @@ in
|
|||
environment.systemPackages = [wis_go7007];
|
||||
|
||||
hardware.firmware = ["${wis_go7007}/firmware"];
|
||||
|
||||
|
||||
services.udev.packages = [wis_go7007];
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ let
|
|||
nixpkgsTarball = makeTarball "nixpkgs.tar.bz2" (cleanSource pkgs.path);
|
||||
|
||||
includeSources = true;
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -40,9 +40,9 @@ in
|
|||
|
||||
# ISO naming.
|
||||
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixosVersion}-${pkgs.stdenv.system}.iso";
|
||||
|
||||
|
||||
isoImage.volumeID = "NIXOS_INSTALL_CD_${config.system.nixosVersion}";
|
||||
|
||||
|
||||
boot.postBootCommands =
|
||||
''
|
||||
export PATH=${pkgs.gnutar}/bin:${pkgs.bzip2}/bin:$PATH
|
||||
|
|
|
@ -85,7 +85,7 @@ let
|
|||
|
||||
|
||||
# The configuration file for Grub.
|
||||
grubCfg =
|
||||
grubCfg =
|
||||
''
|
||||
set default=${builtins.toString config.boot.loader.grub.default}
|
||||
set timeout=${builtins.toString config.boot.loader.grub.timeout}
|
||||
|
@ -104,12 +104,12 @@ let
|
|||
set menu_color_normal=cyan/blue
|
||||
set menu_color_highlight=white/blue
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
${config.boot.loader.grub.extraEntries}
|
||||
'';
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -154,13 +154,13 @@ in
|
|||
# We need squashfs in the initrd to mount the compressed Nix store,
|
||||
# and aufs to make the root filesystem appear writable.
|
||||
boot.extraModulePackages =
|
||||
optional
|
||||
(! ( config.boot.kernelPackages.kernel.features ? aufs || config.boot.kernelPackages.kernel.features ? aufs2_1 ) )
|
||||
optional
|
||||
(! ( config.boot.kernelPackages.kernel.features ? aufs || config.boot.kernelPackages.kernel.features ? aufs2_1 ) )
|
||||
config.boot.kernelPackages.aufs2
|
||||
++ optional
|
||||
( config.boot.kernelPackages.kernel.features ? aufs2_1 )
|
||||
config.boot.kernelPackages.aufs2_1;
|
||||
|
||||
|
||||
boot.initrd.availableKernelModules = [ "aufs" "squashfs" "iso9660" ];
|
||||
|
||||
boot.initrd.kernelModules = [ "loop" ];
|
||||
|
@ -184,7 +184,7 @@ in
|
|||
# Closures to be copied to the Nix store on the CD, namely the init
|
||||
# script and the top-level system configuration directory.
|
||||
isoImage.storeContents =
|
||||
[ config.system.build.toplevel ] ++
|
||||
[ config.system.build.toplevel ] ++
|
||||
optional config.isoImage.includeSystemBuildDependencies
|
||||
config.system.build.toplevel.drvPath;
|
||||
|
||||
|
@ -237,13 +237,13 @@ in
|
|||
chainloader +1
|
||||
}
|
||||
'';
|
||||
|
||||
|
||||
boot.loader.grub.timeout = 10;
|
||||
|
||||
# Create the ISO image.
|
||||
system.build.isoImage = import ../../../lib/make-iso9660-image.nix {
|
||||
inherit (pkgs) stdenv perl cdrkit pathsFromGraph;
|
||||
|
||||
|
||||
inherit (config.isoImage) isoName compressImage volumeID contents;
|
||||
|
||||
bootable = true;
|
||||
|
|
|
@ -23,32 +23,32 @@
|
|||
pkgs.patch
|
||||
pkgs.which
|
||||
pkgs.diffutils
|
||||
pkgs.file
|
||||
pkgs.file
|
||||
pkgs.irssi
|
||||
pkgs.mcabber
|
||||
pkgs.mutt
|
||||
pkgs.mutt
|
||||
pkgs.emacs
|
||||
pkgs.vimHugeX
|
||||
pkgs.bvi
|
||||
pkgs.bvi
|
||||
pkgs.ddrescue
|
||||
pkgs.cdrkit
|
||||
pkgs.cdrkit
|
||||
pkgs.btrfsProgs
|
||||
pkgs.xfsprogs
|
||||
pkgs.jfsutils
|
||||
pkgs.jfsrec
|
||||
pkgs.ntfs3g
|
||||
pkgs.ntfs3g
|
||||
pkgs.subversion16
|
||||
pkgs.monotone
|
||||
pkgs.git
|
||||
pkgs.darcs
|
||||
pkgs.mercurial
|
||||
pkgs.bazaar
|
||||
pkgs.cvs
|
||||
pkgs.cvs
|
||||
pkgs.pciutils
|
||||
pkgs.hddtemp
|
||||
pkgs.sdparm
|
||||
pkgs.hdparm
|
||||
pkgs.usbutils
|
||||
pkgs.usbutils
|
||||
pkgs.openssh
|
||||
pkgs.lftp
|
||||
pkgs.w3m
|
||||
|
@ -64,9 +64,9 @@
|
|||
pkgs.unzip
|
||||
pkgs.lzma
|
||||
pkgs.cabextract
|
||||
pkgs.cpio
|
||||
pkgs.cpio
|
||||
pkgs.lsof
|
||||
pkgs.ltrace
|
||||
pkgs.ltrace
|
||||
pkgs.perl
|
||||
pkgs.python
|
||||
pkgs.ruby
|
||||
|
@ -74,5 +74,5 @@
|
|||
pkgs.clisp
|
||||
pkgs.tcl
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ let
|
|||
nixpkgs.config.platform = pkgs.platforms.fuloong2f_n32;
|
||||
}
|
||||
'';
|
||||
|
||||
|
||||
|
||||
pkgs2storeContents = l : map (x: { object = x; symlink = "none"; }) l;
|
||||
|
||||
|
@ -51,7 +51,7 @@ let
|
|||
platform = pkgs.platforms.fuloong2f_n32;
|
||||
}
|
||||
'';
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ in
|
|||
pkgs.zip
|
||||
pkgs.xz
|
||||
pkgs.dar # disk archiver
|
||||
|
||||
|
||||
# Some editors.
|
||||
pkgs.nvi
|
||||
pkgs.bvi # binary editor
|
||||
|
@ -134,7 +134,7 @@ in
|
|||
# Some more help text.
|
||||
services.mingetty.helpLine =
|
||||
''
|
||||
|
||||
|
||||
Log in as "root" with an empty password. ${
|
||||
if config.services.xserver.enable then
|
||||
"Type `start xserver' to start\nthe graphical user interface."
|
||||
|
|
|
@ -40,21 +40,21 @@ let
|
|||
# Example configuration for booting PXE.
|
||||
allow booting;
|
||||
allow bootp;
|
||||
|
||||
|
||||
# Adapt this to your network configuration.
|
||||
option domain-name "local";
|
||||
option subnet-mask 255.255.255.0;
|
||||
option broadcast-address 192.168.1.255;
|
||||
option domain-name-servers 192.168.1.1;
|
||||
option routers 192.168.1.1;
|
||||
|
||||
|
||||
# PXE-specific configuration directives...
|
||||
# Some BIOS don't accept slashes for paths inside the tftp servers,
|
||||
# and will report Access Violation if they see slashes.
|
||||
filename "pxelinux.0";
|
||||
# For the TFTP and NFS root server. Set the IP of your server.
|
||||
next-server 192.168.1.34;
|
||||
|
||||
|
||||
subnet 192.168.1.0 netmask 255.255.255.0 {
|
||||
range 192.168.1.50 192.168.1.55;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ let
|
|||
|
||||
You can test qemu pxe boot without having a DHCP server adapted, but having nfsroot,
|
||||
like this:
|
||||
qemu-system-x86_64 -tftp /home/pcroot/boot -net nic -net user,bootfile=pxelinux.0 -boot n
|
||||
qemu-system-x86_64 -tftp /home/pcroot/boot -net nic -net user,bootfile=pxelinux.0 -boot n
|
||||
|
||||
I don't know how to use NFS through the qemu '-net user' though.
|
||||
|
||||
|
@ -114,7 +114,7 @@ in
|
|||
{
|
||||
require = [
|
||||
./system-tarball.nix
|
||||
|
||||
|
||||
# Profiles of this basic installation.
|
||||
../../profiles/base.nix
|
||||
../../profiles/installation-device.nix
|
||||
|
@ -150,7 +150,7 @@ in
|
|||
target = "/boot/memtest";
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
# Allow sshd to be started manually through "start sshd". It should
|
||||
# not be started by default on the installation CD because the
|
||||
# default root password is empty.
|
||||
|
|
|
@ -25,7 +25,7 @@ let
|
|||
# services.openssh.enable = true;
|
||||
}
|
||||
'';
|
||||
|
||||
|
||||
|
||||
pkgs2storeContents = l : map (x: { object = x; symlink = "none"; }) l;
|
||||
|
||||
|
@ -45,7 +45,7 @@ let
|
|||
init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}
|
||||
'';
|
||||
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ in
|
|||
pkgs.zip
|
||||
pkgs.xz
|
||||
pkgs.dar # disk archiver
|
||||
|
||||
|
||||
# Some editors.
|
||||
pkgs.nvi
|
||||
pkgs.bvi # binary editor
|
||||
|
|
|
@ -68,7 +68,7 @@ in
|
|||
# Create the tarball
|
||||
system.build.tarball = import ../../../lib/make-system-tarball.nix {
|
||||
inherit (pkgs) stdenv perl xz pathsFromGraph;
|
||||
|
||||
|
||||
inherit (config.tarball) contents storeContents;
|
||||
};
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ let
|
|||
extraConfig extraEntries extraEntriesBeforeNixOS extraPerEntryConfig
|
||||
splashImage configurationLimit version default timeout;
|
||||
};
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -146,7 +146,7 @@ in
|
|||
timeout = mkOption {
|
||||
default = 5;
|
||||
description = ''
|
||||
Timeout (in seconds) until GRUB boots the default menu item.
|
||||
Timeout (in seconds) until GRUB boots the default menu item.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -160,12 +160,12 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.boot.loader.grub.enable {
|
||||
|
||||
|
||||
system.build.menuBuilder = grubMenuBuilder;
|
||||
|
||||
# Common attribute for boot loaders so only one of them can be
|
||||
|
@ -178,5 +178,5 @@ in
|
|||
system.build.grub = grub;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ let
|
|||
inherit (pkgs) bash;
|
||||
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
|
||||
};
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -37,15 +37,15 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = {
|
||||
|
||||
|
||||
system.build.initScriptBuilder =
|
||||
if config.boot.loader.initScript.enable then initScriptBuilder else "";
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ let
|
|||
${pkgs.subversion}/bin/svn co https://svn.nixos.org/repos/nix/nixpkgs/trunk nixpkgs
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
|
|
@ -6,16 +6,16 @@
|
|||
|
||||
let
|
||||
pkgs = import nixpkgs {};
|
||||
|
||||
|
||||
inherit (builtins) attrNames getAttr listToAttrs;
|
||||
inherit (pkgs.lib) concatMapStrings zipAttrs;
|
||||
|
||||
|
||||
networks = map (networkExpr: import networkExpr) networkExprs;
|
||||
|
||||
|
||||
network = zipAttrs networks;
|
||||
|
||||
|
||||
generateRollbackSucceededPhase = network: configs:
|
||||
concatMapStrings (configurationName:
|
||||
concatMapStrings (configurationName:
|
||||
let
|
||||
config = getAttr configurationName configs;
|
||||
in
|
||||
|
@ -24,15 +24,15 @@ let
|
|||
then
|
||||
ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} nix-env -p /nix/var/nix/profiles/system --rollback
|
||||
ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} /nix/var/nix/profiles/system/bin/switch-to-configuration switch
|
||||
|
||||
|
||||
rollback=$((rollback + 1))
|
||||
fi
|
||||
''
|
||||
) (attrNames network)
|
||||
) (attrNames network)
|
||||
;
|
||||
|
||||
|
||||
generateDistributionPhase = network: configs:
|
||||
concatMapStrings (configurationName:
|
||||
concatMapStrings (configurationName:
|
||||
let
|
||||
config = getAttr configurationName configs;
|
||||
in
|
||||
|
@ -42,28 +42,28 @@ let
|
|||
''
|
||||
) (attrNames network)
|
||||
;
|
||||
|
||||
|
||||
generateActivationPhase = network: configs:
|
||||
concatMapStrings (configurationName:
|
||||
concatMapStrings (configurationName:
|
||||
let
|
||||
config = getAttr configurationName configs;
|
||||
in
|
||||
''
|
||||
echo "=== activating system configuration on ${getAttr targetProperty (config.deployment)} ==="
|
||||
ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} nix-env -p /nix/var/nix/profiles/system --set ${config.system.build.toplevel} ||
|
||||
ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} nix-env -p /nix/var/nix/profiles/system --set ${config.system.build.toplevel} ||
|
||||
(ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} nix-env -p /nix/var/nix/profiles/system --rollback; rollbackSucceeded)
|
||||
|
||||
|
||||
ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} /nix/var/nix/profiles/system/bin/switch-to-configuration switch ||
|
||||
( ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} nix-env -p /nix/var/nix/profiles/system --rollback
|
||||
ssh $NIX_SSHOPTS ${getAttr targetProperty (config.deployment)} /nix/var/nix/profiles/system/bin/switch-to-configuration switch
|
||||
rollbackSucceeded
|
||||
)
|
||||
|
||||
|
||||
succeeded=$((succeeded + 1))
|
||||
''
|
||||
) (attrNames network)
|
||||
;
|
||||
|
||||
|
||||
evaluateMachines = network:
|
||||
listToAttrs (map (configurationName:
|
||||
let
|
||||
|
@ -93,27 +93,27 @@ pkgs.stdenv.mkDerivation {
|
|||
# This script has a zillion dependencies and is trivial to build, so
|
||||
# we don't want to build it remotely.
|
||||
preferLocalBuild = true;
|
||||
|
||||
buildCommand =
|
||||
|
||||
buildCommand =
|
||||
''
|
||||
ensureDir $out/bin
|
||||
cat > $out/bin/deploy-systems << "EOF"
|
||||
#! ${pkgs.stdenv.shell} -e
|
||||
|
||||
|
||||
rollbackSucceeded()
|
||||
{
|
||||
rollback=0
|
||||
${generateRollbackSucceededPhase network configs}
|
||||
}
|
||||
|
||||
|
||||
# Distribution phase
|
||||
|
||||
|
||||
${generateDistributionPhase network configs}
|
||||
|
||||
|
||||
# Activation phase
|
||||
|
||||
|
||||
succeeded=0
|
||||
|
||||
|
||||
${generateActivationPhase network configs}
|
||||
EOF
|
||||
chmod +x $out/bin/deploy-systems
|
||||
|
|
|
@ -7,7 +7,7 @@ let
|
|||
failed = map (x: x.message) (filter (x: !x.assertion) config.assertions);
|
||||
|
||||
in
|
||||
|
||||
|
||||
{
|
||||
|
||||
options = {
|
||||
|
@ -33,5 +33,5 @@ in
|
|||
else throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failed)}";
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ with pkgs.lib;
|
|||
|
||||
{
|
||||
options = {
|
||||
|
||||
|
||||
deployment.targetEnv = mkOption {
|
||||
default = "none";
|
||||
example = "ec2";
|
||||
|
@ -37,7 +37,7 @@ with pkgs.lib;
|
|||
};
|
||||
|
||||
# EC2/Nova/Eucalyptus-specific options.
|
||||
|
||||
|
||||
deployment.ec2.type = mkOption {
|
||||
default = "ec2";
|
||||
example = "nova";
|
||||
|
@ -63,7 +63,7 @@ with pkgs.lib;
|
|||
machine. This must be a NixOS image providing SSH access.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
deployment.ec2.instanceType = mkOption {
|
||||
default = "m1.small";
|
||||
example = "m1.large";
|
||||
|
@ -93,7 +93,7 @@ with pkgs.lib;
|
|||
SSH) to execute commands to start VMs or query their status.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
deployment.adhoc.createVMCommand = mkOption {
|
||||
default = "create-vm";
|
||||
description = ''
|
||||
|
@ -101,7 +101,7 @@ with pkgs.lib;
|
|||
print an identifier denoting the VM on standard output.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
deployment.adhoc.destroyVMCommand = mkOption {
|
||||
default = "destroy-vm";
|
||||
description = ''
|
||||
|
@ -109,7 +109,7 @@ with pkgs.lib;
|
|||
machine.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
deployment.adhoc.queryVMCommand = mkOption {
|
||||
default = "query-vm";
|
||||
description = ''
|
||||
|
@ -118,6 +118,6 @@ with pkgs.lib;
|
|||
the VM on standard output.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ let
|
|||
};
|
||||
|
||||
in
|
||||
|
||||
|
||||
{
|
||||
require = options;
|
||||
|
||||
|
@ -51,7 +51,7 @@ in
|
|||
uptimed = 29;
|
||||
ddclient = 30;
|
||||
davfs2 = 31;
|
||||
privoxy = 32;
|
||||
privoxy = 32;
|
||||
osgi = 34;
|
||||
tor = 35;
|
||||
cups = 36;
|
||||
|
|
|
@ -35,7 +35,7 @@ in
|
|||
###### implementation
|
||||
let
|
||||
locatedb = "/var/cache/locatedb";
|
||||
|
||||
|
||||
updatedbCmd =
|
||||
"${config.services.locate.period} root " +
|
||||
"mkdir -m 0755 -p $(dirname ${locatedb}) && " +
|
||||
|
|
|
@ -43,7 +43,7 @@ in
|
|||
firefox60Pkgs = pkgs.firefox60Pkgs.override {
|
||||
enableOfficialBranding = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
'';
|
||||
type = configType;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# This module allows you to export something from configuration
|
||||
# Use case: export kernel source expression for ease of configuring
|
||||
# Use case: export kernel source expression for ease of configuring
|
||||
|
||||
{config, pkgs, ...}:
|
||||
|
||||
let
|
||||
let
|
||||
|
||||
options = {
|
||||
passthru = pkgs.lib.mkOption {
|
||||
|
@ -14,7 +14,7 @@ options = {
|
|||
};
|
||||
};
|
||||
|
||||
in
|
||||
in
|
||||
|
||||
{
|
||||
require = options;
|
||||
|
|
|
@ -144,7 +144,7 @@ in
|
|||
# Some more help text.
|
||||
services.mingetty.helpLine =
|
||||
''
|
||||
|
||||
|
||||
Log in as "root" with an empty password. ${
|
||||
if config.services.xserver.enable then
|
||||
"Type `start xserver' to start\nthe graphical user interface."
|
||||
|
|
|
@ -8,19 +8,19 @@
|
|||
|
||||
# Useful for rescue..
|
||||
environment.systemPackages = with pkgs; [
|
||||
utillinuxCurses ddrescue
|
||||
utillinuxCurses ddrescue
|
||||
pciutils sdparm hdparm hddtemp usbutils
|
||||
btrfsProgs xfsprogs jfsutils jfsrec
|
||||
iproute
|
||||
iproute
|
||||
fuse ntfs3g smbfsFuse sshfsFuse
|
||||
manpages irssi elinks mcabber mutt openssh lftp
|
||||
manpages irssi elinks mcabber mutt openssh lftp
|
||||
openssl ncat socat
|
||||
gnupg1 gnupg
|
||||
patch which diffutils gcc binutils bc file
|
||||
screen
|
||||
bvi joe nvi
|
||||
bvi joe nvi
|
||||
subversion16 monotone git darcs mercurial bazaar cvs
|
||||
unrar unzip zip lzma cabextract cpio
|
||||
unrar unzip zip lzma cabextract cpio
|
||||
lsof
|
||||
];
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ let
|
|||
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
require = [options];
|
||||
|
||||
|
@ -52,7 +52,7 @@ in
|
|||
target = "skel/.bashrc";
|
||||
mode = "0644";
|
||||
}
|
||||
|
||||
|
||||
{ # Configuration for readline in bash.
|
||||
source = ./inputrc;
|
||||
target = "inputrc";
|
||||
|
@ -68,5 +68,5 @@ in
|
|||
mkdir -m 0755 -p /bin
|
||||
ln -sfn ${config.system.build.binsh}/bin/sh /bin/sh
|
||||
'';
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ let
|
|||
INFOPATH=$dir:$INFOPATH ${pkgs.texinfo}/bin/info "$@"
|
||||
''; # */
|
||||
|
||||
in
|
||||
in
|
||||
|
||||
{
|
||||
environment.systemPackages = [infoWrapper];
|
||||
|
|
|
@ -31,7 +31,7 @@ in
|
|||
{
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
users.defaultUserShell = pkgs.lib.mkOption {
|
||||
|
@ -44,10 +44,10 @@ in
|
|||
actual shell in the Nix store.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = {
|
||||
|
@ -56,10 +56,10 @@ in
|
|||
|
||||
environment.etc =
|
||||
[ { # /etc/login.defs: global configuration for pwdutils. You
|
||||
# cannot login without it!
|
||||
# cannot login without it!
|
||||
source = pkgs.writeText "login.defs" loginDefs;
|
||||
target = "login.defs";
|
||||
}
|
||||
}
|
||||
|
||||
{ # /etc/default/useradd: configuration for useradd.
|
||||
source = pkgs.writeText "useradd"
|
||||
|
@ -84,14 +84,14 @@ in
|
|||
{ name = "usermod"; rootOK = true; }
|
||||
{ name = "userdel"; rootOK = true; }
|
||||
{ name = "groupadd"; rootOK = true; }
|
||||
{ name = "groupmod"; rootOK = true; }
|
||||
{ name = "groupmod"; rootOK = true; }
|
||||
{ name = "groupmems"; rootOK = true; }
|
||||
{ name = "groupdel"; rootOK = true; }
|
||||
{ name = "login"; ownDevices = true; allowNullPassword = true; }
|
||||
];
|
||||
|
||||
|
||||
security.setuidPrograms = [ "passwd" "chfn" "su" ];
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ with pkgs.lib;
|
|||
export CURL_CA_BUNDLE=/etc/ssl/certs/ca-bundle.crt
|
||||
export GIT_SSL_CAINFO=/etc/ssl/certs/ca-bundle.crt
|
||||
'';
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ let
|
|||
name = "var-run-console.ck";
|
||||
destination = "/etc/ConsoleKit/run-session.d/var-run-console.ck";
|
||||
executable = true;
|
||||
|
||||
|
||||
text =
|
||||
''
|
||||
#! ${pkgs.stdenv.shell} -e
|
||||
|
|
|
@ -20,7 +20,7 @@ in
|
|||
{
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
security.policykit.enable = mkOption {
|
||||
default = false;
|
||||
description = "Enable PolicyKit (obsolete).";
|
||||
|
@ -60,7 +60,7 @@ in
|
|||
target = "PolicyKit/policy";
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
system.activationScripts.policyKit = stringAfter [ "users" ]
|
||||
''
|
||||
mkdir -m 0770 -p /var/run/PolicyKit
|
||||
|
@ -68,7 +68,7 @@ in
|
|||
|
||||
mkdir -m 0770 -p /var/lib/PolicyKit
|
||||
chown root.polkituser /var/lib/PolicyKit
|
||||
|
||||
|
||||
mkdir -p /var/lib/misc
|
||||
touch /var/lib/misc/PolicyKit.reload
|
||||
chmod 0664 /var/lib/misc/PolicyKit.reload
|
||||
|
|
|
@ -68,7 +68,7 @@ in
|
|||
|
||||
environment.systemPackages = [ pkgs.polkit ];
|
||||
|
||||
# The polkit daemon reads action files
|
||||
# The polkit daemon reads action files
|
||||
environment.pathsToLink = [ "/share/polkit-1/actions" ];
|
||||
|
||||
environment.etc =
|
||||
|
@ -86,7 +86,7 @@ in
|
|||
'';
|
||||
target = "polkit-1/localauthority.conf.d/10-nixos.conf";
|
||||
}
|
||||
|
||||
|
||||
{ source = pkgs.writeText "org.nixos.pkla" cfg.permissions;
|
||||
target = "polkit-1/localauthority/10-vendor.d/org.nixos.pkla";
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ in
|
|||
services.dbus.packages = [ pkgs.polkit ];
|
||||
|
||||
security.pam.services = [ { name = "polkit-1"; } ];
|
||||
|
||||
|
||||
security.setuidPrograms = [ "pkexec" ];
|
||||
|
||||
security.setuidOwners = singleton
|
||||
|
@ -115,7 +115,7 @@ in
|
|||
# configuration.
|
||||
${pkgs.procps}/bin/pkill -INT -u root -x polkitd
|
||||
'';
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ with pkgs.lib;
|
|||
{
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
security.rtkit.enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
|
@ -20,7 +20,7 @@ with pkgs.lib;
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
config = mkIf config.security.rtkit.enable {
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ in
|
|||
# system profile.
|
||||
source=/nix/var/nix/profiles/default/bin/${program}
|
||||
fi
|
||||
|
||||
|
||||
cp ${setuidWrapper}/bin/setuid-wrapper ${wrapperDir}/${program}
|
||||
echo -n "$source" > ${wrapperDir}/${program}.real
|
||||
chmod 0000 ${wrapperDir}/${program} # to prevent races
|
||||
|
@ -110,7 +110,7 @@ in
|
|||
chmod "u${if setuid then "+" else "-"}s,g${if setgid then "+" else "-"}s,${permissions}" ${wrapperDir}/${program}
|
||||
'';
|
||||
|
||||
in stringAfter [ "users" ]
|
||||
in stringAfter [ "users" ]
|
||||
''
|
||||
# Look in the system path and in the default profile for
|
||||
# programs to be wrapped.
|
||||
|
@ -123,5 +123,5 @@ in
|
|||
'';
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ with pkgs.lib;
|
|||
let
|
||||
|
||||
cfg = config.security.sudo;
|
||||
|
||||
|
||||
inherit (pkgs) sudo;
|
||||
|
||||
in
|
||||
|
|
|
@ -14,9 +14,9 @@ in
|
|||
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.rabbitmq = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -74,7 +74,7 @@ in
|
|||
environment.HOME = "/var/lib/rabbitmq";
|
||||
environment.RABBITMQ_NODE_IP_ADDRESS = cfg.listenAddress;
|
||||
|
||||
exec =
|
||||
exec =
|
||||
''
|
||||
${run "${pkgs.rabbitmq_server}/sbin/rabbitmq-server"}
|
||||
'';
|
||||
|
|
|
@ -14,9 +14,9 @@ in
|
|||
{
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
sound = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -26,7 +26,7 @@ in
|
|||
'';
|
||||
merge = mergeEnableOption;
|
||||
};
|
||||
|
||||
|
||||
enableOSSEmulation = mkOption {
|
||||
default = true;
|
||||
description = ''
|
||||
|
@ -35,14 +35,14 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
||||
config = mkIf config.sound.enable {
|
||||
|
||||
|
||||
environment.systemPackages = [alsaUtils];
|
||||
|
||||
users.extraGroups = singleton
|
||||
|
@ -78,7 +78,7 @@ in
|
|||
${alsaUtils}/sbin/alsactl -f ${soundState} store
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -14,9 +14,9 @@ in
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.pulseaudio = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
|
@ -38,9 +38,9 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
@ -83,5 +83,5 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -10,13 +10,13 @@ let
|
|||
location = cfg.location ;
|
||||
mysqlBackupCron = db : ''
|
||||
${cfg.period} ${cfg.user} ${mysql}/bin/mysqldump ${if cfg.singleTransaction then "--single-transaction" else ""} ${db} | ${gzip}/bin/gzip -c > ${location}/${db}.gz
|
||||
'';
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
|
||||
|
||||
services.mysqlBackup = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -48,7 +48,7 @@ in
|
|||
List of database names to dump.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
location = mkOption {
|
||||
default = "/var/backup/mysql";
|
||||
description = ''
|
||||
|
@ -67,7 +67,7 @@ in
|
|||
};
|
||||
|
||||
config = mkIf config.services.mysqlBackup.enable {
|
||||
|
||||
|
||||
services.cron.systemCronJobs = map mysqlBackupCron config.services.mysqlBackup.databases;
|
||||
|
||||
system.activationScripts.mysqlBackup = stringAfter [ "stdio" "defaultPath" "systemConfig" "users" ]
|
||||
|
@ -75,7 +75,7 @@ in
|
|||
mkdir -m 0700 -p ${config.services.mysqlBackup.location}
|
||||
chown ${config.services.mysqlBackup.user} ${config.services.mysqlBackup.location}
|
||||
'';
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -10,14 +10,14 @@ let
|
|||
postgresqlBackupCron = db:
|
||||
''
|
||||
${config.services.postgresqlBackup.period} root ${postgresql}/bin/pg_dump ${db} | ${gzip}/bin/gzip -c > ${location}/${db}.gz
|
||||
'';
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.postgresqlBackup = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -39,10 +39,10 @@ in
|
|||
databases = mkOption {
|
||||
default = [];
|
||||
description = ''
|
||||
List of database names to dump.
|
||||
List of database names to dump.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
location = mkOption {
|
||||
default = "/var/backup/postgresql";
|
||||
description = ''
|
||||
|
@ -62,5 +62,5 @@ in
|
|||
chown root ${config.services.postgresqlBackup.location}
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -9,13 +9,13 @@ let
|
|||
|
||||
sitecopyCron = backup : ''
|
||||
${if backup ? period then backup.period else config.services.sitecopy.period} root ${sitecopy}/bin/sitecopy --storepath=${stateDir} --rcfile=${stateDir}/${backup.name}.conf --update ${backup.name}
|
||||
'';
|
||||
'';
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.sitecopy = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -36,8 +36,8 @@ in
|
|||
|
||||
backups = mkOption {
|
||||
example = [
|
||||
{ name = "test";
|
||||
local = "/tmp/backup";
|
||||
{ name = "test";
|
||||
local = "/tmp/backup";
|
||||
remote = "/staff-groups/ewi/st/strategoxt/backup/test";
|
||||
server = "webdata.tudelft.nl";
|
||||
protocol = "webdav";
|
||||
|
@ -47,15 +47,15 @@ in
|
|||
];
|
||||
default = [];
|
||||
description = ''
|
||||
List of attributesets describing the backups.
|
||||
List of attributesets describing the backups.
|
||||
|
||||
Username/password are extracted from <filename>${stateDir}/sitecopy.secrets</filename> at activation
|
||||
Username/password are extracted from <filename>${stateDir}/sitecopy.secrets</filename> at activation
|
||||
time. The secrets file lines should have the following structure:
|
||||
<screen>
|
||||
server username password
|
||||
</screen>
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
@ -67,7 +67,7 @@ in
|
|||
services.cron.systemCronJobs = map sitecopyCron config.services.sitecopy.backups;
|
||||
|
||||
system.activationScripts.sitecopyBackup = stringAfter [ "stdio" "users" ]
|
||||
''
|
||||
''
|
||||
mkdir -m 0700 -p ${stateDir}
|
||||
chown root ${stateDir}
|
||||
touch ${stateDir}/sitecopy.secrets
|
||||
|
@ -96,9 +96,9 @@ in
|
|||
else
|
||||
echo " * Sitecopy '${b.name}' already initialized"
|
||||
fi
|
||||
'' ) config.services.sitecopy.backups
|
||||
'' ) config.services.sitecopy.backups
|
||||
)}
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -10,9 +10,9 @@ with pkgs.lib;
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.fourStoreEndpoint = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable 4Store SPARQL endpoint.";
|
||||
|
@ -68,5 +68,5 @@ with pkgs.lib;
|
|||
};
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@ with pkgs.lib;
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.fourStore = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable 4Store RDF database server.";
|
||||
|
@ -67,5 +67,5 @@ with pkgs.lib;
|
|||
};
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -35,9 +35,9 @@ in
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.mysql = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "
|
||||
|
@ -54,7 +54,7 @@ in
|
|||
|
||||
port = mkOption {
|
||||
default = "3306";
|
||||
description = "Port of MySQL";
|
||||
description = "Port of MySQL";
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
|
@ -75,8 +75,8 @@ in
|
|||
pidDir = mkOption {
|
||||
default = "/var/run/mysql";
|
||||
description = "Location of the file which stores the PID of the MySQL server";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
initialDatabases = mkOption {
|
||||
default = [];
|
||||
description = "List of database names and their initial schemas that should be used to create databases on the first startup of MySQL";
|
||||
|
@ -85,47 +85,47 @@ in
|
|||
{ name = "bardatabase"; schema = ./bardatabase.sql; }
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
initialScript = mkOption {
|
||||
default = null;
|
||||
description = "A file containing SQL statements to be executed on the first startup. Can be used for granting certain permissions on the database";
|
||||
};
|
||||
|
||||
|
||||
rootPassword = mkOption {
|
||||
default = null;
|
||||
description = "Path to a file containing the root password, modified on the first startup. Not specifying a root password will leave the root password empty.";
|
||||
description = "Path to a file containing the root password, modified on the first startup. Not specifying a root password will leave the root password empty.";
|
||||
};
|
||||
|
||||
|
||||
replication = {
|
||||
role = mkOption {
|
||||
default = "none";
|
||||
description = "Role of the MySQL server instance. Can be either: master, slave or none";
|
||||
};
|
||||
|
||||
|
||||
serverId = mkOption {
|
||||
default = 1;
|
||||
description = "Id of the MySQL server instance. This number must be unique for each instance";
|
||||
};
|
||||
|
||||
|
||||
masterHost = mkOption {
|
||||
description = "Hostname of the MySQL master server";
|
||||
};
|
||||
|
||||
|
||||
masterUser = mkOption {
|
||||
description = "Username of the MySQL replication user";
|
||||
};
|
||||
|
||||
|
||||
masterPassword = mkOption {
|
||||
description = "Password of the MySQL replication user";
|
||||
};
|
||||
|
||||
|
||||
masterPort = mkOption {
|
||||
default = 3306;
|
||||
description = "Port number on which the MySQL master server runs";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -159,7 +159,7 @@ in
|
|||
'';
|
||||
|
||||
exec = "${mysql}/libexec/mysqld --defaults-extra-file=${myCnf} ${mysqldOptions}";
|
||||
|
||||
|
||||
postStart =
|
||||
''
|
||||
# Wait until the MySQL server is available for use
|
||||
|
@ -181,7 +181,7 @@ in
|
|||
then
|
||||
# Create initial databases
|
||||
|
||||
${concatMapStrings (database:
|
||||
${concatMapStrings (database:
|
||||
''
|
||||
if ! test -e "${cfg.dataDir}/${database.name}"; then
|
||||
echo "Creating initial database: ${database.name}"
|
||||
|
@ -196,17 +196,17 @@ in
|
|||
fi
|
||||
) | ${mysql}/bin/mysql -u root -N
|
||||
fi
|
||||
'') cfg.initialDatabases}
|
||||
|
||||
'') cfg.initialDatabases}
|
||||
|
||||
# Execute initial script
|
||||
|
||||
|
||||
${optionalString (cfg.initialScript != null)
|
||||
''
|
||||
cat ${cfg.initialScript} | ${mysql}/bin/mysql -u root -N
|
||||
''}
|
||||
|
||||
|
||||
# Change root password
|
||||
|
||||
|
||||
${optionalString (cfg.rootPassword != null)
|
||||
''
|
||||
( echo "use mysql;"
|
||||
|
@ -214,11 +214,11 @@ in
|
|||
echo "flush privileges;"
|
||||
) | ${mysql}/bin/mysql -u root -N
|
||||
''}
|
||||
|
||||
|
||||
rm /tmp/mysql_init
|
||||
fi
|
||||
'';
|
||||
|
||||
|
||||
# !!! Need a postStart script to wait until mysqld is ready to
|
||||
# accept connections.
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ in
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.openldap = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "
|
||||
|
@ -33,7 +33,7 @@ in
|
|||
";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -33,46 +33,46 @@ let
|
|||
ident_file = '${pkgs.writeText "pg_ident.conf" cfg.identMap}'
|
||||
log_destination = 'syslog'
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.postgresql = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to run PostgreSQL.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
port = mkOption {
|
||||
default = "5432";
|
||||
description = ''
|
||||
Port for PostgreSQL.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
logDir = mkOption {
|
||||
default = "/var/log/postgresql";
|
||||
description = ''
|
||||
Log directory for PostgreSQL.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
dataDir = mkOption {
|
||||
default = "/var/db/postgresql";
|
||||
description = ''
|
||||
Data directory for PostgreSQL.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
authentication = mkOption {
|
||||
default = ''
|
||||
# Generated file; do not edit!
|
||||
|
@ -85,22 +85,22 @@ in
|
|||
Defines how users authenticate themselves to the server.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
identMap = mkOption {
|
||||
default = "";
|
||||
description = ''
|
||||
Defines the mapping from system users to database users.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
authMethod = mkOption {
|
||||
default = " ident sameuser ";
|
||||
description = ''
|
||||
How to authorize users.
|
||||
How to authorize users.
|
||||
Note: ident needs absolute trust to all allowed client hosts.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
enableTCPIP = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
|
@ -122,7 +122,7 @@ in
|
|||
# So a nicer solution was patching postgresql to allow setting the
|
||||
# libdir explicitely.
|
||||
};
|
||||
|
||||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
description = "Additional text to be appended to <filename>postgresql.conf</filename>.";
|
||||
|
@ -133,7 +133,7 @@ in
|
|||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
||||
config = mkIf config.services.postgresql.enable {
|
||||
|
||||
users.extraUsers = singleton
|
||||
|
@ -196,5 +196,5 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -10,9 +10,9 @@ with pkgs.lib;
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.virtuoso = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable Virtuoso Opensource database server.";
|
||||
|
@ -94,5 +94,5 @@ with pkgs.lib;
|
|||
'';
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ in
|
|||
{
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
services.ghostOne = {
|
||||
|
||||
|
@ -24,7 +24,7 @@ in
|
|||
check = lang: elem lang [ "English" "Spanish" "Russian" "Serbian" "Turkish" ];
|
||||
description = "The language of bot messages: English, Spanish, Russian, Serbian or Turkish.";
|
||||
};
|
||||
|
||||
|
||||
war3path = mkOption {
|
||||
default = "";
|
||||
description = ''
|
||||
|
@ -102,4 +102,4 @@ in
|
|||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,22 +19,22 @@ let
|
|||
in pkgs.lib.concatMapStrings f events
|
||||
}
|
||||
'';
|
||||
|
||||
|
||||
events = [powerEvent lidEvent acEvent];
|
||||
|
||||
|
||||
# Called when the power button is pressed.
|
||||
powerEvent =
|
||||
{ name = "power-button";
|
||||
event = "button/power.*";
|
||||
action =
|
||||
action =
|
||||
''
|
||||
#! ${pkgs.bash}/bin/sh
|
||||
${config.services.acpid.powerEventCommands}
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
# Called when the laptop lid is opened/closed.
|
||||
lidEvent =
|
||||
lidEvent =
|
||||
{ name = "lid";
|
||||
event = "button/lid.*";
|
||||
action =
|
||||
|
@ -43,12 +43,12 @@ let
|
|||
${config.services.acpid.lidEventCommands}
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
# Called when the AC power is connected or disconnected.
|
||||
acEvent =
|
||||
{ name = "ac-power";
|
||||
event = "ac_adapter.*";
|
||||
action =
|
||||
action =
|
||||
''
|
||||
#! ${pkgs.bash}/bin/sh
|
||||
${config.services.acpid.acEventCommands}
|
||||
|
@ -62,7 +62,7 @@ in
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.acpid = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -86,9 +86,9 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
@ -101,7 +101,7 @@ in
|
|||
|
||||
exec = "${pkgs.acpid}/sbin/acpid --foreground --confdir ${acpiConfDir}";
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -12,12 +12,12 @@ with pkgs.lib;
|
|||
default = false;
|
||||
description = "Whether to enable support for Bluetooth.";
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
||||
config = mkIf config.hardware.bluetooth.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.bluez pkgs.openobex pkgs.obexftp ];
|
||||
|
@ -25,7 +25,7 @@ with pkgs.lib;
|
|||
services.udev.packages = [ pkgs.bluez ];
|
||||
|
||||
services.dbus.packages = [ pkgs.bluez ];
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -20,11 +20,11 @@ in
|
|||
{
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.hal = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
|
@ -40,12 +40,12 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ hal ];
|
||||
|
@ -67,7 +67,7 @@ in
|
|||
|
||||
jobs.hal =
|
||||
{ description = "HAL daemon";
|
||||
|
||||
|
||||
startOn = "started dbus" + optionalString config.services.acpid.enable " and started acpid";
|
||||
|
||||
environment =
|
||||
|
@ -95,7 +95,7 @@ in
|
|||
''
|
||||
mkdir -m 0755 -p /var/cache/hald
|
||||
mkdir -m 0755 -p /var/run/hald
|
||||
|
||||
|
||||
rm -f /var/cache/hald/fdi-cache
|
||||
'';
|
||||
|
||||
|
@ -111,7 +111,7 @@ in
|
|||
|
||||
services.dbus.enable = true;
|
||||
services.dbus.packages = [hal];
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -7,18 +7,18 @@ with pkgs.lib;
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.pcscd = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable the PCSC-Lite daemon.";
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
@ -40,7 +40,7 @@ with pkgs.lib;
|
|||
|
||||
exec = "${pkgs.pcsclite}/sbin/pcscd";
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -15,9 +15,9 @@ let
|
|||
};
|
||||
|
||||
modprobe = config.system.sbin.modprobe;
|
||||
|
||||
|
||||
nixosRules = ''
|
||||
|
||||
|
||||
# Miscellaneous devices.
|
||||
KERNEL=="sonypi", MODE="0666"
|
||||
KERNEL=="kvm", MODE="0666"
|
||||
|
@ -26,7 +26,7 @@ let
|
|||
KERNEL=="vboxadd", NAME="vboxadd", OWNER="root", GROUP="root", MODE="0660"
|
||||
KERNEL=="vboxuser", NAME="vboxuser", OWNER="root", GROUP="root", MODE="0666"
|
||||
'';
|
||||
|
||||
|
||||
# Perform substitutions in all udev rules files.
|
||||
udevRules = stdenv.mkDerivation {
|
||||
name = "udev-rules";
|
||||
|
@ -40,7 +40,7 @@ let
|
|||
# Set the firmware search path so that the firmware.sh helper
|
||||
# called by 50-firmware.rules works properly.
|
||||
echo 'ENV{FIRMWARE_DIRS}="/root/test-firmware ${toString config.hardware.firmware}"' >> $out/00-path.rules
|
||||
|
||||
|
||||
# Add the udev rules from other packages.
|
||||
for i in ${toString cfg.packages}; do
|
||||
echo "Adding rules for package $i"
|
||||
|
@ -99,7 +99,7 @@ let
|
|||
done
|
||||
|
||||
# Use the persistent device rules (naming for CD/DVD and
|
||||
# network devices) stored in
|
||||
# network devices) stored in
|
||||
# /var/lib/udev/rules.d/70-persistent-{cd,net}.rules. These are
|
||||
# modified by the write_{cd,net}_rules helpers called from
|
||||
# 75-cd-aliases-generator.rules and
|
||||
|
@ -129,7 +129,7 @@ in
|
|||
{
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
boot.hardwareScan = mkOption {
|
||||
|
@ -143,7 +143,7 @@ in
|
|||
parameter to the kernel command line.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
services.udev = {
|
||||
|
||||
packages = mkOption {
|
||||
|
@ -181,11 +181,11 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
hardware.firmware = mkOption {
|
||||
default = [];
|
||||
example = [ "/root/my-firmware" ];
|
||||
merge = mergeListOption;
|
||||
merge = mergeListOption;
|
||||
description = ''
|
||||
List of directories containing firmware files. Such files
|
||||
will be loaded automatically if the kernel asks for them
|
||||
|
@ -198,16 +198,16 @@ in
|
|||
pathsToLink = [ "/" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = {
|
||||
|
||||
services.udev.extraRules = nixosRules;
|
||||
|
||||
|
||||
services.udev.packages = [ pkgs.udev extraUdevRules ];
|
||||
|
||||
services.udev.path = [ pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.utillinux pkgs.udev ];
|
||||
|
|
|
@ -7,11 +7,11 @@ with pkgs.lib;
|
|||
{
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.udisks = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
|
@ -21,12 +21,12 @@ with pkgs.lib;
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
||||
config = mkIf config.services.udisks.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.udisks ];
|
||||
|
|
|
@ -7,11 +7,11 @@ with pkgs.lib;
|
|||
{
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.upower = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
|
@ -21,12 +21,12 @@ with pkgs.lib;
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
||||
config = mkIf config.services.upower.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.upower ];
|
||||
|
|
|
@ -13,5 +13,5 @@
|
|||
"${pkgs.sysklogd}/sbin/klogd -c 1 -2 -n " +
|
||||
"-k $(dirname $(readlink -f /var/run/booted-system/kernel))/System.map";
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -8,9 +8,9 @@ let
|
|||
|
||||
cfg = config.services.dovecot;
|
||||
|
||||
dovecotConf =
|
||||
dovecotConf =
|
||||
''
|
||||
base_dir = /var/run/dovecot/
|
||||
base_dir = /var/run/dovecot/
|
||||
|
||||
protocols = imap imaps pop3 pop3s
|
||||
''
|
||||
|
@ -33,12 +33,12 @@ let
|
|||
maildir_copy_with_hardlinks = yes
|
||||
|
||||
auth default {
|
||||
mechanisms = plain login
|
||||
mechanisms = plain login
|
||||
userdb passwd {
|
||||
}
|
||||
passdb pam {
|
||||
}
|
||||
user = root
|
||||
user = root
|
||||
}
|
||||
auth_debug = yes
|
||||
auth_verbose = yes
|
||||
|
@ -47,7 +47,7 @@ let
|
|||
|
||||
log_path = /var/log/dovecot.log
|
||||
'';
|
||||
|
||||
|
||||
confFile = pkgs.writeText "dovecot.conf" dovecotConf;
|
||||
|
||||
in
|
||||
|
@ -57,9 +57,9 @@ in
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.dovecot = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable the Dovecot POP3/IMAP server.";
|
||||
|
@ -69,7 +69,7 @@ in
|
|||
default = "dovecot";
|
||||
description = "Dovecot user name.";
|
||||
};
|
||||
|
||||
|
||||
group = mkOption {
|
||||
default = "dovecot";
|
||||
description = "Dovecot group name.";
|
||||
|
@ -79,22 +79,22 @@ in
|
|||
default = "";
|
||||
description = "Server certificate";
|
||||
};
|
||||
|
||||
|
||||
sslCACert = mkOption {
|
||||
default = "";
|
||||
description = "CA certificate used by the server certificate.";
|
||||
};
|
||||
|
||||
|
||||
sslServerKey = mkOption {
|
||||
default = "";
|
||||
description = "Server key.";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.dovecot.enable {
|
||||
|
@ -120,13 +120,13 @@ in
|
|||
|
||||
preStart =
|
||||
''
|
||||
${pkgs.coreutils}/bin/mkdir -p /var/run/dovecot /var/run/dovecot/login
|
||||
${pkgs.coreutils}/bin/mkdir -p /var/run/dovecot /var/run/dovecot/login
|
||||
${pkgs.coreutils}/bin/chown -R ${cfg.user}.${cfg.group} /var/run/dovecot
|
||||
'';
|
||||
|
||||
exec = "${pkgs.dovecot}/sbin/dovecot -F -c ${confFile}";
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -84,4 +84,4 @@ in
|
|||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,9 +7,9 @@ with pkgs.lib;
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.mail = {
|
||||
|
||||
|
||||
sendmailSetuidWrapper = mkOption {
|
||||
default = null;
|
||||
description = ''
|
||||
|
|
|
@ -11,7 +11,7 @@ let
|
|||
group = cfg.group;
|
||||
setgidGroup = cfg.setgidGroup;
|
||||
|
||||
mainCf =
|
||||
mainCf =
|
||||
''
|
||||
queue_directory = /var/postfix/queue
|
||||
command_directory = ${pkgs.postfix}/sbin
|
||||
|
@ -30,7 +30,7 @@ let
|
|||
''
|
||||
else if cfg.networksStyle != "" then
|
||||
''
|
||||
mynetworks_style = ${cfg.networksStyle}
|
||||
mynetworks_style = ${cfg.networksStyle}
|
||||
''
|
||||
else
|
||||
# Postfix default is subnet, but let's play safe
|
||||
|
@ -54,12 +54,12 @@ let
|
|||
''
|
||||
+ ''
|
||||
local_recipient_maps =
|
||||
|
||||
relayhost = ${if cfg.lookupMX || cfg.relayHost == "" then
|
||||
cfg.relayHost
|
||||
else
|
||||
|
||||
relayhost = ${if cfg.lookupMX || cfg.relayHost == "" then
|
||||
cfg.relayHost
|
||||
else
|
||||
"[" + cfg.relayHost + "]"}
|
||||
|
||||
|
||||
alias_maps = hash:/var/postfix/conf/aliases
|
||||
|
||||
mail_spool_directory = /var/spool/mail/
|
||||
|
@ -78,13 +78,13 @@ let
|
|||
smtpd_tls_cert_file = ${cfg.sslCert}
|
||||
smtpd_tls_key_file = ${cfg.sslKey}
|
||||
|
||||
smtpd_use_tls = yes
|
||||
smtpd_use_tls = yes
|
||||
|
||||
recipientDelimiter = ${cfg.recipientDelimiter}
|
||||
''
|
||||
+ cfg.extraConfig;
|
||||
|
||||
aliases =
|
||||
aliases =
|
||||
optionalString (cfg.postmasterAlias != "") ''
|
||||
postmaster: ${cfg.postmasterAlias}
|
||||
''
|
||||
|
@ -96,7 +96,7 @@ let
|
|||
|
||||
aliasesFile = pkgs.writeText "postfix-aliases" aliases;
|
||||
mainCfFile = pkgs.writeText "postfix-main.cf" mainCf;
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -104,9 +104,9 @@ in
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.postfix = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to run the Postfix mail server.";
|
||||
|
@ -116,44 +116,44 @@ in
|
|||
default = true;
|
||||
description = "Whether to set the system sendmail to postfix's.";
|
||||
};
|
||||
|
||||
|
||||
user = mkOption {
|
||||
default = "postfix";
|
||||
description = "What to call the Postfix user (must be used only for postfix).";
|
||||
};
|
||||
|
||||
|
||||
group = mkOption {
|
||||
default = "postfix";
|
||||
description = "What to call the Postfix group (must be used only for postfix).";
|
||||
};
|
||||
|
||||
|
||||
setgidGroup = mkOption {
|
||||
default = "postdrop";
|
||||
description = "
|
||||
How to call postfix setgid group (for postdrop). Should
|
||||
How to call postfix setgid group (for postdrop). Should
|
||||
be uniquely used group.
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
networks = mkOption {
|
||||
default = null;
|
||||
example = ["192.168.0.1/24"];
|
||||
description = "
|
||||
Net masks for trusted - allowed to relay mail to third parties -
|
||||
hosts. Leave empty to use mynetworks_style configuration or use
|
||||
Net masks for trusted - allowed to relay mail to third parties -
|
||||
hosts. Leave empty to use mynetworks_style configuration or use
|
||||
default (localhost-only).
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
networksStyle = mkOption {
|
||||
default = "";
|
||||
description = "
|
||||
Name of standard way of trusted network specification to use,
|
||||
leave blank if you specify it explicitly or if you want to use
|
||||
leave blank if you specify it explicitly or if you want to use
|
||||
default (localhost-only).
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
hostname = mkOption {
|
||||
default = "";
|
||||
description ="
|
||||
|
@ -161,65 +161,65 @@ in
|
|||
It should be FQDN.
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
domain = mkOption {
|
||||
default = "";
|
||||
description ="
|
||||
Domain to use. Leave blank to use hostname minus first component.
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
origin = mkOption {
|
||||
default = "";
|
||||
description ="
|
||||
Origin to use in outgoing e-mail. Leave blank to use hostname.
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
destination = mkOption {
|
||||
default = null;
|
||||
example = ["localhost"];
|
||||
description = "
|
||||
Full (!) list of domains we deliver locally. Leave blank for
|
||||
Full (!) list of domains we deliver locally. Leave blank for
|
||||
acceptable Postfix default.
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
relayDomains = mkOption {
|
||||
default = null;
|
||||
example = ["localdomain"];
|
||||
description = "
|
||||
List of domains we agree to relay to. Default is the same as
|
||||
List of domains we agree to relay to. Default is the same as
|
||||
destination.
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
relayHost = mkOption {
|
||||
default = "";
|
||||
description = "
|
||||
Mail relay for outbound mail.
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
lookupMX = mkOption {
|
||||
default = false;
|
||||
description = "
|
||||
Whether relay specified is just domain whose MX must be used.
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
postmasterAlias = mkOption {
|
||||
default = "root";
|
||||
description = "Who should receive postmaster e-mail.";
|
||||
};
|
||||
|
||||
|
||||
rootAlias = mkOption {
|
||||
default = "";
|
||||
description = "
|
||||
Who should receive root e-mail. Blank for no redirection.
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
extraAliases = mkOption {
|
||||
default = "";
|
||||
description = "
|
||||
|
@ -238,12 +238,12 @@ in
|
|||
default = "";
|
||||
description = "SSL certificate to use.";
|
||||
};
|
||||
|
||||
|
||||
sslCACert = mkOption {
|
||||
default = "";
|
||||
description = "SSL certificate of CA.";
|
||||
};
|
||||
|
||||
|
||||
sslKey = mkOption {
|
||||
default = "";
|
||||
description = "SSL key to use.";
|
||||
|
@ -293,19 +293,19 @@ in
|
|||
};
|
||||
|
||||
users.extraGroups =
|
||||
[ { name = group;
|
||||
[ { name = group;
|
||||
gid = config.ids.gids.postfix;
|
||||
}
|
||||
{ name = setgidGroup;
|
||||
{ name = setgidGroup;
|
||||
gid = config.ids.gids.postdrop;
|
||||
}
|
||||
];
|
||||
|
||||
jobs.postfix =
|
||||
# I copy _lots_ of shipped configuration filed
|
||||
# I copy _lots_ of shipped configuration filed
|
||||
# that can be left as is. I am afraid the exact
|
||||
# will list slightly change in next Postfix
|
||||
# release, so listing them all one-by-one in an
|
||||
# will list slightly change in next Postfix
|
||||
# release, so listing them all one-by-one in an
|
||||
# accurate way is unlikely to be better.
|
||||
{ description = "Postfix mail server";
|
||||
|
||||
|
@ -330,20 +330,20 @@ in
|
|||
if ! [ -d /var/spool/postfix ]; then
|
||||
${pkgs.coreutils}/bin/mkdir -p /var/spool/mail /var/postfix/conf /var/postfix/queue
|
||||
fi
|
||||
|
||||
${pkgs.coreutils}/bin/chown -R ${user}.${group} /var/postfix
|
||||
${pkgs.coreutils}/bin/chown -R ${user}.${setgidGroup} /var/postfix/queue
|
||||
${pkgs.coreutils}/bin/chmod -R ug+rwX /var/postfix/queue
|
||||
|
||||
${pkgs.coreutils}/bin/chown -R ${user}.${group} /var/postfix
|
||||
${pkgs.coreutils}/bin/chown -R ${user}.${setgidGroup} /var/postfix/queue
|
||||
${pkgs.coreutils}/bin/chmod -R ug+rwX /var/postfix/queue
|
||||
${pkgs.coreutils}/bin/chown root.root /var/spool/mail
|
||||
${pkgs.coreutils}/bin/chmod a+rwxt /var/spool/mail
|
||||
|
||||
|
||||
ln -sf ${pkgs.postfix}/share/postfix/conf/* /var/postfix/conf
|
||||
|
||||
ln -sf ${aliasesFile} /var/postfix/conf/aliases
|
||||
ln -sf ${mainCfFile} /var/postfix/conf/main.cf
|
||||
|
||||
${pkgs.postfix}/sbin/postalias -c /var/postfix/conf /var/postfix/conf/aliases
|
||||
|
||||
|
||||
exec ${pkgs.postfix}/sbin/postfix -c /var/postfix/conf start
|
||||
''; # */
|
||||
|
||||
|
|
|
@ -17,9 +17,9 @@ in
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.autofs = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "
|
||||
|
@ -97,7 +97,7 @@ in
|
|||
pkgs.lib.concatMapStrings (module : "modprobe ${module} || true\n")
|
||||
(["autofs4"] ++ cfg.kernelModules);
|
||||
|
||||
preStop =
|
||||
preStop =
|
||||
''
|
||||
set -e; while :; do pkill -TERM automount; sleep 1; done
|
||||
'';
|
||||
|
@ -125,7 +125,7 @@ in
|
|||
exec ${pkgs.autofs5}/sbin/automount ${if cfg.debug then "-d" else ""} -f -t ${builtins.toString cfg.timeout} "${autoMaster}" ${if cfg.debug then "-l7" else ""}
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ with pkgs.lib;
|
|||
let
|
||||
|
||||
cfg = config.services.disnix;
|
||||
|
||||
|
||||
disnix_activation_scripts = pkgs.disnix_activation_scripts.override (origArgs: {
|
||||
enableApacheWebApplication = config.services.httpd.enable;
|
||||
enableAxis2WebService = config.services.tomcat.axis2.enable;
|
||||
|
@ -21,47 +21,47 @@ in
|
|||
{
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.disnix = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable Disnix";
|
||||
};
|
||||
|
||||
|
||||
useWebServiceInterface = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable the DisnixWebService interface running on Apache Tomcat";
|
||||
};
|
||||
|
||||
|
||||
publishInfrastructure = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to publish capabilities/properties of this machine in as attributes in the infrastructure option";
|
||||
};
|
||||
|
||||
|
||||
enableAuthentication = mkOption {
|
||||
default = false;
|
||||
description = "Whether to publish authentication credentials through the infrastructure attribute (not recommended in combination with Avahi)";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
infrastructure = mkOption {
|
||||
default = {};
|
||||
description = "List of name value pairs containing properties for the infrastructure model";
|
||||
};
|
||||
|
||||
|
||||
publishAvahi = mkOption {
|
||||
default = false;
|
||||
description = "Whether to publish capabilities/properties as a Disnix service through Avahi";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
@ -84,7 +84,7 @@ in
|
|||
{ name = "disnix";
|
||||
gid = config.ids.gids.disnix;
|
||||
};
|
||||
|
||||
|
||||
services.disnix.infrastructure =
|
||||
optionalAttrs (cfg.publishInfrastructure.enable)
|
||||
( { hostname = config.networking.hostName;
|
||||
|
@ -97,12 +97,12 @@ in
|
|||
// optionalAttrs (config.services.tomcat.enable) { tomcatPort = 8080; }
|
||||
// optionalAttrs (config.services.svnserve.enable) { svnBaseDir = config.services.svnserve.svnBaseDir; }
|
||||
// optionalAttrs (cfg.publishInfrastructure.enableAuthentication) (
|
||||
optionalAttrs (config.services.mysql.enable) { mysqlUsername = "root"; mysqlPassword = builtins.readFile config.services.mysql.rootPassword; })
|
||||
optionalAttrs (config.services.mysql.enable) { mysqlUsername = "root"; mysqlPassword = builtins.readFile config.services.mysql.rootPassword; })
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
services.disnix.publishInfrastructure.enable = cfg.publishAvahi;
|
||||
|
||||
|
||||
jobs = {
|
||||
disnix =
|
||||
{ description = "Disnix server";
|
||||
|
@ -124,9 +124,9 @@ in
|
|||
} // optionalAttrs cfg.publishAvahi {
|
||||
disnixAvahi =
|
||||
{ description = "Disnix Avahi publisher";
|
||||
|
||||
|
||||
startOn = "started avahi-daemon";
|
||||
|
||||
|
||||
exec =
|
||||
''
|
||||
${pkgs.avahi}/bin/avahi-publish-service disnix-${config.networking.hostName} _disnix._tcp 22 \
|
||||
|
|
|
@ -12,16 +12,16 @@ in
|
|||
{
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.felix = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable the Apache Felix OSGi service";
|
||||
};
|
||||
|
||||
|
||||
bundles = mkOption {
|
||||
default = [ pkgs.felix_remoteshell ];
|
||||
description = "List of bundles that should be activated on startup";
|
||||
|
@ -30,17 +30,17 @@ in
|
|||
user = mkOption {
|
||||
default = "osgi";
|
||||
description = "User account under which Apache Felix runs.";
|
||||
};
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
default = "osgi";
|
||||
description = "Group account under which Apache Felix runs.";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
@ -49,7 +49,7 @@ in
|
|||
{ name = "osgi";
|
||||
gid = config.ids.gids.osgi;
|
||||
};
|
||||
|
||||
|
||||
users.extraUsers = singleton
|
||||
{ name = "osgi";
|
||||
uid = config.ids.uids.osgi;
|
||||
|
@ -60,16 +60,16 @@ in
|
|||
jobs.felix =
|
||||
{ description = "Felix server";
|
||||
|
||||
preStart =
|
||||
preStart =
|
||||
''
|
||||
# Initialise felix instance on first startup
|
||||
if [ ! -d /var/felix ]
|
||||
then
|
||||
# Symlink system files
|
||||
|
||||
|
||||
mkdir -p /var/felix
|
||||
chown ${cfg.user}:${cfg.group} /var/felix
|
||||
|
||||
|
||||
for i in ${pkgs.felix}/*
|
||||
do
|
||||
if [ "$i" != "${pkgs.felix}/bundle" ]
|
||||
|
@ -77,11 +77,11 @@ in
|
|||
ln -sfn $i /var/felix/$(basename $i)
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# Symlink bundles
|
||||
mkdir -p /var/felix/bundle
|
||||
chown ${cfg.user}:${cfg.group} /var/felix/bundle
|
||||
|
||||
|
||||
for i in ${pkgs.felix}/bundle/* ${toString cfg.bundles}
|
||||
do
|
||||
if [ -f $i ]
|
||||
|
@ -97,7 +97,7 @@ in
|
|||
done
|
||||
fi
|
||||
'';
|
||||
|
||||
|
||||
script =
|
||||
''
|
||||
cd /var/felix
|
||||
|
|
|
@ -7,9 +7,9 @@ let
|
|||
in {
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.foldingAtHome = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -29,7 +29,7 @@ in {
|
|||
config = mkOption {
|
||||
default = "";
|
||||
description = ''
|
||||
Extra configuration. Contents will be added verbatim to the
|
||||
Extra configuration. Contents will be added verbatim to the
|
||||
configuration file.
|
||||
'';
|
||||
};
|
||||
|
@ -71,4 +71,4 @@ in {
|
|||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ let
|
|||
uid = config.ids.uids.gpsd;
|
||||
gid = config.ids.gids.gpsd;
|
||||
cfg = config.services.gpsd;
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ in
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.gpsd = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -70,9 +70,9 @@ in
|
|||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
|
||||
users.extraUsers = singleton
|
||||
{ name = "gpsd";
|
||||
inherit uid;
|
||||
|
@ -100,5 +100,5 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ with pkgs.lib;
|
|||
let
|
||||
|
||||
inherit (config.environment) nix;
|
||||
|
||||
|
||||
makeNixBuildUser = nr:
|
||||
{ name = "nixbld${toString nr}";
|
||||
description = "Nix build user ${toString nr}";
|
||||
|
@ -34,7 +34,7 @@ in
|
|||
This option specifies the Nix package instance to use throughout the system.
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
nix = {
|
||||
|
||||
maxJobs = mkOption {
|
||||
|
@ -76,10 +76,10 @@ in
|
|||
gc-keep-derivations = true
|
||||
";
|
||||
description = "
|
||||
This option allows to append lines to nix.conf.
|
||||
This option allows to append lines to nix.conf.
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
distributedBuilds = mkOption {
|
||||
default = false;
|
||||
description = "
|
||||
|
@ -97,8 +97,8 @@ in
|
|||
manualNixMachines = mkOption {
|
||||
default = false;
|
||||
description = "
|
||||
Whether to manually manage the list of buildmachines used in distributed
|
||||
builds in /etc/nix.machines.
|
||||
Whether to manually manage the list of buildmachines used in distributed
|
||||
builds in /etc/nix.machines.
|
||||
";
|
||||
};
|
||||
|
||||
|
@ -113,7 +113,7 @@ in
|
|||
daemonIONiceLevel = mkOption {
|
||||
default = 7;
|
||||
description = "
|
||||
Nix daemon process I/O priority. This priority propagates to build processes.
|
||||
Nix daemon process I/O priority. This priority propagates to build processes.
|
||||
0 is the default Unix process I/O priority, 7 is the lowest.
|
||||
";
|
||||
};
|
||||
|
@ -155,11 +155,11 @@ in
|
|||
on the remote machine.
|
||||
";
|
||||
};
|
||||
|
||||
|
||||
proxy = mkOption {
|
||||
default = "";
|
||||
description = "
|
||||
This option specifies the proxy to use for fetchurl. The real effect
|
||||
This option specifies the proxy to use for fetchurl. The real effect
|
||||
is just exporting http_proxy, https_proxy and ftp_proxy with that
|
||||
value.
|
||||
";
|
||||
|
@ -208,13 +208,13 @@ in
|
|||
# in `build-chroot-dirs' - otherwise any builder that uses
|
||||
# /bin/sh won't work.
|
||||
binshDeps = pkgs.writeReferencesToFile config.system.build.binsh;
|
||||
|
||||
|
||||
# Likewise, if chroots are turned on, we need Nix's own
|
||||
# closure in the chroot. Otherwise nix-channel and nix-env
|
||||
# won't work because the dependencies of its builders (like
|
||||
# coreutils and Perl) aren't visible. Sigh.
|
||||
nixDeps = pkgs.writeReferencesToFile config.environment.nix;
|
||||
in
|
||||
in
|
||||
pkgs.runCommand "nix.conf" {extraOptions = config.nix.extraOptions; } ''
|
||||
extraPaths=$(for i in $(cat ${binshDeps} ${nixDeps}); do if test -d $i; then echo $i; fi; done)
|
||||
cat > $out <<END
|
||||
|
@ -236,7 +236,7 @@ in
|
|||
source = pkgs.writeText "nix.machines"
|
||||
(concatStrings (map (machine:
|
||||
"${machine.sshUser}@${machine.hostName} "
|
||||
+ (if machine ? system then machine.system else concatStringsSep "," machine.systems)
|
||||
+ (if machine ? system then machine.system else concatStringsSep "," machine.systems)
|
||||
+ " ${machine.sshKey} ${toString machine.maxJobs} "
|
||||
+ (if machine ? speedFactor then toString machine.speedFactor else "1" )
|
||||
+ "\n"
|
||||
|
@ -259,7 +259,7 @@ in
|
|||
${nix}/bin/nix-worker --daemon > /dev/null 2>&1
|
||||
'';
|
||||
|
||||
extraConfig =
|
||||
extraConfig =
|
||||
''
|
||||
limit nofile 4096 4096
|
||||
'';
|
||||
|
@ -269,7 +269,7 @@ in
|
|||
''
|
||||
# Set up the environment variables for running Nix.
|
||||
${config.nix.envVars}
|
||||
|
||||
|
||||
# Set up secure multi-user builds: non-root users build through the
|
||||
# Nix daemon.
|
||||
if test "$USER" != root; then
|
||||
|
|
|
@ -15,7 +15,7 @@ let
|
|||
inherit (cfg) revision;
|
||||
inherit pkgs options;
|
||||
};
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ in
|
|||
boot.extraTTYs = mkIf cfg.showManual ["tty${cfg.ttyNumber}"];
|
||||
|
||||
jobs = mkIf cfg.showManual
|
||||
{ nixosManual =
|
||||
{ nixosManual =
|
||||
{ name = "nixos-manual";
|
||||
|
||||
description = "NixOS manual";
|
||||
|
@ -88,7 +88,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
services.ttyBackgrounds.specificThemes = mkIf cfg.showManual
|
||||
services.ttyBackgrounds.specificThemes = mkIf cfg.showManual
|
||||
[ { tty = "tty${cfg.ttyNumber}";
|
||||
theme = pkgs.themes "green";
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ in
|
|||
|
||||
services.mingetty.helpLine = mkIf cfg.showManual
|
||||
"\nPress <Alt-F${toString cfg.ttyNumber}> for the NixOS manual.";
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -10,12 +10,12 @@ let
|
|||
cfg = config.services.rogue;
|
||||
|
||||
in
|
||||
|
||||
|
||||
{
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.rogue.enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
|
@ -33,13 +33,13 @@ in
|
|||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
boot.extraTTYs = [ cfg.tty ];
|
||||
|
||||
|
||||
jobs.rogue =
|
||||
{ description = "Rogue dungeon crawling game";
|
||||
|
||||
|
@ -56,5 +56,5 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -6,30 +6,30 @@ with pkgs.lib;
|
|||
let
|
||||
|
||||
cfg = config.services.svnserve;
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.svnserve = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable svnserve to serve Subversion repositories through the SVN protocol.";
|
||||
};
|
||||
|
||||
|
||||
svnBaseDir = mkOption {
|
||||
default = "/repos";
|
||||
description = "Base directory from which Subversion repositories are accessed.";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
@ -37,9 +37,9 @@ in
|
|||
jobs.svnserve = {
|
||||
startOn = "started network-interfaces";
|
||||
stopOn = "stopping network-interfaces";
|
||||
|
||||
|
||||
preStart = "mkdir -p ${cfg.svnBaseDir}";
|
||||
|
||||
|
||||
exec = "${pkgs.subversion}/bin/svnserve -r ${cfg.svnBaseDir} -d --foreground --pid-file=/var/run/svnserve.pid";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -13,7 +13,7 @@ in
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.synergy = {
|
||||
|
||||
# !!! All these option descriptions needs to be cleaned up.
|
||||
|
@ -27,13 +27,13 @@ in
|
|||
};
|
||||
screenName = mkOption {
|
||||
default = "";
|
||||
description = "
|
||||
description = "
|
||||
use screen-name instead the hostname to identify
|
||||
ourselfs to the server.
|
||||
";
|
||||
};
|
||||
serverAddress = mkOption {
|
||||
description = "
|
||||
description = "
|
||||
The server address is of the form: [hostname][:port]. The
|
||||
hostname must be the address or hostname of the server. The
|
||||
port overrides the default port, 24800.
|
||||
|
@ -56,7 +56,7 @@ in
|
|||
};
|
||||
screenName = mkOption {
|
||||
default = "";
|
||||
description = "
|
||||
description = "
|
||||
use screen-name instead the hostname to identify
|
||||
this screen in the configuration.
|
||||
";
|
||||
|
@ -76,9 +76,9 @@ in
|
|||
config = {
|
||||
|
||||
jobs =
|
||||
|
||||
|
||||
optionalAttrs cfgC.enable
|
||||
{ synergyClient =
|
||||
{ synergyClient =
|
||||
{ name = "synergy-client";
|
||||
|
||||
description = "Synergy client";
|
||||
|
@ -92,9 +92,9 @@ in
|
|||
'';
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// optionalAttrs cfgS.enable
|
||||
{ synergyServer =
|
||||
{ synergyServer =
|
||||
{ name = "synergy-server";
|
||||
|
||||
description = "Synergy server";
|
||||
|
@ -122,7 +122,7 @@ section: screens
|
|||
win:
|
||||
end
|
||||
section: aliases
|
||||
laptop:
|
||||
laptop:
|
||||
192.168.5.5
|
||||
dm:
|
||||
192.168.5.78
|
||||
|
|
|
@ -12,20 +12,20 @@ in
|
|||
{
|
||||
|
||||
###### interface
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.virtualbox = {
|
||||
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable the VirtualBox service and other guest additions.";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
@ -34,10 +34,10 @@ in
|
|||
environment.systemPackages = [ ];
|
||||
|
||||
boot.extraModulePackages = [ pkgs.linuxPackages.virtualboxGuestAdditions ];
|
||||
|
||||
|
||||
jobs.virtualbox =
|
||||
{ description = "VirtualBox service";
|
||||
|
||||
|
||||
startOn = "started udev";
|
||||
|
||||
exec = "${pkgs.linuxPackages.virtualboxGuestAdditions}/sbin/VBoxService";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Monit system watcher
|
||||
# http://mmonit.org/monit/
|
||||
|
||||
{config, pkgs, ...}:
|
||||
{config, pkgs, ...}:
|
||||
|
||||
let inherit (pkgs.lib) mkOption mkIf;
|
||||
in
|
||||
|
@ -25,9 +25,9 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
config = mkIf config.services.monit.enable {
|
||||
|
||||
|
||||
environment.etc = [
|
||||
{
|
||||
source = pkgs.writeTextFile {
|
||||
|
@ -38,10 +38,10 @@ in
|
|||
mode = "0400";
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
jobs.monit = {
|
||||
description = "Monit system watcher";
|
||||
|
||||
|
||||
startOn = config.services.monit.startOn;
|
||||
|
||||
exec = "${pkgs.monit}/bin/monit -I -c /etc/monit.conf";
|
||||
|
|
|
@ -48,7 +48,7 @@ let
|
|||
illegal_macro_output_chars=`~$&|'"<>
|
||||
retain_state_information=1
|
||||
''; # "
|
||||
|
||||
|
||||
# Plain configuration for the Nagios web-interface with no
|
||||
# authentication.
|
||||
nagiosCGICfgFile = pkgs.writeText "nagios.cgi.conf"
|
||||
|
@ -83,12 +83,12 @@ let
|
|||
'';
|
||||
|
||||
in
|
||||
|
||||
|
||||
{
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.nagios = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -141,7 +141,7 @@ in
|
|||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
|
||||
users.extraUsers = singleton
|
||||
{ name = nagiosUser;
|
||||
uid = config.ids.uids.nagios;
|
||||
|
@ -190,7 +190,7 @@ in
|
|||
elsePart = "";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ in
|
|||
{ function = f: {
|
||||
extraConfig = ''
|
||||
Alias ${cfg.urlPrefix} ${htmlDir}
|
||||
|
||||
|
||||
<Directory ${htmlDir}>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
|
|
|
@ -119,7 +119,7 @@ in
|
|||
description = ''
|
||||
The MODE determines which part of the NUT is to be started, and
|
||||
which configuration files must be modified.
|
||||
|
||||
|
||||
The values of MODE can be:
|
||||
|
||||
- none: NUT is not configured, or use the Integrated Power
|
||||
|
@ -263,7 +263,7 @@ in
|
|||
description = "UPnP A/V Media Server user";
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
users.extraGroups = [
|
||||
{ name = "nut";
|
||||
gid = 84;
|
||||
|
|
|
@ -18,7 +18,7 @@ let
|
|||
Server = ${cfg.server}
|
||||
|
||||
LogFile = ${logDir}/zabbix_agentd
|
||||
|
||||
|
||||
PidFile = ${pidFile}
|
||||
|
||||
StartAgents = 1
|
||||
|
@ -27,13 +27,13 @@ let
|
|||
'';
|
||||
|
||||
in
|
||||
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.zabbixAgent = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -61,7 +61,7 @@ in
|
|||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
|
@ -103,7 +103,7 @@ in
|
|||
${pkgs.zabbix.agent}/sbin/zabbix_agentd --config ${configFile} 100>${stateDir}/dummy2
|
||||
wait "$pid"
|
||||
'';
|
||||
|
||||
|
||||
postStop =
|
||||
''
|
||||
pid=$(cat ${pidFile} 2> /dev/null || true)
|
||||
|
|
|
@ -18,7 +18,7 @@ let
|
|||
configFile = pkgs.writeText "zabbix_server.conf"
|
||||
''
|
||||
LogFile = ${logDir}/zabbix_server
|
||||
|
||||
|
||||
PidFile = ${pidFile}
|
||||
|
||||
DBHost = ${cfg.dbServer}
|
||||
|
@ -33,13 +33,13 @@ let
|
|||
'';
|
||||
|
||||
in
|
||||
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.zabbixServer.enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
|
@ -119,7 +119,7 @@ in
|
|||
while ${pkgs.procps}/bin/pkill -u zabbix zabbix_server; do true; done
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ in
|
|||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
|
||||
services.nfsKernel = {
|
||||
|
||||
client.enable = mkOption {
|
||||
|
@ -53,7 +53,7 @@ in
|
|||
<manvolnum>8</manvolnum></citerefentry>.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
nproc = mkOption {
|
||||
default = 8;
|
||||
description = ''
|
||||
|
@ -66,7 +66,7 @@ in
|
|||
description = "Whether to create the mount points in the exports file at startup time.";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -89,9 +89,9 @@ in
|
|||
|
||||
jobs =
|
||||
optionalAttrs cfg.server.enable
|
||||
{ nfs_kernel_exports =
|
||||
{ nfs_kernel_exports =
|
||||
{ name = "nfs-kernel-exports";
|
||||
|
||||
|
||||
description = "Kernel NFS server";
|
||||
|
||||
startOn = "started network-interfaces";
|
||||
|
@ -100,7 +100,7 @@ in
|
|||
''
|
||||
export PATH=${pkgs.nfsUtils}/sbin:$PATH
|
||||
mkdir -p /var/lib/nfs
|
||||
|
||||
|
||||
${config.system.sbin.modprobe}/sbin/modprobe nfsd || true
|
||||
|
||||
${pkgs.sysvtools}/bin/mountpoint -q /proc/fs/nfsd \
|
||||
|
@ -122,9 +122,9 @@ in
|
|||
'';
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// optionalAttrs cfg.server.enable
|
||||
{ nfs_kernel_nfsd =
|
||||
{ nfs_kernel_nfsd =
|
||||
{ name = "nfs-kernel-nfsd";
|
||||
|
||||
description = "Kernel NFS server";
|
||||
|
@ -132,7 +132,7 @@ in
|
|||
startOn = "started nfs-kernel-exports and started nfs-kernel-mountd and started nfs-kernel-statd and started portmap";
|
||||
stopOn = "stopping nfs-kernel-exports";
|
||||
|
||||
preStart =
|
||||
preStart =
|
||||
''
|
||||
# Create a state directory required by NFSv4.
|
||||
mkdir -p /var/lib/nfs/v4recovery
|
||||
|
@ -162,7 +162,7 @@ in
|
|||
}
|
||||
|
||||
// optionalAttrs (cfg.client.enable || cfg.server.enable)
|
||||
{ nfs_kernel_statd =
|
||||
{ nfs_kernel_statd =
|
||||
{ name = "nfs-kernel-statd";
|
||||
|
||||
description = "Kernel NFS server - Network Status Monitor";
|
||||
|
@ -171,7 +171,7 @@ in
|
|||
stopOn = "never";
|
||||
|
||||
preStart =
|
||||
''
|
||||
''
|
||||
mkdir -p /var/lib/nfs
|
||||
mkdir -p /var/lib/nfs/sm
|
||||
mkdir -p /var/lib/nfs/sm.bak
|
||||
|
@ -184,7 +184,7 @@ in
|
|||
postStart = "${pkgs.nfsUtils}/sbin/sm-notify -d";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue