Merge master into staging-next
This commit is contained in:
commit
c2eac6741b
@ -16,6 +16,7 @@
|
|||||||
<xi:include href="functions/fhs-environments.xml" />
|
<xi:include href="functions/fhs-environments.xml" />
|
||||||
<xi:include href="functions/shell.xml" />
|
<xi:include href="functions/shell.xml" />
|
||||||
<xi:include href="functions/dockertools.xml" />
|
<xi:include href="functions/dockertools.xml" />
|
||||||
|
<xi:include href="functions/appimagetools.xml" />
|
||||||
<xi:include href="functions/prefer-remote-fetch.xml" />
|
<xi:include href="functions/prefer-remote-fetch.xml" />
|
||||||
<xi:include href="functions/nix-gitignore.xml" />
|
<xi:include href="functions/nix-gitignore.xml" />
|
||||||
</chapter>
|
</chapter>
|
||||||
|
121
doc/functions/appimagetools.xml
Normal file
121
doc/functions/appimagetools.xml
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
<section xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
|
xml:id="sec-pkgs-appimageTools">
|
||||||
|
<title>pkgs.appimageTools</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<varname>pkgs.appimageTools</varname> is a set of functions for extracting and wrapping
|
||||||
|
<link xlink:href="https://appimage.org/">AppImage</link> files.
|
||||||
|
|
||||||
|
They are meant to be used if traditional packaging from source is infeasible, or it would take too long.
|
||||||
|
To quickly run an AppImage file, <literal>pkgs.appimage-run</literal> can be used as well.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<warning>
|
||||||
|
<para>
|
||||||
|
The <varname>appimageTools</varname> API is unstable and may be subject to
|
||||||
|
backwards-incompatible changes in the future.
|
||||||
|
</para>
|
||||||
|
</warning>
|
||||||
|
|
||||||
|
|
||||||
|
<section xml:id="ssec-pkgs-appimageTools-formats">
|
||||||
|
<title>AppImage formats</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
There are different formats for AppImages, see
|
||||||
|
<link xlink:href="https://github.com/AppImage/AppImageSpec/blob/74ad9ca2f94bf864a4a0dac1f369dd4f00bd1c28/draft.md#image-format">the specification</link> for details.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Type 1 images are ISO 9660 files that are also ELF executables.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Type 2 images are ELF executables with an appended filesystem.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
They can be told apart with <command>file -k</command>:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<screen>
|
||||||
|
<prompt>$ </prompt>file -k type1.AppImage
|
||||||
|
type1.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) ISO 9660 CD-ROM filesystem data 'AppImage' (Lepton 3.x), scale 0-0,
|
||||||
|
spot sensor temperature 0.000000, unit celsius, color scheme 0, calibration: offset 0.000000, slope 0.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=d629f6099d2344ad82818172add1d38c5e11bc6d, stripped\012- data
|
||||||
|
|
||||||
|
<prompt>$ </prompt>file -k type2.AppImage
|
||||||
|
type2.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) (Lepton 3.x), scale 232-60668, spot sensor temperature -4.187500, color scheme 15, show scale bar, calibration: offset -0.000000, slope 0.000000 (Lepton 2.x), scale 4111-45000, spot sensor temperature 412442.250000, color scheme 3, minimum point enabled, calibration: offset -75402534979642766821519867692934234112.000000, slope 5815371847733706829839455140374904832.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79dcc4e55a61c293c5e19edbd8d65b202842579f, stripped\012- data
|
||||||
|
</screen>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Note how the type 1 AppImage is described as an <literal>ISO 9660 CD-ROM filesystem</literal>, and the type 2 AppImage is not.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section xml:id="ssec-pkgs-appimageTools-wrapping">
|
||||||
|
<title>Wrapping</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Depending on the type of AppImage you're wrapping, you'll have to use
|
||||||
|
<varname>wrapType1</varname> or <varname>wrapType2</varname>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
appimageTools.wrapType2 { # or wrapType1
|
||||||
|
name = "patchwork"; <co xml:id='ex-appimageTools-wrapping-1' />
|
||||||
|
src = fetchurl { <co xml:id='ex-appimageTools-wrapping-2' />
|
||||||
|
url = https://github.com/ssbc/patchwork/releases/download/v3.11.4/Patchwork-3.11.4-linux-x86_64.AppImage;
|
||||||
|
sha256 = "1blsprpkvm0ws9b96gb36f0rbf8f5jgmw4x6dsb1kswr4ysf591s";
|
||||||
|
};
|
||||||
|
extraPkgs = pkgs: with pkgs; [ ]; <co xml:id='ex-appimageTools-wrapping-3' />
|
||||||
|
}</programlisting>
|
||||||
|
|
||||||
|
|
||||||
|
<calloutlist>
|
||||||
|
<callout arearefs='ex-appimageTools-wrapping-1'>
|
||||||
|
<para>
|
||||||
|
<varname>name</varname> specifies the name of the resulting image.
|
||||||
|
</para>
|
||||||
|
</callout>
|
||||||
|
<callout arearefs='ex-appimageTools-wrapping-2'>
|
||||||
|
<para>
|
||||||
|
<varname>src</varname> specifies the AppImage file to extract.
|
||||||
|
</para>
|
||||||
|
</callout>
|
||||||
|
<callout arearefs='ex-appimageTools-wrapping-2'>
|
||||||
|
<para>
|
||||||
|
<varname>extraPkgs</varname> allows you to pass a function to include additional packages
|
||||||
|
inside the FHS environment your AppImage is going to run in.
|
||||||
|
|
||||||
|
There are a few ways to learn which dependencies an application needs:
|
||||||
|
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Looking through the extracted AppImage files, reading its scripts and running <command>patchelf</command> and <command>ldd</command> on its executables.
|
||||||
|
This can also be done in <command>appimage-run</command>, by setting <command>APPIMAGE_DEBUG_EXEC=bash</command>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Running <command>strace -vfefile</command> on the wrapped executable, looking for libraries that can't be found.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
</callout>
|
||||||
|
</calloutlist>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</section>
|
@ -109,7 +109,7 @@ let
|
|||||||
mkFixStrictness mkOrder mkBefore mkAfter mkAliasDefinitions
|
mkFixStrictness mkOrder mkBefore mkAfter mkAliasDefinitions
|
||||||
mkAliasAndWrapDefinitions fixMergeModules mkRemovedOptionModule
|
mkAliasAndWrapDefinitions fixMergeModules mkRemovedOptionModule
|
||||||
mkRenamedOptionModule mkMergedOptionModule mkChangedOptionModule
|
mkRenamedOptionModule mkMergedOptionModule mkChangedOptionModule
|
||||||
mkAliasOptionModule mkAliasOptionModuleWithPriority doRename filterModules;
|
mkAliasOptionModule doRename filterModules;
|
||||||
inherit (options) isOption mkEnableOption mkSinkUndeclaredOptions
|
inherit (options) isOption mkEnableOption mkSinkUndeclaredOptions
|
||||||
mergeDefaultOption mergeOneOption mergeEqualOption getValues
|
mergeDefaultOption mergeOneOption mergeEqualOption getValues
|
||||||
getFiles optionAttrSetToDocList optionAttrSetToDocList'
|
getFiles optionAttrSetToDocList optionAttrSetToDocList'
|
||||||
|
@ -596,6 +596,9 @@ rec {
|
|||||||
|
|
||||||
forwards any definitions of boot.copyKernels to
|
forwards any definitions of boot.copyKernels to
|
||||||
boot.loader.grub.copyKernels while printing a warning.
|
boot.loader.grub.copyKernels while printing a warning.
|
||||||
|
|
||||||
|
This also copies over the priority from the aliased option to the
|
||||||
|
non-aliased option.
|
||||||
*/
|
*/
|
||||||
mkRenamedOptionModule = from: to: doRename {
|
mkRenamedOptionModule = from: to: doRename {
|
||||||
inherit from to;
|
inherit from to;
|
||||||
@ -690,16 +693,7 @@ rec {
|
|||||||
use = id;
|
use = id;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Like ‘mkAliasOptionModule’, but copy over the priority of the option as well. */
|
doRename = { from, to, visible, warn, use, withPriority ? true }:
|
||||||
mkAliasOptionModuleWithPriority = from: to: doRename {
|
|
||||||
inherit from to;
|
|
||||||
visible = true;
|
|
||||||
warn = false;
|
|
||||||
use = id;
|
|
||||||
withPriority = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
doRename = { from, to, visible, warn, use, withPriority ? false }:
|
|
||||||
{ config, options, ... }:
|
{ config, options, ... }:
|
||||||
let
|
let
|
||||||
fromOpt = getAttrFromPath from options;
|
fromOpt = getAttrFromPath from options;
|
||||||
|
@ -149,7 +149,7 @@ checkConfigOutput "1 2 3 4 5 6 7 8 9 10" config.result ./loaOf-with-long-list.ni
|
|||||||
# Check loaOf with many merges of lists.
|
# Check loaOf with many merges of lists.
|
||||||
checkConfigOutput "1 2 3 4 5 6 7 8 9 10" config.result ./loaOf-with-many-list-merges.nix
|
checkConfigOutput "1 2 3 4 5 6 7 8 9 10" config.result ./loaOf-with-many-list-merges.nix
|
||||||
|
|
||||||
# Check mkAliasOptionModuleWithPriority.
|
# Check mkAliasOptionModule.
|
||||||
checkConfigOutput "true" config.enable ./alias-with-priority.nix
|
checkConfigOutput "true" config.enable ./alias-with-priority.nix
|
||||||
checkConfigOutput "true" config.enableAlias ./alias-with-priority.nix
|
checkConfigOutput "true" config.enableAlias ./alias-with-priority.nix
|
||||||
checkConfigOutput "false" config.enable ./alias-with-priority-can-override.nix
|
checkConfigOutput "false" config.enable ./alias-with-priority-can-override.nix
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
# This is a test to show that mkAliasOptionModule sets the priority correctly
|
# This is a test to show that mkAliasOptionModule sets the priority correctly
|
||||||
# for aliased options.
|
# for aliased options.
|
||||||
|
#
|
||||||
|
# This test shows that an alias with a high priority is able to override
|
||||||
|
# a non-aliased option.
|
||||||
|
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
@ -32,10 +35,10 @@ with lib;
|
|||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
# Create an alias for the "enable" option.
|
# Create an alias for the "enable" option.
|
||||||
(mkAliasOptionModuleWithPriority [ "enableAlias" ] [ "enable" ])
|
(mkAliasOptionModule [ "enableAlias" ] [ "enable" ])
|
||||||
|
|
||||||
# Disable the aliased option, but with a default (low) priority so it
|
# Disable the aliased option with a high priority so it
|
||||||
# should be able to be overridden by the next import.
|
# should override the next import.
|
||||||
( { config, lib, ... }:
|
( { config, lib, ... }:
|
||||||
{
|
{
|
||||||
enableAlias = lib.mkForce false;
|
enableAlias = lib.mkForce false;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
# This is a test to show that mkAliasOptionModule sets the priority correctly
|
# This is a test to show that mkAliasOptionModule sets the priority correctly
|
||||||
# for aliased options.
|
# for aliased options.
|
||||||
|
#
|
||||||
|
# This test shows that an alias with a low priority is able to be overridden
|
||||||
|
# with a non-aliased option.
|
||||||
|
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
@ -32,7 +35,7 @@ with lib;
|
|||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
# Create an alias for the "enable" option.
|
# Create an alias for the "enable" option.
|
||||||
(mkAliasOptionModuleWithPriority [ "enableAlias" ] [ "enable" ])
|
(mkAliasOptionModule [ "enableAlias" ] [ "enable" ])
|
||||||
|
|
||||||
# Disable the aliased option, but with a default (low) priority so it
|
# Disable the aliased option, but with a default (low) priority so it
|
||||||
# should be able to be overridden by the next import.
|
# should be able to be overridden by the next import.
|
||||||
|
@ -4313,6 +4313,15 @@
|
|||||||
github = "sleexyz";
|
github = "sleexyz";
|
||||||
name = "Sean Lee";
|
name = "Sean Lee";
|
||||||
};
|
};
|
||||||
|
smakarov = {
|
||||||
|
email = "setser200018@gmail.com";
|
||||||
|
github = "setser";
|
||||||
|
name = "Sergey Makarov";
|
||||||
|
keys = [{
|
||||||
|
longkeyid = "rsa2048/6AA23A1193B7064B";
|
||||||
|
fingerprint = "6F8A 18AE 4101 103F 3C54 24B9 6AA2 3A11 93B7 064B";
|
||||||
|
}];
|
||||||
|
};
|
||||||
smaret = {
|
smaret = {
|
||||||
email = "sebastien.maret@icloud.com";
|
email = "sebastien.maret@icloud.com";
|
||||||
github = "smaret";
|
github = "smaret";
|
||||||
|
@ -54,6 +54,8 @@
|
|||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
<para>to <literal>false</literal> and enable your preferred display manager.</para>
|
<para>to <literal>false</literal> and enable your preferred display manager.</para>
|
||||||
</note>
|
</note>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
A major refactoring of the Kubernetes module has been completed.
|
A major refactoring of the Kubernetes module has been completed.
|
||||||
Refactorings primarily focus on decoupling components and enhancing
|
Refactorings primarily focus on decoupling components and enhancing
|
||||||
@ -96,6 +98,13 @@
|
|||||||
<literal>./services/misc/beanstalkd.nix</literal>
|
<literal>./services/misc/beanstalkd.nix</literal>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
There is a new <varname>services.cockroachdb</varname> module for running
|
||||||
|
CockroachDB databases. NixOS now ships with CockroachDB 2.1.x as well, available
|
||||||
|
on <literal>x86_64-linux</literal> and <literal>aarch64-linux</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -644,6 +653,7 @@
|
|||||||
<link linkend="opt-services.xserver.videoDrivers">X.org video drivers</link>.
|
<link linkend="opt-services.xserver.videoDrivers">X.org video drivers</link>.
|
||||||
The <literal>modesetting</literal> driver should take over automatically,
|
The <literal>modesetting</literal> driver should take over automatically,
|
||||||
it is better maintained upstream and has less problems with advanced X11 features.
|
it is better maintained upstream and has less problems with advanced X11 features.
|
||||||
|
This can lead to a change in the output names used by <literal>xrandr</literal>.
|
||||||
Some performance regressions on some GPU models might happen.
|
Some performance regressions on some GPU models might happen.
|
||||||
Some OpenCL and VA-API applications might also break
|
Some OpenCL and VA-API applications might also break
|
||||||
(Beignet seems to provide OpenCL support with
|
(Beignet seems to provide OpenCL support with
|
||||||
|
@ -55,7 +55,9 @@ let
|
|||||||
localConf = pkgs.writeText "fc-local.conf" cfg.localConf;
|
localConf = pkgs.writeText "fc-local.conf" cfg.localConf;
|
||||||
|
|
||||||
# The configuration to be included in /etc/font/
|
# The configuration to be included in /etc/font/
|
||||||
penultimateConf = pkgs.runCommand "font-penultimate-conf" {} ''
|
penultimateConf = pkgs.runCommand "font-penultimate-conf" {
|
||||||
|
preferLocalBuild = true;
|
||||||
|
} ''
|
||||||
support_folder=$out/etc/fonts/conf.d
|
support_folder=$out/etc/fonts/conf.d
|
||||||
latest_folder=$out/etc/fonts/${latestVersion}/conf.d
|
latest_folder=$out/etc/fonts/${latestVersion}/conf.d
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ let cfg = config.fonts.fontconfig.ultimate;
|
|||||||
latestVersion = pkgs.fontconfig.configVersion;
|
latestVersion = pkgs.fontconfig.configVersion;
|
||||||
|
|
||||||
# The configuration to be included in /etc/font/
|
# The configuration to be included in /etc/font/
|
||||||
confPkg = pkgs.runCommand "font-ultimate-conf" {} ''
|
confPkg = pkgs.runCommand "font-ultimate-conf" { preferLocalBuild = true; } ''
|
||||||
support_folder=$out/etc/fonts/conf.d
|
support_folder=$out/etc/fonts/conf.d
|
||||||
latest_folder=$out/etc/fonts/${latestVersion}/conf.d
|
latest_folder=$out/etc/fonts/${latestVersion}/conf.d
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ let cfg = config.fonts.fontconfig;
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
# fontconfig configuration package
|
# fontconfig configuration package
|
||||||
confPkg = pkgs.runCommand "fontconfig-conf" {} ''
|
confPkg = pkgs.runCommand "fontconfig-conf" { preferLocalBuild = true; } ''
|
||||||
support_folder=$out/etc/fonts
|
support_folder=$out/etc/fonts
|
||||||
latest_folder=$out/etc/fonts/${latestVersion}
|
latest_folder=$out/etc/fonts/${latestVersion}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
x11Fonts = pkgs.runCommand "X11-fonts" { } ''
|
x11Fonts = pkgs.runCommand "X11-fonts" { preferLocalBuild = true; } ''
|
||||||
mkdir -p "$out/share/X11-fonts"
|
mkdir -p "$out/share/X11-fonts"
|
||||||
find ${toString config.fonts.fonts} \
|
find ${toString config.fonts.fonts} \
|
||||||
\( -name fonts.dir -o -name '*.ttf' -o -name '*.otf' \) \
|
\( -name fonts.dir -o -name '*.ttf' -o -name '*.otf' \) \
|
||||||
|
@ -61,6 +61,15 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
system.nssHosts = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [];
|
||||||
|
example = [ "mdns" ];
|
||||||
|
description = ''
|
||||||
|
List of host entries to configure in <filename>/etc/nsswitch.conf</filename>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@ -85,7 +94,7 @@ in {
|
|||||||
group: ${concatStringsSep " " passwdArray}
|
group: ${concatStringsSep " " passwdArray}
|
||||||
shadow: ${concatStringsSep " " shadowArray}
|
shadow: ${concatStringsSep " " shadowArray}
|
||||||
|
|
||||||
hosts: ${concatStringsSep " " hostArray}
|
hosts: ${concatStringsSep " " config.system.nssHosts}
|
||||||
networks: files
|
networks: files
|
||||||
|
|
||||||
ethers: files
|
ethers: files
|
||||||
@ -94,6 +103,8 @@ in {
|
|||||||
rpc: files
|
rpc: files
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
system.nssHosts = hostArray;
|
||||||
|
|
||||||
# Systemd provides nss-myhostname to ensure that our hostname
|
# Systemd provides nss-myhostname to ensure that our hostname
|
||||||
# always resolves to a valid IP address. It returns all locally
|
# always resolves to a valid IP address. It returns all locally
|
||||||
# configured IP addresses, or ::1 and 127.0.0.2 as
|
# configured IP addresses, or ::1 and 127.0.0.2 as
|
||||||
|
24
nixos/modules/hardware/acpilight.nix
Normal file
24
nixos/modules/hardware/acpilight.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.hardware.acpilight;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
hardware.acpilight = {
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
|
Enable acpilight.
|
||||||
|
This will allow brightness control via xbacklight from users in the video group
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.udev.packages = with pkgs; [ acpilight ];
|
||||||
|
};
|
||||||
|
}
|
14
nixos/modules/hardware/ledger.nix
Normal file
14
nixos/modules/hardware/ledger.nix
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.hardware.ledger;
|
||||||
|
|
||||||
|
in {
|
||||||
|
options.hardware.ledger.enable = mkEnableOption "udev rules for Ledger devices";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.udev.packages = [ pkgs.ledger-udev-rules ];
|
||||||
|
};
|
||||||
|
}
|
@ -29,6 +29,7 @@ runCommand "uvcdynctrl-udev-rules-${version}"
|
|||||||
];
|
];
|
||||||
dontPatchELF = true;
|
dontPatchELF = true;
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
|
preferLocalBuild = true;
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
mkdir -p "$out/lib/udev"
|
mkdir -p "$out/lib/udev"
|
||||||
|
@ -13,7 +13,7 @@ let
|
|||||||
# user, as expected by nixos-rebuild/nixos-install. FIXME: merge
|
# user, as expected by nixos-rebuild/nixos-install. FIXME: merge
|
||||||
# with make-channel.nix.
|
# with make-channel.nix.
|
||||||
channelSources = pkgs.runCommand "nixos-${config.system.nixos.version}"
|
channelSources = pkgs.runCommand "nixos-${config.system.nixos.version}"
|
||||||
{ }
|
{ preferLocalBuild = true; }
|
||||||
''
|
''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp -prd ${nixpkgs.outPath} $out/nixos
|
cp -prd ${nixpkgs.outPath} $out/nixos
|
||||||
|
@ -31,6 +31,10 @@ with lib;
|
|||||||
# there is no power management backend such as upower).
|
# there is no power management backend such as upower).
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
|
|
||||||
|
# Enable sound in graphical iso's.
|
||||||
|
hardware.pulseaudio.enable = true;
|
||||||
|
hardware.pulseaudio.systemWide = true; # Needed since we run plasma as root.
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
# Include gparted for partitioning disks.
|
# Include gparted for partitioning disks.
|
||||||
pkgs.gparted
|
pkgs.gparted
|
||||||
|
@ -272,7 +272,7 @@
|
|||||||
nzbget = 245;
|
nzbget = 245;
|
||||||
mosquitto = 246;
|
mosquitto = 246;
|
||||||
toxvpn = 247;
|
toxvpn = 247;
|
||||||
squeezelite = 248;
|
# squeezelite = 248; # DynamicUser = true
|
||||||
turnserver = 249;
|
turnserver = 249;
|
||||||
smokeping = 250;
|
smokeping = 250;
|
||||||
gocd-agent = 251;
|
gocd-agent = 251;
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
./hardware/digitalbitbox.nix
|
./hardware/digitalbitbox.nix
|
||||||
./hardware/sensor/iio.nix
|
./hardware/sensor/iio.nix
|
||||||
./hardware/ksm.nix
|
./hardware/ksm.nix
|
||||||
|
./hardware/ledger.nix
|
||||||
./hardware/mcelog.nix
|
./hardware/mcelog.nix
|
||||||
./hardware/network/b43.nix
|
./hardware/network/b43.nix
|
||||||
./hardware/nitrokey.nix
|
./hardware/nitrokey.nix
|
||||||
|
@ -14,5 +14,9 @@
|
|||||||
libinput.enable = true; # for touchpad support on many laptops
|
libinput.enable = true; # for touchpad support on many laptops
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Enable sound in virtualbox appliances.
|
||||||
|
hardware.pulseaudio.enable = true;
|
||||||
|
hardware.pulseaudio.systemWide = true; # Needed since we run plasma as root.
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.glxinfo pkgs.firefox ];
|
environment.systemPackages = [ pkgs.glxinfo pkgs.firefox ];
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
lessKey = pkgs.runCommand "lesskey"
|
lessKey = pkgs.runCommand "lesskey"
|
||||||
{ src = pkgs.writeText "lessconfig" configText; }
|
{ src = pkgs.writeText "lessconfig" configText; preferLocalBuild = true; }
|
||||||
"${pkgs.less}/bin/lesskey -o $out $src";
|
"${pkgs.less}/bin/lesskey -o $out $src";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
@ -14,6 +14,7 @@ let
|
|||||||
{ files =
|
{ files =
|
||||||
cfg.certificateFiles ++
|
cfg.certificateFiles ++
|
||||||
[ (builtins.toFile "extra.crt" (concatStringsSep "\n" cfg.certificates)) ];
|
[ (builtins.toFile "extra.crt" (concatStringsSep "\n" cfg.certificates)) ];
|
||||||
|
preferLocalBuild = true;
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
cat $files > $out
|
cat $files > $out
|
||||||
|
@ -215,7 +215,10 @@ in
|
|||||||
environment.etc = singleton
|
environment.etc = singleton
|
||||||
{ source =
|
{ source =
|
||||||
pkgs.runCommand "sudoers"
|
pkgs.runCommand "sudoers"
|
||||||
{ src = pkgs.writeText "sudoers-in" cfg.configFile; }
|
{
|
||||||
|
src = pkgs.writeText "sudoers-in" cfg.configFile;
|
||||||
|
preferLocalBuild = true;
|
||||||
|
}
|
||||||
# Make sure that the sudoers file is syntactically valid.
|
# Make sure that the sudoers file is syntactically valid.
|
||||||
# (currently disabled - NIXOS-66)
|
# (currently disabled - NIXOS-66)
|
||||||
"${pkgs.buildPackages.sudo}/sbin/visudo -f $src -c && cp $src $out";
|
"${pkgs.buildPackages.sudo}/sbin/visudo -f $src -c && cp $src $out";
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
dataDir = "/var/lib/squeezelite";
|
||||||
uid = config.ids.uids.squeezelite;
|
|
||||||
cfg = config.services.squeezelite;
|
cfg = config.services.squeezelite;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
@ -17,14 +16,6 @@ in {
|
|||||||
|
|
||||||
enable = mkEnableOption "Squeezelite, a software Squeezebox emulator";
|
enable = mkEnableOption "Squeezelite, a software Squeezebox emulator";
|
||||||
|
|
||||||
dataDir = mkOption {
|
|
||||||
default = "/var/lib/squeezelite";
|
|
||||||
type = types.str;
|
|
||||||
description = ''
|
|
||||||
The directory where Squeezelite stores its name file.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
extraArguments = mkOption {
|
extraArguments = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
@ -46,22 +37,14 @@ in {
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" "sound.target" ];
|
after = [ "network.target" "sound.target" ];
|
||||||
description = "Software Squeezebox emulator";
|
description = "Software Squeezebox emulator";
|
||||||
preStart = "mkdir -p ${cfg.dataDir} && chown -R squeezelite ${cfg.dataDir}";
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.squeezelite}/bin/squeezelite -N ${cfg.dataDir}/player-name ${cfg.extraArguments}";
|
DynamicUser = true;
|
||||||
User = "squeezelite";
|
ExecStart = "${pkgs.squeezelite}/bin/squeezelite -N ${dataDir}/player-name ${cfg.extraArguments}";
|
||||||
PermissionsStartOnly = true;
|
StateDirectory = builtins.baseNameOf dataDir;
|
||||||
|
SupplementaryGroups = "audio";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.squeezelite= {
|
|
||||||
inherit uid;
|
|
||||||
group = "nogroup";
|
|
||||||
extraGroups = [ "audio" ];
|
|
||||||
description = "Squeezelite user";
|
|
||||||
home = "${cfg.dataDir}";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ let
|
|||||||
EOF
|
EOF
|
||||||
chmod 755 $out/${name}
|
chmod 755 $out/${name}
|
||||||
'';
|
'';
|
||||||
in pkgs.runCommand "buildkite-agent-hooks" {} ''
|
in pkgs.runCommand "buildkite-agent-hooks" { preferLocalBuild = true; } ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
${concatStringsSep "\n" (mapAttrsToList mkHookEntry (filterAttrs (n: v: v != null) cfg.hooks))}
|
${concatStringsSep "\n" (mapAttrsToList mkHookEntry (filterAttrs (n: v: v != null) cfg.hooks))}
|
||||||
'';
|
'';
|
||||||
|
@ -8,6 +8,7 @@ let
|
|||||||
if (cfg.configFile == null) then
|
if (cfg.configFile == null) then
|
||||||
(pkgs.runCommand "config.toml" {
|
(pkgs.runCommand "config.toml" {
|
||||||
buildInputs = [ pkgs.remarshal ];
|
buildInputs = [ pkgs.remarshal ];
|
||||||
|
preferLocalBuild = true;
|
||||||
} ''
|
} ''
|
||||||
remarshal -if json -of toml \
|
remarshal -if json -of toml \
|
||||||
< ${pkgs.writeText "config.json" (builtins.toJSON cfg.configOptions)} \
|
< ${pkgs.writeText "config.json" (builtins.toJSON cfg.configOptions)} \
|
||||||
|
@ -18,7 +18,7 @@ let
|
|||||||
</configuration>
|
</configuration>
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configDir = pkgs.runCommand "hbase-config-dir" {} ''
|
configDir = pkgs.runCommand "hbase-config-dir" { preferLocalBuild = true; } ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp ${cfg.package}/conf/* $out/
|
cp ${cfg.package}/conf/* $out/
|
||||||
rm $out/hbase-site.xml
|
rm $out/hbase-site.xml
|
||||||
|
@ -98,6 +98,7 @@ let
|
|||||||
|
|
||||||
configFile = pkgs.runCommand "config.toml" {
|
configFile = pkgs.runCommand "config.toml" {
|
||||||
buildInputs = [ pkgs.remarshal ];
|
buildInputs = [ pkgs.remarshal ];
|
||||||
|
preferLocalBuild = true;
|
||||||
} ''
|
} ''
|
||||||
remarshal -if json -of toml \
|
remarshal -if json -of toml \
|
||||||
< ${pkgs.writeText "config.json" (builtins.toJSON configOptions)} \
|
< ${pkgs.writeText "config.json" (builtins.toJSON configOptions)} \
|
||||||
|
@ -21,7 +21,7 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
acpiConfDir = pkgs.runCommand "acpi-events" {}
|
acpiConfDir = pkgs.runCommand "acpi-events" { preferLocalBuild = true; }
|
||||||
''
|
''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
${
|
${
|
||||||
|
@ -17,6 +17,7 @@ tlp = pkgs.tlp.override {
|
|||||||
confFile = pkgs.runCommand "tlp"
|
confFile = pkgs.runCommand "tlp"
|
||||||
{ config = cfg.extraConfig;
|
{ config = cfg.extraConfig;
|
||||||
passAsFile = [ "config" ];
|
passAsFile = [ "config" ];
|
||||||
|
preferLocalBuild = true;
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
cat ${tlp}/etc/default/tlp > $out
|
cat ${tlp}/etc/default/tlp > $out
|
||||||
|
@ -5,7 +5,7 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.logcheck;
|
cfg = config.services.logcheck;
|
||||||
|
|
||||||
defaultRules = pkgs.runCommand "logcheck-default-rules" {} ''
|
defaultRules = pkgs.runCommand "logcheck-default-rules" { preferLocalBuild = true; } ''
|
||||||
cp -prd ${pkgs.logcheck}/etc/logcheck $out
|
cp -prd ${pkgs.logcheck}/etc/logcheck $out
|
||||||
chmod u+w $out
|
chmod u+w $out
|
||||||
rm -r $out/logcheck.*
|
rm -r $out/logcheck.*
|
||||||
|
@ -27,7 +27,10 @@ let
|
|||||||
|
|
||||||
logstashSettingsYml = pkgs.writeText "logstash.yml" cfg.extraSettings;
|
logstashSettingsYml = pkgs.writeText "logstash.yml" cfg.extraSettings;
|
||||||
|
|
||||||
logstashSettingsDir = pkgs.runCommand "logstash-settings" {inherit logstashSettingsYml;} ''
|
logstashSettingsDir = pkgs.runCommand "logstash-settings" {
|
||||||
|
inherit logstashSettingsYml;
|
||||||
|
preferLocalBuild = true;
|
||||||
|
} ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
ln -s $logstashSettingsYml $out/logstash.yml
|
ln -s $logstashSettingsYml $out/logstash.yml
|
||||||
'';
|
'';
|
||||||
|
@ -8,7 +8,7 @@ let
|
|||||||
conf = pkgs.writeText "smtpd.conf" cfg.serverConfiguration;
|
conf = pkgs.writeText "smtpd.conf" cfg.serverConfiguration;
|
||||||
args = concatStringsSep " " cfg.extraServerArgs;
|
args = concatStringsSep " " cfg.extraServerArgs;
|
||||||
|
|
||||||
sendmail = pkgs.runCommand "opensmtpd-sendmail" {} ''
|
sendmail = pkgs.runCommand "opensmtpd-sendmail" { preferLocalBuild = true; } ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
ln -s ${cfg.package}/sbin/smtpctl $out/bin/sendmail
|
ln -s ${cfg.package}/sbin/smtpctl $out/bin/sendmail
|
||||||
'';
|
'';
|
||||||
|
@ -110,7 +110,7 @@ in
|
|||||||
config = mkIf cfg.enable (
|
config = mkIf cfg.enable (
|
||||||
let
|
let
|
||||||
manageGitoliteRc = cfg.extraGitoliteRc != "";
|
manageGitoliteRc = cfg.extraGitoliteRc != "";
|
||||||
rcDir = pkgs.runCommand "gitolite-rc" { } rcDirScript;
|
rcDir = pkgs.runCommand "gitolite-rc" { preferLocalBuild = true; } rcDirScript;
|
||||||
rcDirScript =
|
rcDirScript =
|
||||||
''
|
''
|
||||||
mkdir "$out"
|
mkdir "$out"
|
||||||
|
@ -19,7 +19,7 @@ let
|
|||||||
${pkgs.remarshal}/bin/json2yaml -i ${lovelaceConfigJSON} -o $out
|
${pkgs.remarshal}/bin/json2yaml -i ${lovelaceConfigJSON} -o $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
availableComponents = pkgs.home-assistant.availableComponents;
|
availableComponents = cfg.package.availableComponents;
|
||||||
|
|
||||||
# Given component "parentConfig.platform", returns whether config.parentConfig
|
# Given component "parentConfig.platform", returns whether config.parentConfig
|
||||||
# is a list containing a set with set.platform == "platform".
|
# is a list containing a set with set.platform == "platform".
|
||||||
|
@ -33,7 +33,7 @@ let
|
|||||||
sh = pkgs.runtimeShell;
|
sh = pkgs.runtimeShell;
|
||||||
binshDeps = pkgs.writeReferencesToFile sh;
|
binshDeps = pkgs.writeReferencesToFile sh;
|
||||||
in
|
in
|
||||||
pkgs.runCommand "nix.conf" { extraOptions = cfg.extraOptions; } (''
|
pkgs.runCommand "nix.conf" { preferLocalBuild = true; extraOptions = cfg.extraOptions; } (''
|
||||||
${optionalString (!isNix20) ''
|
${optionalString (!isNix20) ''
|
||||||
extraPaths=$(for i in $(cat ${binshDeps}); do if test -d $i; then echo $i; fi; done)
|
extraPaths=$(for i in $(cat ${binshDeps}); do if test -d $i; then echo $i; fi; done)
|
||||||
''}
|
''}
|
||||||
|
@ -109,7 +109,7 @@ let
|
|||||||
nixos-taskserver = pkgs.pythonPackages.buildPythonApplication {
|
nixos-taskserver = pkgs.pythonPackages.buildPythonApplication {
|
||||||
name = "nixos-taskserver";
|
name = "nixos-taskserver";
|
||||||
|
|
||||||
src = pkgs.runCommand "nixos-taskserver-src" {} ''
|
src = pkgs.runCommand "nixos-taskserver-src" { preferLocalBuild = true; } ''
|
||||||
mkdir -p "$out"
|
mkdir -p "$out"
|
||||||
cat "${pkgs.substituteAll {
|
cat "${pkgs.substituteAll {
|
||||||
src = ./helper-tool.py;
|
src = ./helper-tool.py;
|
||||||
|
@ -45,7 +45,7 @@ let
|
|||||||
|
|
||||||
eventToShellCmds = event: if builtins.hasAttr event cfg.hooks then (shellCmdsForEventScript event (builtins.getAttr event cfg.hooks)) else "";
|
eventToShellCmds = event: if builtins.hasAttr event cfg.hooks then (shellCmdsForEventScript event (builtins.getAttr event cfg.hooks)) else "";
|
||||||
|
|
||||||
scriptDir = pkgs.runCommand "apcupsd-scriptdir" {} (''
|
scriptDir = pkgs.runCommand "apcupsd-scriptdir" { preferLocalBuild = true; } (''
|
||||||
mkdir "$out"
|
mkdir "$out"
|
||||||
# Copy SCRIPTDIR from apcupsd package
|
# Copy SCRIPTDIR from apcupsd package
|
||||||
cp -r ${pkgs.apcupsd}/etc/apcupsd/* "$out"/
|
cp -r ${pkgs.apcupsd}/etc/apcupsd/* "$out"/
|
||||||
|
@ -9,8 +9,10 @@ let
|
|||||||
dataDir = cfg.dataDir;
|
dataDir = cfg.dataDir;
|
||||||
staticDir = cfg.dataDir + "/static";
|
staticDir = cfg.dataDir + "/static";
|
||||||
|
|
||||||
graphiteLocalSettingsDir = pkgs.runCommand "graphite_local_settings"
|
graphiteLocalSettingsDir = pkgs.runCommand "graphite_local_settings" {
|
||||||
{inherit graphiteLocalSettings;} ''
|
inherit graphiteLocalSettings;
|
||||||
|
preferLocalBuild = true;
|
||||||
|
} ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
ln -s $graphiteLocalSettings $out/graphite_local_settings.py
|
ln -s $graphiteLocalSettings $out/graphite_local_settings.py
|
||||||
'';
|
'';
|
||||||
|
@ -11,8 +11,10 @@ let
|
|||||||
|
|
||||||
nagiosObjectDefs = cfg.objectDefs;
|
nagiosObjectDefs = cfg.objectDefs;
|
||||||
|
|
||||||
nagiosObjectDefsDir = pkgs.runCommand "nagios-objects" {inherit nagiosObjectDefs;}
|
nagiosObjectDefsDir = pkgs.runCommand "nagios-objects" {
|
||||||
"mkdir -p $out; ln -s $nagiosObjectDefs $out/";
|
inherit nagiosObjectDefs;
|
||||||
|
preferLocalBuild = true;
|
||||||
|
} "mkdir -p $out; ln -s $nagiosObjectDefs $out/";
|
||||||
|
|
||||||
nagiosCfgFile = pkgs.writeText "nagios.cfg"
|
nagiosCfgFile = pkgs.writeText "nagios.cfg"
|
||||||
''
|
''
|
||||||
|
@ -5,7 +5,7 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.netdata;
|
cfg = config.services.netdata;
|
||||||
|
|
||||||
wrappedPlugins = pkgs.runCommand "wrapped-plugins" {} ''
|
wrappedPlugins = pkgs.runCommand "wrapped-plugins" { preferLocalBuild = true; } ''
|
||||||
mkdir -p $out/libexec/netdata/plugins.d
|
mkdir -p $out/libexec/netdata/plugins.d
|
||||||
ln -s /run/wrappers/bin/apps.plugin $out/libexec/netdata/plugins.d/apps.plugin
|
ln -s /run/wrappers/bin/apps.plugin $out/libexec/netdata/plugins.d/apps.plugin
|
||||||
'';
|
'';
|
||||||
|
@ -19,7 +19,7 @@ let
|
|||||||
|
|
||||||
# Pretty-print JSON to a file
|
# Pretty-print JSON to a file
|
||||||
writePrettyJSON = name: x:
|
writePrettyJSON = name: x:
|
||||||
pkgs.runCommand name { } ''
|
pkgs.runCommand name { preferLocalBuild = true; } ''
|
||||||
echo '${builtins.toJSON x}' | ${pkgs.jq}/bin/jq . > $out
|
echo '${builtins.toJSON x}' | ${pkgs.jq}/bin/jq . > $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.scollector;
|
cfg = config.services.scollector;
|
||||||
|
|
||||||
collectors = pkgs.runCommand "collectors" {}
|
collectors = pkgs.runCommand "collectors" { preferLocalBuild = true; }
|
||||||
''
|
''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
${lib.concatStringsSep
|
${lib.concatStringsSep
|
||||||
|
@ -7,6 +7,7 @@ let
|
|||||||
|
|
||||||
configFile = pkgs.runCommand "config.toml" {
|
configFile = pkgs.runCommand "config.toml" {
|
||||||
buildInputs = [ pkgs.remarshal ];
|
buildInputs = [ pkgs.remarshal ];
|
||||||
|
preferLocalBuild = true;
|
||||||
} ''
|
} ''
|
||||||
remarshal -if json -of toml \
|
remarshal -if json -of toml \
|
||||||
< ${pkgs.writeText "config.json" (builtins.toJSON cfg.extraConfig)} \
|
< ${pkgs.writeText "config.json" (builtins.toJSON cfg.extraConfig)} \
|
||||||
|
@ -4,7 +4,8 @@ let
|
|||||||
|
|
||||||
cfg = config.services.uptime;
|
cfg = config.services.uptime;
|
||||||
|
|
||||||
configDir = pkgs.runCommand "config" {} (if cfg.configFile != null then ''
|
configDir = pkgs.runCommand "config" { preferLocalBuild = true; }
|
||||||
|
(if cfg.configFile != null then ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
ext=`echo ${cfg.configFile} | grep -o \\..*`
|
ext=`echo ${cfg.configFile} | grep -o \\..*`
|
||||||
ln -sv ${cfg.configFile} $out/default$ext
|
ln -sv ${cfg.configFile} $out/default$ext
|
||||||
|
@ -102,7 +102,10 @@ let
|
|||||||
|
|
||||||
# wrappers to beegfs tools. Avoid typing path of config files
|
# wrappers to beegfs tools. Avoid typing path of config files
|
||||||
utilWrappers = mapAttrsToList ( name: cfg:
|
utilWrappers = mapAttrsToList ( name: cfg:
|
||||||
( pkgs.runCommand "beegfs-utils-${name}" { nativeBuildInputs = [ pkgs.makeWrapper ]; } ''
|
( pkgs.runCommand "beegfs-utils-${name}" {
|
||||||
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||||
|
preferLocalBuild = true;
|
||||||
|
} ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
|
||||||
makeWrapper ${pkgs.beegfs}/bin/beegfs-check-servers \
|
makeWrapper ${pkgs.beegfs}/bin/beegfs-check-servers \
|
||||||
|
@ -19,7 +19,7 @@ let
|
|||||||
"/var/lib/ipfs/.ipfs";
|
"/var/lib/ipfs/.ipfs";
|
||||||
|
|
||||||
# Wrapping the ipfs binary with the environment variable IPFS_PATH set to dataDir because we can't set it in the user environment
|
# Wrapping the ipfs binary with the environment variable IPFS_PATH set to dataDir because we can't set it in the user environment
|
||||||
wrapped = runCommand "ipfs" { buildInputs = [ makeWrapper ]; } ''
|
wrapped = runCommand "ipfs" { buildInputs = [ makeWrapper ]; preferLocalBuild = true; } ''
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out/bin"
|
||||||
makeWrapper "${ipfs}/bin/ipfs" "$out/bin/ipfs" \
|
makeWrapper "${ipfs}/bin/ipfs" "$out/bin/ipfs" \
|
||||||
--set IPFS_PATH ${cfg.dataDir} \
|
--set IPFS_PATH ${cfg.dataDir} \
|
||||||
|
@ -15,7 +15,7 @@ let
|
|||||||
|
|
||||||
clientServDB = pkgs.writeText "client-cellServDB-${cfg.cellName}" (mkCellServDB cfg.cellName cfg.cellServDB);
|
clientServDB = pkgs.writeText "client-cellServDB-${cfg.cellName}" (mkCellServDB cfg.cellName cfg.cellServDB);
|
||||||
|
|
||||||
afsConfig = pkgs.runCommand "afsconfig" {} ''
|
afsConfig = pkgs.runCommand "afsconfig" { preferLocalBuild = true; } ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
echo ${cfg.cellName} > $out/ThisCell
|
echo ${cfg.cellName} > $out/ThisCell
|
||||||
cat ${cellServDB} ${clientServDB} > $out/CellServDB
|
cat ${cellServDB} ${clientServDB} > $out/CellServDB
|
||||||
@ -198,7 +198,7 @@ in
|
|||||||
|
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
clientCellServDB = {
|
clientCellServDB = {
|
||||||
source = pkgs.runCommand "CellServDB" {} ''
|
source = pkgs.runCommand "CellServDB" { preferLocalBuild = true; } ''
|
||||||
cat ${cellServDB} ${clientServDB} > $out
|
cat ${cellServDB} ${clientServDB} > $out
|
||||||
'';
|
'';
|
||||||
target = "openafs/CellServDB";
|
target = "openafs/CellServDB";
|
||||||
|
@ -5,7 +5,7 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.dnscache;
|
cfg = config.services.dnscache;
|
||||||
|
|
||||||
dnscache-root = pkgs.runCommand "dnscache-root" {} ''
|
dnscache-root = pkgs.runCommand "dnscache-root" { preferLocalBuild = true; } ''
|
||||||
mkdir -p $out/{servers,ip}
|
mkdir -p $out/{servers,ip}
|
||||||
|
|
||||||
${concatMapStrings (ip: ''
|
${concatMapStrings (ip: ''
|
||||||
|
@ -41,7 +41,7 @@ let
|
|||||||
"$out/config.${name}"
|
"$out/config.${name}"
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
pkgs.runCommand "hylafax-config-modems" {}
|
pkgs.runCommand "hylafax-config-modems" { preferLocalBuild = true; }
|
||||||
''mkdir --parents "$out/" ${concatStringsSep "\n" (mapModems mkLine)}'';
|
''mkdir --parents "$out/" ${concatStringsSep "\n" (mapModems mkLine)}'';
|
||||||
|
|
||||||
setupSpoolScript = pkgs.substituteAll {
|
setupSpoolScript = pkgs.substituteAll {
|
||||||
|
@ -25,7 +25,7 @@ let
|
|||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
prayerCfg = pkgs.runCommand "prayer.cf" { } ''
|
prayerCfg = pkgs.runCommand "prayer.cf" { preferLocalBuild = true; } ''
|
||||||
# We have to remove the http_port 80, or it will start a server there
|
# We have to remove the http_port 80, or it will start a server there
|
||||||
cat ${prayer}/etc/prayer.cf | grep -v http_port > $out
|
cat ${prayer}/etc/prayer.cf | grep -v http_port > $out
|
||||||
cat ${prayerExtraCfg} >> $out
|
cat ${prayerExtraCfg} >> $out
|
||||||
|
@ -6,7 +6,7 @@ let
|
|||||||
cfg = config.services.shout;
|
cfg = config.services.shout;
|
||||||
shoutHome = "/var/lib/shout";
|
shoutHome = "/var/lib/shout";
|
||||||
|
|
||||||
defaultConfig = pkgs.runCommand "config.js" {} ''
|
defaultConfig = pkgs.runCommand "config.js" { preferLocalBuild = true; } ''
|
||||||
EDITOR=true ${pkgs.shout}/bin/shout config --home $PWD
|
EDITOR=true ${pkgs.shout}/bin/shout config --home $PWD
|
||||||
mv config.js $out
|
mv config.js $out
|
||||||
'';
|
'';
|
||||||
|
@ -4,7 +4,7 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.xrdp;
|
cfg = config.services.xrdp;
|
||||||
confDir = pkgs.runCommand "xrdp.conf" { } ''
|
confDir = pkgs.runCommand "xrdp.conf" { preferLocalBuild = true; } ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
|
||||||
cp ${cfg.package}/etc/xrdp/{km-*,xrdp,sesman,xrdp_keyboard}.ini $out
|
cp ${cfg.package}/etc/xrdp/{km-*,xrdp,sesman,xrdp_keyboard}.ini $out
|
||||||
|
@ -11,8 +11,9 @@ let
|
|||||||
avahiEnabled = config.services.avahi.enable;
|
avahiEnabled = config.services.avahi.enable;
|
||||||
polkitEnabled = config.security.polkit.enable;
|
polkitEnabled = config.security.polkit.enable;
|
||||||
|
|
||||||
additionalBackends = pkgs.runCommand "additional-cups-backends" { }
|
additionalBackends = pkgs.runCommand "additional-cups-backends" {
|
||||||
''
|
preferLocalBuild = true;
|
||||||
|
} ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
if [ ! -e ${cups.out}/lib/cups/backend/smb ]; then
|
if [ ! -e ${cups.out}/lib/cups/backend/smb ]; then
|
||||||
mkdir -p $out/lib/cups/backend
|
mkdir -p $out/lib/cups/backend
|
||||||
|
@ -82,7 +82,7 @@ in {
|
|||||||
X-RestartIfChanged=false
|
X-RestartIfChanged=false
|
||||||
'';
|
'';
|
||||||
|
|
||||||
systemd.units."autovt@.service".unit = pkgs.runCommand "unit" { }
|
systemd.units."autovt@.service".unit = pkgs.runCommand "unit" { preferLocalBuild = true; }
|
||||||
''
|
''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
ln -s ${config.systemd.units."kmsconvt@.service".unit}/kmsconvt@.service $out/autovt@.service
|
ln -s ${config.systemd.units."kmsconvt@.service".unit}/kmsconvt@.service $out/autovt@.service
|
||||||
|
@ -6,7 +6,7 @@ let
|
|||||||
cfg = config.services.codimd;
|
cfg = config.services.codimd;
|
||||||
|
|
||||||
prettyJSON = conf:
|
prettyJSON = conf:
|
||||||
pkgs.runCommand "codimd-config.json" { } ''
|
pkgs.runCommand "codimd-config.json" { preferLocalBuild = true; } ''
|
||||||
echo '${builtins.toJSON conf}' | ${pkgs.jq}/bin/jq \
|
echo '${builtins.toJSON conf}' | ${pkgs.jq}/bin/jq \
|
||||||
'{production:del(.[]|nulls)|del(.[][]?|nulls)}' > $out
|
'{production:del(.[]|nulls)|del(.[][]?|nulls)}' > $out
|
||||||
'';
|
'';
|
||||||
|
@ -217,7 +217,7 @@ let
|
|||||||
) null ([ cfg ] ++ subservices);
|
) null ([ cfg ] ++ subservices);
|
||||||
|
|
||||||
documentRoot = if maybeDocumentRoot != null then maybeDocumentRoot else
|
documentRoot = if maybeDocumentRoot != null then maybeDocumentRoot else
|
||||||
pkgs.runCommand "empty" {} "mkdir -p $out";
|
pkgs.runCommand "empty" { preferLocalBuild = true; } "mkdir -p $out";
|
||||||
|
|
||||||
documentRootConf = ''
|
documentRootConf = ''
|
||||||
DocumentRoot "${documentRoot}"
|
DocumentRoot "${documentRoot}"
|
||||||
@ -426,6 +426,7 @@ let
|
|||||||
phpIni = pkgs.runCommand "php.ini"
|
phpIni = pkgs.runCommand "php.ini"
|
||||||
{ options = concatStringsSep "\n"
|
{ options = concatStringsSep "\n"
|
||||||
([ mainCfg.phpOptions ] ++ (map (svc: svc.phpOptions) allSubservices));
|
([ mainCfg.phpOptions ] ++ (map (svc: svc.phpOptions) allSubservices));
|
||||||
|
preferLocalBuild = true;
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
cat ${php}/etc/php.ini > $out
|
cat ${php}/etc/php.ini > $out
|
||||||
|
@ -116,9 +116,10 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
mediawikiScripts = pkgs.runCommand "mediawiki-${config.id}-scripts"
|
mediawikiScripts = pkgs.runCommand "mediawiki-${config.id}-scripts" {
|
||||||
{ buildInputs = [ pkgs.makeWrapper ]; }
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
''
|
preferLocalBuild = true;
|
||||||
|
} ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
for i in changePassword.php createAndPromote.php userOptions.php edit.php nukePage.php update.php; do
|
for i in changePassword.php createAndPromote.php userOptions.php edit.php nukePage.php update.php; do
|
||||||
makeWrapper ${php}/bin/php $out/bin/mediawiki-${config.id}-$(basename $i .php) \
|
makeWrapper ${php}/bin/php $out/bin/mediawiki-${config.id}-$(basename $i .php) \
|
||||||
|
@ -44,7 +44,25 @@ let
|
|||||||
}
|
}
|
||||||
''));
|
''));
|
||||||
|
|
||||||
configFile = pkgs.writeText "nginx.conf" ''
|
awkFormat = pkgs.writeText "awkFormat-nginx.awk" ''
|
||||||
|
awk -f
|
||||||
|
{sub(/^[ \t]+/,"");idx=0}
|
||||||
|
/\{/{ctx++;idx=1}
|
||||||
|
/\}/{ctx--}
|
||||||
|
{id="";for(i=idx;i<ctx;i++)id=sprintf("%s%s", id, "\t");printf "%s%s\n", id, $0}
|
||||||
|
'';
|
||||||
|
|
||||||
|
configFile = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "nginx-config";
|
||||||
|
src = "";
|
||||||
|
phases = [ "installPhase" ];
|
||||||
|
installPhase = ''
|
||||||
|
mkdir $out
|
||||||
|
awk -f ${awkFormat} ${pre-configFile} | sed '/^\s*$/d' > $out/nginx.conf
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
pre-configFile = pkgs.writeText "pre-nginx.conf" ''
|
||||||
user ${cfg.user} ${cfg.group};
|
user ${cfg.user} ${cfg.group};
|
||||||
error_log ${cfg.logError};
|
error_log ${cfg.logError};
|
||||||
daemon off;
|
daemon off;
|
||||||
@ -638,10 +656,10 @@ in
|
|||||||
preStart =
|
preStart =
|
||||||
''
|
''
|
||||||
${cfg.preStart}
|
${cfg.preStart}
|
||||||
${cfg.package}/bin/nginx -c ${configFile} -p ${cfg.stateDir} -t
|
${cfg.package}/bin/nginx -c ${configFile}/nginx.conf -p ${cfg.stateDir} -t
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${cfg.package}/bin/nginx -c ${configFile} -p ${cfg.stateDir}";
|
ExecStart = "${cfg.package}/bin/nginx -c ${configFile}/nginx.conf -p ${cfg.stateDir}";
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = "10s";
|
RestartSec = "10s";
|
||||||
|
@ -39,6 +39,7 @@ let
|
|||||||
|
|
||||||
phpIni = pool: pkgs.runCommand "php.ini" {
|
phpIni = pool: pkgs.runCommand "php.ini" {
|
||||||
inherit (pool) phpPackage phpOptions;
|
inherit (pool) phpPackage phpOptions;
|
||||||
|
preferLocalBuild = true;
|
||||||
nixDefaults = ''
|
nixDefaults = ''
|
||||||
sendmail_path = "/run/wrappers/bin/sendmail -t -i"
|
sendmail_path = "/run/wrappers/bin/sendmail -t -i"
|
||||||
'';
|
'';
|
||||||
|
@ -8,6 +8,7 @@ let
|
|||||||
if cfg.configFile == null then
|
if cfg.configFile == null then
|
||||||
pkgs.runCommand "config.toml" {
|
pkgs.runCommand "config.toml" {
|
||||||
buildInputs = [ pkgs.remarshal ];
|
buildInputs = [ pkgs.remarshal ];
|
||||||
|
preferLocalBuild = true;
|
||||||
} ''
|
} ''
|
||||||
remarshal -if json -of toml \
|
remarshal -if json -of toml \
|
||||||
< ${pkgs.writeText "config.json" (builtins.toJSON cfg.configOptions)} \
|
< ${pkgs.writeText "config.json" (builtins.toJSON cfg.configOptions)} \
|
||||||
|
@ -15,7 +15,7 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
nixos-gsettings-desktop-schemas = pkgs.runCommand "nixos-gsettings-desktop-schemas" {}
|
nixos-gsettings-desktop-schemas = pkgs.runCommand "nixos-gsettings-desktop-schemas" { preferLocalBuild = true; }
|
||||||
''
|
''
|
||||||
mkdir -p $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
|
mkdir -p $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
|
||||||
cp -rf ${pkgs.gnome3.gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas*/glib-2.0/schemas/*.xml $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
|
cp -rf ${pkgs.gnome3.gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas*/glib-2.0/schemas/*.xml $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
|
||||||
|
@ -12,9 +12,10 @@ let
|
|||||||
|
|
||||||
# We need a few things in the environment for the greeter to run with
|
# We need a few things in the environment for the greeter to run with
|
||||||
# fonts/icons.
|
# fonts/icons.
|
||||||
wrappedEnsoGreeter = pkgs.runCommand "lightdm-enso-os-greeter"
|
wrappedEnsoGreeter = pkgs.runCommand "lightdm-enso-os-greeter" {
|
||||||
{ buildInputs = [ pkgs.makeWrapper ]; }
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
''
|
preferLocalBuild = true;
|
||||||
|
} ''
|
||||||
# This wrapper ensures that we actually get themes
|
# This wrapper ensures that we actually get themes
|
||||||
makeWrapper ${pkgs.lightdm-enso-os-greeter}/bin/pantheon-greeter \
|
makeWrapper ${pkgs.lightdm-enso-os-greeter}/bin/pantheon-greeter \
|
||||||
$out/greeter \
|
$out/greeter \
|
||||||
|
@ -18,9 +18,10 @@ let
|
|||||||
# The default greeter provided with this expression is the GTK greeter.
|
# The default greeter provided with this expression is the GTK greeter.
|
||||||
# Again, we need a few things in the environment for the greeter to run with
|
# Again, we need a few things in the environment for the greeter to run with
|
||||||
# fonts/icons.
|
# fonts/icons.
|
||||||
wrappedGtkGreeter = pkgs.runCommand "lightdm-gtk-greeter"
|
wrappedGtkGreeter = pkgs.runCommand "lightdm-gtk-greeter" {
|
||||||
{ buildInputs = [ pkgs.makeWrapper ]; }
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
''
|
preferLocalBuild = true;
|
||||||
|
} ''
|
||||||
# This wrapper ensures that we actually get themes
|
# This wrapper ensures that we actually get themes
|
||||||
makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \
|
makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \
|
||||||
$out/greeter \
|
$out/greeter \
|
||||||
|
@ -28,7 +28,7 @@ let
|
|||||||
# Unpack the SLiM theme, or use the default.
|
# Unpack the SLiM theme, or use the default.
|
||||||
slimThemesDir =
|
slimThemesDir =
|
||||||
let
|
let
|
||||||
unpackedTheme = pkgs.runCommand "slim-theme" {}
|
unpackedTheme = pkgs.runCommand "slim-theme" { preferLocalBuild = true; }
|
||||||
''
|
''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cd $out
|
cd $out
|
||||||
|
@ -10,7 +10,7 @@ let
|
|||||||
|
|
||||||
# Generate the cache file by running gdk-pixbuf-query-loaders for each
|
# Generate the cache file by running gdk-pixbuf-query-loaders for each
|
||||||
# package and concatenating the results.
|
# package and concatenating the results.
|
||||||
loadersCache = pkgs.runCommand "gdk-pixbuf-loaders.cache" {} ''
|
loadersCache = pkgs.runCommand "gdk-pixbuf-loaders.cache" { preferLocalBuild = true; } ''
|
||||||
(
|
(
|
||||||
for package in ${concatStringsSep " " effectivePackages}; do
|
for package in ${concatStringsSep " " effectivePackages}; do
|
||||||
module_dir="$package/${pkgs.gdk_pixbuf.moduleDir}"
|
module_dir="$package/${pkgs.gdk_pixbuf.moduleDir}"
|
||||||
|
@ -113,6 +113,7 @@ let
|
|||||||
{ xfs = optionalString (cfg.useXFS != false)
|
{ xfs = optionalString (cfg.useXFS != false)
|
||||||
''FontPath "${toString cfg.useXFS}"'';
|
''FontPath "${toString cfg.useXFS}"'';
|
||||||
inherit (cfg) config;
|
inherit (cfg) config;
|
||||||
|
preferLocalBuild = true;
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
echo 'Section "Files"' >> $out
|
echo 'Section "Files"' >> $out
|
||||||
@ -705,6 +706,7 @@ in
|
|||||||
system.extraDependencies = singleton (pkgs.runCommand "xkb-validated" {
|
system.extraDependencies = singleton (pkgs.runCommand "xkb-validated" {
|
||||||
inherit (cfg) xkbModel layout xkbVariant xkbOptions;
|
inherit (cfg) xkbModel layout xkbVariant xkbOptions;
|
||||||
nativeBuildInputs = [ pkgs.xkbvalidate ];
|
nativeBuildInputs = [ pkgs.xkbvalidate ];
|
||||||
|
preferLocalBuild = true;
|
||||||
} ''
|
} ''
|
||||||
validate "$xkbModel" "$layout" "$xkbVariant" "$xkbOptions"
|
validate "$xkbModel" "$layout" "$xkbVariant" "$xkbOptions"
|
||||||
touch "$out"
|
touch "$out"
|
||||||
|
@ -196,9 +196,10 @@ let
|
|||||||
''; # */
|
''; # */
|
||||||
|
|
||||||
|
|
||||||
udevRules = pkgs.runCommand "udev-rules"
|
udevRules = pkgs.runCommand "udev-rules" {
|
||||||
{ allowedReferences = [ extraUtils ]; }
|
allowedReferences = [ extraUtils ];
|
||||||
''
|
preferLocalBuild = true;
|
||||||
|
} ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
|
|
||||||
echo 'ENV{LD_LIBRARY_PATH}="${extraUtils}/lib"' > $out/00-env.rules
|
echo 'ENV{LD_LIBRARY_PATH}="${extraUtils}/lib"' > $out/00-env.rules
|
||||||
@ -298,9 +299,10 @@ let
|
|||||||
{ object = pkgs.writeText "mdadm.conf" config.boot.initrd.mdadmConf;
|
{ object = pkgs.writeText "mdadm.conf" config.boot.initrd.mdadmConf;
|
||||||
symlink = "/etc/mdadm.conf";
|
symlink = "/etc/mdadm.conf";
|
||||||
}
|
}
|
||||||
{ object = pkgs.runCommand "initrd-kmod-blacklist-ubuntu"
|
{ object = pkgs.runCommand "initrd-kmod-blacklist-ubuntu" {
|
||||||
{ src = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf"; }
|
src = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf";
|
||||||
''
|
preferLocalBuild = true;
|
||||||
|
} ''
|
||||||
target=$out
|
target=$out
|
||||||
${pkgs.buildPackages.perl}/bin/perl -0pe 's/## file: iwlwifi.conf(.+?)##/##/s;' $src > $out
|
${pkgs.buildPackages.perl}/bin/perl -0pe 's/## file: iwlwifi.conf(.+?)##/##/s;' $src > $out
|
||||||
'';
|
'';
|
||||||
|
@ -593,7 +593,7 @@ in
|
|||||||
|
|
||||||
services.journald.forwardToSyslog = mkOption {
|
services.journald.forwardToSyslog = mkOption {
|
||||||
default = config.services.rsyslogd.enable || config.services.syslog-ng.enable;
|
default = config.services.rsyslogd.enable || config.services.syslog-ng.enable;
|
||||||
defaultText = "config.services.rsyslogd.enable || config.services.syslog-ng.enable";
|
defaultText = "services.rsyslogd.enable || services.syslog-ng.enable";
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to forward log messages to syslog.
|
Whether to forward log messages to syslog.
|
||||||
@ -652,6 +652,7 @@ in
|
|||||||
|
|
||||||
services.logind.lidSwitchExternalPower = mkOption {
|
services.logind.lidSwitchExternalPower = mkOption {
|
||||||
default = config.services.logind.lidSwitch;
|
default = config.services.logind.lidSwitch;
|
||||||
|
defaultText = "services.logind.lidSwitch";
|
||||||
example = "ignore";
|
example = "ignore";
|
||||||
type = logindHandlerType;
|
type = logindHandlerType;
|
||||||
|
|
||||||
@ -759,7 +760,10 @@ in
|
|||||||
environment.etc = let
|
environment.etc = let
|
||||||
# generate contents for /etc/systemd/system-generators from
|
# generate contents for /etc/systemd/system-generators from
|
||||||
# systemd.generators and systemd.generator-packages
|
# systemd.generators and systemd.generator-packages
|
||||||
generators = pkgs.runCommand "system-generators" { packages = cfg.generator-packages; } ''
|
generators = pkgs.runCommand "system-generators" {
|
||||||
|
preferLocalBuild = true;
|
||||||
|
packages = cfg.generator-packages;
|
||||||
|
} ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
for package in $packages
|
for package in $packages
|
||||||
do
|
do
|
||||||
|
@ -6,7 +6,7 @@ let
|
|||||||
|
|
||||||
inInitrd = any (fs: fs == "vboxsf") config.boot.initrd.supportedFilesystems;
|
inInitrd = any (fs: fs == "vboxsf") config.boot.initrd.supportedFilesystems;
|
||||||
|
|
||||||
package = pkgs.runCommand "mount.vboxsf" {} ''
|
package = pkgs.runCommand "mount.vboxsf" { preferLocalBuild = true; } ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp ${pkgs.linuxPackages.virtualboxGuestAdditions}/bin/mount.vboxsf $out/bin
|
cp ${pkgs.linuxPackages.virtualboxGuestAdditions}/bin/mount.vboxsf $out/bin
|
||||||
'';
|
'';
|
||||||
|
@ -15,6 +15,7 @@ let
|
|||||||
optimizedKeymap = pkgs.runCommand "keymap" {
|
optimizedKeymap = pkgs.runCommand "keymap" {
|
||||||
nativeBuildInputs = [ pkgs.buildPackages.kbd ];
|
nativeBuildInputs = [ pkgs.buildPackages.kbd ];
|
||||||
LOADKEYS_KEYMAP_PATH = "${kbdEnv}/share/keymaps/**";
|
LOADKEYS_KEYMAP_PATH = "${kbdEnv}/share/keymaps/**";
|
||||||
|
preferLocalBuild = true;
|
||||||
} ''
|
} ''
|
||||||
loadkeys -b ${optionalString isUnicode "-u"} "${config.i18n.consoleKeyMap}" > $out
|
loadkeys -b ${optionalString isUnicode "-u"} "${config.i18n.consoleKeyMap}" > $out
|
||||||
'';
|
'';
|
||||||
|
@ -995,7 +995,7 @@ in
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
environment.etc."hostid" = mkIf (cfg.hostId != null)
|
environment.etc."hostid" = mkIf (cfg.hostId != null)
|
||||||
{ source = pkgs.runCommand "gen-hostid" {} ''
|
{ source = pkgs.runCommand "gen-hostid" { preferLocalBuild = true; } ''
|
||||||
hi="${cfg.hostId}"
|
hi="${cfg.hostId}"
|
||||||
${if pkgs.stdenv.isBigEndian then ''
|
${if pkgs.stdenv.isBigEndian then ''
|
||||||
echo -ne "\x''${hi:0:2}\x''${hi:2:2}\x''${hi:4:2}\x''${hi:6:2}" > $out
|
echo -ne "\x''${hi:0:2}\x''${hi:2:2}\x''${hi:4:2}\x''${hi:6:2}" > $out
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ... } : {
|
import ./make-test.nix ({ pkgs, ... } : {
|
||||||
name = "avahi";
|
name = "avahi";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ eelco chaoflow ];
|
maintainers = [ eelco ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = let
|
nodes = let
|
||||||
|
@ -1,23 +1,25 @@
|
|||||||
import ./make-test.nix ({ pkgs, lib, ... }:
|
import ./make-test.nix ({ pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
pythonEnv = pkgs.python3.withPackages (p: [p.beanstalkc]);
|
||||||
|
|
||||||
produce = pkgs.writeScript "produce.py" ''
|
produce = pkgs.writeScript "produce.py" ''
|
||||||
#!${pkgs.python2.withPackages (p: [p.beanstalkc])}/bin/python
|
#!${pythonEnv.interpreter}
|
||||||
import beanstalkc
|
import beanstalkc
|
||||||
|
|
||||||
queue = beanstalkc.Connection(host='localhost', port=11300, parse_yaml=False);
|
queue = beanstalkc.Connection(host='localhost', port=11300, parse_yaml=False);
|
||||||
queue.put('this is a job')
|
queue.put(b'this is a job')
|
||||||
queue.put('this is another job')
|
queue.put(b'this is another job')
|
||||||
'';
|
'';
|
||||||
|
|
||||||
consume = pkgs.writeScript "consume.py" ''
|
consume = pkgs.writeScript "consume.py" ''
|
||||||
#!${pkgs.python2.withPackages (p: [p.beanstalkc])}/bin/python
|
#!${pythonEnv.interpreter}
|
||||||
import beanstalkc
|
import beanstalkc
|
||||||
|
|
||||||
queue = beanstalkc.Connection(host='localhost', port=11300, parse_yaml=False);
|
queue = beanstalkc.Connection(host='localhost', port=11300, parse_yaml=False);
|
||||||
|
|
||||||
job = queue.reserve(timeout=0)
|
job = queue.reserve(timeout=0)
|
||||||
print job.body
|
print(job.body.decode('utf-8'))
|
||||||
job.delete()
|
job.delete()
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ in
|
|||||||
{
|
{
|
||||||
name = "bittorrent";
|
name = "bittorrent";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ domenkozar eelco chaoflow rob bobvanderlinden ];
|
maintainers = [ domenkozar eelco rob bobvanderlinden ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes =
|
nodes =
|
||||||
|
@ -10,7 +10,7 @@ in
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "containers-bridge";
|
name = "containers-bridge";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ aristid aszlig eelco chaoflow kampfschlaefer ];
|
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
||||||
};
|
};
|
||||||
|
|
||||||
machine =
|
machine =
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "containers-imperative";
|
name = "containers-imperative";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ aristid aszlig eelco chaoflow kampfschlaefer ];
|
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
||||||
};
|
};
|
||||||
|
|
||||||
machine =
|
machine =
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "containers-ipv4";
|
name = "containers-ipv4";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ aristid aszlig eelco chaoflow kampfschlaefer ];
|
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
||||||
};
|
};
|
||||||
|
|
||||||
machine =
|
machine =
|
||||||
|
@ -8,7 +8,7 @@ in
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "containers-ipv6";
|
name = "containers-ipv6";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ aristid aszlig eelco chaoflow kampfschlaefer ];
|
maintainers = [ aristid aszlig eelco kampfschlaefer ];
|
||||||
};
|
};
|
||||||
|
|
||||||
machine =
|
machine =
|
||||||
|
@ -10,7 +10,7 @@ in
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "containers-portforward";
|
name = "containers-portforward";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ aristid aszlig eelco chaoflow kampfschlaefer ianwookim ];
|
maintainers = [ aristid aszlig eelco kampfschlaefer ianwookim ];
|
||||||
};
|
};
|
||||||
|
|
||||||
machine =
|
machine =
|
||||||
|
@ -13,7 +13,7 @@ let
|
|||||||
mkElkTest = name : elk : makeTest {
|
mkElkTest = name : elk : makeTest {
|
||||||
inherit name;
|
inherit name;
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ eelco chaoflow offline basvandijk ];
|
maintainers = [ eelco offline basvandijk ];
|
||||||
};
|
};
|
||||||
nodes = {
|
nodes = {
|
||||||
one =
|
one =
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ... }: {
|
import ./make-test.nix ({ pkgs, ... }: {
|
||||||
name = "firefox";
|
name = "firefox";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ eelco chaoflow shlevy ];
|
maintainers = [ eelco shlevy ];
|
||||||
};
|
};
|
||||||
|
|
||||||
machine =
|
machine =
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import ./make-test.nix ( { pkgs, ... } : {
|
import ./make-test.nix ( { pkgs, ... } : {
|
||||||
name = "firewall";
|
name = "firewall";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ eelco chaoflow ];
|
maintainers = [ eelco ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes =
|
nodes =
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "gnome3";
|
name = "gnome3";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ domenkozar eelco chaoflow lethalman ];
|
maintainers = [ domenkozar eelco lethalman ];
|
||||||
};
|
};
|
||||||
|
|
||||||
machine =
|
machine =
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "influxdb";
|
name = "influxdb";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ chaoflow offline ];
|
maintainers = [ offline ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "ipv6";
|
name = "ipv6";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ eelco chaoflow ];
|
maintainers = [ eelco ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes =
|
nodes =
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "jenkins";
|
name = "jenkins";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ bjornfor coconnor domenkozar eelco chaoflow ];
|
maintainers = [ bjornfor coconnor domenkozar eelco ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "kexec";
|
name = "kexec";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ eelco chaoflow ];
|
maintainers = [ eelco ];
|
||||||
};
|
};
|
||||||
|
|
||||||
machine = { ... }:
|
machine = { ... }:
|
||||||
|
@ -3,7 +3,7 @@ import ./make-test.nix ({ pkgs, latestKernel ? false, ... }:
|
|||||||
{
|
{
|
||||||
name = "login";
|
name = "login";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ eelco chaoflow ];
|
maintainers = [ eelco ];
|
||||||
};
|
};
|
||||||
|
|
||||||
machine =
|
machine =
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : rec {
|
import ./make-test.nix ({ pkgs, ...} : rec {
|
||||||
name = "misc";
|
name = "misc";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ eelco chaoflow ];
|
maintainers = [ eelco ];
|
||||||
};
|
};
|
||||||
|
|
||||||
foo = pkgs.writeText "foo" "Hello World";
|
foo = pkgs.writeText "foo" "Hello World";
|
||||||
|
@ -9,7 +9,7 @@ in
|
|||||||
{
|
{
|
||||||
name = "mumble";
|
name = "mumble";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ thoughtpolice eelco chaoflow ];
|
maintainers = [ thoughtpolice eelco ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "munin";
|
name = "munin";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ domenkozar eelco chaoflow ];
|
maintainers = [ domenkozar eelco ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
|
@ -8,7 +8,7 @@ in
|
|||||||
{
|
{
|
||||||
name = "mysql-replication";
|
name = "mysql-replication";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ eelco chaoflow shlevy ];
|
maintainers = [ eelco shlevy ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test.nix ({ pkgs, ...} : {
|
||||||
name = "mysql";
|
name = "mysql";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ eelco chaoflow shlevy ];
|
maintainers = [ eelco shlevy ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
|
@ -24,7 +24,7 @@ import ./make-test.nix ({ pkgs, lib, withFirewall, withConntrackHelpers ? false,
|
|||||||
name = "nat" + (if withFirewall then "WithFirewall" else "Standalone")
|
name = "nat" + (if withFirewall then "WithFirewall" else "Standalone")
|
||||||
+ (lib.optionalString withConntrackHelpers "withConntrackHelpers");
|
+ (lib.optionalString withConntrackHelpers "withConntrackHelpers");
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ eelco chaoflow rob ];
|
maintainers = [ eelco rob ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes =
|
nodes =
|
||||||
|
@ -20,7 +20,7 @@ in
|
|||||||
{
|
{
|
||||||
name = "nfs";
|
name = "nfs";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ eelco chaoflow ];
|
maintainers = [ eelco ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes =
|
nodes =
|
||||||
|
@ -5,7 +5,7 @@ let inherit (import ./ssh-keys.nix pkgs)
|
|||||||
in {
|
in {
|
||||||
name = "openssh";
|
name = "openssh";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ aszlig eelco chaoflow ];
|
maintainers = [ aszlig eelco ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import ./make-test.nix ({ pkgs, ... }: {
|
import ./make-test.nix ({ pkgs, ... }: {
|
||||||
name = "phabricator";
|
name = "phabricator";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ chaoflow ];
|
maintainers = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
|
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