Merge master into haskell-updates
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
# Develompent support
|
||||
/.editorconfig @Mic92 @zowoq
|
||||
/shell.nix @infinisil @NixOS/Security
|
||||
/.envrc @infinisil @NixOS/Security
|
||||
|
||||
# Libraries
|
||||
/lib @infinisil
|
||||
|
||||
@@ -21,6 +21,7 @@ tags
|
||||
/source/
|
||||
.version-suffix
|
||||
.direnv
|
||||
.envrc
|
||||
|
||||
.DS_Store
|
||||
.mypy_cache
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
outputPath = "share/doc/nixpkgs";
|
||||
indexPath = "manual.html";
|
||||
}
|
||||
+5
-195
@@ -1,196 +1,6 @@
|
||||
{ pkgs ? (import ./.. { }), nixpkgs ? { }}:
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
inherit (lib) hasPrefix removePrefix;
|
||||
fs = lib.fileset;
|
||||
{
|
||||
pkgs ? (import ./.. { }),
|
||||
nixpkgs ? { },
|
||||
}:
|
||||
|
||||
common = import ./common.nix;
|
||||
|
||||
lib-docs = import ./doc-support/lib-function-docs.nix {
|
||||
inherit pkgs nixpkgs;
|
||||
libsets = [
|
||||
{ name = "asserts"; description = "assertion functions"; }
|
||||
{ name = "attrsets"; description = "attribute set functions"; }
|
||||
{ name = "strings"; description = "string manipulation functions"; }
|
||||
{ name = "versions"; description = "version string functions"; }
|
||||
{ name = "trivial"; description = "miscellaneous functions"; }
|
||||
{ name = "fixedPoints"; baseName = "fixed-points"; description = "explicit recursion functions"; }
|
||||
{ name = "lists"; description = "list manipulation functions"; }
|
||||
{ name = "debug"; description = "debugging functions"; }
|
||||
{ name = "options"; description = "NixOS / nixpkgs option handling"; }
|
||||
{ name = "path"; description = "path functions"; }
|
||||
{ name = "filesystem"; description = "filesystem functions"; }
|
||||
{ name = "fileset"; description = "file set functions"; }
|
||||
{ name = "sources"; description = "source filtering functions"; }
|
||||
{ name = "cli"; description = "command-line serialization functions"; }
|
||||
{ name = "generators"; description = "functions that create file formats from nix data structures"; }
|
||||
{ name = "gvariant"; description = "GVariant formatted string serialization functions"; }
|
||||
{ name = "customisation"; description = "Functions to customise (derivation-related) functions, derivatons, or attribute sets"; }
|
||||
{ name = "meta"; description = "functions for derivation metadata"; }
|
||||
{ name = "derivations"; description = "miscellaneous derivation-specific functions"; }
|
||||
];
|
||||
};
|
||||
|
||||
epub = pkgs.runCommand "manual.epub" {
|
||||
nativeBuildInputs = with pkgs; [ libxslt zip ];
|
||||
|
||||
epub = ''
|
||||
<book xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
version="5.0"
|
||||
xml:id="nixpkgs-manual">
|
||||
<info>
|
||||
<title>Nixpkgs Manual</title>
|
||||
<subtitle>Version ${pkgs.lib.version}</subtitle>
|
||||
</info>
|
||||
<chapter>
|
||||
<title>Temporarily unavailable</title>
|
||||
<para>
|
||||
The Nixpkgs manual is currently not available in EPUB format,
|
||||
please use the <link xlink:href="https://nixos.org/nixpkgs/manual">HTML manual</link>
|
||||
instead.
|
||||
</para>
|
||||
<para>
|
||||
If you've used the EPUB manual in the past and it has been useful to you, please
|
||||
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/237234">let us know</link>.
|
||||
</para>
|
||||
</chapter>
|
||||
</book>
|
||||
'';
|
||||
|
||||
passAsFile = [ "epub" ];
|
||||
} ''
|
||||
mkdir scratch
|
||||
xsltproc \
|
||||
--param chapter.autolabel 0 \
|
||||
--nonet \
|
||||
--output scratch/ \
|
||||
${pkgs.docbook_xsl_ns}/xml/xsl/docbook/epub/docbook.xsl \
|
||||
$epubPath
|
||||
|
||||
echo "application/epub+zip" > mimetype
|
||||
zip -0Xq -b "$TMPDIR" "$out" mimetype
|
||||
cd scratch && zip -Xr9D -b "$TMPDIR" "$out" *
|
||||
'';
|
||||
|
||||
# NB: This file describes the Nixpkgs manual, which happens to use module
|
||||
# docs infra originally developed for NixOS.
|
||||
optionsDoc = pkgs.nixosOptionsDoc {
|
||||
inherit (pkgs.lib.evalModules {
|
||||
modules = [ ../pkgs/top-level/config.nix ];
|
||||
class = "nixpkgsConfig";
|
||||
}) options;
|
||||
documentType = "none";
|
||||
transformOptions = opt:
|
||||
opt // {
|
||||
declarations =
|
||||
map
|
||||
(decl:
|
||||
if hasPrefix (toString ../..) (toString decl)
|
||||
then
|
||||
let subpath = removePrefix "/" (removePrefix (toString ../.) (toString decl));
|
||||
in { url = "https://github.com/NixOS/nixpkgs/blob/master/${subpath}"; name = subpath; }
|
||||
else decl)
|
||||
opt.declarations;
|
||||
};
|
||||
};
|
||||
in pkgs.stdenv.mkDerivation {
|
||||
name = "nixpkgs-manual";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
nixos-render-docs
|
||||
];
|
||||
|
||||
src = fs.toSource {
|
||||
root = ./.;
|
||||
fileset = fs.unions [
|
||||
(fs.fileFilter (file:
|
||||
file.hasExt "md"
|
||||
|| file.hasExt "md.in"
|
||||
) ./.)
|
||||
./style.css
|
||||
./anchor-use.js
|
||||
./anchor.min.js
|
||||
./manpage-urls.json
|
||||
];
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
ln -s ${optionsDoc.optionsJSON}/share/doc/nixos/options.json ./config-options.json
|
||||
'';
|
||||
|
||||
pythonInterpreterTable = pkgs.callPackage ./doc-support/python-interpreter-table.nix {};
|
||||
|
||||
passAsFile = [ "pythonInterpreterTable" ];
|
||||
|
||||
buildPhase = ''
|
||||
substituteInPlace ./languages-frameworks/python.section.md --subst-var-by python-interpreter-table "$(<"$pythonInterpreterTablePath")"
|
||||
|
||||
cat \
|
||||
./functions/library.md.in \
|
||||
${lib-docs}/index.md \
|
||||
> ./functions/library.md
|
||||
substitute ./manual.md.in ./manual.md \
|
||||
--replace-fail '@MANUAL_VERSION@' '${pkgs.lib.version}'
|
||||
|
||||
mkdir -p out/media
|
||||
|
||||
mkdir -p out/highlightjs
|
||||
cp -t out/highlightjs \
|
||||
${pkgs.documentation-highlighter}/highlight.pack.js \
|
||||
${pkgs.documentation-highlighter}/LICENSE \
|
||||
${pkgs.documentation-highlighter}/mono-blue.css \
|
||||
${pkgs.documentation-highlighter}/loader.js
|
||||
|
||||
cp -t out ./style.css ./anchor.min.js ./anchor-use.js
|
||||
|
||||
nixos-render-docs manual html \
|
||||
--manpage-urls ./manpage-urls.json \
|
||||
--revision ${pkgs.lib.trivial.revisionWithDefault (pkgs.rev or "master")} \
|
||||
--stylesheet style.css \
|
||||
--stylesheet highlightjs/mono-blue.css \
|
||||
--script ./highlightjs/highlight.pack.js \
|
||||
--script ./highlightjs/loader.js \
|
||||
--script ./anchor.min.js \
|
||||
--script ./anchor-use.js \
|
||||
--toc-depth 1 \
|
||||
--section-toc-depth 1 \
|
||||
manual.md \
|
||||
out/index.html
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
dest="$out/${common.outputPath}"
|
||||
mkdir -p "$(dirname "$dest")"
|
||||
mv out "$dest"
|
||||
mv "$dest/index.html" "$dest/${common.indexPath}"
|
||||
|
||||
cp ${epub} "$dest/nixpkgs-manual.epub"
|
||||
|
||||
mkdir -p $out/nix-support/
|
||||
echo "doc manual $dest ${common.indexPath}" >> $out/nix-support/hydra-build-products
|
||||
echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products
|
||||
'';
|
||||
|
||||
passthru.tests.manpage-urls = with pkgs; testers.invalidateFetcherByDrvHash
|
||||
({ name ? "manual_check-manpage-urls"
|
||||
, script
|
||||
, urlsFile
|
||||
}: runCommand name {
|
||||
nativeBuildInputs = [
|
||||
cacert
|
||||
(python3.withPackages (p: with p; [
|
||||
aiohttp
|
||||
rich
|
||||
structlog
|
||||
]))
|
||||
];
|
||||
outputHash = "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="; # Empty output
|
||||
} ''
|
||||
python3 ${script} ${urlsFile}
|
||||
touch $out
|
||||
'') {
|
||||
script = ./tests/manpage-urls.py;
|
||||
urlsFile = ./manpage-urls.json;
|
||||
};
|
||||
}
|
||||
pkgs.nixpkgs-manual.override { inherit nixpkgs; }
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
# To build this derivation, run `nix-build -A nixpkgs-manual.epub`
|
||||
{
|
||||
lib,
|
||||
runCommand,
|
||||
docbook_xsl_ns,
|
||||
libxslt,
|
||||
zip,
|
||||
}:
|
||||
runCommand "manual.epub"
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
libxslt
|
||||
zip
|
||||
];
|
||||
|
||||
epub = ''
|
||||
<book xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
version="5.0"
|
||||
xml:id="nixpkgs-manual">
|
||||
<info>
|
||||
<title>Nixpkgs Manual</title>
|
||||
<subtitle>Version ${lib.version}</subtitle>
|
||||
</info>
|
||||
<chapter>
|
||||
<title>Temporarily unavailable</title>
|
||||
<para>
|
||||
The Nixpkgs manual is currently not available in EPUB format,
|
||||
please use the <link xlink:href="https://nixos.org/nixpkgs/manual">HTML manual</link>
|
||||
instead.
|
||||
</para>
|
||||
<para>
|
||||
If you've used the EPUB manual in the past and it has been useful to you, please
|
||||
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/237234">let us know</link>.
|
||||
</para>
|
||||
</chapter>
|
||||
</book>
|
||||
'';
|
||||
|
||||
passAsFile = [ "epub" ];
|
||||
}
|
||||
''
|
||||
mkdir scratch
|
||||
xsltproc \
|
||||
--param chapter.autolabel 0 \
|
||||
--nonet \
|
||||
--output scratch/ \
|
||||
${docbook_xsl_ns}/xml/xsl/docbook/epub/docbook.xsl \
|
||||
$epubPath
|
||||
|
||||
echo "application/epub+zip" > mimetype
|
||||
zip -0Xq -b "$TMPDIR" "$out" mimetype
|
||||
cd scratch && zip -Xr9D -b "$TMPDIR" "$out" *
|
||||
''
|
||||
@@ -1,23 +1,111 @@
|
||||
# Generates the documentation for library functions via nixdoc.
|
||||
# To build this derivation, run `nix-build -A nixpkgs-manual.lib-docs`
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
nixdoc,
|
||||
nix,
|
||||
nixpkgs ? { },
|
||||
libsets ? [
|
||||
{
|
||||
name = "asserts";
|
||||
description = "assertion functions";
|
||||
}
|
||||
{
|
||||
name = "attrsets";
|
||||
description = "attribute set functions";
|
||||
}
|
||||
{
|
||||
name = "strings";
|
||||
description = "string manipulation functions";
|
||||
}
|
||||
{
|
||||
name = "versions";
|
||||
description = "version string functions";
|
||||
}
|
||||
{
|
||||
name = "trivial";
|
||||
description = "miscellaneous functions";
|
||||
}
|
||||
{
|
||||
name = "fixedPoints";
|
||||
baseName = "fixed-points";
|
||||
description = "explicit recursion functions";
|
||||
}
|
||||
{
|
||||
name = "lists";
|
||||
description = "list manipulation functions";
|
||||
}
|
||||
{
|
||||
name = "debug";
|
||||
description = "debugging functions";
|
||||
}
|
||||
{
|
||||
name = "options";
|
||||
description = "NixOS / nixpkgs option handling";
|
||||
}
|
||||
{
|
||||
name = "path";
|
||||
description = "path functions";
|
||||
}
|
||||
{
|
||||
name = "filesystem";
|
||||
description = "filesystem functions";
|
||||
}
|
||||
{
|
||||
name = "fileset";
|
||||
description = "file set functions";
|
||||
}
|
||||
{
|
||||
name = "sources";
|
||||
description = "source filtering functions";
|
||||
}
|
||||
{
|
||||
name = "cli";
|
||||
description = "command-line serialization functions";
|
||||
}
|
||||
{
|
||||
name = "generators";
|
||||
description = "functions that create file formats from nix data structures";
|
||||
}
|
||||
{
|
||||
name = "gvariant";
|
||||
description = "GVariant formatted string serialization functions";
|
||||
}
|
||||
{
|
||||
name = "customisation";
|
||||
description = "Functions to customise (derivation-related) functions, derivatons, or attribute sets";
|
||||
}
|
||||
{
|
||||
name = "meta";
|
||||
description = "functions for derivation metadata";
|
||||
}
|
||||
{
|
||||
name = "derivations";
|
||||
description = "miscellaneous derivation-specific functions";
|
||||
}
|
||||
],
|
||||
}:
|
||||
|
||||
{ pkgs, nixpkgs, libsets }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "nixpkgs-lib-docs";
|
||||
src = pkgs.lib.fileset.toSource {
|
||||
|
||||
src = lib.fileset.toSource {
|
||||
root = ../..;
|
||||
fileset = ../../lib;
|
||||
};
|
||||
|
||||
buildInputs = [ nixdoc nix ];
|
||||
buildInputs = [
|
||||
nixdoc
|
||||
nix
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
export NIX_STATE_DIR=$(mktemp -d)
|
||||
nix-instantiate --eval --strict --json ${./lib-function-locations.nix} \
|
||||
--arg nixpkgsPath "./." \
|
||||
--argstr revision ${nixpkgs.rev or "master"} \
|
||||
--argstr libsetsJSON ${pkgs.lib.escapeShellArg (builtins.toJSON libsets)} \
|
||||
--argstr libsetsJSON ${lib.escapeShellArg (builtins.toJSON libsets)} \
|
||||
> locations.json
|
||||
|
||||
function docgen {
|
||||
@@ -39,9 +127,16 @@ stdenv.mkDerivation {
|
||||
```{=include=} sections auto-id-prefix=auto-generated
|
||||
EOF
|
||||
|
||||
${lib.concatMapStrings ({ name, baseName ? name, description }: ''
|
||||
docgen ${name} ${baseName} ${lib.escapeShellArg description}
|
||||
'') libsets}
|
||||
${lib.concatMapStrings (
|
||||
{
|
||||
name,
|
||||
baseName ? name,
|
||||
description,
|
||||
}:
|
||||
''
|
||||
docgen ${name} ${baseName} ${lib.escapeShellArg description}
|
||||
''
|
||||
) libsets}
|
||||
|
||||
echo '```' >> "$out/index.md"
|
||||
'';
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# To build this derivation, run `nix-build -A nixpkgs-manual.optionsDoc`
|
||||
{ lib, nixosOptionsDoc }:
|
||||
|
||||
let
|
||||
modules = lib.evalModules {
|
||||
modules = [ ../../pkgs/top-level/config.nix ];
|
||||
class = "nixpkgsConfig";
|
||||
};
|
||||
|
||||
root = toString ../..;
|
||||
|
||||
transformDeclaration =
|
||||
decl:
|
||||
let
|
||||
declStr = toString decl;
|
||||
subpath = lib.removePrefix "/" (lib.removePrefix root declStr);
|
||||
in
|
||||
assert lib.hasPrefix root declStr;
|
||||
{
|
||||
url = "https://github.com/NixOS/nixpkgs/blob/master/${subpath}";
|
||||
name = subpath;
|
||||
};
|
||||
in
|
||||
nixosOptionsDoc {
|
||||
inherit (modules) options;
|
||||
documentType = "none";
|
||||
transformOptions = opt: opt // { declarations = map transformDeclaration opt.declarations; };
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
# This file describes the Nixpkgs manual, which happens to use module docs infra originally
|
||||
# developed for NixOS. To build this derivation, run `nix-build -A nixpkgs-manual`.
|
||||
#
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
callPackage,
|
||||
documentation-highlighter,
|
||||
nixos-render-docs,
|
||||
nixpkgs ? { },
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (
|
||||
finalAttrs:
|
||||
let
|
||||
inherit (finalAttrs.finalPackage.optionsDoc) optionsJSON;
|
||||
inherit (finalAttrs.finalPackage) epub lib-docs pythonInterpreterTable;
|
||||
in
|
||||
{
|
||||
name = "nixpkgs-manual";
|
||||
|
||||
nativeBuildInputs = [ nixos-render-docs ];
|
||||
|
||||
src = lib.fileset.toSource {
|
||||
root = ../.;
|
||||
fileset = lib.fileset.unions [
|
||||
(lib.fileset.fileFilter (file: file.hasExt "md" || file.hasExt "md.in") ../.)
|
||||
../style.css
|
||||
../anchor-use.js
|
||||
../anchor.min.js
|
||||
../manpage-urls.json
|
||||
];
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
ln -s ${optionsJSON}/share/doc/nixos/options.json ./config-options.json
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
substituteInPlace ./languages-frameworks/python.section.md \
|
||||
--subst-var-by python-interpreter-table "$(<"${pythonInterpreterTable}")"
|
||||
|
||||
cat \
|
||||
./functions/library.md.in \
|
||||
${lib-docs}/index.md \
|
||||
> ./functions/library.md
|
||||
substitute ./manual.md.in ./manual.md \
|
||||
--replace-fail '@MANUAL_VERSION@' '${lib.version}'
|
||||
|
||||
mkdir -p out/media
|
||||
|
||||
mkdir -p out/highlightjs
|
||||
cp -t out/highlightjs \
|
||||
${documentation-highlighter}/highlight.pack.js \
|
||||
${documentation-highlighter}/LICENSE \
|
||||
${documentation-highlighter}/mono-blue.css \
|
||||
${documentation-highlighter}/loader.js
|
||||
|
||||
cp -t out ./style.css ./anchor.min.js ./anchor-use.js
|
||||
|
||||
nixos-render-docs manual html \
|
||||
--manpage-urls ./manpage-urls.json \
|
||||
--revision ${lib.trivial.revisionWithDefault (nixpkgs.rev or "master")} \
|
||||
--stylesheet style.css \
|
||||
--stylesheet highlightjs/mono-blue.css \
|
||||
--script ./highlightjs/highlight.pack.js \
|
||||
--script ./highlightjs/loader.js \
|
||||
--script ./anchor.min.js \
|
||||
--script ./anchor-use.js \
|
||||
--toc-depth 1 \
|
||||
--section-toc-depth 1 \
|
||||
manual.md \
|
||||
out/index.html
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
dest="$out/share/doc/nixpkgs"
|
||||
mkdir -p "$(dirname "$dest")"
|
||||
mv out "$dest"
|
||||
mv "$dest/index.html" "$dest/manual.html"
|
||||
|
||||
cp ${epub} "$dest/nixpkgs-manual.epub"
|
||||
|
||||
mkdir -p $out/nix-support/
|
||||
echo "doc manual $dest manual.html" >> $out/nix-support/hydra-build-products
|
||||
echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
lib-docs = callPackage ./lib-function-docs.nix { inherit nixpkgs; };
|
||||
|
||||
epub = callPackage ./epub.nix { };
|
||||
|
||||
optionsDoc = callPackage ./options-doc.nix { };
|
||||
|
||||
pythonInterpreterTable = callPackage ./python-interpreter-table.nix { };
|
||||
|
||||
shell = callPackage ../../pkgs/tools/nix/web-devmode.nix {
|
||||
buildArgs = "./.";
|
||||
open = "/share/doc/nixpkgs/manual.html";
|
||||
};
|
||||
|
||||
tests.manpage-urls = callPackage ../tests/manpage-urls.nix { };
|
||||
};
|
||||
}
|
||||
)
|
||||
@@ -1,14 +1,15 @@
|
||||
# For debugging, run in this directory:
|
||||
# nix eval --impure --raw --expr 'import ./python-interpreter-table.nix {}'
|
||||
{ pkgs ? (import ../.. { config = { }; overlays = []; }) }:
|
||||
# To build this derivation, run `nix-build -A nixpkgs-manual.pythonInterpreterTable`
|
||||
{
|
||||
lib,
|
||||
writeText,
|
||||
pkgs,
|
||||
pythonInterpreters,
|
||||
}:
|
||||
let
|
||||
lib = pkgs.lib;
|
||||
inherit (lib.attrsets) attrNames filterAttrs;
|
||||
inherit (lib.lists) elem filter map naturalSort reverseList;
|
||||
inherit (lib.strings) concatStringsSep;
|
||||
|
||||
isPythonInterpreter = name:
|
||||
/* NB: Package names that don't follow the regular expression:
|
||||
isPythonInterpreter =
|
||||
name:
|
||||
/*
|
||||
NB: Package names that don't follow the regular expression:
|
||||
- `python-cosmopolitan` is not part of `pkgs.pythonInterpreters`.
|
||||
- `_prebuilt` interpreters are used for bootstrapping internally.
|
||||
- `python3Minimal` contains python packages, left behind conservatively.
|
||||
@@ -16,7 +17,8 @@ let
|
||||
*/
|
||||
(lib.strings.match "(pypy|python)([[:digit:]]*)" name) != null;
|
||||
|
||||
interpreterName = pname:
|
||||
interpreterName =
|
||||
pname:
|
||||
let
|
||||
cuteName = {
|
||||
cpython = "CPython";
|
||||
@@ -26,16 +28,16 @@ let
|
||||
in
|
||||
"${cuteName.${interpreter.implementation}} ${interpreter.pythonVersion}";
|
||||
|
||||
interpreters = reverseList (naturalSort (
|
||||
filter isPythonInterpreter (attrNames pkgs.pythonInterpreters)
|
||||
));
|
||||
interpreters = lib.reverseList (
|
||||
lib.naturalSort (lib.filter isPythonInterpreter (lib.attrNames pythonInterpreters))
|
||||
);
|
||||
|
||||
aliases = pname:
|
||||
attrNames (
|
||||
filterAttrs (name: value:
|
||||
isPythonInterpreter name
|
||||
&& name != pname
|
||||
&& interpreterName name == interpreterName pname
|
||||
aliases =
|
||||
pname:
|
||||
lib.attrNames (
|
||||
lib.filterAttrs (
|
||||
name: value:
|
||||
isPythonInterpreter name && name != pname && interpreterName name == interpreterName pname
|
||||
) pkgs
|
||||
);
|
||||
|
||||
@@ -45,18 +47,17 @@ let
|
||||
interpreter = interpreterName pname;
|
||||
}) interpreters;
|
||||
|
||||
toMarkdown = data:
|
||||
toMarkdown =
|
||||
data:
|
||||
let
|
||||
line = package: ''
|
||||
| ${package.pname} | ${join ", " package.aliases or [ ]} | ${package.interpreter} |
|
||||
| ${package.pname} | ${lib.concatStringsSep ", " package.aliases or [ ]} | ${package.interpreter} |
|
||||
'';
|
||||
in
|
||||
join "" (map line data);
|
||||
|
||||
join = lib.strings.concatStringsSep;
|
||||
lib.concatStringsSep "" (map line data);
|
||||
|
||||
in
|
||||
''
|
||||
writeText "python-interpreter-table.md" ''
|
||||
| Package | Aliases | Interpeter |
|
||||
|---------|---------|------------|
|
||||
${toMarkdown result}
|
||||
|
||||
+3
-16
@@ -1,20 +1,7 @@
|
||||
let
|
||||
pkgs = import ../. {
|
||||
config = {};
|
||||
overlays = [];
|
||||
};
|
||||
|
||||
common = import ./common.nix;
|
||||
inherit (common) outputPath indexPath;
|
||||
|
||||
web-devmode = import ../pkgs/tools/nix/web-devmode.nix {
|
||||
inherit pkgs;
|
||||
buildArgs = "./.";
|
||||
open = "/${outputPath}/${indexPath}";
|
||||
config = { };
|
||||
overlays = [ ];
|
||||
};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
packages = [
|
||||
web-devmode
|
||||
];
|
||||
}
|
||||
pkgs.nixpkgs-manual.shell
|
||||
|
||||
@@ -81,6 +81,12 @@ The license, or licenses, for the package. One from the attribute set defined in
|
||||
|
||||
For details, see [Licenses](#sec-meta-license).
|
||||
|
||||
### `sourceProvenance` {#var-meta-sourceProvenance}
|
||||
|
||||
A list containing the type or types of source inputs from which the package is built, e.g. original source code, pre-built binaries, etc.
|
||||
|
||||
For details, see [Source provenance](#sec-meta-sourceProvenance).
|
||||
|
||||
### `maintainers` {#var-meta-maintainers}
|
||||
|
||||
A list of the maintainers of this Nix expression. Maintainers are defined in [`nixpkgs/maintainers/maintainer-list.nix`](https://github.com/NixOS/nixpkgs/blob/master/maintainers/maintainer-list.nix). There is no restriction to becoming a maintainer, just add yourself to that list in a separate commit titled “maintainers: add alice” in the same pull request, and reference maintainers with `maintainers = with lib.maintainers; [ alice bob ]`.
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# To build this derivation, run `nix-build -A nixpkgs-manual.tests.manpage-urls`
|
||||
{
|
||||
lib,
|
||||
runCommand,
|
||||
invalidateFetcherByDrvHash,
|
||||
cacert,
|
||||
python3,
|
||||
}:
|
||||
|
||||
invalidateFetcherByDrvHash (
|
||||
{
|
||||
name ? "manual_check-manpage-urls",
|
||||
script ? ./manpage-urls.py,
|
||||
urlsFile ? ../manpage-urls.json,
|
||||
}:
|
||||
runCommand name
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
cacert
|
||||
(python3.withPackages (p: [
|
||||
p.aiohttp
|
||||
p.rich
|
||||
p.structlog
|
||||
]))
|
||||
];
|
||||
outputHash = "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="; # Empty output
|
||||
}
|
||||
''
|
||||
python3 ${script} ${urlsFile}
|
||||
touch $out
|
||||
''
|
||||
) { }
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, custom, ... }:
|
||||
{ custom, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
disabledModules = [ ./declare-enable.nix ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
disabledModules = [ (toString ./define-enable.nix) ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
disabledModules = [ ./define-enable.nix ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
disabledModules = [ "define-enable.nix" "declare-enable.nix" ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, lib, ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
config = {
|
||||
services.foo.enable = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, lib, ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
config = {
|
||||
services.foos."".bar = "baz";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, lib, options, ... }:
|
||||
{ config, options, ... }:
|
||||
{
|
||||
config = {
|
||||
result =
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
|
||||
imports = [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, ... }:
|
||||
{ ... }:
|
||||
|
||||
let
|
||||
typeless =
|
||||
|
||||
@@ -5447,6 +5447,13 @@
|
||||
githubId = 1931963;
|
||||
name = "David Sferruzza";
|
||||
};
|
||||
dstengele = {
|
||||
name = "Dennis Stengele";
|
||||
email = "dennis@stengele.me";
|
||||
matrix = "@dstengele:pango.place";
|
||||
github = "dstengele";
|
||||
githubId = 1706418;
|
||||
};
|
||||
dsuetin = {
|
||||
name = "Danil Suetin";
|
||||
email = "suetin085+nixpkgs@protonmail.com";
|
||||
@@ -17414,6 +17421,12 @@
|
||||
githubId = 1080963;
|
||||
name = "Roberto";
|
||||
};
|
||||
robertrichter = {
|
||||
email = "robert.richter@rrcomtech.com";
|
||||
github = "rrcomtech";
|
||||
githubId = 50635122;
|
||||
name = "Robert Richter";
|
||||
};
|
||||
robgssp = {
|
||||
email = "robgssp@gmail.com";
|
||||
github = "robgssp";
|
||||
|
||||
@@ -42,12 +42,16 @@
|
||||
|
||||
- [Music Assistant](https://music-assistant.io/), a music library manager for your offline and online music sources which can easily stream your favourite music to a wide range of supported players. Available as [services.music-assistant](#opt-services.music-assistant.enable).
|
||||
|
||||
- [zeronsd](https://github.com/zerotier/zeronsd), a DNS server for ZeroTier users. Available with [services.zeronsd.servedNetworks](#opt-services.zeronsd.servedNetworks).
|
||||
|
||||
- [wg-access-server](https://github.com/freifunkMUC/wg-access-server/), an all-in-one WireGuard VPN solution with a web ui for connecting devices. Available at [services.wg-access-server](#opt-services.wg-access-server.enable).
|
||||
|
||||
- [Envision](https://gitlab.com/gabmus/envision), a UI for building, configuring and running Monado, the open source OpenXR runtime. Available as [programs.envision](#opt-programs.envision.enable).
|
||||
|
||||
- [Localsend](https://localsend.org/), an open source cross-platform alternative to AirDrop. Available as [programs.localsend](#opt-programs.localsend.enable).
|
||||
|
||||
- [cryptpad](https://cryptpad.org/), a privacy-oriented collaborative platform (docs/drive/etc), has been added back. Available as [services.cryptpad](#opt-services.cryptpad.enable).
|
||||
|
||||
- [realm](https://github.com/zhboner/realm), a simple, high performance relay server written in rust. Available as [services.realm.enable](#opt-services.realm.enable).
|
||||
|
||||
- [Gotenberg](https://gotenberg.dev), an API server for converting files to PDFs that can be used alongside Paperless-ngx. Available as [services.gotenberg](options.html#opt-services.gotenberg).
|
||||
@@ -150,6 +154,8 @@
|
||||
before changing the package to `pkgs.stalwart-mail` in
|
||||
[`services.stalwart-mail.package`](#opt-services.stalwart-mail.package).
|
||||
|
||||
- The `nomad_1_5` package was dropped, as [it has reached end-of-life upstream](https://support.hashicorp.com/hc/en-us/articles/360021185113-Support-Period-and-End-of-Life-EOL-Policy). Evaluating it will throw an error.
|
||||
|
||||
- `androidndkPkgs` has been updated to `androidndkPkgs_26`.
|
||||
|
||||
- Android NDK version 26 and SDK version 33 are now the default versions used for cross compilation to android.
|
||||
@@ -285,6 +291,9 @@
|
||||
{option}`services.gitlab-runner.services.<name>.authenticationTokenConfigFile` instead of the former
|
||||
{option}`services.gitlab-runner.services.<name>.registrationConfigFile` option.
|
||||
|
||||
- `nix.channel.enable = false` no longer implies `nix.settings.nix-path = []`.
|
||||
Since Nix 2.13, a `nix-path` set in `nix.conf` cannot be overriden by the `NIX_PATH` configuration variable.
|
||||
|
||||
## Detailed migration information {#sec-release-24.11-migration}
|
||||
|
||||
### `sound` options removal {#sec-release-24.11-migration-sound}
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
let
|
||||
pkgs = import ../../.. {
|
||||
config = {};
|
||||
overlays = [];
|
||||
config = { };
|
||||
overlays = [ ];
|
||||
};
|
||||
|
||||
common = import ./common.nix;
|
||||
inherit (common) outputPath indexPath;
|
||||
|
||||
web-devmode = import ../../../pkgs/tools/nix/web-devmode.nix {
|
||||
inherit pkgs;
|
||||
buildArgs = "../../release.nix -A manualHTML.${builtins.currentSystem}";
|
||||
open = "/${outputPath}/${indexPath}";
|
||||
};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
packages = [
|
||||
web-devmode
|
||||
];
|
||||
}
|
||||
pkgs.callPackage ../../../pkgs/tools/nix/web-devmode.nix {
|
||||
buildArgs = "../../release.nix -A manualHTML.${builtins.currentSystem}";
|
||||
open = "/${outputPath}/${indexPath}";
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, lib, modulesPath, ... }:
|
||||
{ modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, lib, modulesPath, ... }:
|
||||
{ modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
|
||||
@@ -94,8 +94,6 @@ in
|
||||
NIX_PATH = cfg.nixPath;
|
||||
};
|
||||
|
||||
nix.settings.nix-path = mkIf (! cfg.channel.enable) (mkDefault "");
|
||||
|
||||
systemd.tmpfiles.rules = lib.mkIf cfg.channel.enable [
|
||||
''f /root/.nix-channels - - - - ${config.system.defaultChannel} nixos\n''
|
||||
];
|
||||
|
||||
@@ -1258,6 +1258,7 @@
|
||||
./services/networking/zerobin.nix
|
||||
./services/networking/zeronet.nix
|
||||
./services/networking/zerotierone.nix
|
||||
./services/networking/zeronsd.nix
|
||||
./services/networking/znc/default.nix
|
||||
./services/printing/cupsd.nix
|
||||
./services/printing/ipp-usb.nix
|
||||
@@ -1378,6 +1379,7 @@
|
||||
./services/web-apps/convos.nix
|
||||
./services/web-apps/crabfit.nix
|
||||
./services/web-apps/davis.nix
|
||||
./services/web-apps/cryptpad.nix
|
||||
./services/web-apps/dex.nix
|
||||
./services/web-apps/discourse.nix
|
||||
./services/web-apps/documize.nix
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (pkgs) writeScript;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Common configuration for virtual machines running under QEMU (using
|
||||
# virtio).
|
||||
|
||||
{ config, lib, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
boot.initrd.availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio" ];
|
||||
|
||||
@@ -150,6 +150,10 @@ in
|
||||
cfg.finalPackage
|
||||
];
|
||||
environment.variables.EDITOR = lib.mkIf cfg.defaultEditor (lib.mkOverride 900 "nvim");
|
||||
# On most NixOS configurations /share is already included, so it includes
|
||||
# this directory as well. But This makes sure that /share/nvim/site paths
|
||||
# from other packages will be used by neovim.
|
||||
environment.pathsToLink = [ "/share/nvim" ];
|
||||
|
||||
environment.etc = builtins.listToAttrs (builtins.attrValues (builtins.mapAttrs
|
||||
(name: value: {
|
||||
|
||||
@@ -58,9 +58,96 @@ in
|
||||
modifiable properties.
|
||||
'';
|
||||
};
|
||||
|
||||
theme = {
|
||||
package = lib.mkPackageOption pkgs "gnome-themes-extra" { } // {
|
||||
description = ''
|
||||
The package that provides the theme given in the name option.
|
||||
'';
|
||||
};
|
||||
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Adwaita";
|
||||
description = ''
|
||||
Name of the theme to use for regreet.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
package = lib.mkPackageOption pkgs "adwaita-icon-theme" { } // {
|
||||
description = ''
|
||||
The package that provides the icon theme given in the name option.
|
||||
'';
|
||||
};
|
||||
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Adwaita";
|
||||
description = ''
|
||||
Name of the icon theme to use for regreet.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
font = {
|
||||
package = lib.mkPackageOption pkgs "cantarell-fonts" { } // {
|
||||
description = ''
|
||||
The package that provides the font given in the name option.
|
||||
'';
|
||||
};
|
||||
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Cantarell";
|
||||
description = ''
|
||||
Name of the font to use for regreet.
|
||||
'';
|
||||
};
|
||||
|
||||
size = lib.mkOption {
|
||||
type = lib.types.ints.positive;
|
||||
default = 16;
|
||||
description = ''
|
||||
Size of the font to use for regreet.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
cursorTheme = {
|
||||
package = lib.mkPackageOption pkgs "adwaita-icon-theme" { } // {
|
||||
description = ''
|
||||
The package that provides the cursor theme given in the name option.
|
||||
'';
|
||||
};
|
||||
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Adwaita";
|
||||
description = ''
|
||||
Name of the cursor theme to use for regreet.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
cfg.theme.package
|
||||
cfg.iconTheme.package
|
||||
cfg.cursorTheme.package
|
||||
];
|
||||
|
||||
fonts.packages = [ cfg.font.package ];
|
||||
|
||||
programs.regreet.settings = {
|
||||
cursor_theme_name = cfg.cursorTheme.name;
|
||||
font_name = "${cfg.font.name} ${toString cfg.font.size}";
|
||||
icon_theme_name = cfg.iconTheme.name;
|
||||
theme_name = cfg.theme.name;
|
||||
};
|
||||
|
||||
services.greetd = {
|
||||
enable = lib.mkDefault true;
|
||||
settings.default_session.command = lib.mkDefault "${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} ${lib.escapeShellArgs cfg.cageArgs} -- ${lib.getExe cfg.package}";
|
||||
|
||||
@@ -117,7 +117,6 @@ in
|
||||
(mkRemovedOptionModule [ "services" "virtuoso" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "services" "openfire" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "services" "riak" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "services" "cryptpad" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "services" "rtsp-simple-server" ] "Package has been completely rebranded by upstream as mediamtx, and thus the service and the package were renamed in NixOS as well.")
|
||||
(mkRemovedOptionModule [ "services" "prayer" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "services" "restya-board" ] "The corresponding package was removed from nixpkgs.")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
let apparmor = config.security.apparmor; in
|
||||
{
|
||||
config.security.apparmor.packages = [ pkgs.apparmor-profiles ];
|
||||
|
||||
@@ -58,7 +58,7 @@ in {
|
||||
environment.systemPackages = [ cfg.package ] ;
|
||||
|
||||
systemd.services.surrealdb = {
|
||||
description = "A scalable, distributed, collaborative, document-graph database, for the realtime web ";
|
||||
description = "A scalable, distributed, collaborative, document-graph database, for the realtime web";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
||||
|
||||
@@ -254,6 +254,7 @@ in {
|
||||
extraPackages = with kdePackages; [
|
||||
breeze-icons
|
||||
kirigami
|
||||
libplasma
|
||||
plasma5support
|
||||
qtsvg
|
||||
qtvirtualkeyboard
|
||||
|
||||
@@ -192,7 +192,12 @@ in {
|
||||
};
|
||||
|
||||
customComponents = mkOption {
|
||||
type = types.listOf types.package;
|
||||
type = types.listOf (
|
||||
types.addCheck types.package (p: p.isHomeAssistantComponent or false) // {
|
||||
name = "home-assistant-component";
|
||||
description = "package that is a Home Assistant component";
|
||||
}
|
||||
);
|
||||
default = [];
|
||||
example = literalExpression ''
|
||||
with pkgs.home-assistant-custom-components; [
|
||||
|
||||
@@ -11,6 +11,14 @@ in
|
||||
services.jackett = {
|
||||
enable = mkEnableOption "Jackett, API support for your favorite torrent trackers";
|
||||
|
||||
port = mkOption {
|
||||
default = 9117;
|
||||
type = types.port;
|
||||
description = ''
|
||||
Port serving the web interface
|
||||
'';
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
type = types.str;
|
||||
default = "/var/lib/jackett/.config/Jackett";
|
||||
@@ -53,13 +61,13 @@ in
|
||||
Type = "simple";
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
ExecStart = "${cfg.package}/bin/Jackett --NoUpdates --DataFolder '${cfg.dataDir}'";
|
||||
ExecStart = "${cfg.package}/bin/Jackett --NoUpdates --Port ${toString cfg.port} --DataFolder '${cfg.dataDir}'";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [ 9117 ];
|
||||
allowedTCPPorts = [ cfg.port ];
|
||||
};
|
||||
|
||||
users.users = mkIf (cfg.user == "jackett") {
|
||||
|
||||
@@ -45,7 +45,7 @@ let
|
||||
{
|
||||
BindReadOnlyPaths = [
|
||||
"${cfg.configFile}:${env.RAD_HOME}/config.json"
|
||||
"${if isPath cfg.publicKeyFile then cfg.publicKeyFile else pkgs.writeText "radicle.pub" cfg.publicKeyFile}:${env.RAD_HOME}/keys/radicle.pub"
|
||||
"${if types.path.check cfg.publicKey then cfg.publicKey else pkgs.writeText "radicle.pub" cfg.publicKey}:${env.RAD_HOME}/keys/radicle.pub"
|
||||
];
|
||||
KillMode = "process";
|
||||
StateDirectory = [ "radicle" ];
|
||||
@@ -119,25 +119,27 @@ in
|
||||
enable = mkEnableOption "Radicle Seed Node";
|
||||
package = mkPackageOption pkgs "radicle-node" { };
|
||||
privateKeyFile = mkOption {
|
||||
type = with types; either path str;
|
||||
type = types.path;
|
||||
description = ''
|
||||
SSH private key generated by `rad auth`.
|
||||
Absolute file path to an SSH private key,
|
||||
usually generated by `rad auth`.
|
||||
|
||||
If it contains a colon (`:`) the string before the colon
|
||||
is taken as the credential name
|
||||
and the string after as a path encrypted with `systemd-creds`.
|
||||
'';
|
||||
};
|
||||
publicKeyFile = mkOption {
|
||||
publicKey = mkOption {
|
||||
type = with types; either path str;
|
||||
description = ''
|
||||
SSH public key generated by `rad auth`.
|
||||
An SSH public key (as an absolute file path or directly as a string),
|
||||
usually generated by `rad auth`.
|
||||
'';
|
||||
};
|
||||
node = {
|
||||
listenAddress = mkOption {
|
||||
type = types.str;
|
||||
default = "0.0.0.0";
|
||||
default = "[::]";
|
||||
example = "127.0.0.1";
|
||||
description = "The IP address on which `radicle-node` listens.";
|
||||
};
|
||||
@@ -180,6 +182,14 @@ in
|
||||
See https://app.radicle.xyz/nodes/seed.radicle.garden/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5/tree/radicle/src/node/config.rs#L275
|
||||
'';
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
web.pinned.repositories = [
|
||||
"rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5" # heartwood
|
||||
"rad:z3trNYnLWS11cJWC6BbxDs5niGo82" # rips
|
||||
];
|
||||
}
|
||||
'';
|
||||
type = types.submodule {
|
||||
freeformType = json.type;
|
||||
};
|
||||
|
||||
@@ -175,7 +175,7 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.users.nagios = {
|
||||
description = "Nagios user ";
|
||||
description = "Nagios user";
|
||||
uid = config.ids.uids.nagios;
|
||||
home = nagiosState;
|
||||
group = "nagios";
|
||||
|
||||
@@ -114,6 +114,13 @@ in
|
||||
Collect PVE onboot status
|
||||
'';
|
||||
};
|
||||
replication = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Collect PVE replication info
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
serviceOpts = {
|
||||
@@ -128,6 +135,7 @@ in
|
||||
--${optionalString (!cfg.collectors.cluster) "no-"}collector.cluster \
|
||||
--${optionalString (!cfg.collectors.resources) "no-"}collector.resources \
|
||||
--${optionalString (!cfg.collectors.config) "no-"}collector.config \
|
||||
--${optionalString (!cfg.collectors.replication) "no-"}collector.replication \
|
||||
${optionalString (cfg.server.keyFile != null) "--server.keyfile ${cfg.server.keyFile}"} \
|
||||
${optionalString (cfg.server.certFile != null) "--server.certfile ${cfg.server.certFile}"} \
|
||||
--config.file %d/configFile \
|
||||
|
||||
@@ -38,7 +38,7 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.antennas = {
|
||||
description = "Antennas HDHomeRun emulator for Tvheadend. ";
|
||||
description = "Antennas HDHomeRun emulator for Tvheadend.";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
# Config
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.zeronsd;
|
||||
settingsFormat = pkgs.formats.json { };
|
||||
in
|
||||
{
|
||||
options.services.zeronsd.servedNetworks = lib.mkOption {
|
||||
default = { };
|
||||
example = {
|
||||
"a8a2c3c10c1a68de".settings.token = "/var/lib/zeronsd/apitoken";
|
||||
};
|
||||
description = "ZeroTier Networks to start zeronsd instances for.";
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
package = lib.mkPackageOption pkgs "zeronsd" { };
|
||||
|
||||
settings = lib.mkOption {
|
||||
description = "Settings for zeronsd";
|
||||
default = { };
|
||||
type = lib.types.submodule {
|
||||
freeformType = settingsFormat.type;
|
||||
|
||||
options = {
|
||||
domain = lib.mkOption {
|
||||
default = "home.arpa";
|
||||
type = lib.types.singleLineStr;
|
||||
description = "Domain under which ZeroTier records will be available.";
|
||||
};
|
||||
|
||||
token = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = "Path to a file containing the API Token for ZeroTier Central.";
|
||||
};
|
||||
|
||||
log_level = lib.mkOption {
|
||||
default = "warn";
|
||||
type = lib.types.enum [
|
||||
"off"
|
||||
"error"
|
||||
"warn"
|
||||
"info"
|
||||
"debug"
|
||||
"trace"
|
||||
];
|
||||
description = "Log Level.";
|
||||
};
|
||||
|
||||
wildcard = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
description = "Whether to serve a wildcard record for ZeroTier Nodes.";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
config = lib.mkIf (cfg.servedNetworks != { }) {
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.services.zerotierone.enable;
|
||||
message = "zeronsd needs a configured zerotier-one";
|
||||
}
|
||||
];
|
||||
|
||||
systemd.services = lib.mapAttrs' (netname: netcfg: {
|
||||
name = "zeronsd-${netname}";
|
||||
value = {
|
||||
description = "ZeroTier DNS server for Network ${netname}";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [
|
||||
"network.target"
|
||||
"zerotierone.service"
|
||||
];
|
||||
wants = [ "network-online.target" ];
|
||||
|
||||
serviceConfig =
|
||||
let
|
||||
configFile = pkgs.writeText "zeronsd.json" (builtins.toJSON netcfg.settings);
|
||||
in
|
||||
{
|
||||
ExecStart = "${netcfg.package}/bin/zeronsd start --config ${configFile} --config-type json ${netname}";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 2;
|
||||
TimeoutStopSec = 5;
|
||||
User = "zeronsd";
|
||||
Group = "zeronsd";
|
||||
AmbientCapabilities = "CAP_NET_BIND_SERVICE";
|
||||
};
|
||||
};
|
||||
}) cfg.servedNetworks;
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"a+ /var/lib/zerotier-one - - - - u:zeronsd:x"
|
||||
"a+ /var/lib/zerotier-one/authtoken.secret - - - - mask::r,u:zeronsd:r"
|
||||
];
|
||||
|
||||
users.users.zeronsd = {
|
||||
group = "zeronsd";
|
||||
description = "Service user for running zeronsd";
|
||||
isSystemUser = true;
|
||||
};
|
||||
|
||||
users.groups.zeronsd = { };
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,293 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.cryptpad;
|
||||
|
||||
inherit (lib)
|
||||
mkIf
|
||||
mkMerge
|
||||
mkOption
|
||||
strings
|
||||
types
|
||||
;
|
||||
|
||||
# The Cryptpad configuration file isn't JSON, but a JavaScript source file that assigns a JSON value
|
||||
# to a variable.
|
||||
cryptpadConfigFile = builtins.toFile "cryptpad_config.js" ''
|
||||
module.exports = ${builtins.toJSON cfg.settings}
|
||||
'';
|
||||
|
||||
# Derive domain names for Nginx configuration from Cryptpad configuration
|
||||
mainDomain = strings.removePrefix "https://" cfg.settings.httpUnsafeOrigin;
|
||||
sandboxDomain =
|
||||
if cfg.settings.httpSafeOrigin == null then
|
||||
mainDomain
|
||||
else
|
||||
strings.removePrefix "https://" cfg.settings.httpSafeOrigin;
|
||||
|
||||
in
|
||||
{
|
||||
options.services.cryptpad = {
|
||||
enable = lib.mkEnableOption "cryptpad";
|
||||
|
||||
package = lib.mkPackageOption pkgs "cryptpad" { };
|
||||
|
||||
configureNginx = mkOption {
|
||||
description = ''
|
||||
Configure Nginx as a reverse proxy for Cryptpad.
|
||||
Note that this makes some assumptions on your setup, and sets settings that will
|
||||
affect other virtualHosts running on your Nginx instance, if any.
|
||||
Alternatively you can configure a reverse-proxy of your choice.
|
||||
'';
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
description = ''
|
||||
Cryptpad configuration settings.
|
||||
See https://github.com/cryptpad/cryptpad/blob/main/config/config.example.js for a more extensive
|
||||
reference documentation.
|
||||
Test your deployed instance through `https://<domain>/checkup/`.
|
||||
'';
|
||||
type = types.submodule {
|
||||
freeformType = (pkgs.formats.json { }).type;
|
||||
options = {
|
||||
httpUnsafeOrigin = mkOption {
|
||||
type = types.str;
|
||||
example = "https://cryptpad.example.com";
|
||||
default = "";
|
||||
description = "This is the URL that users will enter to load your instance";
|
||||
};
|
||||
httpSafeOrigin = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
example = "https://cryptpad-ui.example.com. Apparently optional but recommended.";
|
||||
description = "Cryptpad sandbox URL";
|
||||
};
|
||||
httpAddress = mkOption {
|
||||
type = types.str;
|
||||
default = "127.0.0.1";
|
||||
description = "Address on which the Node.js server should listen";
|
||||
};
|
||||
httpPort = mkOption {
|
||||
type = types.int;
|
||||
default = 3000;
|
||||
description = "Port on which the Node.js server should listen";
|
||||
};
|
||||
websocketPort = mkOption {
|
||||
type = types.int;
|
||||
default = 3003;
|
||||
description = "Port for the websocket that needs to be separate";
|
||||
};
|
||||
maxWorkers = mkOption {
|
||||
type = types.nullOr types.int;
|
||||
default = null;
|
||||
description = "Number of child processes, defaults to number of cores available";
|
||||
};
|
||||
adminKeys = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = "List of public signing keys of users that can access the admin panel";
|
||||
example = [ "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]" ];
|
||||
};
|
||||
logToStdout = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Controls whether log output should go to stdout of the systemd service";
|
||||
};
|
||||
logLevel = mkOption {
|
||||
type = types.str;
|
||||
default = "info";
|
||||
description = "Controls log level";
|
||||
};
|
||||
blockDailyCheck = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Disable telemetry. This setting is only effective if the 'Disable server telemetry'
|
||||
setting in the admin menu has been untouched, and will be ignored by cryptpad once
|
||||
that option is set either way.
|
||||
Note that due to the service confinement, just enabling the option in the admin
|
||||
menu will not be able to resolve DNS and fail; this setting must be set as well.
|
||||
'';
|
||||
};
|
||||
installMethod = mkOption {
|
||||
type = types.str;
|
||||
default = "nixos";
|
||||
description = ''
|
||||
Install method is listed in telemetry if you agree to it through the consentToContact
|
||||
setting in the admin panel.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
systemd.services.cryptpad = {
|
||||
description = "Cryptpad service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "networking.target" ];
|
||||
serviceConfig = {
|
||||
BindReadOnlyPaths = [
|
||||
cryptpadConfigFile
|
||||
# apparently needs proc for workers management
|
||||
"/proc"
|
||||
"/dev/urandom"
|
||||
];
|
||||
DynamicUser = true;
|
||||
Environment = [
|
||||
"CRYPTPAD_CONFIG=${cryptpadConfigFile}"
|
||||
"HOME=%S/cryptpad"
|
||||
];
|
||||
ExecStart = lib.getExe cfg.package;
|
||||
Restart = "always";
|
||||
StateDirectory = "cryptpad";
|
||||
WorkingDirectory = "%S/cryptpad";
|
||||
# security way too many numerous options, from the systemd-analyze security output
|
||||
# at end of test: block everything except
|
||||
# - SystemCallFiters=@resources is required for node
|
||||
# - MemoryDenyWriteExecute for node JIT
|
||||
# - RestrictAddressFamilies=~AF_(INET|INET6) / PrivateNetwork to bind to sockets
|
||||
# - IPAddressDeny likewise allow localhost if binding to localhost or any otherwise
|
||||
# - PrivateUsers somehow service doesn't start with that
|
||||
# - DeviceAllow (char-rtc r added by ProtectClock)
|
||||
AmbientCapabilities = "";
|
||||
CapabilityBoundingSet = "";
|
||||
DeviceAllow = "";
|
||||
LockPersonality = true;
|
||||
NoNewPrivileges = true;
|
||||
PrivateDevices = true;
|
||||
PrivateTmp = true;
|
||||
ProcSubset = "pid";
|
||||
ProtectClock = true;
|
||||
ProtectControlGroups = true;
|
||||
ProtectHome = true;
|
||||
ProtectHostname = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectProc = "invisible";
|
||||
ProtectSystem = "strict";
|
||||
RemoveIPC = true;
|
||||
RestrictAddressFamilies = [
|
||||
"AF_INET"
|
||||
"AF_INET6"
|
||||
];
|
||||
RestrictNamespaces = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
RuntimeDirectoryMode = "700";
|
||||
SocketBindAllow = [
|
||||
"tcp:${builtins.toString cfg.settings.httpPort}"
|
||||
"tcp:${builtins.toString cfg.settings.websocketPort}"
|
||||
];
|
||||
SocketBindDeny = [ "any" ];
|
||||
StateDirectoryMode = "0700";
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = [
|
||||
"@pkey"
|
||||
"@system-service"
|
||||
"~@chown"
|
||||
"~@keyring"
|
||||
"~@memlock"
|
||||
"~@privileged"
|
||||
"~@resources"
|
||||
"~@setuid"
|
||||
"~@timer"
|
||||
];
|
||||
UMask = "0077";
|
||||
};
|
||||
confinement = {
|
||||
enable = true;
|
||||
binSh = null;
|
||||
mode = "chroot-only";
|
||||
};
|
||||
};
|
||||
}
|
||||
# block external network access if not phoning home and
|
||||
# binding to localhost (default)
|
||||
(mkIf
|
||||
(
|
||||
cfg.settings.blockDailyCheck
|
||||
&& (builtins.elem cfg.settings.httpAddress [
|
||||
"127.0.0.1"
|
||||
"::1"
|
||||
])
|
||||
)
|
||||
{
|
||||
systemd.services.cryptpad = {
|
||||
serviceConfig = {
|
||||
IPAddressAllow = [ "localhost" ];
|
||||
IPAddressDeny = [ "any" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
# .. conversely allow DNS & TLS if telemetry is explicitly enabled
|
||||
(mkIf (!cfg.settings.blockDailyCheck) {
|
||||
systemd.services.cryptpad = {
|
||||
serviceConfig = {
|
||||
BindReadOnlyPaths = [
|
||||
"-/etc/resolv.conf"
|
||||
"-/run/systemd"
|
||||
"/etc/hosts"
|
||||
"/etc/ssl/certs/ca-certificates.crt"
|
||||
];
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf cfg.configureNginx {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.settings.httpUnsafeOrigin != "";
|
||||
message = "services.cryptpad.settings.httpUnsafeOrigin is required";
|
||||
}
|
||||
{
|
||||
assertion = strings.hasPrefix "https://" cfg.settings.httpUnsafeOrigin;
|
||||
message = "services.cryptpad.settings.httpUnsafeOrigin must start with https://";
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
cfg.settings.httpSafeOrigin == null || strings.hasPrefix "https://" cfg.settings.httpSafeOrigin;
|
||||
message = "services.cryptpad.settings.httpSafeOrigin must start with https:// (or be unset)";
|
||||
}
|
||||
];
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
|
||||
virtualHosts = mkMerge [
|
||||
{
|
||||
"${mainDomain}" = {
|
||||
serverAliases = lib.optionals (cfg.settings.httpSafeOrigin != null) [ sandboxDomain ];
|
||||
enableACME = lib.mkDefault true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://${cfg.settings.httpAddress}:${builtins.toString cfg.settings.httpPort}";
|
||||
extraConfig = ''
|
||||
client_max_body_size 150m;
|
||||
'';
|
||||
};
|
||||
locations."/cryptpad_websocket" = {
|
||||
proxyPass = "http://${cfg.settings.httpAddress}:${builtins.toString cfg.settings.websocketPort}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
@@ -235,6 +235,7 @@ in {
|
||||
couchdb = handleTest ./couchdb.nix {};
|
||||
crabfit = handleTest ./crabfit.nix {};
|
||||
cri-o = handleTestOn ["aarch64-linux" "x86_64-linux"] ./cri-o.nix {};
|
||||
cryptpad = runTest ./cryptpad.nix;
|
||||
cups-pdf = handleTest ./cups-pdf.nix {};
|
||||
curl-impersonate = handleTest ./curl-impersonate.nix {};
|
||||
custom-ca = handleTest ./custom-ca.nix {};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, nodes, pkgs, ... }:
|
||||
{ nodes, ... }:
|
||||
let
|
||||
caCert = nodes.acme.test-support.acme.caCert;
|
||||
caDomain = nodes.acme.test-support.acme.caDomain;
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
certs = pkgs.runCommand "cryptpadSelfSignedCerts" { buildInputs = [ pkgs.openssl ]; } ''
|
||||
mkdir -p $out
|
||||
cd $out
|
||||
openssl req -x509 -newkey rsa:4096 \
|
||||
-keyout key.pem -out cert.pem -nodes -days 3650 \
|
||||
-subj '/CN=cryptpad.localhost' \
|
||||
-addext 'subjectAltName = DNS.1:cryptpad.localhost, DNS.2:cryptpad-sandbox.localhost'
|
||||
'';
|
||||
# data sniffed from cryptpad's /checkup network trace, seems to be re-usable
|
||||
test_write_data = pkgs.writeText "cryptpadTestData" ''
|
||||
{"command":"WRITE_BLOCK","content":{"publicKey":"O2onvM62pC1io6jQKm8Nc2UyFXcd4kOmOsBIoYtZ2ik=","signature":"aXcM9SMO59lwA7q7HbYB+AnzymmxSyy/KhkG/cXIBVzl8v+kkPWXmFuWhcuKfRF8yt3Zc3ktIsHoFyuyDSAwAA==","ciphertext":"AFwCIfBHKdFzDKjMg4cu66qlJLpP+6Yxogbl3o9neiQou5P8h8yJB8qgnQ=="},"publicKey":"O2onvM62pC1io6jQKm8Nc2UyFXcd4kOmOsBIoYtZ2ik=","nonce":"bitSbJMNSzOsg98nEzN80a231PCkBQeH"}
|
||||
'';
|
||||
in
|
||||
{
|
||||
name = "cryptpad";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ martinetd ];
|
||||
};
|
||||
|
||||
nodes.machine = {
|
||||
services.cryptpad = {
|
||||
enable = true;
|
||||
configureNginx = true;
|
||||
settings = {
|
||||
httpUnsafeOrigin = "https://cryptpad.localhost";
|
||||
httpSafeOrigin = "https://cryptpad-sandbox.localhost";
|
||||
};
|
||||
};
|
||||
services.nginx = {
|
||||
virtualHosts."cryptpad.localhost" = {
|
||||
enableACME = false;
|
||||
sslCertificate = "${certs}/cert.pem";
|
||||
sslCertificateKey = "${certs}/key.pem";
|
||||
};
|
||||
};
|
||||
security = {
|
||||
pki.certificateFiles = [ "${certs}/cert.pem" ];
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("cryptpad.service")
|
||||
machine.wait_for_unit("nginx.service")
|
||||
machine.wait_for_open_port(3000)
|
||||
|
||||
# test home page
|
||||
machine.succeed("curl --fail https://cryptpad.localhost -o /tmp/cryptpad_home.html")
|
||||
machine.succeed("grep -F 'CryptPad: Collaboration suite' /tmp/cryptpad_home.html")
|
||||
|
||||
# test scripts/build.js actually generated customize content from config
|
||||
machine.succeed("grep -F 'meta property=\"og:url\" content=\"https://cryptpad.localhost/index.html' /tmp/cryptpad_home.html")
|
||||
|
||||
# make sure child pages are accessible (e.g. check nginx try_files paths)
|
||||
machine.succeed(
|
||||
"grep -oE '/(customize|components)[^\"]*' /tmp/cryptpad_home.html"
|
||||
" | while read -r page; do"
|
||||
" curl -O --fail https://cryptpad.localhost$page || exit;"
|
||||
" done")
|
||||
|
||||
# test some API (e.g. check cryptpad main process)
|
||||
machine.succeed("curl --fail -d @${test_write_data} -H 'Content-Type: application/json' https://cryptpad.localhost/api/auth")
|
||||
|
||||
# test telemetry has been disabled
|
||||
machine.fail("journalctl -u cryptpad | grep TELEMETRY");
|
||||
|
||||
# for future improvements
|
||||
machine.log(machine.execute("systemd-analyze security cryptpad.service")[1])
|
||||
'';
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, lib, makeInstalledTest, ... }:
|
||||
{ pkgs, makeInstalledTest, ... }:
|
||||
|
||||
makeInstalledTest {
|
||||
tested = pkgs.ostree;
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
import ./make-test-python.nix ({ lib, ... }:
|
||||
|
||||
{
|
||||
let
|
||||
jackettPort = 9117;
|
||||
in {
|
||||
name = "jackett";
|
||||
meta.maintainers = with lib.maintainers; [ etu ];
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{ services.jackett.enable = true; };
|
||||
{ pkgs, ... }: {
|
||||
services.jackett.enable = true;
|
||||
services.jackett.port = jackettPort;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.start()
|
||||
machine.wait_for_unit("jackett.service")
|
||||
machine.wait_for_open_port(9117)
|
||||
machine.succeed("curl --fail http://localhost:9117/")
|
||||
machine.wait_for_open_port(${toString jackettPort})
|
||||
machine.succeed("curl --fail http://localhost:${toString jackettPort}/")
|
||||
'';
|
||||
})
|
||||
|
||||
@@ -44,6 +44,7 @@ let
|
||||
};
|
||||
plugins = with config.services.keycloak.package.plugins; [
|
||||
keycloak-discord
|
||||
keycloak-metrics-spi
|
||||
];
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
@@ -121,6 +122,14 @@ let
|
||||
| jq -r '"Authorization: bearer " + .access_token' >admin_auth_header
|
||||
""")
|
||||
|
||||
# Register the metrics SPI
|
||||
keycloak.succeed(
|
||||
"""${pkgs.jre}/bin/keytool -import -alias snakeoil -file ${certs.ca.cert} -storepass aaaaaa -keystore cacert.jks -noprompt""",
|
||||
"""KC_OPTS='-Djavax.net.ssl.trustStore=cacert.jks -Djavax.net.ssl.trustStorePassword=aaaaaa' kcadm.sh config credentials --server '${frontendUrl}' --realm master --user admin --password "$(<${adminPasswordFile})" """,
|
||||
"""KC_OPTS='-Djavax.net.ssl.trustStore=cacert.jks -Djavax.net.ssl.trustStorePassword=aaaaaa' kcadm.sh update events/config -s 'eventsEnabled=true' -s 'adminEventsEnabled=true' -s 'eventsListeners+=metrics-listener'""",
|
||||
"""curl -sSf '${frontendUrl}/realms/master/metrics' | grep '^keycloak_admin_event_UPDATE'"""
|
||||
)
|
||||
|
||||
# Publish the realm, including a test OIDC client and user
|
||||
keycloak.succeed(
|
||||
"curl -sSf -H @admin_auth_header -X POST -H 'Content-Type: application/json' -d @${realmDataJson} '${frontendUrl}/admin/realms/'"
|
||||
|
||||
@@ -66,7 +66,7 @@ in
|
||||
services.radicle = {
|
||||
enable = true;
|
||||
privateKeyFile = seed-ssh-keys.snakeOilEd25519PrivateKey;
|
||||
publicKeyFile = seed-ssh-keys.snakeOilEd25519PublicKey;
|
||||
publicKey = seed-ssh-keys.snakeOilEd25519PublicKey;
|
||||
node = {
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, gnome
|
||||
, gnome-desktop
|
||||
, glib
|
||||
, gtk3
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
, libglvnd
|
||||
, libogg
|
||||
, libvorbis
|
||||
, makeWrapper
|
||||
, openal
|
||||
, portaudio
|
||||
, rtmidi
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
, faust
|
||||
, lv2
|
||||
, qtbase
|
||||
, which
|
||||
}:
|
||||
|
||||
faust.wrapWithBuildEnv {
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
, pkg-config
|
||||
, autoPatchelfHook
|
||||
, soxr
|
||||
, freetype
|
||||
, libsamplerate
|
||||
, armadillo
|
||||
, tomlplusplus
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, fetchurl, pkg-config, meson, ninja, libGLU, lv2, serd, sord, libX11, libXext, glew, lv2lint
|
||||
{ stdenv, lib, fetchurl, pkg-config, meson, ninja, lv2, sord, libX11, libXext, glew, lv2lint
|
||||
, pname, version, sha256, description
|
||||
, url ? "https://git.open-music-kontrollers.ch/lv2/${pname}.lv2/snapshot/${pname}.lv2-${version}.tar.xz"
|
||||
, additionalBuildInputs ? []
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
, pipewire
|
||||
, cmake
|
||||
, extra-cmake-modules
|
||||
, gnumake
|
||||
, wrapQtAppsHook
|
||||
, qtbase
|
||||
, qttools
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, gst_all_1
|
||||
, libviperfx
|
||||
, makeWrapper
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{ callPackage
|
||||
, timeshift-unwrapped
|
||||
, lib
|
||||
, rsync
|
||||
, coreutils
|
||||
, mount
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
, qtbase ? null
|
||||
, qttools ? null
|
||||
, python3
|
||||
, nixosTests
|
||||
, withGui
|
||||
, withWallet ? true
|
||||
}:
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
, stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, llvmPackages
|
||||
, rocksdb_7_10
|
||||
, Security
|
||||
}:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{ fetchFromGitHub
|
||||
, stdenv
|
||||
, makeDesktopItem
|
||||
, lib
|
||||
, openssl
|
||||
, boost
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ clang
|
||||
, cmake
|
||||
{ cmake
|
||||
, CoreFoundation
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
@@ -18,7 +17,6 @@
|
||||
, stdenv
|
||||
, SystemConfiguration
|
||||
, testers
|
||||
, unzip
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{ buildGoModule
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, go
|
||||
, tags ? [ "autopilotrpc" "signrpc" "walletrpc" "chainrpc" "invoicesrpc" "watchtowerrpc" "routerrpc" "monitoring" "kvdb_postgres" "kvdb_etcd" ]
|
||||
}:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ rustPlatform, lib, fetchFromGitHub
|
||||
, zlib, openssl
|
||||
, pkg-config, protobuf, llvmPackages
|
||||
, pkg-config, protobuf
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "nearcore";
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
, curl
|
||||
, pkg-config
|
||||
, openssl
|
||||
, llvmPackages
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "snarkos";
|
||||
|
||||
@@ -96,7 +96,7 @@ rustPlatform.buildRustPackage rec {
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces. ";
|
||||
description = "Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.";
|
||||
homepage = "https://solana.com";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ adjacentresearch ];
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ lib
|
||||
, buildFHSEnv
|
||||
{ buildFHSEnv
|
||||
, sparrow-unwrapped
|
||||
}:
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, dpkg
|
||||
, util-linux
|
||||
, bash
|
||||
, makeWrapper
|
||||
, electron
|
||||
, asar
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
markdown-mode,
|
||||
melpaBuild,
|
||||
unstableGitUpdater,
|
||||
writeText,
|
||||
}:
|
||||
|
||||
melpaBuild {
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
melpaBuild {
|
||||
pname = "git-undo";
|
||||
version = "0-unstable-2019-12-21";
|
||||
version = "0-unstable-2022-08-07";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jwiegley";
|
||||
repo = "git-undo-el";
|
||||
rev = "cf31e38e7889e6ade7d2d2b9f8719fd44f52feb5";
|
||||
hash = "sha256-cVkK9EF6qQyVV3uVqnBEjF8e9nEx/8ixnM8PvxqCyYE=";
|
||||
rev = "3d9c95fc40a362eae4b88e20ee21212d234a9ee6";
|
||||
hash = "sha256-xwVCAdxnIRHrFNWvtlM3u6CShsUiGgl1CiBTsp2x7IM=";
|
||||
};
|
||||
|
||||
passthru.updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
|
||||
|
||||
+3
-3
@@ -8,13 +8,13 @@
|
||||
melpaBuild {
|
||||
pname = "isearch-plus";
|
||||
ename = "isearch+";
|
||||
version = "3434-unstable-2021-08-23";
|
||||
version = "3434-unstable-2023-09-27";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "emacsmirror";
|
||||
repo = "isearch-plus";
|
||||
rev = "93088ea0ac4d51bdb76c4c32ea53172f6c435852";
|
||||
hash = "sha256-kD+Fyps3fc5YK6ATU1nrkKHazGMYJnU2gRcpQZf6A1E=";
|
||||
rev = "b10a36fb6bb8b45ff9d924107384e3bf0cee201d";
|
||||
hash = "sha256-h/jkIWjkLFbtBp9F+lhA3CulYy2XaeloLmexR0CDm3E=";
|
||||
};
|
||||
|
||||
passthru.updateScript = unstableGitUpdater { };
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, writeText
|
||||
, melpaStablePackages
|
||||
, runCommand
|
||||
, tree-sitter-grammars
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
{ lib
|
||||
, callPackage
|
||||
, clangStdenv
|
||||
, cmake
|
||||
, fetchFromGitHub
|
||||
, gcc
|
||||
, git
|
||||
, llvmPackages_13
|
||||
# Libraries
|
||||
, argparse
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ micro, expect, runCommand, writeScript, runtimeShell }:
|
||||
{ micro, expect, runCommand, writeScript }:
|
||||
|
||||
let expect-script = writeScript "expect-script" ''
|
||||
#!${expect}/bin/expect -f
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ nano, expect, runCommand, writeScriptBin, runtimeShell }:
|
||||
{ nano, expect, runCommand, writeScriptBin }:
|
||||
|
||||
let expect-script = writeScriptBin "expect-script" ''
|
||||
#!${expect}/bin/expect -f
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# run tests by building `neovim.tests`
|
||||
{ vimUtils, writeText, neovim, vimPlugins
|
||||
, lib, neovimUtils, wrapNeovimUnstable
|
||||
, neovimUtils, wrapNeovimUnstable
|
||||
, neovim-unwrapped
|
||||
, fetchFromGitLab
|
||||
, runCommandLocal
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, buildFHSEnv, callPackage, makeDesktopItem, writeScript, runtimeShell
|
||||
{ lib, buildFHSEnv, callPackage, makeDesktopItem, runtimeShell
|
||||
, runCommand, unstick, quartus-prime-lite
|
||||
, withQuesta ? true
|
||||
, supportedDevices ? [ "Arria II" "Cyclone V" "Cyclone IV" "Cyclone 10 LP" "MAX II/V" "MAX 10 FPGA" ]
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
, stdenv
|
||||
, mkDerivation
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, fetchFromGitHub
|
||||
, makeDesktopItem
|
||||
, copyDesktopItems
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, fetchFromGitHub, python3, tk, makeDesktopItem, copyDesktopItems }:
|
||||
{ lib, fetchFromGitHub, python3, makeDesktopItem, copyDesktopItems }:
|
||||
|
||||
with python3.pkgs;
|
||||
|
||||
|
||||
@@ -5,14 +5,12 @@
|
||||
, glib
|
||||
, nss
|
||||
, nspr
|
||||
, at-spi2-atk
|
||||
, cups
|
||||
, dbus
|
||||
, libdrm
|
||||
, gtk3
|
||||
, pango
|
||||
, cairo
|
||||
, xorg
|
||||
, libxkbcommon
|
||||
, mesa
|
||||
, expat
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
, vimPlugins
|
||||
, makeWrapper
|
||||
, wrapGAppsHook3
|
||||
, runtimeShell
|
||||
|
||||
# apple frameworks
|
||||
, CoreServices, CoreData, Cocoa, Foundation, libobjc
|
||||
|
||||
@@ -6168,6 +6168,18 @@ final: prev:
|
||||
meta.homepage = "https://github.com/savq/melange-nvim/";
|
||||
};
|
||||
|
||||
messenger-nvim = buildVimPlugin {
|
||||
pname = "messenger.nvim";
|
||||
version = "2024-07-18";
|
||||
src = fetchFromGitHub {
|
||||
owner = "lsig";
|
||||
repo = "messenger.nvim";
|
||||
rev = "309fec2ddd3de55eba2781b676931b37ce8190af";
|
||||
sha256 = "1ycvxxcp04hh134nazdrzd9g98mkdipc2p0amvcphpqr9p9s3pcm";
|
||||
};
|
||||
meta.homepage = "https://github.com/lsig/messenger.nvim/";
|
||||
};
|
||||
|
||||
miasma-nvim = buildVimPlugin {
|
||||
pname = "miasma.nvim";
|
||||
version = "2023-10-24";
|
||||
@@ -9821,18 +9833,6 @@ final: prev:
|
||||
meta.homepage = "https://github.com/rust-lang/rust.vim/";
|
||||
};
|
||||
|
||||
rustaceanvim = buildNeovimPlugin {
|
||||
pname = "rustaceanvim";
|
||||
version = "2024-07-10";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mrcjkb";
|
||||
repo = "rustaceanvim";
|
||||
rev = "047f9c9d8cd2861745eb9de6c1570ee0875aa795";
|
||||
sha256 = "0q06rkg8dfzxvlwp7svp8sjkk0f2x5vvjkv6grdmm302s43jj7rk";
|
||||
};
|
||||
meta.homepage = "https://github.com/mrcjkb/rustaceanvim/";
|
||||
};
|
||||
|
||||
sad-vim = buildVimPlugin {
|
||||
pname = "sad.vim";
|
||||
version = "2019-02-18";
|
||||
|
||||
@@ -1380,6 +1380,8 @@
|
||||
dependencies = with self; [ nvim-lspconfig ];
|
||||
};
|
||||
|
||||
rustaceanvim = neovimUtils.buildNeovimPlugin { luaAttr = "rustaceanvim"; };
|
||||
|
||||
sg-nvim = super.sg-nvim.overrideAttrs (old:
|
||||
let
|
||||
sg-nvim-rust = rustPlatform.buildRustPackage {
|
||||
|
||||
@@ -517,6 +517,7 @@ https://github.com/kaicataldo/material.vim/,HEAD,
|
||||
https://github.com/vim-scripts/mayansmoke/,,
|
||||
https://github.com/chikamichi/mediawiki.vim/,HEAD,
|
||||
https://github.com/savq/melange-nvim/,,
|
||||
https://github.com/lsig/messenger.nvim/,HEAD,
|
||||
https://github.com/xero/miasma.nvim/,,
|
||||
https://github.com/dasupradyumna/midnight.nvim/,,
|
||||
https://github.com/phaazon/mind.nvim/,HEAD,
|
||||
@@ -826,7 +827,6 @@ https://github.com/keith/rspec.vim/,,
|
||||
https://github.com/ccarpita/rtorrent-syntax-file/,,
|
||||
https://github.com/simrat39/rust-tools.nvim/,,
|
||||
https://github.com/rust-lang/rust.vim/,,
|
||||
https://github.com/mrcjkb/rustaceanvim/,HEAD,
|
||||
https://github.com/hauleth/sad.vim/,,
|
||||
https://github.com/vmware-archive/salt-vim/,,
|
||||
https://github.com/lewis6991/satellite.nvim/,HEAD,
|
||||
|
||||
-1
@@ -2,7 +2,6 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
bash,
|
||||
ocaml,
|
||||
ocamlPackages,
|
||||
dune_3,
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
vscode-utils,
|
||||
writeScript,
|
||||
runtimeShell,
|
||||
jq,
|
||||
clang-tools,
|
||||
gdbUseFixed ? true,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
, appstream-glib
|
||||
, desktop-file-utils
|
||||
, gettext
|
||||
, glib
|
||||
, gobject-introspection
|
||||
, gtk3
|
||||
, gtk4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, fetchFromGitHub, python3Packages, file, less, highlight, w3m, ranger, imagemagick, testers
|
||||
{ lib, fetchFromGitHub, python3Packages, file, less, highlight, w3m, imagemagick
|
||||
, imagePreviewSupport ? true
|
||||
, sixelPreviewSupport ? true
|
||||
, neoVimSupport ? true
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ lib
|
||||
, makeWrapper
|
||||
{ makeWrapper
|
||||
, nixosTests
|
||||
, symlinkJoin
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ lib
|
||||
, makeWrapper
|
||||
{ makeWrapper
|
||||
, nixosTests
|
||||
, symlinkJoin
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
, freetype
|
||||
, libGL
|
||||
, xorg
|
||||
, darwin
|
||||
, AppKit
|
||||
}:
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# If you just want a subset of plug-ins, you can specify them explicitly:
|
||||
# `gimp-with-plugins.override { plugins = with gimpPlugins; [ gap ]; }`.
|
||||
|
||||
{ config, lib, pkgs }:
|
||||
{ lib, pkgs }:
|
||||
|
||||
let
|
||||
inherit (pkgs) stdenv fetchurl fetchpatch fetchpatch2 pkg-config intltool glib fetchFromGitHub fetchFromGitLab;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ lib, stdenv, fetchFromGitHub, lazarus, fpc, pango, cairo, glib
|
||||
, atk, gtk2, libX11, gdk-pixbuf, busybox, python3
|
||||
, atk, gtk2, libX11, gdk-pixbuf, python3
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
, goocanvas2
|
||||
, gtkspell3
|
||||
, isocodes
|
||||
, gnome
|
||||
, python3
|
||||
, tesseract4
|
||||
, extraOcrEngines ? [] # other supported engines are: ocrad gocr cuneiform
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
, gtk3
|
||||
, gobject-introspection
|
||||
, wrapGAppsHook3
|
||||
, python
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user