···31in
3233{
034 # Provide the NixOS/Nixpkgs sources in /etc/nixos. This is required
35 # for nixos-install.
36 boot.postBootCommands = mkAfter
···31in
3233{
34+ nix.registry.nixpkgs.flake.outPath = builtins.path { name = "source"; path = pkgs.path; };
35 # Provide the NixOS/Nixpkgs sources in /etc/nixos. This is required
36 # for nixos-install.
37 boot.postBootCommands = mkAfter
···465 networking.wireguard = {
466467 enable = mkOption {
468+ description = lib.mdDoc ''
469+ Whether to enable WireGuard.
470+471+ Please note that {option}`systemd.network.netdevs` has more features
472+ and is better maintained. When building new things, it is advised to
473+ use that instead.
474+ '';
475 type = types.bool;
476 # 2019-05-25: Backwards compatibility.
477 default = cfg.interfaces != {};
···480 };
481482 interfaces = mkOption {
483+ description = lib.mdDoc ''
484+ WireGuard interfaces.
485+486+ Please note that {option}`systemd.network.netdevs` has more features
487+ and is better maintained. When building new things, it is advised to
488+ use that instead.
489+ '';
490 default = {};
491 example = {
492 wg0 = {
···604 The configuration for each network interface. If
605 {option}`networking.useDHCP` is true, then every
606 interface not listed here will be configured using DHCP.
0000607 '';
608 type = with types; attrsOf (submodule interfaceOpts);
609 };
···604 The configuration for each network interface. If
605 {option}`networking.useDHCP` is true, then every
606 interface not listed here will be configured using DHCP.
607+608+ Please note that {option}`systemd.network.netdevs` has more features
609+ and is better maintained. When building new things, it is advised to
610+ use that instead.
611 '';
612 type = with types; attrsOf (submodule interfaceOpts);
613 };
···1+import ./make-test-python.nix ({ lib, pkgs, ... }: {
2+ name = "xpadneo";
3+ meta.maintainers = with lib.maintainers; [ kira-bruneau ];
4+5+ nodes = {
6+ machine = {
7+ config.hardware.xpadneo.enable = true;
8+ };
9+ };
10+11+ # This is just a sanity check to make sure the module was
12+ # loaded. We'd have to find some way to mock an xbox controller if
13+ # we wanted more in-depth testing.
14+ testScript = ''
15+ machine.start();
16+ machine.succeed("modinfo hid_xpadneo | grep 'version:\s\+${pkgs.linuxPackages.xpadneo.version}'")
17+ '';
18+})
···8283 # disable formatting tests because they can break on black updates
84 "test_code_is_black_clean"
000085 ] ++ lib.optionals stdenv.isDarwin [
86 # Disable flaky tests on Darwin
87 "test_non_unicode_filename"
···8283 # disable formatting tests because they can break on black updates
84 "test_code_is_black_clean"
85+86+ # fails at 2022-09-30
87+ "test_identification"
88+ "test_diff"
89 ] ++ lib.optionals stdenv.isDarwin [
90 # Disable flaky tests on Darwin
91 "test_non_unicode_filename"
···1+{ lib, stdenv, makeWrapper, fetchzip, runCommand, plantuml, plantuml-c4, jre }:
2+3+# The C4-PlantUML docs say that it suffices to run plantuml with the
4+# -DRELATIVE_INCLUDE="..." arg to make plantuml find the C4 templates
5+# when included like "!include C4_Container.puml".
6+# Unfortunately, this is not sufficient in practise, when the path is not ".".
7+# What helps is setting -Dplantuml.include.path="..." *before* the jar
8+# parameter.
9+# The -DRELATIVE_INCLUDE param then *still* needs to be set (*after* the jar
10+# argument), because the C4 template vars check for existence of this variable
11+# and if it is not set, reference paths in the internet.
12+13+let
14+ c4-lib = fetchzip {
15+ url = "https://github.com/plantuml-stdlib/C4-PlantUML/archive/88a3f99150c6ff7953c4a99b184d03412ffdedb1.zip";
16+ sha256 = "sha256-vk4YWdGb47OsI9mApGTQ7OfELRZdBouzKfUZq3kchcM=";
17+ };
18+19+ sprites = fetchzip {
20+ url = "https://github.com/tupadr3/plantuml-icon-font-sprites/archive/fa3f885dbd45c9cd0cdf6c0e5e4fb51ec8b76582.zip";
21+ sha256 = "sha256-lt9+NNMIaZSkKNsGyHoqXUCTlKmZFGfNYYGjer6X0Xc=";
22+ };
23+24+ # In order to pre-fix the plantuml.jar parameter with the argument
25+ # -Dplantuml.include.path=..., we post-fix the java command using a wrapper.
26+ # This way the plantuml derivation can remain unchanged.
27+ plantumlWithExtraPath =
28+ let
29+ plantumlIncludePath = lib.concatStringsSep ":" [ c4-lib sprites ];
30+ includeFlag = "-Dplantuml.include.path=${lib.escapeShellArg plantumlIncludePath}";
31+ postFixedJre =
32+ runCommand "jre-postfixed" { nativeBuildInputs = [ makeWrapper ]; } ''
33+ mkdir -p $out/bin
34+35+ makeWrapper ${jre}/bin/java $out/bin/java \
36+ --add-flags ${lib.escapeShellArg includeFlag}
37+ '';
38+ in
39+ plantuml.override { jre = postFixedJre; };
40+in
41+42+stdenv.mkDerivation rec {
43+ pname = "plantuml-c4";
44+ version = "unstable-2022-08-21";
45+46+ nativeBuildInputs = [ makeWrapper ];
47+48+ buildCommand = ''
49+ mkdir -p $out/bin
50+51+ makeWrapper ${plantumlWithExtraPath}/bin/plantuml $out/bin/plantuml \
52+ --add-flags "-DRELATIVE_INCLUDE=\"${c4-lib}\""
53+54+ $out/bin/plantuml -help
55+ '';
56+57+ passthru.tests.example-c4-diagram =
58+ runCommand "c4-plantuml-sample.png" { nativeBuildInputs = [ plantuml-c4 ]; } ''
59+ sed 's/https:.*\///' "${c4-lib}/samples/C4_Context Diagram Sample - enterprise.puml" > sample.puml
60+ plantuml sample.puml -o $out
61+62+ sed 's/!include ..\//!include /' ${sprites}/examples/complex-example.puml > sprites.puml
63+ plantuml sprites.puml -o $out
64+ '';
65+66+ meta = with lib; {
67+ description = "PlantUML bundled with C4-Plantuml and plantuml sprites library";
68+ homepage = "https://github.com/plantuml-stdlib/C4-PlantUML";
69+ license = licenses.mit;
70+ maintainers = with maintainers; [ tfc ];
71+ platforms = platforms.unix;
72+ };
73+}