Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f6e6a2915b3c
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a674930d1577
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Jul 19, 2020

  1. nixos/wireguard: fix typos and unify formatting

    (cherry picked from commit fe7053f)
    tnias authored and Mic92 committed Jul 19, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    lforst Luca Forstner
    Copy the full SHA
    df0e7ad View commit details

Commits on Jul 20, 2020

  1. nixos/wireguard: Fix mismatched XML tag

    Build error introduced in fe7053f:
    
      parser error : Opening and ending tag mismatch: commmand line 6139 and command
      escription><para>Base64 preshared key generated by <commmand>wg genpsk</command>
                                                                                     ^
    Writing "command" with only two "m" fixes building the NixOS manual.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    (cherry picked from commit 4e92b61)
    aszlig authored and alexfmpe committed Jul 20, 2020
    Copy the full SHA
    a674930 View commit details
Showing with 18 additions and 17 deletions.
  1. +10 −10 nixos/modules/services/networking/wg-quick.nix
  2. +8 −7 nixos/modules/services/networking/wireguard.nix
20 changes: 10 additions & 10 deletions nixos/modules/services/networking/wg-quick.nix
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ let
type = with types; nullOr str;
default = null;
description = ''
Base64 private key generated by wg genkey.
Base64 private key generated by <command>wg genkey</command>.
Warning: Consider using privateKeyFile instead if you do not
want to store the key in the world-readable Nix store.
@@ -41,7 +41,7 @@ let
type = with types; nullOr str;
default = null;
description = ''
Private key file as generated by wg genkey.
Private key file as generated by <command>wg genkey</command>.
'';
};

@@ -106,9 +106,9 @@ let
description = ''
The kernel routing table to add this interface's
associated routes to. Setting this is useful for e.g. policy routing
("ip rule") or virtual routing and forwarding ("ip vrf"). Both numeric
table IDs and table names (/etc/rt_tables) can be used. Defaults to
"main".
("ip rule") or virtual routing and forwarding ("ip vrf"). Both
numeric table IDs and table names (/etc/rt_tables) can be used.
Defaults to "main".
'';
};

@@ -139,16 +139,16 @@ let
publicKey = mkOption {
example = "xTIBA5rboUvnH4htodjb6e697QjLERt1NAB4mZqp8Dg=";
type = types.str;
description = "The base64 public key the peer.";
description = "The base64 public key to the peer.";
};

presharedKey = mkOption {
default = null;
example = "rVXs/Ni9tu3oDBLS4hOyAUAa1qTWVA3loR8eL20os3I=";
type = with types; nullOr str;
description = ''
Base64 preshared key generated by wg genpsk. Optional,
and may be omitted. This option adds an additional layer of
Base64 preshared key generated by <command>wg genpsk</command>.
Optional, and may be omitted. This option adds an additional layer of
symmetric-key cryptography to be mixed into the already existing
public-key cryptography, for post-quantum resistance.
@@ -162,8 +162,8 @@ let
example = "/private/wireguard_psk";
type = with types; nullOr str;
description = ''
File pointing to preshared key as generated by wg pensk. Optional,
and may be omitted. This option adds an additional layer of
File pointing to preshared key as generated by <command>wg genpsk</command>.
Optional, and may be omitted. This option adds an additional layer of
symmetric-key cryptography to be mixed into the already existing
public-key cryptography, for post-quantum resistance.
'';
15 changes: 8 additions & 7 deletions nixos/modules/services/networking/wireguard.nix
Original file line number Diff line number Diff line change
@@ -91,11 +91,13 @@ let
table = mkOption {
default = "main";
type = types.str;
description = ''The kernel routing table to add this interface's
associated routes to. Setting this is useful for e.g. policy routing
("ip rule") or virtual routing and forwarding ("ip vrf"). Both numeric
table IDs and table names (/etc/rt_tables) can be used. Defaults to
"main".'';
description = ''
The kernel routing table to add this interface's
associated routes to. Setting this is useful for e.g. policy routing
("ip rule") or virtual routing and forwarding ("ip vrf"). Both
numeric table IDs and table names (/etc/rt_tables) can be used.
Defaults to "main".
'';
};

peers = mkOption {
@@ -174,7 +176,7 @@ let
example = "/private/wireguard_psk";
type = with types; nullOr str;
description = ''
File pointing to preshared key as generated by <command>wg pensk</command>.
File pointing to preshared key as generated by <command>wg genpsk</command>.
Optional, and may be omitted. This option adds an additional layer of
symmetric-key cryptography to be mixed into the already existing
public-key cryptography, for post-quantum resistance.
@@ -217,7 +219,6 @@ let

};


generatePathUnit = name: values:
assert (values.privateKey == null);
assert (values.privateKeyFile != null);