···3344let
55 inherit (builtins) head tail length;
66- inherit (lib.trivial) and;
66+ inherit (lib.trivial) id;
77 inherit (lib.strings) concatStringsSep sanitizeDerivationName;
88- inherit (lib.lists) foldr foldl' concatMap concatLists elemAt;
88+ inherit (lib.lists) foldr foldl' concatMap concatLists elemAt all;
99in
10101111rec {
···7373 getAttrFromPath ["z" "z"] x
7474 => error: cannot find attribute `z.z'
7575 */
7676- getAttrFromPath = attrPath: set:
7676+ getAttrFromPath = attrPath:
7777 let errorMsg = "cannot find attribute `" + concatStringsSep "." attrPath + "'";
7878- in attrByPath attrPath (abort errorMsg) set;
7878+ in attrByPath attrPath (abort errorMsg);
797980808181 /* Return the specified attributes from a set.
···154154 foldAttrs (n: a: [n] ++ a) [] [{ a = 2; } { a = 3; }]
155155 => { a = [ 2 3 ]; }
156156 */
157157- foldAttrs = op: nul: list_of_attrs:
157157+ foldAttrs = op: nul:
158158 foldr (n: a:
159159 foldr (name: o:
160160 o // { ${name} = op n.${name} (a.${name} or nul); }
161161 ) a (attrNames n)
162162- ) {} list_of_attrs;
162162+ ) {};
163163164164165165 /* Recursively collect sets that verify a given predicate named `pred'
···295295 */
296296 mapAttrsRecursiveCond = cond: f: set:
297297 let
298298- recurse = path: set:
298298+ recurse = path:
299299 let
300300 g =
301301 name: value:
302302 if isAttrs value && cond value
303303 then recurse (path ++ [name]) value
304304 else f (path ++ [name]) value;
305305- in mapAttrs g set;
305305+ in mapAttrs g;
306306 in recurse [] set;
307307308308···369369 value = f name (catAttrs name sets);
370370 }) names);
371371372372- /* Implementation note: Common names appear multiple times in the list of
372372+ /* Implementation note: Common names appear multiple times in the list of
373373 names, hopefully this does not affect the system because the maximal
374374 laziness avoid computing twice the same expression and listToAttrs does
375375 not care about duplicated attribute names.
···420420 let f = attrPath:
421421 zipAttrsWith (n: values:
422422 let here = attrPath ++ [n]; in
423423- if tail values == []
424424- || pred here (head (tail values)) (head values) then
423423+ if length values == 1
424424+ || pred here (elemAt values 1) (head values) then
425425 head values
426426 else
427427 f here values
···447447 }
448448449449 */
450450- recursiveUpdate = lhs: rhs:
451451- recursiveUpdateUntil (path: lhs: rhs:
452452- !(isAttrs lhs && isAttrs rhs)
453453- ) lhs rhs;
450450+ recursiveUpdate = recursiveUpdateUntil (path: lhs: rhs: !(isAttrs lhs && isAttrs rhs));
454451455452 /* Returns true if the pattern is contained in the set. False otherwise.
456453···459456 => true
460457 */
461458 matchAttrs = pattern: attrs: assert isAttrs pattern;
462462- foldr and true (attrValues (zipAttrsWithNames (attrNames pattern) (n: values:
463463- let pat = head values; val = head (tail values); in
459459+ all id (attrValues (zipAttrsWithNames (attrNames pattern) (n: values:
460460+ let pat = head values; val = elemAt values 1; in
464461 if length values == 1 then false
465462 else if isAttrs pat then isAttrs val && matchAttrs pat val
466463 else pat == val
···119119 <link xlink:href="options.html#opt-services.archisteamfarm.enable">services.archisteamfarm</link>.
120120 </para>
121121 </listitem>
122122+ <listitem>
123123+ <para>
124124+ <link xlink:href="https://goteleport.com">teleport</link>,
125125+ allows engineers and security professionals to unify access
126126+ for SSH servers, Kubernetes clusters, web applications, and
127127+ databases across all environments. Available at
128128+ <link linkend="opt-services.teleport.enable">services.teleport</link>.
129129+ </para>
130130+ </listitem>
131131+ <listitem>
132132+ <para>
133133+ <link xlink:href="https://loic-sharma.github.io/BaGet/">BaGet</link>,
134134+ a lightweight NuGet and symbol server. Available at
135135+ <link linkend="opt-services.baget.enable">services.baget</link>.
136136+ </para>
137137+ </listitem>
122138 </itemizedlist>
123139 </section>
124140 <section xml:id="sec-release-22.05-incompatibilities">
···204220 <literal>/etc/docker/daemon.json</literal>, you need to
205221 incorporate the changes into the new option
206222 <literal>virtualisation.docker.daemon.settings</literal>.
223223+ </para>
224224+ </listitem>
225225+ <listitem>
226226+ <para>
227227+ opensmtpd-extras is no longer build with python2 scripting
228228+ support due to python2 deprecation in nixpkgs
207229 </para>
208230 </listitem>
209231 <listitem>
+6
nixos/doc/manual/release-notes/rl-2205.section.md
···37373838- [ArchiSteamFarm](https://github.com/JustArchiNET/ArchiSteamFarm), a C# application with primary purpose of idling Steam cards from multiple accounts simultaneously. Available as [services.archisteamfarm](options.html#opt-services.archisteamfarm.enable).
39394040+- [teleport](https://goteleport.com), allows engineers and security professionals to unify access for SSH servers, Kubernetes clusters, web applications, and databases across all environments. Available at [services.teleport](#opt-services.teleport.enable).
4141+4242+- [BaGet](https://loic-sharma.github.io/BaGet/), a lightweight NuGet and symbol server. Available at [services.baget](#opt-services.baget.enable).
4343+4044## Backward Incompatibilities {#sec-release-22.05-incompatibilities}
41454246- `pkgs.ghc` now refers to `pkgs.targetPackages.haskellPackages.ghc`.
···6973 Scripts have to be converted to Python 3 for use with `writers.writePython3` or `writers.writePyPy2` needs to be used.
70747175- If you previously used `/etc/docker/daemon.json`, you need to incorporate the changes into the new option `virtualisation.docker.daemon.settings`.
7676+7777+- opensmtpd-extras is no longer build with python2 scripting support due to python2 deprecation in nixpkgs
72787379- The `autorestic` package has been upgraded from 1.3.0 to 1.5.0 which introduces breaking changes in config file, check [their migration guide](https://autorestic.vercel.app/migration/1.4_1.5) for more details.
7480
···11+{ cert, group, groups, user }: {
22+ assertion = cert.group == group || builtins.any (u: u == user) groups.${cert.group}.members;
33+ message = "Group for certificate ${cert.domain} must be ${group}, or user ${user} must be a member of group ${cert.group}";
44+}
+99
nixos/modules/services/networking/teleport.nix
···11+{ config, pkgs, lib, ... }:
22+33+with lib;
44+55+let
66+ cfg = config.services.teleport;
77+ settingsYaml = pkgs.formats.yaml { };
88+in
99+{
1010+ options = {
1111+ services.teleport = with lib.types; {
1212+ enable = mkEnableOption "the Teleport service";
1313+1414+ settings = mkOption {
1515+ type = settingsYaml.type;
1616+ default = { };
1717+ example = literalExpression ''
1818+ {
1919+ teleport = {
2020+ nodename = "client";
2121+ advertise_ip = "192.168.1.2";
2222+ auth_token = "60bdc117-8ff4-478d-95e4-9914597847eb";
2323+ auth_servers = [ "192.168.1.1:3025" ];
2424+ log.severity = "DEBUG";
2525+ };
2626+ ssh_service = {
2727+ enabled = true;
2828+ labels = {
2929+ role = "client";
3030+ };
3131+ };
3232+ proxy_service.enabled = false;
3333+ auth_service.enabled = false;
3434+ }
3535+ '';
3636+ description = ''
3737+ Contents of the <literal>teleport.yaml</literal> config file.
3838+ The <literal>--config</literal> arguments will only be passed if this set is not empty.
3939+4040+ See <link xlink:href="https://goteleport.com/docs/setup/reference/config/"/>.
4141+ '';
4242+ };
4343+4444+ insecure.enable = mkEnableOption ''
4545+ starting teleport in insecure mode.
4646+4747+ This is dangerous!
4848+ Sensitive information will be logged to console and certificates will not be verified.
4949+ Proceed with caution!
5050+5151+ Teleport starts with disabled certificate validation on Proxy Service, validation still occurs on Auth Service
5252+ '';
5353+5454+ diag = {
5555+ enable = mkEnableOption ''
5656+ endpoints for monitoring purposes.
5757+5858+ See <link xlink:href="https://goteleport.com/docs/setup/admin/troubleshooting/#troubleshooting/"/>
5959+ '';
6060+6161+ addr = mkOption {
6262+ type = str;
6363+ default = "127.0.0.1";
6464+ description = "Metrics and diagnostics address.";
6565+ };
6666+6767+ port = mkOption {
6868+ type = int;
6969+ default = 3000;
7070+ description = "Metrics and diagnostics port.";
7171+ };
7272+ };
7373+ };
7474+ };
7575+7676+ config = mkIf config.services.teleport.enable {
7777+ environment.systemPackages = [ pkgs.teleport ];
7878+7979+ systemd.services.teleport = {
8080+ wantedBy = [ "multi-user.target" ];
8181+ after = [ "network.target" ];
8282+ serviceConfig = {
8383+ ExecStart = ''
8484+ ${pkgs.teleport}/bin/teleport start \
8585+ ${optionalString cfg.insecure.enable "--insecure"} \
8686+ ${optionalString cfg.diag.enable "--diag-addr=${cfg.diag.addr}:${toString cfg.diag.port}"} \
8787+ ${optionalString (cfg.settings != { }) "--config=${settingsYaml.generate "teleport.yaml" cfg.settings}"}
8888+ '';
8989+ ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
9090+ LimitNOFILE = 65536;
9191+ Restart = "always";
9292+ RestartSec = "5s";
9393+ RuntimeDirectory = "teleport";
9494+ Type = "simple";
9595+ };
9696+ };
9797+ };
9898+}
9999+
···11+{ lib
22+, stdenv
33+, fetchFromGitHub
44+, SDL2
55+, SDL2_image
66+, SDL2_mixer
77+, SDL2_ttf
88+, gettext
99+, libpng
1010+, pkg-config
1111+, zlib
1212+}:
1313+1414+stdenv.mkDerivation rec {
1515+ pname = "the-legend-of-edgar";
1616+ version = "1.35";
1717+1818+ src = fetchFromGitHub {
1919+ name = "${pname}-${version}-src";
2020+ owner = "riksweeney";
2121+ repo = "edgar";
2222+ rev = version;
2323+ hash = "sha256-ojy4nEW9KiSte/AoFUMPrKCxvIeQpMVIL4ileHiBydo=";
2424+ };
2525+2626+ nativeBuildInputs = [
2727+ pkg-config
2828+ gettext
2929+ ];
3030+3131+ buildInputs = [
3232+ SDL2
3333+ SDL2_image
3434+ SDL2_mixer
3535+ SDL2_ttf
3636+ libpng
3737+ zlib
3838+ ];
3939+4040+ dontConfigure = true;
4141+4242+ makefile = "makefile";
4343+4444+ makeFlags = [
4545+ "PREFIX=${placeholder "out"}"
4646+ "BIN_DIR=${placeholder "out"}/bin/"
4747+ ];
4848+4949+ # TODO: remove the setting below when the next version arrives
5050+ # https://github.com/riksweeney/edgar/pull/57
5151+ preBuild = ''
5252+ export CFLAGS=$(sdl2-config --cflags)
5353+ '';
5454+5555+ meta = with lib; {
5656+ homepage = "https://www.parallelrealities.co.uk/games/edgar";
5757+ description = "A 2D platform game with a persistent world";
5858+ longDescription = ''
5959+ When Edgar's father fails to return home after venturing out one dark and
6060+ stormy night, Edgar fears the worst: he has been captured by the evil
6161+ sorcerer who lives in a fortress beyond the forbidden swamp.
6262+6363+ Donning his armour, Edgar sets off to rescue him, but his quest will not
6464+ be easy...
6565+6666+ The Legend of Edgar is a platform game, not unlike those found on the
6767+ Amiga and SNES. Edgar must battle his way across the world, solving
6868+ puzzles and defeating powerful enemies to achieve his quest.
6969+ '';
7070+ license = licenses.gpl1Plus;
7171+ maintainers = with maintainers; [ AndersonTorres ];
7272+ platforms = platforms.unix;
7373+ broken = stdenv.isDarwin;
7474+ };
7575+}