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