This commit is contained in:
Aaron Bieber 2022-08-30 15:55:21 -06:00
parent d506314085
commit 8a81578425
No known key found for this signature in database
3 changed files with 39 additions and 1 deletions

35
configs/peerix.nix Normal file
View File

@ -0,0 +1,35 @@
{ config, lib, ... }:
with lib; {
options = {
peerix = {
enable = mkOption {
description = "Enable peerix";
default = false;
example = true;
type = lib.types.bool;
};
privateKeyFile = mkOption {
description = "Private key file for signing";
default = "";
example = "./private_key";
type = lib.types.path;
};
};
};
config = mkIf config.peerix.enable {
services = {
peerix = {
enable = true;
openFirewall = false; # UDP/12304
privateKeyFile = "${config.peerix.privateKeyFile}";
publicKeyFile = ../../configs/peerix.pubs;
};
};
networking.firewall.interfaces = {
"tailscale0" = {
allowedUDPPorts = 12304;
};
};
};
}

2
configs/peerix.pubs Normal file
View File

@ -0,0 +1,2 @@
peerix-europa:FpjwUsYBl+I/SEr5JuO676oVhtUvY2zjyIr2VAVbmfs=
peerix-stan:3wdu3RBNCIVdgVRFt7bPQuoNH1liYsndLL0pI8mZCbg=

View File

@ -1,5 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let inherit (pkgs.libsForQt5) callPackage; in { let inherit (pkgs.libsForQt5) callPackage;
in {
options = { kde = { enable = lib.mkEnableOption "Enable KDE desktop."; }; }; options = { kde = { enable = lib.mkEnableOption "Enable KDE desktop."; }; };
config = lib.mkIf config.kde.enable { config = lib.mkIf config.kde.enable {