bro
This commit is contained in:
44
modules/nixos/services/nebula/default.nix
Normal file
44
modules/nixos/services/nebula/default.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
name = "nebula-lighthouse";
|
||||
cfg = config.${namespace}.services.${name};
|
||||
rootUrl = "https://lighthouse.${namespace}.dev/";
|
||||
ca = config.sops.secrets."jallen-nas/nebula/ca-cert".path;
|
||||
cert = config.sops.secrets."jallen-nas/nebula/nas-cert".path;
|
||||
key = config.sops.secrets."jallen-nas/nebula/nas-key".path;
|
||||
|
||||
nebulaConfig = lib.${namespace}.mkModule {
|
||||
inherit config name;
|
||||
description = "nebula";
|
||||
options = { };
|
||||
moduleConfig = {
|
||||
environment.systemPackages = with pkgs; [ nebula ];
|
||||
services.nebula.networks = {
|
||||
jallen-nebula = {
|
||||
enable = true;
|
||||
enableReload = true;
|
||||
isLighthouse = false;
|
||||
isRelay = false;
|
||||
ca = ca;
|
||||
cert = cert;
|
||||
key = key;
|
||||
lighthouses = [
|
||||
"10.1.1.1"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
nebulaConfig
|
||||
./sops.nix
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user