38 lines
834 B
Nix
38 lines
834 B
Nix
{ config, lib, pkgs, ... }: {
|
|
|
|
options.sysconfig.opts = {
|
|
|
|
netbird.enable = lib.options.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
};
|
|
|
|
virtualization.netbird = {
|
|
enable = lib.options.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
};
|
|
};
|
|
};
|
|
|
|
config = {
|
|
|
|
services.netbird = {
|
|
enable = config.sysconfig.opts.netbird.enable;
|
|
};
|
|
|
|
systemd.services.launchNetbird = lib.mkIf config.sysconfig.opts.virtualization.netbird.enable {
|
|
|
|
enable = false;
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
script = ''
|
|
cd /ssd1/Netbird
|
|
${pkgs.docker-compose}/bin/docker-compose up
|
|
'';
|
|
};
|
|
|
|
};
|
|
}
|