Skip to content

Commit

Permalink
fix peers picking defaults from networks
Browse files Browse the repository at this point in the history
  • Loading branch information
allow authored and allow committed Aug 1, 2024
1 parent 6f0ae57 commit 84b49fd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
6 changes: 3 additions & 3 deletions dev/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 5 additions & 16 deletions flake-modules/flake-guard/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ in
let cfg = config.flake-guard.networks;
in
{
# imports = [
# (mkRenamedOptionModule
# [ "networking" "wireguard" "networks" ]
# [ "flake-guard" "networks" ])
# ];
imports = [
(mkRenamedOptionModule
[ "networking" "wireguard" "networks" ]
[ "flake-guard" "networks" ])
];

options.flake-guard = {
enable = mkEnableOption "enable flake-guard nixos module";
Expand Down Expand Up @@ -108,17 +108,6 @@ in

self = mkOption {
type = types.attrsOf types.unspecified;

# types.submodule {
# options = node-options.options // {
# found = mkEnableOption "self was found.";

# peers = mkOption {
# type = types.attrsOf types.unspecified;
# default = {};
# };
# };
# };
default = {};
};
};
Expand Down
4 changes: 2 additions & 2 deletions flake-modules/flake-guard/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ in
((peer // {
inherit groups;
keyLookup = peer-name;
hostWriter = mkGuardOpt "hostsWriter";
hostsWriter = mkGuardOpt "hostsWriter";
interfaceWriter = mkGuardOpt "interfaceWriter";
secretslookup = mkGuardOpt "secretsLookup";
listenPort = mkGuardOpt "listenPort";
Expand Down Expand Up @@ -117,7 +117,7 @@ in
# a = 1;
interfaceName = net-name;
# peers.by-group = by-group;
# peers.by-name = by-name;
peers.by-name = by-name;
}))
# ) config.wireguard.networks;
) config.wireguard.networks);
Expand Down

0 comments on commit 84b49fd

Please sign in to comment.