Merge master into staging
This commit is contained in:
commit
3209775495
@ -1,8 +1,6 @@
|
|||||||
let
|
let
|
||||||
pkgs = import ./.. { };
|
pkgs = import ./.. { };
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
sources = lib.sourceFilesBySuffices ./. [".xml"];
|
|
||||||
sources-langs = ./languages-frameworks;
|
|
||||||
in
|
in
|
||||||
pkgs.stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
name = "nixpkgs-manual";
|
name = "nixpkgs-manual";
|
||||||
@ -16,7 +14,7 @@ pkgs.stdenv.mkDerivation {
|
|||||||
# $ nix-shell --run "make clean all"
|
# $ nix-shell --run "make clean all"
|
||||||
# otherwise they won't reapply :)
|
# otherwise they won't reapply :)
|
||||||
HIGHLIGHTJS = pkgs.documentation-highlighter;
|
HIGHLIGHTJS = pkgs.documentation-highlighter;
|
||||||
XSL = "${pkgs.docbook5_xsl}/xml/xsl";
|
XSL = "${pkgs.docbook_xsl_ns}/xml/xsl";
|
||||||
RNG = "${pkgs.docbook5}/xml/rng/docbook/docbook.rng";
|
RNG = "${pkgs.docbook5}/xml/rng/docbook/docbook.rng";
|
||||||
XMLFORMAT_CONFIG = ../nixos/doc/xmlformat.conf;
|
XMLFORMAT_CONFIG = ../nixos/doc/xmlformat.conf;
|
||||||
xsltFlags = lib.concatStringsSep " " [
|
xsltFlags = lib.concatStringsSep " " [
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
inherit (builtins) head tail length;
|
inherit (builtins) head tail length;
|
||||||
inherit (lib.trivial) and or;
|
inherit (lib.trivial) and;
|
||||||
inherit (lib.strings) concatStringsSep;
|
inherit (lib.strings) concatStringsSep;
|
||||||
inherit (lib.lists) fold concatMap concatLists all deepSeqList;
|
inherit (lib.lists) fold concatMap concatLists;
|
||||||
in
|
in
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{lib, pkgs}:
|
{lib, pkgs}:
|
||||||
let inherit (lib) nv nvs; in
|
let inherit (lib) nvs; in
|
||||||
{
|
{
|
||||||
|
|
||||||
# composableDerivation basically mixes these features:
|
# composableDerivation basically mixes these features:
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
{ lib }:
|
{ lib }:
|
||||||
let
|
|
||||||
|
|
||||||
inherit (builtins) attrNames;
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
|
@ -19,8 +19,6 @@ let
|
|||||||
libStr = lib.strings;
|
libStr = lib.strings;
|
||||||
libAttr = lib.attrsets;
|
libAttr = lib.attrsets;
|
||||||
|
|
||||||
flipMapAttrs = flip libAttr.mapAttrs;
|
|
||||||
|
|
||||||
inherit (lib) isFunction;
|
inherit (lib) isFunction;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
@ -143,6 +143,12 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
|||||||
free = false;
|
free = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cc-by-nc-40 = spdx {
|
||||||
|
spdxId = "CC-BY-NC-4.0";
|
||||||
|
fullName = "Creative Commons Attribution Non Commercial 4.0 International";
|
||||||
|
free = false;
|
||||||
|
};
|
||||||
|
|
||||||
cc-by-nd-30 = spdx {
|
cc-by-nd-30 = spdx {
|
||||||
spdxId = "CC-BY-ND-3.0";
|
spdxId = "CC-BY-ND-3.0";
|
||||||
fullName = "Creative Commons Attribution-No Derivative Works v3.00";
|
fullName = "Creative Commons Attribution-No Derivative Works v3.00";
|
||||||
|
@ -64,7 +64,6 @@ rec {
|
|||||||
*/
|
*/
|
||||||
foldl = op: nul: list:
|
foldl = op: nul: list:
|
||||||
let
|
let
|
||||||
len = length list;
|
|
||||||
foldl' = n:
|
foldl' = n:
|
||||||
if n == -1
|
if n == -1
|
||||||
then nul
|
then nul
|
||||||
|
@ -670,7 +670,6 @@ rec {
|
|||||||
{ config, options, ... }:
|
{ config, options, ... }:
|
||||||
let
|
let
|
||||||
fromOpt = getAttrFromPath from options;
|
fromOpt = getAttrFromPath from options;
|
||||||
toOpt = getAttrFromPath to options;
|
|
||||||
toOf = attrByPath to
|
toOf = attrByPath to
|
||||||
(abort "Renaming error: option `${showOption to}' does not exist.");
|
(abort "Renaming error: option `${showOption to}' does not exist.");
|
||||||
in
|
in
|
||||||
|
@ -121,7 +121,7 @@ rec {
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
pkgs = import <nixpkgs> { }
|
pkgs = import <nixpkgs> { }
|
||||||
makePerlPath [ pkgs.perlPackages.NetSMTP ]
|
makePerlPath [ pkgs.perlPackages.libnet ]
|
||||||
=> "/nix/store/n0m1fk9c960d8wlrs62sncnadygqqc6y-perl-Net-SMTP-1.25/lib/perl5/site_perl"
|
=> "/nix/store/n0m1fk9c960d8wlrs62sncnadygqqc6y-perl-Net-SMTP-1.25/lib/perl5/site_perl"
|
||||||
*/
|
*/
|
||||||
makePerlPath = makeSearchPathOutput "lib" "lib/perl5/site_perl";
|
makePerlPath = makeSearchPathOutput "lib" "lib/perl5/site_perl";
|
||||||
|
@ -380,10 +380,6 @@ runTests {
|
|||||||
|
|
||||||
resRem7 = res6.replace (a: removeAttrs a ["a"]);
|
resRem7 = res6.replace (a: removeAttrs a ["a"]);
|
||||||
|
|
||||||
resReplace6 = let x = defaultOverridableDelayableArgs id { a = 7; mergeAttrBy = { a = builtins.add; }; };
|
|
||||||
x2 = x.merge { a = 20; }; # now we have 27
|
|
||||||
in (x2.replace) { a = 10; }; # and override the value by 10
|
|
||||||
|
|
||||||
# fixed tests (delayed args): (when using them add some comments, please)
|
# fixed tests (delayed args): (when using them add some comments, please)
|
||||||
resFixed1 =
|
resFixed1 =
|
||||||
let x = defaultOverridableDelayableArgs id ( x: { a = 7; c = x.fixed.b; });
|
let x = defaultOverridableDelayableArgs id ( x: { a = 7; c = x.fixed.b; });
|
||||||
|
@ -8,7 +8,7 @@ with lib.trivial;
|
|||||||
with lib.strings;
|
with lib.strings;
|
||||||
let
|
let
|
||||||
|
|
||||||
inherit (lib.modules) mergeDefinitions filterOverrides;
|
inherit (lib.modules) mergeDefinitions;
|
||||||
outer_types =
|
outer_types =
|
||||||
rec {
|
rec {
|
||||||
isType = type: x: (x._type or "") == type;
|
isType = type: x: (x._type or "") == type;
|
||||||
@ -309,7 +309,6 @@ rec {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
def;
|
def;
|
||||||
listOnly = listOf elemType;
|
|
||||||
attrOnly = attrsOf elemType;
|
attrOnly = attrsOf elemType;
|
||||||
in mkOptionType rec {
|
in mkOptionType rec {
|
||||||
name = "loaOf";
|
name = "loaOf";
|
||||||
|
@ -4420,6 +4420,11 @@
|
|||||||
email = "zef@zef.me";
|
email = "zef@zef.me";
|
||||||
name = "Zef Hemel";
|
name = "Zef Hemel";
|
||||||
};
|
};
|
||||||
|
zgrannan = {
|
||||||
|
email = "zgrannan@gmail.com";
|
||||||
|
github = "zgrannan";
|
||||||
|
name = "Zack Grannan";
|
||||||
|
};
|
||||||
zimbatm = {
|
zimbatm = {
|
||||||
email = "zimbatm@zimbatm.com";
|
email = "zimbatm@zimbatm.com";
|
||||||
github = "zimbatm";
|
github = "zimbatm";
|
||||||
|
@ -4,7 +4,7 @@ stdenv.mkDerivation {
|
|||||||
name = "nix-generate-from-cpan-3";
|
name = "nix-generate-from-cpan-3";
|
||||||
|
|
||||||
buildInputs = with perlPackages; [
|
buildInputs = with perlPackages; [
|
||||||
makeWrapper perl CPANMeta GetoptLongDescriptive CPANPLUS Readonly Log4Perl
|
makeWrapper perl CPANMeta GetoptLongDescriptive CPANPLUS Readonly LogLog4perl
|
||||||
];
|
];
|
||||||
|
|
||||||
phases = [ "installPhase" ];
|
phases = [ "installPhase" ];
|
||||||
|
@ -209,13 +209,13 @@ let
|
|||||||
--stringparam collect.xref.targets only \
|
--stringparam collect.xref.targets only \
|
||||||
--stringparam targets.filename "$out/manual.db" \
|
--stringparam targets.filename "$out/manual.db" \
|
||||||
--nonet \
|
--nonet \
|
||||||
${docbook5_xsl}/xml/xsl/docbook/xhtml/chunktoc.xsl \
|
${docbook_xsl_ns}/xml/xsl/docbook/xhtml/chunktoc.xsl \
|
||||||
${manual-combined}/manual-combined.xml
|
${manual-combined}/manual-combined.xml
|
||||||
|
|
||||||
cat > "$out/olinkdb.xml" <<EOF
|
cat > "$out/olinkdb.xml" <<EOF
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE targetset SYSTEM
|
<!DOCTYPE targetset SYSTEM
|
||||||
"file://${docbook5_xsl}/xml/xsl/docbook/common/targetdatabase.dtd" [
|
"file://${docbook_xsl_ns}/xml/xsl/docbook/common/targetdatabase.dtd" [
|
||||||
<!ENTITY manualtargets SYSTEM "file://$out/manual.db">
|
<!ENTITY manualtargets SYSTEM "file://$out/manual.db">
|
||||||
]>
|
]>
|
||||||
<targetset>
|
<targetset>
|
||||||
@ -264,11 +264,11 @@ in rec {
|
|||||||
${manualXsltprocOptions} \
|
${manualXsltprocOptions} \
|
||||||
--stringparam target.database.document "${olinkDB}/olinkdb.xml" \
|
--stringparam target.database.document "${olinkDB}/olinkdb.xml" \
|
||||||
--nonet --output $dst/ \
|
--nonet --output $dst/ \
|
||||||
${docbook5_xsl}/xml/xsl/docbook/xhtml/chunktoc.xsl \
|
${docbook_xsl_ns}/xml/xsl/docbook/xhtml/chunktoc.xsl \
|
||||||
${manual-combined}/manual-combined.xml
|
${manual-combined}/manual-combined.xml
|
||||||
|
|
||||||
mkdir -p $dst/images/callouts
|
mkdir -p $dst/images/callouts
|
||||||
cp ${docbook5_xsl}/xml/xsl/docbook/images/callouts/*.svg $dst/images/callouts/
|
cp ${docbook_xsl_ns}/xml/xsl/docbook/images/callouts/*.svg $dst/images/callouts/
|
||||||
|
|
||||||
cp ${../../../doc/style.css} $dst/style.css
|
cp ${../../../doc/style.css} $dst/style.css
|
||||||
cp ${../../../doc/overrides.css} $dst/overrides.css
|
cp ${../../../doc/overrides.css} $dst/overrides.css
|
||||||
@ -292,11 +292,11 @@ in rec {
|
|||||||
${manualXsltprocOptions} \
|
${manualXsltprocOptions} \
|
||||||
--stringparam target.database.document "${olinkDB}/olinkdb.xml" \
|
--stringparam target.database.document "${olinkDB}/olinkdb.xml" \
|
||||||
--nonet --xinclude --output $dst/epub/ \
|
--nonet --xinclude --output $dst/epub/ \
|
||||||
${docbook5_xsl}/xml/xsl/docbook/epub/docbook.xsl \
|
${docbook_xsl_ns}/xml/xsl/docbook/epub/docbook.xsl \
|
||||||
${manual-combined}/manual-combined.xml
|
${manual-combined}/manual-combined.xml
|
||||||
|
|
||||||
mkdir -p $dst/epub/OEBPS/images/callouts
|
mkdir -p $dst/epub/OEBPS/images/callouts
|
||||||
cp -r ${docbook5_xsl}/xml/xsl/docbook/images/callouts/*.svg $dst/epub/OEBPS/images/callouts # */
|
cp -r ${docbook_xsl_ns}/xml/xsl/docbook/images/callouts/*.svg $dst/epub/OEBPS/images/callouts # */
|
||||||
echo "application/epub+zip" > mimetype
|
echo "application/epub+zip" > mimetype
|
||||||
manual="$dst/nixos-manual.epub"
|
manual="$dst/nixos-manual.epub"
|
||||||
zip -0Xq "$manual" mimetype
|
zip -0Xq "$manual" mimetype
|
||||||
@ -324,7 +324,7 @@ in rec {
|
|||||||
--param man.endnotes.are.numbered 0 \
|
--param man.endnotes.are.numbered 0 \
|
||||||
--param man.break.after.slash 1 \
|
--param man.break.after.slash 1 \
|
||||||
--stringparam target.database.document "${olinkDB}/olinkdb.xml" \
|
--stringparam target.database.document "${olinkDB}/olinkdb.xml" \
|
||||||
${docbook5_xsl}/xml/xsl/docbook/manpages/docbook.xsl \
|
${docbook_xsl_ns}/xml/xsl/docbook/manpages/docbook.xsl \
|
||||||
${manual-combined}/man-pages-combined.xml
|
${manual-combined}/man-pages-combined.xml
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ rec {
|
|||||||
machinesNumbered = zipLists machines (range 1 254);
|
machinesNumbered = zipLists machines (range 1 254);
|
||||||
|
|
||||||
nodes_ = flip map machinesNumbered (m: nameValuePair m.fst
|
nodes_ = flip map machinesNumbered (m: nameValuePair m.fst
|
||||||
[ ( { config, pkgs, nodes, ... }:
|
[ ( { config, nodes, ... }:
|
||||||
let
|
let
|
||||||
interfacesNumbered = zipLists config.virtualisation.vlans (range 1 255);
|
interfacesNumbered = zipLists config.virtualisation.vlans (range 1 255);
|
||||||
interfaces = flip map interfacesNumbered ({ fst, snd }:
|
interfaces = flip map interfacesNumbered ({ fst, snd }:
|
||||||
|
@ -24,9 +24,6 @@
|
|||||||
# most likely fails as GRUB will probably refuse to install.
|
# most likely fails as GRUB will probably refuse to install.
|
||||||
partitionTableType ? "legacy"
|
partitionTableType ? "legacy"
|
||||||
|
|
||||||
# Whether to invoke switch-to-configuration boot during image creation
|
|
||||||
, installBootLoader ? true
|
|
||||||
|
|
||||||
, # The root file system type.
|
, # The root file system type.
|
||||||
fsType ? "ext4"
|
fsType ? "ext4"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, perl, closureInfo, xorriso, syslinux
|
{ stdenv, closureInfo, xorriso, syslinux
|
||||||
|
|
||||||
, # The file name of the resulting ISO image.
|
, # The file name of the resulting ISO image.
|
||||||
isoName ? "cd.iso"
|
isoName ? "cd.iso"
|
||||||
|
@ -222,7 +222,7 @@ in rec {
|
|||||||
runInMachineWithX = { require ? [], ... } @ args:
|
runInMachineWithX = { require ? [], ... } @ args:
|
||||||
let
|
let
|
||||||
client =
|
client =
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
inherit require;
|
inherit require;
|
||||||
virtualisation.memorySize = 1024;
|
virtualisation.memorySize = 1024;
|
||||||
|
@ -149,7 +149,7 @@ let
|
|||||||
else testOptions;
|
else testOptions;
|
||||||
checkAll = checkList == [];
|
checkAll = checkList == [];
|
||||||
in
|
in
|
||||||
flip filter graph ({option, usedBy}:
|
flip filter graph ({option, ...}:
|
||||||
(checkAll || elem option checkList)
|
(checkAll || elem option checkList)
|
||||||
&& !(elem option excludedTestOptions)
|
&& !(elem option excludedTestOptions)
|
||||||
);
|
);
|
||||||
@ -165,7 +165,7 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
graphToText = graph:
|
graphToText = graph:
|
||||||
concatMapStrings ({option, usedBy}:
|
concatMapStrings ({usedBy, ...}:
|
||||||
concatMapStrings (user: ''
|
concatMapStrings (user: ''
|
||||||
${user}
|
${user}
|
||||||
'') usedBy
|
'') usedBy
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let fcBool = x: if x then "<bool>true</bool>" else "<bool>false</bool>";
|
let cfg = config.fonts.fontconfig.ultimate;
|
||||||
|
|
||||||
cfg = config.fonts.fontconfig.ultimate;
|
|
||||||
|
|
||||||
latestVersion = pkgs.fontconfig.configVersion;
|
latestVersion = pkgs.fontconfig.configVersion;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# This module gets rid of all dependencies on X11 client libraries
|
# This module gets rid of all dependencies on X11 client libraries
|
||||||
# (including fontconfig).
|
# (including fontconfig).
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Configuration for the Name Service Switch (/etc/nsswitch.conf).
|
# Configuration for the Name Service Switch (/etc/nsswitch.conf).
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ let
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
groupOpts = { name, config, ... }: {
|
groupOpts = { name, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{lib, config, ...}:
|
{lib, ...}:
|
||||||
|
|
||||||
{
|
{
|
||||||
hardware = {
|
hardware = {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{pkgs, config, ...}:
|
{pkgs, ...}:
|
||||||
|
|
||||||
{
|
{
|
||||||
hardware.firmware = [ pkgs.zd1211fw ];
|
hardware.firmware = [ pkgs.zd1211fw ];
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# This module provides the proprietary ATI X11 / OpenGL drivers.
|
# This module provides the proprietary ATI X11 / OpenGL drivers.
|
||||||
|
|
||||||
{ config, lib, pkgs, pkgs_i686, ... }:
|
{ config, lib, pkgs_i686, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
{ lib
|
{ buildEnv
|
||||||
, stdenv
|
|
||||||
, buildEnv
|
|
||||||
, libwebcam
|
, libwebcam
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, runCommand
|
, runCommand
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./installation-cd-graphical-kde.nix ];
|
imports = [ ./installation-cd-graphical-kde.nix ];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./installation-cd-minimal.nix ];
|
imports = [ ./installation-cd-minimal.nix ];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# This module defines a small NixOS installation CD. It does not
|
# This module defines a small NixOS installation CD. It does not
|
||||||
# contain any graphical stuff.
|
# contain any graphical stuff.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# This module contains the basic configuration for building netboot
|
# This module contains the basic configuration for building netboot
|
||||||
# images
|
# images
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# This module defines a small netboot environment.
|
# This module defines a small netboot environment.
|
||||||
|
|
||||||
{ config, lib, ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# List all devices which are detected by nixos-generate-config.
|
# List all devices which are detected by nixos-generate-config.
|
||||||
# Common devices are enabled by default.
|
# Common devices are enabled by default.
|
||||||
{ config, lib, pkgs, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
# This module generates nixos-install, nixos-rebuild,
|
# This module generates nixos-install, nixos-rebuild,
|
||||||
# nixos-generate-config, etc.
|
# nixos-generate-config, etc.
|
||||||
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.installer;
|
|
||||||
|
|
||||||
makeProg = args: pkgs.substituteAll (args // {
|
makeProg = args: pkgs.substituteAll (args // {
|
||||||
dir = "bin";
|
dir = "bin";
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, pkgs, config, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
_module.args = {
|
_module.args = {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# Systemd can also change ownership of service directories using the
|
# Systemd can also change ownership of service directories using the
|
||||||
# RuntimeDirectory/StateDirectory options.
|
# RuntimeDirectory/StateDirectory options.
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
@ -322,6 +322,7 @@
|
|||||||
hdfs = 295;
|
hdfs = 295;
|
||||||
mapred = 296;
|
mapred = 296;
|
||||||
hadoop = 297;
|
hadoop = 297;
|
||||||
|
hydron = 298;
|
||||||
|
|
||||||
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
|
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
|
||||||
|
|
||||||
@ -604,6 +605,7 @@
|
|||||||
hdfs = 295;
|
hdfs = 295;
|
||||||
mapred = 296;
|
mapred = 296;
|
||||||
hadoop = 297;
|
hadoop = 297;
|
||||||
|
hydron = 298;
|
||||||
|
|
||||||
# When adding a gid, make sure it doesn't match an existing
|
# When adding a gid, make sure it doesn't match an existing
|
||||||
# uid. Users and groups with the same name should have equal
|
# uid. Users and groups with the same name should have equal
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, options, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# 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, lib, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
@ -676,12 +676,12 @@
|
|||||||
./services/web-servers/caddy.nix
|
./services/web-servers/caddy.nix
|
||||||
./services/web-servers/fcgiwrap.nix
|
./services/web-servers/fcgiwrap.nix
|
||||||
./services/web-servers/hitch/default.nix
|
./services/web-servers/hitch/default.nix
|
||||||
|
./services/web-servers/hydron.nix
|
||||||
./services/web-servers/jboss/default.nix
|
./services/web-servers/jboss/default.nix
|
||||||
./services/web-servers/lighttpd/cgit.nix
|
./services/web-servers/lighttpd/cgit.nix
|
||||||
./services/web-servers/lighttpd/collectd.nix
|
./services/web-servers/lighttpd/collectd.nix
|
||||||
./services/web-servers/lighttpd/default.nix
|
./services/web-servers/lighttpd/default.nix
|
||||||
./services/web-servers/lighttpd/gitweb.nix
|
./services/web-servers/lighttpd/gitweb.nix
|
||||||
./services/web-servers/lighttpd/inginious.nix
|
|
||||||
./services/web-servers/meguca.nix
|
./services/web-servers/meguca.nix
|
||||||
./services/web-servers/mighttpd2.nix
|
./services/web-servers/mighttpd2.nix
|
||||||
./services/web-servers/minio.nix
|
./services/web-servers/minio.nix
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# enabled in the initrd. Its primary use is in the NixOS installation
|
# enabled in the initrd. Its primary use is in the NixOS installation
|
||||||
# CDs.
|
# CDs.
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# This module defines the software packages included in the "minimal"
|
# This module defines the software packages included in the "minimal"
|
||||||
# installation CD. It might be useful elsewhere.
|
# installation CD. It might be useful elsewhere.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Include some utilities that are useful for installing or repairing
|
# Include some utilities that are useful for installing or repairing
|
||||||
|
@ -31,7 +31,6 @@ let
|
|||||||
let
|
let
|
||||||
relocateNixOS = path:
|
relocateNixOS = path:
|
||||||
"<nixpkgs/nixos" + removePrefix nixosPath (toString path) + ">";
|
"<nixpkgs/nixos" + removePrefix nixosPath (toString path) + ">";
|
||||||
relocateOthers = null;
|
|
||||||
in
|
in
|
||||||
{ nixos = map relocateNixOS partitionedModuleFiles.nixos;
|
{ nixos = map relocateNixOS partitionedModuleFiles.nixos;
|
||||||
others = []; # TODO: copy the modules to the install-device repository.
|
others = []; # TODO: copy the modules to the install-device repository.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./graphical.nix ];
|
imports = [ ./graphical.nix ];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# This module defines a NixOS configuration with the Plasma 5 desktop.
|
# This module defines a NixOS configuration with the Plasma 5 desktop.
|
||||||
# It's used by the graphical installation CD.
|
# It's used by the graphical installation CD.
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# A profile with most (vanilla) hardening options enabled by default,
|
# A profile with most (vanilla) hardening options enabled by default,
|
||||||
# potentially at the cost of features and performance.
|
# potentially at the cost of features and performance.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Common configuration for headless machines (e.g., Amazon EC2
|
# Common configuration for headless machines (e.g., Amazon EC2
|
||||||
# instances).
|
# instances).
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# This module defines a small NixOS configuration. It does not
|
# This module defines a small NixOS configuration. It does not
|
||||||
# contain any graphical stuff.
|
# contain any graphical stuff.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Common configuration for virtual machines running under QEMU (using
|
# Common configuration for virtual machines running under QEMU (using
|
||||||
# virtio).
|
# virtio).
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
boot.initrd.availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio" ];
|
boot.initrd.availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio" ];
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Global configuration for atop.
|
# Global configuration for atop.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
options.programs.bcc.enable = lib.mkEnableOption "bcc";
|
options.programs.bcc.enable = lib.mkEnableOption "bcc";
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Most of the stuff here should probably be moved elsewhere sometime.
|
# Most of the stuff here should probably be moved elsewhere sometime.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.nylas-mail;
|
cfg = config.services.nylas-mail;
|
||||||
defaultUser = "nylas-mail";
|
|
||||||
in {
|
in {
|
||||||
###### interface
|
###### interface
|
||||||
options = {
|
options = {
|
||||||
|
@ -1,15 +1,9 @@
|
|||||||
# This module defines a standard configuration for NixOS shells.
|
# This module defines a standard configuration for NixOS shells.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
cfg = config.environment;
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
@ -7,7 +7,6 @@ with lib;
|
|||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.programs.ssh;
|
cfg = config.programs.ssh;
|
||||||
cfgd = config.services.openssh;
|
|
||||||
|
|
||||||
askPassword = cfg.askPassword;
|
askPassword = cfg.askPassword;
|
||||||
|
|
||||||
@ -62,6 +61,29 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Allow DSA keys for now. (These were deprecated in OpenSSH 7.0.)
|
||||||
|
pubkeyAcceptedKeyTypes = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [
|
||||||
|
"+ssh-dss"
|
||||||
|
];
|
||||||
|
example = [ "ssh-ed25519" "ssh-rsa" ];
|
||||||
|
description = ''
|
||||||
|
Specifies the key types that will be used for public key authentication.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
hostKeyAlgorithms = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [
|
||||||
|
"+ssh-dss"
|
||||||
|
];
|
||||||
|
example = [ "ssh-ed25519" "ssh-rsa" ];
|
||||||
|
description = ''
|
||||||
|
Specifies the host key algorithms that the client wants to use in order of preference.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
@ -189,9 +211,8 @@ in
|
|||||||
|
|
||||||
ForwardX11 ${if cfg.forwardX11 then "yes" else "no"}
|
ForwardX11 ${if cfg.forwardX11 then "yes" else "no"}
|
||||||
|
|
||||||
# Allow DSA keys for now. (These were deprecated in OpenSSH 7.0.)
|
${optionalString (cfg.pubkeyAcceptedKeyTypes != []) "PubkeyAcceptedKeyTypes ${concatStringsSep "," cfg.pubkeyAcceptedKeyTypes}"}
|
||||||
PubkeyAcceptedKeyTypes +ssh-dss
|
${optionalString (cfg.hostKeyAlgorithms != []) "HostKeyAlgorithms ${concatStringsSep "," cfg.hostKeyAlgorithms}"}
|
||||||
HostKeyAlgorithms +ssh-dss
|
|
||||||
|
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkOption mkEnableOption mkIf mkMerge types;
|
inherit (lib) mkOption mkIf types;
|
||||||
|
|
||||||
cfg = config.programs.tmux;
|
cfg = config.programs.tmux;
|
||||||
|
|
||||||
|
@ -6,8 +6,6 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
cfge = config.environment;
|
|
||||||
|
|
||||||
cfg = config.programs.xonsh;
|
cfg = config.programs.xonsh;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
@ -209,7 +209,6 @@ in
|
|||||||
servicesLists = mapAttrsToList certToServices cfg.certs;
|
servicesLists = mapAttrsToList certToServices cfg.certs;
|
||||||
certToServices = cert: data:
|
certToServices = cert: data:
|
||||||
let
|
let
|
||||||
domain = if data.domain != null then data.domain else cert;
|
|
||||||
cpath = lpath + optionalString (data.activationDelay != null) ".staging";
|
cpath = lpath + optionalString (data.activationDelay != null) ".staging";
|
||||||
lpath = "${cfg.directory}/${cert}";
|
lpath = "${cfg.directory}/${cert}";
|
||||||
rights = if data.allowKeysForGroup then "750" else "700";
|
rights = if data.allowKeysForGroup then "750" else "700";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# This module provides configuration for the OATH PAM modules.
|
# This module provides configuration for the OATH PAM modules.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -4,8 +4,6 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
inherit (pkgs) pam_usb;
|
|
||||||
|
|
||||||
cfg = config.security.pam.usb;
|
cfg = config.security.pam.usb;
|
||||||
|
|
||||||
anyUsbAuth = any (attrByPath ["usbAuth"] false) (attrValues config.security.pam.services);
|
anyUsbAuth = any (attrByPath ["usbAuth"] false) (attrValues config.security.pam.services);
|
||||||
|
@ -97,18 +97,7 @@ let
|
|||||||
${dir_cfg.extraConfig}
|
${dir_cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# TODO: by default use this config
|
directorOptions = {...}:
|
||||||
bconsole_conf = pkgs.writeText "bconsole.conf"
|
|
||||||
''
|
|
||||||
Director {
|
|
||||||
Name = ${dir_cfg.name};
|
|
||||||
Address = "localhost";
|
|
||||||
DirPort = ${toString dir_cfg.port};
|
|
||||||
Password = "${dir_cfg.password}";
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
directorOptions = {name, config, ...}:
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
password = mkOption {
|
password = mkOption {
|
||||||
@ -128,7 +117,7 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
deviceOptions = {name, config, ...}:
|
deviceOptions = {...}:
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
archiveDevice = mkOption {
|
archiveDevice = mkOption {
|
||||||
|
@ -510,7 +510,7 @@ in {
|
|||||||
'';
|
'';
|
||||||
default = { };
|
default = { };
|
||||||
type = types.attrsOf (types.submodule (
|
type = types.attrsOf (types.submodule (
|
||||||
{ name, config, ... }: {
|
{ ... }: {
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
path = mkOption {
|
path = mkOption {
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
let
|
let
|
||||||
cfg = config.services.crashplansb;
|
cfg = config.services.crashplansb;
|
||||||
crashplansb = pkgs.crashplansb.override { maxRam = cfg.maxRam; };
|
crashplansb = pkgs.crashplansb.override { maxRam = cfg.maxRam; };
|
||||||
varDir = "/var/lib/crashplan";
|
|
||||||
in
|
in
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
let
|
let
|
||||||
cfg = config.services.crashplan;
|
cfg = config.services.crashplan;
|
||||||
crashplan = pkgs.crashplan;
|
crashplan = pkgs.crashplan;
|
||||||
varDir = "/var/lib/crashplan";
|
|
||||||
in
|
in
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -6,7 +6,7 @@ with lib;
|
|||||||
description = ''
|
description = ''
|
||||||
Periodic backups to create with Restic.
|
Periodic backups to create with Restic.
|
||||||
'';
|
'';
|
||||||
type = types.attrsOf (types.submodule ({ name, config, ... }: {
|
type = types.attrsOf (types.submodule ({ name, ... }: {
|
||||||
options = {
|
options = {
|
||||||
passwordFile = mkOption {
|
passwordFile = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
@ -127,7 +127,6 @@ with lib;
|
|||||||
mapAttrs' (name: backup:
|
mapAttrs' (name: backup:
|
||||||
let
|
let
|
||||||
extraOptions = concatMapStrings (arg: " -o ${arg}") backup.extraOptions;
|
extraOptions = concatMapStrings (arg: " -o ${arg}") backup.extraOptions;
|
||||||
connectTo = elemAt (splitString ":" backup.repository) 1;
|
|
||||||
resticCmd = "${pkgs.restic}/bin/restic${extraOptions}";
|
resticCmd = "${pkgs.restic}/bin/restic${extraOptions}";
|
||||||
in nameValuePair "restic-backups-${name}" ({
|
in nameValuePair "restic-backups-${name}" ({
|
||||||
environment = {
|
environment = {
|
||||||
|
@ -5,13 +5,6 @@ with types;
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
# Converts a plan like
|
|
||||||
# { "1d" = "1h"; "1w" = "1d"; }
|
|
||||||
# into
|
|
||||||
# "1d=>1h,1w=>1d"
|
|
||||||
attrToPlan = attrs: concatStringsSep "," (builtins.attrValues (
|
|
||||||
mapAttrs (n: v: "${n}=>${v}") attrs));
|
|
||||||
|
|
||||||
planDescription = ''
|
planDescription = ''
|
||||||
The znapzend backup plan to use for the source.
|
The znapzend backup plan to use for the source.
|
||||||
</para>
|
</para>
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
{ config, lib, pkgs, ...}:
|
{ config, lib, pkgs, ...}:
|
||||||
let
|
|
||||||
cfg = config.services.hadoop;
|
|
||||||
hadoopConf = import ./conf.nix { hadoop = cfg; pkgs = pkgs; };
|
|
||||||
in
|
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
imports = [ ./yarn.nix ./hdfs.nix ];
|
imports = [ ./yarn.nix ./hdfs.nix ];
|
||||||
|
@ -10,8 +10,8 @@ in {
|
|||||||
|
|
||||||
rbac = mkOption {
|
rbac = mkOption {
|
||||||
description = "Role-based access control (RBAC) options";
|
description = "Role-based access control (RBAC) options";
|
||||||
|
default = {};
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
description = "Whether to enable role based access control is enabled for kubernetes dashboard";
|
description = "Whether to enable role based access control is enabled for kubernetes dashboard";
|
||||||
@ -24,7 +24,6 @@ in {
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -36,9 +36,6 @@ let
|
|||||||
})}
|
})}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
skipAttrs = attrs: map (filterAttrs (k: v: k != "enable"))
|
|
||||||
(filter (v: !(hasAttr "enable" v) || v.enable) attrs);
|
|
||||||
|
|
||||||
infraContainer = pkgs.dockerTools.buildImage {
|
infraContainer = pkgs.dockerTools.buildImage {
|
||||||
name = "pause";
|
name = "pause";
|
||||||
tag = "latest";
|
tag = "latest";
|
||||||
@ -1116,6 +1113,7 @@ in {
|
|||||||
wantedBy = [ "kubernetes.target" ];
|
wantedBy = [ "kubernetes.target" ];
|
||||||
after = [ "kube-apiserver.service" ];
|
after = [ "kube-apiserver.service" ];
|
||||||
environment.ADDON_PATH = "/etc/kubernetes/addons/";
|
environment.ADDON_PATH = "/etc/kubernetes/addons/";
|
||||||
|
path = [ pkgs.gawk ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Slice = "kubernetes.slice";
|
Slice = "kubernetes.slice";
|
||||||
ExecStart = "${cfg.package}/bin/kube-addons";
|
ExecStart = "${cfg.package}/bin/kube-addons";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.services.jenkinsSlave;
|
cfg = config.services.jenkinsSlave;
|
||||||
|
@ -15,7 +15,7 @@ let
|
|||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
bindingCfg = { config, ... }: {
|
bindingCfg = { ... }: {
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
keys = mkOption {
|
keys = mkOption {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
let kernel = config.boot.kernelPackages; in
|
let kernel = config.boot.kernelPackages; in
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ let
|
|||||||
|
|
||||||
etcFiles = pkgs.callPackage ./brscan4_etc_files.nix { netDevices = netDeviceList; };
|
etcFiles = pkgs.callPackage ./brscan4_etc_files.nix { netDevices = netDeviceList; };
|
||||||
|
|
||||||
netDeviceOpts = { name, config, ... }: {
|
netDeviceOpts = { name, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
|
@ -28,11 +28,14 @@ let
|
|||||||
# temperatures are read from the file.
|
# temperatures are read from the file.
|
||||||
#
|
#
|
||||||
# For example:
|
# For example:
|
||||||
# sensor /proc/acpi/ibm/thermal (0, 0, 10)
|
# tp_thermal /proc/acpi/ibm/thermal (0, 0, 10)
|
||||||
# will add a fixed value of 10 °C the 3rd value read from that file. Check out
|
# will add a fixed value of 10 °C the 3rd value read from that file. Check out
|
||||||
# http://www.thinkwiki.org/wiki/Thermal_Sensors to find out how much you may
|
# http://www.thinkwiki.org/wiki/Thermal_Sensors to find out how much you may
|
||||||
# want to add to certain temperatures.
|
# want to add to certain temperatures.
|
||||||
|
|
||||||
|
${cfg.fan}
|
||||||
|
${cfg.sensors}
|
||||||
|
|
||||||
# Syntax:
|
# Syntax:
|
||||||
# (LEVEL, LOW, HIGH)
|
# (LEVEL, LOW, HIGH)
|
||||||
# LEVEL is the fan level to use (0-7 with thinkpad_acpi)
|
# LEVEL is the fan level to use (0-7 with thinkpad_acpi)
|
||||||
@ -41,8 +44,6 @@ let
|
|||||||
# All numbers are integers.
|
# All numbers are integers.
|
||||||
#
|
#
|
||||||
|
|
||||||
sensor ${cfg.sensor} (0, 10, 15, 2, 10, 5, 0, 3, 0, 3)
|
|
||||||
|
|
||||||
${cfg.levels}
|
${cfg.levels}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -53,20 +54,52 @@ in {
|
|||||||
services.thinkfan = {
|
services.thinkfan = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable thinkfan, fan controller for IBM/Lenovo ThinkPads.
|
Whether to enable thinkfan, fan controller for IBM/Lenovo ThinkPads.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
sensor = mkOption {
|
sensors = mkOption {
|
||||||
default = "/proc/acpi/ibm/thermal";
|
type = types.lines;
|
||||||
|
default = ''
|
||||||
|
tp_thermal /proc/acpi/ibm/thermal (0,0,10)
|
||||||
|
'';
|
||||||
description =''
|
description =''
|
||||||
Sensor used by thinkfan
|
thinkfan can read temperatures from three possible sources:
|
||||||
|
|
||||||
|
/proc/acpi/ibm/thermal
|
||||||
|
Which is provided by the thinkpad_acpi kernel
|
||||||
|
module (keyword tp_thermal)
|
||||||
|
|
||||||
|
/sys/class/hwmon/*/temp*_input
|
||||||
|
Which may be provided by any hwmon drivers (keyword
|
||||||
|
hwmon)
|
||||||
|
|
||||||
|
S.M.A.R.T. (since 0.9 and requires the USE_ATASMART compilation flag)
|
||||||
|
Which reads the temperature directly from the hard
|
||||||
|
disk using libatasmart (keyword atasmart)
|
||||||
|
|
||||||
|
Multiple sensors may be added, in which case they will be
|
||||||
|
numbered in their order of appearance.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
fan = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "tp_fan /proc/acpi/ibm/fan";
|
||||||
|
description =''
|
||||||
|
Specifies the fan we want to use.
|
||||||
|
On anything other than a Thinkpad you'll probably
|
||||||
|
use some PWM control file in /sys/class/hwmon.
|
||||||
|
A sysfs fan would be specified like this:
|
||||||
|
pwm_fan /sys/class/hwmon/hwmon2/device/pwm1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
levels = mkOption {
|
levels = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = ''
|
default = ''
|
||||||
(0, 0, 55)
|
(0, 0, 55)
|
||||||
(1, 48, 60)
|
(1, 48, 60)
|
||||||
@ -76,8 +109,12 @@ in {
|
|||||||
(7, 60, 85)
|
(7, 60, 85)
|
||||||
(127, 80, 32767)
|
(127, 80, 32767)
|
||||||
'';
|
'';
|
||||||
description =''
|
description = ''
|
||||||
Sensor used by thinkfan
|
(LEVEL, LOW, HIGH)
|
||||||
|
LEVEL is the fan level to use (0-7 with thinkpad_acpi).
|
||||||
|
LOW is the temperature at which to step down to the previous level.
|
||||||
|
HIGH is the temperature at which to step up to the next level.
|
||||||
|
All numbers are integers.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4,8 +4,6 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
inherit (pkgs) stdenv writeText procps;
|
|
||||||
|
|
||||||
udev = config.systemd.package;
|
udev = config.systemd.package;
|
||||||
|
|
||||||
cfg = config.services.udev;
|
cfg = config.services.udev;
|
||||||
|
@ -65,7 +65,7 @@ in
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
# Trigger the udev rule manually. This doesn't require replugging the
|
# Trigger the udev rule manually. This doesn't require replugging the
|
||||||
# device when first enabling the option to get it to work
|
# device when first enabling the option to get it to work
|
||||||
ExecStartPre = "${pkgs.libudev}/bin/udevadm trigger -s usb -a idVendor=${apple}";
|
ExecStartPre = "${pkgs.udev}/bin/udevadm trigger -s usb -a idVendor=${apple}";
|
||||||
ExecStart = "${pkgs.usbmuxd}/bin/usbmuxd -U ${cfg.user} -f";
|
ExecStart = "${pkgs.usbmuxd}/bin/usbmuxd -U ${cfg.user} -f";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, services, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -9,8 +9,6 @@ let
|
|||||||
baseDir = "/run/dovecot2";
|
baseDir = "/run/dovecot2";
|
||||||
stateDir = "/var/lib/dovecot";
|
stateDir = "/var/lib/dovecot";
|
||||||
|
|
||||||
canCreateMailUserGroup = cfg.mailUser != null && cfg.mailGroup != null;
|
|
||||||
|
|
||||||
dovecotConf = concatStrings [
|
dovecotConf = concatStrings [
|
||||||
''
|
''
|
||||||
base_dir = ${baseDir}
|
base_dir = ${baseDir}
|
||||||
@ -112,7 +110,7 @@ let
|
|||||||
special_use = \${toString mailbox.specialUse}
|
special_use = \${toString mailbox.specialUse}
|
||||||
'' + "}";
|
'' + "}";
|
||||||
|
|
||||||
mailboxes = { lib, pkgs, ... }: {
|
mailboxes = { ... }: {
|
||||||
options = {
|
options = {
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
type = types.strMatching ''[^"]+'';
|
type = types.strMatching ''[^"]+'';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -7,16 +7,6 @@ let
|
|||||||
|
|
||||||
cfg = config.services.disnix;
|
cfg = config.services.disnix;
|
||||||
|
|
||||||
dysnomia = pkgs.dysnomia.override (origArgs: {
|
|
||||||
enableApacheWebApplication = config.services.httpd.enable;
|
|
||||||
enableAxis2WebService = config.services.tomcat.axis2.enable;
|
|
||||||
enableEjabberdDump = config.services.ejabberd.enable;
|
|
||||||
enableMySQLDatabase = config.services.mysql.enable;
|
|
||||||
enablePostgreSQLDatabase = config.services.postgresql.enable;
|
|
||||||
enableSubversionRepository = config.services.svnserve.enable;
|
|
||||||
enableTomcatWebApplication = config.services.tomcat.enable;
|
|
||||||
enableMongoDatabase = config.services.mongodb.enable;
|
|
||||||
});
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -5,43 +5,6 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.dockerRegistry;
|
cfg = config.services.dockerRegistry;
|
||||||
|
|
||||||
blobCache = if cfg.enableRedisCache
|
|
||||||
then "redis"
|
|
||||||
else "inmemory";
|
|
||||||
|
|
||||||
registryConfig = {
|
|
||||||
version = "0.1";
|
|
||||||
log.fields.service = "registry";
|
|
||||||
storage = {
|
|
||||||
cache.blobdescriptor = blobCache;
|
|
||||||
filesystem.rootdirectory = cfg.storagePath;
|
|
||||||
delete.enabled = cfg.enableDelete;
|
|
||||||
};
|
|
||||||
http = {
|
|
||||||
addr = ":${builtins.toString cfg.port}";
|
|
||||||
headers.X-Content-Type-Options = ["nosniff"];
|
|
||||||
};
|
|
||||||
health.storagedriver = {
|
|
||||||
enabled = true;
|
|
||||||
interval = "10s";
|
|
||||||
threshold = 3;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
registryConfig.redis = mkIf cfg.enableRedisCache {
|
|
||||||
addr = "${cfg.redisUrl}";
|
|
||||||
password = "${cfg.redisPassword}";
|
|
||||||
db = 0;
|
|
||||||
dialtimeout = "10ms";
|
|
||||||
readtimeout = "10ms";
|
|
||||||
writetimeout = "10ms";
|
|
||||||
pool = {
|
|
||||||
maxidle = 16;
|
|
||||||
maxactive = 64;
|
|
||||||
idletimeout = "300s";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
configFile = pkgs.writeText "docker-registry-config.yml" (builtins.toJSON (recursiveUpdate registryConfig cfg.extraConfig));
|
configFile = pkgs.writeText "docker-registry-config.yml" (builtins.toJSON (recursiveUpdate registryConfig cfg.extraConfig));
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
@ -62,9 +62,6 @@ let
|
|||||||
cd $out
|
cd $out
|
||||||
|
|
||||||
${concatMapStrings (containerName:
|
${concatMapStrings (containerName:
|
||||||
let
|
|
||||||
components = cfg.components."${containerName}";
|
|
||||||
in
|
|
||||||
linkMutableComponents { inherit containerName; }
|
linkMutableComponents { inherit containerName; }
|
||||||
) (builtins.attrNames cfg.components)}
|
) (builtins.attrNames cfg.components)}
|
||||||
'';
|
'';
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
{ config, pkgs, lib, mono, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.emby;
|
cfg = config.services.emby;
|
||||||
emby = pkgs.emby;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
@ -4,7 +4,6 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.exhibitor;
|
cfg = config.services.exhibitor;
|
||||||
exhibitor = cfg.package;
|
|
||||||
exhibitorConfig = ''
|
exhibitorConfig = ''
|
||||||
zookeeper-install-directory=${cfg.baseDir}/zookeeper
|
zookeeper-install-directory=${cfg.baseDir}/zookeeper
|
||||||
zookeeper-data-directory=${cfg.zkDataDir}
|
zookeeper-data-directory=${cfg.zkDataDir}
|
||||||
|
@ -37,7 +37,7 @@ let
|
|||||||
# List of components used in config
|
# List of components used in config
|
||||||
extraComponents = filter useComponent availableComponents;
|
extraComponents = filter useComponent availableComponents;
|
||||||
|
|
||||||
package = if cfg.autoExtraComponents
|
package = if (cfg.autoExtraComponents && cfg.config != null)
|
||||||
then (cfg.package.override { inherit extraComponents; })
|
then (cfg.package.override { inherit extraComponents; })
|
||||||
else cfg.package;
|
else cfg.package;
|
||||||
|
|
||||||
@ -110,7 +110,9 @@ in {
|
|||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Home Assistant package to use.
|
Home Assistant package to use.
|
||||||
Override <literal>extraPackages</literal> in order to add additional dependencies.
|
Override <literal>extraPackages</literal> or <literal>extraComponents</literal> in order to add additional dependencies.
|
||||||
|
If you specify <option>config</option> and do not set <option>autoExtraComponents</option>
|
||||||
|
to <literal>false</literal>, overriding <literal>extraComponents</literal> will have no effect.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, mono, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... } @ args:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
uid = config.ids.uids.mediatomb;
|
|
||||||
gid = config.ids.gids.mediatomb;
|
gid = config.ids.gids.mediatomb;
|
||||||
cfg = config.services.mediatomb;
|
cfg = config.services.mediatomb;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user