Merge branch 'master' into r-updates
This commit is contained in:
@@ -66,6 +66,10 @@
|
||||
/doc/build-helpers/images/makediskimage.section.md @raitobezarius
|
||||
/nixos/lib/make-disk-image.nix @raitobezarius
|
||||
|
||||
# Nix, the package manager
|
||||
pkgs/tools/package-management/nix/ @raitobezarius
|
||||
nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius
|
||||
|
||||
# Nixpkgs documentation
|
||||
/maintainers/scripts/db-to-md.sh @jtojnar @ryantm
|
||||
/maintainers/scripts/doc @jtojnar @ryantm
|
||||
|
||||
@@ -11,6 +11,18 @@ If you are packaging a Flutter desktop application, use [`buildFlutterApplicatio
|
||||
`pubspecLock` is the parsed pubspec.lock file. pub2nix uses this to download required packages.
|
||||
This can be converted to JSON from YAML with something like `yq . pubspec.lock`, and then read by Nix.
|
||||
|
||||
Alternatively, `autoPubspecLock` can be used instead, and set to a path to a regular `pubspec.lock` file. This relies on import-from-derivation, and is not permitted in Nixpkgs, but can be useful at other times.
|
||||
|
||||
::: {.warning}
|
||||
When using `autoPubspecLock` with a local source directory, make sure to use a
|
||||
concatenation operator (e.g. `autoPubspecLock = src + "/pubspec.lock";`), and
|
||||
not string interpolation.
|
||||
|
||||
String interpolation will copy your entire source directory to the Nix store and
|
||||
use its store path, meaning that unrelated changes to your source tree will
|
||||
cause the generated `pubspec.lock` derivation to rebuild!
|
||||
:::
|
||||
|
||||
If the package has Git package dependencies, the hashes must be provided in the `gitHashes` set. If a hash is missing, an error message prompting you to add it will be shown.
|
||||
|
||||
The `dart` commands run can be overridden through `pubGetScript` and `dartCompileCommand`, you can also add flags using `dartCompileFlags` or `dartJitFlags`.
|
||||
@@ -101,8 +113,8 @@ flutter.buildFlutterApplication {
|
||||
|
||||
pubspecLock = lib.importJSON ./pubspec.lock.json;
|
||||
}
|
||||
```
|
||||
|
||||
### Usage with nix-shell {#ssec-dart-flutter-nix-shell}
|
||||
|
||||
See the [Dart documentation](#ssec-dart-applications-nix-shell) nix-shell instructions.
|
||||
```
|
||||
See the [Dart documentation](#ssec-dart-applications-nix-shell) for nix-shell instructions.
|
||||
|
||||
@@ -208,3 +208,23 @@ EOF
|
||||
cp test.pdf $out
|
||||
''
|
||||
```
|
||||
|
||||
## LuaLaTeX font cache {#sec-language-texlive-lualatex-font-cache}
|
||||
|
||||
The font cache for LuaLaTeX is written to `$HOME`.
|
||||
Therefore, it is necessary to set `$HOME` to a writable path, e.g. [before using LuaLaTeX in nix derivations](https://github.com/NixOS/nixpkgs/issues/180639):
|
||||
```nix
|
||||
runCommandNoCC "lualatex-hello-world" {
|
||||
buildInputs = [ texliveFull ];
|
||||
} ''
|
||||
mkdir $out
|
||||
echo '\documentclass{article} \begin{document} Hello world \end{document}' > main.tex
|
||||
env HOME=$(mktemp -d) lualatex -interaction=nonstopmode -output-format=pdf -output-directory=$out ./main.tex
|
||||
''
|
||||
```
|
||||
|
||||
Additionally, [the cache of a user can diverge from the nix store](https://github.com/NixOS/nixpkgs/issues/278718).
|
||||
To resolve font issues that might follow, the cache can be removed by the user:
|
||||
```ShellSession
|
||||
luaotfload-tool --cache=erase --flush-lookups --force
|
||||
```
|
||||
|
||||
+137
-24
@@ -103,42 +103,155 @@ rec {
|
||||
else converge f x';
|
||||
|
||||
/*
|
||||
Modify the contents of an explicitly recursive attribute set in a way that
|
||||
honors `self`-references. This is accomplished with a function
|
||||
Extend a function using an overlay.
|
||||
|
||||
Overlays allow modifying and extending fixed-point functions, specifically ones returning attribute sets.
|
||||
A fixed-point function is a function which is intended to be evaluated by passing the result of itself as the argument.
|
||||
This is possible due to Nix's lazy evaluation.
|
||||
|
||||
|
||||
A fixed-point function returning an attribute set has the form
|
||||
|
||||
```nix
|
||||
g = self: super: { foo = super.foo + " + "; }
|
||||
final: { # attributes }
|
||||
```
|
||||
|
||||
that has access to the unmodified input (`super`) as well as the final
|
||||
non-recursive representation of the attribute set (`self`). `extends`
|
||||
differs from the native `//` operator insofar as that it's applied *before*
|
||||
references to `self` are resolved:
|
||||
where `final` refers to the lazily evaluated attribute set returned by the fixed-point function.
|
||||
|
||||
```
|
||||
nix-repl> fix (extends g f)
|
||||
{ bar = "bar"; foo = "foo + "; foobar = "foo + bar"; }
|
||||
An overlay to such a fixed-point function has the form
|
||||
|
||||
```nix
|
||||
final: prev: { # attributes }
|
||||
```
|
||||
|
||||
The name of the function is inspired by object-oriented inheritance, i.e.
|
||||
think of it as an infix operator `g extends f` that mimics the syntax from
|
||||
Java. It may seem counter-intuitive to have the "base class" as the second
|
||||
argument, but it's nice this way if several uses of `extends` are cascaded.
|
||||
where `prev` refers to the result of the original function to `final`, and `final` is the result of the composition of the overlay and the original function.
|
||||
|
||||
To get a better understanding how `extends` turns a function with a fix
|
||||
point (the package set we start with) into a new function with a different fix
|
||||
point (the desired packages set) lets just see, how `extends g f`
|
||||
unfolds with `g` and `f` defined above:
|
||||
Applying an overlay is done with `extends`:
|
||||
|
||||
```nix
|
||||
let
|
||||
f = final: { # attributes };
|
||||
overlay = final: prev: { # attributes };
|
||||
in extends overlay f;
|
||||
```
|
||||
extends g f = self: let super = f self; in super // g self super;
|
||||
= self: let super = { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; }; in super // g self super
|
||||
= self: { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; } // g self { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; }
|
||||
= self: { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; } // { foo = "foo" + " + "; }
|
||||
= self: { foo = "foo + "; bar = "bar"; foobar = self.foo + self.bar; }
|
||||
|
||||
To get the value of `final`, use `lib.fix`:
|
||||
|
||||
```nix
|
||||
let
|
||||
f = final: { # attributes };
|
||||
overlay = final: prev: { # attributes };
|
||||
g = extends overlay f;
|
||||
in fix g
|
||||
```
|
||||
|
||||
:::{.example}
|
||||
|
||||
# Extend a fixed-point function with an overlay
|
||||
|
||||
Define a fixed-point function `f` that expects its own output as the argument `final`:
|
||||
|
||||
```nix-repl
|
||||
f = final: {
|
||||
# Constant value a
|
||||
a = 1;
|
||||
|
||||
# b depends on the final value of a, available as final.a
|
||||
b = final.a + 2;
|
||||
}
|
||||
```
|
||||
|
||||
Evaluate this using [`lib.fix`](#function-library-lib.fixedPoints.fix) to get the final result:
|
||||
|
||||
```nix-repl
|
||||
fix f
|
||||
=> { a = 1; b = 3; }
|
||||
```
|
||||
|
||||
An overlay represents a modification or extension of such a fixed-point function.
|
||||
Here's an example of an overlay:
|
||||
|
||||
```nix-repl
|
||||
overlay = final: prev: {
|
||||
# Modify the previous value of a, available as prev.a
|
||||
a = prev.a + 10;
|
||||
|
||||
# Extend the attribute set with c, letting it depend on the final values of a and b
|
||||
c = final.a + final.b;
|
||||
}
|
||||
```
|
||||
|
||||
Use `extends overlay f` to apply the overlay to the fixed-point function `f`.
|
||||
This produces a new fixed-point function `g` with the combined behavior of `f` and `overlay`:
|
||||
|
||||
```nix-repl
|
||||
g = extends overlay f
|
||||
```
|
||||
|
||||
The result is a function, so we can't print it directly, but it's the same as:
|
||||
|
||||
```nix-repl
|
||||
g' = final: {
|
||||
# The constant from f, but changed with the overlay
|
||||
a = 1 + 10;
|
||||
|
||||
# Unchanged from f
|
||||
b = final.a + 2;
|
||||
|
||||
# Extended in the overlay
|
||||
c = final.a + final.b;
|
||||
}
|
||||
```
|
||||
|
||||
Evaluate this using [`lib.fix`](#function-library-lib.fixedPoints.fix) again to get the final result:
|
||||
|
||||
```nix-repl
|
||||
fix g
|
||||
=> { a = 11; b = 13; c = 24; }
|
||||
```
|
||||
:::
|
||||
|
||||
Type:
|
||||
extends :: (Attrs -> Attrs -> Attrs) # The overlay to apply to the fixed-point function
|
||||
-> (Attrs -> Attrs) # A fixed-point function
|
||||
-> (Attrs -> Attrs) # The resulting fixed-point function
|
||||
|
||||
Example:
|
||||
f = final: { a = 1; b = final.a + 2; }
|
||||
|
||||
fix f
|
||||
=> { a = 1; b = 3; }
|
||||
|
||||
fix (extends (final: prev: { a = prev.a + 10; }) f)
|
||||
=> { a = 11; b = 13; }
|
||||
|
||||
fix (extends (final: prev: { b = final.a + 5; }) f)
|
||||
=> { a = 1; b = 6; }
|
||||
|
||||
fix (extends (final: prev: { c = final.a + final.b; }) f)
|
||||
=> { a = 1; b = 3; c = 4; }
|
||||
|
||||
:::{.note}
|
||||
The argument to the given fixed-point function after applying an overlay will *not* refer to its own return value, but rather to the value after evaluating the overlay function.
|
||||
|
||||
The given fixed-point function is called with a separate argument than if it was evaluated with `lib.fix`.
|
||||
The new argument
|
||||
:::
|
||||
*/
|
||||
extends = f: rattrs: self: let super = rattrs self; in super // f self super;
|
||||
extends =
|
||||
# The overlay to apply to the fixed-point function
|
||||
overlay:
|
||||
# The fixed-point function
|
||||
f:
|
||||
# Wrap with parenthesis to prevent nixdoc from rendering the `final` argument in the documentation
|
||||
# The result should be thought of as a function, the argument of that function is not an argument to `extends` itself
|
||||
(
|
||||
final:
|
||||
let
|
||||
prev = f final;
|
||||
in
|
||||
prev // overlay final prev
|
||||
);
|
||||
|
||||
/*
|
||||
Compose two extending functions of the type expected by 'extends'
|
||||
|
||||
@@ -917,12 +917,15 @@
|
||||
name = "Alma Cemerlic";
|
||||
};
|
||||
Alper-Celik = {
|
||||
email = "dev.alpercelik@gmail.com";
|
||||
email = "alper@alper-celik.dev";
|
||||
name = "Alper Çelik";
|
||||
github = "Alper-Celik";
|
||||
githubId = 110625473;
|
||||
keys = [{
|
||||
fingerprint = "6B69 19DD CEE0 FAF3 5C9F 2984 FA90 C0AB 738A B873";
|
||||
}
|
||||
{
|
||||
fingerprint = "DF68 C500 4024 23CC F9C5 E6CA 3D17 C832 4696 FE70";
|
||||
}];
|
||||
};
|
||||
alternateved = {
|
||||
@@ -2508,6 +2511,12 @@
|
||||
githubId = 5700358;
|
||||
name = "Thomas Blank";
|
||||
};
|
||||
blinry = {
|
||||
name = "blinry";
|
||||
email = "mail@blinry.org";
|
||||
github = "blinry";
|
||||
githubId = 81277;
|
||||
};
|
||||
blitz = {
|
||||
email = "js@alien8.de";
|
||||
matrix = "@js:ukvly.org";
|
||||
@@ -11902,6 +11911,12 @@
|
||||
github = "Mephistophiles";
|
||||
githubId = 4850908;
|
||||
};
|
||||
mevatron = {
|
||||
email = "mevatron@gmail.com";
|
||||
name = "mevatron";
|
||||
github = "mevatron";
|
||||
githubId = 714585;
|
||||
};
|
||||
mfossen = {
|
||||
email = "msfossen@gmail.com";
|
||||
github = "mfossen";
|
||||
@@ -14654,6 +14669,12 @@
|
||||
githubId = 610615;
|
||||
name = "Chih-Mao Chen";
|
||||
};
|
||||
pkosel = {
|
||||
name = "pkosel";
|
||||
email = "philipp.kosel@gmail.com";
|
||||
github = "pkosel";
|
||||
githubId = 170943;
|
||||
};
|
||||
pks = {
|
||||
email = "ps@pks.im";
|
||||
github = "pks-t";
|
||||
@@ -14988,6 +15009,12 @@
|
||||
githubId = 18549627;
|
||||
name = "Proglodyte";
|
||||
};
|
||||
proglottis = {
|
||||
email = "proglottis@gmail.com";
|
||||
github = "proglottis";
|
||||
githubId = 74465;
|
||||
name = "James Fargher";
|
||||
};
|
||||
progval = {
|
||||
email = "progval+nix@progval.net";
|
||||
github = "progval";
|
||||
@@ -15779,6 +15806,12 @@
|
||||
githubId = 7221768;
|
||||
name = "Andika Demas Riyandi";
|
||||
};
|
||||
rjpcasalino = {
|
||||
email = "ryan@rjpc.net";
|
||||
github = "rjpcasalino";
|
||||
githubId = 12821230;
|
||||
name = "Ryan J.P. Casalino";
|
||||
};
|
||||
rkitover = {
|
||||
email = "rkitover@gmail.com";
|
||||
github = "rkitover";
|
||||
@@ -18178,6 +18211,12 @@
|
||||
githubId = 2389333;
|
||||
name = "Andy Tockman";
|
||||
};
|
||||
teatwig = {
|
||||
email = "nix@teatwig.net";
|
||||
name = "tea";
|
||||
github = "teatwig";
|
||||
githubId = 18734648;
|
||||
};
|
||||
techknowlogick = {
|
||||
email = "techknowlogick@gitea.com";
|
||||
github = "techknowlogick";
|
||||
|
||||
@@ -7,7 +7,7 @@ binaryheap,,,,,,vcunat
|
||||
busted,,,,,,
|
||||
cassowary,,,,,,marsam alerque
|
||||
cldr,,,,,,alerque
|
||||
compat53,,,,0.7-1,,vcunat
|
||||
compat53,,,,,,vcunat
|
||||
cosmo,,,,,,marsam
|
||||
coxpcall,,,,1.17.0-1,,
|
||||
cqueues,,,,,,vcunat
|
||||
@@ -15,6 +15,7 @@ cyan,,,,,,
|
||||
digestif,https://github.com/astoff/digestif.git,,,,5.3,
|
||||
dkjson,,,,,,
|
||||
fennel,,,,,,misterio77
|
||||
fidget.nvim,,,,,,mrcjkb
|
||||
fifo,,,,,,
|
||||
fluent,,,,,,alerque
|
||||
fzy,,,,,,mrcjkb
|
||||
@@ -55,7 +56,7 @@ lua-subprocess,https://github.com/0x0ade/lua-subprocess,,,,5.1,scoder12
|
||||
lua-term,,,,,,
|
||||
lua-toml,,,,,,
|
||||
lua-zlib,,,,,,koral
|
||||
lua_cliargs,https://github.com/amireh/lua_cliargs.git,,,,,
|
||||
lua_cliargs,,,,,,
|
||||
luabitop,https://github.com/teto/luabitop.git,,,,,
|
||||
luacheck,,,,,,
|
||||
luacov,,,,,,
|
||||
@@ -86,7 +87,7 @@ luautf8,,,,,,pstn
|
||||
luazip,,,,,,
|
||||
lua-yajl,,,,,,pstn
|
||||
lua-iconv,,,,7.0.0,,
|
||||
luuid,,,,,,
|
||||
luuid,,,,20120509-2,,
|
||||
luv,,,,1.44.2-1,,
|
||||
lush.nvim,https://github.com/rktjmp/lush.nvim,,,,,teto
|
||||
lyaml,,,,,,lblasc
|
||||
|
||||
|
@@ -26,6 +26,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||
|
||||
- [maubot](https://github.com/maubot/maubot), a plugin-based Matrix bot framework. Available as [services.maubot](#opt-services.maubot.enable).
|
||||
|
||||
- systemd's gateway, upload, and remote services, which provides ways of sending journals across the network. Enable using [services.journald.gateway](#opt-services.journald.gateway.enable), [services.journald.upload](#opt-services.journald.upload.enable), and [services.journald.remote](#opt-services.journald.remote.enable).
|
||||
|
||||
- [GNS3](https://www.gns3.com/), a network software emulator. Available as [services.gns3-server](#opt-services.gns3-server.enable).
|
||||
|
||||
- [rspamd-trainer](https://gitlab.com/onlime/rspamd-trainer), script triggered by a helper which reads mails from a specific mail inbox and feeds them into rspamd for spam/ham training.
|
||||
@@ -49,9 +51,10 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
|
||||
|
||||
- The `power.ups` module now generates `upsd.conf`, `upsd.users` and `upsmon.conf` automatically from a set of new configuration options. This breaks compatibility with existing `power.ups` setups where these files were created manually. Back up these files before upgrading NixOS.
|
||||
|
||||
- `k9s` was updated to v0.30. There have been various breaking changes in the config file format,
|
||||
check out the changelog of [v0.29](https://github.com/derailed/k9s/releases/tag/v0.29.0) and
|
||||
[v0.30](https://github.com/derailed/k9s/releases/tag/v0.30.0) for details. It is recommended
|
||||
- `k9s` was updated to v0.31. There have been various breaking changes in the config file format,
|
||||
check out the changelog of [v0.29](https://github.com/derailed/k9s/releases/tag/v0.29.0),
|
||||
[v0.30](https://github.com/derailed/k9s/releases/tag/v0.30.0) and
|
||||
[v0.31](https://github.com/derailed/k9s/releases/tag/v0.31.0) for details. It is recommended
|
||||
to back up your current configuration and let k9s recreate the new base configuration.
|
||||
|
||||
- `idris2` was updated to v0.7.0. This version introduces breaking changes. Check out the [changelog](https://github.com/idris-lang/Idris2/blob/v0.7.0/CHANGELOG.md#v070) for details.
|
||||
@@ -65,6 +68,18 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
|
||||
- `mkosi` was updated to v19. Parts of the user interface have changed. Consult the
|
||||
[release notes](https://github.com/systemd/mkosi/releases/tag/v19) for a list of changes.
|
||||
|
||||
- `services.nginx` will no longer advertise HTTP/3 availability automatically. This must now be manually added, preferably to each location block.
|
||||
Example:
|
||||
|
||||
```nix
|
||||
locations."/".extraConfig = ''
|
||||
add_header Alt-Svc 'h3=":$server_port"; ma=86400';
|
||||
'';
|
||||
locations."^~ /assets/".extraConfig = ''
|
||||
add_header Alt-Svc 'h3=":$server_port"; ma=86400';
|
||||
'';
|
||||
|
||||
```
|
||||
- The `kanata` package has been updated to v1.5.0, which includes [breaking changes](https://github.com/jtroo/kanata/releases/tag/v1.5.0).
|
||||
|
||||
- The latest available version of Nextcloud is v28 (available as `pkgs.nextcloud28`). The installation logic is as follows:
|
||||
@@ -157,6 +172,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
|
||||
- `services.zfs.zed.enableMail` now uses the global `sendmail` wrapper defined by an email module
|
||||
(such as msmtp or Postfix). It no longer requires using a special ZFS build with email support.
|
||||
|
||||
- The `krb5` module has been rewritten and moved to `security.krb5`, moving all options but `security.krb5.enable` and `security.krb5.package` into `security.krb5.settings`.
|
||||
|
||||
- Gitea 1.21 upgrade has several breaking changes, including:
|
||||
- Custom themes and other assets that were previously stored in `custom/public/*` now belong in `custom/public/assets/*`
|
||||
- New instances of Gitea using MySQL now ignore the `[database].CHARSET` config option and always use the `utf8mb4` charset, existing instances should migrate via the `gitea doctor convert` CLI command.
|
||||
|
||||
@@ -120,7 +120,7 @@ in rec {
|
||||
{ meta.description = "List of NixOS options in JSON format";
|
||||
nativeBuildInputs = [
|
||||
pkgs.brotli
|
||||
pkgs.python3Minimal
|
||||
pkgs.python3
|
||||
];
|
||||
options = builtins.toFile "options.json"
|
||||
(builtins.unsafeDiscardStringContext (builtins.toJSON optionsNix));
|
||||
|
||||
@@ -18,7 +18,7 @@ python3Packages.buildPythonApplication {
|
||||
pname = "nixos-test-driver";
|
||||
version = "1.1";
|
||||
src = ./.;
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
coreutils
|
||||
@@ -32,6 +32,10 @@ python3Packages.buildPythonApplication {
|
||||
++ (lib.optionals enableOCR [ imagemagick_light tesseract4 ])
|
||||
++ extraPythonPackages python3Packages;
|
||||
|
||||
nativeBuildInputs = [
|
||||
python3Packages.setuptools
|
||||
];
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests.nixos-test-driver) driver-timeout;
|
||||
};
|
||||
|
||||
@@ -1,369 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.krb5;
|
||||
|
||||
# This is to provide support for old configuration options (as much as is
|
||||
# reasonable). This can be removed after 18.03 was released.
|
||||
defaultConfig = {
|
||||
libdefaults = optionalAttrs (cfg.defaultRealm != null)
|
||||
{ default_realm = cfg.defaultRealm; };
|
||||
|
||||
realms = optionalAttrs (lib.all (value: value != null) [
|
||||
cfg.defaultRealm cfg.kdc cfg.kerberosAdminServer
|
||||
]) {
|
||||
${cfg.defaultRealm} = {
|
||||
kdc = cfg.kdc;
|
||||
admin_server = cfg.kerberosAdminServer;
|
||||
};
|
||||
};
|
||||
|
||||
domain_realm = optionalAttrs (lib.all (value: value != null) [
|
||||
cfg.domainRealm cfg.defaultRealm
|
||||
]) {
|
||||
".${cfg.domainRealm}" = cfg.defaultRealm;
|
||||
${cfg.domainRealm} = cfg.defaultRealm;
|
||||
};
|
||||
};
|
||||
|
||||
mergedConfig = (recursiveUpdate defaultConfig {
|
||||
inherit (config.krb5)
|
||||
kerberos libdefaults realms domain_realm capaths appdefaults plugins
|
||||
extraConfig config;
|
||||
});
|
||||
|
||||
filterEmbeddedMetadata = value: if isAttrs value then
|
||||
(filterAttrs
|
||||
(attrName: attrValue: attrName != "_module" && attrValue != null)
|
||||
value)
|
||||
else value;
|
||||
|
||||
indent = " ";
|
||||
|
||||
mkRelation = name: value:
|
||||
if (isList value) then
|
||||
concatMapStringsSep "\n" (mkRelation name) value
|
||||
else "${name} = ${mkVal value}";
|
||||
|
||||
mkVal = value:
|
||||
if (value == true) then "true"
|
||||
else if (value == false) then "false"
|
||||
else if (isInt value) then (toString value)
|
||||
else if (isAttrs value) then
|
||||
let configLines = concatLists
|
||||
(map (splitString "\n")
|
||||
(mapAttrsToList mkRelation value));
|
||||
in
|
||||
(concatStringsSep "\n${indent}"
|
||||
([ "{" ] ++ configLines))
|
||||
+ "\n}"
|
||||
else value;
|
||||
|
||||
mkMappedAttrsOrString = value: concatMapStringsSep "\n"
|
||||
(line: if builtins.stringLength line > 0
|
||||
then "${indent}${line}"
|
||||
else line)
|
||||
(splitString "\n"
|
||||
(if isAttrs value then
|
||||
concatStringsSep "\n"
|
||||
(mapAttrsToList mkRelation value)
|
||||
else value));
|
||||
|
||||
in {
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
krb5 = {
|
||||
enable = mkEnableOption (lib.mdDoc "building krb5.conf, configuration file for Kerberos V");
|
||||
|
||||
kerberos = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.krb5;
|
||||
defaultText = literalExpression "pkgs.krb5";
|
||||
example = literalExpression "pkgs.heimdal";
|
||||
description = lib.mdDoc ''
|
||||
The Kerberos implementation that will be present in
|
||||
`environment.systemPackages` after enabling this
|
||||
service.
|
||||
'';
|
||||
};
|
||||
|
||||
libdefaults = mkOption {
|
||||
type = with types; either attrs lines;
|
||||
default = {};
|
||||
apply = attrs: filterEmbeddedMetadata attrs;
|
||||
example = literalExpression ''
|
||||
{
|
||||
default_realm = "ATHENA.MIT.EDU";
|
||||
};
|
||||
'';
|
||||
description = lib.mdDoc ''
|
||||
Settings used by the Kerberos V5 library.
|
||||
'';
|
||||
};
|
||||
|
||||
realms = mkOption {
|
||||
type = with types; either attrs lines;
|
||||
default = {};
|
||||
example = literalExpression ''
|
||||
{
|
||||
"ATHENA.MIT.EDU" = {
|
||||
admin_server = "athena.mit.edu";
|
||||
kdc = [
|
||||
"athena01.mit.edu"
|
||||
"athena02.mit.edu"
|
||||
];
|
||||
};
|
||||
};
|
||||
'';
|
||||
apply = attrs: filterEmbeddedMetadata attrs;
|
||||
description = lib.mdDoc "Realm-specific contact information and settings.";
|
||||
};
|
||||
|
||||
domain_realm = mkOption {
|
||||
type = with types; either attrs lines;
|
||||
default = {};
|
||||
example = literalExpression ''
|
||||
{
|
||||
"example.com" = "EXAMPLE.COM";
|
||||
".example.com" = "EXAMPLE.COM";
|
||||
};
|
||||
'';
|
||||
apply = attrs: filterEmbeddedMetadata attrs;
|
||||
description = lib.mdDoc ''
|
||||
Map of server hostnames to Kerberos realms.
|
||||
'';
|
||||
};
|
||||
|
||||
capaths = mkOption {
|
||||
type = with types; either attrs lines;
|
||||
default = {};
|
||||
example = literalExpression ''
|
||||
{
|
||||
"ATHENA.MIT.EDU" = {
|
||||
"EXAMPLE.COM" = ".";
|
||||
};
|
||||
"EXAMPLE.COM" = {
|
||||
"ATHENA.MIT.EDU" = ".";
|
||||
};
|
||||
};
|
||||
'';
|
||||
apply = attrs: filterEmbeddedMetadata attrs;
|
||||
description = lib.mdDoc ''
|
||||
Authentication paths for non-hierarchical cross-realm authentication.
|
||||
'';
|
||||
};
|
||||
|
||||
appdefaults = mkOption {
|
||||
type = with types; either attrs lines;
|
||||
default = {};
|
||||
example = literalExpression ''
|
||||
{
|
||||
pam = {
|
||||
debug = false;
|
||||
ticket_lifetime = 36000;
|
||||
renew_lifetime = 36000;
|
||||
max_timeout = 30;
|
||||
timeout_shift = 2;
|
||||
initial_timeout = 1;
|
||||
};
|
||||
};
|
||||
'';
|
||||
apply = attrs: filterEmbeddedMetadata attrs;
|
||||
description = lib.mdDoc ''
|
||||
Settings used by some Kerberos V5 applications.
|
||||
'';
|
||||
};
|
||||
|
||||
plugins = mkOption {
|
||||
type = with types; either attrs lines;
|
||||
default = {};
|
||||
example = literalExpression ''
|
||||
{
|
||||
ccselect = {
|
||||
disable = "k5identity";
|
||||
};
|
||||
};
|
||||
'';
|
||||
apply = attrs: filterEmbeddedMetadata attrs;
|
||||
description = lib.mdDoc ''
|
||||
Controls plugin module registration.
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = with types; nullOr lines;
|
||||
default = null;
|
||||
example = ''
|
||||
[logging]
|
||||
kdc = SYSLOG:NOTICE
|
||||
admin_server = SYSLOG:NOTICE
|
||||
default = SYSLOG:NOTICE
|
||||
'';
|
||||
description = lib.mdDoc ''
|
||||
These lines go to the end of `krb5.conf` verbatim.
|
||||
`krb5.conf` may include any of the relations that are
|
||||
valid for `kdc.conf` (see `man kdc.conf`),
|
||||
but it is not a recommended practice.
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkOption {
|
||||
type = with types; nullOr lines;
|
||||
default = null;
|
||||
example = ''
|
||||
[libdefaults]
|
||||
default_realm = EXAMPLE.COM
|
||||
|
||||
[realms]
|
||||
EXAMPLE.COM = {
|
||||
admin_server = kerberos.example.com
|
||||
kdc = kerberos.example.com
|
||||
default_principal_flags = +preauth
|
||||
}
|
||||
|
||||
[domain_realm]
|
||||
example.com = EXAMPLE.COM
|
||||
.example.com = EXAMPLE.COM
|
||||
|
||||
[logging]
|
||||
kdc = SYSLOG:NOTICE
|
||||
admin_server = SYSLOG:NOTICE
|
||||
default = SYSLOG:NOTICE
|
||||
'';
|
||||
description = lib.mdDoc ''
|
||||
Verbatim `krb5.conf` configuration. Note that this
|
||||
is mutually exclusive with configuration via
|
||||
`libdefaults`, `realms`,
|
||||
`domain_realm`, `capaths`,
|
||||
`appdefaults`, `plugins` and
|
||||
`extraConfig` configuration options. Consult
|
||||
`man krb5.conf` for documentation.
|
||||
'';
|
||||
};
|
||||
|
||||
defaultRealm = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
example = "ATHENA.MIT.EDU";
|
||||
description = lib.mdDoc ''
|
||||
DEPRECATED, please use
|
||||
`krb5.libdefaults.default_realm`.
|
||||
'';
|
||||
};
|
||||
|
||||
domainRealm = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
example = "athena.mit.edu";
|
||||
description = lib.mdDoc ''
|
||||
DEPRECATED, please create a map of server hostnames to Kerberos realms
|
||||
in `krb5.domain_realm`.
|
||||
'';
|
||||
};
|
||||
|
||||
kdc = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
example = "kerberos.mit.edu";
|
||||
description = lib.mdDoc ''
|
||||
DEPRECATED, please pass a `kdc` attribute to a realm
|
||||
in `krb5.realms`.
|
||||
'';
|
||||
};
|
||||
|
||||
kerberosAdminServer = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
example = "kerberos.mit.edu";
|
||||
description = lib.mdDoc ''
|
||||
DEPRECATED, please pass an `admin_server` attribute
|
||||
to a realm in `krb5.realms`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ cfg.kerberos ];
|
||||
|
||||
environment.etc."krb5.conf".text = if isString cfg.config
|
||||
then cfg.config
|
||||
else (''
|
||||
[libdefaults]
|
||||
${mkMappedAttrsOrString mergedConfig.libdefaults}
|
||||
|
||||
[realms]
|
||||
${mkMappedAttrsOrString mergedConfig.realms}
|
||||
|
||||
[domain_realm]
|
||||
${mkMappedAttrsOrString mergedConfig.domain_realm}
|
||||
|
||||
[capaths]
|
||||
${mkMappedAttrsOrString mergedConfig.capaths}
|
||||
|
||||
[appdefaults]
|
||||
${mkMappedAttrsOrString mergedConfig.appdefaults}
|
||||
|
||||
[plugins]
|
||||
${mkMappedAttrsOrString mergedConfig.plugins}
|
||||
'' + optionalString (mergedConfig.extraConfig != null)
|
||||
("\n" + mergedConfig.extraConfig));
|
||||
|
||||
warnings = flatten [
|
||||
(optional (cfg.defaultRealm != null) ''
|
||||
The option krb5.defaultRealm is deprecated, please use
|
||||
krb5.libdefaults.default_realm.
|
||||
'')
|
||||
(optional (cfg.domainRealm != null) ''
|
||||
The option krb5.domainRealm is deprecated, please use krb5.domain_realm.
|
||||
'')
|
||||
(optional (cfg.kdc != null) ''
|
||||
The option krb5.kdc is deprecated, please pass a kdc attribute to a
|
||||
realm in krb5.realms.
|
||||
'')
|
||||
(optional (cfg.kerberosAdminServer != null) ''
|
||||
The option krb5.kerberosAdminServer is deprecated, please pass an
|
||||
admin_server attribute to a realm in krb5.realms.
|
||||
'')
|
||||
];
|
||||
|
||||
assertions = [
|
||||
{ assertion = !((builtins.any (value: value != null) [
|
||||
cfg.defaultRealm cfg.domainRealm cfg.kdc cfg.kerberosAdminServer
|
||||
]) && ((builtins.any (value: value != {}) [
|
||||
cfg.libdefaults cfg.realms cfg.domain_realm cfg.capaths
|
||||
cfg.appdefaults cfg.plugins
|
||||
]) || (builtins.any (value: value != null) [
|
||||
cfg.config cfg.extraConfig
|
||||
])));
|
||||
message = ''
|
||||
Configuration of krb5.conf by deprecated options is mutually exclusive
|
||||
with configuration by section. Please migrate your config using the
|
||||
attributes suggested in the warnings.
|
||||
'';
|
||||
}
|
||||
{ assertion = !(cfg.config != null
|
||||
&& ((builtins.any (value: value != {}) [
|
||||
cfg.libdefaults cfg.realms cfg.domain_realm cfg.capaths
|
||||
cfg.appdefaults cfg.plugins
|
||||
]) || (builtins.any (value: value != null) [
|
||||
cfg.extraConfig cfg.defaultRealm cfg.domainRealm cfg.kdc
|
||||
cfg.kerberosAdminServer
|
||||
])));
|
||||
message = ''
|
||||
Configuration of krb5.conf using krb.config is mutually exclusive with
|
||||
configuration by section. If you want to mix the two, you can pass
|
||||
lines to any configuration section or lines to krb5.extraConfig.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -13,11 +13,12 @@ in
|
||||
enable = mkEnableOption (lib.mdDoc "support for Intel IPU6/MIPI cameras");
|
||||
|
||||
platform = mkOption {
|
||||
type = types.enum [ "ipu6" "ipu6ep" ];
|
||||
type = types.enum [ "ipu6" "ipu6ep" "ipu6epmtl" ];
|
||||
description = lib.mdDoc ''
|
||||
Choose the version for your hardware platform.
|
||||
|
||||
Use `ipu6` for Tiger Lake and `ipu6ep` for Alder Lake respectively.
|
||||
Use `ipu6` for Tiger Lake, `ipu6ep` for Alder Lake or Raptor Lake,
|
||||
and `ipu6epmtl` for Meteor Lake.
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -29,9 +30,7 @@ in
|
||||
ipu6-drivers
|
||||
];
|
||||
|
||||
hardware.firmware = with pkgs; [ ]
|
||||
++ optional (cfg.platform == "ipu6") ipu6-camera-bin
|
||||
++ optional (cfg.platform == "ipu6ep") ipu6ep-camera-bin;
|
||||
hardware.firmware = [ pkgs.ipu6-camera-bins ];
|
||||
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="intel-ipu6-psys", MODE="0660", GROUP="video"
|
||||
@@ -44,14 +43,13 @@ in
|
||||
|
||||
extraPackages = with pkgs.gst_all_1; [ ]
|
||||
++ optional (cfg.platform == "ipu6") icamerasrc-ipu6
|
||||
++ optional (cfg.platform == "ipu6ep") icamerasrc-ipu6ep;
|
||||
++ optional (cfg.platform == "ipu6ep") icamerasrc-ipu6ep
|
||||
++ optional (cfg.platform == "ipu6epmtl") icamerasrc-ipu6epmtl;
|
||||
|
||||
input = {
|
||||
pipeline = "icamerasrc";
|
||||
format = mkIf (cfg.platform == "ipu6ep") (mkDefault "NV12");
|
||||
format = mkIf (cfg.platform != "ipu6") (mkDefault "NV12");
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
./config/gtk/gtk-icon-cache.nix
|
||||
./config/i18n.nix
|
||||
./config/iproute2.nix
|
||||
./config/krb5/default.nix
|
||||
./config/ldap.nix
|
||||
./config/ldso.nix
|
||||
./config/locale.nix
|
||||
@@ -309,6 +308,7 @@
|
||||
./security/duosec.nix
|
||||
./security/google_oslogin.nix
|
||||
./security/ipa.nix
|
||||
./security/krb5
|
||||
./security/lock-kernel-modules.nix
|
||||
./security/misc.nix
|
||||
./security/oath.nix
|
||||
@@ -1476,6 +1476,9 @@
|
||||
./system/boot/systemd/initrd-secrets.nix
|
||||
./system/boot/systemd/initrd.nix
|
||||
./system/boot/systemd/journald.nix
|
||||
./system/boot/systemd/journald-gateway.nix
|
||||
./system/boot/systemd/journald-remote.nix
|
||||
./system/boot/systemd/journald-upload.nix
|
||||
./system/boot/systemd/logind.nix
|
||||
./system/boot/systemd/nspawn.nix
|
||||
./system/boot/systemd/oomd.nix
|
||||
|
||||
@@ -61,7 +61,12 @@ in
|
||||
};
|
||||
enableSuid = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
# SingularityCE requires SETUID for most things. Apptainer prefers user
|
||||
# namespaces, e.g. `apptainer exec --nv` would fail if built
|
||||
# `--with-suid`:
|
||||
# > `FATAL: nvidia-container-cli not allowed in setuid mode`
|
||||
default = cfg.package.projectName != "apptainer";
|
||||
defaultText = literalExpression ''config.services.singularity.package.projectName != "apptainer"'';
|
||||
example = false;
|
||||
description = mdDoc ''
|
||||
Whether to enable the SUID support of Singularity/Apptainer.
|
||||
|
||||
@@ -117,8 +117,8 @@ in {
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = !config.krb5.enable;
|
||||
message = "krb5 must be disabled through `krb5.enable` for FreeIPA integration to work.";
|
||||
assertion = !config.security.krb5.enable;
|
||||
message = "krb5 must be disabled through `security.krb5.enable` for FreeIPA integration to work.";
|
||||
}
|
||||
{
|
||||
assertion = !config.users.ldap.enable;
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib) mdDoc mkIf mkOption mkPackageOption mkRemovedOptionModule;
|
||||
inherit (lib.types) bool;
|
||||
|
||||
mkRemovedOptionModule' = name: reason: mkRemovedOptionModule ["krb5" name] reason;
|
||||
mkRemovedOptionModuleCfg = name: mkRemovedOptionModule' name ''
|
||||
The option `krb5.${name}' has been removed. Use
|
||||
`security.krb5.settings.${name}' for structured configuration.
|
||||
'';
|
||||
|
||||
cfg = config.security.krb5;
|
||||
format = import ./krb5-conf-format.nix { inherit pkgs lib; } { };
|
||||
in {
|
||||
imports = [
|
||||
(mkRemovedOptionModuleCfg "libdefaults")
|
||||
(mkRemovedOptionModuleCfg "realms")
|
||||
(mkRemovedOptionModuleCfg "domain_realm")
|
||||
(mkRemovedOptionModuleCfg "capaths")
|
||||
(mkRemovedOptionModuleCfg "appdefaults")
|
||||
(mkRemovedOptionModuleCfg "plugins")
|
||||
(mkRemovedOptionModuleCfg "config")
|
||||
(mkRemovedOptionModuleCfg "extraConfig")
|
||||
(mkRemovedOptionModule' "kerberos" ''
|
||||
The option `krb5.kerberos' has been moved to `security.krb5.package'.
|
||||
'')
|
||||
];
|
||||
|
||||
options = {
|
||||
security.krb5 = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = mdDoc "Enable and configure Kerberos utilities";
|
||||
type = bool;
|
||||
};
|
||||
|
||||
package = mkPackageOption pkgs "krb5" {
|
||||
example = "heimdal";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
default = { };
|
||||
type = format.type;
|
||||
description = mdDoc ''
|
||||
Structured contents of the {file}`krb5.conf` file. See
|
||||
{manpage}`krb5.conf(5)` for details about configuration.
|
||||
'';
|
||||
example = {
|
||||
include = [ "/run/secrets/secret-krb5.conf" ];
|
||||
includedir = [ "/run/secrets/secret-krb5.conf.d" ];
|
||||
|
||||
libdefaults = {
|
||||
default_realm = "ATHENA.MIT.EDU";
|
||||
};
|
||||
|
||||
realms = {
|
||||
"ATHENA.MIT.EDU" = {
|
||||
admin_server = "athena.mit.edu";
|
||||
kdc = [
|
||||
"athena01.mit.edu"
|
||||
"athena02.mit.edu"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
domain_realm = {
|
||||
"mit.edu" = "ATHENA.MIT.EDU";
|
||||
};
|
||||
|
||||
logging = {
|
||||
kdc = "SYSLOG:NOTICE";
|
||||
admin_server = "SYSLOG:NOTICE";
|
||||
default = "SYSLOG:NOTICE";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment = {
|
||||
systemPackages = [ cfg.package ];
|
||||
etc."krb5.conf".source = format.generate "krb5.conf" cfg.settings;
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = builtins.attrValues {
|
||||
inherit (lib.maintainers) dblsaiko h7x4;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
# Based on
|
||||
# - https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html
|
||||
# - https://manpages.debian.org/unstable/heimdal-docs/krb5.conf.5heimdal.en.html
|
||||
|
||||
let
|
||||
inherit (lib) boolToString concatMapStringsSep concatStringsSep filter
|
||||
isAttrs isBool isList mapAttrsToList mdDoc mkOption singleton splitString;
|
||||
inherit (lib.types) attrsOf bool coercedTo either int listOf oneOf path
|
||||
str submodule;
|
||||
in
|
||||
{ }: {
|
||||
type = let
|
||||
section = attrsOf relation;
|
||||
relation = either (attrsOf value) value;
|
||||
value = either (listOf atom) atom;
|
||||
atom = oneOf [int str bool];
|
||||
in submodule {
|
||||
freeformType = attrsOf section;
|
||||
options = {
|
||||
include = mkOption {
|
||||
default = [ ];
|
||||
description = mdDoc ''
|
||||
Files to include in the Kerberos configuration.
|
||||
'';
|
||||
type = coercedTo path singleton (listOf path);
|
||||
};
|
||||
includedir = mkOption {
|
||||
default = [ ];
|
||||
description = mdDoc ''
|
||||
Directories containing files to include in the Kerberos configuration.
|
||||
'';
|
||||
type = coercedTo path singleton (listOf path);
|
||||
};
|
||||
module = mkOption {
|
||||
default = [ ];
|
||||
description = mdDoc ''
|
||||
Modules to obtain Kerberos configuration from.
|
||||
'';
|
||||
type = coercedTo path singleton (listOf path);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
generate = let
|
||||
indent = str: concatMapStringsSep "\n" (line: " " + line) (splitString "\n" str);
|
||||
|
||||
formatToplevel = args @ {
|
||||
include ? [ ],
|
||||
includedir ? [ ],
|
||||
module ? [ ],
|
||||
...
|
||||
}: let
|
||||
sections = removeAttrs args [ "include" "includedir" "module" ];
|
||||
in concatStringsSep "\n" (filter (x: x != "") [
|
||||
(concatStringsSep "\n" (mapAttrsToList formatSection sections))
|
||||
(concatMapStringsSep "\n" (m: "module ${m}") module)
|
||||
(concatMapStringsSep "\n" (i: "include ${i}") include)
|
||||
(concatMapStringsSep "\n" (i: "includedir ${i}") includedir)
|
||||
]);
|
||||
|
||||
formatSection = name: section: ''
|
||||
[${name}]
|
||||
${indent (concatStringsSep "\n" (mapAttrsToList formatRelation section))}
|
||||
'';
|
||||
|
||||
formatRelation = name: relation:
|
||||
if isAttrs relation
|
||||
then ''
|
||||
${name} = {
|
||||
${indent (concatStringsSep "\n" (mapAttrsToList formatValue relation))}
|
||||
}''
|
||||
else formatValue name relation;
|
||||
|
||||
formatValue = name: value:
|
||||
if isList value
|
||||
then concatMapStringsSep "\n" (formatAtom name) value
|
||||
else formatAtom name value;
|
||||
|
||||
formatAtom = name: atom: let
|
||||
v = if isBool atom then boolToString atom else toString atom;
|
||||
in "${name} = ${v}";
|
||||
in
|
||||
name: value: pkgs.writeText name ''
|
||||
${formatToplevel value}
|
||||
'';
|
||||
}
|
||||
@@ -1086,8 +1086,8 @@ in
|
||||
|
||||
security.pam.krb5 = {
|
||||
enable = mkOption {
|
||||
default = config.krb5.enable;
|
||||
defaultText = literalExpression "config.krb5.enable";
|
||||
default = config.security.krb5.enable;
|
||||
defaultText = literalExpression "config.security.krb5.enable";
|
||||
type = types.bool;
|
||||
description = lib.mdDoc ''
|
||||
Enables Kerberos PAM modules (`pam-krb5`,
|
||||
@@ -1095,7 +1095,7 @@ in
|
||||
|
||||
If set, users can authenticate with their Kerberos password.
|
||||
This requires a valid Kerberos configuration
|
||||
(`config.krb5.enable` should be set to
|
||||
(`config.security.krb5.enable` should be set to
|
||||
`true`).
|
||||
|
||||
Note that the Kerberos PAM modules are not necessary when using SSS
|
||||
|
||||
@@ -117,6 +117,7 @@ in
|
||||
services.pgadmin.settings = {
|
||||
DEFAULT_SERVER_PORT = cfg.port;
|
||||
SERVER_MODE = true;
|
||||
UPGRADE_CHECK_ENABLED = false;
|
||||
} // (optionalAttrs cfg.openFirewall {
|
||||
DEFAULT_SERVER = mkDefault "::";
|
||||
}) // (optionalAttrs cfg.emailServer.enable {
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib) any attrValues concatMapStringsSep concatStrings
|
||||
concatStringsSep flatten imap1 isList literalExpression mapAttrsToList
|
||||
mkEnableOption mkIf mkOption mkRemovedOptionModule optional optionalAttrs
|
||||
optionalString singleton types;
|
||||
|
||||
cfg = config.services.dovecot2;
|
||||
dovecotPkg = pkgs.dovecot;
|
||||
|
||||
@@ -113,6 +116,36 @@ let
|
||||
''
|
||||
)
|
||||
|
||||
''
|
||||
plugin {
|
||||
sieve_plugins = ${concatStringsSep " " cfg.sieve.plugins}
|
||||
sieve_extensions = ${concatStringsSep " " (map (el: "+${el}") cfg.sieve.extensions)}
|
||||
sieve_global_extensions = ${concatStringsSep " " (map (el: "+${el}") cfg.sieve.globalExtensions)}
|
||||
''
|
||||
(optionalString (cfg.imapsieve.mailbox != []) ''
|
||||
${
|
||||
concatStringsSep "\n" (flatten (imap1 (
|
||||
idx: el:
|
||||
singleton "imapsieve_mailbox${toString idx}_name = ${el.name}"
|
||||
++ optional (el.from != null) "imapsieve_mailbox${toString idx}_from = ${el.from}"
|
||||
++ optional (el.causes != null) "imapsieve_mailbox${toString idx}_causes = ${el.causes}"
|
||||
++ optional (el.before != null) "imapsieve_mailbox${toString idx}_before = file:${stateDir}/imapsieve/before/${baseNameOf el.before}"
|
||||
++ optional (el.after != null) "imapsieve_mailbox${toString idx}_after = file:${stateDir}/imapsieve/after/${baseNameOf el.after}"
|
||||
)
|
||||
cfg.imapsieve.mailbox))
|
||||
}
|
||||
'')
|
||||
(optionalString (cfg.sieve.pipeBins != []) ''
|
||||
sieve_pipe_bin_dir = ${pkgs.linkFarm "sieve-pipe-bins" (map (el: {
|
||||
name = builtins.unsafeDiscardStringContext (baseNameOf el);
|
||||
path = el;
|
||||
})
|
||||
cfg.sieve.pipeBins)}
|
||||
'')
|
||||
''
|
||||
}
|
||||
''
|
||||
|
||||
cfg.extraConfig
|
||||
];
|
||||
|
||||
@@ -343,6 +376,104 @@ in
|
||||
description = lib.mdDoc "Quota limit for the user in bytes. Supports suffixes b, k, M, G, T and %.";
|
||||
};
|
||||
|
||||
imapsieve.mailbox = mkOption {
|
||||
default = [];
|
||||
description = "Configure Sieve filtering rules on IMAP actions";
|
||||
type = types.listOf (types.submodule ({ config, ... }: {
|
||||
options = {
|
||||
name = mkOption {
|
||||
description = ''
|
||||
This setting configures the name of a mailbox for which administrator scripts are configured.
|
||||
|
||||
The settings defined hereafter with matching sequence numbers apply to the mailbox named by this setting.
|
||||
|
||||
This setting supports wildcards with a syntax compatible with the IMAP LIST command, meaning that this setting can apply to multiple or even all ("*") mailboxes.
|
||||
'';
|
||||
example = "Junk";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
from = mkOption {
|
||||
default = null;
|
||||
description = ''
|
||||
Only execute the administrator Sieve scripts for the mailbox configured with services.dovecot2.imapsieve.mailbox.<name>.name when the message originates from the indicated mailbox.
|
||||
|
||||
This setting supports wildcards with a syntax compatible with the IMAP LIST command, meaning that this setting can apply to multiple or even all ("*") mailboxes.
|
||||
'';
|
||||
example = "*";
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
|
||||
causes = mkOption {
|
||||
default = null;
|
||||
description = ''
|
||||
Only execute the administrator Sieve scripts for the mailbox configured with services.dovecot2.imapsieve.mailbox.<name>.name when one of the listed IMAPSIEVE causes apply.
|
||||
|
||||
This has no effect on the user script, which is always executed no matter the cause.
|
||||
'';
|
||||
example = "COPY";
|
||||
type = types.nullOr (types.enum [ "APPEND" "COPY" "FLAG" ]);
|
||||
};
|
||||
|
||||
before = mkOption {
|
||||
default = null;
|
||||
description = ''
|
||||
When an IMAP event of interest occurs, this sieve script is executed before any user script respectively.
|
||||
|
||||
This setting each specify the location of a single sieve script. The semantics of this setting is similar to sieve_before: the specified scripts form a sequence together with the user script in which the next script is only executed when an (implicit) keep action is executed.
|
||||
'';
|
||||
example = literalExpression "./report-spam.sieve";
|
||||
type = types.nullOr types.path;
|
||||
};
|
||||
|
||||
after = mkOption {
|
||||
default = null;
|
||||
description = ''
|
||||
When an IMAP event of interest occurs, this sieve script is executed after any user script respectively.
|
||||
|
||||
This setting each specify the location of a single sieve script. The semantics of this setting is similar to sieve_after: the specified scripts form a sequence together with the user script in which the next script is only executed when an (implicit) keep action is executed.
|
||||
'';
|
||||
example = literalExpression "./report-spam.sieve";
|
||||
type = types.nullOr types.path;
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
|
||||
sieve = {
|
||||
plugins = mkOption {
|
||||
default = [];
|
||||
example = [ "sieve_extprograms" ];
|
||||
description = "Sieve plugins to load";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
extensions = mkOption {
|
||||
default = [];
|
||||
description = "Sieve extensions for use in user scripts";
|
||||
example = [ "notify" "imapflags" "vnd.dovecot.filter" ];
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
globalExtensions = mkOption {
|
||||
default = [];
|
||||
example = [ "vnd.dovecot.environment" ];
|
||||
description = "Sieve extensions for use in global scripts";
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
|
||||
pipeBins = mkOption {
|
||||
default = [];
|
||||
example = literalExpression ''
|
||||
map lib.getExe [
|
||||
(pkgs.writeShellScriptBin "learn-ham.sh" "exec ''${pkgs.rspamd}/bin/rspamc learn_ham")
|
||||
(pkgs.writeShellScriptBin "learn-spam.sh" "exec ''${pkgs.rspamd}/bin/rspamc learn_spam")
|
||||
]
|
||||
'';
|
||||
description = "Programs available for use by the vnd.dovecot.pipe extension";
|
||||
type = types.listOf types.path;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -353,14 +484,23 @@ in
|
||||
enable = true;
|
||||
params.dovecot2 = {};
|
||||
};
|
||||
services.dovecot2.protocols =
|
||||
optional cfg.enableImap "imap"
|
||||
++ optional cfg.enablePop3 "pop3"
|
||||
++ optional cfg.enableLmtp "lmtp";
|
||||
|
||||
services.dovecot2.mailPlugins = mkIf cfg.enableQuota {
|
||||
globally.enable = [ "quota" ];
|
||||
perProtocol.imap.enable = [ "imap_quota" ];
|
||||
services.dovecot2 = {
|
||||
protocols =
|
||||
optional cfg.enableImap "imap"
|
||||
++ optional cfg.enablePop3 "pop3"
|
||||
++ optional cfg.enableLmtp "lmtp";
|
||||
|
||||
mailPlugins = mkIf cfg.enableQuota {
|
||||
globally.enable = [ "quota" ];
|
||||
perProtocol.imap.enable = [ "imap_quota" ];
|
||||
};
|
||||
|
||||
sieve.plugins =
|
||||
optional (cfg.imapsieve.mailbox != []) "sieve_imapsieve"
|
||||
++ optional (cfg.sieve.pipeBins != []) "sieve_extprograms";
|
||||
|
||||
sieve.globalExtensions = optional (cfg.sieve.pipeBins != []) "vnd.dovecot.pipe";
|
||||
};
|
||||
|
||||
users.users = {
|
||||
@@ -415,7 +555,7 @@ in
|
||||
# (should be 0) so that the compiled sieve script is newer than
|
||||
# the source file and Dovecot won't try to compile it.
|
||||
preStart = ''
|
||||
rm -rf ${stateDir}/sieve
|
||||
rm -rf ${stateDir}/sieve ${stateDir}/imapsieve
|
||||
'' + optionalString (cfg.sieveScripts != {}) ''
|
||||
mkdir -p ${stateDir}/sieve
|
||||
${concatStringsSep "\n" (
|
||||
@@ -432,6 +572,29 @@ in
|
||||
) cfg.sieveScripts
|
||||
)}
|
||||
chown -R '${cfg.mailUser}:${cfg.mailGroup}' '${stateDir}/sieve'
|
||||
''
|
||||
+ optionalString (cfg.imapsieve.mailbox != []) ''
|
||||
mkdir -p ${stateDir}/imapsieve/{before,after}
|
||||
|
||||
${
|
||||
concatMapStringsSep "\n"
|
||||
(el:
|
||||
optionalString (el.before != null) ''
|
||||
cp -p ${el.before} ${stateDir}/imapsieve/before/${baseNameOf el.before}
|
||||
${pkgs.dovecot_pigeonhole}/bin/sievec '${stateDir}/imapsieve/before/${baseNameOf el.before}'
|
||||
''
|
||||
+ optionalString (el.after != null) ''
|
||||
cp -p ${el.after} ${stateDir}/imapsieve/after/${baseNameOf el.after}
|
||||
${pkgs.dovecot_pigeonhole}/bin/sievec '${stateDir}/imapsieve/after/${baseNameOf el.after}'
|
||||
''
|
||||
)
|
||||
cfg.imapsieve.mailbox
|
||||
}
|
||||
|
||||
${
|
||||
optionalString (cfg.mailUser != null && cfg.mailGroup != null)
|
||||
"chown -R '${cfg.mailUser}:${cfg.mailGroup}' '${stateDir}/imapsieve'"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -459,4 +622,5 @@ in
|
||||
|
||||
};
|
||||
|
||||
meta.maintainers = [ lib.maintainers.dblsaiko ];
|
||||
}
|
||||
|
||||
@@ -27,13 +27,7 @@ let
|
||||
encoding = "utf8";
|
||||
pool = cfg.databasePool;
|
||||
} // cfg.extraDatabaseConfig;
|
||||
in if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.9" then {
|
||||
production.main = val;
|
||||
# Starting with GitLab 15.9, single connections were deprecated and will be
|
||||
# removed in GitLab 17.0. The CI connection however requires database_tasks set
|
||||
# to false.
|
||||
production.ci = val // { database_tasks = false; };
|
||||
} else if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.0" then {
|
||||
in if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.0" then {
|
||||
production.main = val;
|
||||
} else {
|
||||
production = val;
|
||||
@@ -1354,7 +1348,7 @@ in {
|
||||
fi
|
||||
|
||||
jq <${pkgs.writeText "database.yml" (builtins.toJSON databaseConfig)} \
|
||||
'.${if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.0" then "production.main" else "production"}.password = $ENV.db_password ${if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.9" then "| .production.ci.password = $ENV.db_password | .production.main as $main | del(.production.main) | .production |= {main: $main} + ." else ""}' \
|
||||
'.${if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.0" then "production.main" else "production"}.password = $ENV.db_password' \
|
||||
>'${cfg.statePath}/config/database.yml'
|
||||
''
|
||||
else ''
|
||||
|
||||
@@ -206,7 +206,15 @@ in {
|
||||
description = "Real time performance monitoring";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = (with pkgs; [ curl gawk iproute2 which procps bash ])
|
||||
path = (with pkgs; [
|
||||
curl
|
||||
gawk
|
||||
iproute2
|
||||
which
|
||||
procps
|
||||
bash
|
||||
util-linux # provides logger command; required for syslog health alarms
|
||||
])
|
||||
++ lib.optional cfg.python.enable (pkgs.python3.withPackages cfg.python.extraPackages)
|
||||
++ lib.optional config.virtualisation.libvirtd.enable (config.virtualisation.libvirtd.package);
|
||||
environment = {
|
||||
|
||||
@@ -282,8 +282,9 @@ in
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
environment.variables.IPFS_PATH = fakeKuboRepo;
|
||||
|
||||
# https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size
|
||||
# https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes
|
||||
boot.kernel.sysctl."net.core.rmem_max" = mkDefault 2500000;
|
||||
boot.kernel.sysctl."net.core.wmem_max" = mkDefault 2500000;
|
||||
|
||||
programs.fuse = mkIf cfg.autoMount {
|
||||
userAllowOther = true;
|
||||
|
||||
@@ -273,17 +273,17 @@ in
|
||||
|
||||
system.nssModules = optional (cfg.nssmdns4 || cfg.nssmdns6) pkgs.nssmdns;
|
||||
system.nssDatabases.hosts = let
|
||||
mdnsMinimal = if (cfg.nssmdns4 && cfg.nssmdns6) then
|
||||
"mdns_minimal"
|
||||
mdns = if (cfg.nssmdns4 && cfg.nssmdns6) then
|
||||
"mdns"
|
||||
else if (!cfg.nssmdns4 && cfg.nssmdns6) then
|
||||
"mdns6_minimal"
|
||||
"mdns6"
|
||||
else if (cfg.nssmdns4 && !cfg.nssmdns6) then
|
||||
"mdns4_minimal"
|
||||
"mdns4"
|
||||
else
|
||||
"";
|
||||
in optionals (cfg.nssmdns4 || cfg.nssmdns6) (mkMerge [
|
||||
(mkBefore [ "${mdnsMinimal} [NOTFOUND=return]" ]) # before resolve
|
||||
(mkAfter [ "mdns" ]) # after dns
|
||||
(mkBefore [ "${mdns}_minimal [NOTFOUND=return]" ]) # before resolve
|
||||
(mkAfter [ "${mdns}" ]) # after dns
|
||||
]);
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
let
|
||||
inherit (lib) mkOption mkIf types length attrNames;
|
||||
cfg = config.services.kerberos_server;
|
||||
kerberos = config.krb5.kerberos;
|
||||
kerberos = config.security.krb5.package;
|
||||
|
||||
aclEntry = {
|
||||
options = {
|
||||
|
||||
@@ -4,7 +4,7 @@ let
|
||||
inherit (lib) mkIf concatStringsSep concatMapStrings toList mapAttrs
|
||||
mapAttrsToList;
|
||||
cfg = config.services.kerberos_server;
|
||||
kerberos = config.krb5.kerberos;
|
||||
kerberos = config.security.krb5.package;
|
||||
stateDir = "/var/heimdal";
|
||||
aclFiles = mapAttrs
|
||||
(name: {acl, ...}: pkgs.writeText "${name}.acl" (concatMapStrings ((
|
||||
|
||||
@@ -4,7 +4,7 @@ let
|
||||
inherit (lib) mkIf concatStrings concatStringsSep concatMapStrings toList
|
||||
mapAttrs mapAttrsToList;
|
||||
cfg = config.services.kerberos_server;
|
||||
kerberos = config.krb5.kerberos;
|
||||
kerberos = config.security.krb5.package;
|
||||
stateDir = "/var/lib/krb5kdc";
|
||||
PIDFile = "/run/kdc.pid";
|
||||
aclMap = {
|
||||
|
||||
@@ -122,62 +122,8 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
# The current implementations of `doRename`, `mkRenamedOptionModule` do not provide the full options path when used with submodules.
|
||||
# They would only show `settings.useacl' instead of `services.dokuwiki.sites."site1.local".settings.useacl'
|
||||
# The partial re-implementation of these functions is done to help users in debugging by showing the full path.
|
||||
mkRenamed = from: to: { config, options, name, ... }: let
|
||||
pathPrefix = [ "services" "dokuwiki" "sites" name ];
|
||||
fromPath = pathPrefix ++ from;
|
||||
fromOpt = getAttrFromPath from options;
|
||||
toOp = getAttrsFromPath to config;
|
||||
toPath = pathPrefix ++ to;
|
||||
in {
|
||||
options = setAttrByPath from (mkOption {
|
||||
visible = false;
|
||||
description = lib.mdDoc "Alias of {option}${showOption toPath}";
|
||||
apply = x: builtins.trace "Obsolete option `${showOption fromPath}' is used. It was renamed to ${showOption toPath}" toOp;
|
||||
});
|
||||
config = mkMerge [
|
||||
{
|
||||
warnings = optional fromOpt.isDefined
|
||||
"The option `${showOption fromPath}' defined in ${showFiles fromOpt.files} has been renamed to `${showOption toPath}'.";
|
||||
}
|
||||
(lib.modules.mkAliasAndWrapDefsWithPriority (setAttrByPath to) fromOpt)
|
||||
];
|
||||
};
|
||||
|
||||
siteOpts = { options, config, lib, name, ... }:
|
||||
{
|
||||
imports = [
|
||||
(mkRenamed [ "aclUse" ] [ "settings" "useacl" ])
|
||||
(mkRenamed [ "superUser" ] [ "settings" "superuser" ])
|
||||
(mkRenamed [ "disableActions" ] [ "settings" "disableactions" ])
|
||||
({ config, options, ... }: let
|
||||
showPath = suffix: lib.options.showOption ([ "services" "dokuwiki" "sites" name ] ++ suffix);
|
||||
replaceExtraConfig = "Please use `${showPath ["settings"]}' to pass structured settings instead.";
|
||||
ecOpt = options.extraConfig;
|
||||
ecPath = showPath [ "extraConfig" ];
|
||||
in {
|
||||
options.extraConfig = mkOption {
|
||||
visible = false;
|
||||
apply = x: throw "The option ${ecPath} can no longer be used since it's been removed.\n${replaceExtraConfig}";
|
||||
};
|
||||
config.assertions = [
|
||||
{
|
||||
assertion = !ecOpt.isDefined;
|
||||
message = "The option definition `${ecPath}' in ${showFiles ecOpt.files} no longer has any effect; please remove it.\n${replaceExtraConfig}";
|
||||
}
|
||||
{
|
||||
assertion = config.mergedConfig.useacl -> (config.acl != null || config.aclFile != null);
|
||||
message = "Either ${showPath [ "acl" ]} or ${showPath [ "aclFile" ]} is mandatory if ${showPath [ "settings" "useacl" ]} is true";
|
||||
}
|
||||
{
|
||||
assertion = config.usersFile != null -> config.mergedConfig.useacl != false;
|
||||
message = "${showPath [ "settings" "useacl" ]} is required when ${showPath [ "usersFile" ]} is set (Currently defined as `${config.usersFile}' in ${showFiles options.usersFile.files}).";
|
||||
}
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
options = {
|
||||
enable = mkEnableOption (lib.mdDoc "DokuWiki web application");
|
||||
@@ -392,21 +338,6 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
# Required for the mkRenamedOptionModule
|
||||
# TODO: Remove me once https://github.com/NixOS/nixpkgs/issues/96006 is fixed
|
||||
# or we don't have any more notes about the removal of extraConfig, ...
|
||||
warnings = mkOption {
|
||||
type = types.listOf types.unspecified;
|
||||
default = [ ];
|
||||
visible = false;
|
||||
internal = true;
|
||||
};
|
||||
assertions = mkOption {
|
||||
type = types.listOf types.unspecified;
|
||||
default = [ ];
|
||||
visible = false;
|
||||
internal = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
@@ -440,10 +371,6 @@ in
|
||||
# implementation
|
||||
config = mkIf (eachSite != {}) (mkMerge [{
|
||||
|
||||
warnings = flatten (mapAttrsToList (_: cfg: cfg.warnings) eachSite);
|
||||
|
||||
assertions = flatten (mapAttrsToList (_: cfg: cfg.assertions) eachSite);
|
||||
|
||||
services.phpfpm.pools = mapAttrs' (hostName: cfg: (
|
||||
nameValuePair "dokuwiki-${hostName}" {
|
||||
inherit user;
|
||||
|
||||
@@ -334,8 +334,8 @@ let
|
||||
+ optionalString vhost.default "default_server "
|
||||
+ optionalString vhost.reuseport "reuseport "
|
||||
+ optionalString (extraParameters != []) (concatStringsSep " "
|
||||
(let inCompatibleParameters = [ "ssl" "proxy_protocol" "http2" ];
|
||||
isCompatibleParameter = param: !(any (p: p == param) inCompatibleParameters);
|
||||
(let inCompatibleParameters = [ "accept_filter" "backlog" "deferred" "fastopen" "http2" "proxy_protocol" "so_keepalive" "ssl" ];
|
||||
isCompatibleParameter = param: !(any (p: lib.hasPrefix p param) inCompatibleParameters);
|
||||
in filter isCompatibleParameter extraParameters))
|
||||
+ ";"))
|
||||
+ "
|
||||
@@ -408,12 +408,6 @@ let
|
||||
ssl_conf_command Options KTLS;
|
||||
''}
|
||||
|
||||
${optionalString (hasSSL && vhost.quic && vhost.http3)
|
||||
# Advertise that HTTP/3 is available
|
||||
''
|
||||
add_header Alt-Svc 'h3=":$server_port"; ma=86400';
|
||||
''}
|
||||
|
||||
${mkBasicAuth vhostName vhost}
|
||||
|
||||
${optionalString (vhost.root != null) "root ${vhost.root};"}
|
||||
@@ -475,7 +469,7 @@ let
|
||||
|
||||
mkCertOwnershipAssertion = import ../../../security/acme/mk-cert-ownership-assertion.nix;
|
||||
|
||||
oldHTTP2 = versionOlder cfg.package.version "1.25.1";
|
||||
oldHTTP2 = (versionOlder cfg.package.version "1.25.1" && !(cfg.package.pname == "angie" || cfg.package.pname == "angieQuic"));
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
@@ -235,9 +235,9 @@ with lib;
|
||||
which can be achieved by setting `services.nginx.package = pkgs.nginxQuic;`
|
||||
and activate the QUIC transport protocol
|
||||
`services.nginx.virtualHosts.<name>.quic = true;`.
|
||||
Note that HTTP/3 support is experimental and
|
||||
*not* yet recommended for production.
|
||||
Note that HTTP/3 support is experimental and *not* yet recommended for production.
|
||||
Read more at https://quic.nginx.org/
|
||||
HTTP/3 availability must be manually advertised, preferably in each location block.
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -250,8 +250,7 @@ with lib;
|
||||
which can be achieved by setting `services.nginx.package = pkgs.nginxQuic;`
|
||||
and activate the QUIC transport protocol
|
||||
`services.nginx.virtualHosts.<name>.quic = true;`.
|
||||
Note that special application protocol support is experimental and
|
||||
*not* yet recommended for production.
|
||||
Note that special application protocol support is experimental and *not* yet recommended for production.
|
||||
Read more at https://quic.nginx.org/
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -449,7 +449,6 @@ in
|
||||
gnome-color-manager
|
||||
gnome-control-center
|
||||
gnome-shell-extensions
|
||||
gnome-themes-extra
|
||||
pkgs.gnome-tour # GNOME Shell detects the .desktop file on first log-in.
|
||||
pkgs.gnome-user-docs
|
||||
pkgs.orca
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.journald.gateway;
|
||||
|
||||
cliArgs = lib.cli.toGNUCommandLineShell { } {
|
||||
# If either of these are null / false, they are not passed in the command-line
|
||||
inherit (cfg) cert key trust system user merge;
|
||||
};
|
||||
in
|
||||
{
|
||||
meta.maintainers = [ lib.maintainers.raitobezarius ];
|
||||
options.services.journald.gateway = {
|
||||
enable = lib.mkEnableOption "the HTTP gateway to the journal";
|
||||
|
||||
port = lib.mkOption {
|
||||
default = 19531;
|
||||
type = lib.types.port;
|
||||
description = ''
|
||||
The port to listen to.
|
||||
'';
|
||||
};
|
||||
|
||||
cert = lib.mkOption {
|
||||
default = null;
|
||||
type = with lib.types; nullOr str;
|
||||
description = lib.mdDoc ''
|
||||
The path to a file or `AF_UNIX` stream socket to read the server
|
||||
certificate from.
|
||||
|
||||
The certificate must be in PEM format. This option switches
|
||||
`systemd-journal-gatewayd` into HTTPS mode and must be used together
|
||||
with {option}`services.journald.gateway.key`.
|
||||
'';
|
||||
};
|
||||
|
||||
key = lib.mkOption {
|
||||
default = null;
|
||||
type = with lib.types; nullOr str;
|
||||
description = lib.mdDoc ''
|
||||
Specify the path to a file or `AF_UNIX` stream socket to read the
|
||||
secret server key corresponding to the certificate specified with
|
||||
{option}`services.journald.gateway.cert` from.
|
||||
|
||||
The key must be in PEM format.
|
||||
|
||||
This key should not be world-readable, and must be readably by the
|
||||
`systemd-journal-gateway` user.
|
||||
'';
|
||||
};
|
||||
|
||||
trust = lib.mkOption {
|
||||
default = null;
|
||||
type = with lib.types; nullOr str;
|
||||
description = lib.mdDoc ''
|
||||
Specify the path to a file or `AF_UNIX` stream socket to read a CA
|
||||
certificate from.
|
||||
|
||||
The certificate must be in PEM format.
|
||||
|
||||
Setting this option enforces client certificate checking.
|
||||
'';
|
||||
};
|
||||
|
||||
system = lib.mkOption {
|
||||
default = true;
|
||||
type = lib.types.bool;
|
||||
description = lib.mdDoc ''
|
||||
Serve entries from system services and the kernel.
|
||||
|
||||
This has the same meaning as `--system` for {manpage}`journalctl(1)`.
|
||||
'';
|
||||
};
|
||||
|
||||
user = lib.mkOption {
|
||||
default = true;
|
||||
type = lib.types.bool;
|
||||
description = lib.mdDoc ''
|
||||
Serve entries from services for the current user.
|
||||
|
||||
This has the same meaning as `--user` for {manpage}`journalctl(1)`.
|
||||
'';
|
||||
};
|
||||
|
||||
merge = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
description = lib.mdDoc ''
|
||||
Serve entries interleaved from all available journals, including other
|
||||
machines.
|
||||
|
||||
This has the same meaning as `--merge` option for
|
||||
{manpage}`journalctl(1)`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
# This prevents the weird case were disabling "system" and "user"
|
||||
# actually enables both because the cli flags are not present.
|
||||
assertion = cfg.system || cfg.user;
|
||||
message = ''
|
||||
systemd-journal-gatewayd cannot serve neither "system" nor "user"
|
||||
journals.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
systemd.additionalUpstreamSystemUnits = [
|
||||
"systemd-journal-gatewayd.socket"
|
||||
"systemd-journal-gatewayd.service"
|
||||
];
|
||||
|
||||
users.users.systemd-journal-gateway.uid = config.ids.uids.systemd-journal-gateway;
|
||||
users.users.systemd-journal-gateway.group = "systemd-journal-gateway";
|
||||
users.groups.systemd-journal-gateway.gid = config.ids.gids.systemd-journal-gateway;
|
||||
|
||||
systemd.services.systemd-journal-gatewayd.serviceConfig.ExecStart = [
|
||||
# Clear the default command line
|
||||
""
|
||||
"${pkgs.systemd}/lib/systemd/systemd-journal-gatewayd ${cliArgs}"
|
||||
];
|
||||
|
||||
systemd.sockets.systemd-journal-gatewayd = {
|
||||
wantedBy = [ "sockets.target" ];
|
||||
listenStreams = [
|
||||
# Clear the default port
|
||||
""
|
||||
(toString cfg.port)
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.journald.remote;
|
||||
format = pkgs.formats.systemd;
|
||||
|
||||
cliArgs = lib.cli.toGNUCommandLineShell { } {
|
||||
inherit (cfg) output;
|
||||
# "-3" specifies the file descriptor from the .socket unit.
|
||||
"listen-${cfg.listen}" = "-3";
|
||||
};
|
||||
in
|
||||
{
|
||||
meta.maintainers = [ lib.maintainers.raitobezarius ];
|
||||
options.services.journald.remote = {
|
||||
enable = lib.mkEnableOption "receiving systemd journals from the network";
|
||||
|
||||
listen = lib.mkOption {
|
||||
default = "https";
|
||||
type = lib.types.enum [ "https" "http" ];
|
||||
description = lib.mdDoc ''
|
||||
Which protocol to listen to.
|
||||
'';
|
||||
};
|
||||
|
||||
output = lib.mkOption {
|
||||
default = "/var/log/journal/remote/";
|
||||
type = lib.types.str;
|
||||
description = lib.mdDoc ''
|
||||
The location of the output journal.
|
||||
|
||||
In case the output file is not specified, journal files will be created
|
||||
underneath the selected directory. Files will be called
|
||||
{file}`remote-hostname.journal`, where the `hostname` part is the
|
||||
escaped hostname of the source endpoint of the connection, or the
|
||||
numerical address if the hostname cannot be determined.
|
||||
'';
|
||||
};
|
||||
|
||||
port = lib.mkOption {
|
||||
default = 19532;
|
||||
type = lib.types.port;
|
||||
description = ''
|
||||
The port to listen to.
|
||||
|
||||
Note that this option is used only if
|
||||
{option}`services.journald.upload.listen` is configured to be either
|
||||
"https" or "http".
|
||||
'';
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
default = { };
|
||||
|
||||
description = lib.mdDoc ''
|
||||
Configuration in the journal-remote configuration file. See
|
||||
{manpage}`journal-remote.conf(5)` for available options.
|
||||
'';
|
||||
|
||||
type = lib.types.submodule {
|
||||
freeformType = format.type;
|
||||
|
||||
options.Remote = {
|
||||
Seal = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Periodically sign the data in the journal using Forward Secure
|
||||
Sealing.
|
||||
'';
|
||||
};
|
||||
|
||||
SplitMode = lib.mkOption {
|
||||
default = "host";
|
||||
example = "none";
|
||||
type = lib.types.enum [ "host" "none" ];
|
||||
description = lib.mdDoc ''
|
||||
With "host", a separate output file is used, based on the
|
||||
hostname of the other endpoint of a connection. With "none", only
|
||||
one output journal file is used.
|
||||
'';
|
||||
};
|
||||
|
||||
ServerKeyFile = lib.mkOption {
|
||||
default = "/etc/ssl/private/journal-remote.pem";
|
||||
type = lib.types.str;
|
||||
description = lib.mdDoc ''
|
||||
A path to a SSL secret key file in PEM format.
|
||||
|
||||
Note that due to security reasons, `systemd-journal-remote` will
|
||||
refuse files from the world-readable `/nix/store`. This file
|
||||
should be readable by the "" user.
|
||||
|
||||
This option can be used with `listen = "https"`. If the path
|
||||
refers to an `AF_UNIX` stream socket in the file system a
|
||||
connection is made to it and the key read from it.
|
||||
'';
|
||||
};
|
||||
|
||||
ServerCertificateFile = lib.mkOption {
|
||||
default = "/etc/ssl/certs/journal-remote.pem";
|
||||
type = lib.types.str;
|
||||
description = lib.mdDoc ''
|
||||
A path to a SSL certificate file in PEM format.
|
||||
|
||||
This option can be used with `listen = "https"`. If the path
|
||||
refers to an `AF_UNIX` stream socket in the file system a
|
||||
connection is made to it and the certificate read from it.
|
||||
'';
|
||||
};
|
||||
|
||||
TrustedCertificateFile = lib.mkOption {
|
||||
default = "/etc/ssl/ca/trusted.pem";
|
||||
type = lib.types.str;
|
||||
description = lib.mdDoc ''
|
||||
A path to a SSL CA certificate file in PEM format, or `all`.
|
||||
|
||||
If `all` is set, then client certificate checking will be
|
||||
disabled.
|
||||
|
||||
This option can be used with `listen = "https"`. If the path
|
||||
refers to an `AF_UNIX` stream socket in the file system a
|
||||
connection is made to it and the certificate read from it.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.additionalUpstreamSystemUnits = [
|
||||
"systemd-journal-remote.service"
|
||||
"systemd-journal-remote.socket"
|
||||
];
|
||||
|
||||
systemd.services.systemd-journal-remote.serviceConfig.ExecStart = [
|
||||
# Clear the default command line
|
||||
""
|
||||
"${pkgs.systemd}/lib/systemd/systemd-journal-remote ${cliArgs}"
|
||||
];
|
||||
|
||||
systemd.sockets.systemd-journal-remote = {
|
||||
wantedBy = [ "sockets.target" ];
|
||||
listenStreams = [
|
||||
# Clear the default port
|
||||
""
|
||||
(toString cfg.port)
|
||||
];
|
||||
};
|
||||
|
||||
# User and group used by systemd-journal-remote.service
|
||||
users.groups.systemd-journal-remote = { };
|
||||
users.users.systemd-journal-remote = {
|
||||
isSystemUser = true;
|
||||
group = "systemd-journal-remote";
|
||||
};
|
||||
|
||||
environment.etc."systemd/journal-remote.conf".source =
|
||||
format.generate "journal-remote.conf" cfg.settings;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.journald.upload;
|
||||
format = pkgs.formats.systemd;
|
||||
in
|
||||
{
|
||||
meta.maintainers = [ lib.maintainers.raitobezarius ];
|
||||
options.services.journald.upload = {
|
||||
enable = lib.mkEnableOption "uploading the systemd journal to a remote server";
|
||||
|
||||
settings = lib.mkOption {
|
||||
default = { };
|
||||
|
||||
description = lib.mdDoc ''
|
||||
Configuration for journal-upload. See {manpage}`journal-upload.conf(5)`
|
||||
for available options.
|
||||
'';
|
||||
|
||||
type = lib.types.submodule {
|
||||
freeformType = format.type;
|
||||
|
||||
options.Upload = {
|
||||
URL = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = "https://192.168.1.1";
|
||||
description = ''
|
||||
The URL to upload the journal entries to.
|
||||
|
||||
See the description of `--url=` option in
|
||||
{manpage}`systemd-journal-upload(8)` for the description of
|
||||
possible values.
|
||||
'';
|
||||
};
|
||||
|
||||
ServerKeyFile = lib.mkOption {
|
||||
type = with lib.types; nullOr str;
|
||||
example = lib.literalExpression "./server-key.pem";
|
||||
# Since systemd-journal-upload uses a DynamicUser, permissions must
|
||||
# be done using groups
|
||||
description = ''
|
||||
SSL key in PEM format.
|
||||
|
||||
In contrary to what the name suggests, this option configures the
|
||||
client private key sent to the remote journal server.
|
||||
|
||||
This key should not be world-readable, and must be readably by
|
||||
the `systemd-journal` group.
|
||||
'';
|
||||
default = null;
|
||||
};
|
||||
|
||||
ServerCertificateFile = lib.mkOption {
|
||||
type = with lib.types; nullOr str;
|
||||
example = lib.literalExpression "./server-ca.pem";
|
||||
description = ''
|
||||
SSL CA certificate in PEM format.
|
||||
|
||||
In contrary to what the name suggests, this option configures the
|
||||
client certificate sent to the remote journal server.
|
||||
'';
|
||||
default = null;
|
||||
};
|
||||
|
||||
TrustedCertificateFile = lib.mkOption {
|
||||
type = with lib.types; nullOr str;
|
||||
example = lib.literalExpression "./ca";
|
||||
description = ''
|
||||
SSL CA certificate.
|
||||
|
||||
This certificate will be used to check the remote journal HTTPS
|
||||
server certificate.
|
||||
'';
|
||||
default = null;
|
||||
};
|
||||
|
||||
NetworkTimeoutSec = lib.mkOption {
|
||||
type = with lib.types; nullOr str;
|
||||
example = "1s";
|
||||
description = ''
|
||||
When network connectivity to the server is lost, this option
|
||||
configures the time to wait for the connectivity to get restored.
|
||||
|
||||
If the server is not reachable over the network for the
|
||||
configured time, `systemd-journal-upload` exits. Takes a value in
|
||||
seconds (or in other time units if suffixed with "ms", "min",
|
||||
"h", etc). For details, see {manpage}`systemd.time(5)`.
|
||||
'';
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.additionalUpstreamSystemUnits = [ "systemd-journal-upload.service" ];
|
||||
|
||||
systemd.services."systemd-journal-upload" = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
# To prevent flooding the server in case the server is struggling
|
||||
RestartSec = "3sec";
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."systemd/journal-upload.conf".source =
|
||||
format.generate "journal-upload.conf" cfg.settings;
|
||||
};
|
||||
}
|
||||
@@ -5,6 +5,10 @@ with lib;
|
||||
let
|
||||
cfg = config.services.journald;
|
||||
in {
|
||||
imports = [
|
||||
(mkRenamedOptionModule [ "services" "journald" "enableHttpGateway" ] [ "services" "journald" "gateway" "enable" ])
|
||||
];
|
||||
|
||||
options = {
|
||||
services.journald.console = mkOption {
|
||||
default = "";
|
||||
@@ -71,14 +75,6 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
services.journald.enableHttpGateway = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = lib.mdDoc ''
|
||||
Whether to enable the HTTP gateway to the journal.
|
||||
'';
|
||||
};
|
||||
|
||||
services.journald.forwardToSyslog = mkOption {
|
||||
default = config.services.rsyslogd.enable || config.services.syslog-ng.enable;
|
||||
defaultText = literalExpression "services.rsyslogd.enable || services.syslog-ng.enable";
|
||||
@@ -101,9 +97,6 @@ in {
|
||||
] ++ (optional (!config.boot.isContainer) "systemd-journald-audit.socket") ++ [
|
||||
"systemd-journald-dev-log.socket"
|
||||
"syslog.socket"
|
||||
] ++ optionals cfg.enableHttpGateway [
|
||||
"systemd-journal-gatewayd.socket"
|
||||
"systemd-journal-gatewayd.service"
|
||||
];
|
||||
|
||||
environment.etc = {
|
||||
@@ -124,12 +117,6 @@ in {
|
||||
};
|
||||
|
||||
users.groups.systemd-journal.gid = config.ids.gids.systemd-journal;
|
||||
users.users.systemd-journal-gateway.uid = config.ids.uids.systemd-journal-gateway;
|
||||
users.users.systemd-journal-gateway.group = "systemd-journal-gateway";
|
||||
users.groups.systemd-journal-gateway.gid = config.ids.gids.systemd-journal-gateway;
|
||||
|
||||
systemd.sockets.systemd-journal-gatewayd.wantedBy =
|
||||
optional cfg.enableHttpGateway "sockets.target";
|
||||
|
||||
systemd.services.systemd-journal-flush.restartIfChanged = false;
|
||||
systemd.services.systemd-journald.restartTriggers = [ config.environment.etc."systemd/journald.conf".source ];
|
||||
|
||||
@@ -46,6 +46,13 @@ with lib;
|
||||
wantedBy = [ "sysinit.target" ];
|
||||
aliases = [ "dbus-org.freedesktop.timesync1.service" ];
|
||||
restartTriggers = [ config.environment.etc."systemd/timesyncd.conf".source ];
|
||||
# systemd-timesyncd disables DNSSEC validation in the nss-resolve module by setting SYSTEMD_NSS_RESOLVE_VALIDATE to 0 in the unit file.
|
||||
# This is required in order to solve the chicken-and-egg problem when DNSSEC validation needs the correct time to work, but to set the
|
||||
# correct time, we need to connect to an NTP server, which usually requires resolving its hostname.
|
||||
# In order for nss-resolve to be able to read this environment variable we patch systemd-timesyncd to disable NSCD and use NSS modules directly.
|
||||
# This means that systemd-timesyncd needs to have NSS modules path in LD_LIBRARY_PATH. When systemd-resolved is disabled we still need to set
|
||||
# NSS module path so that systemd-timesyncd keeps using other NSS modules that are configured in the system.
|
||||
environment.LD_LIBRARY_PATH = config.system.nssModules.path;
|
||||
|
||||
preStart = (
|
||||
# Ensure that we have some stored time to prevent
|
||||
|
||||
@@ -71,7 +71,7 @@ let
|
||||
done
|
||||
poolReady() {
|
||||
pool="$1"
|
||||
state="$("${zpoolCmd}" import 2>/dev/null | "${awkCmd}" "/pool: $pool/ { found = 1 }; /state:/ { if (found == 1) { print \$2; exit } }; END { if (found == 0) { print \"MISSING\" } }")"
|
||||
state="$("${zpoolCmd}" import -d "${cfgZfs.devNodes}" 2>/dev/null | "${awkCmd}" "/pool: $pool/ { found = 1 }; /state:/ { if (found == 1) { print \$2; exit } }; END { if (found == 0) { print \"MISSING\" } }")"
|
||||
if [[ "$state" = "ONLINE" ]]; then
|
||||
return 0
|
||||
else
|
||||
|
||||
@@ -843,6 +843,8 @@ in {
|
||||
systemd-initrd-networkd-openvpn = handleTestOn [ "x86_64-linux" "i686-linux" ] ./initrd-network-openvpn { systemdStage1 = true; };
|
||||
systemd-initrd-vlan = handleTest ./systemd-initrd-vlan.nix {};
|
||||
systemd-journal = handleTest ./systemd-journal.nix {};
|
||||
systemd-journal-gateway = handleTest ./systemd-journal-gateway.nix {};
|
||||
systemd-journal-upload = handleTest ./systemd-journal-upload.nix {};
|
||||
systemd-machinectl = handleTest ./systemd-machinectl.nix {};
|
||||
systemd-networkd = handleTest ./systemd-networkd.nix {};
|
||||
systemd-networkd-dhcpserver = handleTest ./systemd-networkd-dhcpserver.nix {};
|
||||
@@ -858,6 +860,7 @@ in {
|
||||
systemd-shutdown = handleTest ./systemd-shutdown.nix {};
|
||||
systemd-sysupdate = runTest ./systemd-sysupdate.nix;
|
||||
systemd-timesyncd = handleTest ./systemd-timesyncd.nix {};
|
||||
systemd-timesyncd-nscd-dnssec = handleTest ./systemd-timesyncd-nscd-dnssec.nix {};
|
||||
systemd-user-tmpfiles-rules = handleTest ./systemd-user-tmpfiles-rules.nix {};
|
||||
systemd-misc = handleTest ./systemd-misc.nix {};
|
||||
systemd-userdbd = handleTest ./systemd-userdbd.nix {};
|
||||
|
||||
@@ -510,14 +510,8 @@ let
|
||||
ntp
|
||||
perlPackages.ListCompare
|
||||
perlPackages.XMLLibXML
|
||||
python3Minimal
|
||||
# make-options-doc/default.nix
|
||||
(let
|
||||
self = (pkgs.python3Minimal.override {
|
||||
inherit self;
|
||||
includeSiteCustomize = true;
|
||||
});
|
||||
in self.withPackages (p: [ p.mistune ]))
|
||||
(python3.withPackages (p: [ p.mistune ]))
|
||||
shared-mime-info
|
||||
sudo
|
||||
texinfo
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import ../make-test-python.nix ({pkgs, ...}: {
|
||||
name = "kerberos_server-heimdal";
|
||||
|
||||
nodes.machine = { config, libs, pkgs, ...}:
|
||||
{ services.kerberos_server =
|
||||
{ enable = true;
|
||||
@@ -7,16 +8,18 @@ import ../make-test-python.nix ({pkgs, ...}: {
|
||||
"FOO.BAR".acl = [{principal = "admin"; access = ["add" "cpw"];}];
|
||||
};
|
||||
};
|
||||
krb5 = {
|
||||
security.krb5 = {
|
||||
enable = true;
|
||||
kerberos = pkgs.heimdal;
|
||||
libdefaults = {
|
||||
default_realm = "FOO.BAR";
|
||||
};
|
||||
realms = {
|
||||
"FOO.BAR" = {
|
||||
admin_server = "machine";
|
||||
kdc = "machine";
|
||||
package = pkgs.heimdal;
|
||||
settings = {
|
||||
libdefaults = {
|
||||
default_realm = "FOO.BAR";
|
||||
};
|
||||
realms = {
|
||||
"FOO.BAR" = {
|
||||
admin_server = "machine";
|
||||
kdc = "machine";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -39,4 +42,6 @@ import ../make-test-python.nix ({pkgs, ...}: {
|
||||
"kinit -kt alice.keytab alice",
|
||||
)
|
||||
'';
|
||||
|
||||
meta.maintainers = [ pkgs.lib.maintainers.dblsaiko ];
|
||||
})
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import ../make-test-python.nix ({pkgs, ...}: {
|
||||
name = "kerberos_server-mit";
|
||||
|
||||
nodes.machine = { config, libs, pkgs, ...}:
|
||||
{ services.kerberos_server =
|
||||
{ enable = true;
|
||||
@@ -7,16 +8,18 @@ import ../make-test-python.nix ({pkgs, ...}: {
|
||||
"FOO.BAR".acl = [{principal = "admin"; access = ["add" "cpw"];}];
|
||||
};
|
||||
};
|
||||
krb5 = {
|
||||
security.krb5 = {
|
||||
enable = true;
|
||||
kerberos = pkgs.krb5;
|
||||
libdefaults = {
|
||||
default_realm = "FOO.BAR";
|
||||
};
|
||||
realms = {
|
||||
"FOO.BAR" = {
|
||||
admin_server = "machine";
|
||||
kdc = "machine";
|
||||
package = pkgs.krb5;
|
||||
settings = {
|
||||
libdefaults = {
|
||||
default_realm = "FOO.BAR";
|
||||
};
|
||||
realms = {
|
||||
"FOO.BAR" = {
|
||||
admin_server = "machine";
|
||||
kdc = "machine";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -38,4 +41,6 @@ import ../make-test-python.nix ({pkgs, ...}: {
|
||||
"echo alice_pw | sudo -u alice kinit",
|
||||
)
|
||||
'';
|
||||
|
||||
meta.maintainers = [ pkgs.lib.maintainers.dblsaiko ];
|
||||
})
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ system ? builtins.currentSystem }:
|
||||
{
|
||||
example-config = import ./example-config.nix { inherit system; };
|
||||
deprecated-config = import ./deprecated-config.nix { inherit system; };
|
||||
}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
# Verifies that the configuration suggested in deprecated example values
|
||||
# will result in the expected output.
|
||||
|
||||
import ../make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "krb5-with-deprecated-config";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ eqyiel ];
|
||||
};
|
||||
|
||||
nodes.machine =
|
||||
{ ... }: {
|
||||
krb5 = {
|
||||
enable = true;
|
||||
defaultRealm = "ATHENA.MIT.EDU";
|
||||
domainRealm = "athena.mit.edu";
|
||||
kdc = "kerberos.mit.edu";
|
||||
kerberosAdminServer = "kerberos.mit.edu";
|
||||
};
|
||||
};
|
||||
|
||||
testScript =
|
||||
let snapshot = pkgs.writeText "krb5-with-deprecated-config.conf" ''
|
||||
[libdefaults]
|
||||
default_realm = ATHENA.MIT.EDU
|
||||
|
||||
[realms]
|
||||
ATHENA.MIT.EDU = {
|
||||
admin_server = kerberos.mit.edu
|
||||
kdc = kerberos.mit.edu
|
||||
}
|
||||
|
||||
[domain_realm]
|
||||
.athena.mit.edu = ATHENA.MIT.EDU
|
||||
athena.mit.edu = ATHENA.MIT.EDU
|
||||
|
||||
[capaths]
|
||||
|
||||
|
||||
[appdefaults]
|
||||
|
||||
|
||||
[plugins]
|
||||
|
||||
'';
|
||||
in ''
|
||||
machine.succeed(
|
||||
"diff /etc/krb5.conf ${snapshot}"
|
||||
)
|
||||
'';
|
||||
})
|
||||
@@ -4,86 +4,67 @@
|
||||
import ../make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "krb5-with-example-config";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ eqyiel ];
|
||||
maintainers = [ eqyiel dblsaiko ];
|
||||
};
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, ... }: {
|
||||
krb5 = {
|
||||
security.krb5 = {
|
||||
enable = true;
|
||||
kerberos = pkgs.krb5;
|
||||
libdefaults = {
|
||||
default_realm = "ATHENA.MIT.EDU";
|
||||
};
|
||||
realms = {
|
||||
"ATHENA.MIT.EDU" = {
|
||||
admin_server = "athena.mit.edu";
|
||||
kdc = [
|
||||
"athena01.mit.edu"
|
||||
"athena02.mit.edu"
|
||||
];
|
||||
package = pkgs.krb5;
|
||||
settings = {
|
||||
includedir = [
|
||||
"/etc/krb5.conf.d"
|
||||
];
|
||||
include = [
|
||||
"/etc/krb5-extra.conf"
|
||||
];
|
||||
libdefaults = {
|
||||
default_realm = "ATHENA.MIT.EDU";
|
||||
};
|
||||
realms = {
|
||||
"ATHENA.MIT.EDU" = {
|
||||
admin_server = "athena.mit.edu";
|
||||
kdc = [
|
||||
"athena01.mit.edu"
|
||||
"athena02.mit.edu"
|
||||
];
|
||||
};
|
||||
};
|
||||
domain_realm = {
|
||||
"example.com" = "EXAMPLE.COM";
|
||||
".example.com" = "EXAMPLE.COM";
|
||||
};
|
||||
capaths = {
|
||||
"ATHENA.MIT.EDU" = {
|
||||
"EXAMPLE.COM" = ".";
|
||||
};
|
||||
"EXAMPLE.COM" = {
|
||||
"ATHENA.MIT.EDU" = ".";
|
||||
};
|
||||
};
|
||||
appdefaults = {
|
||||
pam = {
|
||||
debug = false;
|
||||
ticket_lifetime = 36000;
|
||||
renew_lifetime = 36000;
|
||||
max_timeout = 30;
|
||||
timeout_shift = 2;
|
||||
initial_timeout = 1;
|
||||
};
|
||||
};
|
||||
plugins.ccselect.disable = "k5identity";
|
||||
logging = {
|
||||
kdc = "SYSLOG:NOTICE";
|
||||
admin_server = "SYSLOG:NOTICE";
|
||||
default = "SYSLOG:NOTICE";
|
||||
};
|
||||
};
|
||||
domain_realm = {
|
||||
"example.com" = "EXAMPLE.COM";
|
||||
".example.com" = "EXAMPLE.COM";
|
||||
};
|
||||
capaths = {
|
||||
"ATHENA.MIT.EDU" = {
|
||||
"EXAMPLE.COM" = ".";
|
||||
};
|
||||
"EXAMPLE.COM" = {
|
||||
"ATHENA.MIT.EDU" = ".";
|
||||
};
|
||||
};
|
||||
appdefaults = {
|
||||
pam = {
|
||||
debug = false;
|
||||
ticket_lifetime = 36000;
|
||||
renew_lifetime = 36000;
|
||||
max_timeout = 30;
|
||||
timeout_shift = 2;
|
||||
initial_timeout = 1;
|
||||
};
|
||||
};
|
||||
plugins = {
|
||||
ccselect = {
|
||||
disable = "k5identity";
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
[logging]
|
||||
kdc = SYSLOG:NOTICE
|
||||
admin_server = SYSLOG:NOTICE
|
||||
default = SYSLOG:NOTICE
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
testScript =
|
||||
let snapshot = pkgs.writeText "krb5-with-example-config.conf" ''
|
||||
[libdefaults]
|
||||
default_realm = ATHENA.MIT.EDU
|
||||
|
||||
[realms]
|
||||
ATHENA.MIT.EDU = {
|
||||
admin_server = athena.mit.edu
|
||||
kdc = athena01.mit.edu
|
||||
kdc = athena02.mit.edu
|
||||
}
|
||||
|
||||
[domain_realm]
|
||||
.example.com = EXAMPLE.COM
|
||||
example.com = EXAMPLE.COM
|
||||
|
||||
[capaths]
|
||||
ATHENA.MIT.EDU = {
|
||||
EXAMPLE.COM = .
|
||||
}
|
||||
EXAMPLE.COM = {
|
||||
ATHENA.MIT.EDU = .
|
||||
}
|
||||
|
||||
[appdefaults]
|
||||
pam = {
|
||||
debug = false
|
||||
@@ -94,15 +75,40 @@ import ../make-test-python.nix ({ pkgs, ...} : {
|
||||
timeout_shift = 2
|
||||
}
|
||||
|
||||
[capaths]
|
||||
ATHENA.MIT.EDU = {
|
||||
EXAMPLE.COM = .
|
||||
}
|
||||
EXAMPLE.COM = {
|
||||
ATHENA.MIT.EDU = .
|
||||
}
|
||||
|
||||
[domain_realm]
|
||||
.example.com = EXAMPLE.COM
|
||||
example.com = EXAMPLE.COM
|
||||
|
||||
[libdefaults]
|
||||
default_realm = ATHENA.MIT.EDU
|
||||
|
||||
[logging]
|
||||
admin_server = SYSLOG:NOTICE
|
||||
default = SYSLOG:NOTICE
|
||||
kdc = SYSLOG:NOTICE
|
||||
|
||||
[plugins]
|
||||
ccselect = {
|
||||
disable = k5identity
|
||||
}
|
||||
|
||||
[logging]
|
||||
kdc = SYSLOG:NOTICE
|
||||
admin_server = SYSLOG:NOTICE
|
||||
default = SYSLOG:NOTICE
|
||||
[realms]
|
||||
ATHENA.MIT.EDU = {
|
||||
admin_server = athena.mit.edu
|
||||
kdc = athena01.mit.edu
|
||||
kdc = athena02.mit.edu
|
||||
}
|
||||
|
||||
include /etc/krb5-extra.conf
|
||||
includedir /etc/krb5.conf.d
|
||||
'';
|
||||
in ''
|
||||
machine.succeed(
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
import ../make-test-python.nix ({ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
krb5 =
|
||||
{ enable = true;
|
||||
domain_realm."nfs.test" = "NFS.TEST";
|
||||
security.krb5 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
domain_realm."nfs.test" = "NFS.TEST";
|
||||
libdefaults.default_realm = "NFS.TEST";
|
||||
realms."NFS.TEST" =
|
||||
{ admin_server = "server.nfs.test";
|
||||
kdc = "server.nfs.test";
|
||||
};
|
||||
realms."NFS.TEST" = {
|
||||
admin_server = "server.nfs.test";
|
||||
kdc = "server.nfs.test";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hosts =
|
||||
''
|
||||
@@ -32,7 +34,7 @@ in
|
||||
|
||||
nodes = {
|
||||
client = { lib, ... }:
|
||||
{ inherit krb5 users;
|
||||
{ inherit security users;
|
||||
|
||||
networking.extraHosts = hosts;
|
||||
networking.domain = "nfs.test";
|
||||
@@ -48,7 +50,7 @@ in
|
||||
};
|
||||
|
||||
server = { lib, ...}:
|
||||
{ inherit krb5 users;
|
||||
{ inherit security users;
|
||||
|
||||
networking.extraHosts = hosts;
|
||||
networking.domain = "nfs.test";
|
||||
@@ -128,4 +130,6 @@ in
|
||||
expected = ["alice", "users"]
|
||||
assert ids == expected, f"ids incorrect: got {ids} expected {expected}"
|
||||
'';
|
||||
|
||||
meta.maintainers = [ lib.maintainers.dblsaiko ];
|
||||
})
|
||||
|
||||
@@ -95,7 +95,7 @@ in {
|
||||
ntp
|
||||
perlPackages.ListCompare
|
||||
perlPackages.XMLLibXML
|
||||
python3Minimal
|
||||
python3
|
||||
shared-mime-info
|
||||
stdenv
|
||||
sudo
|
||||
|
||||
@@ -7,7 +7,7 @@ import ../make-test-python.nix ({ pkgs, ... }: {
|
||||
nodes.machine = { ... }: {
|
||||
imports = [ ../../modules/profiles/minimal.nix ];
|
||||
|
||||
krb5.enable = true;
|
||||
security.krb5.enable = true;
|
||||
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
import ./make-test-python.nix ({ lib, pkgs, ... }:
|
||||
{
|
||||
name = "systemd-journal-gateway";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ minijackson raitobezarius ];
|
||||
};
|
||||
|
||||
# Named client for coherence with the systemd-journal-upload test, and for
|
||||
# certificate validation
|
||||
nodes.client = {
|
||||
services.journald.gateway = {
|
||||
enable = true;
|
||||
cert = "/run/secrets/client/cert.pem";
|
||||
key = "/run/secrets/client/key.pem";
|
||||
trust = "/run/secrets/ca.cert.pem";
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
import json
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
tmpdir_o = tempfile.TemporaryDirectory()
|
||||
tmpdir = tmpdir_o.name
|
||||
|
||||
def generate_pems(domain: str):
|
||||
subprocess.run(
|
||||
[
|
||||
"${pkgs.minica}/bin/minica",
|
||||
"--ca-key=ca.key.pem",
|
||||
"--ca-cert=ca.cert.pem",
|
||||
f"--domains={domain}",
|
||||
],
|
||||
cwd=str(tmpdir),
|
||||
)
|
||||
|
||||
with subtest("Creating keys and certificates"):
|
||||
generate_pems("server")
|
||||
generate_pems("client")
|
||||
|
||||
client.wait_for_unit("multi-user.target")
|
||||
|
||||
def copy_pem(file: str):
|
||||
machine.copy_from_host(source=f"{tmpdir}/{file}", target=f"/run/secrets/{file}")
|
||||
machine.succeed(f"chmod 644 /run/secrets/{file}")
|
||||
|
||||
with subtest("Copying keys and certificates"):
|
||||
machine.succeed("mkdir -p /run/secrets/{client,server}")
|
||||
copy_pem("server/cert.pem")
|
||||
copy_pem("server/key.pem")
|
||||
copy_pem("client/cert.pem")
|
||||
copy_pem("client/key.pem")
|
||||
copy_pem("ca.cert.pem")
|
||||
|
||||
client.wait_for_unit("multi-user.target")
|
||||
|
||||
curl = '${pkgs.curl}/bin/curl'
|
||||
accept_json = '--header "Accept: application/json"'
|
||||
cacert = '--cacert /run/secrets/ca.cert.pem'
|
||||
cert = '--cert /run/secrets/server/cert.pem'
|
||||
key = '--key /run/secrets/server/key.pem'
|
||||
base_url = 'https://client:19531'
|
||||
|
||||
curl_cli = f"{curl} {accept_json} {cacert} {cert} {key} --fail"
|
||||
|
||||
machine_info = client.succeed(f"{curl_cli} {base_url}/machine")
|
||||
assert json.loads(machine_info)["hostname"] == "client", "wrong machine name"
|
||||
|
||||
# The HTTP request should have started the gateway service, triggered by
|
||||
# the .socket unit
|
||||
client.wait_for_unit("systemd-journal-gatewayd.service")
|
||||
|
||||
identifier = "nixos-test"
|
||||
message = "Hello from NixOS test infrastructure"
|
||||
|
||||
client.succeed(f"systemd-cat --identifier={identifier} <<< '{message}'")
|
||||
|
||||
# max-time is a workaround against a bug in systemd-journal-gatewayd where
|
||||
# if TLS is enabled, the connection is never closed. Since it will timeout,
|
||||
# we ignore the return code.
|
||||
entries = client.succeed(
|
||||
f"{curl_cli} --max-time 5 {base_url}/entries?SYSLOG_IDENTIFIER={identifier} || true"
|
||||
)
|
||||
|
||||
# Number of entries should be only 1
|
||||
added_entry = json.loads(entries)
|
||||
assert added_entry["SYSLOG_IDENTIFIER"] == identifier and added_entry["MESSAGE"] == message, "journal entry does not correspond"
|
||||
'';
|
||||
})
|
||||
@@ -0,0 +1,101 @@
|
||||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
{
|
||||
name = "systemd-journal-upload";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ minijackson raitobezarius ];
|
||||
};
|
||||
|
||||
nodes.server = { nodes, ... }: {
|
||||
services.journald.remote = {
|
||||
enable = true;
|
||||
listen = "http";
|
||||
settings.Remote = {
|
||||
ServerCertificateFile = "/run/secrets/sever.cert.pem";
|
||||
ServerKeyFile = "/run/secrets/sever.key.pem";
|
||||
TrustedCertificateFile = "/run/secrets/ca.cert.pem";
|
||||
Seal = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ nodes.server.services.journald.remote.port ];
|
||||
};
|
||||
|
||||
nodes.client = { lib, nodes, ... }: {
|
||||
services.journald.upload = {
|
||||
enable = true;
|
||||
settings.Upload = {
|
||||
URL = "http://server:${toString nodes.server.services.journald.remote.port}";
|
||||
ServerCertificateFile = "/run/secrets/client.cert.pem";
|
||||
ServerKeyFile = "/run/secrets/client.key.pem";
|
||||
TrustedCertificateFile = "/run/secrets/ca.cert.pem";
|
||||
};
|
||||
};
|
||||
|
||||
# Wait for the PEMs to arrive
|
||||
systemd.services.systemd-journal-upload.wantedBy = lib.mkForce [];
|
||||
systemd.paths.systemd-journal-upload = {
|
||||
wantedBy = [ "default.target" ];
|
||||
# This file must be copied last
|
||||
pathConfig.PathExists = [ "/run/secrets/ca.cert.pem" ];
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
tmpdir_o = tempfile.TemporaryDirectory()
|
||||
tmpdir = tmpdir_o.name
|
||||
|
||||
def generate_pems(domain: str):
|
||||
subprocess.run(
|
||||
[
|
||||
"${pkgs.minica}/bin/minica",
|
||||
"--ca-key=ca.key.pem",
|
||||
"--ca-cert=ca.cert.pem",
|
||||
f"--domains={domain}",
|
||||
],
|
||||
cwd=str(tmpdir),
|
||||
)
|
||||
|
||||
with subtest("Creating keys and certificates"):
|
||||
generate_pems("server")
|
||||
generate_pems("client")
|
||||
|
||||
server.wait_for_unit("multi-user.target")
|
||||
client.wait_for_unit("multi-user.target")
|
||||
|
||||
def copy_pems(machine: Machine, domain: str):
|
||||
machine.succeed("mkdir /run/secrets")
|
||||
machine.copy_from_host(
|
||||
source=f"{tmpdir}/{domain}/cert.pem",
|
||||
target=f"/run/secrets/{domain}.cert.pem",
|
||||
)
|
||||
machine.copy_from_host(
|
||||
source=f"{tmpdir}/{domain}/key.pem",
|
||||
target=f"/run/secrets/{domain}.key.pem",
|
||||
)
|
||||
# Should be last
|
||||
machine.copy_from_host(
|
||||
source=f"{tmpdir}/ca.cert.pem",
|
||||
target="/run/secrets/ca.cert.pem",
|
||||
)
|
||||
|
||||
with subtest("Copying keys and certificates"):
|
||||
copy_pems(server, "server")
|
||||
copy_pems(client, "client")
|
||||
|
||||
client.wait_for_unit("systemd-journal-upload.service")
|
||||
# The journal upload should have started the remote service, triggered by
|
||||
# the .socket unit
|
||||
server.wait_for_unit("systemd-journal-remote.service")
|
||||
|
||||
identifier = "nixos-test"
|
||||
message = "Hello from NixOS test infrastructure"
|
||||
|
||||
client.succeed(f"systemd-cat --identifier={identifier} <<< '{message}'")
|
||||
server.wait_until_succeeds(
|
||||
f"journalctl --file /var/log/journal/remote/remote-*.journal --identifier={identifier} | grep -F '{message}'"
|
||||
)
|
||||
'';
|
||||
})
|
||||
@@ -6,17 +6,11 @@ import ./make-test-python.nix ({ pkgs, ... }:
|
||||
maintainers = [ lewo ];
|
||||
};
|
||||
|
||||
nodes.machine = { pkgs, lib, ... }: {
|
||||
services.journald.enableHttpGateway = true;
|
||||
};
|
||||
nodes.machine = { };
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
machine.succeed("journalctl --grep=systemd")
|
||||
|
||||
machine.succeed(
|
||||
"${pkgs.curl}/bin/curl -s localhost:19531/machine | ${pkgs.jq}/bin/jq -e '.hostname == \"machine\"'"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
# This test verifies that systemd-timesyncd can resolve the NTP server hostname when DNSSEC validation
|
||||
# fails even though it is enforced in the systemd-resolved settings. It is required in order to solve
|
||||
# the chicken-and-egg problem when DNSSEC validation needs the correct time to work, but to set the
|
||||
# correct time, we need to connect to an NTP server, which usually requires resolving its hostname.
|
||||
#
|
||||
# This test does the following:
|
||||
# - Sets up a DNS server (tinydns) listening on the eth1 ip addess, serving .ntp and fake.ntp records.
|
||||
# - Configures that DNS server as a resolver and enables DNSSEC in systemd-resolved settings.
|
||||
# - Configures systemd-timesyncd to use fake.ntp hostname as an NTP server.
|
||||
# - Performs a regular DNS lookup, to ensure it fails due to broken DNSSEC.
|
||||
# - Waits until systemd-timesyncd resolves fake.ntp by checking its debug output.
|
||||
# Here, we don't expect systemd-timesyncd to connect and synchronize time because there is no NTP
|
||||
# server running. For this test to succeed, we only need to ensure that systemd-timesyncd
|
||||
# resolves the IP address of the fake.ntp host.
|
||||
|
||||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
|
||||
let
|
||||
ntpHostname = "fake.ntp";
|
||||
ntpIP = "192.0.2.1";
|
||||
in
|
||||
{
|
||||
name = "systemd-timesyncd";
|
||||
nodes.machine = { pkgs, lib, config, ... }:
|
||||
let
|
||||
eth1IP = (lib.head config.networking.interfaces.eth1.ipv4.addresses).address;
|
||||
in
|
||||
{
|
||||
# Setup a local DNS server for the NTP domain on the eth1 IP address
|
||||
services.tinydns = {
|
||||
enable = true;
|
||||
ip = eth1IP;
|
||||
data = ''
|
||||
.ntp:${eth1IP}
|
||||
+.${ntpHostname}:${ntpIP}
|
||||
'';
|
||||
};
|
||||
|
||||
# Enable systemd-resolved with DNSSEC and use the local DNS as a name server
|
||||
services.resolved.enable = true;
|
||||
services.resolved.dnssec = "true";
|
||||
networking.nameservers = [ eth1IP ];
|
||||
|
||||
# Configure systemd-timesyncd to use our NTP hostname
|
||||
services.timesyncd.enable = lib.mkForce true;
|
||||
services.timesyncd.servers = [ ntpHostname ];
|
||||
services.timesyncd.extraConfig = ''
|
||||
FallbackNTP=${ntpHostname}
|
||||
'';
|
||||
|
||||
# The debug output is necessary to determine whether systemd-timesyncd successfully resolves our NTP hostname or not
|
||||
systemd.services.systemd-timesyncd.environment.SYSTEMD_LOG_LEVEL = "debug";
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("tinydns.service")
|
||||
machine.wait_for_unit("systemd-timesyncd.service")
|
||||
machine.fail("resolvectl query ${ntpHostname}")
|
||||
machine.wait_until_succeeds("journalctl -u systemd-timesyncd.service --grep='Resolved address ${ntpIP}:123 for ${ntpHostname}'")
|
||||
'';
|
||||
})
|
||||
@@ -354,6 +354,10 @@ There are a few naming guidelines:
|
||||
|
||||
Example: Given a project had its latest releases `2.2` in November 2021, and `3.0` in January 2022, a commit authored on March 15, 2022 for an upcoming bugfix release `2.2.1` would have `version = "2.2-unstable-2022-03-15"`.
|
||||
|
||||
- If a project has no suitable preceding releases - e.g., no versions at all, or an incompatible versioning / tagging schema - then the latest upstream version in the above schema should be `0`.
|
||||
|
||||
Example: Given a project that has no tags / released versions at all, or applies versionless tags like `latest` or `YYYY-MM-DD-Build`, a commit authored on March 15, 2022 would have `version = "0-unstable-2022-03-15"`.
|
||||
|
||||
- Dashes in the package `pname` _should_ be preserved in new variable names, rather than converted to underscores or camel cased — e.g., `http-parser` instead of `http_parser` or `httpParser`. The hyphenated style is preferred in all three package names.
|
||||
|
||||
- If there are multiple versions of a package, this _should_ be reflected in the variable names in `all-packages.nix`, e.g. `json-c_0_9` and `json-c_0_11`. If there is an obvious “default” version, make an attribute like `json-c = json-c_0_9;`. See also [versioning][versioning].
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
, stdenv
|
||||
, fetchgit
|
||||
, fetchzip
|
||||
, fetchpatch
|
||||
, alsa-lib
|
||||
, aubio
|
||||
, boost
|
||||
@@ -79,6 +80,12 @@ stdenv.mkDerivation rec {
|
||||
# AS=as in the environment causes build failure https://tracker.ardour.org/view.php?id=8096
|
||||
./as-flags.patch
|
||||
./default-plugin-search-paths.patch
|
||||
|
||||
# Fix build with libxml2 2.12.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/Ardour/ardour/commit/e995daa37529715214c6c4a2587e4134aaaba02f.patch";
|
||||
hash = "sha256-EpXOIIObOwwcNgNma0E3nvaBad3930sagDjBpa+78WI=";
|
||||
})
|
||||
];
|
||||
|
||||
# Ardour's wscript requires git revision and date to be available.
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cava";
|
||||
version = "0.9.1";
|
||||
version = "0.10.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "karlstav";
|
||||
repo = "cava";
|
||||
rev = version;
|
||||
hash = "sha256-W/2B9iTcO2F2vHQzcbg/6pYBwe+rRNfADdOiw4NY9Jk=";
|
||||
hash = "sha256-AQR1qc6HgkUkXBRf7kGy4QdtfCj+YVDlYSEIWOutkTk=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ft2-clone";
|
||||
version = "1.74";
|
||||
version = "1.75";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "8bitbubsy";
|
||||
repo = "ft2-clone";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-plr5vmtYL0adeocY4/3hRI2RQ7lDkLvBbQPq2Jw6MvU=";
|
||||
hash = "sha256-K+RUsRr19fc0E9VhZWIawxkGXCTwqXl3a13pRiRxDPg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
@@ -14,17 +14,17 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "listenbrainz-mpd";
|
||||
version = "2.3.1";
|
||||
version = "2.3.2";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "elomatreb";
|
||||
repo = "listenbrainz-mpd";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-rI6GBDUzI0pHjULoNKWZ4GKlrtpX/4x6Q1Q+DByNqRs=";
|
||||
hash = "sha256-DqxE+wEHDmOmh+iJa312uAWQcg/1ApOTZNLrhGq5KmY=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-8/0WkoDxUJz0QoQiDGHTuU7HmiY9nqUNPvztI0xmqvk=";
|
||||
cargoHash = "sha256-/fd3XIBHwJ95bwirUbMldw2cAfdF2Sv8CPxrbM4WWBI=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config installShellFiles asciidoctor ];
|
||||
|
||||
@@ -37,7 +37,11 @@ rustPlatform.buildRustPackage rec {
|
||||
openssl
|
||||
]);
|
||||
|
||||
buildFeatures = [ "shell_completion" ];
|
||||
buildFeatures = [
|
||||
"shell_completion"
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
"systemd"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion \
|
||||
|
||||
@@ -66,6 +66,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||
] ++ (with python3.pkgs; [
|
||||
sphinx-rtd-theme
|
||||
sphinxHook
|
||||
setuptools
|
||||
]);
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "sidplayfp";
|
||||
version = "2.6.0";
|
||||
version = "2.6.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libsidplayfp";
|
||||
repo = "sidplayfp";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-4SiIfJ/5l/Vf/trt6+XNJbnPvUypZ2yPBCagTcBXrvk=";
|
||||
hash = "sha256-bAd4fq5tlBYfYuIG/02MCbEwjjVBZFJbZJNT13voInw=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
@@ -64,10 +64,6 @@ in python3.pkgs.buildPythonApplication rec {
|
||||
"--prefix" "PATH" ":" (lib.makeBinPath bins)
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
|
||||
'';
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
postBuild = ''
|
||||
make -C man
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
, rocksdb
|
||||
, rust-jemalloc-sys-unprefixed
|
||||
, rustPlatform
|
||||
, rustc-wasm32
|
||||
, rustc
|
||||
, stdenv
|
||||
, Security
|
||||
, SystemConfiguration
|
||||
@@ -63,8 +63,8 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
nativeBuildInputs = [
|
||||
rustPlatform.bindgenHook
|
||||
rustc-wasm32
|
||||
rustc-wasm32.llvmPackages.lld
|
||||
rustc
|
||||
rustc.llvmPackages.lld
|
||||
];
|
||||
|
||||
# NOTE: jemalloc is used by default on Linux with unprefixed enabled
|
||||
|
||||
@@ -10,16 +10,16 @@ let
|
||||
inherit tiling_wm;
|
||||
};
|
||||
stableVersion = {
|
||||
version = "2023.1.1.26"; # "Android Studio Hedgehog | 2023.1.1"
|
||||
sha256Hash = "sha256-l36KmFVBT31BFX8L4OEPt0DEK9M392PV2Ws+BZeAZj0=";
|
||||
version = "2023.1.1.27"; # "Android Studio Hedgehog | 2023.1.1 Patch 1"
|
||||
sha256Hash = "sha256-XF+XyHGk7dPTBHKcx929qdFHu6hRJWFO382mh4SuWDs=";
|
||||
};
|
||||
betaVersion = {
|
||||
version = "2023.2.1.19"; # "Android Studio Iguana | 2023.2.1 Beta 1"
|
||||
sha256Hash = "sha256-lfJBX7RLIziiuv805+gdt8xfJkFjy0bSh77/bjkNFH4=";
|
||||
version = "2023.2.1.20"; # "Android Studio Iguana | 2023.2.1 Beta 2"
|
||||
sha256Hash = "sha256-cFEPgFAKkFx0d7PC4fTElTQVrBZMQs0RL3wR+hqTh2I=";
|
||||
};
|
||||
latestVersion = {
|
||||
version = "2023.2.1.18"; # "Android Studio Iguana | 2023.2.1 Canary 18"
|
||||
sha256Hash = "sha256-QvyA/1IvqIgGkBWryY0Q7LqGA6I1f9Xn8GA1g19jt+w=";
|
||||
version = "2023.3.1.3"; # "Android Studio Jellyfish | 2023.3.1 Canary 3"
|
||||
sha256Hash = "sha256-cPCn9dsQ0v1C2bxXzPoxjuucsMtkeO8D6dVt8hcIluQ=";
|
||||
};
|
||||
in {
|
||||
# Attributes are named by their corresponding release channels
|
||||
|
||||
@@ -117,6 +117,37 @@ in buildFHSEnv rec {
|
||||
passthru = {
|
||||
inherit unwrapped;
|
||||
tests = {
|
||||
buildSof = runCommand "quartus-prime-lite-test-build-sof"
|
||||
{ nativeBuildInputs = [ quartus-prime-lite ];
|
||||
}
|
||||
''
|
||||
cat >mydesign.vhd <<EOF
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
|
||||
entity mydesign is
|
||||
port (
|
||||
in_0: in std_logic;
|
||||
in_1: in std_logic;
|
||||
out_1: out std_logic
|
||||
);
|
||||
end mydesign;
|
||||
|
||||
architecture dataflow of mydesign is
|
||||
begin
|
||||
out_1 <= in_0 and in_1;
|
||||
end dataflow;
|
||||
EOF
|
||||
|
||||
quartus_sh --flow compile mydesign
|
||||
|
||||
if ! [ -f mydesign.sof ]; then
|
||||
echo "error: failed to produce mydesign.sof" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
touch "$out"
|
||||
'';
|
||||
questaEncryptedModel = runCommand "quartus-prime-lite-test-questa-encrypted-model" {} ''
|
||||
"${quartus-prime-lite}/bin/vlog" "${quartus-prime-lite.unwrapped}/questa_fse/intel/verilog/src/arriav_atoms_ncrypt.v"
|
||||
touch "$out"
|
||||
|
||||
@@ -25,20 +25,20 @@ let
|
||||
) deviceIds;
|
||||
|
||||
componentHashes = {
|
||||
"arria_lite" = "07p862i3dn2c0s3p39y23g94id59nzrpzbwdmrdnhy61ca3m0vzp";
|
||||
"cyclone" = "0dic35j9q1ndrn8i2vdqg9176fr3kn6c8iiv0c03nni0m4ar3ykn";
|
||||
"cyclone10lp" = "03w4f71fhhwvnkzzly9m15nrdf0jw8m0ckhhzv1vg3nd9pkk86jh";
|
||||
"cyclonev" = "091mlg2iy452fk28idbiwi3rhcgkbhg7ggh3xvnqa9jrfffq9pjc";
|
||||
"max" = "0r649l2n6hj6x5v6hx8k4xnvd6df6wxajx1xp2prq6dpapjfb06y";
|
||||
"max10" = "1p5ds3cq2gq2mzq2hjwwjhw50c931kgiqxaf7ss228c6s7rv6zpk";
|
||||
"arria_lite" = "0fg9mmncbb8vmmbc3hxgmrgvgfphn3k4glv7w2yjq66vz6nd8zql";
|
||||
"cyclone" = "1min1hjaw8ll0c1gvl6ihp7hczw36ag8l2yzgl6avcapcw53hgyp";
|
||||
"cyclone10lp" = "1kjjm11hjg0h6i7kilxvhmkay3v416bhwp0frg2bnwggpk29drxj";
|
||||
"cyclonev" = "10v928qhyfqw3lszhhcdishh1875k1bki9i0czx9252jprgd1g7g";
|
||||
"max" = "04sszzz3qnjziirisshhdqs7ks8mcvy15lc1mpp9sgm09pwlhgbb";
|
||||
"max10" = "0dqlq477zdx4pf5hlbkl1ycxiav19vx4sk6277cpxm8y1xz70972";
|
||||
};
|
||||
|
||||
version = "22.1std.2.922";
|
||||
version = "23.1std.0.991";
|
||||
|
||||
download = {name, sha256}: fetchurl {
|
||||
inherit name sha256;
|
||||
# e.g. "22.1std.2.922" -> "22.1std.2/922"
|
||||
url = "https://downloads.intel.com/akdlm/software/acdsinst/${lib.versions.majorMinor version}std.${lib.elemAt (lib.splitVersion version) 3}/${lib.elemAt (lib.splitVersion version) 4}/ib_installers/${name}";
|
||||
# e.g. "23.1std.0.991" -> "23.1std/921"
|
||||
url = "https://downloads.intel.com/akdlm/software/acdsinst/${lib.versions.majorMinor version}std/${lib.elemAt (lib.splitVersion version) 4}/ib_installers/${name}";
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
@@ -47,10 +47,10 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
src = map download ([{
|
||||
name = "QuartusLiteSetup-${version}-linux.run";
|
||||
sha256 = "078x42pbc51n6ynrvzpwiwgi6g2sg4csv6x2vnnzjgx6bg5kq6l3";
|
||||
sha256 = "1mg4db56rg407kdsvpzys96z59bls8djyddfzxi6bdikcklxz98h";
|
||||
} {
|
||||
name = "QuestaSetup-${version}-linux.run";
|
||||
sha256 = "04pv5fq3kfy3xsjnj435zzpj5kf6329cbs1xgvkgmq1gpn4ji5zy";
|
||||
sha256 = "0f9lyphk4vf4ijif3kb4iqf18jl357z9h8g16kwnzaqwfngh2ixk";
|
||||
}] ++ (map (id: {
|
||||
name = "${id}-${version}.qdz";
|
||||
sha256 = lib.getAttr id componentHashes;
|
||||
|
||||
@@ -13,6 +13,12 @@ stdenv.mkDerivation {
|
||||
buildInputs = [ gtk2 ];
|
||||
sourceRoot = "scintilla/gtk";
|
||||
|
||||
CXXFLAGS = [
|
||||
# GCC 13: error: 'intptr_t' does not name a type
|
||||
"-include cstdint"
|
||||
"-include system_error"
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
make
|
||||
cd ../../lexilla/src
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, glib, gst_all_1, makeWrapper, pkg-config
|
||||
, python2, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, sqlite, zlib, runtimeShell
|
||||
, python3, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, sqlite, zlib, runtimeShell
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
|
||||
sha256 = "sha256-uBfECbU2Df/pPpEXXq62S7Ec0YU4lPIsZ8k5UmKD7xQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake makeWrapper pkg-config python2 ];
|
||||
nativeBuildInputs = [ cmake makeWrapper pkg-config python3 ];
|
||||
|
||||
buildInputs = [
|
||||
glib gst_all_1.gstreamer SDL2 SDL2_image SDL2_mixer SDL2_ttf sqlite zlib
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{ stdenv, fetchFromGitHub, unstableGitUpdater }:
|
||||
stdenv.mkDerivation {
|
||||
pname = "yuzu-compatibility-list";
|
||||
version = "unstable-2023-12-28";
|
||||
version = "unstable-2024-01-08";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "flathub";
|
||||
repo = "org.yuzu_emu.yuzu";
|
||||
rev = "0b9bf10851d6ad54441dc4f687d5755ed2c6f7a8";
|
||||
hash = "sha256-oWEeAhyxFO1TFH3d+/ivRf1KnNUU8y5c/7NtOzlpKXg=";
|
||||
rev = "0f5500f50e2a5ac7e40e6f5f8aeb160d46348828";
|
||||
hash = "sha256-0JHl7myoa3MlfucmbKB5tubJ6sQ2IlTIL3i2yveOvaU=";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Generated by ./update.sh - do not update manually!
|
||||
# Last updated: 2023-12-29
|
||||
# Last updated: 2024-01-10
|
||||
{
|
||||
version = "4037";
|
||||
distHash = "sha256:0pw56hj13fm9j5nja1lhj839d88w00kcr30kygasr36w9c7yv2n7";
|
||||
fullHash = "sha256:0f42fp8z333b3k4pn8j0cp3480llvlygl5p6qfgywhq3g5hcpzpb";
|
||||
version = "4056";
|
||||
distHash = "sha256:14qd5v238pka9axrxjbaawr0kpkkbd95mzri6jdjxjyzbkk03hmb";
|
||||
fullHash = "sha256:0fb4i6708q59ql9ffrw2myanqgxpy20z971y6l7yvxm1pqw9qhyx";
|
||||
}
|
||||
|
||||
@@ -47,13 +47,13 @@
|
||||
}:
|
||||
stdenv.mkDerivation(finalAttrs: {
|
||||
pname = "yuzu";
|
||||
version = "1665";
|
||||
version = "1676";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "yuzu-emu";
|
||||
repo = "yuzu-mainline";
|
||||
rev = "mainline-0-${finalAttrs.version}";
|
||||
hash = "sha256-xzSup1oz83GPpOGh9aJJ5YjoFX/cBI8RV6SvDYNH/zA=";
|
||||
hash = "sha256-vRrliVuGXI/Dpmdkbj+P5hshzPzB6nijrXQfLXHaGqk=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
@@ -162,6 +162,10 @@ stdenv.mkDerivation(finalAttrs: {
|
||||
ln -sf ${compat-list} ./dist/compatibility_list/compatibility_list.json
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -Dm444 $src/dist/72-yuzu-input.rules $out/lib/udev/rules.d/72-yuzu-input.rules
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [ "--version-regex" "mainline-0-(.*)" ];
|
||||
};
|
||||
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p nix-update
|
||||
#shellcheck shell=bash
|
||||
nix-update -u yuzuPackages.nx_tzdb "$@"
|
||||
nix-update -u yuzuPackages.compat-list "$@"
|
||||
nix-update -u yuzuPackages.mainline "$@"
|
||||
nix-update -u yuzuPackages.early-access "$@"
|
||||
@@ -5,7 +5,8 @@
|
||||
, appstream-glib
|
||||
, desktop-file-utils
|
||||
, gettext
|
||||
, gtk3
|
||||
, gtk4
|
||||
, libadwaita
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
@@ -14,18 +15,19 @@
|
||||
, libwebp
|
||||
, optipng
|
||||
, pngquant
|
||||
, oxipng
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "curtail";
|
||||
version = "1.3.1";
|
||||
version = "1.8.0";
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Huluti";
|
||||
repo = "Curtail";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "sha256-/xvkRXs1EVu+9RZM+TnyIGxFV2stUR9XHEmaJxsJ3V8=";
|
||||
sha256 = "sha256-LLz4nZ9WFQMogQR2gCKn80gvHUG5hlpQpcNjpr4fs2s=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -33,7 +35,8 @@ python3.pkgs.buildPythonApplication rec {
|
||||
appstream-glib
|
||||
desktop-file-utils
|
||||
gettext
|
||||
gtk3
|
||||
gtk4
|
||||
libadwaita
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
@@ -43,7 +46,8 @@ python3.pkgs.buildPythonApplication rec {
|
||||
buildInputs = [
|
||||
appstream-glib
|
||||
gettext
|
||||
gtk3
|
||||
gtk4
|
||||
libadwaita
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@@ -59,7 +63,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||
preFixup = ''
|
||||
makeWrapperArgs+=(
|
||||
"''${gappsWrapperArgs[@]}"
|
||||
"--prefix" "PATH" ":" "${lib.makeBinPath [ jpegoptim libwebp optipng pngquant ]}"
|
||||
"--prefix" "PATH" ":" "${lib.makeBinPath [ jpegoptim libwebp optipng pngquant oxipng ]}"
|
||||
)
|
||||
'';
|
||||
|
||||
|
||||
+343
-855
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "emblem";
|
||||
version = "1.2.0";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
@@ -27,14 +27,11 @@ stdenv.mkDerivation rec {
|
||||
owner = "design";
|
||||
repo = "emblem";
|
||||
rev = version;
|
||||
sha256 = "sha256-sgo6rGwmybouTTBTPFrPJv8Wo9I6dcoT7sUVQGFUqkQ=";
|
||||
sha256 = "sha256-VA4KZ8x/MMAA/g/x59h1CyHhlj0vbZqwAFdsfTPA2Ds=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.importCargoLock {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"librsvg-2.56.0" = "sha256-PIrec3nfeMo94bkYUrp6B7lie9O1RtiBdPMFUKKLtTQ=";
|
||||
};
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -24,20 +24,20 @@
|
||||
|
||||
clangStdenv.mkDerivation rec {
|
||||
pname = "gnome-decoder";
|
||||
version = "0.3.3";
|
||||
version = "0.4.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "World";
|
||||
repo = "decoder";
|
||||
rev = version;
|
||||
hash = "sha256-eMyPN3UxptqavY9tEATW2AP+kpoWaLwUKCwhNQrarVc=";
|
||||
hash = "sha256-ZEt4QaT2w7PgsnwBCYeDbhcYX0yd0boes/LoejQx0XU=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
inherit src;
|
||||
name = "${pname}-${version}";
|
||||
hash = "sha256-3j1hoFffQzWBy4IKtmoMkLBJmNbntpyn0sjv1K0MmDo=";
|
||||
hash = "sha256-acYOSPSUgm0Kg/bo2WF4sRWfCt03AZdTyNNt3Qv7Zjg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -37,6 +37,11 @@ mkDerivation rec {
|
||||
"-DALGLIB_DIR:PATH=${alglib}"
|
||||
];
|
||||
|
||||
CXXFLAGS = [
|
||||
# GCC 13: error: 'uint32_t' does not name a type
|
||||
"-include cstdint"
|
||||
];
|
||||
|
||||
patches = [
|
||||
# https://github.com/jcelaya/hdrmerge/pull/222
|
||||
(fetchpatch {
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
{ lib, fetchFromGitHub, buildPythonApplication, pillow, imgp }:
|
||||
{ lib, fetchFromGitHub, buildPythonApplication, pythonOlder, pillow }:
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "imgp";
|
||||
version = "2.8";
|
||||
version = "2.9";
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jarun";
|
||||
repo = pname;
|
||||
repo = "imgp";
|
||||
rev = "v${version}";
|
||||
sha256 = "1miabaxd5pwxn0va4drzj1d4ppxvyqsrrd4xw1j6qr52yci0lms8";
|
||||
hash = "sha256-yQ2BzOBn6Bl9ieZkREKsj1zLnoPcf0hZhZ90Za5kiKA=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace imgp \
|
||||
--replace "Image.ANTIALIAS" "Image.Resampling.LANCZOS"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ pillow ];
|
||||
|
||||
installFlags = [
|
||||
@@ -36,7 +32,7 @@ buildPythonApplication rec {
|
||||
meta = with lib; {
|
||||
description = "High-performance CLI batch image resizer & rotator";
|
||||
homepage = "https://github.com/jarun/imgp";
|
||||
license = licenses.gpl3;
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
};
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
, cmake
|
||||
, desktopToDarwinBundle
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, gettext
|
||||
, ghostscript
|
||||
, glib
|
||||
@@ -92,6 +93,13 @@ stdenv.mkDerivation rec {
|
||||
src = ./fix-ps2pdf-path.patch;
|
||||
inherit ghostscript;
|
||||
})
|
||||
|
||||
# Fix build with libxml2 2.12
|
||||
# https://gitlab.com/inkscape/inkscape/-/merge_requests/6089
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.com/inkscape/inkscape/-/commit/694d8ae43d06efff21adebf377ce614d660b24cd.patch";
|
||||
hash = "sha256-9IXJzpZbNU5fnt7XKgqCzUDrwr08qxGwo8TqnL+xc6E=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -21,6 +21,15 @@ mkDerivation rec {
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fixes build with SIP 6.8
|
||||
(fetchpatch {
|
||||
name = "bump-SIP-ABI-version-to-12.8.patch";
|
||||
url = "https://invent.kde.org/graphics/krita/-/commit/2d71c47661d43a4e3c1ab0c27803de980bdf2bb2.diff";
|
||||
hash = "sha256-U3E44nj4vra++PJV20h4YHjES78kgrJtr4ktNeQfOdA=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake extra-cmake-modules pkg-config python3Packages.sip makeWrapper ];
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@@ -75,6 +75,11 @@ mkDerivation rec {
|
||||
"-DALLOW_BUNDLED_LEVMAR=ON"
|
||||
];
|
||||
|
||||
CXXFLAGS = [
|
||||
# GCC 13: error: 'int16_t' has not been declared in 'std'
|
||||
"-include cstdint"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
patchelf --add-needed $out/lib/meshlab/libmeshlab-common.so $out/bin/.meshlab-wrapped
|
||||
'';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, pkg-config
|
||||
, autoreconfHook
|
||||
, wrapGAppsHook
|
||||
@@ -54,6 +55,17 @@ let
|
||||
pname = "synfig";
|
||||
inherit version src;
|
||||
|
||||
patches = [
|
||||
# Pull upstream fix for autoconf-2.72 support:
|
||||
# https://github.com/synfig/synfig/pull/2930
|
||||
(fetchpatch {
|
||||
name = "autoconf-2.72.patch";
|
||||
url = "https://github.com/synfig/synfig/commit/80a3386c701049f597cf3642bb924d2ff832ae05.patch";
|
||||
stripLen = 1;
|
||||
hash = "sha256-7gX8tJCR81gw8ZDyNYa8UaeZFNOx4o1Lnq0cAcaKb2I=";
|
||||
})
|
||||
];
|
||||
|
||||
sourceRoot = "${src.name}/synfig-core";
|
||||
|
||||
configureFlags = [
|
||||
|
||||
@@ -16,6 +16,14 @@ stdenv.mkDerivation rec {
|
||||
# great, but tesseract4's days are numbered anyway
|
||||
postPatch = ''
|
||||
sed -i '/allheaders.h/a#include "pix_internal.h"' src/textord/devanagari_processing.cpp
|
||||
|
||||
# gcc-13 compat fix, simulate this upstream patch:
|
||||
# https://github.com/tesseract-ocr/tesseract/commit/17e795aaae7d40dbcb7d3365835c2f55ecc6355d.patch
|
||||
# https://github.com/tesseract-ocr/tesseract/commit/c0db7b7e930322826e09981360e39fdbd16cc9b0.patch
|
||||
|
||||
sed -i src/ccutil/helpers.h -e '1i #include <climits>'
|
||||
sed -i src/ccutil/helpers.h -e '1i #include <cstdint>'
|
||||
sed -i src/dict/matchdefs.h -e '1i #include <cstdint>'
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -34,6 +34,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
"-W" "ignore::sphinx.deprecation.RemovedInSphinx90Warning"
|
||||
"--rootdir" "src/ablog"
|
||||
];
|
||||
|
||||
|
||||
@@ -6,15 +6,21 @@
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "acpic";
|
||||
version = "1.0.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit version pname;
|
||||
hash = "sha256-vQ9VxCNbOmqHIY3e1wq1wNJl5ywfU2tm62gDg3vKvcg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
python3Packages.pbr
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "pbr>=5.8.1,<6" "pbr"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = with python3Packages; [
|
||||
pbr
|
||||
setuptools
|
||||
];
|
||||
|
||||
# no tests
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, python3
|
||||
, fetchFromGitHub
|
||||
, fetchPypi
|
||||
, curl
|
||||
, wget
|
||||
, git
|
||||
, ripgrep
|
||||
, postlight-parser
|
||||
, readability-extractor
|
||||
, chromium
|
||||
, yt-dlp
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -34,6 +43,8 @@ let
|
||||
rev = "e43f383dae3a35237e42f6acfe1207a8e7e7bdf5";
|
||||
hash = "sha256-NAMa78KhAuoJfp0Cb0Codz84sRfRQ1JhSLNYRI4GBPM=";
|
||||
};
|
||||
# possibly a real issue, but that version is not supported anymore
|
||||
disabledTests = [ "test_should_highlight_bash_syntax_without_name" ];
|
||||
});
|
||||
};
|
||||
};
|
||||
@@ -41,31 +52,51 @@ in
|
||||
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
pname = "archivebox";
|
||||
version = "0.6.2";
|
||||
version = "0.7.2";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-zHty7lTra6yab9d0q3EqsPG3F+lrnZL6PjQAbL1A2NY=";
|
||||
hash = "sha256-hdBUEX2tOWN2b11w6aG3x7MP7KQTj4Rwc2w8XvABGf4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with python.pkgs; [
|
||||
pdm-backend
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
requests
|
||||
mypy-extensions
|
||||
croniter
|
||||
dateparser
|
||||
django
|
||||
django-extensions
|
||||
dateparser
|
||||
youtube-dl
|
||||
python-crontab
|
||||
croniter
|
||||
w3lib
|
||||
ipython
|
||||
mypy-extensions
|
||||
python-crontab
|
||||
requests
|
||||
w3lib
|
||||
yt-dlp
|
||||
];
|
||||
|
||||
makeWrapperArgs = [
|
||||
"--set USE_NODE True" # used through dependencies, not needed explicitly
|
||||
"--set READABILITY_BINARY ${lib.meta.getExe readability-extractor}"
|
||||
"--set MERCURY_BINARY ${lib.meta.getExe postlight-parser}"
|
||||
"--set CURL_BINARY ${lib.meta.getExe curl}"
|
||||
"--set RIPGREP_BINARY ${lib.meta.getExe ripgrep}"
|
||||
"--set WGET_BINARY ${lib.meta.getExe wget}"
|
||||
"--set GIT_BINARY ${lib.meta.getExe git}"
|
||||
"--set YOUTUBEDL_BINARY ${lib.meta.getExe yt-dlp}"
|
||||
] ++ (if (lib.meta.availableOn stdenv.hostPlatform chromium) then [
|
||||
"--set CHROME_BINARY ${chromium}/bin/chromium-browser"
|
||||
] else [
|
||||
"--set-default USE_CHROME False"
|
||||
]);
|
||||
|
||||
meta = with lib; {
|
||||
description = "Open source self-hosted web archiving";
|
||||
homepage = "https://archivebox.io";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ siraben ];
|
||||
maintainers = with maintainers; [ siraben viraptor ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -79,6 +79,8 @@ stdenv.mkDerivation rec {
|
||||
++ lib.optional enableLibpulseaudio libpulseaudio
|
||||
++ lib.optional stdenv.isDarwin CoreAudio;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Sample Rate Converter for audio";
|
||||
homepage = "https://sox.sourceforge.net/";
|
||||
|
||||
@@ -24,20 +24,20 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "authenticator";
|
||||
version = "4.3.0";
|
||||
version = "4.4.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "World";
|
||||
repo = "Authenticator";
|
||||
rev = version;
|
||||
hash = "sha256-WR5gXGry4wti2M4D/IQvwI7OSak1p+O+XAhr01hdv2Q=";
|
||||
hash = "sha256-LNYhUDV5nM46qx29xXE6aCEdBo7VnwT61YgAW0ZXW30=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
inherit src;
|
||||
name = "${pname}-${version}";
|
||||
hash = "sha256-ZVDKTJojblVCbbdtnqcL+UVW1vkmu99AXCbgyCGNHCM=";
|
||||
hash = "sha256-ntkKH4P3Ui2NZSVy87hGAsRA1GDRwoK9UnA/nFjyLnA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -26,6 +26,11 @@ mkDerivation rec {
|
||||
})
|
||||
];
|
||||
|
||||
CXXFLAGS = [
|
||||
# error: 'uint8_t' is not a member of 'std'; did you mean 'wint_t'?
|
||||
"-include cstdint"
|
||||
];
|
||||
|
||||
buildInputs = [ curl xorg.libX11 xorg.libXext xorg.libXtst avahiWithLibdnssdCompat qtbase ];
|
||||
nativeBuildInputs = [ cmake wrapGAppsHook ];
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
appimageTools.wrapAppImage rec {
|
||||
pname = "bazecor";
|
||||
version = "1.3.8";
|
||||
version = "1.3.9";
|
||||
|
||||
src = appimageTools.extract {
|
||||
inherit pname version;
|
||||
src = fetchurl {
|
||||
url = "https://github.com/Dygmalab/Bazecor/releases/download/v${version}/Bazecor-${version}-x64.AppImage";
|
||||
hash = "sha256-SwlSH5z0p9ZVoDQzj4GxO3g/iHG8zQZndE4TmqdMtZQ=";
|
||||
hash = "sha256-qve5xxhhyVej8dPDkZ7QQdeDUmqGO4pHJTykbS4RhAk=";
|
||||
};
|
||||
|
||||
# Workaround for https://github.com/Dygmalab/Bazecor/issues/370
|
||||
@@ -26,7 +26,7 @@ appimageTools.wrapAppImage rec {
|
||||
|
||||
# also make sure to update the udev rules in ./10-dygma.rules; most recently
|
||||
# taken from
|
||||
# https://github.com/Dygmalab/Bazecor/blob/v1.3.8/src/main/utils/udev.ts#L6
|
||||
# https://github.com/Dygmalab/Bazecor/blob/v1.3.9/src/main/utils/udev.ts#L6
|
||||
|
||||
extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [
|
||||
p.glib
|
||||
@@ -39,6 +39,12 @@ appimageTools.wrapAppImage rec {
|
||||
extraInstallCommands = ''
|
||||
mv $out/bin/bazecor-* $out/bin/bazecor
|
||||
|
||||
install -m 444 -D ${src}/Bazecor.desktop -t $out/share/applications
|
||||
substituteInPlace $out/share/applications/Bazecor.desktop \
|
||||
--replace 'Exec=Bazecor' 'Exec=bazecor'
|
||||
|
||||
install -m 444 -D ${src}/bazecor.png -t $out/share/pixmaps
|
||||
|
||||
mkdir -p $out/lib/udev/rules.d
|
||||
ln -s --target-directory=$out/lib/udev/rules.d ${./10-dygma.rules}
|
||||
'';
|
||||
|
||||
@@ -19,6 +19,7 @@ in
|
||||
with python3.pkgs; buildPythonApplication rec {
|
||||
version = "4.8";
|
||||
pname = "buku";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jarun";
|
||||
@@ -27,6 +28,10 @@ with python3.pkgs; buildPythonApplication rec {
|
||||
sha256 = "sha256-kPVlfTYUusf5CZnKB53WZcCHo3MEnA2bLUHTRPGPn+8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
hypothesis
|
||||
pytest
|
||||
|
||||
@@ -32,11 +32,11 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "calibre";
|
||||
version = "7.2.0";
|
||||
version = "7.3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.calibre-ebook.com/${finalAttrs.version}/calibre-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-1OZPSXF5cQlmwbD2bHVWtYHLUgCo8LaR1WPpuSUWoR8=";
|
||||
hash = "sha256-fBdLXSRJMBVfQOfuqOqHzgHS8fXYq2x5J181pKZhASo=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
||||
-2620
File diff suppressed because it is too large
Load Diff
@@ -22,21 +22,19 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "citations";
|
||||
version = "0.5.2";
|
||||
version = "0.6.2";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "World";
|
||||
repo = finalAttrs.pname;
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-QofsVqulFMiyYKci2vHdQAUJoIIgnPyTRizoBDvYG+g=";
|
||||
hash = "sha256-RV9oQcXzRsNcvZc/8Xt7qZ/88DvHofC2Av0ftxzeF6Q=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.importCargoLock {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"nom-bibtex-0.4.0" = "sha256-hulMoH3gkhD2HurrXdIqqkfKkZGujV9We0m0jsgHFfM=";
|
||||
};
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
src = finalAttrs.src;
|
||||
hash = "sha256-XlqwgXuwxR6oEz0+hYAp/3b+XxH+Vd/DGr5j+iKhUjQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -62,6 +60,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
darwin.apple_sdk.frameworks.Foundation
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang (lib.concatStringsSep " " [
|
||||
"-Wno-typedef-redefinition"
|
||||
"-Wno-unused-parameter"
|
||||
"-Wno-missing-field-initializers"
|
||||
"-Wno-incompatible-function-pointer-types"
|
||||
]);
|
||||
|
||||
doCheck = true;
|
||||
|
||||
nativeCheckInputs = [ clippy ];
|
||||
@@ -81,5 +86,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ benediktbroich ];
|
||||
platforms = platforms.unix;
|
||||
mainProgram = "citations";
|
||||
};
|
||||
})
|
||||
|
||||
@@ -1,31 +1,46 @@
|
||||
{ stdenv, lib, fetchpatch, fetchFromGitHub, makeWrapper, writeText, runtimeShell, jdk11, perl, gradle_6, which }:
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchpatch
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, makeDesktopItem
|
||||
, writeText
|
||||
, runtimeShell
|
||||
, jdk17
|
||||
, perl
|
||||
, gradle_7
|
||||
, which
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "freeplane";
|
||||
version = "1.9.14";
|
||||
version = "1.11.8";
|
||||
|
||||
src_sha256 = "UiXtGJs+hibB63BaDDLXgjt3INBs+NfMsKcX2Q/kxKw=";
|
||||
deps_outputHash = "tHhRaMIQK8ERuzm+qB9tRe2XSesL0bN3rComB9/qWgg=";
|
||||
emoji_outputHash = "w96or4lpKCRK8A5HaB4Eakr7oVSiQALJ9tCJvKZaM34=";
|
||||
src_hash = "sha256-Qh2V265FvQpqGKmPsiswnC5yECwIcNwMI3/Ka9sBqXE=";
|
||||
deps_outputHash = "sha256-2Zaw4FW12dThdr082dEB1EYkGwNiayz501wIPGXUfBw=";
|
||||
|
||||
jdk = jdk11;
|
||||
gradle = gradle_6;
|
||||
jdk = jdk17;
|
||||
gradle = gradle_7;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "release-${version}";
|
||||
sha256 = src_sha256;
|
||||
hash = src_hash;
|
||||
};
|
||||
|
||||
deps = stdenv.mkDerivation {
|
||||
name = "${pname}-deps";
|
||||
inherit src;
|
||||
pname = "${pname}-deps";
|
||||
inherit src version;
|
||||
|
||||
nativeBuildInputs = [ jdk perl gradle ];
|
||||
nativeBuildInputs = [
|
||||
jdk
|
||||
perl
|
||||
gradle
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
GRADLE_USER_HOME=$PWD gradle -Dorg.gradle.java.home=${jdk} --no-daemon jar
|
||||
GRADLE_USER_HOME=$PWD gradle -Dorg.gradle.java.home=${jdk} --no-daemon build
|
||||
'';
|
||||
|
||||
# Mavenize dependency paths
|
||||
@@ -34,7 +49,15 @@ let
|
||||
find ./caches/modules-2 -type f -regex '.*\.\(jar\|pom\)' \
|
||||
| perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \
|
||||
| sh
|
||||
# com/squareup/okio/okio/2.10.0/okio-jvm-2.10.0.jar expected to exist under name okio-2.10.0.jar
|
||||
while IFS="" read -r -d "" path; do
|
||||
dir=''${path%/*}; file=''${path##*/}; dest=''${file//-jvm-/-}
|
||||
[[ -e $dir/$dest ]] && continue
|
||||
ln -s "$dir/$file" "$dir/$dest"
|
||||
done < <(find "$out" -type f -name 'okio-jvm-*.jar' -print0)
|
||||
'';
|
||||
# otherwise the package with a namespace starting with info/... gets moved to share/info/...
|
||||
forceShare = [ "dummy" ];
|
||||
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
@@ -43,72 +66,78 @@ let
|
||||
|
||||
# Point to our local deps repo
|
||||
gradleInit = writeText "init.gradle" ''
|
||||
logger.lifecycle 'Replacing Maven repositories with ${deps}...'
|
||||
gradle.projectsLoaded {
|
||||
rootProject.allprojects {
|
||||
buildscript {
|
||||
repositories {
|
||||
clear()
|
||||
maven { url '${deps}' }
|
||||
}
|
||||
}
|
||||
settingsEvaluated { settings ->
|
||||
settings.pluginManagement {
|
||||
repositories {
|
||||
clear()
|
||||
maven { url '${deps}' }
|
||||
}
|
||||
}
|
||||
}
|
||||
settingsEvaluated { settings ->
|
||||
settings.pluginManagement {
|
||||
gradle.projectsLoaded {
|
||||
rootProject.allprojects {
|
||||
repositories {
|
||||
clear()
|
||||
maven { url '${deps}' }
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
emoji = stdenv.mkDerivation rec {
|
||||
name = "${pname}-emoji";
|
||||
inherit src;
|
||||
|
||||
nativeBuildInputs = [ jdk gradle ];
|
||||
|
||||
buildPhase = ''
|
||||
GRADLE_USER_HOME=$PWD gradle -Dorg.gradle.java.home=${jdk} --no-daemon --offline --init-script ${gradleInit} :freeplane:downloadEmoji
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/emoji/txt $out/resources/images
|
||||
cp freeplane/build/emoji/txt/emojilist.txt $out/emoji/txt
|
||||
cp -r freeplane/build/emoji/resources/images/emoji/. $out/resources/images/emoji
|
||||
'';
|
||||
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = emoji_outputHash;
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
inherit pname version src;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper jdk gradle ];
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
jdk
|
||||
gradle
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p -- ./freeplane/build/emoji/{txt,resources/images}
|
||||
cp ${emoji}/emoji/txt/emojilist.txt ./freeplane/build/emoji/txt/emojilist.txt
|
||||
cp -r ${emoji}/resources/images/emoji ./freeplane/build/emoji/resources/images/emoji
|
||||
GRADLE_USER_HOME=$PWD gradle -Dorg.gradle.java.home=${jdk} --no-daemon --offline --init-script ${gradleInit} -x test -x :freeplane:downloadEmoji build
|
||||
mkdir -p freeplane/build
|
||||
|
||||
GRADLE_USER_HOME=$PWD \
|
||||
gradle -Dorg.gradle.java.home=${jdk} \
|
||||
--no-daemon --offline --init-script ${gradleInit} \
|
||||
-x test \
|
||||
build
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "freeplane";
|
||||
desktopName = "freeplane";
|
||||
genericName = "Mind-mapper";
|
||||
exec = "freeplane";
|
||||
icon = "freeplane";
|
||||
comment = meta.description;
|
||||
mimeTypes = [
|
||||
"application/x-freemind"
|
||||
"application/x-freeplane"
|
||||
"text/x-troff-mm"
|
||||
];
|
||||
categories = [
|
||||
"2DGraphics"
|
||||
"Chart"
|
||||
"Graphics"
|
||||
"Office"
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin $out/share
|
||||
|
||||
cp -a ./BIN/. $out/share/${pname}
|
||||
makeWrapper $out/share/${pname}/${pname}.sh $out/bin/${pname} \
|
||||
--set FREEPLANE_BASE_DIR $out/share/${pname} \
|
||||
mkdir -p $out/bin $out/share
|
||||
cp -a ./BIN/. $out/share/freeplane
|
||||
|
||||
makeWrapper $out/share/freeplane/freeplane.sh $out/bin/freeplane \
|
||||
--set FREEPLANE_BASE_DIR $out/share/freeplane \
|
||||
--set JAVA_HOME ${jdk} \
|
||||
--prefix PATH : ${lib.makeBinPath [ jdk which ]}
|
||||
--prefix PATH : ${lib.makeBinPath [ jdk which ]} \
|
||||
--prefix _JAVA_AWT_WM_NONREPARENTING : 1 \
|
||||
--prefix _JAVA_OPTIONS : "-Dawt.useSystemAAFontSettings=on"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
||||
@@ -9,29 +9,29 @@
|
||||
let
|
||||
esbuild' = buildPackages.esbuild.override {
|
||||
buildGoModule = args: buildPackages.buildGoModule (args // rec {
|
||||
version = "0.18.20";
|
||||
version = "0.19.11";
|
||||
src = fetchFromGitHub {
|
||||
owner = "evanw";
|
||||
repo = "esbuild";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-mED3h+mY+4H465m02ewFK/BgA1i/PQ+ksUNxBlgpUoI=";
|
||||
hash = "sha256-NUwjzOpHA0Ijuh0E69KXx8YVS5GTnKmob9HepqugbIU=";
|
||||
};
|
||||
vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=";
|
||||
});
|
||||
};
|
||||
in buildNpmPackage rec {
|
||||
pname = "kaufkauflist";
|
||||
version = "3.1.0";
|
||||
version = "3.3.0";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "annaaurora";
|
||||
repo = "kaufkauflist";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-gIwJtfausORMfmZONhSOZ1DRW5CSH+cLDCNy3j+u6d0=";
|
||||
hash = "sha256-kqDNA+BALVMrPZleyPxxCyls4VKBzY2MttzO51+Ixo8=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-d1mvC72ugmKLNStoemUr8ISCUYjyo9EDWdWUCD1FMiM=";
|
||||
npmDepsHash = "sha256-O2fcmC7Hj9JLStMukyt12aMgntjXT7Lv3vYJp3GqO24=";
|
||||
|
||||
ESBUILD_BINARY_PATH = lib.getExe esbuild';
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@ python3Packages.buildPythonApplication rec {
|
||||
hatch-vcs
|
||||
];
|
||||
|
||||
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
pykeepass
|
||||
pynput
|
||||
|
||||
@@ -17,8 +17,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
hash = "sha256-yI33pB/t+UISvSbLUzmsZqBxLF6r8R3j9iPNeosKcYw=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
nativeBuildInputs = [
|
||||
glibcLocales
|
||||
installShellFiles
|
||||
|
||||
@@ -9,7 +9,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
sha256 = "sha256-WfMKDaPD2j6wT02+GO5HY5E7aF2Z7IQY/VdKiMSRxJA=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
nativeBuildInputs = with python3.pkgs; [
|
||||
setuptools-scm
|
||||
sphinxHook
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "limesctl";
|
||||
version = "3.3.1";
|
||||
version = "3.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sapcc";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-osXwVZuMB9cMj0tEMBOQ8hrKWAmfXui4ELoi0dm9yB4=";
|
||||
hash = "sha256-UYQe2C50tB1uc5ij8oh+RBaFg9UYWwPmJ77LCJ11Ml4=";
|
||||
};
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
@@ -30,8 +30,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
colorama
|
||||
distro
|
||||
|
||||
@@ -165,10 +165,14 @@ stdenv.mkDerivation rec {
|
||||
EOF
|
||||
|
||||
moveToOutput "bin" "$bin"
|
||||
'' + lib.optionalString (enableX11 || enableGL) ''
|
||||
'' + (lib.optionalString (stdenv.isDarwin) ''
|
||||
for exe in $bin/bin/*; do
|
||||
install_name_tool -change build/shared-release/libmupdf.dylib $out/lib/libmupdf.dylib "$exe"
|
||||
done
|
||||
'') + (lib.optionalString (enableX11 || enableGL) ''
|
||||
mkdir -p $bin/share/icons/hicolor/48x48/apps
|
||||
cp docs/logo/mupdf.png $bin/share/icons/hicolor/48x48/apps
|
||||
'' + (if enableGL then ''
|
||||
'') + (if enableGL then ''
|
||||
ln -s "$bin/bin/mupdf-gl" "$bin/bin/mupdf"
|
||||
'' else lib.optionalString (enableX11) ''
|
||||
ln -s "$bin/bin/mupdf-x11" "$bin/bin/mupdf"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
, python3Packages, wrapGAppsHook, gobject-introspection
|
||||
, gtk-layer-shell, pango, gdk-pixbuf, atk
|
||||
# Extra packages called by various internal nwg-panel modules
|
||||
, hyprland # hyprctl
|
||||
, sway # swaylock, swaymsg
|
||||
, systemd # systemctl
|
||||
, wlr-randr # wlr-randr
|
||||
@@ -15,13 +16,13 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "nwg-panel";
|
||||
version = "0.9.16";
|
||||
version = "0.9.20";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nwg-piotr";
|
||||
repo = "nwg-panel";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-xHAn8NWSWSm95SIX1M8HIQwgNBq5/K5xsanbkAKfXSw=";
|
||||
hash = "sha256-Cq/kj61OmnHLd8EQK6QF67ALv3lMXKPGYUvTIeh90zQ=";
|
||||
};
|
||||
|
||||
# No tests
|
||||
@@ -40,15 +41,15 @@ python3Packages.buildPythonApplication rec {
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/{applications,pixmaps}
|
||||
cp $src/nwg-panel-config.desktop $out/share/applications/
|
||||
cp $src/nwg-shell.svg $src/nwg-panel.svg $out/share/pixmaps/
|
||||
cp $src/nwg-panel-config.desktop nwg-processes.desktop $out/share/applications/
|
||||
cp $src/nwg-shell.svg $src/nwg-panel.svg nwg-processes.svg $out/share/pixmaps/
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
makeWrapperArgs+=(
|
||||
"''${gappsWrapperArgs[@]}"
|
||||
--prefix XDG_DATA_DIRS : "$out/share"
|
||||
--prefix PATH : "${lib.makeBinPath [ light nwg-menu pamixer pulseaudio sway systemd wlr-randr ]}"
|
||||
--prefix PATH : "${lib.makeBinPath [ hyprland light nwg-menu pamixer pulseaudio sway systemd wlr-randr ]}"
|
||||
)
|
||||
'';
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ let
|
||||
zeroconf
|
||||
zipstream-ng
|
||||
class-doc
|
||||
pydantic
|
||||
pydantic_1
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
py.pkgs.appdirs
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user