mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge branch 'closure-size' into p/default-outputs
This commit is contained in:
commit
d6b46ecb30
2432 changed files with 228678 additions and 117715 deletions
|
@ -129,6 +129,14 @@ with lib;
|
|||
|
||||
};
|
||||
|
||||
cache32Bit = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Generate system fonts cache for 32-bit applications.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -231,12 +239,19 @@ with lib;
|
|||
"${pkgs.fontconfig.out}/etc/fonts/fonts.conf";
|
||||
|
||||
environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/00-nixos.conf".text =
|
||||
''
|
||||
let
|
||||
cache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; };
|
||||
in ''
|
||||
<?xml version='1.0'?>
|
||||
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||
<fontconfig>
|
||||
<!-- Font directories -->
|
||||
${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.fonts)}
|
||||
<!-- Pre-generated font caches -->
|
||||
<cachedir>${cache pkgs.fontconfig}</cachedir>
|
||||
${optionalString (pkgs.stdenv.isx86_64 && config.fonts.fontconfig.cache32Bit) ''
|
||||
<cachedir>${cache pkgs.pkgsi686Linux.fontconfig}</cachedir>
|
||||
''}
|
||||
</fontconfig>
|
||||
'';
|
||||
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
];
|
||||
|
||||
options = {
|
||||
gtkPlugins = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.path;
|
||||
default = [];
|
||||
description = ''
|
||||
Plugin packages for GTK+ such as input methods.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.variables = if builtins.length config.gtkPlugins > 0
|
||||
then
|
||||
let
|
||||
paths = [ pkgs.gtk2 pkgs.gtk3 ] ++ config.gtkPlugins;
|
||||
env = pkgs.buildEnv {
|
||||
name = "gtk-exe-env";
|
||||
|
||||
inherit paths;
|
||||
|
||||
postBuild = lib.concatStringsSep "\n"
|
||||
(map (d: d.gtkExeEnvPostBuild or "") paths);
|
||||
|
||||
ignoreCollisions = true;
|
||||
};
|
||||
in {
|
||||
GTK_EXE_PREFIX = builtins.toString env;
|
||||
GTK_PATH = [
|
||||
"${env}/lib/gtk-2.0"
|
||||
"${env}/lib/gtk-3.0"
|
||||
];
|
||||
}
|
||||
else {};
|
||||
};
|
||||
}
|
|
@ -39,6 +39,17 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
networking.dnsExtensionMechanism = lib.mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable the <code>edns0</code> option in <filename>resolv.conf</filename>. With
|
||||
that option set, <code>glibc</code> supports use of the extension mechanisms for
|
||||
DNS (EDNS) specified in RFC 2671. The most popular user of that feature is DNSSEC,
|
||||
which does not work without it.
|
||||
'';
|
||||
};
|
||||
|
||||
networking.extraResolvconfConf = lib.mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
|
@ -162,7 +173,10 @@ in
|
|||
libc_restart='${pkgs.systemd}/bin/systemctl try-restart --no-block nscd.service 2> /dev/null'
|
||||
'' + optionalString cfg.dnsSingleRequest ''
|
||||
# only send one DNS request at a time
|
||||
resolv_conf_options='single-request'
|
||||
resolv_conf_options+=' single-request'
|
||||
'' + optionalString cfg.dnsExtensionMechanism ''
|
||||
# enable extension mechanisms for DNS
|
||||
resolv_conf_options+=' edns0'
|
||||
'' + optionalString hasLocalResolver ''
|
||||
# This hosts runs a full-blown DNS resolver.
|
||||
name_servers='127.0.0.1'
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
];
|
||||
|
||||
options = {
|
||||
qtPlugins = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.path;
|
||||
default = [];
|
||||
description = ''
|
||||
Plugin packages for Qt such as input methods.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.variables = if builtins.length config.qtPlugins > 0
|
||||
then
|
||||
let
|
||||
paths = [ pkgs.qt48 ] ++ config.qtPlugins;
|
||||
env = pkgs.buildEnv {
|
||||
name = "qt-plugin-env";
|
||||
|
||||
inherit paths;
|
||||
|
||||
postBuild = lib.concatStringsSep "\n"
|
||||
(map (d: d.qtPluginEnvPostBuild or "") paths);
|
||||
|
||||
ignoreCollisions = true;
|
||||
};
|
||||
in {
|
||||
QT_PLUGIN_PATH = [ (builtins.toString env) ];
|
||||
}
|
||||
else {};
|
||||
};
|
||||
}
|
|
@ -17,16 +17,16 @@ in
|
|||
services = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = {};
|
||||
example = {
|
||||
test =
|
||||
''
|
||||
IPSec gateway 192.168.1.1
|
||||
IPSec ID someID
|
||||
IPSec secret secretKey
|
||||
Xauth username name
|
||||
Xauth password pass
|
||||
'';
|
||||
};
|
||||
example = literalExample ''
|
||||
{ test = '''
|
||||
IPSec gateway 192.168.1.1
|
||||
IPSec ID someID
|
||||
IPSec secret secretKey
|
||||
Xauth username name
|
||||
Xauth password pass
|
||||
''';
|
||||
}
|
||||
'';
|
||||
description =
|
||||
''
|
||||
The names of cisco VPNs and their associated definitions
|
||||
|
|
|
@ -98,11 +98,9 @@ in
|
|||
script = ''
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
PATH=${pkgs.procps}/bin:${pkgs.gnugrep}/bin:${pkgs.gnused}/bin
|
||||
|
||||
|
||||
# Calculate memory to use for zram
|
||||
totalmem=$(free | grep -e "^Mem:" | sed -e 's/^Mem: *//' -e 's/ *.*//')
|
||||
totalmem=$(${pkgs.gnugrep}/bin/grep 'MemTotal: ' /proc/meminfo | ${pkgs.gawk}/bin/awk '{print $2}')
|
||||
mem=$(((totalmem * ${toString cfg.memoryPercent} / 100 / ${toString cfg.numDevices}) * 1024))
|
||||
|
||||
echo $mem > /sys/class/block/${dev}/disksize
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue