Updating from trunk (specially for the enableFontDir option, as it was not up
to date for nixpkgs) svn path=/nixos/branches/stdenv-updates/; revision=24871
This commit is contained in:
commit
25b9c03571
@ -11,7 +11,7 @@
|
|||||||
, modules
|
, modules
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let extraArgs_ = extraArgs; pkgs_ = pkgs; in
|
let extraArgs_ = extraArgs; pkgs_ = pkgs; system_ = system; in
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
@ -39,7 +39,8 @@ rec {
|
|||||||
# Import Nixpkgs, allowing the NixOS option nixpkgs.config to
|
# Import Nixpkgs, allowing the NixOS option nixpkgs.config to
|
||||||
# specify the Nixpkgs configuration (e.g., to set package options
|
# specify the Nixpkgs configuration (e.g., to set package options
|
||||||
# such as firefox.enableGeckoMediaPlayer, or to apply global
|
# such as firefox.enableGeckoMediaPlayer, or to apply global
|
||||||
# overrides such as changing GCC throughout the system). This is
|
# overrides such as changing GCC throughout the system), and the
|
||||||
|
# option nixpkgs.system to override the platform type. This is
|
||||||
# tricky, because we have to prevent an infinite recursion: "pkgs"
|
# tricky, because we have to prevent an infinite recursion: "pkgs"
|
||||||
# is passed as an argument to NixOS modules, but the value of "pkgs"
|
# is passed as an argument to NixOS modules, but the value of "pkgs"
|
||||||
# depends on config.nixpkgs.config, which we get from the modules.
|
# depends on config.nixpkgs.config, which we get from the modules.
|
||||||
@ -50,12 +51,13 @@ rec {
|
|||||||
then pkgs_
|
then pkgs_
|
||||||
else import nixpkgs (
|
else import nixpkgs (
|
||||||
let
|
let
|
||||||
|
system = if nixpkgsOptions.system != "" then nixpkgsOptions.system else system_;
|
||||||
nixpkgsOptions = (import ./eval-config.nix {
|
nixpkgsOptions = (import ./eval-config.nix {
|
||||||
inherit system nixpkgs services extraArgs modules;
|
inherit system nixpkgs services extraArgs modules;
|
||||||
# For efficiency, leave out most NixOS modules; they don't
|
# For efficiency, leave out most NixOS modules; they don't
|
||||||
# define nixpkgs.config, so it's pointless to evaluate them.
|
# define nixpkgs.config, so it's pointless to evaluate them.
|
||||||
baseModules = [ ../modules/misc/nixpkgs.nix ];
|
baseModules = [ ../modules/misc/nixpkgs.nix ];
|
||||||
pkgs = import nixpkgs { inherit system; config = {}; };
|
pkgs = import nixpkgs { system = system_; config = {}; };
|
||||||
}).optionDefinitions.nixpkgs;
|
}).optionDefinitions.nixpkgs;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -98,7 +98,7 @@ in
|
|||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
let
|
let
|
||||||
inherit (pkgs) builderDefs ttmkfdir;
|
inherit (pkgs) builderDefs;
|
||||||
inherit (pkgs.xorg) mkfontdir mkfontscale fontalias;
|
inherit (pkgs.xorg) mkfontdir mkfontscale fontalias;
|
||||||
|
|
||||||
fontDirs = config.fonts.fonts;
|
fontDirs = config.fonts.fonts;
|
||||||
@ -107,7 +107,7 @@ let
|
|||||||
localDefs = with builderDefs; builderDefs.passthru.function rec {
|
localDefs = with builderDefs; builderDefs.passthru.function rec {
|
||||||
src = "";/* put a fetchurl here */
|
src = "";/* put a fetchurl here */
|
||||||
|
|
||||||
buildInputs = [mkfontdir mkfontscale ttmkfdir];
|
buildInputs = [mkfontdir mkfontscale];
|
||||||
configureFlags = [];
|
configureFlags = [];
|
||||||
inherit fontDirs;
|
inherit fontDirs;
|
||||||
installPhase = fullDepEntry ("
|
installPhase = fullDepEntry ("
|
||||||
@ -135,13 +135,6 @@ let
|
|||||||
rm fonts.alias
|
rm fonts.alias
|
||||||
mkfontdir
|
mkfontdir
|
||||||
mkfontscale
|
mkfontscale
|
||||||
mv fonts.scale fonts.scale.old
|
|
||||||
mv fonts.dir fonts.dir.old
|
|
||||||
ttmkfdir
|
|
||||||
cat fonts.scale.old >> fonts.scale
|
|
||||||
cat fonts.dir.old >> fonts.dir
|
|
||||||
rm fonts.dir.old
|
|
||||||
rm fonts.scale.old
|
|
||||||
cat \$( find ${fontalias}/ -name fonts.alias) >fonts.alias
|
cat \$( find ${fontalias}/ -name fonts.alias) >fonts.alias
|
||||||
") ["minInit" "addInputs"];
|
") ["minInit" "addInputs"];
|
||||||
};
|
};
|
||||||
|
@ -66,13 +66,14 @@ for arg; do
|
|||||||
sarg="$arg"
|
sarg="$arg"
|
||||||
while test "$sarg" != "-"; do
|
while test "$sarg" != "-"; do
|
||||||
case $sarg in
|
case $sarg in
|
||||||
--*) longarg=$arg;;
|
--*) longarg=$arg; sarg="--";;
|
||||||
-d*) longarg="$longarg --description";;
|
-d*) longarg="$longarg --description";;
|
||||||
-v*) longarg="$longarg --value";;
|
-v*) longarg="$longarg --value";;
|
||||||
-l*) longarg="$longarg --lookup";;
|
-l*) longarg="$longarg --lookup";;
|
||||||
-i*) longarg="$longarg --install";;
|
-i*) longarg="$longarg --install";;
|
||||||
-*) usage;;
|
-*) usage;;
|
||||||
esac
|
esac
|
||||||
|
# remove the first letter option
|
||||||
sarg="-${sarg#??}"
|
sarg="-${sarg#??}"
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
23
modules/misc/deployment.nix
Normal file
23
modules/misc/deployment.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
with pkgs.lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
|
||||||
|
deployment = mkOption {
|
||||||
|
description = ''
|
||||||
|
This option captures various custom attributes related to the configuration of the system, which
|
||||||
|
are not directly used for building a system configuration. Usually these attributes
|
||||||
|
are used by external tooling, such as the nixos-deploy-network tool or the Disnix Avahi
|
||||||
|
publisher.
|
||||||
|
'';
|
||||||
|
default = {};
|
||||||
|
example = {
|
||||||
|
description = "My production machine";
|
||||||
|
hostname = "my.test.org";
|
||||||
|
country = "NL";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -57,6 +57,7 @@ in
|
|||||||
cups = 36;
|
cups = 36;
|
||||||
foldingAtHome = 37;
|
foldingAtHome = 37;
|
||||||
sabnzbd = 38;
|
sabnzbd = 38;
|
||||||
|
kdm = 39;
|
||||||
# When adding a uid, make sure it doesn't match an existing gid.
|
# When adding a uid, make sure it doesn't match an existing gid.
|
||||||
|
|
||||||
nixbld = 30000; # start of range of uids
|
nixbld = 30000; # start of range of uids
|
||||||
|
@ -13,5 +13,16 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixpkgs.system = pkgs.lib.mkOption {
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
Specifies the Nix platform type for which NixOS should be built.
|
||||||
|
If unset, it defaults to the platform type of your host system
|
||||||
|
(<literal>${builtins.currentSystem}</literal>).
|
||||||
|
Specifying this option is useful when doing distributed
|
||||||
|
multi-platform deployment, or when building virtual machines.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
./installer/tools/tools.nix
|
./installer/tools/tools.nix
|
||||||
./misc/assertions.nix
|
./misc/assertions.nix
|
||||||
./misc/check-config.nix
|
./misc/check-config.nix
|
||||||
|
./misc/deployment.nix
|
||||||
./misc/ids.nix
|
./misc/ids.nix
|
||||||
./misc/locate.nix
|
./misc/locate.nix
|
||||||
./misc/nixpkgs.nix
|
./misc/nixpkgs.nix
|
||||||
|
@ -68,7 +68,7 @@ fi
|
|||||||
alias ls="ls --color=tty"
|
alias ls="ls --color=tty"
|
||||||
alias ll="ls -l"
|
alias ll="ls -l"
|
||||||
alias l="ls -alh"
|
alias l="ls -alh"
|
||||||
alias which="type -p"
|
alias which="type -P"
|
||||||
|
|
||||||
# The "non-interactive" Bash build does not support programmable
|
# The "non-interactive" Bash build does not support programmable
|
||||||
# completion so check whether it's available.
|
# completion so check whether it's available.
|
||||||
|
@ -6,10 +6,10 @@ let
|
|||||||
|
|
||||||
inherit (pkgs) mysql gzip;
|
inherit (pkgs) mysql gzip;
|
||||||
|
|
||||||
location = config.services.mysqlBackup.location ;
|
cfg = config.services.mysqlBackup ;
|
||||||
|
location = cfg.location ;
|
||||||
mysqlBackupCron = db : ''
|
mysqlBackupCron = db : ''
|
||||||
${config.services.mysqlBackup.period} ${config.services.mysqlBackup.user} ${mysql}/bin/mysqldump ${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
|
||||||
@ -55,6 +55,13 @@ in
|
|||||||
Location to put the gzipped MySQL database dumps.
|
Location to put the gzipped MySQL database dumps.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
singleTransaction = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to create database dump in a single transaction
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -9,22 +9,16 @@ let
|
|||||||
# see description of extraPlugins
|
# see description of extraPlugins
|
||||||
postgresqlAndPlugins = pg:
|
postgresqlAndPlugins = pg:
|
||||||
if cfg.extraPlugins == [] then pg
|
if cfg.extraPlugins == [] then pg
|
||||||
else pkgs.runCommand "postgresql-and-plugins" {
|
else pkgs.buildEnv {
|
||||||
inherit (pkgs) perl;
|
name = "postgresql-and-plugins";
|
||||||
inherit pg;
|
|
||||||
# used by env builder:
|
|
||||||
paths = [ pg ] ++ cfg.extraPlugins;
|
paths = [ pg ] ++ cfg.extraPlugins;
|
||||||
pathsToLink = "/";
|
postBuild =
|
||||||
ignoreCollisions = 0;
|
|
||||||
manifest = null;
|
|
||||||
}
|
|
||||||
''
|
''
|
||||||
perlScript=${pkgs.buildEnvScript}
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
$perl/bin/perl $perlScript
|
|
||||||
rm $out/bin/{pg_config,postgres,pg_ctl}
|
rm $out/bin/{pg_config,postgres,pg_ctl}
|
||||||
cp --target-directory=$out/bin $pg/bin/{postgres,pg_config,pg_ctl}
|
cp --target-directory=$out/bin ${pg}/bin/{postgres,pg_config,pg_ctl}
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
postgresql = postgresqlAndPlugins pkgs.postgresql;
|
postgresql = postgresqlAndPlugins pkgs.postgresql;
|
||||||
|
|
||||||
|
@ -7,6 +7,13 @@ let
|
|||||||
|
|
||||||
cfg = config.services.disnix;
|
cfg = config.services.disnix;
|
||||||
|
|
||||||
|
disnix_activation_scripts = pkgs.disnix_activation_scripts.override (origArgs: {
|
||||||
|
enableApacheWebApplication = config.services.httpd.enable;
|
||||||
|
enableAxis2WebService = config.services.tomcat.axis2.enable;
|
||||||
|
enableEjabberdDump = config.services.ejabberd.enable;
|
||||||
|
enableMySQLDatabase = config.services.mysql.enable;
|
||||||
|
enableTomcatWebApplication = config.services.tomcat.enable;
|
||||||
|
});
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -22,6 +29,16 @@ in
|
|||||||
description = "Whether to enable Disnix";
|
description = "Whether to enable Disnix";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useWebServiceInterface = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "Whether to enable the DisnixWebService interface running on Apache Tomcat";
|
||||||
|
};
|
||||||
|
|
||||||
|
publishAvahi = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "Whether to publish capabilities/properties as a Disnix service through Avahi";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -31,11 +48,19 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.disnix ];
|
environment.systemPackages = [ pkgs.disnix ] ++ optional cfg.useWebServiceInterface pkgs.DisnixWebService;
|
||||||
|
|
||||||
services.dbus.enable = true;
|
services.dbus.enable = true;
|
||||||
services.dbus.packages = [ pkgs.disnix ];
|
services.dbus.packages = [ pkgs.disnix ];
|
||||||
|
|
||||||
|
services.tomcat.enable = cfg.useWebServiceInterface;
|
||||||
|
services.tomcat.extraGroups = [ "disnix" ];
|
||||||
|
services.tomcat.javaOpts = "${optionalString cfg.useWebServiceInterface "-Djava.library.path=${pkgs.libmatthew_java}/lib/jni"} ";
|
||||||
|
services.tomcat.sharedLibs = []
|
||||||
|
++ optional cfg.useWebServiceInterface "${pkgs.DisnixWebService}/share/java/DisnixConnection.jar"
|
||||||
|
++ optional cfg.useWebServiceInterface "${pkgs.dbus_java}/share/java/dbus.jar";
|
||||||
|
services.tomcat.webapps = [] ++ optional cfg.useWebServiceInterface pkgs.DisnixWebService;
|
||||||
|
|
||||||
users.extraGroups = singleton
|
users.extraGroups = singleton
|
||||||
{ name = "disnix";
|
{ name = "disnix";
|
||||||
gid = config.ids.gids.disnix;
|
gid = config.ids.gids.disnix;
|
||||||
@ -51,10 +76,33 @@ in
|
|||||||
export PATH=/var/run/current-system/sw/bin:/var/run/current-system/sw/sbin
|
export PATH=/var/run/current-system/sw/bin:/var/run/current-system/sw/sbin
|
||||||
export HOME=/root
|
export HOME=/root
|
||||||
|
|
||||||
${pkgs.disnix}/bin/disnix-service --activation-modules-dir=${pkgs.disnix_activation_scripts}/libexec/disnix/activation-scripts
|
${pkgs.disnix}/bin/disnix-service --activation-modules-dir=${disnix_activation_scripts}/libexec/disnix/activation-scripts
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
} //
|
||||||
|
mkIf cfg.publishAvahi {
|
||||||
|
|
||||||
|
services.avahi.enable = true;
|
||||||
|
|
||||||
|
jobs.disnixAvahi =
|
||||||
|
{ description = "Disnix Avahi publisher";
|
||||||
|
|
||||||
|
startOn = "started avahi-daemon";
|
||||||
|
|
||||||
|
exec =
|
||||||
|
''
|
||||||
|
${pkgs.avahi}/bin/avahi-publish-service disnix-$(${pkgs.nettools}/bin/hostname) _disnix._tcp 22 \
|
||||||
|
"hostname=\"$(${pkgs.nettools}/bin/hostname)\"" \
|
||||||
|
"system=\"$(uname -m)-linux\"" \
|
||||||
|
"mem=$(grep 'MemTotal:' /proc/meminfo | sed -e 's/kB//' -e 's/MemTotal://' -e 's/ //g')" \
|
||||||
|
${optionalString (cfg.useWebServiceInterface) ''"targetEPR=\"http://(${pkgs.nettools}/bin/hostname):8080/DisnixWebService/services/DisnixWebService\""''} \
|
||||||
|
${optionalString (config.services.httpd.enable) ''"documentRoot=\"${config.services.httpd.documentRoot}\""''} \
|
||||||
|
${optionalString (config.services.mysql.enable) ''"mysqlPort=3306"''} \
|
||||||
|
${optionalString (config.services.tomcat.enable) ''"tomcatPort=8080"''} \
|
||||||
|
"supportedTypes=[$(for i in ${disnix_activation_scripts}/libexec/disnix/activation-scripts/*; do echo -n " \"$(basename $i)\""; done) ]" \
|
||||||
|
${concatMapStrings (deploymentAttrName: let deploymentAttrValue = getAttr deploymentAttrName (config.deployment); in ''${deploymentAttrName}=\"${deploymentAttrValue}\" '' ) (attrNames (config.deployment))}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ in
|
|||||||
description = "monit.conf content";
|
description = "monit.conf content";
|
||||||
};
|
};
|
||||||
startOn = mkOption {
|
startOn = mkOption {
|
||||||
default = "network-interfaces/started";
|
default = "started network-interfaces";
|
||||||
description = "What Monit supposes to be already present";
|
description = "What Monit supposes to be already present";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -133,7 +133,15 @@ 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 = "${pkgs.nfsUtils}/sbin/rpc.nfsd ${if cfg.server.hostName != null then "-H ${cfg.server.hostName}" else ""} ${builtins.toString cfg.server.nproc}";
|
preStart =
|
||||||
|
''
|
||||||
|
# Create a state directory required by NFSv4.
|
||||||
|
mkdir -p /var/lib/nfs/v4recovery
|
||||||
|
|
||||||
|
${pkgs.nfsUtils}/sbin/rpc.nfsd \
|
||||||
|
${if cfg.server.hostName != null then "-H ${cfg.server.hostName}" else ""} \
|
||||||
|
${builtins.toString cfg.server.nproc}
|
||||||
|
'';
|
||||||
|
|
||||||
postStop = "${pkgs.nfsUtils}/sbin/rpc.nfsd 0";
|
postStop = "${pkgs.nfsUtils}/sbin/rpc.nfsd 0";
|
||||||
};
|
};
|
||||||
|
@ -8,7 +8,7 @@ let
|
|||||||
|
|
||||||
# Don't start dhclient on explicitly configured interfaces.
|
# Don't start dhclient on explicitly configured interfaces.
|
||||||
ignoredInterfaces =
|
ignoredInterfaces =
|
||||||
map (i: i.name) (lib.filter (i: i ? ipAddress) config.networking.interfaces);
|
map (i: i.name) (lib.filter (i: i ? ipAddress && i.ipAddress != "" ) config.networking.interfaces);
|
||||||
|
|
||||||
stateDir = "/var/lib/dhcp"; # Don't use /var/state/dhcp; not FHS-compliant.
|
stateDir = "/var/lib/dhcp"; # Don't use /var/state/dhcp; not FHS-compliant.
|
||||||
|
|
||||||
|
@ -26,6 +26,12 @@ in
|
|||||||
description = "Location where Tomcat stores configuration files, webapplications and logfiles";
|
description = "Location where Tomcat stores configuration files, webapplications and logfiles";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraGroups = mkOption {
|
||||||
|
default = [];
|
||||||
|
example = [ "users" ];
|
||||||
|
description = "Defines extra groups to which the tomcat user belongs.";
|
||||||
|
};
|
||||||
|
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
default = "tomcat";
|
default = "tomcat";
|
||||||
description = "User account under which Apache Tomcat runs.";
|
description = "User account under which Apache Tomcat runs.";
|
||||||
@ -104,6 +110,7 @@ in
|
|||||||
uid = config.ids.uids.tomcat;
|
uid = config.ids.uids.tomcat;
|
||||||
description = "Tomcat user";
|
description = "Tomcat user";
|
||||||
home = "/homeless-shelter";
|
home = "/homeless-shelter";
|
||||||
|
extraGroups = cfg.extraGroups;
|
||||||
};
|
};
|
||||||
|
|
||||||
jobs.tomcat =
|
jobs.tomcat =
|
||||||
|
@ -106,6 +106,13 @@ in
|
|||||||
|
|
||||||
security.pam.services = [ { name = "kde"; } ];
|
security.pam.services = [ { name = "kde"; } ];
|
||||||
|
|
||||||
|
users.extraUsers = singleton
|
||||||
|
{ name = "kdm";
|
||||||
|
uid = config.ids.uids.kdm;
|
||||||
|
description = "kdm user";
|
||||||
|
home = "/tmp/kdm";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,8 @@ let
|
|||||||
|
|
||||||
cfg = config.networking;
|
cfg = config.networking;
|
||||||
|
|
||||||
|
ifconfig = "${nettools}/sbin/ifconfig";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -113,6 +115,15 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
macAddress = mkOption {
|
||||||
|
default = "";
|
||||||
|
example = "00:11:22:33:44:55";
|
||||||
|
type = types.string;
|
||||||
|
description = ''
|
||||||
|
MAC address of the interface. Leave empty to use the default.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -155,9 +166,19 @@ in
|
|||||||
export PATH=${config.system.sbin.modprobe}/sbin:$PATH
|
export PATH=${config.system.sbin.modprobe}/sbin:$PATH
|
||||||
modprobe af_packet || true
|
modprobe af_packet || true
|
||||||
|
|
||||||
|
${pkgs.lib.concatMapStrings (i:
|
||||||
|
if i.macAddress != "" then
|
||||||
|
''
|
||||||
|
echo "Configuring interface ${i.name}..."
|
||||||
|
${ifconfig} "${i.name}" down || true
|
||||||
|
${ifconfig} "${i.name}" hw ether "${i.macAddress}" || true
|
||||||
|
''
|
||||||
|
else "") cfg.interfaces
|
||||||
|
}
|
||||||
|
|
||||||
for i in $(cd /sys/class/net && ls -d *); do
|
for i in $(cd /sys/class/net && ls -d *); do
|
||||||
echo "Bringing up network device $i..."
|
echo "Bringing up network device $i..."
|
||||||
${nettools}/sbin/ifconfig $i up || true
|
${ifconfig} $i up || true
|
||||||
done
|
done
|
||||||
|
|
||||||
# Configure the manually specified interfaces.
|
# Configure the manually specified interfaces.
|
||||||
@ -169,7 +190,7 @@ in
|
|||||||
if test -n "${i.subnetMask}"; then
|
if test -n "${i.subnetMask}"; then
|
||||||
extraFlags="$extraFlags netmask ${i.subnetMask}"
|
extraFlags="$extraFlags netmask ${i.subnetMask}"
|
||||||
fi
|
fi
|
||||||
${nettools}/sbin/ifconfig "${i.name}" "${i.ipAddress}" $extraFlags || true
|
${ifconfig} "${i.name}" "${i.ipAddress}" $extraFlags || true
|
||||||
''
|
''
|
||||||
else "") cfg.interfaces}
|
else "") cfg.interfaces}
|
||||||
|
|
||||||
@ -202,7 +223,7 @@ in
|
|||||||
''
|
''
|
||||||
#for i in $(cd /sys/class/net && ls -d *); do
|
#for i in $(cd /sys/class/net && ls -d *); do
|
||||||
# echo "Taking down network device $i..."
|
# echo "Taking down network device $i..."
|
||||||
# ${nettools}/sbin/ifconfig $i down || true
|
# ${ifconfig} $i down || true
|
||||||
#done
|
#done
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -86,7 +86,8 @@ in
|
|||||||
|
|
||||||
assertions = singleton
|
assertions = singleton
|
||||||
{ assertion = kernelPackages.splashutils != null;
|
{ assertion = kernelPackages.splashutils != null;
|
||||||
message = "kernelPackages.splashutils may not be false";
|
message = "The kernelPackages does not provide splashutils, as required by ttyBackgrounds. " +
|
||||||
|
"Either provide kernelPackages with splashutils, or disable ttyBackgrounds.";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.ttyBackgrounds.specificThemes = singleton
|
services.ttyBackgrounds.specificThemes = singleton
|
||||||
|
Loading…
x
Reference in New Issue
Block a user