mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
modules.services.xmuvpn: init
This commit is contained in:
@@ -49,4 +49,12 @@
|
||||
"https://github.com/aiscript-dev/aiscript-languageserver/releases/download/0.1.6/aiscript-dev-aiscript-languageserver-0.1.6.tgz" = "0092d5r67bhf4xkvrdn4a2rm1drjzy7b5sw8mi7hp4pqvpc20ylr";
|
||||
"https://github.com/misskey-dev/tabler-icons/archive/refs/tags/3.30.0-mi.1932+ab127beee.tar.gz" = "09aa34a02rdpcvrhl6xddzy173pg7pi9i551s692ggc3pq7fmdhw";
|
||||
};
|
||||
xmuvpn =
|
||||
{
|
||||
imageName = "hagb/docker-easyconnect";
|
||||
imageDigest = "sha256:1c3a86e41c1d2425a4fd555d279deaec6ff1e3c2287853eb16d23c9cb6dc3409";
|
||||
sha256 = "1jpk2y46lnk0mi6ir7hdx0p6378p0v6qjbh6jm9a4cv5abw0mb2k";
|
||||
finalImageName = "hagb/docker-easyconnec";
|
||||
finalImageTag = "7.6.7";
|
||||
};
|
||||
}
|
||||
|
||||
18
modules/services/xmuvpn.nix
Normal file
18
modules/services/xmuvpn.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.xmuvpn = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.nullOr (types.submodule {}); default = null; };
|
||||
config = let inherit (inputs.config.nixos.services) xmuvpn; in inputs.lib.mkIf (xmuvpn != null)
|
||||
{
|
||||
virtualisation.oci-containers.containers.xmuvpn =
|
||||
{
|
||||
image = "hagb/docker-easyconnect";
|
||||
imageFile = inputs.topInputs.self.src.xmuvpn;
|
||||
ports = [ "127.0.0.1:5901:5901/tcp" "127.0.0.1:10069:1080/tcp" "--cap-add=NET_ADMIN" "-ti" ];
|
||||
extraOptions = [ "--dns=223.5.5.5" "--device=/dev/net/tun" ];
|
||||
volumes = [ "xmuvpn:/root" ];
|
||||
environment.PASSWORD = "xxxx";
|
||||
};
|
||||
nixos.services.docker = {};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user