Merge branch 'master' into patch-3
This commit is contained in:
commit
b6fd071027
@ -47,27 +47,17 @@ indent_style = space
|
|||||||
insert_final_newline = unset
|
insert_final_newline = unset
|
||||||
trim_trailing_whitespace = unset
|
trim_trailing_whitespace = unset
|
||||||
|
|
||||||
[*.{key,ovpn}]
|
[*.{asc,key,ovpn}]
|
||||||
insert_final_newline = unset
|
insert_final_newline = unset
|
||||||
end_of_line = unset
|
end_of_line = unset
|
||||||
|
trim_trailing_whitespace = unset
|
||||||
|
|
||||||
[*.lock]
|
[*.lock]
|
||||||
indent_size = unset
|
indent_size = unset
|
||||||
|
|
||||||
[deps.nix]
|
|
||||||
insert_final_newline = unset
|
|
||||||
[pkgs/tools/networking/dd-agent/*-deps.nix]
|
|
||||||
insert_final_newline = unset
|
|
||||||
|
|
||||||
[eggs.nix]
|
[eggs.nix]
|
||||||
trim_trailing_whitespace = unset
|
trim_trailing_whitespace = unset
|
||||||
|
|
||||||
[gemset.nix]
|
|
||||||
insert_final_newline = unset
|
|
||||||
|
|
||||||
[node-{composition,packages,packages-generated}.nix]
|
|
||||||
insert_final_newline = unset
|
|
||||||
|
|
||||||
[nixos/modules/services/networking/ircd-hybrid/*.{conf,in}]
|
[nixos/modules/services/networking/ircd-hybrid/*.{conf,in}]
|
||||||
trim_trailing_whitespace = unset
|
trim_trailing_whitespace = unset
|
||||||
|
|
||||||
@ -92,15 +82,6 @@ insert_final_newline = unset
|
|||||||
indent_style = unset
|
indent_style = unset
|
||||||
trim_trailing_whitespace = unset
|
trim_trailing_whitespace = unset
|
||||||
|
|
||||||
[pkgs/development/mobile/androidenv/generated/{addons,packages}.nix]
|
|
||||||
trim_trailing_whitespace = unset
|
|
||||||
|
|
||||||
[pkgs/development/node-packages/composition.nix]
|
|
||||||
insert_final_newline = unset
|
|
||||||
|
|
||||||
[pkgs/development/{perl-modules,ocaml-modules,tools/ocaml}/**]
|
|
||||||
indent_style = unset
|
|
||||||
|
|
||||||
[pkgs/servers/dict/wordnet_structures.py]
|
[pkgs/servers/dict/wordnet_structures.py]
|
||||||
trim_trailing_whitespace = unset
|
trim_trailing_whitespace = unset
|
||||||
|
|
||||||
|
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@ -37,7 +37,7 @@ under the terms of [COPYING](../COPYING), which is an MIT-like license.
|
|||||||
* Not start with the package name.
|
* Not start with the package name.
|
||||||
* Not have a period at the end.
|
* Not have a period at the end.
|
||||||
* `meta.license` must be set and fit the upstream license.
|
* `meta.license` must be set and fit the upstream license.
|
||||||
* If there is no upstream license, `meta.license` should default to `stdenv.lib.licenses.unfree`.
|
* If there is no upstream license, `meta.license` should default to `lib.licenses.unfree`.
|
||||||
* `meta.maintainers` must be set.
|
* `meta.maintainers` must be set.
|
||||||
|
|
||||||
See the nixpkgs manual for more details on [standard meta-attributes](https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes) and on how to [submit changes to nixpkgs](https://nixos.org/nixpkgs/manual/#chap-submitting-changes).
|
See the nixpkgs manual for more details on [standard meta-attributes](https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes) and on how to [submit changes to nixpkgs](https://nixos.org/nixpkgs/manual/#chap-submitting-changes).
|
||||||
|
@ -178,6 +178,12 @@ args.stdenv.mkDerivation (args // {
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Arguments should be listed in the order they are used, with the
|
||||||
|
exception of <varname>lib</varname>, which always goes first.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Prefer using the top-level <varname>lib</varname> over its alias
|
Prefer using the top-level <varname>lib</varname> over its alias
|
||||||
|
@ -42,8 +42,8 @@ It also takes other standard `mkDerivation` attributes, they are added as such,
|
|||||||
Here is a simple package example. It is a pure Coq library, thus it depends on Coq. It builds on the Mathematical Components library, thus it also takes some `mathcomp` derivations as `extraBuildInputs`.
|
Here is a simple package example. It is a pure Coq library, thus it depends on Coq. It builds on the Mathematical Components library, thus it also takes some `mathcomp` derivations as `extraBuildInputs`.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ coq, mkCoqDerivation, mathcomp, mathcomp-finmap, mathcomp-bigenough,
|
{ lib, mkCoqDerivation, version ? null
|
||||||
lib, version ? null }:
|
, coq, mathcomp, mathcomp-finmap, mathcomp-bigenough }:
|
||||||
with lib; mkCoqDerivation {
|
with lib; mkCoqDerivation {
|
||||||
/* namePrefix leads to e.g. `name = coq8.11-mathcomp1.11-multinomials-1.5.2` */
|
/* namePrefix leads to e.g. `name = coq8.11-mathcomp1.11-multinomials-1.5.2` */
|
||||||
namePrefix = [ "coq" "mathcomp" ];
|
namePrefix = [ "coq" "mathcomp" ];
|
||||||
|
@ -69,11 +69,11 @@ prelude
|
|||||||
As an example of how a Nix expression for an Idris package can be created, here is the one for `idrisPackages.yaml`:
|
As an example of how a Nix expression for an Idris package can be created, here is the one for `idrisPackages.yaml`:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ build-idris-package
|
{ lib
|
||||||
|
, build-idris-package
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, contrib
|
, contrib
|
||||||
, lightyear
|
, lightyear
|
||||||
, lib
|
|
||||||
}:
|
}:
|
||||||
build-idris-package {
|
build-idris-package {
|
||||||
name = "yaml";
|
name = "yaml";
|
||||||
@ -94,11 +94,11 @@ build-idris-package {
|
|||||||
sha256 = "1g4pi0swmg214kndj85hj50ccmckni7piprsxfdzdfhg87s0avw7";
|
sha256 = "1g4pi0swmg214kndj85hj50ccmckni7piprsxfdzdfhg87s0avw7";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "Idris YAML lib";
|
description = "Idris YAML lib";
|
||||||
homepage = "https://github.com/Heather/Idris.Yaml";
|
homepage = "https://github.com/Heather/Idris.Yaml";
|
||||||
license = lib.licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = [ lib.maintainers.brainrape ];
|
maintainers = [ maintainers.brainrape ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -116,7 +116,7 @@ The first step will be to build the Maven project as a fixed-output derivation i
|
|||||||
> Traditionally the Maven repository is at `~/.m2/repository`. We will override this to be the `$out` directory.
|
> Traditionally the Maven repository is at `~/.m2/repository`. We will override this to be the `$out` directory.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ stdenv, lib, maven }:
|
{ lib, stdenv, maven }:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "maven-repository";
|
name = "maven-repository";
|
||||||
buildInputs = [ maven ];
|
buildInputs = [ maven ];
|
||||||
@ -168,7 +168,7 @@ If your package uses _SNAPSHOT_ dependencies or _version ranges_; there is a str
|
|||||||
Regardless of which strategy is chosen above, the step to build the derivation is the same.
|
Regardless of which strategy is chosen above, the step to build the derivation is the same.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ stdenv, lib, maven, callPackage }:
|
{ stdenv, maven, callPackage }:
|
||||||
# pick a repository derivation, here we will use buildMaven
|
# pick a repository derivation, here we will use buildMaven
|
||||||
let repository = callPackage ./build-maven-repository.nix { };
|
let repository = callPackage ./build-maven-repository.nix { };
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
@ -222,7 +222,7 @@ We will read the Maven repository and flatten it to a single list. This list wil
|
|||||||
We make sure to provide this classpath to the `makeWrapper`.
|
We make sure to provide this classpath to the `makeWrapper`.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ stdenv, lib, maven, callPackage, makeWrapper, jre }:
|
{ stdenv, maven, callPackage, makeWrapper, jre }:
|
||||||
let
|
let
|
||||||
repository = callPackage ./build-maven-repository.nix { };
|
repository = callPackage ./build-maven-repository.nix { };
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
@ -298,7 +298,7 @@ Main-Class: Main
|
|||||||
We will modify the derivation above to add a symlink to our repository so that it's accessible to our JAR during the `installPhase`.
|
We will modify the derivation above to add a symlink to our repository so that it's accessible to our JAR during the `installPhase`.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ stdenv, lib, maven, callPackage, makeWrapper, jre }:
|
{ stdenv, maven, callPackage, makeWrapper, jre }:
|
||||||
# pick a repository derivation, here we will use buildMaven
|
# pick a repository derivation, here we will use buildMaven
|
||||||
let repository = callPackage ./build-maven-repository.nix { };
|
let repository = callPackage ./build-maven-repository.nix { };
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
|
@ -32,11 +32,11 @@ buildDunePackage rec {
|
|||||||
propagatedBuildInputs = [ bigstringaf result ];
|
propagatedBuildInputs = [ bigstringaf result ];
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/inhabitedtype/angstrom";
|
homepage = "https://github.com/inhabitedtype/angstrom";
|
||||||
description = "OCaml parser combinators built for speed and memory efficiency";
|
description = "OCaml parser combinators built for speed and memory efficiency";
|
||||||
license = lib.licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = with lib.maintainers; [ sternenseemann ];
|
maintainers = with maintainers; [ sternenseemann ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -110,7 +110,7 @@ ClassC3Componentised = buildPerlPackage rec {
|
|||||||
On Darwin, if a script has too many `-Idir` flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the `shortenPerlShebang` function from the `postInstall` phase:
|
On Darwin, if a script has too many `-Idir` flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the `shortenPerlShebang` function from the `postInstall` phase:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ stdenv, lib, buildPerlPackage, fetchurl, shortenPerlShebang }:
|
{ lib, stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
|
||||||
|
|
||||||
ImageExifTool = buildPerlPackage {
|
ImageExifTool = buildPerlPackage {
|
||||||
pname = "Image-ExifTool";
|
pname = "Image-ExifTool";
|
||||||
|
@ -8,7 +8,7 @@ There are primarily two problems which the Qt infrastructure is designed to addr
|
|||||||
|
|
||||||
```{=docbook}
|
```{=docbook}
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{ mkDerivation, lib, qtbase }: <co xml:id='qt-default-nix-co-1' />
|
{ mkDerivation, qtbase }: <co xml:id='qt-default-nix-co-1' />
|
||||||
|
|
||||||
mkDerivation { <co xml:id='qt-default-nix-co-2' />
|
mkDerivation { <co xml:id='qt-default-nix-co-2' />
|
||||||
pname = "myapp";
|
pname = "myapp";
|
||||||
|
@ -32,14 +32,12 @@ However, if you'd like to add a file to your project source to make the
|
|||||||
environment available for other contributors, you can create a `default.nix`
|
environment available for other contributors, you can create a `default.nix`
|
||||||
file like so:
|
file like so:
|
||||||
```nix
|
```nix
|
||||||
let
|
with import <nixpkgs> {};
|
||||||
pkgs = import <nixpkgs> {};
|
{
|
||||||
stdenv = pkgs.stdenv;
|
|
||||||
in with pkgs; {
|
|
||||||
myProject = stdenv.mkDerivation {
|
myProject = stdenv.mkDerivation {
|
||||||
name = "myProject";
|
name = "myProject";
|
||||||
version = "1";
|
version = "1";
|
||||||
src = if pkgs.lib.inNixShell then null else nix;
|
src = if lib.inNixShell then null else nix;
|
||||||
|
|
||||||
buildInputs = with rPackages; [
|
buildInputs = with rPackages; [
|
||||||
R
|
R
|
||||||
|
@ -232,7 +232,7 @@ If you want to package a specific version, you can use the standard Gemfile synt
|
|||||||
Now you can also also make a `default.nix` that looks like this:
|
Now you can also also make a `default.nix` that looks like this:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ lib, bundlerApp }:
|
{ bundlerApp }:
|
||||||
|
|
||||||
bundlerApp {
|
bundlerApp {
|
||||||
pname = "mdl";
|
pname = "mdl";
|
||||||
|
@ -19,6 +19,8 @@ or use Mozilla's [Rust nightlies overlay](#using-the-rust-nightlies-overlay).
|
|||||||
Rust applications are packaged by using the `buildRustPackage` helper from `rustPlatform`:
|
Rust applications are packaged by using the `buildRustPackage` helper from `rustPlatform`:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
{ lib, rustPlatform }:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "ripgrep";
|
pname = "ripgrep";
|
||||||
version = "12.1.1";
|
version = "12.1.1";
|
||||||
@ -226,8 +228,6 @@ source code in a reproducible way. If it is missing or out-of-date one can use
|
|||||||
the `cargoPatches` attribute to update or add it.
|
the `cargoPatches` attribute to update or add it.
|
||||||
|
|
||||||
```
|
```
|
||||||
{ lib, rustPlatform, fetchFromGitHub }:
|
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
(...)
|
(...)
|
||||||
cargoPatches = [
|
cargoPatches = [
|
||||||
@ -263,7 +263,7 @@ Now, the file produced by the call to `carnix`, called `hello.nix`, looks like:
|
|||||||
|
|
||||||
```
|
```
|
||||||
# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
|
# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
|
||||||
{ lib, stdenv, buildRustCrate, fetchgit }:
|
{ stdenv, buildRustCrate, fetchgit }:
|
||||||
let kernel = stdenv.buildPlatform.parsed.kernel.name;
|
let kernel = stdenv.buildPlatform.parsed.kernel.name;
|
||||||
# ... (content skipped)
|
# ... (content skipped)
|
||||||
in
|
in
|
||||||
@ -292,7 +292,7 @@ following nix file:
|
|||||||
|
|
||||||
```
|
```
|
||||||
# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
|
# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
|
||||||
{ lib, stdenv, buildRustCrate, fetchgit }:
|
{ stdenv, buildRustCrate, fetchgit }:
|
||||||
let kernel = stdenv.buildPlatform.parsed.kernel.name;
|
let kernel = stdenv.buildPlatform.parsed.kernel.name;
|
||||||
# ... (content skipped)
|
# ... (content skipped)
|
||||||
in
|
in
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
{ pkgs ? import ../. {} }:
|
{ pkgs ? import ../. { } }:
|
||||||
(import ./default.nix {}).overrideAttrs (x: {
|
(import ./default.nix { }).overrideAttrs
|
||||||
buildInputs = x.buildInputs ++ [ pkgs.xmloscopy pkgs.ruby ];
|
(x: { buildInputs = (x.buildInputs or [ ]) ++ [ pkgs.xmloscopy pkgs.ruby ]; })
|
||||||
|
|
||||||
})
|
|
||||||
|
@ -291,5 +291,40 @@ stdenv.mkDerivation {
|
|||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</section>
|
</section>
|
||||||
|
<section xml:id="sec-overlays-alternatives-mpi">
|
||||||
|
<title>Switching the MPI implementation</title>
|
||||||
|
<para>
|
||||||
|
All programs that are built with
|
||||||
|
<link xlink:href="https://en.wikipedia.org/wiki/Message_Passing_Interface">MPI</link>
|
||||||
|
support use the generic attribute <varname>mpi</varname>
|
||||||
|
as an input. At the moment Nixpkgs natively provides two different
|
||||||
|
MPI implementations:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<link xlink:href="https://www.open-mpi.org/">Open MPI</link>
|
||||||
|
(default), attribute name <varname>openmpi</varname>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<link xlink:href="https://www.mpich.org/">MPICH</link>,
|
||||||
|
attribute name <varname>mpich</varname>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
To provide MPI enabled applications that use <literal>MPICH</literal>, instead
|
||||||
|
of the default <literal>Open MPI</literal>, simply use the following overlay:
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
self: super:
|
||||||
|
|
||||||
|
{
|
||||||
|
mpi = self.mpich;
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
@ -148,6 +148,28 @@ rec {
|
|||||||
/* A combination of `traceVal` and `traceSeqN`. */
|
/* A combination of `traceVal` and `traceSeqN`. */
|
||||||
traceValSeqN = traceValSeqNFn id;
|
traceValSeqN = traceValSeqNFn id;
|
||||||
|
|
||||||
|
/* Trace the input and output of a function `f` named `name`,
|
||||||
|
both down to `depth`.
|
||||||
|
|
||||||
|
This is useful for adding around a function call,
|
||||||
|
to see the before/after of values as they are transformed.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
traceFnSeqN 2 "id" (x: x) { a.b.c = 3; }
|
||||||
|
trace: { fn = "id"; from = { a.b = {…}; }; to = { a.b = {…}; }; }
|
||||||
|
=> { a.b.c = 3; }
|
||||||
|
*/
|
||||||
|
traceFnSeqN = depth: name: f: v:
|
||||||
|
let res = f v;
|
||||||
|
in lib.traceSeqN
|
||||||
|
(depth + 1)
|
||||||
|
{
|
||||||
|
fn = name;
|
||||||
|
from = v;
|
||||||
|
to = res;
|
||||||
|
}
|
||||||
|
res;
|
||||||
|
|
||||||
|
|
||||||
# -- TESTING --
|
# -- TESTING --
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ let
|
|||||||
assertMsg assertOneOf;
|
assertMsg assertOneOf;
|
||||||
inherit (self.debug) addErrorContextToAttrs traceIf traceVal traceValFn
|
inherit (self.debug) addErrorContextToAttrs traceIf traceVal traceValFn
|
||||||
traceXMLVal traceXMLValMarked traceSeq traceSeqN traceValSeq
|
traceXMLVal traceXMLValMarked traceSeq traceSeqN traceValSeq
|
||||||
traceValSeqFn traceValSeqN traceValSeqNFn traceShowVal
|
traceValSeqFn traceValSeqN traceValSeqNFn traceFnSeqN traceShowVal
|
||||||
traceShowValMarked showVal traceCall traceCall2 traceCall3
|
traceShowValMarked showVal traceCall traceCall2 traceCall3
|
||||||
traceValIfNot runTests testAllTrue traceCallXml attrNamesToStr;
|
traceValIfNot runTests testAllTrue traceCallXml attrNamesToStr;
|
||||||
inherit (self.misc) maybeEnv defaultMergeArg defaultMerge foldArgs
|
inherit (self.misc) maybeEnv defaultMergeArg defaultMerge foldArgs
|
||||||
|
@ -87,7 +87,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
|
|||||||
|
|
||||||
beerware = spdx {
|
beerware = spdx {
|
||||||
spdxId = "Beerware";
|
spdxId = "Beerware";
|
||||||
fullName = ''Beerware License'';
|
fullName = "Beerware License";
|
||||||
};
|
};
|
||||||
|
|
||||||
blueOak100 = spdx {
|
blueOak100 = spdx {
|
||||||
@ -107,7 +107,7 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
|
|||||||
|
|
||||||
bsd2Patent = spdx {
|
bsd2Patent = spdx {
|
||||||
spdxId = "BSD-2-Clause-Patent";
|
spdxId = "BSD-2-Clause-Patent";
|
||||||
fullName = ''BSD-2-Clause Plus Patent License'';
|
fullName = "BSD-2-Clause Plus Patent License";
|
||||||
};
|
};
|
||||||
|
|
||||||
bsd3 = spdx {
|
bsd3 = spdx {
|
||||||
|
@ -895,7 +895,7 @@ rec {
|
|||||||
fromOpt = getAttrFromPath from options;
|
fromOpt = getAttrFromPath from 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.");
|
||||||
toType = let opt = attrByPath to {} options; in opt.type or null;
|
toType = let opt = attrByPath to {} options; in opt.type or (types.submodule {});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = setAttrByPath from (mkOption {
|
options = setAttrByPath from (mkOption {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ lib }:
|
{ lib }:
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
# platform.gcc.arch to its features (as in /proc/cpuinfo)
|
# gcc.arch to its features (as in /proc/cpuinfo)
|
||||||
features = {
|
features = {
|
||||||
default = [ ];
|
default = [ ];
|
||||||
# x86_64 Intel
|
# x86_64 Intel
|
||||||
|
@ -24,8 +24,6 @@ rec {
|
|||||||
# Either of these can be losslessly-extracted from `parsed` iff parsing succeeds.
|
# Either of these can be losslessly-extracted from `parsed` iff parsing succeeds.
|
||||||
system = parse.doubleFromSystem final.parsed;
|
system = parse.doubleFromSystem final.parsed;
|
||||||
config = parse.tripleFromSystem final.parsed;
|
config = parse.tripleFromSystem final.parsed;
|
||||||
# Just a guess, based on `system`
|
|
||||||
platform = platforms.select final;
|
|
||||||
# Determine whether we are compatible with the provided CPU
|
# Determine whether we are compatible with the provided CPU
|
||||||
isCompatible = platform: parse.isCompatible final.parsed.cpu platform.parsed.cpu;
|
isCompatible = platform: parse.isCompatible final.parsed.cpu platform.parsed.cpu;
|
||||||
# Derived meta-data
|
# Derived meta-data
|
||||||
@ -79,12 +77,23 @@ rec {
|
|||||||
};
|
};
|
||||||
isStatic = final.isWasm || final.isRedox;
|
isStatic = final.isWasm || final.isRedox;
|
||||||
|
|
||||||
kernelArch =
|
# Just a guess, based on `system`
|
||||||
|
inherit
|
||||||
|
({
|
||||||
|
linux-kernel = args.linux-kernel or {};
|
||||||
|
gcc = args.gcc or {};
|
||||||
|
rustc = args.rust or {};
|
||||||
|
} // platforms.select final)
|
||||||
|
linux-kernel gcc rustc;
|
||||||
|
|
||||||
|
linuxArch =
|
||||||
if final.isAarch32 then "arm"
|
if final.isAarch32 then "arm"
|
||||||
else if final.isAarch64 then "arm64"
|
else if final.isAarch64 then "arm64"
|
||||||
else if final.isx86_32 then "x86"
|
else if final.isx86_32 then "i386"
|
||||||
else if final.isx86_64 then "x86"
|
else if final.isx86_64 then "x86_64"
|
||||||
else if final.isMips then "mips"
|
else if final.isMips then "mips"
|
||||||
|
else if final.isPower then "powerpc"
|
||||||
|
else if final.isRiscV then "riscv"
|
||||||
else final.parsed.cpu.name;
|
else final.parsed.cpu.name;
|
||||||
|
|
||||||
qemuArch =
|
qemuArch =
|
||||||
@ -129,7 +138,7 @@ rec {
|
|||||||
else throw "Don't know how to run ${final.config} executables.";
|
else throw "Don't know how to run ${final.config} executables.";
|
||||||
|
|
||||||
} // mapAttrs (n: v: v final.parsed) inspect.predicates
|
} // mapAttrs (n: v: v final.parsed) inspect.predicates
|
||||||
// mapAttrs (n: v: v final.platform.gcc.arch or "default") architectures.predicates
|
// mapAttrs (n: v: v final.gcc.arch or "default") architectures.predicates
|
||||||
// args;
|
// args;
|
||||||
in assert final.useAndroidPrebuilt -> final.isAndroid;
|
in assert final.useAndroidPrebuilt -> final.isAndroid;
|
||||||
assert lib.foldl
|
assert lib.foldl
|
||||||
|
@ -7,7 +7,6 @@ let
|
|||||||
|
|
||||||
riscv = bits: {
|
riscv = bits: {
|
||||||
config = "riscv${bits}-unknown-linux-gnu";
|
config = "riscv${bits}-unknown-linux-gnu";
|
||||||
platform = platforms.riscv-multiplatform;
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -17,84 +16,68 @@ rec {
|
|||||||
#
|
#
|
||||||
powernv = {
|
powernv = {
|
||||||
config = "powerpc64le-unknown-linux-gnu";
|
config = "powerpc64le-unknown-linux-gnu";
|
||||||
platform = platforms.powernv;
|
|
||||||
};
|
};
|
||||||
musl-power = {
|
musl-power = {
|
||||||
config = "powerpc64le-unknown-linux-musl";
|
config = "powerpc64le-unknown-linux-musl";
|
||||||
platform = platforms.powernv;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sheevaplug = {
|
sheevaplug = {
|
||||||
config = "armv5tel-unknown-linux-gnueabi";
|
config = "armv5tel-unknown-linux-gnueabi";
|
||||||
platform = platforms.sheevaplug;
|
} // platforms.sheevaplug;
|
||||||
};
|
|
||||||
|
|
||||||
raspberryPi = {
|
raspberryPi = {
|
||||||
config = "armv6l-unknown-linux-gnueabihf";
|
config = "armv6l-unknown-linux-gnueabihf";
|
||||||
platform = platforms.raspberrypi;
|
} // platforms.raspberrypi;
|
||||||
};
|
|
||||||
|
|
||||||
remarkable1 = {
|
remarkable1 = {
|
||||||
config = "armv7l-unknown-linux-gnueabihf";
|
config = "armv7l-unknown-linux-gnueabihf";
|
||||||
platform = platforms.zero-gravitas;
|
} // platforms.zero-gravitas;
|
||||||
};
|
|
||||||
|
|
||||||
remarkable2 = {
|
remarkable2 = {
|
||||||
config = "armv7l-unknown-linux-gnueabihf";
|
config = "armv7l-unknown-linux-gnueabihf";
|
||||||
platform = platforms.zero-sugar;
|
} // platforms.zero-sugar;
|
||||||
};
|
|
||||||
|
|
||||||
armv7l-hf-multiplatform = {
|
armv7l-hf-multiplatform = {
|
||||||
config = "armv7l-unknown-linux-gnueabihf";
|
config = "armv7l-unknown-linux-gnueabihf";
|
||||||
platform = platforms.armv7l-hf-multiplatform;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
aarch64-multiplatform = {
|
aarch64-multiplatform = {
|
||||||
config = "aarch64-unknown-linux-gnu";
|
config = "aarch64-unknown-linux-gnu";
|
||||||
platform = platforms.aarch64-multiplatform;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
armv7a-android-prebuilt = {
|
armv7a-android-prebuilt = {
|
||||||
config = "armv7a-unknown-linux-androideabi";
|
config = "armv7a-unknown-linux-androideabi";
|
||||||
sdkVer = "29";
|
sdkVer = "29";
|
||||||
ndkVer = "21";
|
ndkVer = "21";
|
||||||
platform = platforms.armv7a-android;
|
|
||||||
useAndroidPrebuilt = true;
|
useAndroidPrebuilt = true;
|
||||||
};
|
} // platforms.armv7a-android;
|
||||||
|
|
||||||
aarch64-android-prebuilt = {
|
aarch64-android-prebuilt = {
|
||||||
config = "aarch64-unknown-linux-android";
|
config = "aarch64-unknown-linux-android";
|
||||||
sdkVer = "29";
|
sdkVer = "29";
|
||||||
ndkVer = "21";
|
ndkVer = "21";
|
||||||
platform = platforms.aarch64-multiplatform;
|
|
||||||
useAndroidPrebuilt = true;
|
useAndroidPrebuilt = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
scaleway-c1 = armv7l-hf-multiplatform // rec {
|
scaleway-c1 = armv7l-hf-multiplatform // platforms.scaleway-c1;
|
||||||
platform = platforms.scaleway-c1;
|
|
||||||
inherit (platform.gcc) fpu;
|
|
||||||
};
|
|
||||||
|
|
||||||
pogoplug4 = {
|
pogoplug4 = {
|
||||||
config = "armv5tel-unknown-linux-gnueabi";
|
config = "armv5tel-unknown-linux-gnueabi";
|
||||||
platform = platforms.pogoplug4;
|
} // platforms.pogoplug4;
|
||||||
};
|
|
||||||
|
|
||||||
ben-nanonote = {
|
ben-nanonote = {
|
||||||
config = "mipsel-unknown-linux-uclibc";
|
config = "mipsel-unknown-linux-uclibc";
|
||||||
platform = platforms.ben_nanonote;
|
} // platforms.ben_nanonote;
|
||||||
};
|
|
||||||
|
|
||||||
fuloongminipc = {
|
fuloongminipc = {
|
||||||
config = "mipsel-unknown-linux-gnu";
|
config = "mipsel-unknown-linux-gnu";
|
||||||
platform = platforms.fuloong2f_n32;
|
} // platforms.fuloong2f_n32;
|
||||||
};
|
|
||||||
|
|
||||||
muslpi = raspberryPi // {
|
muslpi = raspberryPi // {
|
||||||
config = "armv6l-unknown-linux-musleabihf";
|
config = "armv6l-unknown-linux-musleabihf";
|
||||||
};
|
};
|
||||||
|
|
||||||
aarch64-multiplatform-musl = aarch64-multiplatform // {
|
aarch64-multiplatform-musl = {
|
||||||
config = "aarch64-unknown-linux-musl";
|
config = "aarch64-unknown-linux-musl";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -110,13 +93,11 @@ rec {
|
|||||||
riscv64-embedded = {
|
riscv64-embedded = {
|
||||||
config = "riscv64-none-elf";
|
config = "riscv64-none-elf";
|
||||||
libc = "newlib";
|
libc = "newlib";
|
||||||
platform = platforms.riscv-multiplatform;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
riscv32-embedded = {
|
riscv32-embedded = {
|
||||||
config = "riscv32-none-elf";
|
config = "riscv32-none-elf";
|
||||||
libc = "newlib";
|
libc = "newlib";
|
||||||
platform = platforms.riscv-multiplatform;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mmix = {
|
mmix = {
|
||||||
@ -136,13 +117,11 @@ rec {
|
|||||||
vc4 = {
|
vc4 = {
|
||||||
config = "vc4-elf";
|
config = "vc4-elf";
|
||||||
libc = "newlib";
|
libc = "newlib";
|
||||||
platform = {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
or1k = {
|
or1k = {
|
||||||
config = "or1k-elf";
|
config = "or1k-elf";
|
||||||
libc = "newlib";
|
libc = "newlib";
|
||||||
platform = {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
arm-embedded = {
|
arm-embedded = {
|
||||||
@ -200,41 +179,37 @@ rec {
|
|||||||
iphone64 = {
|
iphone64 = {
|
||||||
config = "aarch64-apple-ios";
|
config = "aarch64-apple-ios";
|
||||||
# config = "aarch64-apple-darwin14";
|
# config = "aarch64-apple-darwin14";
|
||||||
sdkVer = "13.2";
|
sdkVer = "14.3";
|
||||||
xcodeVer = "11.3.1";
|
xcodeVer = "12.3";
|
||||||
xcodePlatform = "iPhoneOS";
|
xcodePlatform = "iPhoneOS";
|
||||||
useiOSPrebuilt = true;
|
useiOSPrebuilt = true;
|
||||||
platform = {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
iphone32 = {
|
iphone32 = {
|
||||||
config = "armv7a-apple-ios";
|
config = "armv7a-apple-ios";
|
||||||
# config = "arm-apple-darwin10";
|
# config = "arm-apple-darwin10";
|
||||||
sdkVer = "13.2";
|
sdkVer = "14.3";
|
||||||
xcodeVer = "11.3.1";
|
xcodeVer = "12.3";
|
||||||
xcodePlatform = "iPhoneOS";
|
xcodePlatform = "iPhoneOS";
|
||||||
useiOSPrebuilt = true;
|
useiOSPrebuilt = true;
|
||||||
platform = {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
iphone64-simulator = {
|
iphone64-simulator = {
|
||||||
config = "x86_64-apple-ios";
|
config = "x86_64-apple-ios";
|
||||||
# config = "x86_64-apple-darwin14";
|
# config = "x86_64-apple-darwin14";
|
||||||
sdkVer = "13.2";
|
sdkVer = "14.3";
|
||||||
xcodeVer = "11.3.1";
|
xcodeVer = "12.3";
|
||||||
xcodePlatform = "iPhoneSimulator";
|
xcodePlatform = "iPhoneSimulator";
|
||||||
useiOSPrebuilt = true;
|
useiOSPrebuilt = true;
|
||||||
platform = {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
iphone32-simulator = {
|
iphone32-simulator = {
|
||||||
config = "i686-apple-ios";
|
config = "i686-apple-ios";
|
||||||
# config = "i386-apple-darwin11";
|
# config = "i386-apple-darwin11";
|
||||||
sdkVer = "13.2";
|
sdkVer = "14.3";
|
||||||
xcodeVer = "11.3.1";
|
xcodeVer = "12.3";
|
||||||
xcodePlatform = "iPhoneSimulator";
|
xcodePlatform = "iPhoneSimulator";
|
||||||
useiOSPrebuilt = true;
|
useiOSPrebuilt = true;
|
||||||
platform = {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -245,7 +220,6 @@ rec {
|
|||||||
mingw32 = {
|
mingw32 = {
|
||||||
config = "i686-w64-mingw32";
|
config = "i686-w64-mingw32";
|
||||||
libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
|
libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
|
||||||
platform = {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# 64 bit mingw-w64
|
# 64 bit mingw-w64
|
||||||
@ -253,7 +227,6 @@ rec {
|
|||||||
# That's the triplet they use in the mingw-w64 docs.
|
# That's the triplet they use in the mingw-w64 docs.
|
||||||
config = "x86_64-w64-mingw32";
|
config = "x86_64-w64-mingw32";
|
||||||
libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
|
libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
|
||||||
platform = {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# BSDs
|
# BSDs
|
||||||
@ -275,6 +248,5 @@ rec {
|
|||||||
# Ghcjs
|
# Ghcjs
|
||||||
ghcjs = {
|
ghcjs = {
|
||||||
config = "js-unknown-ghcjs";
|
config = "js-unknown-ghcjs";
|
||||||
platform = {};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,39 +1,36 @@
|
|||||||
{ lib }:
|
{ lib }:
|
||||||
rec {
|
rec {
|
||||||
pcBase = {
|
pc = {
|
||||||
name = "pc";
|
linux-kernel = {
|
||||||
kernelBaseConfig = "defconfig";
|
name = "pc";
|
||||||
# Build whatever possible as a module, if not stated in the extra config.
|
|
||||||
kernelAutoModules = true;
|
baseConfig = "defconfig";
|
||||||
kernelTarget = "bzImage";
|
# Build whatever possible as a module, if not stated in the extra config.
|
||||||
|
autoModules = true;
|
||||||
|
target = "bzImage";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
pc64 = pcBase // { kernelArch = "x86_64"; };
|
pc_simplekernel = lib.recursiveUpdate pc {
|
||||||
|
linux-kernel.autoModules = false;
|
||||||
pc32 = pcBase // { kernelArch = "i386"; };
|
|
||||||
|
|
||||||
pc32_simplekernel = pc32 // {
|
|
||||||
kernelAutoModules = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
pc64_simplekernel = pc64 // {
|
|
||||||
kernelAutoModules = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
powernv = {
|
powernv = {
|
||||||
name = "PowerNV";
|
linux-kernel = {
|
||||||
kernelArch = "powerpc";
|
name = "PowerNV";
|
||||||
kernelBaseConfig = "powernv_defconfig";
|
|
||||||
kernelTarget = "zImage";
|
baseConfig = "powernv_defconfig";
|
||||||
kernelInstallTarget = "install";
|
target = "zImage";
|
||||||
kernelFile = "vmlinux";
|
installTarget = "install";
|
||||||
kernelAutoModules = true;
|
file = "vmlinux";
|
||||||
# avoid driver/FS trouble arising from unusual page size
|
autoModules = true;
|
||||||
kernelExtraConfig = ''
|
# avoid driver/FS trouble arising from unusual page size
|
||||||
PPC_64K_PAGES n
|
extraConfig = ''
|
||||||
PPC_4K_PAGES y
|
PPC_64K_PAGES n
|
||||||
IPV6 y
|
PPC_4K_PAGES y
|
||||||
'';
|
IPV6 y
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
##
|
##
|
||||||
@ -41,17 +38,12 @@ rec {
|
|||||||
##
|
##
|
||||||
|
|
||||||
pogoplug4 = {
|
pogoplug4 = {
|
||||||
name = "pogoplug4";
|
linux-kernel = {
|
||||||
|
name = "pogoplug4";
|
||||||
|
|
||||||
gcc = {
|
baseConfig = "multi_v5_defconfig";
|
||||||
arch = "armv5te";
|
autoModules = false;
|
||||||
};
|
extraConfig = ''
|
||||||
|
|
||||||
kernelBaseConfig = "multi_v5_defconfig";
|
|
||||||
kernelArch = "arm";
|
|
||||||
kernelAutoModules = false;
|
|
||||||
kernelExtraConfig =
|
|
||||||
''
|
|
||||||
# Ubi for the mtd
|
# Ubi for the mtd
|
||||||
MTD_UBI y
|
MTD_UBI y
|
||||||
UBIFS_FS y
|
UBIFS_FS y
|
||||||
@ -61,136 +53,144 @@ rec {
|
|||||||
UBIFS_FS_ZLIB y
|
UBIFS_FS_ZLIB y
|
||||||
UBIFS_FS_DEBUG n
|
UBIFS_FS_DEBUG n
|
||||||
'';
|
'';
|
||||||
kernelMakeFlags = [ "LOADADDR=0x8000" ];
|
makeFlags = [ "LOADADDR=0x8000" ];
|
||||||
kernelTarget = "uImage";
|
target = "uImage";
|
||||||
# TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working
|
# TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working
|
||||||
#kernelDTB = true;
|
#DTB = true;
|
||||||
|
};
|
||||||
|
gcc = {
|
||||||
|
arch = "armv5te";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sheevaplug = {
|
sheevaplug = {
|
||||||
name = "sheevaplug";
|
linux-kernel = {
|
||||||
kernelBaseConfig = "multi_v5_defconfig";
|
name = "sheevaplug";
|
||||||
kernelArch = "arm";
|
|
||||||
kernelAutoModules = false;
|
|
||||||
kernelExtraConfig = ''
|
|
||||||
BLK_DEV_RAM y
|
|
||||||
BLK_DEV_INITRD y
|
|
||||||
BLK_DEV_CRYPTOLOOP m
|
|
||||||
BLK_DEV_DM m
|
|
||||||
DM_CRYPT m
|
|
||||||
MD y
|
|
||||||
REISERFS_FS m
|
|
||||||
BTRFS_FS m
|
|
||||||
XFS_FS m
|
|
||||||
JFS_FS m
|
|
||||||
EXT4_FS m
|
|
||||||
USB_STORAGE_CYPRESS_ATACB m
|
|
||||||
|
|
||||||
# mv cesa requires this sw fallback, for mv-sha1
|
baseConfig = "multi_v5_defconfig";
|
||||||
CRYPTO_SHA1 y
|
autoModules = false;
|
||||||
# Fast crypto
|
extraConfig = ''
|
||||||
CRYPTO_TWOFISH y
|
BLK_DEV_RAM y
|
||||||
CRYPTO_TWOFISH_COMMON y
|
BLK_DEV_INITRD y
|
||||||
CRYPTO_BLOWFISH y
|
BLK_DEV_CRYPTOLOOP m
|
||||||
CRYPTO_BLOWFISH_COMMON y
|
BLK_DEV_DM m
|
||||||
|
DM_CRYPT m
|
||||||
|
MD y
|
||||||
|
REISERFS_FS m
|
||||||
|
BTRFS_FS m
|
||||||
|
XFS_FS m
|
||||||
|
JFS_FS m
|
||||||
|
EXT4_FS m
|
||||||
|
USB_STORAGE_CYPRESS_ATACB m
|
||||||
|
|
||||||
IP_PNP y
|
# mv cesa requires this sw fallback, for mv-sha1
|
||||||
IP_PNP_DHCP y
|
CRYPTO_SHA1 y
|
||||||
NFS_FS y
|
# Fast crypto
|
||||||
ROOT_NFS y
|
CRYPTO_TWOFISH y
|
||||||
TUN m
|
CRYPTO_TWOFISH_COMMON y
|
||||||
NFS_V4 y
|
CRYPTO_BLOWFISH y
|
||||||
NFS_V4_1 y
|
CRYPTO_BLOWFISH_COMMON y
|
||||||
NFS_FSCACHE y
|
|
||||||
NFSD m
|
|
||||||
NFSD_V2_ACL y
|
|
||||||
NFSD_V3 y
|
|
||||||
NFSD_V3_ACL y
|
|
||||||
NFSD_V4 y
|
|
||||||
NETFILTER y
|
|
||||||
IP_NF_IPTABLES y
|
|
||||||
IP_NF_FILTER y
|
|
||||||
IP_NF_MATCH_ADDRTYPE y
|
|
||||||
IP_NF_TARGET_LOG y
|
|
||||||
IP_NF_MANGLE y
|
|
||||||
IPV6 m
|
|
||||||
VLAN_8021Q m
|
|
||||||
|
|
||||||
CIFS y
|
IP_PNP y
|
||||||
CIFS_XATTR y
|
IP_PNP_DHCP y
|
||||||
CIFS_POSIX y
|
NFS_FS y
|
||||||
CIFS_FSCACHE y
|
ROOT_NFS y
|
||||||
CIFS_ACL y
|
TUN m
|
||||||
|
NFS_V4 y
|
||||||
|
NFS_V4_1 y
|
||||||
|
NFS_FSCACHE y
|
||||||
|
NFSD m
|
||||||
|
NFSD_V2_ACL y
|
||||||
|
NFSD_V3 y
|
||||||
|
NFSD_V3_ACL y
|
||||||
|
NFSD_V4 y
|
||||||
|
NETFILTER y
|
||||||
|
IP_NF_IPTABLES y
|
||||||
|
IP_NF_FILTER y
|
||||||
|
IP_NF_MATCH_ADDRTYPE y
|
||||||
|
IP_NF_TARGET_LOG y
|
||||||
|
IP_NF_MANGLE y
|
||||||
|
IPV6 m
|
||||||
|
VLAN_8021Q m
|
||||||
|
|
||||||
WATCHDOG y
|
CIFS y
|
||||||
WATCHDOG_CORE y
|
CIFS_XATTR y
|
||||||
ORION_WATCHDOG m
|
CIFS_POSIX y
|
||||||
|
CIFS_FSCACHE y
|
||||||
|
CIFS_ACL y
|
||||||
|
|
||||||
ZRAM m
|
WATCHDOG y
|
||||||
NETCONSOLE m
|
WATCHDOG_CORE y
|
||||||
|
ORION_WATCHDOG m
|
||||||
|
|
||||||
# Disable OABI to have seccomp_filter (required for systemd)
|
ZRAM m
|
||||||
# https://github.com/raspberrypi/firmware/issues/651
|
NETCONSOLE m
|
||||||
OABI_COMPAT n
|
|
||||||
|
|
||||||
# Fail to build
|
# Disable OABI to have seccomp_filter (required for systemd)
|
||||||
DRM n
|
# https://github.com/raspberrypi/firmware/issues/651
|
||||||
SCSI_ADVANSYS n
|
OABI_COMPAT n
|
||||||
USB_ISP1362_HCD n
|
|
||||||
SND_SOC n
|
|
||||||
SND_ALI5451 n
|
|
||||||
FB_SAVAGE n
|
|
||||||
SCSI_NSP32 n
|
|
||||||
ATA_SFF n
|
|
||||||
SUNGEM n
|
|
||||||
IRDA n
|
|
||||||
ATM_HE n
|
|
||||||
SCSI_ACARD n
|
|
||||||
BLK_DEV_CMD640_ENHANCED n
|
|
||||||
|
|
||||||
FUSE_FS m
|
# Fail to build
|
||||||
|
DRM n
|
||||||
|
SCSI_ADVANSYS n
|
||||||
|
USB_ISP1362_HCD n
|
||||||
|
SND_SOC n
|
||||||
|
SND_ALI5451 n
|
||||||
|
FB_SAVAGE n
|
||||||
|
SCSI_NSP32 n
|
||||||
|
ATA_SFF n
|
||||||
|
SUNGEM n
|
||||||
|
IRDA n
|
||||||
|
ATM_HE n
|
||||||
|
SCSI_ACARD n
|
||||||
|
BLK_DEV_CMD640_ENHANCED n
|
||||||
|
|
||||||
# systemd uses cgroups
|
FUSE_FS m
|
||||||
CGROUPS y
|
|
||||||
|
|
||||||
# Latencytop
|
# systemd uses cgroups
|
||||||
LATENCYTOP y
|
CGROUPS y
|
||||||
|
|
||||||
# Ubi for the mtd
|
# Latencytop
|
||||||
MTD_UBI y
|
LATENCYTOP y
|
||||||
UBIFS_FS y
|
|
||||||
UBIFS_FS_XATTR y
|
|
||||||
UBIFS_FS_ADVANCED_COMPR y
|
|
||||||
UBIFS_FS_LZO y
|
|
||||||
UBIFS_FS_ZLIB y
|
|
||||||
UBIFS_FS_DEBUG n
|
|
||||||
|
|
||||||
# Kdb, for kernel troubles
|
# Ubi for the mtd
|
||||||
KGDB y
|
MTD_UBI y
|
||||||
KGDB_SERIAL_CONSOLE y
|
UBIFS_FS y
|
||||||
KGDB_KDB y
|
UBIFS_FS_XATTR y
|
||||||
'';
|
UBIFS_FS_ADVANCED_COMPR y
|
||||||
kernelMakeFlags = [ "LOADADDR=0x0200000" ];
|
UBIFS_FS_LZO y
|
||||||
kernelTarget = "uImage";
|
UBIFS_FS_ZLIB y
|
||||||
kernelDTB = true; # Beyond 3.10
|
UBIFS_FS_DEBUG n
|
||||||
|
|
||||||
|
# Kdb, for kernel troubles
|
||||||
|
KGDB y
|
||||||
|
KGDB_SERIAL_CONSOLE y
|
||||||
|
KGDB_KDB y
|
||||||
|
'';
|
||||||
|
makeFlags = [ "LOADADDR=0x0200000" ];
|
||||||
|
target = "uImage";
|
||||||
|
DTB = true; # Beyond 3.10
|
||||||
|
};
|
||||||
gcc = {
|
gcc = {
|
||||||
arch = "armv5te";
|
arch = "armv5te";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
raspberrypi = {
|
raspberrypi = {
|
||||||
name = "raspberrypi";
|
linux-kernel = {
|
||||||
kernelBaseConfig = "bcm2835_defconfig";
|
name = "raspberrypi";
|
||||||
kernelDTB = true;
|
|
||||||
kernelArch = "arm";
|
baseConfig = "bcm2835_defconfig";
|
||||||
kernelAutoModules = true;
|
DTB = true;
|
||||||
kernelPreferBuiltin = true;
|
autoModules = true;
|
||||||
kernelExtraConfig = ''
|
preferBuiltin = true;
|
||||||
# Disable OABI to have seccomp_filter (required for systemd)
|
extraConfig = ''
|
||||||
# https://github.com/raspberrypi/firmware/issues/651
|
# Disable OABI to have seccomp_filter (required for systemd)
|
||||||
OABI_COMPAT n
|
# https://github.com/raspberrypi/firmware/issues/651
|
||||||
'';
|
OABI_COMPAT n
|
||||||
kernelTarget = "zImage";
|
'';
|
||||||
|
target = "zImage";
|
||||||
|
};
|
||||||
gcc = {
|
gcc = {
|
||||||
arch = "armv6";
|
arch = "armv6";
|
||||||
fpu = "vfp";
|
fpu = "vfp";
|
||||||
@ -201,13 +201,15 @@ rec {
|
|||||||
raspberrypi2 = armv7l-hf-multiplatform;
|
raspberrypi2 = armv7l-hf-multiplatform;
|
||||||
|
|
||||||
zero-gravitas = {
|
zero-gravitas = {
|
||||||
name = "zero-gravitas";
|
linux-kernel = {
|
||||||
kernelBaseConfig = "zero-gravitas_defconfig";
|
name = "zero-gravitas";
|
||||||
kernelArch = "arm";
|
|
||||||
# kernelTarget verified by checking /boot on reMarkable 1 device
|
baseConfig = "zero-gravitas_defconfig";
|
||||||
kernelTarget = "zImage";
|
# Target verified by checking /boot on reMarkable 1 device
|
||||||
kernelAutoModules = false;
|
target = "zImage";
|
||||||
kernelDTB = true;
|
autoModules = false;
|
||||||
|
DTB = true;
|
||||||
|
};
|
||||||
gcc = {
|
gcc = {
|
||||||
fpu = "neon";
|
fpu = "neon";
|
||||||
cpu = "cortex-a9";
|
cpu = "cortex-a9";
|
||||||
@ -215,13 +217,15 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
zero-sugar = {
|
zero-sugar = {
|
||||||
name = "zero-sugar";
|
linux-kernel = {
|
||||||
kernelBaseConfig = "zero-sugar_defconfig";
|
name = "zero-sugar";
|
||||||
kernelArch = "arm";
|
|
||||||
kernelDTB = true;
|
baseConfig = "zero-sugar_defconfig";
|
||||||
kernelAutoModules = false;
|
DTB = true;
|
||||||
kernelPreferBuiltin = true;
|
autoModules = false;
|
||||||
kernelTarget = "zImage";
|
preferBuiltin = true;
|
||||||
|
target = "zImage";
|
||||||
|
};
|
||||||
gcc = {
|
gcc = {
|
||||||
cpu = "cortex-a7";
|
cpu = "cortex-a7";
|
||||||
fpu = "neon-vfpv4";
|
fpu = "neon-vfpv4";
|
||||||
@ -229,7 +233,7 @@ rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
scaleway-c1 = armv7l-hf-multiplatform // {
|
scaleway-c1 = lib.recursiveUpdate armv7l-hf-multiplatform {
|
||||||
gcc = {
|
gcc = {
|
||||||
cpu = "cortex-a9";
|
cpu = "cortex-a9";
|
||||||
fpu = "vfpv3";
|
fpu = "vfpv3";
|
||||||
@ -237,12 +241,11 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
utilite = {
|
utilite = {
|
||||||
name = "utilite";
|
linux-kernel = {
|
||||||
kernelBaseConfig = "multi_v7_defconfig";
|
name = "utilite";
|
||||||
kernelArch = "arm";
|
maseConfig = "multi_v7_defconfig";
|
||||||
kernelAutoModules = false;
|
autoModules = false;
|
||||||
kernelExtraConfig =
|
extraConfig = ''
|
||||||
''
|
|
||||||
# Ubi for the mtd
|
# Ubi for the mtd
|
||||||
MTD_UBI y
|
MTD_UBI y
|
||||||
UBIFS_FS y
|
UBIFS_FS y
|
||||||
@ -252,35 +255,37 @@ rec {
|
|||||||
UBIFS_FS_ZLIB y
|
UBIFS_FS_ZLIB y
|
||||||
UBIFS_FS_DEBUG n
|
UBIFS_FS_DEBUG n
|
||||||
'';
|
'';
|
||||||
kernelMakeFlags = [ "LOADADDR=0x10800000" ];
|
makeFlags = [ "LOADADDR=0x10800000" ];
|
||||||
kernelTarget = "uImage";
|
target = "uImage";
|
||||||
kernelDTB = true;
|
DTB = true;
|
||||||
|
};
|
||||||
gcc = {
|
gcc = {
|
||||||
cpu = "cortex-a9";
|
cpu = "cortex-a9";
|
||||||
fpu = "neon";
|
fpu = "neon";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
guruplug = sheevaplug // {
|
guruplug = lib.recursiveUpdate sheevaplug {
|
||||||
# Define `CONFIG_MACH_GURUPLUG' (see
|
# Define `CONFIG_MACH_GURUPLUG' (see
|
||||||
# <http://kerneltrap.org/mailarchive/git-commits-head/2010/5/19/33618>)
|
# <http://kerneltrap.org/mailarchive/git-commits-head/2010/5/19/33618>)
|
||||||
# and other GuruPlug-specific things. Requires the `guruplug-defconfig'
|
# and other GuruPlug-specific things. Requires the `guruplug-defconfig'
|
||||||
# patch.
|
# patch.
|
||||||
|
linux-kernel.baseConfig = "guruplug_defconfig";
|
||||||
kernelBaseConfig = "guruplug_defconfig";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
beaglebone = armv7l-hf-multiplatform // {
|
beaglebone = lib.recursiveUpdate armv7l-hf-multiplatform {
|
||||||
name = "beaglebone";
|
linux-kernel = {
|
||||||
kernelBaseConfig = "bb.org_defconfig";
|
name = "beaglebone";
|
||||||
kernelAutoModules = false;
|
baseConfig = "bb.org_defconfig";
|
||||||
kernelExtraConfig = ""; # TBD kernel config
|
autoModules = false;
|
||||||
kernelTarget = "zImage";
|
extraConfig = ""; # TBD kernel config
|
||||||
|
target = "zImage";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://developer.android.com/ndk/guides/abis#v7a
|
# https://developer.android.com/ndk/guides/abis#v7a
|
||||||
armv7a-android = {
|
armv7a-android = {
|
||||||
name = "armeabi-v7a";
|
linux-kernel.name = "armeabi-v7a";
|
||||||
gcc = {
|
gcc = {
|
||||||
arch = "armv7-a";
|
arch = "armv7-a";
|
||||||
float-abi = "softfp";
|
float-abi = "softfp";
|
||||||
@ -289,29 +294,31 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
armv7l-hf-multiplatform = {
|
armv7l-hf-multiplatform = {
|
||||||
name = "armv7l-hf-multiplatform";
|
linux-kernel = {
|
||||||
kernelBaseConfig = "multi_v7_defconfig";
|
name = "armv7l-hf-multiplatform";
|
||||||
kernelArch = "arm";
|
Major = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc.
|
||||||
kernelDTB = true;
|
baseConfig = "multi_v7_defconfig";
|
||||||
kernelAutoModules = true;
|
DTB = true;
|
||||||
kernelPreferBuiltin = true;
|
autoModules = true;
|
||||||
kernelTarget = "zImage";
|
PreferBuiltin = true;
|
||||||
kernelExtraConfig = ''
|
target = "zImage";
|
||||||
# Serial port for Raspberry Pi 3. Upstream forgot to add it to the ARMv7 defconfig.
|
extraConfig = ''
|
||||||
SERIAL_8250_BCM2835AUX y
|
# Serial port for Raspberry Pi 3. Upstream forgot to add it to the ARMv7 defconfig.
|
||||||
SERIAL_8250_EXTENDED y
|
SERIAL_8250_BCM2835AUX y
|
||||||
SERIAL_8250_SHARE_IRQ y
|
SERIAL_8250_EXTENDED y
|
||||||
|
SERIAL_8250_SHARE_IRQ y
|
||||||
|
|
||||||
# Fix broken sunxi-sid nvmem driver.
|
# Fix broken sunxi-sid nvmem driver.
|
||||||
TI_CPTS y
|
TI_CPTS y
|
||||||
|
|
||||||
# Hangs ODROID-XU4
|
# Hangs ODROID-XU4
|
||||||
ARM_BIG_LITTLE_CPUIDLE n
|
ARM_BIG_LITTLE_CPUIDLE n
|
||||||
|
|
||||||
# Disable OABI to have seccomp_filter (required for systemd)
|
# Disable OABI to have seccomp_filter (required for systemd)
|
||||||
# https://github.com/raspberrypi/firmware/issues/651
|
# https://github.com/raspberrypi/firmware/issues/651
|
||||||
OABI_COMPAT n
|
OABI_COMPAT n
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
gcc = {
|
gcc = {
|
||||||
# Some table about fpu flags:
|
# Some table about fpu flags:
|
||||||
# http://community.arm.com/servlet/JiveServlet/showImage/38-1981-3827/blogentry-103749-004812900+1365712953_thumb.png
|
# http://community.arm.com/servlet/JiveServlet/showImage/38-1981-3827/blogentry-103749-004812900+1365712953_thumb.png
|
||||||
@ -336,34 +343,35 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
aarch64-multiplatform = {
|
aarch64-multiplatform = {
|
||||||
name = "aarch64-multiplatform";
|
linux-kernel = {
|
||||||
kernelBaseConfig = "defconfig";
|
name = "aarch64-multiplatform";
|
||||||
kernelArch = "arm64";
|
baseConfig = "defconfig";
|
||||||
kernelDTB = true;
|
DTB = true;
|
||||||
kernelAutoModules = true;
|
autoModules = true;
|
||||||
kernelPreferBuiltin = true;
|
preferBuiltin = true;
|
||||||
kernelExtraConfig = ''
|
extraConfig = ''
|
||||||
# Raspberry Pi 3 stuff. Not needed for kernels >= 4.10.
|
# Raspberry Pi 3 stuff. Not needed for s >= 4.10.
|
||||||
ARCH_BCM2835 y
|
ARCH_BCM2835 y
|
||||||
BCM2835_MBOX y
|
BCM2835_MBOX y
|
||||||
BCM2835_WDT y
|
BCM2835_WDT y
|
||||||
RASPBERRYPI_FIRMWARE y
|
RASPBERRYPI_FIRMWARE y
|
||||||
RASPBERRYPI_POWER y
|
RASPBERRYPI_POWER y
|
||||||
SERIAL_8250_BCM2835AUX y
|
SERIAL_8250_BCM2835AUX y
|
||||||
SERIAL_8250_EXTENDED y
|
SERIAL_8250_EXTENDED y
|
||||||
SERIAL_8250_SHARE_IRQ y
|
SERIAL_8250_SHARE_IRQ y
|
||||||
|
|
||||||
# Cavium ThunderX stuff.
|
# Cavium ThunderX stuff.
|
||||||
PCI_HOST_THUNDER_ECAM y
|
PCI_HOST_THUNDER_ECAM y
|
||||||
|
|
||||||
# Nvidia Tegra stuff.
|
# Nvidia Tegra stuff.
|
||||||
PCI_TEGRA y
|
PCI_TEGRA y
|
||||||
|
|
||||||
# The default (=y) forces us to have the XHCI firmware available in initrd,
|
# The default (=y) forces us to have the XHCI firmware available in initrd,
|
||||||
# which our initrd builder can't currently do easily.
|
# which our initrd builder can't currently do easily.
|
||||||
USB_XHCI_TEGRA m
|
USB_XHCI_TEGRA m
|
||||||
'';
|
'';
|
||||||
kernelTarget = "Image";
|
target = "Image";
|
||||||
|
};
|
||||||
gcc = {
|
gcc = {
|
||||||
arch = "armv8-a";
|
arch = "armv8-a";
|
||||||
};
|
};
|
||||||
@ -374,8 +382,9 @@ rec {
|
|||||||
##
|
##
|
||||||
|
|
||||||
ben_nanonote = {
|
ben_nanonote = {
|
||||||
name = "ben_nanonote";
|
linux-kernel = {
|
||||||
kernelArch = "mips";
|
name = "ben_nanonote";
|
||||||
|
};
|
||||||
gcc = {
|
gcc = {
|
||||||
arch = "mips32";
|
arch = "mips32";
|
||||||
float = "soft";
|
float = "soft";
|
||||||
@ -383,75 +392,76 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
fuloong2f_n32 = {
|
fuloong2f_n32 = {
|
||||||
name = "fuloong2f_n32";
|
linux-kernel = {
|
||||||
kernelBaseConfig = "lemote2f_defconfig";
|
name = "fuloong2f_n32";
|
||||||
kernelArch = "mips";
|
baseConfig = "lemote2f_defconfig";
|
||||||
kernelAutoModules = false;
|
autoModules = false;
|
||||||
kernelExtraConfig = ''
|
extraConfig = ''
|
||||||
MIGRATION n
|
MIGRATION n
|
||||||
COMPACTION n
|
COMPACTION n
|
||||||
|
|
||||||
# nixos mounts some cgroup
|
# nixos mounts some cgroup
|
||||||
CGROUPS y
|
CGROUPS y
|
||||||
|
|
||||||
BLK_DEV_RAM y
|
BLK_DEV_RAM y
|
||||||
BLK_DEV_INITRD y
|
BLK_DEV_INITRD y
|
||||||
BLK_DEV_CRYPTOLOOP m
|
BLK_DEV_CRYPTOLOOP m
|
||||||
BLK_DEV_DM m
|
BLK_DEV_DM m
|
||||||
DM_CRYPT m
|
DM_CRYPT m
|
||||||
MD y
|
MD y
|
||||||
REISERFS_FS m
|
REISERFS_FS m
|
||||||
EXT4_FS m
|
EXT4_FS m
|
||||||
USB_STORAGE_CYPRESS_ATACB m
|
USB_STORAGE_CYPRESS_ATACB m
|
||||||
|
|
||||||
IP_PNP y
|
IP_PNP y
|
||||||
IP_PNP_DHCP y
|
IP_PNP_DHCP y
|
||||||
IP_PNP_BOOTP y
|
IP_PNP_BOOTP y
|
||||||
NFS_FS y
|
NFS_FS y
|
||||||
ROOT_NFS y
|
ROOT_NFS y
|
||||||
TUN m
|
TUN m
|
||||||
NFS_V4 y
|
NFS_V4 y
|
||||||
NFS_V4_1 y
|
NFS_V4_1 y
|
||||||
NFS_FSCACHE y
|
NFS_FSCACHE y
|
||||||
NFSD m
|
NFSD m
|
||||||
NFSD_V2_ACL y
|
NFSD_V2_ACL y
|
||||||
NFSD_V3 y
|
NFSD_V3 y
|
||||||
NFSD_V3_ACL y
|
NFSD_V3_ACL y
|
||||||
NFSD_V4 y
|
NFSD_V4 y
|
||||||
|
|
||||||
# Fail to build
|
# Fail to build
|
||||||
DRM n
|
DRM n
|
||||||
SCSI_ADVANSYS n
|
SCSI_ADVANSYS n
|
||||||
USB_ISP1362_HCD n
|
USB_ISP1362_HCD n
|
||||||
SND_SOC n
|
SND_SOC n
|
||||||
SND_ALI5451 n
|
SND_ALI5451 n
|
||||||
FB_SAVAGE n
|
FB_SAVAGE n
|
||||||
SCSI_NSP32 n
|
SCSI_NSP32 n
|
||||||
ATA_SFF n
|
ATA_SFF n
|
||||||
SUNGEM n
|
SUNGEM n
|
||||||
IRDA n
|
IRDA n
|
||||||
ATM_HE n
|
ATM_HE n
|
||||||
SCSI_ACARD n
|
SCSI_ACARD n
|
||||||
BLK_DEV_CMD640_ENHANCED n
|
BLK_DEV_CMD640_ENHANCED n
|
||||||
|
|
||||||
FUSE_FS m
|
FUSE_FS m
|
||||||
|
|
||||||
# Needed for udev >= 150
|
# Needed for udev >= 150
|
||||||
SYSFS_DEPRECATED_V2 n
|
SYSFS_DEPRECATED_V2 n
|
||||||
|
|
||||||
VGA_CONSOLE n
|
VGA_CONSOLE n
|
||||||
VT_HW_CONSOLE_BINDING y
|
VT_HW_CONSOLE_BINDING y
|
||||||
SERIAL_8250_CONSOLE y
|
SERIAL_8250_CONSOLE y
|
||||||
FRAMEBUFFER_CONSOLE y
|
FRAMEBUFFER_CONSOLE y
|
||||||
EXT2_FS y
|
EXT2_FS y
|
||||||
EXT3_FS y
|
EXT3_FS y
|
||||||
REISERFS_FS y
|
REISERFS_FS y
|
||||||
MAGIC_SYSRQ y
|
MAGIC_SYSRQ y
|
||||||
|
|
||||||
# The kernel doesn't boot at all, with FTRACE
|
# The kernel doesn't boot at all, with FTRACE
|
||||||
FTRACE n
|
FTRACE n
|
||||||
'';
|
'';
|
||||||
kernelTarget = "vmlinux";
|
target = "vmlinux";
|
||||||
|
};
|
||||||
gcc = {
|
gcc = {
|
||||||
arch = "loongson2f";
|
arch = "loongson2f";
|
||||||
float = "hard";
|
float = "hard";
|
||||||
@ -464,34 +474,36 @@ rec {
|
|||||||
##
|
##
|
||||||
|
|
||||||
riscv-multiplatform = {
|
riscv-multiplatform = {
|
||||||
name = "riscv-multiplatform";
|
linux-kernel = {
|
||||||
kernelArch = "riscv";
|
name = "riscv-multiplatform";
|
||||||
kernelTarget = "vmlinux";
|
target = "vmlinux";
|
||||||
kernelAutoModules = true;
|
autoModules = true;
|
||||||
kernelBaseConfig = "defconfig";
|
baseConfig = "defconfig";
|
||||||
kernelExtraConfig = ''
|
extraConfig = ''
|
||||||
FTRACE n
|
FTRACE n
|
||||||
SERIAL_OF_PLATFORM y
|
SERIAL_OF_PLATFORM y
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
select = platform:
|
select = platform:
|
||||||
# x86
|
# x86
|
||||||
/**/ if platform.isx86_32 then pc32
|
/**/ if platform.isx86 then pc
|
||||||
else if platform.isx86_64 then pc64
|
|
||||||
|
|
||||||
# ARM
|
# ARM
|
||||||
else if platform.isAarch32 then let
|
else if platform.isAarch32 then let
|
||||||
version = platform.parsed.cpu.version or null;
|
version = platform.parsed.cpu.version or null;
|
||||||
in if version == null then pcBase
|
in if version == null then pc
|
||||||
else if lib.versionOlder version "6" then sheevaplug
|
else if lib.versionOlder version "6" then sheevaplug
|
||||||
else if lib.versionOlder version "7" then raspberrypi
|
else if lib.versionOlder version "7" then raspberrypi
|
||||||
else armv7l-hf-multiplatform
|
else armv7l-hf-multiplatform
|
||||||
else if platform.isAarch64 then aarch64-multiplatform
|
else if platform.isAarch64 then aarch64-multiplatform
|
||||||
|
|
||||||
|
else if platform.isRiscV then riscv-multiplatform
|
||||||
|
|
||||||
else if platform.parsed.cpu == lib.systems.parse.cpuTypes.mipsel then fuloong2f_n32
|
else if platform.parsed.cpu == lib.systems.parse.cpuTypes.mipsel then fuloong2f_n32
|
||||||
|
|
||||||
else if platform.parsed.cpu == lib.systems.parse.cpuTypes.powerpc64le then powernv
|
else if platform.parsed.cpu == lib.systems.parse.cpuTypes.powerpc64le then powernv
|
||||||
|
|
||||||
else pcBase;
|
else pc;
|
||||||
}
|
}
|
||||||
|
@ -1084,6 +1084,12 @@
|
|||||||
githubId = 75972;
|
githubId = 75972;
|
||||||
name = "Ben Booth";
|
name = "Ben Booth";
|
||||||
};
|
};
|
||||||
|
berberman = {
|
||||||
|
email = "berberman@yandex.com";
|
||||||
|
github = "berberman";
|
||||||
|
githubId = 26041945;
|
||||||
|
name = "Potato Hatsue";
|
||||||
|
};
|
||||||
berce = {
|
berce = {
|
||||||
email = "bert.moens@gmail.com";
|
email = "bert.moens@gmail.com";
|
||||||
github = "berce";
|
github = "berce";
|
||||||
@ -2583,6 +2589,12 @@
|
|||||||
githubId = 119483;
|
githubId = 119483;
|
||||||
name = "Matthew Brown";
|
name = "Matthew Brown";
|
||||||
};
|
};
|
||||||
|
eduardosm = {
|
||||||
|
email = "esm@eduardosm.net";
|
||||||
|
github = "eduardosm";
|
||||||
|
githubId = 761151;
|
||||||
|
name = "Eduardo Sánchez Muñoz";
|
||||||
|
};
|
||||||
eduarrrd = {
|
eduarrrd = {
|
||||||
email = "e.bachmakov@gmail.com";
|
email = "e.bachmakov@gmail.com";
|
||||||
github = "eduarrrd";
|
github = "eduarrrd";
|
||||||
@ -3693,12 +3705,24 @@
|
|||||||
githubId = 896431;
|
githubId = 896431;
|
||||||
name = "Chris Hodapp";
|
name = "Chris Hodapp";
|
||||||
};
|
};
|
||||||
|
holymonson = {
|
||||||
|
email = "holymonson@gmail.com";
|
||||||
|
github = "holymonson";
|
||||||
|
githubId = 902012;
|
||||||
|
name = "Monson Shao";
|
||||||
|
};
|
||||||
hongchangwu = {
|
hongchangwu = {
|
||||||
email = "wuhc85@gmail.com";
|
email = "wuhc85@gmail.com";
|
||||||
github = "hongchangwu";
|
github = "hongchangwu";
|
||||||
githubId = 362833;
|
githubId = 362833;
|
||||||
name = "Hongchang Wu";
|
name = "Hongchang Wu";
|
||||||
};
|
};
|
||||||
|
hoverbear = {
|
||||||
|
email = "operator+nix@hoverbear.org";
|
||||||
|
github = "hoverbear";
|
||||||
|
githubId = 130903;
|
||||||
|
name = "Ana Hobden";
|
||||||
|
};
|
||||||
hrdinka = {
|
hrdinka = {
|
||||||
email = "c.nix@hrdinka.at";
|
email = "c.nix@hrdinka.at";
|
||||||
github = "hrdinka";
|
github = "hrdinka";
|
||||||
@ -3887,6 +3911,12 @@
|
|||||||
githubId = 4458;
|
githubId = 4458;
|
||||||
name = "Ivan Kozik";
|
name = "Ivan Kozik";
|
||||||
};
|
};
|
||||||
|
ivan-babrou = {
|
||||||
|
email = "nixpkgs@ivan.computer";
|
||||||
|
name = "Ivan Babrou";
|
||||||
|
github = "bobrik";
|
||||||
|
githubId = 89186;
|
||||||
|
};
|
||||||
ivan-timokhin = {
|
ivan-timokhin = {
|
||||||
email = "nixpkgs@ivan.timokhin.name";
|
email = "nixpkgs@ivan.timokhin.name";
|
||||||
name = "Ivan Timokhin";
|
name = "Ivan Timokhin";
|
||||||
@ -5128,12 +5158,24 @@
|
|||||||
githubId = 42153076;
|
githubId = 42153076;
|
||||||
name = "Alexey Nikashkin";
|
name = "Alexey Nikashkin";
|
||||||
};
|
};
|
||||||
|
lesuisse = {
|
||||||
|
email = "thomas@gerbet.me";
|
||||||
|
github = "LeSuisse";
|
||||||
|
githubId = 737767;
|
||||||
|
name = "Thomas Gerbet";
|
||||||
|
};
|
||||||
lethalman = {
|
lethalman = {
|
||||||
email = "lucabru@src.gnome.org";
|
email = "lucabru@src.gnome.org";
|
||||||
github = "lethalman";
|
github = "lethalman";
|
||||||
githubId = 480920;
|
githubId = 480920;
|
||||||
name = "Luca Bruno";
|
name = "Luca Bruno";
|
||||||
};
|
};
|
||||||
|
leungbk = {
|
||||||
|
email = "leungbk@mailfence.com";
|
||||||
|
github = "leungbk";
|
||||||
|
githubId = 29217594;
|
||||||
|
name = "Brian Leung";
|
||||||
|
};
|
||||||
lewo = {
|
lewo = {
|
||||||
email = "lewo@abesis.fr";
|
email = "lewo@abesis.fr";
|
||||||
github = "nlewo";
|
github = "nlewo";
|
||||||
@ -6687,6 +6729,12 @@
|
|||||||
githubId = 7677321;
|
githubId = 7677321;
|
||||||
name = "Paul Trehiou";
|
name = "Paul Trehiou";
|
||||||
};
|
};
|
||||||
|
nyanotech = {
|
||||||
|
name = "nyanotech";
|
||||||
|
email = "nyanotechnology@gmail.com";
|
||||||
|
github = "nyanotech";
|
||||||
|
githubId = 33802077;
|
||||||
|
};
|
||||||
nyarly = {
|
nyarly = {
|
||||||
email = "nyarly@gmail.com";
|
email = "nyarly@gmail.com";
|
||||||
github = "nyarly";
|
github = "nyarly";
|
||||||
@ -7181,6 +7229,12 @@
|
|||||||
githubId = 13000278;
|
githubId = 13000278;
|
||||||
name = "Maksim Bronsky";
|
name = "Maksim Bronsky";
|
||||||
};
|
};
|
||||||
|
PlushBeaver = {
|
||||||
|
name = "Dmitry Kozlyuk";
|
||||||
|
email = "dmitry.kozliuk+nixpkgs@gmail.com";
|
||||||
|
github = "PlushBeaver";
|
||||||
|
githubId = 8988269;
|
||||||
|
};
|
||||||
pmahoney = {
|
pmahoney = {
|
||||||
email = "pat@polycrystal.org";
|
email = "pat@polycrystal.org";
|
||||||
github = "pmahoney";
|
github = "pmahoney";
|
||||||
@ -8703,6 +8757,12 @@
|
|||||||
githubId = 1315818;
|
githubId = 1315818;
|
||||||
name = "Felix Bühler";
|
name = "Felix Bühler";
|
||||||
};
|
};
|
||||||
|
stupremee = {
|
||||||
|
email = "jutus.k@protonmail.com";
|
||||||
|
github = "Stupremee";
|
||||||
|
githubId = 39732259;
|
||||||
|
name = "Justus K";
|
||||||
|
};
|
||||||
suhr = {
|
suhr = {
|
||||||
email = "suhr@i2pmail.org";
|
email = "suhr@i2pmail.org";
|
||||||
github = "suhr";
|
github = "suhr";
|
||||||
@ -8745,6 +8805,12 @@
|
|||||||
githubId = 1040871;
|
githubId = 1040871;
|
||||||
name = "Mathis Antony";
|
name = "Mathis Antony";
|
||||||
};
|
};
|
||||||
|
svend = {
|
||||||
|
email = "svend@svends.net";
|
||||||
|
github = "svend";
|
||||||
|
githubId = 306190;
|
||||||
|
name = "Svend Sorensen";
|
||||||
|
};
|
||||||
svrana = {
|
svrana = {
|
||||||
email = "shaw@vranix.com";
|
email = "shaw@vranix.com";
|
||||||
github = "svrana";
|
github = "svrana";
|
||||||
@ -10448,4 +10514,10 @@
|
|||||||
github = "zupo";
|
github = "zupo";
|
||||||
githubId = 311580;
|
githubId = 311580;
|
||||||
};
|
};
|
||||||
|
jbcrail = {
|
||||||
|
name = "Joseph Crail";
|
||||||
|
email = "jbcrail@gmail.com";
|
||||||
|
github = "jbcrail";
|
||||||
|
githubId = 6038;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ basexx,,,,,
|
|||||||
binaryheap,,,,,vcunat
|
binaryheap,,,,,vcunat
|
||||||
bit32,,,,lua5_1,lblasc
|
bit32,,,,lua5_1,lblasc
|
||||||
busted,,,,,
|
busted,,,,,
|
||||||
cassowary,,,,,marsam
|
cassowary,,,,,marsam alerque
|
||||||
cjson,lua-cjson,,,,
|
cjson,lua-cjson,,,,
|
||||||
compat53,,,,,vcunat
|
compat53,,,,,vcunat
|
||||||
cosmo,,,,,marsam
|
cosmo,,,,,marsam
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, makeWrapper, perl, perlPackages }:
|
{ stdenv, lib, makeWrapper, perl, perlPackages }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "nixpkgs-lint-1";
|
name = "nixpkgs-lint-1";
|
||||||
@ -15,9 +15,9 @@ stdenv.mkDerivation {
|
|||||||
wrapProgram $out/bin/nixpkgs-lint --set PERL5LIB $PERL5LIB
|
wrapProgram $out/bin/nixpkgs-lint --set PERL5LIB $PERL5LIB
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
maintainers = [ stdenv.lib.maintainers.eelco ];
|
maintainers = [ maintainers.eelco ];
|
||||||
description = "A utility for Nixpkgs contributors to check Nixpkgs for common errors";
|
description = "A utility for Nixpkgs contributors to check Nixpkgs for common errors";
|
||||||
platforms = stdenv.lib.platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ nixpkgs$ ${0} ${GENERATED_NIXFILE}
|
|||||||
|
|
||||||
These packages are manually refined in lua-overrides.nix
|
These packages are manually refined in lua-overrides.nix
|
||||||
*/
|
*/
|
||||||
{ self, stdenv, fetchurl, fetchgit, pkgs, ... } @ args:
|
{ self, stdenv, lib, fetchurl, fetchgit, pkgs, ... } @ args:
|
||||||
self: super:
|
self: super:
|
||||||
with self;
|
with self;
|
||||||
{
|
{
|
||||||
|
@ -186,7 +186,7 @@
|
|||||||
The driver has many options (see <xref linkend="ch-options"/>). For
|
The driver has many options (see <xref linkend="ch-options"/>). For
|
||||||
instance, the following disables tap-to-click behavior:
|
instance, the following disables tap-to-click behavior:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<xref linkend="opt-services.xserver.libinput.tapping"/> = false;
|
<xref linkend="opt-services.xserver.libinput.touchpad.tapping"/> = false;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
Note: the use of <literal>services.xserver.synaptics</literal> is deprecated
|
Note: the use of <literal>services.xserver.synaptics</literal> is deprecated
|
||||||
since NixOS 17.09.
|
since NixOS 17.09.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
xml:id="chap-contributing">
|
xml:id="chap-contributing">
|
||||||
<title>Contributing to this documentation</title>
|
<title>Contributing to this manual</title>
|
||||||
<para>
|
<para>
|
||||||
The DocBook sources of NixOS' manual are in the <filename
|
The DocBook sources of NixOS' manual are in the <filename
|
||||||
xlink:href="https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual">
|
xlink:href="https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual">
|
||||||
|
@ -21,7 +21,11 @@
|
|||||||
xlink:href="https://discourse.nixos.org">Discourse</literal> or
|
xlink:href="https://discourse.nixos.org">Discourse</literal> or
|
||||||
on the <link
|
on the <link
|
||||||
xlink:href="irc://irc.freenode.net/#nixos">
|
xlink:href="irc://irc.freenode.net/#nixos">
|
||||||
<literal>#nixos</literal> channel on Freenode</link>. Bugs should be
|
<literal>#nixos</literal> channel on Freenode</link>, or
|
||||||
|
consider
|
||||||
|
<link
|
||||||
|
xlink:href="#chap-contributing">
|
||||||
|
contributing to this manual</link>. Bugs should be
|
||||||
reported in
|
reported in
|
||||||
<link
|
<link
|
||||||
xlink:href="https://github.com/NixOS/nixpkgs/issues">NixOS’
|
xlink:href="https://github.com/NixOS/nixpkgs/issues">NixOS’
|
||||||
|
@ -418,6 +418,26 @@ http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/e
|
|||||||
SDK licenses if your project requires it. See the androidenv documentation for more details.
|
SDK licenses if your project requires it. See the androidenv documentation for more details.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The attribute <varname>mpi</varname> is now consistently used to
|
||||||
|
provide a default, system-wide MPI implementation.
|
||||||
|
The default implementation is openmpi, which has been used before by
|
||||||
|
all derivations affects by this change.
|
||||||
|
Note that all packages that have used <varname>mpi ? null</varname> in the input
|
||||||
|
for optional MPI builds, have been changed to the boolean input paramater
|
||||||
|
<varname>useMpi</varname> to enable building with MPI.
|
||||||
|
|
||||||
|
Building all packages with <varname>mpich</varname> instead
|
||||||
|
of the default <varname>openmpi</varname> can now be achived like this:
|
||||||
|
<programlisting>
|
||||||
|
self: super:
|
||||||
|
{
|
||||||
|
mpi = super.mpich;
|
||||||
|
}
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The Searx module has been updated with the ability to configure the
|
The Searx module has been updated with the ability to configure the
|
||||||
@ -430,6 +450,17 @@ http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/e
|
|||||||
dynamically allocated uid.
|
dynamically allocated uid.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The libinput module has been updated with the ability to configure mouse and touchpad settings separately.
|
||||||
|
The options in <literal>services.xserver.libinput</literal> have been renamed to <literal>services.xserver.libinput.touchpad</literal>,
|
||||||
|
while there is a new <literal>services.xserver.libinput.mouse</literal> for mouse related configuration.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Since touchpad options no longer apply to all devices, you may want to replicate your touchpad configuration in
|
||||||
|
mouse section.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -592,6 +623,22 @@ http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/e
|
|||||||
<literal>/etc/netgroup</literal> defines network-wide groups and may affect to setups using NIS.
|
<literal>/etc/netgroup</literal> defines network-wide groups and may affect to setups using NIS.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Platforms, like <varname>stdenv.hostPlatform</varname>, no longer have a <varname>platform</varname> attribute.
|
||||||
|
It has been (mostly) flattoned away:
|
||||||
|
</para>
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><varname>platform.gcc</varname> is now <varname>gcc</varname></para></listitem>
|
||||||
|
<listitem><para><literal>platform.kernel*</literal> is now <literal>linux-kernel.*</literal></para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
<para>
|
||||||
|
Additionally, <varname>platform.kernelArch</varname> moved to the top level as <varname>linuxArch</varname> to match the other <literal>*Arch</literal> variables.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The <varname>platform</varname> grouping of these things never meant anything, and was just a historial/implementation artifact that was overdue removal.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
@ -83,7 +83,7 @@ in
|
|||||||
packages = mkOption {
|
packages = mkOption {
|
||||||
type = types.listOf types.package;
|
type = types.listOf types.package;
|
||||||
default = with pkgs.kbdKeymaps; [ dvp neo ];
|
default = with pkgs.kbdKeymaps; [ dvp neo ];
|
||||||
defaultText = ''with pkgs.kbdKeymaps; [ dvp neo ]'';
|
defaultText = "with pkgs.kbdKeymaps; [ dvp neo ]";
|
||||||
description = ''
|
description = ''
|
||||||
List of additional packages that provide console fonts, keymaps and
|
List of additional packages that provide console fonts, keymaps and
|
||||||
other resources for virtual consoles use.
|
other resources for virtual consoles use.
|
||||||
|
@ -436,7 +436,7 @@ in
|
|||||||
useEmbeddedBitmaps = mkOption {
|
useEmbeddedBitmaps = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''Use embedded bitmaps in fonts like Calibri.'';
|
description = "Use embedded bitmaps in fonts like Calibri.";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
gnu = mkOption {
|
gnu = lib.mkOption {
|
||||||
type = types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
When enabled, GNU software is chosen by default whenever a there is
|
When enabled, GNU software is chosen by default whenever a there is
|
||||||
@ -15,7 +13,7 @@ with lib;
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.gnu {
|
config = lib.mkIf config.gnu {
|
||||||
|
|
||||||
environment.systemPackages = with pkgs;
|
environment.systemPackages = with pkgs;
|
||||||
# TODO: Adjust `requiredPackages' from `system-path.nix'.
|
# TODO: Adjust `requiredPackages' from `system-path.nix'.
|
||||||
@ -26,7 +24,7 @@ with lib;
|
|||||||
nano zile
|
nano zile
|
||||||
texinfo # for the stand-alone Info reader
|
texinfo # for the stand-alone Info reader
|
||||||
]
|
]
|
||||||
++ stdenv.lib.optional (!stdenv.isAarch32) grub2;
|
++ lib.optional (!stdenv.isAarch32) grub2;
|
||||||
|
|
||||||
|
|
||||||
# GNU GRUB, where available.
|
# GNU GRUB, where available.
|
||||||
|
@ -84,7 +84,7 @@ with lib;
|
|||||||
environment.etc."locale.conf".source = pkgs.writeText "locale.conf"
|
environment.etc."locale.conf".source = pkgs.writeText "locale.conf"
|
||||||
''
|
''
|
||||||
LANG=${config.i18n.defaultLocale}
|
LANG=${config.i18n.defaultLocale}
|
||||||
${concatStringsSep "\n" (mapAttrsToList (n: v: ''${n}=${v}'') config.i18n.extraLocaleSettings)}
|
${concatStringsSep "\n" (mapAttrsToList (n: v: "${n}=${v}") config.i18n.extraLocaleSettings)}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -58,6 +58,7 @@ in
|
|||||||
"2.nixos.pool.ntp.org"
|
"2.nixos.pool.ntp.org"
|
||||||
"3.nixos.pool.ntp.org"
|
"3.nixos.pool.ntp.org"
|
||||||
];
|
];
|
||||||
|
type = types.listOf types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The set of NTP servers from which to synchronise.
|
The set of NTP servers from which to synchronise.
|
||||||
'';
|
'';
|
||||||
@ -194,8 +195,7 @@ in
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
# /etc/netgroup: Network-wide groups.
|
# /etc/netgroup: Network-wide groups.
|
||||||
netgroup.text = mkDefault ''
|
netgroup.text = mkDefault "";
|
||||||
'';
|
|
||||||
|
|
||||||
# /etc/host.conf: resolver configuration file
|
# /etc/host.conf: resolver configuration file
|
||||||
"host.conf".text = ''
|
"host.conf".text = ''
|
||||||
|
@ -183,7 +183,7 @@ in {
|
|||||||
config = mkOption {
|
config = mkOption {
|
||||||
type = types.attrsOf types.unspecified;
|
type = types.attrsOf types.unspecified;
|
||||||
default = {};
|
default = {};
|
||||||
description = ''Config of the pulse daemon. See <literal>man pulse-daemon.conf</literal>.'';
|
description = "Config of the pulse daemon. See <literal>man pulse-daemon.conf</literal>.";
|
||||||
example = literalExample ''{ realtime-scheduling = "yes"; }'';
|
example = literalExample ''{ realtime-scheduling = "yes"; }'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -364,7 +364,7 @@ let
|
|||||||
count = mkOption {
|
count = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 1;
|
default = 1;
|
||||||
description = ''Count of subordinate user ids'';
|
description = "Count of subordinate user ids";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -381,7 +381,7 @@ let
|
|||||||
count = mkOption {
|
count = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 1;
|
default = 1;
|
||||||
description = ''Count of subordinate group ids'';
|
description = "Count of subordinate group ids";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -62,7 +62,7 @@ with lib;
|
|||||||
services.dbus.packages = packages;
|
services.dbus.packages = packages;
|
||||||
systemd.packages = packages;
|
systemd.packages = packages;
|
||||||
|
|
||||||
environment.variables = {
|
environment.sessionVariables = {
|
||||||
GTK_USE_PORTAL = mkIf cfg.gtkUsePortal "1";
|
GTK_USE_PORTAL = mkIf cfg.gtkUsePortal "1";
|
||||||
XDG_DESKTOP_PORTAL_DIR = "${joinedPortals}/share/xdg-desktop-portal/portals";
|
XDG_DESKTOP_PORTAL_DIR = "${joinedPortals}/share/xdg-desktop-portal/portals";
|
||||||
};
|
};
|
||||||
|
@ -68,11 +68,11 @@ let
|
|||||||
patchShebangs scripts/*
|
patchShebangs scripts/*
|
||||||
substituteInPlace scripts/Makefile.lib \
|
substituteInPlace scripts/Makefile.lib \
|
||||||
--replace 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget))' 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) -@'
|
--replace 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget))' 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) -@'
|
||||||
make ${pkgs.stdenv.hostPlatform.platform.kernelBaseConfig} ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}"
|
make ${pkgs.stdenv.hostPlatform.linux-kernel.baseConfig} ARCH="${pkgs.stdenv.hostPlatform.linuxArch}"
|
||||||
make dtbs ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}"
|
make dtbs ARCH="${pkgs.stdenv.hostPlatform.linuxArch}"
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
make dtbs_install INSTALL_DTBS_PATH=$out/dtbs ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}"
|
make dtbs_install INSTALL_DTBS_PATH=$out/dtbs ARCH="${pkgs.stdenv.hostPlatform.linuxArch}"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ in
|
|||||||
options = {
|
options = {
|
||||||
hardware.deviceTree = {
|
hardware.deviceTree = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = pkgs.stdenv.hostPlatform.platform.kernelDTB or false;
|
default = pkgs.stdenv.hostPlatform.linux-kernel.DTB or false;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = ''
|
description = ''
|
||||||
Build device tree files. These are used to describe the
|
Build device tree files. These are used to describe the
|
||||||
|
@ -19,23 +19,9 @@ in
|
|||||||
nitrokey-app package, depending on your device and needs.
|
nitrokey-app package, depending on your device and needs.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
group = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "nitrokey";
|
|
||||||
example = "wheel";
|
|
||||||
description = ''
|
|
||||||
Grant access to Nitrokey devices to users in this group.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.udev.packages = [
|
services.udev.packages = [ pkgs.nitrokey-udev-rules ];
|
||||||
(pkgs.nitrokey-udev-rules.override (attrs:
|
|
||||||
{ inherit (cfg) group; }
|
|
||||||
))
|
|
||||||
];
|
|
||||||
users.groups.${cfg.group} = {};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ in
|
|||||||
default = "wheel";
|
default = "wheel";
|
||||||
example = "video";
|
example = "video";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = ''Group for bumblebee socket'';
|
description = "Group for bumblebee socket";
|
||||||
};
|
};
|
||||||
|
|
||||||
connectDisplay = mkOption {
|
connectDisplay = mkOption {
|
||||||
|
@ -42,6 +42,7 @@ in
|
|||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>ibus: The intelligent input bus, extra input engines can be added using <literal>i18n.inputMethod.ibus.engines</literal>.</para></listitem>
|
<listitem><para>ibus: The intelligent input bus, extra input engines can be added using <literal>i18n.inputMethod.ibus.engines</literal>.</para></listitem>
|
||||||
<listitem><para>fcitx: A customizable lightweight input method, extra input engines can be added using <literal>i18n.inputMethod.fcitx.engines</literal>.</para></listitem>
|
<listitem><para>fcitx: A customizable lightweight input method, extra input engines can be added using <literal>i18n.inputMethod.fcitx.engines</literal>.</para></listitem>
|
||||||
|
<listitem><para>fcitx5: The next generation of fcitx, addons (including engines, dictionaries, skins) can be added using <literal>i18n.inputMethod.fcitx5.addons</literal>.</para></listitem>
|
||||||
<listitem><para>nabi: A Korean input method based on XIM. Nabi doesn't support Qt 5.</para></listitem>
|
<listitem><para>nabi: A Korean input method based on XIM. Nabi doesn't support Qt 5.</para></listitem>
|
||||||
<listitem><para>uim: The universal input method, is a library with a XIM bridge. uim mainly support Chinese, Japanese and Korean.</para></listitem>
|
<listitem><para>uim: The universal input method, is a library with a XIM bridge. uim mainly support Chinese, Japanese and Korean.</para></listitem>
|
||||||
<listitem><para>hime: An extremely easy-to-use input method framework.</para></listitem>
|
<listitem><para>hime: An extremely easy-to-use input method framework.</para></listitem>
|
||||||
|
@ -88,7 +88,7 @@ with lib;
|
|||||||
|
|
||||||
system.build.netbootIpxeScript = pkgs.writeTextDir "netboot.ipxe" ''
|
system.build.netbootIpxeScript = pkgs.writeTextDir "netboot.ipxe" ''
|
||||||
#!ipxe
|
#!ipxe
|
||||||
kernel ${pkgs.stdenv.hostPlatform.platform.kernelTarget} init=${config.system.build.toplevel}/init initrd=initrd ${toString config.boot.kernelParams}
|
kernel ${pkgs.stdenv.hostPlatform.linux-kernel.target} init=${config.system.build.toplevel}/init initrd=initrd ${toString config.boot.kernelParams}
|
||||||
initrd initrd
|
initrd initrd
|
||||||
boot
|
boot
|
||||||
'';
|
'';
|
||||||
|
@ -4,8 +4,8 @@ stdenv.mkDerivation rec {
|
|||||||
src = ./.;
|
src = ./.;
|
||||||
nativeBuildInputs = [ cmake pkg-config ];
|
nativeBuildInputs = [ cmake pkg-config ];
|
||||||
buildInputs = [ boost nix ];
|
buildInputs = [ boost nix ];
|
||||||
meta = {
|
meta = with lib; {
|
||||||
license = stdenv.lib.licenses.lgpl2Plus;
|
license = licenses.lgpl2Plus;
|
||||||
maintainers = with lib.maintainers; [ chkno ];
|
maintainers = with maintainers; [ chkno ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@ in
|
|||||||
};
|
};
|
||||||
reservedMemory = mkOption {
|
reservedMemory = mkOption {
|
||||||
default = "128M";
|
default = "128M";
|
||||||
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The amount of memory reserved for the crashdump kernel.
|
The amount of memory reserved for the crashdump kernel.
|
||||||
If you choose a too high value, dmesg will mention
|
If you choose a too high value, dmesg will mention
|
||||||
|
@ -215,7 +215,7 @@ in {
|
|||||||
''
|
''
|
||||||
else ''
|
else ''
|
||||||
exec ${cfg.locate}/bin/updatedb \
|
exec ${cfg.locate}/bin/updatedb \
|
||||||
${optionalString (cfg.localuser != null && ! isMLocate) ''--localuser=${cfg.localuser}''} \
|
${optionalString (cfg.localuser != null && ! isMLocate) "--localuser=${cfg.localuser}"} \
|
||||||
--output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags}
|
--output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags}
|
||||||
'';
|
'';
|
||||||
environment = optionalAttrs (!isMLocate) {
|
environment = optionalAttrs (!isMLocate) {
|
||||||
|
@ -73,7 +73,7 @@ in
|
|||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
type = pkgsType;
|
type = pkgsType;
|
||||||
example = literalExample ''import <nixpkgs> {}'';
|
example = literalExample "import <nixpkgs> {}";
|
||||||
description = ''
|
description = ''
|
||||||
If set, the pkgs argument to all NixOS modules is the value of
|
If set, the pkgs argument to all NixOS modules is the value of
|
||||||
this option, extended with <code>nixpkgs.overlays</code>, if
|
this option, extended with <code>nixpkgs.overlays</code>, if
|
||||||
|
@ -169,6 +169,7 @@
|
|||||||
./programs/sway.nix
|
./programs/sway.nix
|
||||||
./programs/system-config-printer.nix
|
./programs/system-config-printer.nix
|
||||||
./programs/thefuck.nix
|
./programs/thefuck.nix
|
||||||
|
./programs/tilp2.nix
|
||||||
./programs/tmux.nix
|
./programs/tmux.nix
|
||||||
./programs/traceroute.nix
|
./programs/traceroute.nix
|
||||||
./programs/tsm-client.nix
|
./programs/tsm-client.nix
|
||||||
|
@ -27,14 +27,14 @@ in
|
|||||||
# the options below are the same as in "captive-browser.toml"
|
# the options below are the same as in "captive-browser.toml"
|
||||||
browser = mkOption {
|
browser = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = concatStringsSep " " [ ''${pkgs.chromium}/bin/chromium''
|
default = concatStringsSep " " [ "${pkgs.chromium}/bin/chromium"
|
||||||
''--user-data-dir=''${XDG_DATA_HOME:-$HOME/.local/share}/chromium-captive''
|
"--user-data-dir=\${XDG_DATA_HOME:-$HOME/.local/share}/chromium-captive"
|
||||||
''--proxy-server="socks5://$PROXY"''
|
''--proxy-server="socks5://$PROXY"''
|
||||||
''--host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost"''
|
''--host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost"''
|
||||||
''--no-first-run''
|
"--no-first-run"
|
||||||
''--new-window''
|
"--new-window"
|
||||||
''--incognito''
|
"--incognito"
|
||||||
''http://cache.nixos.org/''
|
"http://cache.nixos.org/"
|
||||||
];
|
];
|
||||||
description = ''
|
description = ''
|
||||||
The shell (/bin/sh) command executed once the proxy starts.
|
The shell (/bin/sh) command executed once the proxy starts.
|
||||||
@ -62,7 +62,7 @@ in
|
|||||||
socks5-addr = mkOption {
|
socks5-addr = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "localhost:1666";
|
default = "localhost:1666";
|
||||||
description = ''the listen address for the SOCKS5 proxy server'';
|
description = "the listen address for the SOCKS5 proxy server";
|
||||||
};
|
};
|
||||||
|
|
||||||
bindInterface = mkOption {
|
bindInterface = mkOption {
|
||||||
|
@ -80,6 +80,8 @@ in
|
|||||||
# Retry the command if we just installed it.
|
# Retry the command if we just installed it.
|
||||||
if [ $? = 126 ]; then
|
if [ $? = 126 ]; then
|
||||||
"$@"
|
"$@"
|
||||||
|
else
|
||||||
|
return 127
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Indicate than there was an error so ZSH falls back to its default handler
|
# Indicate than there was an error so ZSH falls back to its default handler
|
||||||
|
@ -13,6 +13,27 @@ let
|
|||||||
(filterAttrs (k: v: v != null) cfg.shellAliases)
|
(filterAttrs (k: v: v != null) cfg.shellAliases)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
envShellInit = pkgs.writeText "shellInit" cfge.shellInit;
|
||||||
|
|
||||||
|
envLoginShellInit = pkgs.writeText "loginShellInit" cfge.loginShellInit;
|
||||||
|
|
||||||
|
envInteractiveShellInit = pkgs.writeText "interactiveShellInit" cfge.interactiveShellInit;
|
||||||
|
|
||||||
|
sourceEnv = file:
|
||||||
|
if cfg.useBabelfish then
|
||||||
|
"source /etc/fish/${file}.fish"
|
||||||
|
else
|
||||||
|
''
|
||||||
|
set fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish/vendor_functions.d $fish_function_path
|
||||||
|
fenv source /etc/fish/foreign-env/${file} > /dev/null
|
||||||
|
set -e fish_function_path[1]
|
||||||
|
'';
|
||||||
|
|
||||||
|
babelfishTranslate = path: name:
|
||||||
|
pkgs.runCommand "${name}.fish" {
|
||||||
|
nativeBuildInputs = [ pkgs.babelfish ];
|
||||||
|
} "${pkgs.babelfish}/bin/babelfish < ${path} > $out;";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -29,6 +50,15 @@ in
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useBabelfish = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
If enabled, the configured environment will be translated to native fish using <link xlink:href="https://github.com/bouk/babelfish">babelfish</link>.
|
||||||
|
Otherwise, <link xlink:href="https://github.com/oh-my-fish/plugin-foreign-env">foreign-env</link> will be used.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
vendor.config.enable = mkOption {
|
vendor.config.enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
@ -105,72 +135,152 @@ in
|
|||||||
# Required for man completions
|
# Required for man completions
|
||||||
documentation.man.generateCaches = lib.mkDefault true;
|
documentation.man.generateCaches = lib.mkDefault true;
|
||||||
|
|
||||||
environment.etc."fish/foreign-env/shellInit".text = cfge.shellInit;
|
environment = mkMerge [
|
||||||
environment.etc."fish/foreign-env/loginShellInit".text = cfge.loginShellInit;
|
(mkIf cfg.useBabelfish
|
||||||
environment.etc."fish/foreign-env/interactiveShellInit".text = cfge.interactiveShellInit;
|
{
|
||||||
|
etc."fish/setEnvironment.fish".source = babelfishTranslate config.system.build.setEnvironment "setEnvironment";
|
||||||
|
etc."fish/shellInit.fish".source = babelfishTranslate envShellInit "shellInit";
|
||||||
|
etc."fish/loginShellInit.fish".source = babelfishTranslate envLoginShellInit "loginShellInit";
|
||||||
|
etc."fish/interactiveShellInit.fish".source = babelfishTranslate envInteractiveShellInit "interactiveShellInit";
|
||||||
|
})
|
||||||
|
|
||||||
environment.etc."fish/nixos-env-preinit.fish".text = ''
|
(mkIf (!cfg.useBabelfish)
|
||||||
# This happens before $__fish_datadir/config.fish sets fish_function_path, so it is currently
|
{
|
||||||
# unset. We set it and then completely erase it, leaving its configuration to $__fish_datadir/config.fish
|
etc."fish/foreign-env/shellInit".source = envShellInit;
|
||||||
set fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish/vendor_functions.d $__fish_datadir/functions
|
etc."fish/foreign-env/loginShellInit".source = envLoginShellInit;
|
||||||
|
etc."fish/foreign-env/interactiveShellInit".source = envInteractiveShellInit;
|
||||||
|
})
|
||||||
|
|
||||||
# source the NixOS environment config
|
{
|
||||||
if [ -z "$__NIXOS_SET_ENVIRONMENT_DONE" ]
|
etc."fish/nixos-env-preinit.fish".text =
|
||||||
fenv source ${config.system.build.setEnvironment}
|
if cfg.useBabelfish
|
||||||
end
|
then ''
|
||||||
|
# source the NixOS environment config
|
||||||
|
if [ -z "$__NIXOS_SET_ENVIRONMENT_DONE" ]
|
||||||
|
source /etc/fish/setEnvironment.fish
|
||||||
|
end
|
||||||
|
''
|
||||||
|
else ''
|
||||||
|
# This happens before $__fish_datadir/config.fish sets fish_function_path, so it is currently
|
||||||
|
# unset. We set it and then completely erase it, leaving its configuration to $__fish_datadir/config.fish
|
||||||
|
set fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish/vendor_functions.d $__fish_datadir/functions
|
||||||
|
|
||||||
# clear fish_function_path so that it will be correctly set when we return to $__fish_datadir/config.fish
|
# source the NixOS environment config
|
||||||
set -e fish_function_path
|
if [ -z "$__NIXOS_SET_ENVIRONMENT_DONE" ]
|
||||||
'';
|
fenv source ${config.system.build.setEnvironment}
|
||||||
|
end
|
||||||
|
|
||||||
environment.etc."fish/config.fish".text = ''
|
# clear fish_function_path so that it will be correctly set when we return to $__fish_datadir/config.fish
|
||||||
# /etc/fish/config.fish: DO NOT EDIT -- this file has been generated automatically.
|
set -e fish_function_path
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
# if we haven't sourced the general config, do it
|
{
|
||||||
if not set -q __fish_nixos_general_config_sourced
|
etc."fish/config.fish".text = ''
|
||||||
set --prepend fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish/vendor_functions.d
|
# /etc/fish/config.fish: DO NOT EDIT -- this file has been generated automatically.
|
||||||
fenv source /etc/fish/foreign-env/shellInit > /dev/null
|
|
||||||
set -e fish_function_path[1]
|
|
||||||
|
|
||||||
${cfg.shellInit}
|
# if we haven't sourced the general config, do it
|
||||||
|
if not set -q __fish_nixos_general_config_sourced
|
||||||
|
${sourceEnv "shellInit"}
|
||||||
|
|
||||||
# and leave a note so we don't source this config section again from
|
${cfg.shellInit}
|
||||||
# this very shell (children will source the general config anew)
|
|
||||||
set -g __fish_nixos_general_config_sourced 1
|
|
||||||
end
|
|
||||||
|
|
||||||
# if we haven't sourced the login config, do it
|
# and leave a note so we don't source this config section again from
|
||||||
status --is-login; and not set -q __fish_nixos_login_config_sourced
|
# this very shell (children will source the general config anew)
|
||||||
and begin
|
set -g __fish_nixos_general_config_sourced 1
|
||||||
set --prepend fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish/vendor_functions.d
|
end
|
||||||
fenv source /etc/fish/foreign-env/loginShellInit > /dev/null
|
|
||||||
set -e fish_function_path[1]
|
|
||||||
|
|
||||||
${cfg.loginShellInit}
|
# if we haven't sourced the login config, do it
|
||||||
|
status --is-login; and not set -q __fish_nixos_login_config_sourced
|
||||||
|
and begin
|
||||||
|
${sourceEnv "loginShellInit"}
|
||||||
|
|
||||||
# and leave a note so we don't source this config section again from
|
${cfg.loginShellInit}
|
||||||
# this very shell (children will source the general config anew)
|
|
||||||
set -g __fish_nixos_login_config_sourced 1
|
|
||||||
end
|
|
||||||
|
|
||||||
# if we haven't sourced the interactive config, do it
|
# and leave a note so we don't source this config section again from
|
||||||
status --is-interactive; and not set -q __fish_nixos_interactive_config_sourced
|
# this very shell (children will source the general config anew)
|
||||||
and begin
|
set -g __fish_nixos_login_config_sourced 1
|
||||||
${fishAliases}
|
end
|
||||||
|
|
||||||
set --prepend fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish/vendor_functions.d
|
# if we haven't sourced the interactive config, do it
|
||||||
fenv source /etc/fish/foreign-env/interactiveShellInit > /dev/null
|
status --is-interactive; and not set -q __fish_nixos_interactive_config_sourced
|
||||||
set -e fish_function_path[1]
|
and begin
|
||||||
|
${fishAliases}
|
||||||
|
|
||||||
${cfg.promptInit}
|
${sourceEnv "interactiveShellInit"}
|
||||||
${cfg.interactiveShellInit}
|
|
||||||
|
|
||||||
# and leave a note so we don't source this config section again from
|
${cfg.promptInit}
|
||||||
# this very shell (children will source the general config anew,
|
${cfg.interactiveShellInit}
|
||||||
# allowing configuration changes in, e.g, aliases, to propagate)
|
|
||||||
set -g __fish_nixos_interactive_config_sourced 1
|
# and leave a note so we don't source this config section again from
|
||||||
end
|
# this very shell (children will source the general config anew,
|
||||||
'';
|
# allowing configuration changes in, e.g, aliases, to propagate)
|
||||||
|
set -g __fish_nixos_interactive_config_sourced 1
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
etc."fish/generated_completions".source =
|
||||||
|
let
|
||||||
|
patchedGenerator = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "fish_patched-completion-generator";
|
||||||
|
srcs = [
|
||||||
|
"${pkgs.fish}/share/fish/tools/create_manpage_completions.py"
|
||||||
|
"${pkgs.fish}/share/fish/tools/deroff.py"
|
||||||
|
];
|
||||||
|
unpackCmd = "cp $curSrc $(basename $curSrc)";
|
||||||
|
sourceRoot = ".";
|
||||||
|
patches = [ ./fish_completion-generator.patch ]; # to prevent collisions of identical completion files
|
||||||
|
dontBuild = true;
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cp * $out/
|
||||||
|
'';
|
||||||
|
preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
|
};
|
||||||
|
generateCompletions = package: pkgs.runCommand
|
||||||
|
"${package.name}_fish-completions"
|
||||||
|
(
|
||||||
|
{
|
||||||
|
inherit package;
|
||||||
|
preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
|
}
|
||||||
|
// optionalAttrs (package ? meta.priority) { meta.priority = package.meta.priority; }
|
||||||
|
)
|
||||||
|
''
|
||||||
|
mkdir -p $out
|
||||||
|
if [ -d $package/share/man ]; then
|
||||||
|
find $package/share/man -type f | xargs ${pkgs.python3.interpreter} ${patchedGenerator}/create_manpage_completions.py --directory $out >/dev/null
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
pkgs.buildEnv {
|
||||||
|
name = "system_fish-completions";
|
||||||
|
ignoreCollisions = true;
|
||||||
|
paths = map generateCompletions config.environment.systemPackages;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# include programs that bring their own completions
|
||||||
|
{
|
||||||
|
pathsToLink = []
|
||||||
|
++ optional cfg.vendor.config.enable "/share/fish/vendor_conf.d"
|
||||||
|
++ optional cfg.vendor.completions.enable "/share/fish/vendor_completions.d"
|
||||||
|
++ optional cfg.vendor.functions.enable "/share/fish/vendor_functions.d";
|
||||||
|
}
|
||||||
|
|
||||||
|
{ systemPackages = [ pkgs.fish ]; }
|
||||||
|
|
||||||
|
{
|
||||||
|
shells = [
|
||||||
|
"/run/current-system/sw/bin/fish"
|
||||||
|
"${pkgs.fish}/bin/fish"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
programs.fish.interactiveShellInit = ''
|
programs.fish.interactiveShellInit = ''
|
||||||
# add completions generated by NixOS to $fish_complete_path
|
# add completions generated by NixOS to $fish_complete_path
|
||||||
@ -187,61 +297,6 @@ in
|
|||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
environment.etc."fish/generated_completions".source =
|
|
||||||
let
|
|
||||||
patchedGenerator = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "fish_patched-completion-generator";
|
|
||||||
srcs = [
|
|
||||||
"${pkgs.fish}/share/fish/tools/create_manpage_completions.py"
|
|
||||||
"${pkgs.fish}/share/fish/tools/deroff.py"
|
|
||||||
];
|
|
||||||
unpackCmd = "cp $curSrc $(basename $curSrc)";
|
|
||||||
sourceRoot = ".";
|
|
||||||
patches = [ ./fish_completion-generator.patch ]; # to prevent collisions of identical completion files
|
|
||||||
dontBuild = true;
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out
|
|
||||||
cp * $out/
|
|
||||||
'';
|
|
||||||
preferLocalBuild = true;
|
|
||||||
allowSubstitutes = false;
|
|
||||||
};
|
|
||||||
generateCompletions = package: pkgs.runCommand
|
|
||||||
"${package.name}_fish-completions"
|
|
||||||
(
|
|
||||||
{
|
|
||||||
inherit package;
|
|
||||||
preferLocalBuild = true;
|
|
||||||
allowSubstitutes = false;
|
|
||||||
}
|
|
||||||
// optionalAttrs (package ? meta.priority) { meta.priority = package.meta.priority; }
|
|
||||||
)
|
|
||||||
''
|
|
||||||
mkdir -p $out
|
|
||||||
if [ -d $package/share/man ]; then
|
|
||||||
find $package/share/man -type f | xargs ${pkgs.python3.interpreter} ${patchedGenerator}/create_manpage_completions.py --directory $out >/dev/null
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
pkgs.buildEnv {
|
|
||||||
name = "system_fish-completions";
|
|
||||||
ignoreCollisions = true;
|
|
||||||
paths = map generateCompletions config.environment.systemPackages;
|
|
||||||
};
|
|
||||||
|
|
||||||
# include programs that bring their own completions
|
|
||||||
environment.pathsToLink = []
|
|
||||||
++ optional cfg.vendor.config.enable "/share/fish/vendor_conf.d"
|
|
||||||
++ optional cfg.vendor.completions.enable "/share/fish/vendor_completions.d"
|
|
||||||
++ optional cfg.vendor.functions.enable "/share/fish/vendor_functions.d";
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.fish ];
|
|
||||||
|
|
||||||
environment.shells = [
|
|
||||||
"/run/current-system/sw/bin/fish"
|
|
||||||
"${pkgs.fish}/bin/fish"
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ in
|
|||||||
askPassword = mkOption {
|
askPassword = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
|
default = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
|
||||||
description = ''Program used by SSH to ask for passwords.'';
|
description = "Program used by SSH to ask for passwords.";
|
||||||
};
|
};
|
||||||
|
|
||||||
forwardX11 = mkOption {
|
forwardX11 = mkOption {
|
||||||
|
28
nixos/modules/programs/tilp2.nix
Normal file
28
nixos/modules/programs/tilp2.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.programs.tilp2;
|
||||||
|
|
||||||
|
in {
|
||||||
|
options.programs.tilp2 = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Enable tilp2 and udev rules for supported calculators.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.udev.packages = [
|
||||||
|
pkgs.libticables2
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.tilp2
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
@ -11,7 +11,7 @@ in
|
|||||||
|
|
||||||
lockerCommand = mkOption {
|
lockerCommand = mkOption {
|
||||||
default = "${pkgs.i3lock}/bin/i3lock";
|
default = "${pkgs.i3lock}/bin/i3lock";
|
||||||
example = literalExample ''''${pkgs.i3lock-fancy}/bin/i3lock-fancy'';
|
example = literalExample "\${pkgs.i3lock-fancy}/bin/i3lock-fancy";
|
||||||
type = types.separatedString " ";
|
type = types.separatedString " ";
|
||||||
description = "Locker to be used with xsslock";
|
description = "Locker to be used with xsslock";
|
||||||
};
|
};
|
||||||
|
@ -33,6 +33,7 @@ in {
|
|||||||
};
|
};
|
||||||
configurationDir = mkOption {
|
configurationDir = mkOption {
|
||||||
default = "${activemq}/conf";
|
default = "${activemq}/conf";
|
||||||
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The base directory for ActiveMQ's configuration.
|
The base directory for ActiveMQ's configuration.
|
||||||
By default, this directory is searched for a file named activemq.xml,
|
By default, this directory is searched for a file named activemq.xml,
|
||||||
|
@ -74,7 +74,7 @@ in {
|
|||||||
musicDirectory = mkOption {
|
musicDirectory = mkOption {
|
||||||
type = with types; either path (strMatching "(http|https|nfs|smb)://.+");
|
type = with types; either path (strMatching "(http|https|nfs|smb)://.+");
|
||||||
default = "${cfg.dataDir}/music";
|
default = "${cfg.dataDir}/music";
|
||||||
defaultText = ''''${dataDir}/music'';
|
defaultText = "\${dataDir}/music";
|
||||||
description = ''
|
description = ''
|
||||||
The directory or NFS/SMB network share where MPD reads music from. If left
|
The directory or NFS/SMB network share where MPD reads music from. If left
|
||||||
as the default value this directory will automatically be created before
|
as the default value this directory will automatically be created before
|
||||||
@ -86,7 +86,7 @@ in {
|
|||||||
playlistDirectory = mkOption {
|
playlistDirectory = mkOption {
|
||||||
type = types.path;
|
type = types.path;
|
||||||
default = "${cfg.dataDir}/playlists";
|
default = "${cfg.dataDir}/playlists";
|
||||||
defaultText = ''''${dataDir}/playlists'';
|
defaultText = "\${dataDir}/playlists";
|
||||||
description = ''
|
description = ''
|
||||||
The directory where MPD stores playlists. If left as the default value
|
The directory where MPD stores playlists. If left as the default value
|
||||||
this directory will automatically be created before the MPD server starts,
|
this directory will automatically be created before the MPD server starts,
|
||||||
@ -155,7 +155,7 @@ in {
|
|||||||
dbFile = mkOption {
|
dbFile = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = "${cfg.dataDir}/tag_cache";
|
default = "${cfg.dataDir}/tag_cache";
|
||||||
defaultText = ''''${dataDir}/tag_cache'';
|
defaultText = "\${dataDir}/tag_cache";
|
||||||
description = ''
|
description = ''
|
||||||
The path to MPD's database. If set to <literal>null</literal> the
|
The path to MPD's database. If set to <literal>null</literal> the
|
||||||
parameter is omitted from the configuration.
|
parameter is omitted from the configuration.
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
|
||||||
# TODO: test configuration when building nixexpr (use -t parameter)
|
# TODO: test configuration when building nixexpr (use -t parameter)
|
||||||
# TODO: support sqlite3 (it's deprecate?) and mysql
|
# TODO: support sqlite3 (it's deprecate?) and mysql
|
||||||
|
|
||||||
@ -111,6 +112,7 @@ let
|
|||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
password = mkOption {
|
password = mkOption {
|
||||||
|
type = types.str;
|
||||||
# TODO: required?
|
# TODO: required?
|
||||||
description = ''
|
description = ''
|
||||||
Specifies the password that must be supplied for the default Bacula
|
Specifies the password that must be supplied for the default Bacula
|
||||||
@ -130,6 +132,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
monitor = mkOption {
|
monitor = mkOption {
|
||||||
|
type = types.enum [ "no" "yes" ];
|
||||||
default = "no";
|
default = "no";
|
||||||
example = "yes";
|
example = "yes";
|
||||||
description = ''
|
description = ''
|
||||||
@ -150,6 +153,7 @@ let
|
|||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
changerDevice = mkOption {
|
changerDevice = mkOption {
|
||||||
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The specified name-string must be the generic SCSI device name of the
|
The specified name-string must be the generic SCSI device name of the
|
||||||
autochanger that corresponds to the normal read/write Archive Device
|
autochanger that corresponds to the normal read/write Archive Device
|
||||||
@ -168,6 +172,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
changerCommand = mkOption {
|
changerCommand = mkOption {
|
||||||
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The name-string specifies an external program to be called that will
|
The name-string specifies an external program to be called that will
|
||||||
automatically change volumes as required by Bacula. Normally, this
|
automatically change volumes as required by Bacula. Normally, this
|
||||||
@ -190,12 +195,13 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
devices = mkOption {
|
devices = mkOption {
|
||||||
description = ''
|
description = "";
|
||||||
'';
|
type = types.listOf types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraAutochangerConfig = mkOption {
|
extraAutochangerConfig = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Extra configuration to be passed in Autochanger directive.
|
Extra configuration to be passed in Autochanger directive.
|
||||||
'';
|
'';
|
||||||
@ -212,6 +218,7 @@ let
|
|||||||
options = {
|
options = {
|
||||||
archiveDevice = mkOption {
|
archiveDevice = mkOption {
|
||||||
# TODO: required?
|
# TODO: required?
|
||||||
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The specified name-string gives the system file name of the storage
|
The specified name-string gives the system file name of the storage
|
||||||
device managed by this storage daemon. This will usually be the
|
device managed by this storage daemon. This will usually be the
|
||||||
@ -228,6 +235,7 @@ let
|
|||||||
|
|
||||||
mediaType = mkOption {
|
mediaType = mkOption {
|
||||||
# TODO: required?
|
# TODO: required?
|
||||||
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The specified name-string names the type of media supported by this
|
The specified name-string names the type of media supported by this
|
||||||
device, for example, <literal>DLT7000</literal>. Media type names are
|
device, for example, <literal>DLT7000</literal>. Media type names are
|
||||||
@ -265,6 +273,7 @@ let
|
|||||||
|
|
||||||
extraDeviceConfig = mkOption {
|
extraDeviceConfig = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Extra configuration to be passed in Device directive.
|
Extra configuration to be passed in Device directive.
|
||||||
'';
|
'';
|
||||||
@ -293,6 +302,7 @@ in {
|
|||||||
|
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
default = "${config.networking.hostName}-fd";
|
default = "${config.networking.hostName}-fd";
|
||||||
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The client name that must be used by the Director when connecting.
|
The client name that must be used by the Director when connecting.
|
||||||
Generally, it is a good idea to use a name related to the machine so
|
Generally, it is a good idea to use a name related to the machine so
|
||||||
@ -321,6 +331,7 @@ in {
|
|||||||
|
|
||||||
extraClientConfig = mkOption {
|
extraClientConfig = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Extra configuration to be passed in Client directive.
|
Extra configuration to be passed in Client directive.
|
||||||
'';
|
'';
|
||||||
@ -332,6 +343,7 @@ in {
|
|||||||
|
|
||||||
extraMessagesConfig = mkOption {
|
extraMessagesConfig = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Extra configuration to be passed in Messages directive.
|
Extra configuration to be passed in Messages directive.
|
||||||
'';
|
'';
|
||||||
@ -352,6 +364,7 @@ in {
|
|||||||
|
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
default = "${config.networking.hostName}-sd";
|
default = "${config.networking.hostName}-sd";
|
||||||
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
Specifies the Name of the Storage daemon.
|
Specifies the Name of the Storage daemon.
|
||||||
'';
|
'';
|
||||||
@ -392,6 +405,7 @@ in {
|
|||||||
|
|
||||||
extraStorageConfig = mkOption {
|
extraStorageConfig = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Extra configuration to be passed in Storage directive.
|
Extra configuration to be passed in Storage directive.
|
||||||
'';
|
'';
|
||||||
@ -403,6 +417,7 @@ in {
|
|||||||
|
|
||||||
extraMessagesConfig = mkOption {
|
extraMessagesConfig = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Extra configuration to be passed in Messages directive.
|
Extra configuration to be passed in Messages directive.
|
||||||
'';
|
'';
|
||||||
@ -424,6 +439,7 @@ in {
|
|||||||
|
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
default = "${config.networking.hostName}-dir";
|
default = "${config.networking.hostName}-dir";
|
||||||
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The director name used by the system administrator. This directive is
|
The director name used by the system administrator. This directive is
|
||||||
required.
|
required.
|
||||||
@ -445,6 +461,7 @@ in {
|
|||||||
|
|
||||||
password = mkOption {
|
password = mkOption {
|
||||||
# TODO: required?
|
# TODO: required?
|
||||||
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
Specifies the password that must be supplied for a Director.
|
Specifies the password that must be supplied for a Director.
|
||||||
'';
|
'';
|
||||||
@ -452,6 +469,7 @@ in {
|
|||||||
|
|
||||||
extraMessagesConfig = mkOption {
|
extraMessagesConfig = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Extra configuration to be passed in Messages directive.
|
Extra configuration to be passed in Messages directive.
|
||||||
'';
|
'';
|
||||||
@ -462,6 +480,7 @@ in {
|
|||||||
|
|
||||||
extraDirectorConfig = mkOption {
|
extraDirectorConfig = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Extra configuration to be passed in Director directive.
|
Extra configuration to be passed in Director directive.
|
||||||
'';
|
'';
|
||||||
|
@ -354,7 +354,7 @@ in
|
|||||||
|
|
||||||
script = let
|
script = let
|
||||||
tarsnap = ''tarsnap --configfile "/etc/tarsnap/${name}.conf"'';
|
tarsnap = ''tarsnap --configfile "/etc/tarsnap/${name}.conf"'';
|
||||||
lastArchive = ''$(${tarsnap} --list-archives | sort | tail -1)'';
|
lastArchive = "$(${tarsnap} --list-archives | sort | tail -1)";
|
||||||
run = ''${tarsnap} -x -f "${lastArchive}" ${optionalString cfg.verbose "-v"}'';
|
run = ''${tarsnap} -x -f "${lastArchive}" ${optionalString cfg.verbose "-v"}'';
|
||||||
|
|
||||||
in if (cfg.cachedir != null) then ''
|
in if (cfg.cachedir != null) then ''
|
||||||
|
@ -50,8 +50,7 @@ with lib;
|
|||||||
default = pkgs.hadoop;
|
default = pkgs.hadoop;
|
||||||
defaultText = "pkgs.hadoop";
|
defaultText = "pkgs.hadoop";
|
||||||
example = literalExample "pkgs.hadoop";
|
example = literalExample "pkgs.hadoop";
|
||||||
description = ''
|
description = "";
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ let
|
|||||||
ClusterName=${cfg.clusterName}
|
ClusterName=${cfg.clusterName}
|
||||||
StateSaveLocation=${cfg.stateSaveLocation}
|
StateSaveLocation=${cfg.stateSaveLocation}
|
||||||
SlurmUser=${cfg.user}
|
SlurmUser=${cfg.user}
|
||||||
${optionalString (cfg.controlMachine != null) ''controlMachine=${cfg.controlMachine}''}
|
${optionalString (cfg.controlMachine != null) "controlMachine=${cfg.controlMachine}"}
|
||||||
${optionalString (cfg.controlAddr != null) ''controlAddr=${cfg.controlAddr}''}
|
${optionalString (cfg.controlAddr != null) "controlAddr=${cfg.controlAddr}"}
|
||||||
${toString (map (x: "NodeName=${x}\n") cfg.nodeName)}
|
${toString (map (x: "NodeName=${x}\n") cfg.nodeName)}
|
||||||
${toString (map (x: "PartitionName=${x}\n") cfg.partitionName)}
|
${toString (map (x: "PartitionName=${x}\n") cfg.partitionName)}
|
||||||
PlugStackConfig=${plugStackConfig}/plugstack.conf
|
PlugStackConfig=${plugStackConfig}/plugstack.conf
|
||||||
@ -25,7 +25,7 @@ let
|
|||||||
|
|
||||||
plugStackConfig = pkgs.writeTextDir "plugstack.conf"
|
plugStackConfig = pkgs.writeTextDir "plugstack.conf"
|
||||||
''
|
''
|
||||||
${optionalString cfg.enableSrunX11 ''optional ${pkgs.slurm-spank-x11}/lib/x11.so''}
|
${optionalString cfg.enableSrunX11 "optional ${pkgs.slurm-spank-x11}/lib/x11.so"}
|
||||||
${cfg.extraPlugstackConfig}
|
${cfg.extraPlugstackConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -223,6 +223,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pythonPackages = mkOption {
|
pythonPackages = mkOption {
|
||||||
|
type = types.listOf types.package;
|
||||||
default = pythonPackages: with pythonPackages; [ ];
|
default = pythonPackages: with pythonPackages; [ ];
|
||||||
defaultText = "pythonPackages: with pythonPackages; [ ]";
|
defaultText = "pythonPackages: with pythonPackages; [ ]";
|
||||||
description = "Packages to add the to the PYTHONPATH of the buildbot process.";
|
description = "Packages to add the to the PYTHONPATH of the buildbot process.";
|
||||||
|
@ -66,10 +66,10 @@ let
|
|||||||
++ optional service.debugTraceDisabled
|
++ optional service.debugTraceDisabled
|
||||||
"--debug-trace-disabled"
|
"--debug-trace-disabled"
|
||||||
++ map (e: "--env ${escapeShellArg e}") (mapAttrsToList (name: value: "${name}=${value}") service.environmentVariables)
|
++ map (e: "--env ${escapeShellArg e}") (mapAttrsToList (name: value: "${name}=${value}") service.environmentVariables)
|
||||||
++ optionals (service.executor == "docker") (
|
++ optionals (hasPrefix "docker" service.executor) (
|
||||||
assert (
|
assert (
|
||||||
assertMsg (service.dockerImage != null)
|
assertMsg (service.dockerImage != null)
|
||||||
"dockerImage option is required for docker executor (${name})");
|
"dockerImage option is required for ${service.executor} executor (${name})");
|
||||||
[ "--docker-image ${service.dockerImage}" ]
|
[ "--docker-image ${service.dockerImage}" ]
|
||||||
++ optional service.dockerDisableCache
|
++ optional service.dockerDisableCache
|
||||||
"--docker-disable-cache"
|
"--docker-disable-cache"
|
||||||
|
@ -16,8 +16,7 @@ let
|
|||||||
[admins]
|
[admins]
|
||||||
${cfg.adminUser} = ${cfg.adminPass}
|
${cfg.adminUser} = ${cfg.adminPass}
|
||||||
'' else
|
'' else
|
||||||
''
|
"") + (if useVersion2 then
|
||||||
'') + (if useVersion2 then
|
|
||||||
''
|
''
|
||||||
[chttpd]
|
[chttpd]
|
||||||
'' else
|
'' else
|
||||||
|
@ -117,7 +117,7 @@ in
|
|||||||
serviceConfig.User = cfg.user;
|
serviceConfig.User = cfg.user;
|
||||||
serviceConfig.LogsDirectory = "firebird";
|
serviceConfig.LogsDirectory = "firebird";
|
||||||
serviceConfig.LogsDirectoryMode = "0700";
|
serviceConfig.LogsDirectoryMode = "0700";
|
||||||
serviceConfig.ExecStart = ''${firebird}/bin/fbserver -d'';
|
serviceConfig.ExecStart = "${firebird}/bin/fbserver -d";
|
||||||
|
|
||||||
# TODO think about shutdown
|
# TODO think about shutdown
|
||||||
};
|
};
|
||||||
|
@ -16,14 +16,14 @@ let
|
|||||||
''}
|
''}
|
||||||
dbms.ssl.policy.${name}.client_auth=${conf.clientAuth}
|
dbms.ssl.policy.${name}.client_auth=${conf.clientAuth}
|
||||||
${if length (splitString "/" conf.privateKey) > 1 then
|
${if length (splitString "/" conf.privateKey) > 1 then
|
||||||
''dbms.ssl.policy.${name}.private_key=${conf.privateKey}''
|
"dbms.ssl.policy.${name}.private_key=${conf.privateKey}"
|
||||||
else
|
else
|
||||||
''dbms.ssl.policy.${name}.private_key=${conf.baseDirectory}/${conf.privateKey}''
|
"dbms.ssl.policy.${name}.private_key=${conf.baseDirectory}/${conf.privateKey}"
|
||||||
}
|
}
|
||||||
${if length (splitString "/" conf.privateKey) > 1 then
|
${if length (splitString "/" conf.privateKey) > 1 then
|
||||||
''dbms.ssl.policy.${name}.public_certificate=${conf.publicCertificate}''
|
"dbms.ssl.policy.${name}.public_certificate=${conf.publicCertificate}"
|
||||||
else
|
else
|
||||||
''dbms.ssl.policy.${name}.public_certificate=${conf.baseDirectory}/${conf.publicCertificate}''
|
"dbms.ssl.policy.${name}.public_certificate=${conf.baseDirectory}/${conf.publicCertificate}"
|
||||||
}
|
}
|
||||||
dbms.ssl.policy.${name}.revoked_dir=${conf.revokedDir}
|
dbms.ssl.policy.${name}.revoked_dir=${conf.revokedDir}
|
||||||
dbms.ssl.policy.${name}.tls_versions=${concatStringsSep "," conf.tlsVersions}
|
dbms.ssl.policy.${name}.tls_versions=${concatStringsSep "," conf.tlsVersions}
|
||||||
|
@ -15,31 +15,45 @@ with lib;
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
services.gnome3.evolution-data-server = {
|
services.gnome3.evolution-data-server = {
|
||||||
|
enable = mkEnableOption "Evolution Data Server, a collection of services for storing addressbooks and calendars.";
|
||||||
enable = mkOption {
|
plugins = mkOption {
|
||||||
type = types.bool;
|
type = types.listOf types.package;
|
||||||
default = false;
|
default = [ ];
|
||||||
description = ''
|
description = "Plugins for Evolution Data Server.";
|
||||||
Whether to enable Evolution Data Server, a collection of services for
|
};
|
||||||
storing addressbooks and calendars.
|
};
|
||||||
'';
|
programs.evolution = {
|
||||||
|
enable = mkEnableOption "Evolution, a Personal information management application that provides integrated mail, calendaring and address book functionality.";
|
||||||
|
plugins = mkOption {
|
||||||
|
type = types.listOf types.package;
|
||||||
|
default = [ ];
|
||||||
|
example = literalExample "[ pkgs.evolution-ews ]";
|
||||||
|
description = "Plugins for Evolution.";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf config.services.gnome3.evolution-data-server.enable {
|
config =
|
||||||
|
let
|
||||||
|
bundle = pkgs.evolutionWithPlugins.override { inherit (config.services.gnome3.evolution-data-server) plugins; };
|
||||||
|
in
|
||||||
|
mkMerge [
|
||||||
|
(mkIf config.services.gnome3.evolution-data-server.enable {
|
||||||
|
environment.systemPackages = [ bundle ];
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.gnome3.evolution-data-server ];
|
services.dbus.packages = [ bundle ];
|
||||||
|
|
||||||
services.dbus.packages = [ pkgs.gnome3.evolution-data-server ];
|
|
||||||
|
|
||||||
systemd.packages = [ pkgs.gnome3.evolution-data-server ];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
systemd.packages = [ bundle ];
|
||||||
|
})
|
||||||
|
(mkIf config.programs.evolution.enable {
|
||||||
|
services.gnome3.evolution-data-server = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [ pkgs.evolution ] ++ config.programs.evolution.plugins;
|
||||||
|
};
|
||||||
|
services.gnome3.gnome-keyring.enable = true;
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ in {
|
|||||||
};
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = ''${pkgs.bloop}/bin/bloop server'';
|
ExecStart = "${pkgs.bloop}/bin/bloop server";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -141,14 +141,14 @@ in {
|
|||||||
install -o ${cfg.user} -g ${cfg.group} -m 0600 /dev/null /var/lib/infinoted/infinoted.conf
|
install -o ${cfg.user} -g ${cfg.group} -m 0600 /dev/null /var/lib/infinoted/infinoted.conf
|
||||||
cat >>/var/lib/infinoted/infinoted.conf <<EOF
|
cat >>/var/lib/infinoted/infinoted.conf <<EOF
|
||||||
[infinoted]
|
[infinoted]
|
||||||
${optionalString (cfg.keyFile != null) ''key-file=${cfg.keyFile}''}
|
${optionalString (cfg.keyFile != null) "key-file=${cfg.keyFile}"}
|
||||||
${optionalString (cfg.certificateFile != null) ''certificate-file=${cfg.certificateFile}''}
|
${optionalString (cfg.certificateFile != null) "certificate-file=${cfg.certificateFile}"}
|
||||||
${optionalString (cfg.certificateChain != null) ''certificate-chain=${cfg.certificateChain}''}
|
${optionalString (cfg.certificateChain != null) "certificate-chain=${cfg.certificateChain}"}
|
||||||
port=${toString cfg.port}
|
port=${toString cfg.port}
|
||||||
security-policy=${cfg.securityPolicy}
|
security-policy=${cfg.securityPolicy}
|
||||||
root-directory=${cfg.rootDirectory}
|
root-directory=${cfg.rootDirectory}
|
||||||
plugins=${concatStringsSep ";" cfg.plugins}
|
plugins=${concatStringsSep ";" cfg.plugins}
|
||||||
${optionalString (cfg.passwordFile != null) ''password=$(head -n 1 ${cfg.passwordFile})''}
|
${optionalString (cfg.passwordFile != null) "password=$(head -n 1 ${cfg.passwordFile})"}
|
||||||
|
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
EOF
|
EOF
|
||||||
|
@ -19,7 +19,7 @@ in
|
|||||||
extraFlags = mkOption {
|
extraFlags = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
description = ''Extra flags to pass to <command>oa_ded</command>'';
|
description = "Extra flags to pass to <command>oa_ded</command>";
|
||||||
example = [
|
example = [
|
||||||
"+set dedicated 2"
|
"+set dedicated 2"
|
||||||
"+set sv_hostname 'My NixOS OpenArena Server'"
|
"+set sv_hostname 'My NixOS OpenArena Server'"
|
||||||
|
@ -19,18 +19,16 @@ nix-shell -E 'with import <nixpkgs> { }; brscan4-etc-files.override{netDevices=[
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
addNetDev = nd: ''
|
addNetDev = nd: ''
|
||||||
brsaneconfig4 -a \
|
brsaneconfig4 -a \
|
||||||
name="${nd.name}" \
|
name="${nd.name}" \
|
||||||
model="${nd.model}" \
|
model="${nd.model}" \
|
||||||
${if (hasAttr "nodename" nd && nd.nodename != null) then
|
${if (lib.hasAttr "nodename" nd && nd.nodename != null) then
|
||||||
''nodename="${nd.nodename}"'' else
|
''nodename="${nd.nodename}"'' else
|
||||||
''ip="${nd.ip}"''}'';
|
''ip="${nd.ip}"''}'';
|
||||||
addAllNetDev = xs: concatStringsSep "\n" (map addNetDev xs);
|
addAllNetDev = xs: lib.concatStringsSep "\n" (map addNetDev xs);
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
@ -61,11 +59,11 @@ stdenv.mkDerivation {
|
|||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
dontPatchELF = true;
|
dontPatchELF = true;
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "Brother brscan4 sane backend driver etc files";
|
description = "Brother brscan4 sane backend driver etc files";
|
||||||
homepage = "http://www.brother.com";
|
homepage = "http://www.brother.com";
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = licenses.unfree;
|
||||||
maintainers = with stdenv.lib.maintainers; [ jraygauthier ];
|
maintainers = with maintainers; [ jraygauthier ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ in
|
|||||||
|
|
||||||
inputConfig = mkOption {
|
inputConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''generator { }'';
|
default = "generator { }";
|
||||||
description = "Logstash input configuration.";
|
description = "Logstash input configuration.";
|
||||||
example = ''
|
example = ''
|
||||||
# Read from journal
|
# Read from journal
|
||||||
@ -131,7 +131,7 @@ in
|
|||||||
|
|
||||||
outputConfig = mkOption {
|
outputConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''stdout { codec => rubydebug }'';
|
default = "stdout { codec => rubydebug }";
|
||||||
description = "Logstash output configuration.";
|
description = "Logstash output configuration.";
|
||||||
example = ''
|
example = ''
|
||||||
redis { host => ["localhost"] data_type => "list" key => "logstash" codec => json }
|
redis { host => ["localhost"] data_type => "list" key => "logstash" codec => json }
|
||||||
|
@ -163,7 +163,7 @@ in {
|
|||||||
|
|
||||||
systemd.services.postgrey = let
|
systemd.services.postgrey = let
|
||||||
bind-flag = if cfg.socket ? path then
|
bind-flag = if cfg.socket ? path then
|
||||||
''--unix=${cfg.socket.path} --socketmode=${cfg.socket.mode}''
|
"--unix=${cfg.socket.path} --socketmode=${cfg.socket.mode}"
|
||||||
else
|
else
|
||||||
''--inet=${optionalString (cfg.socket.addr != null) (cfg.socket.addr + ":")}${toString cfg.socket.port}'';
|
''--inet=${optionalString (cfg.socket.addr != null) (cfg.socket.addr + ":")}${toString cfg.socket.port}'';
|
||||||
in {
|
in {
|
||||||
|
@ -52,6 +52,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
timeout = mkOption {
|
timeout = mkOption {
|
||||||
|
type = types.int;
|
||||||
default = 600;
|
default = 600;
|
||||||
description = "Set the global minimum timeout, in seconds, until directories are unmounted";
|
description = "Set the global minimum timeout, in seconds, until directories are unmounted";
|
||||||
};
|
};
|
||||||
|
@ -120,7 +120,7 @@ in
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
LD_LIBRARY_PATH = ''/run/opengl-driver/lib:/run/opengl-driver-32/lib'';
|
LD_LIBRARY_PATH = "/run/opengl-driver/lib:/run/opengl-driver-32/lib";
|
||||||
DISPLAY = ":${toString config.services.xserver.display}";
|
DISPLAY = ":${toString config.services.xserver.display}";
|
||||||
GPU_MAX_ALLOC_PERCENT = "100";
|
GPU_MAX_ALLOC_PERCENT = "100";
|
||||||
GPU_USE_SYNC_OBJECTS = "1";
|
GPU_USE_SYNC_OBJECTS = "1";
|
||||||
|
@ -27,7 +27,7 @@ in
|
|||||||
default = with pkgs.dictdDBs; [ wiktionary wordnet ];
|
default = with pkgs.dictdDBs; [ wiktionary wordnet ];
|
||||||
defaultText = "with pkgs.dictdDBs; [ wiktionary wordnet ]";
|
defaultText = "with pkgs.dictdDBs; [ wiktionary wordnet ]";
|
||||||
example = literalExample "[ pkgs.dictdDBs.nld2eng ]";
|
example = literalExample "[ pkgs.dictdDBs.nld2eng ]";
|
||||||
description = ''List of databases to make available.'';
|
description = "List of databases to make available.";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -185,7 +185,7 @@ in
|
|||||||
};
|
};
|
||||||
zkExtraCfg = mkOption {
|
zkExtraCfg = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = ''initLimit=5&syncLimit=2&tickTime=2000'';
|
default = "initLimit=5&syncLimit=2&tickTime=2000";
|
||||||
description = ''
|
description = ''
|
||||||
Extra options to pass into Zookeeper
|
Extra options to pass into Zookeeper
|
||||||
'';
|
'';
|
||||||
|
@ -597,8 +597,7 @@ in
|
|||||||
users.groups.gitea = {};
|
users.groups.gitea = {};
|
||||||
|
|
||||||
warnings =
|
warnings =
|
||||||
optional (cfg.database.password != "") ''
|
optional (cfg.database.password != "") "config.services.gitea.database.password will be stored as plaintext in the Nix store. Use database.passwordFile instead." ++
|
||||||
config.services.gitea.database.password will be stored as plaintext in the Nix store. Use database.passwordFile instead.'' ++
|
|
||||||
optional (cfg.extraConfig != null) ''
|
optional (cfg.extraConfig != null) ''
|
||||||
services.gitea.`extraConfig` is deprecated, please use services.gitea.`settings`.
|
services.gitea.`extraConfig` is deprecated, please use services.gitea.`settings`.
|
||||||
'';
|
'';
|
||||||
|
@ -504,8 +504,7 @@ in {
|
|||||||
report_stats = mkOption {
|
report_stats = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = "";
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
servers = mkOption {
|
servers = mkOption {
|
||||||
type = types.attrsOf (types.attrsOf types.str);
|
type = types.attrsOf (types.attrsOf types.str);
|
||||||
|
@ -587,10 +587,10 @@ in
|
|||||||
|
|
||||||
nix.systemFeatures = mkDefault (
|
nix.systemFeatures = mkDefault (
|
||||||
[ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++
|
[ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++
|
||||||
optionals (pkgs.hostPlatform.platform ? gcc.arch) (
|
optionals (pkgs.hostPlatform ? gcc.arch) (
|
||||||
# a builder can run code for `platform.gcc.arch` and inferior architectures
|
# a builder can run code for `gcc.arch` and inferior architectures
|
||||||
[ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++
|
[ "gccarch-${pkgs.hostPlatform.gcc.arch}" ] ++
|
||||||
map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.platform.gcc.arch}
|
map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.gcc.arch}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ in
|
|||||||
hooks = mkOption {
|
hooks = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
example = {
|
example = {
|
||||||
doshutdown = ''# shell commands to notify that the computer is shutting down'';
|
doshutdown = "# shell commands to notify that the computer is shutting down";
|
||||||
};
|
};
|
||||||
type = types.attrsOf types.lines;
|
type = types.attrsOf types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -25,10 +25,10 @@ let
|
|||||||
|
|
||||||
graphiteApiConfig = pkgs.writeText "graphite-api.yaml" ''
|
graphiteApiConfig = pkgs.writeText "graphite-api.yaml" ''
|
||||||
search_index: ${dataDir}/index
|
search_index: ${dataDir}/index
|
||||||
${optionalString (config.time.timeZone != null) ''time_zone: ${config.time.timeZone}''}
|
${optionalString (config.time.timeZone != null) "time_zone: ${config.time.timeZone}"}
|
||||||
${optionalString (cfg.api.finders != []) ''finders:''}
|
${optionalString (cfg.api.finders != []) "finders:"}
|
||||||
${concatMapStringsSep "\n" (f: " - " + f.moduleName) cfg.api.finders}
|
${concatMapStringsSep "\n" (f: " - " + f.moduleName) cfg.api.finders}
|
||||||
${optionalString (cfg.api.functions != []) ''functions:''}
|
${optionalString (cfg.api.functions != []) "functions:"}
|
||||||
${concatMapStringsSep "\n" (f: " - " + f) cfg.api.functions}
|
${concatMapStringsSep "\n" (f: " - " + f) cfg.api.functions}
|
||||||
${cfg.api.extraConfig}
|
${cfg.api.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
@ -67,7 +67,7 @@ in
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
warnings = optional (cfg.allow != null && cfg.deny != null)
|
warnings = optional (cfg.allow != null && cfg.deny != null)
|
||||||
''If `services.incron.allow` is set then `services.incron.deny` will be ignored.'';
|
"If `services.incron.allow` is set then `services.incron.deny` will be ignored.";
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.incron ];
|
environment.systemPackages = [ pkgs.incron ];
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ in
|
|||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 25826;
|
default = 25826;
|
||||||
description = ''Network address on which to accept collectd binary network packets.'';
|
description = "Network address on which to accept collectd binary network packets.";
|
||||||
};
|
};
|
||||||
|
|
||||||
listenAddress = mkOption {
|
listenAddress = mkOption {
|
||||||
|
@ -69,7 +69,7 @@ in {
|
|||||||
umask 077
|
umask 077
|
||||||
${pkgs.envsubst}/bin/envsubst -i "${configFile}" > /var/run/telegraf/config.toml
|
${pkgs.envsubst}/bin/envsubst -i "${configFile}" > /var/run/telegraf/config.toml
|
||||||
'');
|
'');
|
||||||
ExecStart=''${cfg.package}/bin/telegraf -config ${finalConfigFile}'';
|
ExecStart="${cfg.package}/bin/telegraf -config ${finalConfigFile}";
|
||||||
ExecReload="${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
ExecReload="${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
RuntimeDirectory = "telegraf";
|
RuntimeDirectory = "telegraf";
|
||||||
User = "telegraf";
|
User = "telegraf";
|
||||||
|
@ -12,7 +12,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
optionToArgs = opt: v : optional (v != null) ''--${opt}="${toString v}"'';
|
optionToArgs = opt: v : optional (v != null) ''--${opt}="${toString v}"'';
|
||||||
flagToArgs = opt: v : optional v ''--${opt}'';
|
flagToArgs = opt: v : optional v "--${opt}";
|
||||||
listToArgs = opt: vs : map (v: ''--${opt}="${v}"'') vs;
|
listToArgs = opt: vs : map (v: ''--${opt}="${v}"'') vs;
|
||||||
attrsToArgs = opt: kvs: mapAttrsToList (k: v: ''--${opt}=${k}=\"${v}\"'') kvs;
|
attrsToArgs = opt: kvs: mapAttrsToList (k: v: ''--${opt}=${k}=\"${v}\"'') kvs;
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ let
|
|||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
json = builtins.toFile "${name}.json" (builtins.toJSON attrs);
|
json = builtins.toFile "${name}.json" (builtins.toJSON attrs);
|
||||||
nativeBuildInputs = [ pkgs.remarshal ];
|
nativeBuildInputs = [ pkgs.remarshal ];
|
||||||
} ''json2yaml -i $json -o $out'';
|
} "json2yaml -i $json -o $out";
|
||||||
|
|
||||||
thanos = cmd: "${cfg.package}/bin/thanos ${cmd}" +
|
thanos = cmd: "${cfg.package}/bin/thanos ${cmd}" +
|
||||||
(let args = cfg.${cmd}.arguments;
|
(let args = cfg.${cmd}.arguments;
|
||||||
|
@ -205,7 +205,7 @@ in
|
|||||||
after = [ "upsd.service" ];
|
after = [ "upsd.service" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
# TODO: replace 'root' by another username.
|
# TODO: replace 'root' by another username.
|
||||||
script = ''${pkgs.nut}/bin/upsdrvctl -u root start'';
|
script = "${pkgs.nut}/bin/upsdrvctl -u root start";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
|
@ -48,7 +48,7 @@ let
|
|||||||
ExecStart = ''${ceph.out}/bin/${if daemonType == "rgw" then "radosgw" else "ceph-${daemonType}"} \
|
ExecStart = ''${ceph.out}/bin/${if daemonType == "rgw" then "radosgw" else "ceph-${daemonType}"} \
|
||||||
-f --cluster ${clusterName} --id ${daemonId}'';
|
-f --cluster ${clusterName} --id ${daemonId}'';
|
||||||
} // optionalAttrs (daemonType == "osd") {
|
} // optionalAttrs (daemonType == "osd") {
|
||||||
ExecStartPre = ''${ceph.lib}/libexec/ceph/ceph-osd-prestart.sh --id ${daemonId} --cluster ${clusterName}'';
|
ExecStartPre = "${ceph.lib}/libexec/ceph/ceph-osd-prestart.sh --id ${daemonId} --cluster ${clusterName}";
|
||||||
RestartSec = "20s";
|
RestartSec = "20s";
|
||||||
PrivateDevices = "no"; # osd needs disk access
|
PrivateDevices = "no"; # osd needs disk access
|
||||||
} // optionalAttrs ( daemonType == "mon") {
|
} // optionalAttrs ( daemonType == "mon") {
|
||||||
@ -353,7 +353,7 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
warnings = optional (cfg.global.monInitialMembers == null)
|
warnings = optional (cfg.global.monInitialMembers == null)
|
||||||
''Not setting up a list of members in monInitialMembers requires that you set the host variable for each mon daemon or else the cluster won't function'';
|
"Not setting up a list of members in monInitialMembers requires that you set the host variable for each mon daemon or else the cluster won't function";
|
||||||
|
|
||||||
environment.etc."ceph/ceph.conf".text = let
|
environment.etc."ceph/ceph.conf".text = let
|
||||||
# Merge the extraConfig set for mgr daemons, as mgr don't have their own section
|
# Merge the extraConfig set for mgr daemons, as mgr don't have their own section
|
||||||
|
@ -24,13 +24,15 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
dataDir = mkOption {
|
dataDir = mkOption {
|
||||||
default = ''/home/${user}/'';
|
type = types.str;
|
||||||
|
default = "/home/${user}/";
|
||||||
description = ''
|
description = ''
|
||||||
The directory holding configuration, incoming and temporary files.
|
The directory holding configuration, incoming and temporary files.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
The user the AMule daemon should run as.
|
The user the AMule daemon should run as.
|
||||||
|
@ -58,6 +58,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
interface = mkOption {
|
interface = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
description = ''
|
description = ''
|
||||||
The interface the BitlBee deamon will be listening to. If `127.0.0.1',
|
The interface the BitlBee deamon will be listening to. If `127.0.0.1',
|
||||||
@ -68,6 +69,7 @@ in
|
|||||||
|
|
||||||
portNumber = mkOption {
|
portNumber = mkOption {
|
||||||
default = 6667;
|
default = 6667;
|
||||||
|
type = types.int;
|
||||||
description = ''
|
description = ''
|
||||||
Number of the port BitlBee will be listening to.
|
Number of the port BitlBee will be listening to.
|
||||||
'';
|
'';
|
||||||
@ -142,6 +144,7 @@ in
|
|||||||
|
|
||||||
extraSettings = mkOption {
|
extraSettings = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Will be inserted in the Settings section of the config file.
|
Will be inserted in the Settings section of the config file.
|
||||||
'';
|
'';
|
||||||
@ -149,6 +152,7 @@ in
|
|||||||
|
|
||||||
extraDefaults = mkOption {
|
extraDefaults = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Will be inserted in the Default section of the config file.
|
Will be inserted in the Default section of the config file.
|
||||||
'';
|
'';
|
||||||
|
@ -42,13 +42,13 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
domain = mkOption {
|
domain = mkOption {
|
||||||
description = ''Proxy account domain/workgroup name.'';
|
description = "Proxy account domain/workgroup name.";
|
||||||
};
|
};
|
||||||
|
|
||||||
password = mkOption {
|
password = mkOption {
|
||||||
default = "/etc/cntlm.password";
|
default = "/etc/cntlm.password";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = ''Proxy account password. Note: use chmod 0600 on /etc/cntlm.password for security.'';
|
description = "Proxy account password. Note: use chmod 0600 on /etc/cntlm.password for security.";
|
||||||
};
|
};
|
||||||
|
|
||||||
netbios_hostname = mkOption {
|
netbios_hostname = mkOption {
|
||||||
|
@ -42,8 +42,7 @@ in {
|
|||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''
|
default = "";
|
||||||
'';
|
|
||||||
description = ''
|
description = ''
|
||||||
Configuration lines appended to the generated connman configuration file.
|
Configuration lines appended to the generated connman configuration file.
|
||||||
'';
|
'';
|
||||||
|
@ -26,8 +26,7 @@ in {
|
|||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''
|
default = "";
|
||||||
'';
|
|
||||||
description = ''
|
description = ''
|
||||||
Extra lines to be added verbatim to dnsdist.conf.
|
Extra lines to be added verbatim to dnsdist.conf.
|
||||||
'';
|
'';
|
||||||
|
@ -10,12 +10,12 @@ options = {
|
|||||||
pidDir = mkOption {
|
pidDir = mkOption {
|
||||||
default = "/run/gateone";
|
default = "/run/gateone";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = ''Path of pid files for GateOne.'';
|
description = "Path of pid files for GateOne.";
|
||||||
};
|
};
|
||||||
settingsDir = mkOption {
|
settingsDir = mkOption {
|
||||||
default = "/var/lib/gateone";
|
default = "/var/lib/gateone";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = ''Path of configuration files for GateOne.'';
|
description = "Path of configuration files for GateOne.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -20,8 +20,8 @@ let
|
|||||||
ssid=${cfg.ssid}
|
ssid=${cfg.ssid}
|
||||||
hw_mode=${cfg.hwMode}
|
hw_mode=${cfg.hwMode}
|
||||||
channel=${toString cfg.channel}
|
channel=${toString cfg.channel}
|
||||||
${optionalString (cfg.countryCode != null) ''country_code=${cfg.countryCode}''}
|
${optionalString (cfg.countryCode != null) "country_code=${cfg.countryCode}"}
|
||||||
${optionalString (cfg.countryCode != null) ''ieee80211d=1''}
|
${optionalString (cfg.countryCode != null) "ieee80211d=1"}
|
||||||
|
|
||||||
# logging (debug level)
|
# logging (debug level)
|
||||||
logger_syslog=-1
|
logger_syslog=-1
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
TagLineFont = "etc/LiberationSans-25.pcf";
|
TagLineFont = "etc/LiberationSans-25.pcf";
|
||||||
TagLineLocale = ''en_US.UTF-8'';
|
TagLineLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
AdminGroup = "root"; # groups that can change server config
|
AdminGroup = "root"; # groups that can change server config
|
||||||
AnswerRotary = "fax"; # don't accept anything else but faxes
|
AnswerRotary = "fax"; # don't accept anything else but faxes
|
||||||
@ -16,7 +16,7 @@
|
|||||||
SessionTracing = "0x78701";
|
SessionTracing = "0x78701";
|
||||||
UUCPLockDir = "/var/lock";
|
UUCPLockDir = "/var/lock";
|
||||||
|
|
||||||
SendPageCmd = ''${pkgs.coreutils}/bin/false''; # prevent pager transmit
|
SendPageCmd = "${pkgs.coreutils}/bin/false"; # prevent pager transmit
|
||||||
SendUUCPCmd = ''${pkgs.coreutils}/bin/false''; # prevent UUCP transmit
|
SendUUCPCmd = "${pkgs.coreutils}/bin/false"; # prevent UUCP transmit
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -85,8 +85,8 @@ let
|
|||||||
# Otherwise, we use `false` to provoke
|
# Otherwise, we use `false` to provoke
|
||||||
# an error if hylafax tries to use it.
|
# an error if hylafax tries to use it.
|
||||||
c.sendmailPath = mkMerge [
|
c.sendmailPath = mkMerge [
|
||||||
(mkIfDefault noWrapper ''${pkgs.coreutils}/bin/false'')
|
(mkIfDefault noWrapper "${pkgs.coreutils}/bin/false")
|
||||||
(mkIfDefault (!noWrapper) ''${wrapperDir}/${program}'')
|
(mkIfDefault (!noWrapper) "${wrapperDir}/${program}")
|
||||||
];
|
];
|
||||||
importDefaultConfig = file:
|
importDefaultConfig = file:
|
||||||
lib.attrsets.mapAttrs
|
lib.attrsets.mapAttrs
|
||||||
@ -121,7 +121,7 @@ in
|
|||||||
|
|
||||||
options.services.hylafax = {
|
options.services.hylafax = {
|
||||||
|
|
||||||
enable = mkEnableOption ''HylaFAX server'';
|
enable = mkEnableOption "HylaFAX server";
|
||||||
|
|
||||||
autostart = mkOption {
|
autostart = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
@ -139,28 +139,28 @@ in
|
|||||||
type = nullOr str1;
|
type = nullOr str1;
|
||||||
default = null;
|
default = null;
|
||||||
example = "49";
|
example = "49";
|
||||||
description = ''Country code for server and all modems.'';
|
description = "Country code for server and all modems.";
|
||||||
};
|
};
|
||||||
|
|
||||||
areaCode = mkOption {
|
areaCode = mkOption {
|
||||||
type = nullOr str1;
|
type = nullOr str1;
|
||||||
default = null;
|
default = null;
|
||||||
example = "30";
|
example = "30";
|
||||||
description = ''Area code for server and all modems.'';
|
description = "Area code for server and all modems.";
|
||||||
};
|
};
|
||||||
|
|
||||||
longDistancePrefix = mkOption {
|
longDistancePrefix = mkOption {
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
example = "0";
|
example = "0";
|
||||||
description = ''Long distance prefix for server and all modems.'';
|
description = "Long distance prefix for server and all modems.";
|
||||||
};
|
};
|
||||||
|
|
||||||
internationalPrefix = mkOption {
|
internationalPrefix = mkOption {
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
example = "00";
|
example = "00";
|
||||||
description = ''International prefix for server and all modems.'';
|
description = "International prefix for server and all modems.";
|
||||||
};
|
};
|
||||||
|
|
||||||
spoolAreaPath = mkOption {
|
spoolAreaPath = mkOption {
|
||||||
@ -267,7 +267,7 @@ in
|
|||||||
spoolExtraInit = mkOption {
|
spoolExtraInit = mkOption {
|
||||||
type = lines;
|
type = lines;
|
||||||
default = "";
|
default = "";
|
||||||
example = ''chmod 0755 . # everyone may read my faxes'';
|
example = "chmod 0755 . # everyone may read my faxes";
|
||||||
description = ''
|
description = ''
|
||||||
Additional shell code that is executed within the
|
Additional shell code that is executed within the
|
||||||
spooling area directory right after its setup.
|
spooling area directory right after its setup.
|
||||||
@ -345,7 +345,7 @@ in
|
|||||||
faxqclean.doneqMinutes = mkOption {
|
faxqclean.doneqMinutes = mkOption {
|
||||||
type = int1;
|
type = int1;
|
||||||
default = 15;
|
default = 15;
|
||||||
example = literalExample ''24*60'';
|
example = literalExample "24*60";
|
||||||
description = ''
|
description = ''
|
||||||
Set the job
|
Set the job
|
||||||
age threshold (in minutes) that controls how long
|
age threshold (in minutes) that controls how long
|
||||||
@ -355,7 +355,7 @@ in
|
|||||||
faxqclean.docqMinutes = mkOption {
|
faxqclean.docqMinutes = mkOption {
|
||||||
type = int1;
|
type = int1;
|
||||||
default = 60;
|
default = 60;
|
||||||
example = literalExample ''24*60'';
|
example = literalExample "24*60";
|
||||||
description = ''
|
description = ''
|
||||||
Set the document
|
Set the document
|
||||||
age threshold (in minutes) that controls how long
|
age threshold (in minutes) that controls how long
|
||||||
|
@ -16,12 +16,12 @@ let
|
|||||||
mkLines = conf:
|
mkLines = conf:
|
||||||
(lib.concatLists
|
(lib.concatLists
|
||||||
(lib.flip lib.mapAttrsToList conf
|
(lib.flip lib.mapAttrsToList conf
|
||||||
(k: map (v: ''${k}: ${v}'')
|
(k: map (v: "${k}: ${v}")
|
||||||
)));
|
)));
|
||||||
include = mkLines { Include = conf.Include or []; };
|
include = mkLines { Include = conf.Include or []; };
|
||||||
other = mkLines ( conf // { Include = []; } );
|
other = mkLines ( conf // { Include = []; } );
|
||||||
in
|
in
|
||||||
pkgs.writeText ''hylafax-config${name}''
|
pkgs.writeText "hylafax-config${name}"
|
||||||
(concatStringsSep "\n" (include ++ other));
|
(concatStringsSep "\n" (include ++ other));
|
||||||
|
|
||||||
globalConfigPath = mkConfigFile "" cfg.faxqConfig;
|
globalConfigPath = mkConfigFile "" cfg.faxqConfig;
|
||||||
@ -29,7 +29,7 @@ let
|
|||||||
modemConfigPath =
|
modemConfigPath =
|
||||||
let
|
let
|
||||||
mkModemConfigFile = { config, name, ... }:
|
mkModemConfigFile = { config, name, ... }:
|
||||||
mkConfigFile ''.${name}''
|
mkConfigFile ".${name}"
|
||||||
(cfg.commonModemConfig // config);
|
(cfg.commonModemConfig // config);
|
||||||
mkLine = { name, type, ... }@modem: ''
|
mkLine = { name, type, ... }@modem: ''
|
||||||
# check if modem config file exists:
|
# check if modem config file exists:
|
||||||
@ -81,7 +81,7 @@ let
|
|||||||
description = "HylaFAX queue manager sendq watch";
|
description = "HylaFAX queue manager sendq watch";
|
||||||
documentation = [ "man:faxq(8)" "man:sendq(5)" ];
|
documentation = [ "man:faxq(8)" "man:sendq(5)" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
pathConfig.PathExistsGlob = [ ''${cfg.spoolAreaPath}/sendq/q*'' ];
|
pathConfig.PathExistsGlob = [ "${cfg.spoolAreaPath}/sendq/q*" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
timers = mkMerge [
|
timers = mkMerge [
|
||||||
@ -134,7 +134,7 @@ let
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
serviceConfig.ExecStop = ''${setupSpoolScript}'';
|
serviceConfig.ExecStop = "${setupSpoolScript}";
|
||||||
serviceConfig.RemainAfterExit = true;
|
serviceConfig.RemainAfterExit = true;
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
unitConfig.RequiresMountsFor = [ cfg.spoolAreaPath ];
|
unitConfig.RequiresMountsFor = [ cfg.spoolAreaPath ];
|
||||||
@ -145,7 +145,7 @@ let
|
|||||||
documentation = [ "man:faxq(8)" ];
|
documentation = [ "man:faxq(8)" ];
|
||||||
requires = [ "hylafax-spool.service" ];
|
requires = [ "hylafax-spool.service" ];
|
||||||
after = [ "hylafax-spool.service" ];
|
after = [ "hylafax-spool.service" ];
|
||||||
wants = mapModems ( { name, ... }: ''hylafax-faxgetty@${name}.service'' );
|
wants = mapModems ( { name, ... }: "hylafax-faxgetty@${name}.service" );
|
||||||
wantedBy = mkIf cfg.autostart [ "multi-user.target" ];
|
wantedBy = mkIf cfg.autostart [ "multi-user.target" ];
|
||||||
serviceConfig.Type = "forking";
|
serviceConfig.Type = "forking";
|
||||||
serviceConfig.ExecStart = ''${pkgs.hylafaxplus}/spool/bin/faxq -q "${cfg.spoolAreaPath}"'';
|
serviceConfig.ExecStart = ''${pkgs.hylafaxplus}/spool/bin/faxq -q "${cfg.spoolAreaPath}"'';
|
||||||
@ -155,7 +155,7 @@ let
|
|||||||
# stopped will always yield a failed send attempt:
|
# stopped will always yield a failed send attempt:
|
||||||
# The fax service is started when the job is created with
|
# The fax service is started when the job is created with
|
||||||
# `sendfax`, but modems need some time to initialize.
|
# `sendfax`, but modems need some time to initialize.
|
||||||
serviceConfig.ExecStartPost = [ ''${waitFaxqScript}'' ];
|
serviceConfig.ExecStartPost = [ "${waitFaxqScript}" ];
|
||||||
# faxquit fails if the pipe is already gone
|
# faxquit fails if the pipe is already gone
|
||||||
# (e.g. the service is already stopping)
|
# (e.g. the service is already stopping)
|
||||||
serviceConfig.ExecStop = ''-${pkgs.hylafaxplus}/spool/bin/faxquit -q "${cfg.spoolAreaPath}"'';
|
serviceConfig.ExecStop = ''-${pkgs.hylafaxplus}/spool/bin/faxquit -q "${cfg.spoolAreaPath}"'';
|
||||||
@ -186,7 +186,7 @@ let
|
|||||||
wantedBy = mkIf cfg.faxcron.enable.spoolInit requires;
|
wantedBy = mkIf cfg.faxcron.enable.spoolInit requires;
|
||||||
startAt = mkIf (cfg.faxcron.enable.frequency!=null) cfg.faxcron.enable.frequency;
|
startAt = mkIf (cfg.faxcron.enable.frequency!=null) cfg.faxcron.enable.frequency;
|
||||||
serviceConfig.ExecStart = concatStringsSep " " [
|
serviceConfig.ExecStart = concatStringsSep " " [
|
||||||
''${pkgs.hylafaxplus}/spool/bin/faxcron''
|
"${pkgs.hylafaxplus}/spool/bin/faxcron"
|
||||||
''-q "${cfg.spoolAreaPath}"''
|
''-q "${cfg.spoolAreaPath}"''
|
||||||
''-info ${toString cfg.faxcron.infoDays}''
|
''-info ${toString cfg.faxcron.infoDays}''
|
||||||
''-log ${toString cfg.faxcron.logDays}''
|
''-log ${toString cfg.faxcron.logDays}''
|
||||||
@ -202,18 +202,18 @@ let
|
|||||||
wantedBy = mkIf cfg.faxqclean.enable.spoolInit requires;
|
wantedBy = mkIf cfg.faxqclean.enable.spoolInit requires;
|
||||||
startAt = mkIf (cfg.faxqclean.enable.frequency!=null) cfg.faxqclean.enable.frequency;
|
startAt = mkIf (cfg.faxqclean.enable.frequency!=null) cfg.faxqclean.enable.frequency;
|
||||||
serviceConfig.ExecStart = concatStringsSep " " [
|
serviceConfig.ExecStart = concatStringsSep " " [
|
||||||
''${pkgs.hylafaxplus}/spool/bin/faxqclean''
|
"${pkgs.hylafaxplus}/spool/bin/faxqclean"
|
||||||
''-q "${cfg.spoolAreaPath}"''
|
''-q "${cfg.spoolAreaPath}"''
|
||||||
''-v''
|
"-v"
|
||||||
(optionalString (cfg.faxqclean.archiving!="never") ''-a'')
|
(optionalString (cfg.faxqclean.archiving!="never") "-a")
|
||||||
(optionalString (cfg.faxqclean.archiving=="always") ''-A'')
|
(optionalString (cfg.faxqclean.archiving=="always") "-A")
|
||||||
''-j ${toString (cfg.faxqclean.doneqMinutes*60)}''
|
''-j ${toString (cfg.faxqclean.doneqMinutes*60)}''
|
||||||
''-d ${toString (cfg.faxqclean.docqMinutes*60)}''
|
''-d ${toString (cfg.faxqclean.docqMinutes*60)}''
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mkFaxgettyService = { name, ... }:
|
mkFaxgettyService = { name, ... }:
|
||||||
lib.nameValuePair ''hylafax-faxgetty@${name}'' rec {
|
lib.nameValuePair "hylafax-faxgetty@${name}" rec {
|
||||||
description = "HylaFAX faxgetty for %I";
|
description = "HylaFAX faxgetty for %I";
|
||||||
documentation = [ "man:faxgetty(8)" ];
|
documentation = [ "man:faxgetty(8)" ];
|
||||||
bindsTo = [ "dev-%i.device" ];
|
bindsTo = [ "dev-%i.device" ];
|
||||||
@ -221,7 +221,7 @@ let
|
|||||||
after = bindsTo ++ requires;
|
after = bindsTo ++ requires;
|
||||||
before = [ "hylafax-faxq.service" "getty.target" ];
|
before = [ "hylafax-faxq.service" "getty.target" ];
|
||||||
unitConfig.StopWhenUnneeded = true;
|
unitConfig.StopWhenUnneeded = true;
|
||||||
unitConfig.AssertFileNotEmpty = ''${cfg.spoolAreaPath}/etc/config.%I'';
|
unitConfig.AssertFileNotEmpty = "${cfg.spoolAreaPath}/etc/config.%I";
|
||||||
serviceConfig.UtmpIdentifier = "%I";
|
serviceConfig.UtmpIdentifier = "%I";
|
||||||
serviceConfig.TTYPath = "/dev/%I";
|
serviceConfig.TTYPath = "/dev/%I";
|
||||||
serviceConfig.Restart = "always";
|
serviceConfig.Restart = "always";
|
||||||
|
@ -17,37 +17,37 @@ in
|
|||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = ''Enable the kippo honeypot ssh server.'';
|
description = "Enable the kippo honeypot ssh server.";
|
||||||
};
|
};
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
default = 2222;
|
default = 2222;
|
||||||
type = types.int;
|
type = types.int;
|
||||||
description = ''TCP port number for kippo to bind to.'';
|
description = "TCP port number for kippo to bind to.";
|
||||||
};
|
};
|
||||||
hostname = mkOption {
|
hostname = mkOption {
|
||||||
default = "nas3";
|
default = "nas3";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = ''Hostname for kippo to present to SSH login'';
|
description = "Hostname for kippo to present to SSH login";
|
||||||
};
|
};
|
||||||
varPath = mkOption {
|
varPath = mkOption {
|
||||||
default = "/var/lib/kippo";
|
default = "/var/lib/kippo";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = ''Path of read/write files needed for operation and configuration.'';
|
description = "Path of read/write files needed for operation and configuration.";
|
||||||
};
|
};
|
||||||
logPath = mkOption {
|
logPath = mkOption {
|
||||||
default = "/var/log/kippo";
|
default = "/var/log/kippo";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = ''Path of log files needed for operation and configuration.'';
|
description = "Path of log files needed for operation and configuration.";
|
||||||
};
|
};
|
||||||
pidPath = mkOption {
|
pidPath = mkOption {
|
||||||
default = "/run/kippo";
|
default = "/run/kippo";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = ''Path of pid files needed for operation.'';
|
description = "Path of pid files needed for operation.";
|
||||||
};
|
};
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
description = ''Extra verbatim configuration added to the end of kippo.cfg.'';
|
description = "Extra verbatim configuration added to the end of kippo.cfg.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -49,15 +49,37 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraSettingsPaths = mkOption {
|
||||||
|
type = types.listOf types.path;
|
||||||
|
default = [];
|
||||||
|
description = ''
|
||||||
|
Additional settings paths used to configure nomad. These can be files or directories.
|
||||||
|
'';
|
||||||
|
example = literalExample ''
|
||||||
|
[ "/etc/nomad-mutable.json" "/run/keys/nomad-with-secrets.json" "/etc/nomad/config.d" ]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = format.type;
|
type = format.type;
|
||||||
default = {
|
default = {};
|
||||||
# Agrees with `StateDirectory = "nomad"` set below.
|
|
||||||
data_dir = "/var/lib/nomad";
|
|
||||||
};
|
|
||||||
description = ''
|
description = ''
|
||||||
Configuration for Nomad. See the <link xlink:href="https://www.nomadproject.io/docs/configuration">documentation</link>
|
Configuration for Nomad. See the <link xlink:href="https://www.nomadproject.io/docs/configuration">documentation</link>
|
||||||
for supported values.
|
for supported values.
|
||||||
|
|
||||||
|
Notes about <literal>data_dir</literal>:
|
||||||
|
|
||||||
|
If <literal>data_dir</literal> is set to a value other than the
|
||||||
|
default value of <literal>"/var/lib/nomad"</literal> it is the Nomad
|
||||||
|
cluster manager's responsibility to make sure that this directory
|
||||||
|
exists and has the appropriate permissions.
|
||||||
|
|
||||||
|
Additionally, if <literal>dropPrivileges</literal> is
|
||||||
|
<literal>true</literal> then <literal>data_dir</literal>
|
||||||
|
<emphasis>cannot</emphasis> be customized. Setting
|
||||||
|
<literal>dropPrivileges</literal> to <literal>true</literal> enables
|
||||||
|
the <literal>DynamicUser</literal> feature of systemd which directly
|
||||||
|
manages and operates on <literal>StateDirectory</literal>.
|
||||||
'';
|
'';
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
{
|
{
|
||||||
@ -77,6 +99,11 @@ in
|
|||||||
|
|
||||||
##### implementation
|
##### implementation
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
services.nomad.settings = {
|
||||||
|
# Agrees with `StateDirectory = "nomad"` set below.
|
||||||
|
data_dir = mkDefault "/var/lib/nomad";
|
||||||
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
etc."nomad.json".source = format.generate "nomad.json" cfg.settings;
|
etc."nomad.json".source = format.generate "nomad.json" cfg.settings;
|
||||||
systemPackages = [ cfg.package ];
|
systemPackages = [ cfg.package ];
|
||||||
@ -96,30 +123,42 @@ in
|
|||||||
iptables
|
iptables
|
||||||
]);
|
]);
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = mkMerge [
|
||||||
DynamicUser = cfg.dropPrivileges;
|
{
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
DynamicUser = cfg.dropPrivileges;
|
||||||
ExecStart = "${cfg.package}/bin/nomad agent -config=/etc/nomad.json";
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
KillMode = "process";
|
ExecStart = "${cfg.package}/bin/nomad agent -config=/etc/nomad.json" +
|
||||||
KillSignal = "SIGINT";
|
concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths;
|
||||||
LimitNOFILE = 65536;
|
KillMode = "process";
|
||||||
LimitNPROC = "infinity";
|
KillSignal = "SIGINT";
|
||||||
OOMScoreAdjust = -1000;
|
LimitNOFILE = 65536;
|
||||||
Restart = "on-failure";
|
LimitNPROC = "infinity";
|
||||||
RestartSec = 2;
|
OOMScoreAdjust = -1000;
|
||||||
# Agrees with the default `data_dir = "/var/lib/nomad"` in `settings` above.
|
Restart = "on-failure";
|
||||||
StateDirectory = "nomad";
|
RestartSec = 2;
|
||||||
TasksMax = "infinity";
|
TasksMax = "infinity";
|
||||||
User = optionalString cfg.dropPrivileges "nomad";
|
}
|
||||||
} // (optionalAttrs cfg.enableDocker {
|
(mkIf cfg.enableDocker {
|
||||||
SupplementaryGroups = "docker"; # space-separated string
|
SupplementaryGroups = "docker"; # space-separated string
|
||||||
});
|
})
|
||||||
|
(mkIf (cfg.settings.data_dir == "/var/lib/nomad") {
|
||||||
|
StateDirectory = "nomad";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
StartLimitIntervalSec = 10;
|
StartLimitIntervalSec = 10;
|
||||||
StartLimitBurst = 3;
|
StartLimitBurst = 3;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = cfg.dropPrivileges -> cfg.settings.data_dir == "/var/lib/nomad";
|
||||||
|
message = "settings.data_dir must be equal to \"/var/lib/nomad\" if dropPrivileges is true";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
# Docker support requires the Docker daemon to be running.
|
# Docker support requires the Docker daemon to be running.
|
||||||
virtualisation.docker.enable = mkIf cfg.enableDocker true;
|
virtualisation.docker.enable = mkIf cfg.enableDocker true;
|
||||||
};
|
};
|
||||||
|
@ -4,13 +4,14 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.chrony;
|
cfg = config.services.chrony;
|
||||||
|
chronyPkg = cfg.package;
|
||||||
|
|
||||||
stateDir = "/var/lib/chrony";
|
stateDir = cfg.directory;
|
||||||
driftFile = "${stateDir}/chrony.drift";
|
driftFile = "${stateDir}/chrony.drift";
|
||||||
keyFile = "${stateDir}/chrony.keys";
|
keyFile = "${stateDir}/chrony.keys";
|
||||||
|
|
||||||
configFile = pkgs.writeText "chrony.conf" ''
|
configFile = pkgs.writeText "chrony.conf" ''
|
||||||
${concatMapStringsSep "\n" (server: "server " + server + " iburst") cfg.servers}
|
${concatMapStringsSep "\n" (server: "server " + server + " " + cfg.serverOption + optionalString (cfg.enableNTS) " nts") cfg.servers}
|
||||||
|
|
||||||
${optionalString
|
${optionalString
|
||||||
(cfg.initstepslew.enabled && (cfg.servers != []))
|
(cfg.initstepslew.enabled && (cfg.servers != []))
|
||||||
@ -19,6 +20,7 @@ let
|
|||||||
|
|
||||||
driftfile ${driftFile}
|
driftfile ${driftFile}
|
||||||
keyfile ${keyFile}
|
keyfile ${keyFile}
|
||||||
|
${optionalString (cfg.enableNTS) "ntsdumpdir ${stateDir}"}
|
||||||
|
|
||||||
${optionalString (!config.time.hardwareClockInLocalTime) "rtconutc"}
|
${optionalString (!config.time.hardwareClockInLocalTime) "rtconutc"}
|
||||||
|
|
||||||
@ -39,14 +41,48 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.chrony;
|
||||||
|
defaultText = "pkgs.chrony";
|
||||||
|
description = ''
|
||||||
|
Which chrony package to use.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
servers = mkOption {
|
servers = mkOption {
|
||||||
default = config.networking.timeServers;
|
default = config.networking.timeServers;
|
||||||
|
type = types.listOf types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The set of NTP servers from which to synchronise.
|
The set of NTP servers from which to synchronise.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
serverOption = mkOption {
|
||||||
|
default = "iburst";
|
||||||
|
type = types.enum [ "iburst" "offline" ];
|
||||||
|
description = ''
|
||||||
|
Set option for server directives.
|
||||||
|
|
||||||
|
Use "iburst" to rapidly poll on startup. Recommended if your machine
|
||||||
|
is consistently online.
|
||||||
|
|
||||||
|
Use "offline" to prevent polling on startup. Recommended if your
|
||||||
|
machine boots offline or is otherwise frequently offline.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
enableNTS = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to enable Network Time Security authentication.
|
||||||
|
Make sure it is supported by your selected NTP server(s).
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
initstepslew = mkOption {
|
initstepslew = mkOption {
|
||||||
|
type = types.attrsOf (types.either types.bool types.int);
|
||||||
default = {
|
default = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
threshold = 1000; # by default, same threshold as 'ntpd -g' (1000s)
|
threshold = 1000; # by default, same threshold as 'ntpd -g' (1000s)
|
||||||
@ -58,6 +94,12 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
directory = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/var/lib/chrony";
|
||||||
|
description = "Directory where chrony state is stored.";
|
||||||
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
@ -79,7 +121,7 @@ in
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
meta.maintainers = with lib.maintainers; [ thoughtpolice ];
|
meta.maintainers = with lib.maintainers; [ thoughtpolice ];
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.chrony ];
|
environment.systemPackages = [ chronyPkg ];
|
||||||
|
|
||||||
users.groups.chrony.gid = config.ids.gids.chrony;
|
users.groups.chrony.gid = config.ids.gids.chrony;
|
||||||
|
|
||||||
@ -109,12 +151,12 @@ in
|
|||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
conflicts = [ "ntpd.service" "systemd-timesyncd.service" ];
|
conflicts = [ "ntpd.service" "systemd-timesyncd.service" ];
|
||||||
|
|
||||||
path = [ pkgs.chrony ];
|
path = [ chronyPkg ];
|
||||||
|
|
||||||
unitConfig.ConditionCapability = "CAP_SYS_TIME";
|
unitConfig.ConditionCapability = "CAP_SYS_TIME";
|
||||||
serviceConfig =
|
serviceConfig =
|
||||||
{ Type = "simple";
|
{ Type = "simple";
|
||||||
ExecStart = "${pkgs.chrony}/bin/chronyd ${chronyFlags}";
|
ExecStart = "${chronyPkg}/bin/chronyd ${chronyFlags}";
|
||||||
|
|
||||||
ProtectHome = "yes";
|
ProtectHome = "yes";
|
||||||
ProtectSystem = "full";
|
ProtectSystem = "full";
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user