Skip to content

Commit 84b49fd

Browse files
allowallow
authored andcommitted
fix peers picking defaults from networks
1 parent 6f0ae57 commit 84b49fd

File tree

3 files changed

+10
-21
lines changed

3 files changed

+10
-21
lines changed

dev/flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake-modules/flake-guard/default.nix

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ in
4949
let cfg = config.flake-guard.networks;
5050
in
5151
{
52-
# imports = [
53-
# (mkRenamedOptionModule
54-
# [ "networking" "wireguard" "networks" ]
55-
# [ "flake-guard" "networks" ])
56-
# ];
52+
imports = [
53+
(mkRenamedOptionModule
54+
[ "networking" "wireguard" "networks" ]
55+
[ "flake-guard" "networks" ])
56+
];
5757

5858
options.flake-guard = {
5959
enable = mkEnableOption "enable flake-guard nixos module";
@@ -108,17 +108,6 @@ in
108108

109109
self = mkOption {
110110
type = types.attrsOf types.unspecified;
111-
112-
# types.submodule {
113-
# options = node-options.options // {
114-
# found = mkEnableOption "self was found.";
115-
116-
# peers = mkOption {
117-
# type = types.attrsOf types.unspecified;
118-
# default = {};
119-
# };
120-
# };
121-
# };
122111
default = {};
123112
};
124113
};

flake-modules/flake-guard/options.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ in
8585
((peer // {
8686
inherit groups;
8787
keyLookup = peer-name;
88-
hostWriter = mkGuardOpt "hostsWriter";
88+
hostsWriter = mkGuardOpt "hostsWriter";
8989
interfaceWriter = mkGuardOpt "interfaceWriter";
9090
secretslookup = mkGuardOpt "secretsLookup";
9191
listenPort = mkGuardOpt "listenPort";
@@ -117,7 +117,7 @@ in
117117
# a = 1;
118118
interfaceName = net-name;
119119
# peers.by-group = by-group;
120-
# peers.by-name = by-name;
120+
peers.by-name = by-name;
121121
}))
122122
# ) config.wireguard.networks;
123123
) config.wireguard.networks);

0 commit comments

Comments
 (0)