mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-22 16:41:08 +00:00
Compare commits
280 Commits
hass-onboa
...
pr/libredi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74b43602bc | ||
|
|
fa169bb239 | ||
|
|
938a52f603 | ||
|
|
ca784e051c | ||
|
|
f60ea3cf39 | ||
|
|
e84df07fe1 | ||
|
|
d56a97cc04 | ||
|
|
b4f74e334e | ||
|
|
d87b0e29ff | ||
|
|
29c2637dda | ||
|
|
410d64db35 | ||
|
|
29cdca7736 | ||
|
|
de9e9c8ce7 | ||
|
|
66f6a84904 | ||
|
|
2ca4ddc9dd | ||
|
|
29226cfea7 | ||
|
|
aa1b867e9a | ||
|
|
25bb46d1d2 | ||
|
|
b6d77cc534 | ||
|
|
194bea6113 | ||
|
|
8e2a123807 | ||
|
|
9baa528861 | ||
|
|
ec17e92f67 | ||
|
|
c0d2793475 | ||
|
|
2dac3f9f96 | ||
|
|
23496088d9 | ||
|
|
ef0e55f22b | ||
|
|
d704ee72c9 | ||
|
|
f75329f0bc | ||
|
|
516d7767c0 | ||
|
|
1b6ed251b7 | ||
|
|
a48dcc5da1 | ||
|
|
20c723dd07 | ||
|
|
f6664fb8ad | ||
|
|
b0f16e56b0 | ||
|
|
ee90eca180 | ||
|
|
f0b8e02958 | ||
|
|
f228b9368b | ||
|
|
a94804c451 | ||
|
|
baccb31d34 | ||
|
|
a5b021e538 | ||
|
|
c2e38ff7b6 | ||
|
|
af976a9d56 | ||
|
|
35f3a899ba | ||
|
|
aaa9ea8ec6 | ||
|
|
1c178195e0 | ||
|
|
bc1660f05b | ||
|
|
016028bcaf | ||
|
|
bc8cfa181b | ||
|
|
13e8ec1f2d | ||
|
|
3741288a4e | ||
|
|
400212a902 | ||
|
|
d607d078e2 | ||
|
|
43885865ac | ||
|
|
df6cdf026f | ||
|
|
240a2d51ef | ||
|
|
1b48e26a61 | ||
|
|
806b928949 | ||
|
|
32693f33a2 | ||
|
|
f72b07e57d | ||
|
|
0417b0e54f | ||
|
|
54a6770929 | ||
|
|
5bc96030b0 | ||
|
|
87e315024e | ||
|
|
56c4f27b18 | ||
|
|
8c32008a02 | ||
|
|
92e6b205ed | ||
|
|
18d1c014bf | ||
|
|
bd14a95898 | ||
|
|
8e69a97f51 | ||
|
|
6d65e4f449 | ||
|
|
bece38afcc | ||
|
|
1f6d0b6016 | ||
|
|
d5f88d5d1c | ||
|
|
555c21b15d | ||
|
|
b216ad166a | ||
|
|
657c59c551 | ||
|
|
a83c427483 | ||
|
|
476d2bc651 | ||
|
|
5780c84a93 | ||
|
|
99eda60ce6 | ||
|
|
1d71a154a2 | ||
|
|
7f09c17574 | ||
|
|
eaaca27fa3 | ||
|
|
680309fc9c | ||
|
|
8f171925b3 | ||
|
|
4e3dcf364e | ||
|
|
8be7ab60b1 | ||
|
|
9a9c42e19f | ||
|
|
84e37a10ec | ||
|
|
371c2a6303 | ||
|
|
7d9ab620de | ||
|
|
025d8692b2 | ||
|
|
8e8822c872 | ||
|
|
ffeb843237 | ||
|
|
b89799acf0 | ||
|
|
2e4cb39214 | ||
|
|
fa0633e7fa | ||
|
|
99cce0e1f1 | ||
|
|
e1739b19ca | ||
|
|
bf2dad5f5f | ||
|
|
d3648def80 | ||
|
|
1faf1ea8eb | ||
|
|
40d92d3be5 | ||
|
|
ff58d2801c | ||
|
|
421acf1022 | ||
|
|
4abe923106 | ||
|
|
aa7d2fe7dc | ||
|
|
acc47db7e6 | ||
|
|
36822caa75 | ||
|
|
a7ba7b6d01 | ||
|
|
afef6588e2 | ||
|
|
73f0983f41 | ||
|
|
8702f45128 | ||
|
|
d016f8ed64 | ||
|
|
9e0c9db6c2 | ||
|
|
68f2c8f820 | ||
|
|
43ad4f2ef0 | ||
|
|
3226550f0b | ||
|
|
2f063f02dc | ||
|
|
6977491210 | ||
|
|
c00251e357 | ||
|
|
617742df4e | ||
|
|
7f765c49f6 | ||
|
|
f672b49afc | ||
|
|
3404d6b0f7 | ||
|
|
aa01f2c1d0 | ||
|
|
5eca7873b9 | ||
|
|
5445b924f8 | ||
|
|
d3edbcdb7a | ||
|
|
e580519465 | ||
|
|
dae72e8486 | ||
|
|
da2dfc91fd | ||
|
|
697e78baaf | ||
|
|
c5b8ba3891 | ||
|
|
07d1985822 | ||
|
|
0807fca47e | ||
|
|
a3083db625 | ||
|
|
dfee1a3150 | ||
|
|
22080492aa | ||
|
|
65f4af1c15 | ||
|
|
8e09232439 | ||
|
|
309e4dc8b9 | ||
|
|
448dde20b1 | ||
|
|
583a3c8b2a | ||
|
|
c4dc6ca635 | ||
|
|
fcda6023e2 | ||
|
|
f7af17693e | ||
|
|
883eeac4ec | ||
|
|
61f9920880 | ||
|
|
6ae50e12ee | ||
|
|
8f8a6ebd14 | ||
|
|
71a5e14eb3 | ||
|
|
0a62fb98de | ||
|
|
9c6bce8748 | ||
|
|
781b5f6a29 | ||
|
|
7e5ee09366 | ||
|
|
db96503b4e | ||
|
|
736acf668f | ||
|
|
5de3af2d1d | ||
|
|
b95fd52eb6 | ||
|
|
2b7a2cf9d9 | ||
|
|
a42fdc6aa9 | ||
|
|
e5f214ff21 | ||
|
|
3be06e76e3 | ||
|
|
ad11f9c9ab | ||
|
|
ce6bc62d48 | ||
|
|
6ba603bcc9 | ||
|
|
83a10248e3 | ||
|
|
644ec84b74 | ||
|
|
4161997c71 | ||
|
|
0ff244342e | ||
|
|
3db2a9d2d3 | ||
|
|
368a7a0285 | ||
|
|
c51774444c | ||
|
|
a41cfc36f5 | ||
|
|
1caf19b8e0 | ||
|
|
c6323fe258 | ||
|
|
d7c4a9bf93 | ||
|
|
a76479057a | ||
|
|
390227326d | ||
|
|
45d339096f | ||
|
|
976849f2e6 | ||
|
|
640c102321 | ||
|
|
b53f8350a5 | ||
|
|
191f7a9ec6 | ||
|
|
62fe0b7b68 | ||
|
|
70599398d8 | ||
|
|
7c824bb1b1 | ||
|
|
8c24528b11 | ||
|
|
1e72ba7b9a | ||
|
|
0bfb9df52b | ||
|
|
33ec6774e9 | ||
|
|
0685060feb | ||
|
|
89b1bf06df | ||
|
|
1099adf48b | ||
|
|
9be0f13aba | ||
|
|
b4bc1009b3 | ||
|
|
c2b3bb6d6a | ||
|
|
ff6056463e | ||
|
|
7c72674285 | ||
|
|
be82be9775 | ||
|
|
7cf72768c0 | ||
|
|
44a1fb1b9c | ||
|
|
7a5a9bbf9e | ||
|
|
c171fe67c3 | ||
|
|
51b8f73d57 | ||
|
|
df3b29de7e | ||
|
|
9102bfddb5 | ||
|
|
b402229177 | ||
|
|
29e6668a9f | ||
|
|
88847203be | ||
|
|
1c7f726a65 | ||
|
|
f482bbe208 | ||
|
|
c80031505e | ||
|
|
dcc7df7fe6 | ||
|
|
a8c155e0f6 | ||
|
|
42d51f710a | ||
|
|
9b65aebff1 | ||
|
|
3daee4c5ee | ||
|
|
931f54ceff | ||
|
|
f6b50bf72d | ||
|
|
88536ae112 | ||
|
|
61de80e499 | ||
|
|
4f5d9f58a2 | ||
|
|
c1c6d7325c | ||
|
|
c62f7d2457 | ||
|
|
0437df79ed | ||
|
|
89bb6efd2d | ||
|
|
42a4f2fd0a | ||
|
|
1db2422130 | ||
|
|
ae2a076cad | ||
|
|
2142bc8d33 | ||
|
|
2adc7639fa | ||
|
|
978e92d997 | ||
|
|
a67949a3fc | ||
|
|
7673d2be90 | ||
|
|
ab04f4777b | ||
|
|
f08158b03d | ||
|
|
b5a491579d | ||
|
|
69b3d7ef23 | ||
|
|
e9202e95e6 | ||
|
|
0f59c03483 | ||
|
|
327876fb7a | ||
|
|
fa7a52b9a9 | ||
|
|
233dac2934 | ||
|
|
57af6a6e7d | ||
|
|
d80e8093d2 | ||
|
|
a1e8dfcdf4 | ||
|
|
dc7580e6c1 | ||
|
|
bf928e5579 | ||
|
|
ab1de37ebc | ||
|
|
746e2b1fc4 | ||
|
|
e0e87e36c6 | ||
|
|
5bbc0c8891 | ||
|
|
b39c23d283 | ||
|
|
bb9930984e | ||
|
|
8de5ed2542 | ||
|
|
7abd144913 | ||
|
|
67751b2737 | ||
|
|
6668f9ae8c | ||
|
|
d9f45ec99e | ||
|
|
4ccd49d249 | ||
|
|
6ee589b39a | ||
|
|
ad068a815c | ||
|
|
7039d66a59 | ||
|
|
c9ecfe7eda | ||
|
|
a0f4e8746d | ||
|
|
9b0ba273bf | ||
|
|
7cbb0b7098 | ||
|
|
8c4cb4ae31 | ||
|
|
42fc350000 | ||
|
|
9c0ac5691c | ||
|
|
b94fa2c253 | ||
|
|
5b2f597b11 | ||
|
|
bd33397607 | ||
|
|
bff126ffbc | ||
|
|
32c3b6983b | ||
|
|
0a55054b16 | ||
|
|
494f5ba951 |
2
.github/workflows/basic-eval.yml
vendored
2
.github/workflows/basic-eval.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
# we don't limit this action to only NixOS repo since the checks are cheap and useful developer feedback
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v19
|
||||
- uses: cachix/install-nix-action@v18
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
|
||||
|
||||
2
.github/workflows/editorconfig.yml
vendored
2
.github/workflows/editorconfig.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
with:
|
||||
# pull_request_target checks out the base branch by default
|
||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
- uses: cachix/install-nix-action@v19
|
||||
- uses: cachix/install-nix-action@v18
|
||||
with:
|
||||
# nixpkgs commit is pinned so that it doesn't break
|
||||
# editorconfig-checker 2.4.0
|
||||
|
||||
2
.github/workflows/manual-nixos.yml
vendored
2
.github/workflows/manual-nixos.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
with:
|
||||
# pull_request_target checks out the base branch by default
|
||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
- uses: cachix/install-nix-action@v19
|
||||
- uses: cachix/install-nix-action@v18
|
||||
with:
|
||||
# explicitly enable sandbox
|
||||
extra_nix_config: sandbox = true
|
||||
|
||||
2
.github/workflows/manual-nixpkgs.yml
vendored
2
.github/workflows/manual-nixpkgs.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
with:
|
||||
# pull_request_target checks out the base branch by default
|
||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
- uses: cachix/install-nix-action@v19
|
||||
- uses: cachix/install-nix-action@v18
|
||||
with:
|
||||
# explicitly enable sandbox
|
||||
extra_nix_config: sandbox = true
|
||||
|
||||
2
.github/workflows/manual-rendering.yml
vendored
2
.github/workflows/manual-rendering.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v19
|
||||
- uses: cachix/install-nix-action@v18
|
||||
with:
|
||||
# explicitly enable sandbox
|
||||
extra_nix_config: sandbox = true
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v19
|
||||
- uses: cachix/install-nix-action@v18
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixpkgs-unstable
|
||||
- name: setup
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
This chapter describes several special builders.
|
||||
</para>
|
||||
<xi:include href="special/fhs-environments.section.xml" />
|
||||
<xi:include href="special/makesetuphook.section.xml" />
|
||||
<xi:include href="special/mkshell.section.xml" />
|
||||
<xi:include href="special/darwin-builder.section.xml" />
|
||||
</chapter>
|
||||
|
||||
37
doc/builders/special/makesetuphook.section.md
Normal file
37
doc/builders/special/makesetuphook.section.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# pkgs.makeSetupHook {#sec-pkgs.makeSetupHook}
|
||||
|
||||
`pkgs.makeSetupHook` is a builder that produces hooks that go in to `nativeBuildInputs`
|
||||
|
||||
## Usage {#sec-pkgs.makeSetupHook-usage}
|
||||
|
||||
```nix
|
||||
pkgs.makeSetupHook {
|
||||
name = "something-hook";
|
||||
propagatedBuildInputs = [ pkgs.commandsomething ];
|
||||
depsTargetTargetPropagated = [ pkgs.libsomething ];
|
||||
} ./script.sh
|
||||
```
|
||||
|
||||
#### setup hook that depends on the hello package and runs hello and @shell@ is substituted with path to bash
|
||||
|
||||
```nix
|
||||
pkgs.makeSetupHook {
|
||||
name = "run-hello-hook";
|
||||
propagatedBuildInputs = [ pkgs.hello ];
|
||||
substitutions = { shell = "${pkgs.bash}/bin/bash"; };
|
||||
passthru.tests.greeting = callPackage ./test { };
|
||||
meta.platforms = lib.platforms.linux;
|
||||
} (writeScript "run-hello-hook.sh" ''
|
||||
#!@shell@
|
||||
hello
|
||||
'')
|
||||
```
|
||||
|
||||
## Attributes
|
||||
|
||||
* `name` Set the name of the hook.
|
||||
* `propagatedBuildInputs` Runtime dependencies (such as binaries) of the hook.
|
||||
* `depsTargetTargetPropagated` Non-binary dependencies.
|
||||
* `meta`
|
||||
* `passthru`
|
||||
* `substitutions` Variables for `substituteAll`
|
||||
@@ -75,7 +75,7 @@ in pkgs.runCommand "doc-support" {}
|
||||
ln -s ${epub-xsl} ./epub.xsl
|
||||
ln -s ${xhtml-xsl} ./xhtml.xsl
|
||||
|
||||
ln -s ${./xmlformat.conf} ./xmlformat.conf
|
||||
ln -s ${../../nixos/doc/xmlformat.conf} ./xmlformat.conf
|
||||
ln -s ${pkgs.documentation-highlighter} ./highlightjs
|
||||
|
||||
echo -n "${version}" > ./version
|
||||
|
||||
@@ -171,7 +171,6 @@ let
|
||||
inherit src version;
|
||||
# nix will complain and tell you the right value to replace this with
|
||||
hash = lib.fakeHash;
|
||||
mixEnv = ""; # default is "prod", when empty includes all dependencies, such as "dev", "test".
|
||||
# if you have build time environment variables add them here
|
||||
MY_ENV_VAR="my_value";
|
||||
};
|
||||
|
||||
@@ -137,12 +137,7 @@ set the default version to a version older than the newest on Hackage. We do
|
||||
this to get them or their reverse dependencies to compile in our package set.
|
||||
4. For all packages, for which the newest Hackage version is not the default
|
||||
version, there will also be a `haskellPackages.foo_x_y_z` package with the
|
||||
newest version. The `x_y_z` part encodes the version with dots replaced by
|
||||
underscores. When the newest version changes by a new release to Hackage the
|
||||
old package will disappear under that name and be replaced by a newer one under
|
||||
the name with the new version. The package name including the version will
|
||||
also disappear when the default version e.g. from Stackage catches up with the
|
||||
newest version from Hackage.
|
||||
newest version.
|
||||
5. For some packages, we also manually add other `haskellPackages.foo_x_y_z`
|
||||
versions, if they are required for a certain build.
|
||||
|
||||
@@ -166,14 +161,12 @@ given in the `.cabal` file of your package and all its dependencies.
|
||||
|
||||
The [Haskell builder in nixpkgs](#haskell-mkderivation) does no such thing.
|
||||
It will simply take as input packages with names off the desired dependencies
|
||||
and just check whether they fulfill the version bounds and fail if they don’t
|
||||
(by default, see `jailbreak` to circumvent this).
|
||||
and just check whether they fulfill the version bounds and (by default, see
|
||||
`jailbreak`) fail if they don’t.
|
||||
|
||||
The `haskellPackages.callPackage` function does the package resolution.
|
||||
It will, e.g., use `haskellPackages.aeson`which has the default version as
|
||||
described above for a package input of name `aeson`. (More general:
|
||||
`<packages>.callPackage f` will call `f` with named inputs provided from the
|
||||
package set `<packages>`.)
|
||||
The package resolution is done by the `haskellPackages.callPackage` function
|
||||
which will, e.g., use `haskellPackages.aeson` for a package input of name
|
||||
`aeson`.
|
||||
While this is the default behavior, it is possible to override the dependencies
|
||||
for a specific package, see
|
||||
[`override` and `overrideScope`](#haskell-overriding-haskell-packages).
|
||||
|
||||
@@ -6,7 +6,7 @@ Nixpkgs provides a couple of facilities for working with this tool.
|
||||
|
||||
## Writing packages providing pkg-config modules
|
||||
|
||||
Packages should set `meta.pkgConfigModules` with the list of package config modules they provide.
|
||||
Packages should set `meta.pkgConfigProvides` with the list of package config modules they provide.
|
||||
They should also use `testers.testMetaPkgConfig` to check that the final built package matches that list.
|
||||
Additionally, the [`validatePkgConfig` setup hook](https://nixos.org/manual/nixpkgs/stable/#validatepkgconfig), will do extra checks on to-be-installed pkg-config modules.
|
||||
|
||||
|
||||
@@ -95,27 +95,6 @@ installPhase() {
|
||||
genericBuild
|
||||
```
|
||||
|
||||
### Building a `stdenv` package in `nix-shell` {#sec-building-stdenv-package-in-nix-shell}
|
||||
|
||||
To build a `stdenv` package in a [`nix-shell`](https://nixos.org/manual/nix/unstable/command-ref/nix-shell.html), use
|
||||
|
||||
```bash
|
||||
nix-shell '<nixpkgs>' -A some_package
|
||||
eval ${unpackPhase:-unpackPhase}
|
||||
cd $sourceRoot
|
||||
eval ${patchPhase:-patchPhase}
|
||||
eval ${configurePhase:-configurePhase}
|
||||
eval ${buildPhase:-buildPhase}
|
||||
```
|
||||
|
||||
To modify a [phase](#sec-stdenv-phases), first print it with
|
||||
|
||||
```bash
|
||||
type buildPhase
|
||||
```
|
||||
|
||||
then change it in a text editor, and paste it back to the terminal.
|
||||
|
||||
## Tools provided by `stdenv` {#sec-tools-of-stdenv}
|
||||
|
||||
The standard environment provides the following packages:
|
||||
|
||||
@@ -213,7 +213,14 @@ rec {
|
||||
outputSpecified = true;
|
||||
drvPath = assert condition; drv.${outputName}.drvPath;
|
||||
outPath = assert condition; drv.${outputName}.outPath;
|
||||
};
|
||||
} //
|
||||
# TODO: give the derivation control over the outputs.
|
||||
# `overrideAttrs` may not be the only attribute that needs
|
||||
# updating when switching outputs.
|
||||
lib.optionalAttrs (passthru?overrideAttrs) {
|
||||
# TODO: also add overrideAttrs when overrideAttrs is not custom, e.g. when not splicing.
|
||||
overrideAttrs = f: (passthru.overrideAttrs f).${outputName};
|
||||
};
|
||||
};
|
||||
|
||||
outputsList = map outputToAttrListElement outputs;
|
||||
|
||||
@@ -40,21 +40,14 @@ rec {
|
||||
# a superior CPU has all the features of an inferior and is able to build and test code for it
|
||||
inferiors = {
|
||||
# x86_64 Intel
|
||||
# https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
||||
default = [ ];
|
||||
westmere = [ ];
|
||||
sandybridge = [ "westmere" ] ++ inferiors.westmere;
|
||||
ivybridge = [ "sandybridge" ] ++ inferiors.sandybridge;
|
||||
haswell = [ "ivybridge" ] ++ inferiors.ivybridge;
|
||||
broadwell = [ "haswell" ] ++ inferiors.haswell;
|
||||
skylake = [ "broadwell" ] ++ inferiors.broadwell;
|
||||
skylake-avx512 = [ "skylake" ] ++ inferiors.skylake;
|
||||
cannonlake = [ "skylake-avx512" ] ++ inferiors.skylake-avx512;
|
||||
icelake-client = [ "cannonlake" ] ++ inferiors.cannonlake;
|
||||
icelake-server = [ "icelake-client" ] ++ inferiors.icelake-client;
|
||||
cascadelake = [ "skylake-avx512" ] ++ inferiors.cannonlake;
|
||||
cooperlake = [ "cascadelake" ] ++ inferiors.cascadelake;
|
||||
tigerlake = [ "icelake-server" ] ++ inferiors.icelake-server;
|
||||
sandybridge = [ "westmere" ] ++ inferiors.westmere;
|
||||
ivybridge = [ "sandybridge" ] ++ inferiors.sandybridge;
|
||||
haswell = [ "ivybridge" ] ++ inferiors.ivybridge;
|
||||
broadwell = [ "haswell" ] ++ inferiors.haswell;
|
||||
skylake = [ "broadwell" ] ++ inferiors.broadwell;
|
||||
skylake-avx512 = [ "skylake" ] ++ inferiors.skylake;
|
||||
|
||||
# x86_64 AMD
|
||||
# TODO: fill this (need testing)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
_0xB10C = {
|
||||
email = "nixpkgs@b10c.me";
|
||||
name = "0xB10C";
|
||||
github = "0xB10C";
|
||||
github = "0xb10c";
|
||||
githubId = 19157360;
|
||||
};
|
||||
_0xbe7a = {
|
||||
@@ -817,7 +817,7 @@
|
||||
notbandali = {
|
||||
name = "Amin Bandali";
|
||||
email = "bandali@gnu.org";
|
||||
github = "bandali0";
|
||||
github = "notbandali";
|
||||
githubId = 1254858;
|
||||
keys = [{
|
||||
fingerprint = "BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103";
|
||||
@@ -932,12 +932,6 @@
|
||||
githubId = 106511;
|
||||
name = "Andrew Kelley";
|
||||
};
|
||||
andrewsmith = {
|
||||
email = "andrew@velvet.software";
|
||||
github = "andrewsmith";
|
||||
githubId = 29887;
|
||||
name = "Andrew Smith";
|
||||
};
|
||||
andsild = {
|
||||
email = "andsild@gmail.com";
|
||||
github = "andsild";
|
||||
@@ -1417,12 +1411,6 @@
|
||||
githubId = 12958979;
|
||||
name = "Mika Naylor";
|
||||
};
|
||||
avakhrenev = {
|
||||
email = "avakhrenev@gmail.com";
|
||||
github = "avakhrenev";
|
||||
githubId = 1060224;
|
||||
name = "Alexey Vakhrenev";
|
||||
};
|
||||
avaq = {
|
||||
email = "nixpkgs@account.avaq.it";
|
||||
github = "Avaq";
|
||||
@@ -1772,7 +1760,7 @@
|
||||
benesim = {
|
||||
name = "Benjamin Isbarn";
|
||||
email = "benjamin.isbarn@gmail.com";
|
||||
github = "BeneSim";
|
||||
github = "benesim";
|
||||
githubId = 29384538;
|
||||
keys = [{
|
||||
fingerprint = "D35E C9CE E631 638F F1D8 B401 6F0E 410D C3EE D02";
|
||||
@@ -2394,12 +2382,6 @@
|
||||
github = "CaptainJawZ";
|
||||
githubId = 43111068;
|
||||
};
|
||||
CardboardTurkey = {
|
||||
name = "Kiran Ostrolenk";
|
||||
email = "kostrolenk@gmail.com";
|
||||
github = "CardboardTurkey";
|
||||
githubId = 34030186;
|
||||
};
|
||||
carlosdagos = {
|
||||
email = "m@cdagostino.io";
|
||||
github = "carlosdagos";
|
||||
@@ -3148,7 +3130,7 @@
|
||||
cust0dian = {
|
||||
email = "serg@effectful.software";
|
||||
github = "cust0dian";
|
||||
githubId = 119854490;
|
||||
githubId = 389387;
|
||||
name = "Serg Nesterov";
|
||||
keys = [{
|
||||
fingerprint = "6E7D BA30 DB5D BA60 693C 3BE3 1512 F6EB 84AE CC8C";
|
||||
@@ -3427,7 +3409,7 @@
|
||||
};
|
||||
davsanchez = {
|
||||
email = "davidslt+nixpkgs@pm.me";
|
||||
github = "DavSanchez";
|
||||
github = "davsanchez";
|
||||
githubId = 11422515;
|
||||
name = "David Sánchez";
|
||||
};
|
||||
@@ -3762,6 +3744,12 @@
|
||||
githubId = 14034137;
|
||||
name = "Mostly Void";
|
||||
};
|
||||
dizfer = {
|
||||
email = "david@izquierdofernandez.com";
|
||||
github = "DIzFer";
|
||||
githubId = 8852888;
|
||||
name = "David Izquierdo";
|
||||
};
|
||||
djacu = {
|
||||
email = "daniel.n.baker@gmail.com";
|
||||
github = "djacu";
|
||||
@@ -3914,7 +3902,6 @@
|
||||
name = "Davide Peressoni";
|
||||
email = "davide.peressoni@tuta.io";
|
||||
matrix = "@dpd-:matrix.org";
|
||||
github = "DPDmancul";
|
||||
githubId = 3186857;
|
||||
};
|
||||
dpercy = {
|
||||
@@ -4345,7 +4332,7 @@
|
||||
};
|
||||
elnudev = {
|
||||
email = "elnu@elnu.com";
|
||||
github = "ElnuDev";
|
||||
github = "elnudev";
|
||||
githubId = 9874955;
|
||||
name = "Elnu";
|
||||
};
|
||||
@@ -4633,7 +4620,7 @@
|
||||
};
|
||||
ewok = {
|
||||
email = "ewok@ewok.ru";
|
||||
github = "ewok-old";
|
||||
github = "ewok";
|
||||
githubId = 454695;
|
||||
name = "Artur Taranchiev";
|
||||
};
|
||||
@@ -5188,12 +5175,6 @@
|
||||
githubId = 606000;
|
||||
name = "Gabriel Adomnicai";
|
||||
};
|
||||
garaiza-93 = {
|
||||
email = "araizagustavo93@gmail.com";
|
||||
github = "garaiza-93";
|
||||
githubId = 57430880;
|
||||
name = "Gustavo Araiza";
|
||||
};
|
||||
Gabriel439 = {
|
||||
email = "Gabriel439@gmail.com";
|
||||
github = "Gabriella439";
|
||||
@@ -5770,7 +5751,7 @@
|
||||
};
|
||||
harrisonthorne = {
|
||||
email = "harrisonthorne@proton.me";
|
||||
github = "muni-corn";
|
||||
github = "harrisonthorne";
|
||||
githubId = 33523827;
|
||||
name = "Harrison Thorne";
|
||||
};
|
||||
@@ -7005,7 +6986,7 @@
|
||||
};
|
||||
jkarlson = {
|
||||
email = "jekarlson@gmail.com";
|
||||
github = "ethorsoe";
|
||||
github = "jkarlson";
|
||||
githubId = 1204734;
|
||||
name = "Emil Karlson";
|
||||
};
|
||||
@@ -7293,12 +7274,6 @@
|
||||
github = "jorsn";
|
||||
githubId = 4646725;
|
||||
};
|
||||
joshniemela = {
|
||||
name = "Joshua Niemelä";
|
||||
email = "josh@jniemela.dk";
|
||||
github = "joshniemela";
|
||||
githubId = 88747315;
|
||||
};
|
||||
joshuafern = {
|
||||
name = "Joshua Fern";
|
||||
email = "joshuafern@protonmail.com";
|
||||
@@ -7789,7 +7764,7 @@
|
||||
name = "Kid";
|
||||
};
|
||||
kidsan = {
|
||||
github = "Kidsan";
|
||||
github = "kidsan";
|
||||
githubId = 8798449;
|
||||
name = "kidsan";
|
||||
};
|
||||
@@ -8579,12 +8554,6 @@
|
||||
githubId = 22085373;
|
||||
name = "Luis Hebendanz";
|
||||
};
|
||||
luizirber = {
|
||||
email = "nixpkgs@luizirber.org";
|
||||
github = "luizirber";
|
||||
githubId = 6642;
|
||||
name = "Luiz Irber";
|
||||
};
|
||||
luizribeiro = {
|
||||
email = "nixpkgs@l9o.dev";
|
||||
matrix = "@luizribeiro:matrix.org";
|
||||
@@ -8692,8 +8661,6 @@
|
||||
loveisgrief = {
|
||||
name = "LoveIsGrief";
|
||||
email = "loveisgrief@tuta.io";
|
||||
github = "LoveIsGrief";
|
||||
githubId = 2829538;
|
||||
keys = [{
|
||||
fingerprint = "9847 4F48 18C6 4E0A F0C5 3529 E96D 1EDF A053 45EB";
|
||||
}];
|
||||
@@ -8845,7 +8812,7 @@
|
||||
};
|
||||
lux = {
|
||||
email = "lux@lux.name";
|
||||
github = "luxzeitlos";
|
||||
github = "luxferresum";
|
||||
githubId = 1208273;
|
||||
matrix = "@lux:ontheblueplanet.com";
|
||||
name = "Lux";
|
||||
@@ -9318,7 +9285,7 @@
|
||||
};
|
||||
maxwell-lt = {
|
||||
email = "maxwell.lt@live.com";
|
||||
github = "Maxwell-lt";
|
||||
github = "maxwell-lt";
|
||||
githubId = 17859747;
|
||||
name = "Maxwell L-T";
|
||||
};
|
||||
@@ -9957,7 +9924,7 @@
|
||||
name = "Mon Aaraj";
|
||||
email = "owo69uwu69@gmail.com";
|
||||
matrix = "@mon:tchncs.de";
|
||||
github = "ribosomerocker";
|
||||
github = "MonAaraj";
|
||||
githubId = 46468162;
|
||||
};
|
||||
monsieurp = {
|
||||
@@ -10206,7 +10173,7 @@
|
||||
munksgaard = {
|
||||
name = "Philip Munksgaard";
|
||||
email = "philip@munksgaard.me";
|
||||
github = "Munksgaard";
|
||||
github = "munksgaard";
|
||||
githubId = 230613;
|
||||
matrix = "@philip:matrix.munksgaard.me";
|
||||
keys = [{
|
||||
@@ -10541,12 +10508,6 @@
|
||||
github = "nikstur";
|
||||
githubId = 61635709;
|
||||
};
|
||||
nintron = {
|
||||
email = "nintron@sent.com";
|
||||
github = "Nintron27";
|
||||
githubId = 47835714;
|
||||
name = "Nintron";
|
||||
};
|
||||
ngerstle = {
|
||||
name = "Nicholas Gerstle";
|
||||
email = "ngerstle@gmail.com";
|
||||
@@ -10829,7 +10790,7 @@
|
||||
};
|
||||
nrhelmi = {
|
||||
email = "helmiinour@gmail.com";
|
||||
github = "NRHelmi";
|
||||
github = "nrhelmi";
|
||||
githubId = 15707703;
|
||||
name = "Helmi Nour";
|
||||
};
|
||||
@@ -11206,7 +11167,7 @@
|
||||
};
|
||||
paddygord = {
|
||||
email = "pgpatrickgordon@gmail.com";
|
||||
github = "avaunit02";
|
||||
github = "paddygord";
|
||||
githubId = 10776658;
|
||||
name = "Patrick Gordon";
|
||||
};
|
||||
@@ -11329,12 +11290,6 @@
|
||||
githubId = 15645854;
|
||||
name = "Brad Christensen";
|
||||
};
|
||||
paveloom = {
|
||||
email = "paveloom@riseup.net";
|
||||
github = "paveloom";
|
||||
githubId = 49961859;
|
||||
name = "Pavel Sobolev";
|
||||
};
|
||||
payas = {
|
||||
email = "relekarpayas@gmail.com";
|
||||
github = "bhankas";
|
||||
@@ -12262,7 +12217,7 @@
|
||||
};
|
||||
ratsclub = {
|
||||
email = "victor@freire.dev.br";
|
||||
github = "ratsclub";
|
||||
github = "vtrf";
|
||||
githubId = 25647735;
|
||||
name = "Victor Freire";
|
||||
};
|
||||
@@ -12526,7 +12481,7 @@
|
||||
};
|
||||
rika = {
|
||||
email = "rika@paymentswit.ch";
|
||||
github = "ScarletHg";
|
||||
github = "NekomimiScience";
|
||||
githubId = 1810487;
|
||||
name = "Rika";
|
||||
};
|
||||
@@ -12872,12 +12827,6 @@
|
||||
githubId = 5236428;
|
||||
name = "Gaëtan André";
|
||||
};
|
||||
rvnstn = {
|
||||
email = "github@rvnstn.de";
|
||||
github = "rvnstn";
|
||||
githubId = 2364742;
|
||||
name = "Tobias Ravenstein";
|
||||
};
|
||||
rvolosatovs = {
|
||||
email = "rvolosatovs@riseup.net";
|
||||
github = "rvolosatovs";
|
||||
@@ -13527,7 +13476,7 @@
|
||||
shreerammodi = {
|
||||
name = "Shreeram Modi";
|
||||
email = "shreerammodi10@gmail.com";
|
||||
github = "shrimpram";
|
||||
github = "Shrimpram";
|
||||
githubId = 67710369;
|
||||
keys = [{
|
||||
fingerprint = "EA88 EA07 26E9 6CBF 6365 3966 163B 16EE 76ED 24CE";
|
||||
@@ -13765,7 +13714,7 @@
|
||||
sno2wman = {
|
||||
name = "SnO2WMaN";
|
||||
email = "me@sno2wman.net";
|
||||
github = "SnO2WMaN";
|
||||
github = "sno2wman";
|
||||
githubId = 15155608;
|
||||
};
|
||||
snpschaaf = {
|
||||
@@ -14519,7 +14468,7 @@
|
||||
};
|
||||
teozkr = {
|
||||
email = "teo@nullable.se";
|
||||
github = "nightkr";
|
||||
github = "teozkr";
|
||||
githubId = 649832;
|
||||
name = "Teo Klestrup Röijezon";
|
||||
};
|
||||
@@ -15006,7 +14955,7 @@
|
||||
};
|
||||
tonyshkurenko = {
|
||||
email = "support@twingate.com";
|
||||
github = "antonshkurenko";
|
||||
github = "tonyshkurenko";
|
||||
githubId = 8597964;
|
||||
name = "Anton Shkurenko";
|
||||
};
|
||||
@@ -15345,7 +15294,7 @@
|
||||
};
|
||||
uthar = {
|
||||
email = "galkowskikasper@gmail.com";
|
||||
github = "Uthar";
|
||||
github = "uthar";
|
||||
githubId = 15697697;
|
||||
name = "Kasper Gałkowski";
|
||||
};
|
||||
@@ -16475,7 +16424,7 @@
|
||||
zebreus = {
|
||||
matrix = "@lennart:cicen.net";
|
||||
email = "lennarteichhorn+nixpkgs@gmail.com";
|
||||
github = "zebreus";
|
||||
github = "Zebreus";
|
||||
githubId = 1557253;
|
||||
name = "Lennart Eichhorn";
|
||||
};
|
||||
|
||||
@@ -66,28 +66,6 @@ let
|
||||
if !builtins.isList files then [ files ] else files
|
||||
);
|
||||
|
||||
packageSetsWithVersionedHead = pkgs.haskell.packages // (
|
||||
let
|
||||
headSet = pkgs.haskell.packages.ghcHEAD;
|
||||
# Determine the next GHC release version following GHC HEAD.
|
||||
# GHC HEAD always has an uneven, tentative version number, e.g. 9.7.
|
||||
# GHC releases always have even numbers, i.e. GHC 9.8 is branched off from
|
||||
# GHC HEAD 9.7. Since we use the to be release number for GHC HEAD's
|
||||
# configuration file, we need to calculate this here.
|
||||
headVersion = lib.pipe headSet.ghc.version [
|
||||
lib.versions.splitVersion
|
||||
(lib.take 2)
|
||||
lib.concatStrings
|
||||
lib.strings.toInt
|
||||
(builtins.add 1)
|
||||
toString
|
||||
];
|
||||
in
|
||||
{
|
||||
"ghc${headVersion}" = headSet;
|
||||
}
|
||||
);
|
||||
|
||||
setsForFile = fileName:
|
||||
let
|
||||
# extract the unique part of the config's file name
|
||||
@@ -99,12 +77,12 @@ let
|
||||
builtins.match "ghc-([0-9]+).([0-9]+).x" configName
|
||||
);
|
||||
# return all package sets under haskell.packages matching the version components
|
||||
setsForVersion = builtins.map (name: packageSetsWithVersionedHead.${name}) (
|
||||
setsForVersion = builtins.map (name: pkgs.haskell.packages.${name}) (
|
||||
builtins.filter (setName:
|
||||
lib.hasPrefix "ghc${configVersion}" setName
|
||||
&& (skipBinaryGHCs -> !(lib.hasInfix "Binary" setName))
|
||||
) (
|
||||
builtins.attrNames packageSetsWithVersionedHead
|
||||
builtins.attrNames pkgs.haskell.packages
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -63,13 +63,11 @@ sed -r \
|
||||
-e '/ lsp-test /d' \
|
||||
-e '/ hie-bios /d' \
|
||||
-e '/ ShellCheck /d' \
|
||||
-e '/ Agda /d' \
|
||||
< "${tmpfile_new}" >> $stackage_config
|
||||
# Explanations:
|
||||
# cabal2nix, distribution-nixpkgs, jailbreak-cabal, language-nix: These are our packages and we know what we are doing.
|
||||
# lsp, lsp-types, lsp-test, hie-bios: These are tightly coupled to hls which is not in stackage. They have no rdeps in stackage.
|
||||
# ShellCheck: latest version of command-line dev tool.
|
||||
# Agda: The Agda community is fast-moving; we strive to always include the newest versions of Agda and the Agda packages in nixpkgs.
|
||||
|
||||
if [[ "${1:-}" == "--do-commit" ]]; then
|
||||
git add $stackage_config
|
||||
|
||||
2
nixos/doc/manual/.gitignore
vendored
Normal file
2
nixos/doc/manual/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
generated
|
||||
manual-combined.xml
|
||||
30
nixos/doc/manual/Makefile
Normal file
30
nixos/doc/manual/Makefile
Normal file
@@ -0,0 +1,30 @@
|
||||
.PHONY: all
|
||||
all: manual-combined.xml
|
||||
|
||||
.PHONY: debug
|
||||
debug: generated manual-combined.xml
|
||||
|
||||
manual-combined.xml: generated *.xml **/*.xml
|
||||
rm -f ./manual-combined.xml
|
||||
nix-shell --pure -Q --packages xmloscopy \
|
||||
--run "xmloscopy --docbook5 ./manual.xml ./manual-combined.xml"
|
||||
|
||||
.PHONY: format
|
||||
format:
|
||||
nix-shell --pure -Q --packages xmlformat \
|
||||
--run "find ../../ -iname '*.xml' -type f -print0 | xargs -0 -I{} -n1 \
|
||||
xmlformat --config-file '../xmlformat.conf' -i {}"
|
||||
|
||||
.PHONY: fix-misc-xml
|
||||
fix-misc-xml:
|
||||
find . -iname '*.xml' -type f \
|
||||
-exec ../varlistentry-fixer.rb {} ';'
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f manual-combined.xml generated
|
||||
|
||||
generated:
|
||||
nix-build ../../release.nix \
|
||||
--attr manualGeneratedSources.x86_64-linux \
|
||||
--out-link ./generated
|
||||
@@ -21,8 +21,8 @@ which is often not what you want. By contrast, in the imperative
|
||||
approach, containers are configured and updated independently from the
|
||||
host system.
|
||||
|
||||
```{=include=} sections
|
||||
imperative-containers.section.md
|
||||
declarative-containers.section.md
|
||||
container-networking.section.md
|
||||
```{=docbook}
|
||||
<xi:include href="imperative-containers.section.xml" />
|
||||
<xi:include href="declarative-containers.section.xml" />
|
||||
<xi:include href="container-networking.section.xml" />
|
||||
```
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
# Administration {#ch-running}
|
||||
|
||||
This chapter describes various aspects of managing a running NixOS system, such as how to use the {command}`systemd` service manager.
|
||||
|
||||
```{=include=} chapters
|
||||
service-mgmt.chapter.md
|
||||
rebooting.chapter.md
|
||||
user-sessions.chapter.md
|
||||
control-groups.chapter.md
|
||||
logging.chapter.md
|
||||
cleaning-store.chapter.md
|
||||
containers.chapter.md
|
||||
troubleshooting.chapter.md
|
||||
```
|
||||
21
nixos/doc/manual/administration/running.xml
Normal file
21
nixos/doc/manual/administration/running.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<part xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="ch-running">
|
||||
<title>Administration</title>
|
||||
<partintro xml:id="ch-running-intro">
|
||||
<para>
|
||||
This chapter describes various aspects of managing a running NixOS system,
|
||||
such as how to use the <command>systemd</command> service manager.
|
||||
</para>
|
||||
</partintro>
|
||||
<xi:include href="../from_md/administration/service-mgmt.chapter.xml" />
|
||||
<xi:include href="../from_md/administration/rebooting.chapter.xml" />
|
||||
<xi:include href="../from_md/administration/user-sessions.chapter.xml" />
|
||||
<xi:include href="../from_md/administration/control-groups.chapter.xml" />
|
||||
<xi:include href="../from_md/administration/logging.chapter.xml" />
|
||||
<xi:include href="../from_md/administration/cleaning-store.chapter.xml" />
|
||||
<xi:include href="../from_md/administration/containers.chapter.xml" />
|
||||
<xi:include href="../from_md/administration/troubleshooting.chapter.xml" />
|
||||
</part>
|
||||
@@ -3,10 +3,10 @@
|
||||
This chapter describes solutions to common problems you might encounter
|
||||
when you manage your NixOS system.
|
||||
|
||||
```{=include=} sections
|
||||
boot-problems.section.md
|
||||
maintenance-mode.section.md
|
||||
rollback.section.md
|
||||
store-corruption.section.md
|
||||
network-problems.section.md
|
||||
```{=docbook}
|
||||
<xi:include href="boot-problems.section.xml" />
|
||||
<xi:include href="maintenance-mode.section.xml" />
|
||||
<xi:include href="rollback.section.xml" />
|
||||
<xi:include href="store-corruption.section.xml" />
|
||||
<xi:include href="network-problems.section.xml" />
|
||||
```
|
||||
|
||||
@@ -11,8 +11,8 @@ manual](https://nixos.org/nix/manual/#chap-writing-nix-expressions), but
|
||||
here we give a short overview of the most important constructs useful in
|
||||
NixOS configuration files.
|
||||
|
||||
```{=include=} sections
|
||||
config-file.section.md
|
||||
abstractions.section.md
|
||||
modularity.section.md
|
||||
```{=docbook}
|
||||
<xi:include href="config-file.section.xml" />
|
||||
<xi:include href="abstractions.section.xml" />
|
||||
<xi:include href="modularity.section.xml" />
|
||||
```
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# Configuration {#ch-configuration}
|
||||
|
||||
This chapter describes how to configure various aspects of a NixOS machine through the configuration file {file}`/etc/nixos/configuration.nix`. As described in [](#sec-changing-config), changes to this file only take effect after you run {command}`nixos-rebuild`.
|
||||
|
||||
```{=include=} chapters
|
||||
config-syntax.chapter.md
|
||||
package-mgmt.chapter.md
|
||||
user-mgmt.chapter.md
|
||||
file-systems.chapter.md
|
||||
x-windows.chapter.md
|
||||
wayland.chapter.md
|
||||
gpu-accel.chapter.md
|
||||
xfce.chapter.md
|
||||
networking.chapter.md
|
||||
linux-kernel.chapter.md
|
||||
subversion.chapter.md
|
||||
```
|
||||
|
||||
```{=include=} chapters
|
||||
@MODULE_CHAPTERS@
|
||||
```
|
||||
|
||||
```{=include=} chapters
|
||||
profiles.chapter.md
|
||||
kubernetes.chapter.md
|
||||
```
|
||||
<!-- Apache; libvirtd virtualisation -->
|
||||
31
nixos/doc/manual/configuration/configuration.xml
Normal file
31
nixos/doc/manual/configuration/configuration.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<part xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="ch-configuration">
|
||||
<title>Configuration</title>
|
||||
<partintro xml:id="ch-configuration-intro">
|
||||
<para>
|
||||
This chapter describes how to configure various aspects of a NixOS machine
|
||||
through the configuration file
|
||||
<filename>/etc/nixos/configuration.nix</filename>. As described in
|
||||
<xref linkend="sec-changing-config" />, changes to this file only take
|
||||
effect after you run <command>nixos-rebuild</command>.
|
||||
</para>
|
||||
</partintro>
|
||||
<xi:include href="../from_md/configuration/config-syntax.chapter.xml" />
|
||||
<xi:include href="../from_md/configuration/package-mgmt.chapter.xml" />
|
||||
<xi:include href="../from_md/configuration/user-mgmt.chapter.xml" />
|
||||
<xi:include href="../from_md/configuration/file-systems.chapter.xml" />
|
||||
<xi:include href="../from_md/configuration/x-windows.chapter.xml" />
|
||||
<xi:include href="../from_md/configuration/wayland.chapter.xml" />
|
||||
<xi:include href="../from_md/configuration/gpu-accel.chapter.xml" />
|
||||
<xi:include href="../from_md/configuration/xfce.chapter.xml" />
|
||||
<xi:include href="../from_md/configuration/networking.chapter.xml" />
|
||||
<xi:include href="../from_md/configuration/linux-kernel.chapter.xml" />
|
||||
<xi:include href="../from_md/configuration/subversion.chapter.xml" />
|
||||
<xi:include href="../generated/modules.xml" xpointer="xpointer(//section[@id='modules']/*)" />
|
||||
<xi:include href="../from_md/configuration/profiles.chapter.xml" />
|
||||
<xi:include href="../from_md/configuration/kubernetes.chapter.xml" />
|
||||
<!-- Apache; libvirtd virtualisation -->
|
||||
</part>
|
||||
@@ -40,7 +40,7 @@ configuration use `pkgs` prefix (variable).
|
||||
To "uninstall" a package, simply remove it from
|
||||
[](#opt-environment.systemPackages) and run `nixos-rebuild switch`.
|
||||
|
||||
```{=include=} sections
|
||||
customizing-packages.section.md
|
||||
adding-custom-packages.section.md
|
||||
```{=docbook}
|
||||
<xi:include href="customizing-packages.section.xml" />
|
||||
<xi:include href="adding-custom-packages.section.xml" />
|
||||
```
|
||||
|
||||
@@ -36,7 +36,7 @@ dropping you to the emergency shell. You can make a mount asynchronous
|
||||
and non-critical by adding `options = [ "nofail" ];`.
|
||||
:::
|
||||
|
||||
```{=include=} sections
|
||||
luks-file-systems.section.md
|
||||
sshfs-file-systems.section.md
|
||||
```{=docbook}
|
||||
<xi:include href="luks-file-systems.section.xml" />
|
||||
<xi:include href="sshfs-file-systems.section.xml" />
|
||||
```
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
This section describes how to configure networking components
|
||||
on your NixOS machine.
|
||||
|
||||
```{=include=} sections
|
||||
network-manager.section.md
|
||||
ssh.section.md
|
||||
ipv4-config.section.md
|
||||
ipv6-config.section.md
|
||||
firewall.section.md
|
||||
wireless.section.md
|
||||
ad-hoc-network-config.section.md
|
||||
renaming-interfaces.section.md
|
||||
```{=docbook}
|
||||
<xi:include href="network-manager.section.xml" />
|
||||
<xi:include href="ssh.section.xml" />
|
||||
<xi:include href="ipv4-config.section.xml" />
|
||||
<xi:include href="ipv6-config.section.xml" />
|
||||
<xi:include href="firewall.section.xml" />
|
||||
<xi:include href="wireless.section.xml" />
|
||||
<xi:include href="ad-hoc-network-config.section.xml" />
|
||||
<xi:include href="renaming-interfaces.section.xml" />
|
||||
```
|
||||
<!-- TODO: OpenVPN, NAT -->
|
||||
|
||||
@@ -12,7 +12,7 @@ NixOS has two distinct styles of package management:
|
||||
`nix-env` command. This style allows mixing packages from different
|
||||
Nixpkgs versions. It's the only choice for non-root users.
|
||||
|
||||
```{=include=} sections
|
||||
declarative-packages.section.md
|
||||
ad-hoc-packages.section.md
|
||||
```{=docbook}
|
||||
<xi:include href="declarative-packages.section.xml" />
|
||||
<xi:include href="ad-hoc-packages.section.xml" />
|
||||
```
|
||||
|
||||
@@ -19,16 +19,16 @@ install media, many are actually intended to be used in real installs.
|
||||
What follows is a brief explanation on the purpose and use-case for each
|
||||
profile. Detailing each option configured by each one is out of scope.
|
||||
|
||||
```{=include=} sections
|
||||
profiles/all-hardware.section.md
|
||||
profiles/base.section.md
|
||||
profiles/clone-config.section.md
|
||||
profiles/demo.section.md
|
||||
profiles/docker-container.section.md
|
||||
profiles/graphical.section.md
|
||||
profiles/hardened.section.md
|
||||
profiles/headless.section.md
|
||||
profiles/installation-device.section.md
|
||||
profiles/minimal.section.md
|
||||
profiles/qemu-guest.section.md
|
||||
```{=docbook}
|
||||
<xi:include href="profiles/all-hardware.section.xml" />
|
||||
<xi:include href="profiles/base.section.xml" />
|
||||
<xi:include href="profiles/clone-config.section.xml" />
|
||||
<xi:include href="profiles/demo.section.xml" />
|
||||
<xi:include href="profiles/docker-container.section.xml" />
|
||||
<xi:include href="profiles/graphical.section.xml" />
|
||||
<xi:include href="profiles/hardened.section.xml" />
|
||||
<xi:include href="profiles/headless.section.xml" />
|
||||
<xi:include href="profiles/installation-device.section.xml" />
|
||||
<xi:include href="profiles/minimal.section.xml" />
|
||||
<xi:include href="profiles/qemu-guest.section.xml" />
|
||||
```
|
||||
|
||||
@@ -68,6 +68,56 @@ let
|
||||
optionIdPrefix = "test-opt-";
|
||||
};
|
||||
|
||||
sources = runCommand "manual-sources" {
|
||||
inputs = lib.sourceFilesBySuffices ./. [ ".xml" ".md" ];
|
||||
nativeBuildInputs = [ pkgs.nixos-render-docs ];
|
||||
} ''
|
||||
mkdir $out
|
||||
cd $out
|
||||
cp -r --no-preserve=all $inputs/* .
|
||||
|
||||
declare -a convert_args
|
||||
while read -r mf; do
|
||||
if [[ "$mf" = *.chapter.md ]]; then
|
||||
convert_args+=("--chapter")
|
||||
else
|
||||
convert_args+=("--section")
|
||||
fi
|
||||
|
||||
convert_args+=("from_md/''${mf%.md}.xml" "$mf")
|
||||
done < <(find . -type f -name '*.md')
|
||||
|
||||
nixos-render-docs manual docbook-fragment \
|
||||
--manpage-urls ${manpageUrls} \
|
||||
"''${convert_args[@]}"
|
||||
'';
|
||||
|
||||
modulesDoc = runCommand "modules.xml" {
|
||||
nativeBuildInputs = [ pkgs.nixos-render-docs ];
|
||||
} ''
|
||||
nixos-render-docs manual docbook-section \
|
||||
--manpage-urls ${manpageUrls} \
|
||||
"$out" \
|
||||
--section \
|
||||
--section-id modules \
|
||||
--chapters ${lib.concatMapStrings (p: "${p.value} ") config.meta.doc}
|
||||
'';
|
||||
|
||||
generatedSources = runCommand "generated-docbook" {} ''
|
||||
mkdir $out
|
||||
ln -s ${modulesDoc} $out/modules.xml
|
||||
ln -s ${optionsDoc.optionsDocBook} $out/options-db.xml
|
||||
ln -s ${testOptionsDoc.optionsDocBook} $out/test-options-db.xml
|
||||
printf "%s" "${version}" > $out/version
|
||||
'';
|
||||
|
||||
copySources =
|
||||
''
|
||||
cp -prd $sources/* . # */
|
||||
ln -s ${generatedSources} ./generated
|
||||
chmod -R u+w .
|
||||
'';
|
||||
|
||||
toc = builtins.toFile "toc.xml"
|
||||
''
|
||||
<toc role="chunk-toc">
|
||||
@@ -98,102 +148,70 @@ let
|
||||
"--stringparam chunk.toc ${toc}"
|
||||
];
|
||||
|
||||
linterFunctions = ''
|
||||
# outputs the context of an xmllint error output
|
||||
# LEN lines around the failing line are printed
|
||||
function context {
|
||||
# length of context
|
||||
local LEN=6
|
||||
# lines to print before error line
|
||||
local BEFORE=4
|
||||
|
||||
# xmllint output lines are:
|
||||
# file.xml:1234: there was an error on line 1234
|
||||
while IFS=':' read -r file line rest; do
|
||||
echo
|
||||
if [[ -n "$rest" ]]; then
|
||||
echo "$file:$line:$rest"
|
||||
local FROM=$(($line>$BEFORE ? $line - $BEFORE : 1))
|
||||
# number lines & filter context
|
||||
nl --body-numbering=a "$file" | sed -n "$FROM,+$LEN p"
|
||||
else
|
||||
if [[ -n "$line" ]]; then
|
||||
echo "$file:$line"
|
||||
else
|
||||
echo "$file"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function lintrng {
|
||||
xmllint --debug --noout --nonet \
|
||||
--relaxng ${docbook5}/xml/rng/docbook/docbook.rng \
|
||||
"$1" \
|
||||
2>&1 | context 1>&2
|
||||
# ^ redirect assumes xmllint doesn’t print to stdout
|
||||
}
|
||||
'';
|
||||
|
||||
manual-combined = runCommand "nixos-manual-combined"
|
||||
{ inputs = lib.sourceFilesBySuffices ./. [ ".xml" ".md" ];
|
||||
nativeBuildInputs = [ pkgs.nixos-render-docs pkgs.libxml2.bin pkgs.libxslt.bin ];
|
||||
{ inherit sources;
|
||||
nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin ];
|
||||
meta.description = "The NixOS manual as plain docbook XML";
|
||||
}
|
||||
''
|
||||
cp -r --no-preserve=all $inputs/* .
|
||||
${copySources}
|
||||
|
||||
substituteInPlace ./manual.md \
|
||||
--replace '@NIXOS_VERSION@' "${version}"
|
||||
substituteInPlace ./configuration/configuration.md \
|
||||
--replace \
|
||||
'@MODULE_CHAPTERS@' \
|
||||
${lib.escapeShellArg (lib.concatMapStringsSep "\n" (p: "${p.value}") config.meta.doc)}
|
||||
substituteInPlace ./nixos-options.md \
|
||||
--replace \
|
||||
'@NIXOS_OPTIONS_JSON@' \
|
||||
${optionsDoc.optionsJSON}/share/doc/nixos/options.json
|
||||
substituteInPlace ./development/writing-nixos-tests.section.md \
|
||||
--replace \
|
||||
'@NIXOS_TEST_OPTIONS_JSON@' \
|
||||
${testOptionsDoc.optionsJSON}/share/doc/nixos/options.json
|
||||
xmllint --xinclude --output ./manual-combined.xml ./manual.xml
|
||||
xmllint --xinclude --noxincludenode \
|
||||
--output ./man-pages-combined.xml ./man-pages.xml
|
||||
|
||||
nixos-render-docs -j $NIX_BUILD_CORES manual docbook \
|
||||
--manpage-urls ${manpageUrls} \
|
||||
--revision ${lib.escapeShellArg revision} \
|
||||
./manual.md \
|
||||
./manual-combined.xml
|
||||
# outputs the context of an xmllint error output
|
||||
# LEN lines around the failing line are printed
|
||||
function context {
|
||||
# length of context
|
||||
local LEN=6
|
||||
# lines to print before error line
|
||||
local BEFORE=4
|
||||
|
||||
${linterFunctions}
|
||||
# xmllint output lines are:
|
||||
# file.xml:1234: there was an error on line 1234
|
||||
while IFS=':' read -r file line rest; do
|
||||
echo
|
||||
if [[ -n "$rest" ]]; then
|
||||
echo "$file:$line:$rest"
|
||||
local FROM=$(($line>$BEFORE ? $line - $BEFORE : 1))
|
||||
# number lines & filter context
|
||||
nl --body-numbering=a "$file" | sed -n "$FROM,+$LEN p"
|
||||
else
|
||||
if [[ -n "$line" ]]; then
|
||||
echo "$file:$line"
|
||||
else
|
||||
echo "$file"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function lintrng {
|
||||
xmllint --debug --noout --nonet \
|
||||
--relaxng ${docbook5}/xml/rng/docbook/docbook.rng \
|
||||
"$1" \
|
||||
2>&1 | context 1>&2
|
||||
# ^ redirect assumes xmllint doesn’t print to stdout
|
||||
}
|
||||
|
||||
mkdir $out
|
||||
cp manual-combined.xml $out/
|
||||
cp man-pages-combined.xml $out/
|
||||
|
||||
lintrng $out/manual-combined.xml
|
||||
'';
|
||||
|
||||
manpages-combined = runCommand "nixos-manpages-combined.xml"
|
||||
{ nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin ];
|
||||
meta.description = "The NixOS manpages as plain docbook XML";
|
||||
}
|
||||
''
|
||||
mkdir generated
|
||||
cp -prd ${./man-pages.xml} man-pages.xml
|
||||
ln -s ${optionsDoc.optionsDocBook} generated/options-db.xml
|
||||
|
||||
xmllint --xinclude --noxincludenode --output $out ./man-pages.xml
|
||||
|
||||
${linterFunctions}
|
||||
|
||||
lintrng $out
|
||||
lintrng $out/man-pages-combined.xml
|
||||
'';
|
||||
|
||||
in rec {
|
||||
inherit generatedSources;
|
||||
|
||||
inherit (optionsDoc) optionsJSON optionsNix optionsDocBook optionsUsedDocbook;
|
||||
|
||||
# Generate the NixOS manual.
|
||||
manualHTML = runCommand "nixos-manual-html"
|
||||
{ nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin ];
|
||||
{ inherit sources;
|
||||
nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin ];
|
||||
meta.description = "The NixOS manual in HTML format";
|
||||
allowedReferences = ["out"];
|
||||
}
|
||||
@@ -230,7 +248,8 @@ in rec {
|
||||
manualHTMLIndex = "${manualHTML}/share/doc/nixos/index.html";
|
||||
|
||||
manualEpub = runCommand "nixos-manual-epub"
|
||||
{ nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin buildPackages.zip ];
|
||||
{ inherit sources;
|
||||
nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin buildPackages.zip ];
|
||||
}
|
||||
''
|
||||
# Generate the epub manual.
|
||||
@@ -281,11 +300,11 @@ in rec {
|
||||
--param man.endnotes.are.numbered 0 \
|
||||
--param man.break.after.slash 1 \
|
||||
${docbook_xsl_ns}/xml/xsl/docbook/manpages/docbook.xsl \
|
||||
${manpages-combined}
|
||||
${manual-combined}/man-pages-combined.xml
|
||||
''
|
||||
else ''
|
||||
mkdir -p $out/share/man/man5
|
||||
nixos-render-docs -j $NIX_BUILD_CORES options manpage \
|
||||
nixos-render-docs options manpage \
|
||||
--revision ${lib.escapeShellArg revision} \
|
||||
${optionsJSON}/share/doc/nixos/options.json \
|
||||
$out/share/man/man5/configuration.nix.5
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
|
||||
# Developing the NixOS Test Driver {#chap-developing-the-test-driver}
|
||||
|
||||
The NixOS test framework is a project of its own.
|
||||
|
||||
It consists of roughly the following components:
|
||||
|
||||
- `nixos/lib/test-driver`: The Python framework that sets up the test and runs the [`testScript`](#test-opt-testScript)
|
||||
- `nixos/lib/testing`: The Nix code responsible for the wiring, written using the (NixOS) Module System.
|
||||
|
||||
These components are exposed publicly through:
|
||||
|
||||
- `nixos/lib/default.nix`: The public interface that exposes the `nixos/lib/testing` entrypoint.
|
||||
- `flake.nix`: Exposes the `lib.nixos`, including the public test interface.
|
||||
|
||||
Beyond the test driver itself, its integration into NixOS and Nixpkgs is important.
|
||||
|
||||
- `pkgs/top-level/all-packages.nix`: Defines the `nixosTests` attribute, used
|
||||
by the package `tests` attributes and OfBorg.
|
||||
- `nixos/release.nix`: Defines the `tests` attribute built by Hydra, independently, but analogous to `nixosTests`
|
||||
- `nixos/release-combined.nix`: Defines which tests are channel blockers.
|
||||
|
||||
Finally, we have legacy entrypoints that users should move away from, but are cared for on a best effort basis.
|
||||
These include `pkgs.nixosTest`, `testing-python.nix` and `make-test-python.nix`.
|
||||
|
||||
## Testing changes to the test framework {#sec-test-the-test-framework}
|
||||
|
||||
When making significant changes to the test framework, we run the tests on Hydra, to avoid disrupting the larger NixOS project.
|
||||
|
||||
For this, we use the `python-test-refactoring` branch in the `NixOS/nixpkgs` repository, and its [corresponding Hydra jobset](https://hydra.nixos.org/jobset/nixos/python-test-refactoring).
|
||||
This branch is used as a pointer, and not as a feature branch.
|
||||
|
||||
1. Rebase the PR onto a recent, good evaluation of `nixos-unstable`
|
||||
2. Create a baseline evaluation by force-pushing this revision of `nixos-unstable` to `python-test-refactoring`.
|
||||
3. Note the evaluation number (we'll call it `<previous>`)
|
||||
4. Push the PR to `python-test-refactoring` and evaluate the PR on Hydra
|
||||
5. Create a comparison URL by navigating to the latest build of the PR and adding to the URL `?compare=<previous>`. This is not necessary for the evaluation that comes right after the baseline.
|
||||
|
||||
Review the removed tests and newly failed tests using the constructed URL; otherwise you will accidentally compare iterations of the PR instead of changes to the PR base.
|
||||
|
||||
As we currently have some flaky tests, newly failing tests are expected, but should be reviewed to make sure that
|
||||
- The number of failures did not increase significantly.
|
||||
- All failures that do occur can reasonably be assumed to fail for a different reason than the changes.
|
||||
@@ -1,15 +0,0 @@
|
||||
# Development {#ch-development}
|
||||
|
||||
This chapter describes how you can modify and extend NixOS.
|
||||
|
||||
```{=include=} chapters
|
||||
sources.chapter.md
|
||||
writing-modules.chapter.md
|
||||
building-parts.chapter.md
|
||||
bootspec.chapter.md
|
||||
what-happens-during-a-system-switch.chapter.md
|
||||
writing-documentation.chapter.md
|
||||
nixos-tests.chapter.md
|
||||
developing-the-test-driver.chapter.md
|
||||
testing-installer.chapter.md
|
||||
```
|
||||
20
nixos/doc/manual/development/development.xml
Normal file
20
nixos/doc/manual/development/development.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<part xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="ch-development">
|
||||
<title>Development</title>
|
||||
<partintro xml:id="ch-development-intro">
|
||||
<para>
|
||||
This chapter describes how you can modify and extend NixOS.
|
||||
</para>
|
||||
</partintro>
|
||||
<xi:include href="../from_md/development/sources.chapter.xml" />
|
||||
<xi:include href="../from_md/development/writing-modules.chapter.xml" />
|
||||
<xi:include href="../from_md/development/building-parts.chapter.xml" />
|
||||
<xi:include href="../from_md/development/bootspec.chapter.xml" />
|
||||
<xi:include href="../from_md/development/what-happens-during-a-system-switch.chapter.xml" />
|
||||
<xi:include href="../from_md/development/writing-documentation.chapter.xml" />
|
||||
<xi:include href="../from_md/development/nixos-tests.chapter.xml" />
|
||||
<xi:include href="../from_md/development/testing-installer.chapter.xml" />
|
||||
</part>
|
||||
@@ -5,9 +5,9 @@ NixOS tests are kept in the directory `nixos/tests`, and are executed
|
||||
(using Nix) by a testing framework that automatically starts one or more
|
||||
virtual machines containing the NixOS system(s) required for the test.
|
||||
|
||||
```{=include=} sections
|
||||
writing-nixos-tests.section.md
|
||||
running-nixos-tests.section.md
|
||||
running-nixos-tests-interactively.section.md
|
||||
linking-nixos-tests-to-packages.section.md
|
||||
```{=docbook}
|
||||
<xi:include href="writing-nixos-tests.section.xml" />
|
||||
<xi:include href="running-nixos-tests.section.xml" />
|
||||
<xi:include href="running-nixos-tests-interactively.section.xml" />
|
||||
<xi:include href="linking-nixos-tests-to-packages.section.xml" />
|
||||
```
|
||||
|
||||
@@ -47,7 +47,7 @@ Most of these actions are either self-explaining but some of them have to do
|
||||
with our units or the activation script. For this reason, these topics are
|
||||
explained in the next sections.
|
||||
|
||||
```{=include=} sections
|
||||
unit-handling.section.md
|
||||
activation-script.section.md
|
||||
```{=docbook}
|
||||
<xi:include href="unit-handling.section.xml" />
|
||||
<xi:include href="activation-script.section.xml" />
|
||||
```
|
||||
|
||||
@@ -83,7 +83,7 @@ Keep the following guidelines in mind when you create and add a topic:
|
||||
|
||||
## Adding a Topic to the Book {#sec-writing-docs-adding-a-topic}
|
||||
|
||||
Open the parent CommonMark file and add a line to the list of
|
||||
Open the parent XML file and add an `xi:include` element to the list of
|
||||
chapters with the file name of the topic that you created. If you
|
||||
created a `section`, you add the file to the `chapter` file. If you created
|
||||
a `chapter`, you add the file to the `part` file.
|
||||
|
||||
@@ -189,14 +189,14 @@ in {
|
||||
```
|
||||
:::
|
||||
|
||||
```{=include=} sections
|
||||
option-declarations.section.md
|
||||
option-types.section.md
|
||||
option-def.section.md
|
||||
assertions.section.md
|
||||
meta-attributes.section.md
|
||||
importing-modules.section.md
|
||||
replace-modules.section.md
|
||||
freeform-modules.section.md
|
||||
settings-options.section.md
|
||||
```{=docbook}
|
||||
<xi:include href="option-declarations.section.xml" />
|
||||
<xi:include href="option-types.section.xml" />
|
||||
<xi:include href="option-def.section.xml" />
|
||||
<xi:include href="assertions.section.xml" />
|
||||
<xi:include href="meta-attributes.section.xml" />
|
||||
<xi:include href="importing-modules.section.xml" />
|
||||
<xi:include href="replace-modules.section.xml" />
|
||||
<xi:include href="freeform-modules.section.xml" />
|
||||
<xi:include href="settings-options.section.xml" />
|
||||
```
|
||||
|
||||
@@ -470,8 +470,6 @@ In that case, `numpy` is chosen from the generic `python3Packages`.
|
||||
|
||||
The following options can be used when writing tests.
|
||||
|
||||
```{=include=} options
|
||||
id-prefix: test-opt-
|
||||
list-id: test-options-list
|
||||
source: @NIXOS_TEST_OPTIONS_JSON@
|
||||
```{=docbook}
|
||||
<xi:include href="../../generated/test-options-db.xml" xpointer="test-options-list"/>
|
||||
```
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# Installation {#ch-installation}
|
||||
|
||||
This section describes how to obtain, install, and configure NixOS for first-time use.
|
||||
|
||||
```{=include=} chapters
|
||||
obtaining.chapter.md
|
||||
installing.chapter.md
|
||||
changing-config.chapter.md
|
||||
upgrading.chapter.md
|
||||
building-nixos.chapter.md
|
||||
```
|
||||
18
nixos/doc/manual/installation/installation.xml
Normal file
18
nixos/doc/manual/installation/installation.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<part xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="ch-installation">
|
||||
<title>Installation</title>
|
||||
<partintro xml:id="ch-installation-intro">
|
||||
<para>
|
||||
This section describes how to obtain, install, and configure NixOS for
|
||||
first-time use.
|
||||
</para>
|
||||
</partintro>
|
||||
<xi:include href="../from_md/installation/obtaining.chapter.xml" />
|
||||
<xi:include href="../from_md/installation/installing.chapter.xml" />
|
||||
<xi:include href="../from_md/installation/changing-config.chapter.xml" />
|
||||
<xi:include href="../from_md/installation/upgrading.chapter.xml" />
|
||||
<xi:include href="../from_md/installation/building-nixos.chapter.xml" />
|
||||
</part>
|
||||
@@ -602,11 +602,11 @@ With a partitioned disk.
|
||||
|
||||
## Additional installation notes {#sec-installation-additional-notes}
|
||||
|
||||
```{=include=} sections
|
||||
installing-usb.section.md
|
||||
installing-pxe.section.md
|
||||
installing-kexec.section.md
|
||||
installing-virtualbox-guest.section.md
|
||||
installing-from-other-distro.section.md
|
||||
installing-behind-a-proxy.section.md
|
||||
```{=docbook}
|
||||
<xi:include href="installing-usb.section.xml" />
|
||||
<xi:include href="installing-pxe.section.xml" />
|
||||
<xi:include href="installing-kexec.section.xml" />
|
||||
<xi:include href="installing-virtualbox-guest.section.xml" />
|
||||
<xi:include href="installing-from-other-distro.section.xml" />
|
||||
<xi:include href="installing-behind-a-proxy.section.xml" />
|
||||
```
|
||||
|
||||
31
nixos/doc/manual/man-configuration.xml
Normal file
31
nixos/doc/manual/man-configuration.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<refentry xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<refmeta>
|
||||
<refentrytitle><filename>configuration.nix</filename>
|
||||
</refentrytitle><manvolnum>5</manvolnum>
|
||||
<refmiscinfo class="source">NixOS</refmiscinfo>
|
||||
<!-- <refmiscinfo class="version"><xi:include href="version.txt" parse="text"/></refmiscinfo> -->
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname><filename>configuration.nix</filename></refname>
|
||||
<refpurpose>NixOS system configuration specification</refpurpose>
|
||||
</refnamediv>
|
||||
<refsection>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
The file <filename>/etc/nixos/configuration.nix</filename> contains the
|
||||
declarative specification of your NixOS system configuration. The command
|
||||
<command>nixos-rebuild</command> takes this file and realises the system
|
||||
configuration specified therein.
|
||||
</para>
|
||||
</refsection>
|
||||
<refsection>
|
||||
<title>Options</title>
|
||||
<para>
|
||||
You can use the following options in <filename>configuration.nix</filename>.
|
||||
</para>
|
||||
<xi:include href="./generated/options-db.xml"
|
||||
xpointer="configuration-variable-list" />
|
||||
</refsection>
|
||||
</refentry>
|
||||
@@ -14,33 +14,5 @@
|
||||
<copyright><year>2007-2022</year><holder>Eelco Dolstra and the Nixpkgs/NixOS contributors</holder>
|
||||
</copyright>
|
||||
</info>
|
||||
<refentry>
|
||||
<refmeta>
|
||||
<refentrytitle><filename>configuration.nix</filename>
|
||||
</refentrytitle><manvolnum>5</manvolnum>
|
||||
<refmiscinfo class="source">NixOS</refmiscinfo>
|
||||
<!-- <refmiscinfo class="version"><xi:include href="version.txt" parse="text"/></refmiscinfo> -->
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname><filename>configuration.nix</filename></refname>
|
||||
<refpurpose>NixOS system configuration specification</refpurpose>
|
||||
</refnamediv>
|
||||
<refsection>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
The file <filename>/etc/nixos/configuration.nix</filename> contains the
|
||||
declarative specification of your NixOS system configuration. The command
|
||||
<command>nixos-rebuild</command> takes this file and realises the system
|
||||
configuration specified therein.
|
||||
</para>
|
||||
</refsection>
|
||||
<refsection>
|
||||
<title>Options</title>
|
||||
<para>
|
||||
You can use the following options in <filename>configuration.nix</filename>.
|
||||
</para>
|
||||
<xi:include href="./generated/options-db.xml"
|
||||
xpointer="configuration-variable-list" />
|
||||
</refsection>
|
||||
</refentry>
|
||||
<xi:include href="man-configuration.xml" />
|
||||
</reference>
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
# NixOS Manual {#book-nixos-manual}
|
||||
## Version @NIXOS_VERSION@
|
||||
|
||||
<!--
|
||||
this is the top-level structure file for the nixos manual.
|
||||
|
||||
the manual structure extends the nixpkgs commonmark further with include
|
||||
blocks to allow better organization of input text. there are six types of
|
||||
include blocks: preface, parts, chapters, sections, appendix, and options.
|
||||
each type except `options`` corresponds to the docbook elements of (roughly)
|
||||
the same name, and can itself can further include blocks to denote its
|
||||
substructure.
|
||||
|
||||
non-`options`` include blocks are fenced code blocks that list a number of
|
||||
files to include, in the form
|
||||
|
||||
```{=include=} <type>
|
||||
<file-name-1>
|
||||
<file-name-2>
|
||||
<...>
|
||||
```
|
||||
|
||||
`options` include blocks do not list file names but contain a list of key-value
|
||||
pairs that describe the options to be included and how to convert them into
|
||||
elements of the manual output type:
|
||||
|
||||
```{=include=} options
|
||||
id-prefix: <options id prefix>
|
||||
list-id: <variable list element id>
|
||||
source: <path to options.json>
|
||||
```
|
||||
|
||||
-->
|
||||
|
||||
```{=include=} preface
|
||||
preface.md
|
||||
```
|
||||
|
||||
```{=include=} parts
|
||||
installation/installation.md
|
||||
configuration/configuration.md
|
||||
administration/running.md
|
||||
development/development.md
|
||||
```
|
||||
|
||||
```{=include=} chapters
|
||||
contributing-to-this-manual.chapter.md
|
||||
```
|
||||
|
||||
```{=include=} appendix
|
||||
nixos-options.md
|
||||
release-notes/release-notes.md
|
||||
```
|
||||
23
nixos/doc/manual/manual.xml
Normal file
23
nixos/doc/manual/manual.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<book xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="book-nixos-manual">
|
||||
<info>
|
||||
<title>NixOS Manual</title>
|
||||
<subtitle>Version <xi:include href="./generated/version" parse="text" />
|
||||
</subtitle>
|
||||
</info>
|
||||
<xi:include href="preface.xml" />
|
||||
<xi:include href="installation/installation.xml" />
|
||||
<xi:include href="configuration/configuration.xml" />
|
||||
<xi:include href="administration/running.xml" />
|
||||
<xi:include href="development/development.xml" />
|
||||
<xi:include href="./from_md/contributing-to-this-manual.chapter.xml" />
|
||||
<appendix xml:id="ch-options">
|
||||
<title>Configuration Options</title>
|
||||
<xi:include href="./generated/options-db.xml"
|
||||
xpointer="configuration-variable-list" />
|
||||
</appendix>
|
||||
<xi:include href="release-notes/release-notes.xml" />
|
||||
</book>
|
||||
@@ -1,7 +0,0 @@
|
||||
# Configuration Options {#ch-options}
|
||||
|
||||
```{=include=} options
|
||||
id-prefix: opt-
|
||||
list-id: configuration-variable-list
|
||||
source: @NIXOS_OPTIONS_JSON@
|
||||
```
|
||||
@@ -1,11 +0,0 @@
|
||||
# Preface {#preface}
|
||||
|
||||
This manual describes how to install, use and extend NixOS, a Linux distribution based on the purely functional package management system [Nix](https://nixos.org/nix), that is composed using modules and packages defined in the [Nixpkgs](https://nixos.org/nixpkgs) project.
|
||||
|
||||
Additional information regarding the Nix package manager and the Nixpkgs project can be found in respectively the [Nix manual](https://nixos.org/nix/manual) and the [Nixpkgs manual](https://nixos.org/nixpkgs/manual).
|
||||
|
||||
If you encounter problems, please report them on the [`Discourse`](https://discourse.nixos.org), the [Matrix room](https://matrix.to/#nix:nixos.org), or on the [`#nixos` channel on Libera.Chat](irc://irc.libera.chat/#nixos). Alternatively, consider [contributing to this manual](#chap-contributing). Bugs should be reported in [NixOS’ GitHub issue tracker](https://github.com/NixOS/nixpkgs/issues).
|
||||
|
||||
::: {.note}
|
||||
Commands prefixed with `#` have to be run as root, either requiring to login as root user or temporarily switching to it using `sudo` for example.
|
||||
:::
|
||||
42
nixos/doc/manual/preface.xml
Normal file
42
nixos/doc/manual/preface.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<preface xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xml:id="preface">
|
||||
<title>Preface</title>
|
||||
<para>
|
||||
This manual describes how to install, use and extend NixOS, a Linux
|
||||
distribution based on the purely functional package management system
|
||||
<link xlink:href="https://nixos.org/nix">Nix</link>, that is composed
|
||||
using modules and packages defined in the
|
||||
<link xlink:href="https://nixos.org/nixpkgs">Nixpkgs</link> project.
|
||||
</para>
|
||||
<para>
|
||||
Additional information regarding the Nix package manager and the Nixpkgs
|
||||
project can be found in respectively the
|
||||
<link xlink:href="https://nixos.org/nix/manual">Nix manual</link> and the
|
||||
<link xlink:href="https://nixos.org/nixpkgs/manual">Nixpkgs manual</link>.
|
||||
</para>
|
||||
<para>
|
||||
If you encounter problems, please report them on the
|
||||
<literal
|
||||
xlink:href="https://discourse.nixos.org">Discourse</literal>,
|
||||
the <link
|
||||
xlink:href="https://matrix.to/#nix:nixos.org">Matrix room</link>,
|
||||
or on the <link
|
||||
xlink:href="irc://irc.libera.chat/#nixos">
|
||||
<literal>#nixos</literal> channel on Libera.Chat</link>.
|
||||
Alternatively, consider <link
|
||||
xlink:href="#chap-contributing">
|
||||
contributing to this manual</link>. Bugs should be
|
||||
reported in
|
||||
<link
|
||||
xlink:href="https://github.com/NixOS/nixpkgs/issues">NixOS’
|
||||
GitHub issue tracker</link>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Commands prefixed with <literal>#</literal> have to be run as root, either
|
||||
requiring to login as root user or temporarily switching to it using
|
||||
<literal>sudo</literal> for example.
|
||||
</para>
|
||||
</note>
|
||||
</preface>
|
||||
@@ -1,25 +0,0 @@
|
||||
# Release Notes {#ch-release-notes}
|
||||
|
||||
This section lists the release notes for each stable version of NixOS and current unstable revision.
|
||||
|
||||
```{=include=} sections
|
||||
rl-2305.section.md
|
||||
rl-2211.section.md
|
||||
rl-2205.section.md
|
||||
rl-2111.section.md
|
||||
rl-2105.section.md
|
||||
rl-2009.section.md
|
||||
rl-2003.section.md
|
||||
rl-1909.section.md
|
||||
rl-1903.section.md
|
||||
rl-1809.section.md
|
||||
rl-1803.section.md
|
||||
rl-1709.section.md
|
||||
rl-1703.section.md
|
||||
rl-1609.section.md
|
||||
rl-1603.section.md
|
||||
rl-1509.section.md
|
||||
rl-1412.section.md
|
||||
rl-1404.section.md
|
||||
rl-1310.section.md
|
||||
```
|
||||
30
nixos/doc/manual/release-notes/release-notes.xml
Normal file
30
nixos/doc/manual/release-notes/release-notes.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<appendix xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="ch-release-notes">
|
||||
<title>Release Notes</title>
|
||||
<para>
|
||||
This section lists the release notes for each stable version of NixOS and
|
||||
current unstable revision.
|
||||
</para>
|
||||
<xi:include href="../from_md/release-notes/rl-2305.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-2211.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-2205.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-2111.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-2105.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-2009.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-2003.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-1909.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-1903.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-1809.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-1803.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-1709.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-1703.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-1609.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-1603.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-1509.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-1412.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-1404.section.xml" />
|
||||
<xi:include href="../from_md/release-notes/rl-1310.section.xml" />
|
||||
</appendix>
|
||||
@@ -10,8 +10,6 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||
|
||||
- Cinnamon has been updated to 5.6, see [the pull request](https://github.com/NixOS/nixpkgs/pull/201328#issue-1449910204) for what is changed.
|
||||
|
||||
- KDE Plasma has been updated to v5.27, see [the release notes](https://kde.org/announcements/plasma/5/5.27.0/) for what is changed.
|
||||
|
||||
- `nixos-rebuild` now supports an extra `--specialisation` option that can be used to change specialisation for `switch` and `test` commands.
|
||||
|
||||
## New Services {#sec-release-23.05-new-services}
|
||||
@@ -36,14 +34,10 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||
|
||||
- [imaginary](https://github.com/h2non/imaginary), a microservice for high-level image processing that Nextcloud can use to generate previews. Available as [services.imaginary](#opt-services.imaginary.enable).
|
||||
|
||||
- [opensearch](https://opensearch.org), a search server alternative to Elasticsearch. Available as [services.opensearch](options.html#opt-services.opensearch.enable).
|
||||
|
||||
- [goeland](https://github.com/slurdge/goeland), an alternative to rss2email written in golang with many filters. Available as [services.goeland](#opt-services.goeland.enable).
|
||||
|
||||
- [atuin](https://github.com/ellie/atuin), a sync server for shell history. Available as [services.atuin](#opt-services.atuin.enable).
|
||||
|
||||
- [networkd-dispatcher](https://gitlab.com/craftyguy/networkd-dispatcher), a dispatcher service for systemd-networkd connection status changes. Available as [services.networkd-dispatcher](#opt-services.networkd-dispatcher.enable).
|
||||
|
||||
- [mmsd](https://gitlab.com/kop316/mmsd), a lower level daemon that transmits and recieves MMSes. Available as [services.mmsd](#opt-services.mmsd.enable).
|
||||
|
||||
- [QDMR](https://dm3mat.darc.de/qdmr/), a GUI application and command line tool for programming DMR radios [programs.qdmr](#opt-programs.qdmr.enable)
|
||||
@@ -70,8 +64,6 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||
|
||||
- `borgbackup` module now has an option for inhibiting system sleep while backups are running, defaulting to off (not inhibiting sleep), available as [`services.borgbackup.jobs.<name>.inhibitsSleep`](#opt-services.borgbackup.jobs._name_.inhibitsSleep).
|
||||
|
||||
- The `ssh` client tool now disables the `~C` escape sequence by default. This can be re-enabled by setting `EnableEscapeCommandline yes`
|
||||
|
||||
- `podman` now uses the `netavark` network stack. Users will need to delete all of their local containers, images, volumes, etc, by running `podman system reset --force` once before upgrading their systems.
|
||||
|
||||
- `git-bug` has been updated to at least version 0.8.0, which includes backwards incompatible changes. The `git-bug-migration` package can be used to upgrade existing repositories.
|
||||
@@ -255,6 +247,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||
|
||||
- The new option `services.tailscale.useRoutingFeatures` controls various settings for using Tailscale features like exit nodes and subnet routers. If you wish to use your machine as an exit node, you can set this setting to `server`, otherwise if you wish to use an exit node you can set this setting to `client`. The strict RPF warning has been removed as the RPF will be loosened automatically based on the value of this setting.
|
||||
|
||||
- `openjdk` from version 11 and above is not build with `openjfx` (i.e.: JavaFX) support by default anymore. You can re-enable it by overriding, e.g.: `openjdk11.override { enableJavaFX = true; };`.
|
||||
|
||||
- [Xastir](https://xastir.org/index.php/Main_Page) can now access AX.25 interfaces via the `libax25` package.
|
||||
|
||||
- `tvbrowser-bin` was removed, and now `tvbrowser` is built from source.
|
||||
|
||||
8
nixos/doc/manual/shell.nix
Normal file
8
nixos/doc/manual/shell.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
let
|
||||
pkgs = import ../../.. { };
|
||||
in
|
||||
pkgs.mkShell {
|
||||
name = "nixos-manual";
|
||||
|
||||
packages = with pkgs; [ xmlformat jing xmloscopy ruby ];
|
||||
}
|
||||
124
nixos/doc/varlistentry-fixer.rb
Executable file
124
nixos/doc/varlistentry-fixer.rb
Executable file
@@ -0,0 +1,124 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# This script is written intended as a living, evolving tooling
|
||||
# to fix oopsies within the docbook documentation.
|
||||
#
|
||||
# This is *not* a formatter. It, instead, handles some known cases
|
||||
# where something bad happened, and fixing it manually is tedious.
|
||||
#
|
||||
# Read the code to see the different cases it handles.
|
||||
#
|
||||
# ALWAYS `make format` after fixing with this!
|
||||
# ALWAYS read the changes, this tool isn't yet proven to be always right.
|
||||
|
||||
require "rexml/document"
|
||||
include REXML
|
||||
|
||||
if ARGV.length < 1 then
|
||||
$stderr.puts "Needs a filename."
|
||||
exit 1
|
||||
end
|
||||
|
||||
filename = ARGV.shift
|
||||
doc = Document.new(File.open(filename))
|
||||
|
||||
$touched = false
|
||||
|
||||
# Fixing varnames having a sibling element without spacing.
|
||||
# This is to fix an initial `xmlformat` issue where `term`
|
||||
# would mangle as spaces.
|
||||
#
|
||||
# <varlistentry>
|
||||
# <term><varname>types.separatedString</varname><replaceable>sep</replaceable> <----
|
||||
# </term>
|
||||
# ...
|
||||
#
|
||||
# Generates: types.separatedStringsep
|
||||
# ^^^^
|
||||
#
|
||||
# <varlistentry xml:id='fun-makeWrapper'>
|
||||
# <term>
|
||||
# <function>makeWrapper</function><replaceable>executable</replaceable><replaceable>wrapperfile</replaceable><replaceable>args</replaceable> <----
|
||||
# </term>
|
||||
#
|
||||
# Generates: makeWrapperexecutablewrapperfileargs
|
||||
# ^^^^ ^^^^ ^^ ^^
|
||||
#
|
||||
# <term>
|
||||
# <option>--option</option><replaceable>name</replaceable><replaceable>value</replaceable> <-----
|
||||
# </term>
|
||||
#
|
||||
# Generates: --optionnamevalue
|
||||
# ^^ ^^
|
||||
doc.elements.each("//varlistentry/term") do |term|
|
||||
["varname", "function", "option", "replaceable"].each do |prev_name|
|
||||
term.elements.each(prev_name) do |el|
|
||||
if el.next_element and
|
||||
el.next_element.name == "replaceable" and
|
||||
el.next_sibling_node.class == Element
|
||||
then
|
||||
$touched = true
|
||||
term.insert_after(el, Text.new(" "))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
# <cmdsynopsis>
|
||||
# <command>nixos-option</command>
|
||||
# <arg>
|
||||
# <option>-I</option><replaceable>path</replaceable> <------
|
||||
# </arg>
|
||||
#
|
||||
# Generates: -Ipath
|
||||
# ^^
|
||||
doc.elements.each("//cmdsynopsis/arg") do |term|
|
||||
["option", "replaceable"].each do |prev_name|
|
||||
term.elements.each(prev_name) do |el|
|
||||
if el.next_element and
|
||||
el.next_element.name == "replaceable" and
|
||||
el.next_sibling_node.class == Element
|
||||
then
|
||||
$touched = true
|
||||
term.insert_after(el, Text.new(" "))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# <cmdsynopsis>
|
||||
# <arg>
|
||||
# <group choice='req'>
|
||||
# <arg choice='plain'>
|
||||
# <option>--profile-name</option>
|
||||
# </arg>
|
||||
#
|
||||
# <arg choice='plain'>
|
||||
# <option>-p</option>
|
||||
# </arg>
|
||||
# </group><replaceable>name</replaceable> <----
|
||||
# </arg>
|
||||
#
|
||||
# Generates: [{--profile-name | -p }name]
|
||||
# ^^^^
|
||||
doc.elements.each("//cmdsynopsis/arg") do |term|
|
||||
["group"].each do |prev_name|
|
||||
term.elements.each(prev_name) do |el|
|
||||
if el.next_element and
|
||||
el.next_element.name == "replaceable" and
|
||||
el.next_sibling_node.class == Element
|
||||
then
|
||||
$touched = true
|
||||
term.insert_after(el, Text.new(" "))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if $touched then
|
||||
doc.context[:attribute_quote] = :quote
|
||||
doc.write(output: File.open(filename, "w"))
|
||||
end
|
||||
@@ -152,7 +152,7 @@ in rec {
|
||||
pkgs.nixos-render-docs
|
||||
];
|
||||
} ''
|
||||
nixos-render-docs -j $NIX_BUILD_CORES options docbook \
|
||||
nixos-render-docs options docbook \
|
||||
--manpage-urls ${pkgs.path + "/doc/manpage-urls.json"} \
|
||||
--revision ${lib.escapeShellArg revision} \
|
||||
--document-type ${lib.escapeShellArg documentType} \
|
||||
|
||||
@@ -22,7 +22,7 @@ in
|
||||
};
|
||||
timeout = lib.mkOption {
|
||||
type = types.nullOr types.int;
|
||||
default = 3600; # 1 hour
|
||||
default = null; # NOTE: null values are filtered out by `meta`.
|
||||
description = mdDoc ''
|
||||
The [{option}`test`](#test-opt-test)'s [`meta.timeout`](https://nixos.org/manual/nixpkgs/stable/#var-meta-timeout) in seconds.
|
||||
'';
|
||||
|
||||
@@ -30,8 +30,8 @@ with lib;
|
||||
beam = super.beam_nox;
|
||||
cairo = super.cairo.override { x11Support = false; };
|
||||
dbus = super.dbus.override { x11Support = false; };
|
||||
ffmpeg_4 = super.ffmpeg_4.override { ffmpegVariant = "headless"; };
|
||||
ffmpeg_5 = super.ffmpeg_5.override { ffmpegVariant = "headless"; };
|
||||
ffmpeg_4 = super.ffmpeg_4-headless;
|
||||
ffmpeg_5 = super.ffmpeg_5-headless;
|
||||
# dep of graphviz, libXpm is optional for Xpm support
|
||||
gd = super.gd.override { withXorg = false; };
|
||||
gobject-introspection = super.gobject-introspection.override { x11Support = false; };
|
||||
@@ -67,7 +67,6 @@ with lib;
|
||||
stoken = super.stoken.override { withGTK3 = false; };
|
||||
# translateManpages -> perlPackages.po4a -> texlive-combined-basic -> texlive-core-big -> libX11
|
||||
util-linux = super.util-linux.override { translateManpages = false; };
|
||||
vim-full = super.vim-full.override { guiSupport = false; };
|
||||
zbar = super.zbar.override { enableVideo = false; withXorg = false; };
|
||||
}));
|
||||
};
|
||||
|
||||
@@ -912,7 +912,6 @@
|
||||
./services/networking/ndppd.nix
|
||||
./services/networking/nebula.nix
|
||||
./services/networking/netbird.nix
|
||||
./services/networking/networkd-dispatcher.nix
|
||||
./services/networking/networkmanager.nix
|
||||
./services/networking/nextdns.nix
|
||||
./services/networking/nftables.nix
|
||||
@@ -1049,7 +1048,6 @@
|
||||
./services/search/hound.nix
|
||||
./services/search/kibana.nix
|
||||
./services/search/meilisearch.nix
|
||||
./services/search/opensearch.nix
|
||||
./services/search/solr.nix
|
||||
./services/security/aesmd.nix
|
||||
./services/security/certmgr.nix
|
||||
|
||||
@@ -34,7 +34,7 @@ let
|
||||
text = if (cfg.configFile != null) then ''
|
||||
cp ${cfg.configFile} ${configPath}
|
||||
# make config file readable by service
|
||||
chown -R --reference="$HOME" "$(dirname ${configPath})"
|
||||
chown -R --reference=$HOME $(dirname ${configPath})
|
||||
'' else ''
|
||||
export CONFIG_FILE=${configPath}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ with lib;
|
||||
AmbientCapabilities = "CAP_SYS_NICE";
|
||||
StateDirectory = "clickhouse";
|
||||
LogsDirectory = "clickhouse";
|
||||
ExecStart = "${cfg.package}/bin/clickhouse-server --config-file=/etc/clickhouse-server/config.xml";
|
||||
ExecStart = "${cfg.package}/bin/clickhouse-server --config-file=${cfg.package}/etc/clickhouse-server/config.xml";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -8,9 +8,19 @@ let
|
||||
keyboard = {
|
||||
options = {
|
||||
devices = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = types.addCheck (types.listOf types.str)
|
||||
(devices: (length devices) > 0);
|
||||
example = [ "/dev/input/by-id/usb-0000_0000-event-kbd" ];
|
||||
description = mdDoc "Paths to keyboard devices.";
|
||||
# TODO replace note with tip, which has not been implemented yet in
|
||||
# nixos/lib/make-options-doc/mergeJSON.py
|
||||
description = mdDoc ''
|
||||
Paths to keyboard devices.
|
||||
|
||||
::: {.note}
|
||||
To avoid unnecessary triggers of the service unit, unplug devices in
|
||||
the order of the list.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
config = mkOption {
|
||||
type = types.lines;
|
||||
@@ -34,10 +44,8 @@ let
|
||||
cap (tap-hold 100 100 caps lctl))
|
||||
'';
|
||||
description = mdDoc ''
|
||||
Configuration other than `defcfg`.
|
||||
|
||||
See [example config files](https://github.com/jtroo/kanata)
|
||||
for more information.
|
||||
Configuration other than `defcfg`. See [example config
|
||||
files](https://github.com/jtroo/kanata) for more information.
|
||||
'';
|
||||
};
|
||||
extraDefCfg = mkOption {
|
||||
@@ -45,12 +53,8 @@ let
|
||||
default = "";
|
||||
example = "danger-enable-cmd yes";
|
||||
description = mdDoc ''
|
||||
Configuration of `defcfg` other than `linux-dev` (generated
|
||||
from the devices option) and
|
||||
`linux-continue-if-no-devs-found` (hardcoded to be yes).
|
||||
|
||||
See [example config files](https://github.com/jtroo/kanata)
|
||||
for more information.
|
||||
Configuration of `defcfg` other than `linux-dev`. See [example
|
||||
config files](https://github.com/jtroo/kanata) for more information.
|
||||
'';
|
||||
};
|
||||
extraArgs = mkOption {
|
||||
@@ -63,7 +67,8 @@ let
|
||||
default = null;
|
||||
example = 6666;
|
||||
description = mdDoc ''
|
||||
Port to run the TCP server on. `null` will not run the server.
|
||||
Port to run the notification server on. `null` will not run the
|
||||
server.
|
||||
'';
|
||||
};
|
||||
};
|
||||
@@ -71,23 +76,28 @@ let
|
||||
|
||||
mkName = name: "kanata-${name}";
|
||||
|
||||
mkDevices = devices:
|
||||
optionalString ((length devices) > 0) "linux-dev ${concatStringsSep ":" devices}";
|
||||
mkDevices = devices: concatStringsSep ":" devices;
|
||||
|
||||
mkConfig = name: keyboard: pkgs.writeText "${mkName name}-config.kdb" ''
|
||||
(defcfg
|
||||
${keyboard.extraDefCfg}
|
||||
${mkDevices keyboard.devices}
|
||||
linux-continue-if-no-devs-found yes)
|
||||
linux-dev ${mkDevices keyboard.devices})
|
||||
|
||||
${keyboard.config}
|
||||
'';
|
||||
|
||||
mkService = name: keyboard: nameValuePair (mkName name) {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "kanata for ${mkDevices keyboard.devices}";
|
||||
|
||||
# Because path units are used to activate service units, which
|
||||
# will start the old stopped services during "nixos-rebuild
|
||||
# switch", stopIfChanged here is a workaround to make sure new
|
||||
# services are running after "nixos-rebuild switch".
|
||||
stopIfChanged = false;
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${getExe cfg.package} \
|
||||
${cfg.package}/bin/kanata \
|
||||
--cfg ${mkConfig name keyboard} \
|
||||
--symlink-path ''${RUNTIME_DIRECTORY}/${name} \
|
||||
${optionalString (keyboard.port != null) "--port ${toString keyboard.port}"} \
|
||||
@@ -136,10 +146,37 @@ let
|
||||
UMask = "0077";
|
||||
};
|
||||
};
|
||||
|
||||
mkPathName = i: name: "${mkName name}-${toString i}";
|
||||
|
||||
mkPath = name: n: i: device:
|
||||
nameValuePair (mkPathName i name) {
|
||||
description =
|
||||
"${toString (i+1)}/${toString n} kanata trigger for ${name}, watching ${device}";
|
||||
wantedBy = optional (i == 0) "multi-user.target";
|
||||
pathConfig = {
|
||||
PathExists = device;
|
||||
# (ab)use systemd.path to construct a trigger chain so that the
|
||||
# service unit is only started when all paths exist
|
||||
# however, manual of systemd.path says Unit's suffix is not ".path"
|
||||
Unit =
|
||||
if (i + 1) == n
|
||||
then "${mkName name}.service"
|
||||
else "${mkPathName (i + 1) name}.path";
|
||||
};
|
||||
unitConfig.StopPropagatedFrom = optional (i > 0) "${mkName name}.service";
|
||||
};
|
||||
|
||||
mkPaths = name: keyboard:
|
||||
let
|
||||
n = length keyboard.devices;
|
||||
in
|
||||
imap0 (mkPath name n) keyboard.devices
|
||||
;
|
||||
in
|
||||
{
|
||||
options.services.kanata = {
|
||||
enable = mkEnableOption (mdDoc "kanata");
|
||||
enable = mkEnableOption (lib.mdDoc "kanata");
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.kanata;
|
||||
@@ -164,7 +201,14 @@ in
|
||||
config = mkIf cfg.enable {
|
||||
hardware.uinput.enable = true;
|
||||
|
||||
systemd.services = mapAttrs' mkService cfg.keyboards;
|
||||
systemd = {
|
||||
paths = trivial.pipe cfg.keyboards [
|
||||
(mapAttrsToList mkPaths)
|
||||
concatLists
|
||||
listToAttrs
|
||||
];
|
||||
services = mapAttrs' mkService cfg.keyboards;
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with maintainers; [ linj ];
|
||||
|
||||
@@ -223,59 +223,22 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
ensureAccounts = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
description = lib.mdDoc ''
|
||||
List of IMAP accounts which get automatically created. Note that for
|
||||
a complete setup, user credentials for these accounts are required too
|
||||
and can be created using the command `maddyctl creds`.
|
||||
This option does not delete accounts which are not (anymore) listed.
|
||||
'';
|
||||
example = [
|
||||
"user1@localhost"
|
||||
"user2@localhost"
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
systemd = {
|
||||
|
||||
packages = [ pkgs.maddy ];
|
||||
services = {
|
||||
maddy = {
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
StateDirectory = [ "maddy" ];
|
||||
};
|
||||
restartTriggers = [ config.environment.etc."maddy/maddy.conf".source ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
services.maddy = {
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
StateDirectory = [ "maddy" ];
|
||||
};
|
||||
maddy-ensure-accounts = {
|
||||
script = ''
|
||||
${optionalString (cfg.ensureAccounts != []) ''
|
||||
${concatMapStrings (account: ''
|
||||
if ! ${pkgs.maddy}/bin/maddyctl imap-acct list | grep "${account}"; then
|
||||
${pkgs.maddy}/bin/maddyctl imap-acct create ${account}
|
||||
fi
|
||||
'') cfg.ensureAccounts}
|
||||
''}
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User= "maddy";
|
||||
};
|
||||
after = [ "maddy.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
restartTriggers = [ config.environment.etc."maddy/maddy.conf".source ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
environment.etc."maddy/maddy.conf" = {
|
||||
|
||||
@@ -11,8 +11,6 @@ let
|
||||
else lib.concatMapStrings (s: "\n ${generators.mkValueStringDefault {} s}") l;
|
||||
mkKeyValue = generators.mkKeyValueDefault {} ":";
|
||||
};
|
||||
|
||||
unifiedConfigDir = cfg.stateDir + "/config";
|
||||
in {
|
||||
options = {
|
||||
services.moonraker = {
|
||||
@@ -32,10 +30,11 @@ in {
|
||||
};
|
||||
|
||||
configDir = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
type = types.path;
|
||||
default = cfg.stateDir + "/config";
|
||||
defaultText = literalExpression ''config.${opt.stateDir} + "/config"'';
|
||||
description = lib.mdDoc ''
|
||||
Deprecated directory containing client-writable configuration files.
|
||||
The directory containing client-writable configuration files.
|
||||
|
||||
Clients will be able to edit files in this directory via the API. This directory must be writable.
|
||||
'';
|
||||
@@ -97,18 +96,8 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
warnings = []
|
||||
++ optional (cfg.settings ? update_manager)
|
||||
''Enabling update_manager is not supported on NixOS and will lead to non-removable warnings in some clients.''
|
||||
++ optional (cfg.configDir != null)
|
||||
''
|
||||
services.moonraker.configDir has been deprecated upstream and will be removed.
|
||||
|
||||
Action: ${
|
||||
if cfg.configDir == unifiedConfigDir then "Simply remove services.moonraker.configDir from your config."
|
||||
else "Move files from `${cfg.configDir}` to `${unifiedConfigDir}` then remove services.moonraker.configDir from your config."
|
||||
}
|
||||
'';
|
||||
warnings = optional (cfg.settings ? update_manager)
|
||||
''Enabling update_manager is not supported on NixOS and will lead to non-removable warnings in some clients.'';
|
||||
|
||||
assertions = [
|
||||
{
|
||||
@@ -135,20 +124,20 @@ in {
|
||||
port = cfg.port;
|
||||
klippy_uds_address = cfg.klipperSocket;
|
||||
};
|
||||
machine = {
|
||||
validate_service = false;
|
||||
};
|
||||
} // (lib.optionalAttrs (cfg.configDir != null) {
|
||||
file_manager = {
|
||||
config_path = cfg.configDir;
|
||||
};
|
||||
});
|
||||
database = {
|
||||
database_path = "${cfg.stateDir}/database";
|
||||
};
|
||||
};
|
||||
fullConfig = recursiveUpdate cfg.settings forcedConfig;
|
||||
in format.generate "moonraker.cfg" fullConfig;
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${cfg.stateDir}' - ${cfg.user} ${cfg.group} - -"
|
||||
] ++ lib.optional (cfg.configDir != null) "d '${cfg.configDir}' - ${cfg.user} ${cfg.group} - -";
|
||||
"d '${cfg.configDir}' - ${cfg.user} ${cfg.group} - -"
|
||||
];
|
||||
|
||||
systemd.services.moonraker = {
|
||||
description = "Moonraker, an API web server for Klipper";
|
||||
@@ -158,16 +147,9 @@ in {
|
||||
|
||||
# Moonraker really wants its own config to be writable...
|
||||
script = ''
|
||||
config_path=${
|
||||
# Deprecated separate config dir
|
||||
if cfg.configDir != null then "${cfg.configDir}/moonraker-temp.cfg"
|
||||
# Config in unified data path
|
||||
else "${unifiedConfigDir}/moonraker-temp.cfg"
|
||||
}
|
||||
mkdir -p $(dirname "$config_path")
|
||||
cp /etc/moonraker.cfg "$config_path"
|
||||
chmod u+w "$config_path"
|
||||
exec ${pkg}/bin/moonraker -d ${cfg.stateDir} -c "$config_path"
|
||||
cp /etc/moonraker.cfg ${cfg.configDir}/moonraker-temp.cfg
|
||||
chmod u+w ${cfg.configDir}/moonraker-temp.cfg
|
||||
exec ${pkg}/bin/moonraker -c ${cfg.configDir}/moonraker-temp.cfg
|
||||
'';
|
||||
|
||||
# Needs `ip` command
|
||||
@@ -202,6 +184,5 @@ in {
|
||||
meta.maintainers = with maintainers; [
|
||||
cab404
|
||||
vtuan10
|
||||
zhaofengli
|
||||
];
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ in
|
||||
|
||||
provision = {
|
||||
enable = cfg.provision.grafana.datasource || cfg.provision.grafana.dashboard;
|
||||
datasources.settings.datasources =
|
||||
datasources =
|
||||
let
|
||||
esVersion = lib.getVersion config.services.elasticsearch.package;
|
||||
in
|
||||
@@ -435,7 +435,7 @@ in
|
||||
};
|
||||
}
|
||||
];
|
||||
dashboards.settings.providers = lib.mkIf cfg.provision.grafana.dashboard [{
|
||||
dashboards = lib.mkIf cfg.provision.grafana.dashboard [{
|
||||
name = "parsedmarc";
|
||||
options.path = "${pkgs.python3Packages.parsedmarc.dashboard}";
|
||||
}];
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.networkd-dispatcher;
|
||||
in {
|
||||
options = {
|
||||
services.networkd-dispatcher = {
|
||||
|
||||
enable = mkEnableOption (mdDoc ''
|
||||
Networkd-dispatcher service for systemd-networkd connection status
|
||||
change. See [https://gitlab.com/craftyguy/networkd-dispatcher](upstream instructions)
|
||||
for usage.
|
||||
'');
|
||||
|
||||
scriptDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/networkd-dispatcher";
|
||||
description = mdDoc ''
|
||||
This directory is used for keeping various scripts read and run by
|
||||
networkd-dispatcher. See [https://gitlab.com/craftyguy/networkd-dispatcher](upstream instructions)
|
||||
for directory structure and script usage.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
systemd = {
|
||||
|
||||
packages = [ pkgs.networkd-dispatcher ];
|
||||
services.networkd-dispatcher = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
# Override existing ExecStart definition
|
||||
serviceConfig.ExecStart = [
|
||||
""
|
||||
"${pkgs.networkd-dispatcher}/bin/networkd-dispatcher -v --script-dir ${cfg.scriptDir} $networkd_dispatcher_args"
|
||||
];
|
||||
};
|
||||
|
||||
# Directory structure required according to upstream instructions
|
||||
# https://gitlab.com/craftyguy/networkd-dispatcher
|
||||
tmpfiles.rules = [
|
||||
"d '${cfg.scriptDir}' 0750 root root - -"
|
||||
"d '${cfg.scriptDir}/routable.d' 0750 root root - -"
|
||||
"d '${cfg.scriptDir}/dormant.d' 0750 root root - -"
|
||||
"d '${cfg.scriptDir}/no-carrier.d' 0750 root root - -"
|
||||
"d '${cfg.scriptDir}/off.d' 0750 root root - -"
|
||||
"d '${cfg.scriptDir}/carrier.d' 0750 root root - -"
|
||||
"d '${cfg.scriptDir}/degraded.d' 0750 root root - -"
|
||||
"d '${cfg.scriptDir}/configuring.d' 0750 root root - -"
|
||||
"d '${cfg.scriptDir}/configured.d' 0750 root root - -"
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,38 +12,27 @@ with lib;
|
||||
config = mkIf config.services.v2raya.enable {
|
||||
environment.systemPackages = [ pkgs.v2raya ];
|
||||
|
||||
systemd.services.v2raya =
|
||||
let
|
||||
nftablesEnabled = config.networking.nftables.enable;
|
||||
iptablesServices = [
|
||||
"iptables.service"
|
||||
] ++ optional config.networking.enableIPv6 "ip6tables.service";
|
||||
tableServices = if nftablesEnabled then [ "nftables.service" ] else iptablesServices;
|
||||
in
|
||||
{
|
||||
unitConfig = {
|
||||
Description = "v2rayA service";
|
||||
Documentation = "https://github.com/v2rayA/v2rayA/wiki";
|
||||
After = [
|
||||
"network.target"
|
||||
"nss-lookup.target"
|
||||
] ++ tableServices;
|
||||
Wants = [ "network.target" ];
|
||||
};
|
||||
|
||||
serviceConfig = {
|
||||
User = "root";
|
||||
ExecStart = "${getExe pkgs.v2raya} --log-disable-timestamp";
|
||||
Environment = [ "V2RAYA_LOG_FILE=/var/log/v2raya/v2raya.log" ];
|
||||
LimitNPROC = 500;
|
||||
LimitNOFILE = 1000000;
|
||||
Restart = "on-failure";
|
||||
Type = "simple";
|
||||
};
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = with pkgs; [ iptables bash iproute2 ]; # required by v2rayA TProxy functionality
|
||||
systemd.services.v2raya = {
|
||||
unitConfig = {
|
||||
Description = "v2rayA service";
|
||||
Documentation = "https://github.com/v2rayA/v2rayA/wiki";
|
||||
After = [ "network.target" "nss-lookup.target" "iptables.service" "ip6tables.service" ];
|
||||
Wants = [ "network.target" ];
|
||||
};
|
||||
|
||||
serviceConfig = {
|
||||
User = "root";
|
||||
ExecStart = "${getExe pkgs.v2raya} --log-disable-timestamp";
|
||||
Environment = [ "V2RAYA_LOG_FILE=/var/log/v2raya/v2raya.log" ];
|
||||
LimitNPROC = 500;
|
||||
LimitNOFILE = 1000000;
|
||||
Restart = "on-failure";
|
||||
Type = "simple";
|
||||
};
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = with pkgs; [ iptables bash iproute2 ]; # required by v2rayA TProxy functionality
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with maintainers; [ elliot ];
|
||||
|
||||
@@ -176,7 +176,7 @@ let
|
||||
|
||||
publicKey = mkOption {
|
||||
example = "xTIBA5rboUvnH4htodjb6e697QjLERt1NAB4mZqp8Dg=";
|
||||
type = types.singleLineStr;
|
||||
type = types.str;
|
||||
description = lib.mdDoc "The base64 public key of the peer.";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,244 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.opensearch;
|
||||
|
||||
settingsFormat = pkgs.formats.yaml {};
|
||||
|
||||
configDir = cfg.dataDir + "/config";
|
||||
|
||||
usingDefaultDataDir = cfg.dataDir == "/var/lib/opensearch";
|
||||
usingDefaultUserAndGroup = cfg.user == "opensearch" && cfg.group == "opensearch";
|
||||
|
||||
opensearchYml = settingsFormat.generate "opensearch.yml" cfg.settings;
|
||||
|
||||
loggingConfigFilename = "log4j2.properties";
|
||||
loggingConfigFile = pkgs.writeTextFile {
|
||||
name = loggingConfigFilename;
|
||||
text = cfg.logging;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
options.services.opensearch = {
|
||||
enable = mkEnableOption (lib.mdDoc "OpenSearch");
|
||||
|
||||
package = lib.mkPackageOptionMD pkgs "OpenSearch" {
|
||||
default = [ "opensearch" ];
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = lib.types.submodule {
|
||||
freeformType = settingsFormat.type;
|
||||
|
||||
options."network.host" = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "127.0.0.1";
|
||||
description = lib.mdDoc ''
|
||||
Which port this service should listen on.
|
||||
'';
|
||||
};
|
||||
|
||||
options."cluster.name" = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "opensearch";
|
||||
description = lib.mdDoc ''
|
||||
The name of the cluster.
|
||||
'';
|
||||
};
|
||||
|
||||
options."discovery.type" = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "single-node";
|
||||
description = lib.mdDoc ''
|
||||
The type of discovery to use.
|
||||
'';
|
||||
};
|
||||
|
||||
options."http.port" = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 9200;
|
||||
description = lib.mdDoc ''
|
||||
The port to listen on for HTTP traffic.
|
||||
'';
|
||||
};
|
||||
|
||||
options."transport.port" = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 9300;
|
||||
description = lib.mdDoc ''
|
||||
The port to listen on for transport traffic.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
default = {};
|
||||
|
||||
description = lib.mdDoc ''
|
||||
OpenSearch configuration.
|
||||
'';
|
||||
};
|
||||
|
||||
logging = lib.mkOption {
|
||||
description = lib.mdDoc "opensearch logging configuration.";
|
||||
|
||||
default = ''
|
||||
logger.action.name = org.opensearch.action
|
||||
logger.action.level = info
|
||||
|
||||
appender.console.type = Console
|
||||
appender.console.name = console
|
||||
appender.console.layout.type = PatternLayout
|
||||
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
|
||||
|
||||
rootLogger.level = info
|
||||
rootLogger.appenderRef.console.ref = console
|
||||
'';
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
dataDir = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
default = "/var/lib/opensearch";
|
||||
apply = converge (removeSuffix "/");
|
||||
description = lib.mdDoc ''
|
||||
Data directory for OpenSearch. If you change this, you need to
|
||||
manually create the directory. You also need to create the
|
||||
`opensearch` user and group, or change
|
||||
[](#opt-services.opensearch.user) and
|
||||
[](#opt-services.opensearch.group) to existing ones with
|
||||
access to the directory.
|
||||
'';
|
||||
};
|
||||
|
||||
user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "opensearch";
|
||||
description = lib.mdDoc ''
|
||||
The user OpenSearch runs as. Should be left at default unless
|
||||
you have very specific needs.
|
||||
'';
|
||||
};
|
||||
|
||||
group = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "opensearch";
|
||||
description = lib.mdDoc ''
|
||||
The group OpenSearch runs as. Should be left at default unless
|
||||
you have very specific needs.
|
||||
'';
|
||||
};
|
||||
|
||||
extraCmdLineOptions = lib.mkOption {
|
||||
description = lib.mdDoc "Extra command line options for the OpenSearch launcher.";
|
||||
default = [ ];
|
||||
type = lib.types.listOf lib.types.str;
|
||||
};
|
||||
|
||||
extraJavaOptions = lib.mkOption {
|
||||
description = lib.mdDoc "Extra command line options for Java.";
|
||||
default = [ ];
|
||||
type = lib.types.listOf lib.types.str;
|
||||
example = [ "-Djava.net.preferIPv4Stack=true" ];
|
||||
};
|
||||
|
||||
restartIfChanged = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = lib.mdDoc ''
|
||||
Automatically restart the service on config change.
|
||||
This can be set to false to defer restarts on a server or cluster.
|
||||
Please consider the security implications of inadvertently running an older version,
|
||||
and the possibility of unexpected behavior caused by inconsistent versions across a cluster when disabling this option.
|
||||
'';
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.opensearch = {
|
||||
description = "OpenSearch Daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
path = [ pkgs.inetutils ];
|
||||
inherit (cfg) restartIfChanged;
|
||||
environment = {
|
||||
OPENSEARCH_HOME = cfg.dataDir;
|
||||
OPENSEARCH_JAVA_OPTS = toString cfg.extraJavaOptions;
|
||||
OPENSEARCH_PATH_CONF = configDir;
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStartPre =
|
||||
let
|
||||
startPreFullPrivileges = ''
|
||||
set -o errexit -o pipefail -o nounset -o errtrace
|
||||
shopt -s inherit_errexit
|
||||
'' + (optionalString (!config.boot.isContainer) ''
|
||||
# Only set vm.max_map_count if lower than ES required minimum
|
||||
# This avoids conflict if configured via boot.kernel.sysctl
|
||||
if [ $(${pkgs.procps}/bin/sysctl -n vm.max_map_count) -lt 262144 ]; then
|
||||
${pkgs.procps}/bin/sysctl -w vm.max_map_count=262144
|
||||
fi
|
||||
'');
|
||||
startPreUnprivileged = ''
|
||||
set -o errexit -o pipefail -o nounset -o errtrace
|
||||
shopt -s inherit_errexit
|
||||
|
||||
# Install plugins
|
||||
ln -sfT ${cfg.package}/lib ${cfg.dataDir}/lib
|
||||
ln -sfT ${cfg.package}/modules ${cfg.dataDir}/modules
|
||||
|
||||
# opensearch needs to create the opensearch.keystore in the config directory
|
||||
# so this directory needs to be writable.
|
||||
mkdir -p ${configDir}
|
||||
chmod 0700 ${configDir}
|
||||
|
||||
# Note that we copy config files from the nix store instead of symbolically linking them
|
||||
# because otherwise X-Pack Security will raise the following exception:
|
||||
# java.security.AccessControlException:
|
||||
# access denied ("java.io.FilePermission" "/var/lib/opensearch/config/opensearch.yml" "read")
|
||||
|
||||
cp ${opensearchYml} ${configDir}/opensearch.yml
|
||||
|
||||
# Make sure the logging configuration for old OpenSearch versions is removed:
|
||||
rm -f "${configDir}/logging.yml"
|
||||
cp ${loggingConfigFile} ${configDir}/${loggingConfigFilename}
|
||||
mkdir -p ${configDir}/scripts
|
||||
cp ${cfg.package}/config/jvm.options ${configDir}/jvm.options
|
||||
|
||||
# redirect jvm logs to the data directory
|
||||
mkdir -p ${cfg.dataDir}/logs
|
||||
chmod 0700 ${cfg.dataDir}/logs
|
||||
sed -e '#logs/gc.log#${cfg.dataDir}/logs/gc.log#' -i ${configDir}/jvm.options
|
||||
'';
|
||||
in [
|
||||
"+${pkgs.writeShellScript "opensearch-start-pre-full-privileges" startPreFullPrivileges}"
|
||||
"${pkgs.writeShellScript "opensearch-start-pre-unprivileged" startPreUnprivileged}"
|
||||
];
|
||||
ExecStartPost = pkgs.writeShellScript "opensearch-start-post" ''
|
||||
set -o errexit -o pipefail -o nounset -o errtrace
|
||||
shopt -s inherit_errexit
|
||||
|
||||
# Make sure opensearch is up and running before dependents
|
||||
# are started
|
||||
while ! ${pkgs.curl}/bin/curl -sS -f http://${cfg.settings."network.host"}:${toString cfg.settings."http.port"} 2>/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
'';
|
||||
ExecStart = "${cfg.package}/bin/opensearch ${toString cfg.extraCmdLineOptions}";
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
LimitNOFILE = "1024000";
|
||||
Restart = "always";
|
||||
TimeoutStartSec = "infinity";
|
||||
DynamicUser = usingDefaultUserAndGroup && usingDefaultDataDir;
|
||||
} // (optionalAttrs (usingDefaultDataDir) {
|
||||
StateDirectory = "opensearch";
|
||||
StateDirectoryMode = "0700";
|
||||
});
|
||||
};
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
};
|
||||
}
|
||||
@@ -152,7 +152,7 @@ services.akkoma.config.":pleroma".":media_preview_proxy" = {
|
||||
|
||||
## Frontend management {#modules-services-akkoma-frontend-management}
|
||||
|
||||
Akkoma will be deployed with the `akkoma-fe` and `admin-fe` frontends by default. These can be
|
||||
Akkoma will be deployed with the `pleroma-fe` and `admin-fe` frontends by default. These can be
|
||||
modified by setting
|
||||
[{option}`services.akkoma.frontends`](options.html#opt-services.akkoma.frontends).
|
||||
|
||||
@@ -160,7 +160,7 @@ The following example overrides the primary frontend’s default configuration u
|
||||
derivation.
|
||||
|
||||
```nix
|
||||
services.akkoma.frontends.primary.package = pkgs.runCommand "akkoma-fe" {
|
||||
services.akkoma.frontends.primary.package = pkgs.runCommand "pleroma-fe" {
|
||||
config = builtins.toJSON {
|
||||
expertLevel = 1;
|
||||
collapseMessageWithSubject = false;
|
||||
@@ -177,10 +177,10 @@ services.akkoma.frontends.primary.package = pkgs.runCommand "akkoma-fe" {
|
||||
passAsFile = [ "config" ];
|
||||
} ''
|
||||
mkdir $out
|
||||
lndir ${pkgs.akkoma-frontends.akkoma-fe} $out
|
||||
lndir ${pkgs.akkoma-frontends.pleroma-fe} $out
|
||||
|
||||
rm $out/static/config.json
|
||||
jq -s add ${pkgs.akkoma-frontends.akkoma-fe}/static/config.json ${config} \
|
||||
jq -s add ${pkgs.akkoma-frontends.pleroma-fe}/static/config.json ${config} \
|
||||
>$out/static/config.json
|
||||
'';
|
||||
```
|
||||
|
||||
@@ -51,13 +51,13 @@ let
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
description = mdDoc "Akkoma frontend package.";
|
||||
example = literalExpression "pkgs.akkoma-frontends.akkoma-fe";
|
||||
example = literalExpression "pkgs.akkoma-frontends.pleroma-fe";
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.nonEmptyStr;
|
||||
description = mdDoc "Akkoma frontend name.";
|
||||
example = "akkoma-fe";
|
||||
example = "pleroma-fe";
|
||||
};
|
||||
|
||||
ref = mkOption {
|
||||
@@ -476,8 +476,8 @@ in {
|
||||
type = with types; attrsOf (submodule frontend);
|
||||
default = {
|
||||
primary = {
|
||||
package = pkgs.akkoma-frontends.akkoma-fe;
|
||||
name = "akkoma-fe";
|
||||
package = pkgs.akkoma-frontends.pleroma-fe;
|
||||
name = "pleroma-fe";
|
||||
ref = "stable";
|
||||
};
|
||||
admin = {
|
||||
@@ -489,8 +489,8 @@ in {
|
||||
defaultText = literalExpression ''
|
||||
{
|
||||
primary = {
|
||||
package = pkgs.akkoma-frontends.akkoma-fe;
|
||||
name = "akkoma-fe";
|
||||
package = pkgs.akkoma-frontends.pleroma-fe;
|
||||
name = "pleroma-fe";
|
||||
ref = "stable";
|
||||
};
|
||||
admin = {
|
||||
|
||||
@@ -79,7 +79,7 @@ in {
|
||||
(which can be opened e.g. by running `nixos-help`).
|
||||
'')
|
||||
(mkRemovedOptionModule [ "services" "nextcloud" "disableImagemagick" ] ''
|
||||
Use services.nextcloud.enableImagemagick instead.
|
||||
Use services.nextcloud.nginx.enableImagemagick instead.
|
||||
'')
|
||||
];
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@ in
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.package.fhs}/bin/onlyoffice-wrapper DocService/docservice /run/onlyoffice/config";
|
||||
ExecStartPre = [ onlyoffice-prestart ];
|
||||
ExecStartPre = onlyoffice-prestart;
|
||||
Group = "onlyoffice";
|
||||
Restart = "always";
|
||||
RuntimeDirectory = "onlyoffice";
|
||||
|
||||
@@ -316,8 +316,7 @@ in
|
||||
++ lib.optional config.services.colord.enable pkgs.colord-kde
|
||||
++ lib.optional config.services.hardware.bolt.enable pkgs.plasma5Packages.plasma-thunderbolt
|
||||
++ lib.optionals config.services.samba.enable [ kdenetwork-filesharing pkgs.samba ]
|
||||
++ lib.optional config.services.xserver.wacom.enable pkgs.wacomtablet
|
||||
++ lib.optional config.services.flatpak.enable flatpak-kcm;
|
||||
++ lib.optional config.services.xserver.wacom.enable pkgs.wacomtablet;
|
||||
|
||||
# Extra services for D-Bus activation
|
||||
services.dbus.packages = [
|
||||
|
||||
@@ -316,13 +316,11 @@ in {
|
||||
mkdir -p -m 0755 /run/binfmt
|
||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList activationSnippet config.boot.binfmt.registrations)}
|
||||
'';
|
||||
systemd = lib.mkIf (config.boot.binfmt.registrations != {}) {
|
||||
additionalUpstreamSystemUnits = [
|
||||
"proc-sys-fs-binfmt_misc.automount"
|
||||
"proc-sys-fs-binfmt_misc.mount"
|
||||
"systemd-binfmt.service"
|
||||
];
|
||||
services.systemd-binfmt.restartTriggers = [ (builtins.toJSON config.boot.binfmt.registrations) ];
|
||||
};
|
||||
systemd.additionalUpstreamSystemUnits = lib.mkIf (config.boot.binfmt.registrations != {}) [
|
||||
"proc-sys-fs-binfmt_misc.automount"
|
||||
"proc-sys-fs-binfmt_misc.mount"
|
||||
"systemd-binfmt.service"
|
||||
];
|
||||
systemd.services.systemd-binfmt.restartTriggers = [ (builtins.toJSON config.boot.binfmt.registrations) ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -495,7 +495,7 @@ in {
|
||||
|
||||
# If we are not booting a NixOS closure (e.g. init=/bin/sh),
|
||||
# we don't know what root to prepare so we don't do anything
|
||||
if ! [ -x "/sysroot$(readlink "/sysroot$closure/prepare-root" || echo "$closure/prepare-root")" ]; then
|
||||
if ! [ -x "/sysroot$closure/prepare-root" ]; then
|
||||
echo "NEW_INIT=''${initParam[1]}" > /etc/switch-root.conf
|
||||
echo "$closure does not look like a NixOS installation - not activating"
|
||||
exit 0
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.systemd.repart;
|
||||
initrdCfg = config.boot.initrd.systemd.repart;
|
||||
cfg = config.boot.initrd.systemd.repart;
|
||||
|
||||
writeDefinition = name: partitionConfig: pkgs.writeText
|
||||
"${name}.conf"
|
||||
@@ -25,59 +24,45 @@ let
|
||||
'';
|
||||
in
|
||||
{
|
||||
options = {
|
||||
boot.initrd.systemd.repart.enable = lib.mkEnableOption (lib.mdDoc "systemd-repart") // {
|
||||
options.boot.initrd.systemd.repart = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "systemd-repart") // {
|
||||
description = lib.mdDoc ''
|
||||
Grow and add partitions to a partition table at boot time in the initrd.
|
||||
Grow and add partitions to a partition table a boot time in the initrd.
|
||||
systemd-repart only works with GPT partition tables.
|
||||
|
||||
To run systemd-repart after the initrd, see
|
||||
`options.systemd.repart.enable`.
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.repart = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "systemd-repart") // {
|
||||
description = lib.mdDoc ''
|
||||
Grow and add partitions to a partition table.
|
||||
systemd-repart only works with GPT partition tables.
|
||||
|
||||
To run systemd-repart while in the initrd, see
|
||||
`options.boot.initrd.systemd.repart.enable`.
|
||||
'';
|
||||
};
|
||||
|
||||
partitions = lib.mkOption {
|
||||
type = with lib.types; attrsOf (attrsOf (oneOf [ str int bool ]));
|
||||
default = { };
|
||||
example = {
|
||||
"10-root" = {
|
||||
Type = "root";
|
||||
};
|
||||
"20-home" = {
|
||||
Type = "home";
|
||||
SizeMinBytes = "512M";
|
||||
SizeMaxBytes = "2G";
|
||||
};
|
||||
partitions = lib.mkOption {
|
||||
type = with lib.types; attrsOf (attrsOf (oneOf [ str int bool ]));
|
||||
default = { };
|
||||
example = {
|
||||
"10-root" = {
|
||||
Type = "root";
|
||||
};
|
||||
"20-home" = {
|
||||
Type = "home";
|
||||
SizeMinBytes = "512M";
|
||||
SizeMaxBytes = "2G";
|
||||
};
|
||||
description = lib.mdDoc ''
|
||||
Specify partitions as a set of the names of the definition files as the
|
||||
key and the partition configuration as its value. The partition
|
||||
configuration can use all upstream options. See <link
|
||||
xlink:href="https://www.freedesktop.org/software/systemd/man/repart.d.html"/>
|
||||
for all available options.
|
||||
'';
|
||||
};
|
||||
description = lib.mdDoc ''
|
||||
Specify partitions as a set of the names of the definition files as the
|
||||
key and the partition configuration as its value. The partition
|
||||
configuration can use all upstream options. See <link
|
||||
xlink:href="https://www.freedesktop.org/software/systemd/man/repart.d.html"/>
|
||||
for all available options.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (cfg.enable || initrdCfg.enable) {
|
||||
# Always link the definitions into /etc so that they are also included in
|
||||
# the /nix/store of the sysroot during early userspace (i.e. while in the
|
||||
# initrd).
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Link the definitions into /etc so that they are included in the
|
||||
# /nix/store of the sysroot. This also allows the user to run the
|
||||
# systemd-repart binary after activation manually while automatically
|
||||
# picking up the definition files.
|
||||
environment.etc."repart.d".source = definitionsDirectory;
|
||||
|
||||
boot.initrd.systemd = lib.mkIf initrdCfg.enable {
|
||||
boot.initrd.systemd = {
|
||||
additionalUpstreamUnits = [
|
||||
"systemd-repart.service"
|
||||
];
|
||||
@@ -88,7 +73,7 @@ in
|
||||
|
||||
# Override defaults in upstream unit.
|
||||
services.systemd-repart = {
|
||||
# Unset the conditions as they cannot be met before activation because
|
||||
# Unset the coniditions as they cannot be met before activation because
|
||||
# the definition files are not stored in the expected locations.
|
||||
unitConfig.ConditionDirectoryNotEmpty = [
|
||||
" " # required to unset the previous value.
|
||||
@@ -112,12 +97,5 @@ in
|
||||
after = [ "sysroot.mount" ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd = lib.mkIf cfg.enable {
|
||||
additionalUpstreamSystemUnits = [
|
||||
"systemd-repart.service"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ in
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [{
|
||||
boot.kernelModules = [ "bridge" "veth" "br_netfilter" "xt_nat" ];
|
||||
boot.kernelModules = [ "bridge" "veth" ];
|
||||
boot.kernel.sysctl = {
|
||||
"net.ipv4.conf.all.forwarding" = mkOverride 98 true;
|
||||
"net.ipv4.conf.default.forwarding" = mkOverride 98 true;
|
||||
|
||||
@@ -7,8 +7,6 @@ let
|
||||
|
||||
podmanPackage = (pkgs.podman.override {
|
||||
extraPackages = cfg.extraPackages
|
||||
# setuid shadow
|
||||
++ [ "/run/wrappers" ]
|
||||
++ lib.optional (builtins.elem "zfs" config.boot.supportedFilesystems) config.boot.zfs.package;
|
||||
});
|
||||
|
||||
|
||||
@@ -144,6 +144,7 @@ in rec {
|
||||
manual = manualHTML; # TODO(@oxij): remove eventually
|
||||
manualEpub = (buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manualEpub));
|
||||
manpages = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.manpages);
|
||||
manualGeneratedSources = buildFromConfig ({ ... }: { }) (config: config.system.build.manual.generatedSources);
|
||||
options = (buildFromConfig ({ ... }: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux;
|
||||
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ in {
|
||||
hledger-web = handleTest ./hledger-web.nix {};
|
||||
hocker-fetchdocker = handleTest ./hocker-fetchdocker {};
|
||||
hockeypuck = handleTest ./hockeypuck.nix { };
|
||||
home-assistant = handleTest ./home-assistant {};
|
||||
home-assistant = handleTest ./home-assistant.nix {};
|
||||
hostname = handleTest ./hostname.nix {};
|
||||
hound = handleTest ./hound.nix {};
|
||||
hub = handleTest ./git/hub.nix {};
|
||||
@@ -490,7 +490,6 @@ in {
|
||||
ombi = handleTest ./ombi.nix {};
|
||||
openarena = handleTest ./openarena.nix {};
|
||||
openldap = handleTest ./openldap.nix {};
|
||||
opensearch = discoverTests (import ./opensearch.nix);
|
||||
openresty-lua = handleTest ./openresty-lua.nix {};
|
||||
opensmtpd = handleTest ./opensmtpd.nix {};
|
||||
opensmtpd-rspamd = handleTest ./opensmtpd-rspamd.nix {};
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import ../make-test-python.nix ({ pkgs, lib, ... }:
|
||||
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
configDir = "/var/lib/foobar";
|
||||
userName = "admin";
|
||||
password = "secret";
|
||||
in {
|
||||
name = "home-assistant";
|
||||
meta.maintainers = lib.teams.home-assistant.members;
|
||||
|
||||
nodes.hass = { pkgs, ... }: {
|
||||
virtualisation.memorySize = 1024;
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "hass" ];
|
||||
@@ -31,10 +27,7 @@ in {
|
||||
extraPackages = ps: with ps; [
|
||||
colorama
|
||||
];
|
||||
extraComponents = [
|
||||
"met"
|
||||
"radio_browser"
|
||||
];
|
||||
extraComponents = [ "zha" ];
|
||||
}).overrideAttrs (oldAttrs: {
|
||||
doInstallCheck = false;
|
||||
});
|
||||
@@ -86,7 +79,6 @@ in {
|
||||
# https://www.home-assistant.io/integrations/logger/
|
||||
logger = {
|
||||
default = "info";
|
||||
logs."homeassistant.components.http" = "debug";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -116,22 +108,6 @@ in {
|
||||
inheritParentConfig = true;
|
||||
configuration.services.home-assistant.config.esphome = {};
|
||||
};
|
||||
|
||||
environment.systemPackages = let
|
||||
testRunner = pkgs.writers.writePython3Bin "test-runner" {
|
||||
libraries = with pkgs.python3Packages; [
|
||||
selenium
|
||||
structlog
|
||||
];
|
||||
flakeIgnore = [
|
||||
"E501" # line too long
|
||||
];
|
||||
} (builtins.readFile ./webdriver.py);
|
||||
in with pkgs; [
|
||||
chromium
|
||||
chromedriver
|
||||
testRunner
|
||||
];
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }: let
|
||||
@@ -174,7 +150,7 @@ in {
|
||||
|
||||
with subtest("Check extraComponents and extraPackages are considered from the package"):
|
||||
hass.succeed(f"grep -q 'colorama' {package}/extra_packages")
|
||||
hass.succeed(f"grep -q 'radio_browser' {package}/extra_components")
|
||||
hass.succeed(f"grep -q 'zha' {package}/extra_components")
|
||||
|
||||
with subtest("Check extraComponents and extraPackages are considered from the module"):
|
||||
hass.succeed(f"grep -q 'psycopg2' {package}/extra_packages")
|
||||
@@ -216,11 +192,5 @@ in {
|
||||
with subtest("Check systemd unit hardening"):
|
||||
hass.log(hass.succeed("systemctl cat home-assistant.service"))
|
||||
hass.log(hass.succeed("systemd-analyze security home-assistant.service"))
|
||||
|
||||
with subtest("Test onboarding"):
|
||||
hass.execute(
|
||||
"systemd-run --wait --unit hass-onboarding -E PATH=${pkgs.geckodriver}/bin:$PATH -E PYTHONUNBUFFERED=1 test-runner"
|
||||
)
|
||||
hass.copy_from_vm("/run/artifacts")
|
||||
'';
|
||||
})
|
||||
@@ -1,252 +0,0 @@
|
||||
from dataclasses import dataclass
|
||||
from os import mkdir
|
||||
import os.path
|
||||
import time
|
||||
from typing import Set
|
||||
|
||||
import structlog
|
||||
from structlog.contextvars import bind_contextvars, reset_contextvars
|
||||
|
||||
# shadow root support only in chromium based browsers as of selenium 4.8.0
|
||||
# https://github.com/SeleniumHQ/selenium/blob/selenium-4.8.0/py/selenium/webdriver/remote/webelement.py#L245-L248
|
||||
from selenium.webdriver import Chrome
|
||||
from selenium.webdriver.chrome.options import Options
|
||||
from selenium.webdriver.common.action_chains import ActionChains
|
||||
from selenium.webdriver.common.alert import Alert
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
from selenium.webdriver.support import expected_conditions as EC
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
|
||||
log = structlog.get_logger()
|
||||
|
||||
|
||||
# encapsulate selectors to find html elements
|
||||
@dataclass
|
||||
class S:
|
||||
by: By
|
||||
value: str
|
||||
|
||||
# retrieve the shadow dom of the tag
|
||||
shadow_root: bool = False
|
||||
|
||||
# retrieve all matching tags
|
||||
multiple: bool = False
|
||||
|
||||
|
||||
# helper function to navigate through nested shadow roots
|
||||
def select(*selectors: S, origin):
|
||||
doc = origin
|
||||
for sel in selectors:
|
||||
if sel.multiple:
|
||||
if isinstance(doc, list):
|
||||
raise RuntimeError(
|
||||
"The multiple qualifier can only appear once in a selection group"
|
||||
)
|
||||
else:
|
||||
doc = doc.find_elements(sel.by, sel.value)
|
||||
if sel.shadow_root:
|
||||
doc = [x.shadow_root for x in doc]
|
||||
else:
|
||||
if isinstance(doc, list):
|
||||
doc = [x.find_element(sel.by, sel.value) for x in doc]
|
||||
if sel.shadow_root:
|
||||
doc = [x.shadow_root for x in doc]
|
||||
else:
|
||||
doc = doc.find_element(sel.by, sel.value)
|
||||
if sel.shadow_root:
|
||||
doc = doc.shadow_root
|
||||
return doc
|
||||
|
||||
|
||||
# Custom wait implementation for nested elements
|
||||
class NestedElementPresent:
|
||||
def __init__(self, *selectors: S):
|
||||
self.selectors = selectors
|
||||
|
||||
def __call__(self, driver):
|
||||
result = select(*self.selectors, origin=driver)
|
||||
return result
|
||||
|
||||
|
||||
def write(input, value: str, field_name: str):
|
||||
input.click()
|
||||
# input.clear() does not work properly :(
|
||||
for _ in range(16):
|
||||
input.send_keys(Keys.BACKSPACE)
|
||||
input.send_keys(value)
|
||||
log.info(f"Set {field_name}", value=value)
|
||||
|
||||
|
||||
ARTIFACT_PATH = "/run/artifacts"
|
||||
mkdir(ARTIFACT_PATH)
|
||||
|
||||
options = Options()
|
||||
options.add_argument("--headless")
|
||||
options.add_argument("--no-sandbox") # run as root
|
||||
options.binary_location = "/run/current-system/sw/bin/chromium"
|
||||
driver = Chrome(
|
||||
options=options,
|
||||
)
|
||||
wait = WebDriverWait(driver, 10)
|
||||
|
||||
# increase viewport, so everything becomes visible w/o scrolling
|
||||
driver.set_window_size(720, 1280)
|
||||
|
||||
|
||||
def onboarding():
|
||||
# wait for the site to load
|
||||
url = "http://localhost:8123/onboarding.html"
|
||||
log.info("Loading", url=url)
|
||||
driver.get(url)
|
||||
wait.until(EC.title_contains("Home Assistant"))
|
||||
log.info("Ready", url=url)
|
||||
|
||||
# move the viewport around to trigger a redraw
|
||||
body = driver.find_element(By.TAG_NAME, "body")
|
||||
body.send_keys(Keys.SPACE)
|
||||
body.send_keys(Keys.SHIFT + Keys.SPACE)
|
||||
|
||||
onboarding_step_user()
|
||||
onboarding_step_core_config()
|
||||
onboarding_step_analytics()
|
||||
|
||||
|
||||
@dataclass
|
||||
class Credentials:
|
||||
username: str
|
||||
password: str
|
||||
|
||||
|
||||
def onboarding_step_user() -> Credentials:
|
||||
ctx = bind_contextvars(step="user")
|
||||
|
||||
# wait until the page is rendered
|
||||
log.info("Waiting for onboarding-create-user")
|
||||
onboarding_create_user = wait.until(
|
||||
NestedElementPresent(
|
||||
S(By.CSS_SELECTOR, "ha-onboarding", shadow_root=True),
|
||||
S(By.CSS_SELECTOR, "onboarding-create-user", shadow_root=True),
|
||||
)
|
||||
)
|
||||
log.info("Found onboarding-create-user", tag=onboarding_create_user)
|
||||
|
||||
driver.save_screenshot(os.path.join(ARTIFACT_PATH, "onboarding_step1.png"))
|
||||
|
||||
name, username, password, confirm = select(
|
||||
S(By.CSS_SELECTOR, "ha-form", shadow_root=True),
|
||||
S(By.CSS_SELECTOR, "ha-selector", shadow_root=True, multiple=True),
|
||||
S(By.CSS_SELECTOR, "ha-selector-text", shadow_root=True),
|
||||
S(By.CSS_SELECTOR, "ha-textfield", shadow_root=True),
|
||||
S(By.CSS_SELECTOR, "input.mdc-text-field__input"),
|
||||
origin=onboarding_create_user,
|
||||
)
|
||||
|
||||
creds = Credentials("nixos", "test")
|
||||
|
||||
write(name, creds.username, "Name")
|
||||
write(username, "NixOS Testuser", "Username")
|
||||
write(password, creds.password, "Password")
|
||||
write(confirm, creds.password, "Confirm password")
|
||||
|
||||
driver.save_screenshot(
|
||||
os.path.join(ARTIFACT_PATH, "onboarding_step1_logindata.png")
|
||||
)
|
||||
|
||||
log.info("Submit")
|
||||
select(
|
||||
S(By.CSS_SELECTOR, "mwc-button"), origin=onboarding_create_user
|
||||
).click()
|
||||
|
||||
reset_contextvars(**ctx)
|
||||
|
||||
return creds
|
||||
|
||||
|
||||
def onboarding_step_core_config():
|
||||
ctx = bind_contextvars(step="core_config")
|
||||
|
||||
# wait until the page is rendered
|
||||
log.info("Waiting for onboarding-create-user")
|
||||
onboarding_core_config = wait.until(
|
||||
NestedElementPresent(
|
||||
S(By.CSS_SELECTOR, "ha-onboarding", shadow_root=True),
|
||||
S(By.CSS_SELECTOR, "onboarding-core-config", shadow_root=True),
|
||||
)
|
||||
)
|
||||
log.info("Found onboarding-core-config")
|
||||
|
||||
driver.save_screenshot(os.path.join(ARTIFACT_PATH, "onboarding_step2.png"))
|
||||
|
||||
# set home name
|
||||
home = select(
|
||||
S(By.CSS_SELECTOR, "ha-textfield", shadow_root=True),
|
||||
S(By.CSS_SELECTOR, "input"),
|
||||
origin=onboarding_core_config,
|
||||
)
|
||||
write(home, "NixOS Testdriver", "Installation name")
|
||||
|
||||
# try environment detection, will fail and only set language to "en"
|
||||
select(
|
||||
S(By.CSS_SELECTOR, "div.middle-text mwc-button"), origin=onboarding_core_config
|
||||
).click()
|
||||
log.info("Detect environment")
|
||||
|
||||
driver.save_screenshot(os.path.join(ARTIFACT_PATH, "onboarding_step2_detect.png"))
|
||||
|
||||
map_marker = select(
|
||||
S(By.CSS_SELECTOR, "ha-locations-editor", shadow_root=True),
|
||||
S(By.CSS_SELECTOR, "ha-map", shadow_root=True),
|
||||
S(By.CSS_SELECTOR, "div.leaflet-marker-pane img"),
|
||||
origin=onboarding_core_config
|
||||
)
|
||||
log.info("Found leaflet-marker-pane", tag=map_marker)
|
||||
ActionChains(driver).click().click_and_hold().move_by_offset(100, 100).release().perform()
|
||||
log.info("Moved location marker")
|
||||
|
||||
country, lang, tz, elevation, currency = select(
|
||||
S(By.CSS_SELECTOR, "div.row ha-textfield", shadow_root=True, multiple=True),
|
||||
S(By.CSS_SELECTOR, "input"),
|
||||
origin=onboarding_core_config,
|
||||
)
|
||||
write(country, "DE", "Country")
|
||||
print(tz.tag_name)
|
||||
write(tz, "UTC", "Time Zone")
|
||||
write(elevation, "123", "Elevation")
|
||||
write(currency, "EUR", "Currency")
|
||||
|
||||
driver.save_screenshot(os.path.join(ARTIFACT_PATH, "onboarding_step2_inputs.png"))
|
||||
|
||||
log.info("Submit")
|
||||
select(
|
||||
S(By.CSS_SELECTOR, "div.footer mwc-button"), origin=onboarding_core_config
|
||||
).click()
|
||||
|
||||
Alert(driver).accept()
|
||||
|
||||
driver.save_screenshot(os.path.join(ARTIFACT_PATH, "onboarding_step2_submit.png"))
|
||||
|
||||
reset_contextvars(**ctx)
|
||||
|
||||
|
||||
|
||||
def onboarding_step_analytics():
|
||||
ctx = bind_contextvars(step="analytics")
|
||||
|
||||
# wait until the page is rendered
|
||||
log.info("Waiting for onboarding-analytics")
|
||||
onboarding_analytics = wait.until(
|
||||
NestedElementPresent(
|
||||
S(By.CSS_SELECTOR, "ha-onboarding", shadow_root=True),
|
||||
S(By.CSS_SELECTOR, "onboarding-analytics", shadow_root=True),
|
||||
)
|
||||
)
|
||||
log.info("Found onboarding-analytics", tag=onboarding_analytics)
|
||||
|
||||
driver.save_screenshot(os.path.join(ARTIFACT_PATH, "onboarding_step3.png"))
|
||||
|
||||
|
||||
onboarding()
|
||||
|
||||
driver.close()
|
||||
print("close")
|
||||
@@ -1,13 +1,9 @@
|
||||
{ system ? builtins.currentSystem
|
||||
, pkgs ? import ../../.. { inherit system; }
|
||||
, lib ? pkgs.lib
|
||||
}:
|
||||
let
|
||||
allK3s = lib.filterAttrs (n: _: lib.strings.hasPrefix "k3s_" n) pkgs;
|
||||
in
|
||||
{
|
||||
# Run a single node k3s cluster and verify a pod can run
|
||||
single-node = lib.mapAttrs (_: k3s: import ./single-node.nix { inherit system pkgs k3s; }) allK3s;
|
||||
single-node = import ./single-node.nix { inherit system pkgs; };
|
||||
# Run a multi-node k3s cluster and verify pod networking works across nodes
|
||||
multi-node = lib.mapAttrs (_: k3s: import ./multi-node.nix { inherit system pkgs k3s; }) allK3s;
|
||||
multi-node = import ./multi-node.nix { inherit system pkgs; };
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ../make-test-python.nix ({ pkgs, lib, k3s, ... }:
|
||||
import ../make-test-python.nix ({ pkgs, lib, ... }:
|
||||
let
|
||||
imageEnv = pkgs.buildEnv {
|
||||
name = "k3s-pause-image-env";
|
||||
@@ -39,7 +39,7 @@ import ../make-test-python.nix ({ pkgs, lib, k3s, ... }:
|
||||
tokenFile = pkgs.writeText "token" "p@s$w0rd";
|
||||
in
|
||||
{
|
||||
name = "${k3s.name}-multi-node";
|
||||
name = "k3s-multi-node";
|
||||
|
||||
nodes = {
|
||||
server = { pkgs, ... }: {
|
||||
@@ -52,7 +52,7 @@ import ../make-test-python.nix ({ pkgs, lib, k3s, ... }:
|
||||
inherit tokenFile;
|
||||
enable = true;
|
||||
role = "server";
|
||||
package = k3s;
|
||||
package = pkgs.k3s;
|
||||
clusterInit = true;
|
||||
extraFlags = builtins.toString [
|
||||
"--disable" "coredns"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ../make-test-python.nix ({ pkgs, lib, k3s, ... }:
|
||||
import ../make-test-python.nix ({ pkgs, lib, ... }:
|
||||
let
|
||||
imageEnv = pkgs.buildEnv {
|
||||
name = "k3s-pause-image-env";
|
||||
@@ -24,7 +24,7 @@ import ../make-test-python.nix ({ pkgs, lib, k3s, ... }:
|
||||
'';
|
||||
in
|
||||
{
|
||||
name = "${k3s.name}-single-node";
|
||||
name = "k3s";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ euank ];
|
||||
};
|
||||
@@ -38,7 +38,7 @@ import ../make-test-python.nix ({ pkgs, lib, k3s, ... }:
|
||||
|
||||
services.k3s.enable = true;
|
||||
services.k3s.role = "server";
|
||||
services.k3s.package = k3s;
|
||||
services.k3s.package = pkgs.k3s;
|
||||
# Slightly reduce resource usage
|
||||
services.k3s.extraFlags = builtins.toString [
|
||||
"--disable" "coredns"
|
||||
|
||||
@@ -9,7 +9,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
hostname = "server";
|
||||
primaryDomain = "server";
|
||||
openFirewall = true;
|
||||
ensureAccounts = [ "postmaster@server" ];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -51,6 +50,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
server.wait_for_open_port(587)
|
||||
|
||||
server.succeed("maddyctl creds create --password test postmaster@server")
|
||||
server.succeed("maddyctl imap-acct create postmaster@server")
|
||||
|
||||
client.succeed("send-testmail")
|
||||
client.succeed("test-imap")
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
let
|
||||
opensearchTest =
|
||||
import ./make-test-python.nix (
|
||||
{ pkgs, lib, extraSettings ? {} }: {
|
||||
name = "opensearch";
|
||||
meta.maintainers = with pkgs.lib.maintainers; [ shyim ];
|
||||
|
||||
nodes.machine = lib.mkMerge [
|
||||
{
|
||||
virtualisation.memorySize = 2048;
|
||||
services.opensearch.enable = true;
|
||||
}
|
||||
extraSettings
|
||||
];
|
||||
|
||||
testScript = ''
|
||||
machine.start()
|
||||
machine.wait_for_unit("opensearch.service")
|
||||
machine.wait_for_open_port(9200)
|
||||
|
||||
machine.succeed(
|
||||
"curl --fail localhost:9200"
|
||||
)
|
||||
'';
|
||||
});
|
||||
in
|
||||
{
|
||||
opensearch = opensearchTest {};
|
||||
opensearchCustomPathAndUser = opensearchTest {
|
||||
extraSettings = {
|
||||
services.opensearch.dataDir = "/var/opensearch_test";
|
||||
services.opensearch.user = "open_search";
|
||||
services.opensearch.group = "open_search";
|
||||
system.activationScripts.createDirectory = {
|
||||
text = ''
|
||||
mkdir -p "/var/opensearch_test"
|
||||
chown open_search:open_search /var/opensearch_test
|
||||
chmod 0700 /var/opensearch_test
|
||||
'';
|
||||
deps = [ "users" "groups" ];
|
||||
};
|
||||
users = {
|
||||
groups.open_search = {};
|
||||
users.open_search = {
|
||||
description = "OpenSearch daemon user";
|
||||
group = "open_search";
|
||||
isSystemUser = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
name = "pass-secret-service";
|
||||
meta.maintainers = [ lib.maintainers.aidalgol ];
|
||||
meta.maintainers = with lib; [ aidalgol ];
|
||||
|
||||
nodes.machine = { nodes, pkgs, ... }:
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ in pkgs.lib.listToAttrs (builtins.map ({ predictable, withNetworkd }: {
|
||||
name = pkgs.lib.optionalString (!predictable) "un" + "predictable"
|
||||
+ pkgs.lib.optionalString withNetworkd "Networkd";
|
||||
value = makeTest {
|
||||
name = "${pkgs.lib.optionalString (!predictable) "un"}predictableInterfaceNames${pkgs.lib.optionalString withNetworkd "-with-networkd"}";
|
||||
name = "${if predictable then "" else "un"}predictableInterfaceNames${if withNetworkd then "-with-networkd" else ""}";
|
||||
meta = {};
|
||||
|
||||
nodes.machine = { lib, ... }: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ./make-test-python.nix ({ pkgs, lib, ...} :
|
||||
import ./make-test-python.nix ({ pkgs, ...} :
|
||||
|
||||
let
|
||||
|
||||
@@ -11,9 +11,9 @@ let
|
||||
};
|
||||
|
||||
# Only allow the demo data to be used (only if it's unfreeRedistributable).
|
||||
unfreePredicate = pkg: with lib; let
|
||||
unfreePredicate = pkg: with pkgs.lib; let
|
||||
allowPackageNames = [ "quake3-demodata" "quake3-pointrelease" ];
|
||||
allowLicenses = [ lib.licenses.unfreeRedistributable ];
|
||||
allowLicenses = [ pkgs.lib.licenses.unfreeRedistributable ];
|
||||
in elem pkg.pname allowPackageNames &&
|
||||
elem (pkg.meta.license or null) allowLicenses;
|
||||
|
||||
@@ -31,7 +31,7 @@ in
|
||||
|
||||
rec {
|
||||
name = "quake3";
|
||||
meta = with lib.maintainers; {
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ domenkozar eelco ];
|
||||
};
|
||||
|
||||
|
||||
@@ -52,6 +52,9 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.initrd.systemd.repart.enable = true;
|
||||
|
||||
# systemd-repart operates on disks with a partition table. The qemu module,
|
||||
# however, creates separate filesystem images without a partition table, so
|
||||
# we have to create a disk image manually.
|
||||
@@ -85,10 +88,7 @@ in
|
||||
nodes.machine = { config, pkgs, ... }: {
|
||||
imports = [ common ];
|
||||
|
||||
boot.initrd.systemd.enable = true;
|
||||
|
||||
boot.initrd.systemd.repart.enable = true;
|
||||
systemd.repart.partitions = {
|
||||
boot.initrd.systemd.repart.partitions = {
|
||||
"10-root" = {
|
||||
Type = "linux-generic";
|
||||
};
|
||||
@@ -105,30 +105,4 @@ in
|
||||
assert "Growing existing partition 1." in systemd_repart_logs
|
||||
'';
|
||||
};
|
||||
|
||||
after-initrd = makeTest {
|
||||
name = "systemd-repart-after-initrd";
|
||||
meta.maintainers = with maintainers; [ nikstur ];
|
||||
|
||||
nodes.machine = { config, pkgs, ... }: {
|
||||
imports = [ common ];
|
||||
|
||||
systemd.repart.enable = true;
|
||||
systemd.repart.partitions = {
|
||||
"10-root" = {
|
||||
Type = "linux-generic";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
testScript = { nodes, ... }: ''
|
||||
${useDiskImage nodes.machine}
|
||||
|
||||
machine.start()
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
systemd_repart_logs = machine.succeed("journalctl --unit systemd-repart.service")
|
||||
assert "Growing existing partition 1." in systemd_repart_logs
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
peer1 = {
|
||||
privateKey = "uO8JVo/sanx2DOM0L9GUEtzKZ82RGkRnYgpaYc7iXmg=";
|
||||
# readFile'd keys may have trailing newlines, emulate this
|
||||
publicKey = "Ks9yRJIi/0vYgRmn14mIOQRwkcUGBujYINbMpik2SBI=\n";
|
||||
publicKey = "Ks9yRJIi/0vYgRmn14mIOQRwkcUGBujYINbMpik2SBI=";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,20 +19,20 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "amberol";
|
||||
version = "unstable-2023-01-12";
|
||||
version = "0.9.2";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "World";
|
||||
repo = pname;
|
||||
rev = "0623386c813d0d68564002324958cef7217cec7f";
|
||||
hash = "sha256-nVL4ydTg4ncDCA9J9qWv+RPDC0Txr/qpo5XxIUiV0zQ=";
|
||||
rev = version;
|
||||
hash = "sha256-L8yHKwtCAZC1myIouL0Oq3lj0QPWn5dVe0g3nkyAKI8=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
inherit src;
|
||||
name = "${pname}-${version}";
|
||||
hash = "sha256-E0ivUWD3jP/T1GOJ11grDwcF+m92I+W2a2HhZX1bCso=";
|
||||
hash = "sha256-0XuWBUG37GNHRXgjz0/Vv6VSqaPG36xTj7oN0ukFIJY=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitLab
|
||||
, fetchFromGitHub
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
@@ -18,15 +18,14 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "eartag";
|
||||
version = "0.3.2";
|
||||
version = "0.3.1";
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
src = fetchFromGitHub {
|
||||
owner = "knuxify";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-XvbfQtE8LsztQ2VByG2jLYND3qVpH6owdAgh3b//lI4=";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "sha256-gN3V5ZHlhHp52Jg/i+hDLEDpSvP8yFngujyw5ZncQQg=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@@ -68,7 +67,7 @@ python3Packages.buildPythonApplication rec {
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://gitlab.gnome.org/knuxify/eartag";
|
||||
homepage = "https://github.com/knuxify/eartag";
|
||||
description = "Simple music tag editor";
|
||||
# This seems to be using ICU license but we're flagging it to MIT license
|
||||
# since ICU license is a modified version of MIT and to prevent it from
|
||||
|
||||
@@ -19,9 +19,9 @@ stdenv.mkDerivation rec {
|
||||
prePatch = ''
|
||||
sed -e s,/bin/ln,ln,g -i src/Makefile
|
||||
sed -e 's,^CXXFLAGS=-O2,CXXFLAGS=-O2 -D PATH_ESPEAK_DATA=\\\"$(DATADIR)\\\",' -i src/Makefile
|
||||
'' + (lib.optionalString (portaudio.api_version == 19) ''
|
||||
'' + (if portaudio.api_version == 19 then ''
|
||||
cp src/portaudio19.h src/portaudio.h
|
||||
'');
|
||||
'' else "");
|
||||
|
||||
configurePhase = ''
|
||||
cd src
|
||||
|
||||
@@ -2,15 +2,24 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fdkaac";
|
||||
version = "1.0.5";
|
||||
version = "1.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nu774";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-GYvI9T5Bv2OcK0hMAQE7/tE6ajDyqkaak66b3Hc0Fls=";
|
||||
sha256 = "sha256-7a8JlQtMGuMWgU/HePd31/EvtBNc2tBMz8V8NQivuNo=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# To be removed when 1.0.4 is released, see https://github.com/nu774/fdkaac/issues/54
|
||||
(fetchpatch {
|
||||
name = "CVE-2022-37781.patch";
|
||||
url = "https://github.com/nu774/fdkaac/commit/ecddb7d63306e01d137d65bbbe7b78c1e779943c.patch";
|
||||
sha256 = "sha256-uZPf5tqBmF7VWp1fJcjp5pbYGRfzqgPZpBHpkdWYkV0=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
buildInputs = [ fdk_aac ];
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gwc";
|
||||
version = "0.22-06";
|
||||
version = "0.22-05";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AlisterH";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-hRwy++gZiW/olIIeiVTpdIjPLIHgvgVUGEaUX9tpFbY=";
|
||||
sha256 = "sha256-FHKu5qAyRyMxXdWYTCeAc6Q4J+NOaU1SGgoTbe0PiFE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -40,7 +40,6 @@ stdenv.mkDerivation rec {
|
||||
meta = with lib; {
|
||||
description = "GUI application for removing noise (hiss, pops and clicks) from audio files";
|
||||
homepage = "https://github.com/AlisterH/gwc/";
|
||||
changelog = "https://github.com/AlisterH/gwc/blob/${version}/Changelog";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ magnetophon ];
|
||||
platforms = platforms.linux;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user