adds vpn docker container

adds smile
disables ollama on server
This commit is contained in:
2024-11-05 22:51:38 +01:00
parent 309a2a1f35
commit b7c6825268
10 changed files with 77 additions and 7 deletions

View File

@ -16,7 +16,9 @@
]
# Include packages based on whether this is a server or workstation.
++ lib.optional isServer ./packages/server/default.nix
++ lib.optional isWorkstation ./packages/workstation/default.nix;
++ lib.optional isWorkstation ./packages/workstation/default.nix
# Include docker if this is a server, otherwise include nothing because we don't intend on running docker services on workstations.
++ lib.optional isServer ./docker/default.nix;
# Bootloader.
boot.loader.systemd-boot.enable = true;

View File

@ -0,0 +1,4 @@
{ ... }:
{
imports = [ ./vpn.nix ];
}

View File

@ -0,0 +1,22 @@
{ config, pkgs, ... }:
{
services.docker-compose = {
enable = true;
containers = {
wireguard = {
image = "lscr.io/linuxserver/wireguard:latest";
containerName = "wireguard";
capAdd = [ "NET_ADMIN" ];
environment = {
PEERS = "fold6,pc,laptop";
};
volumes = [ "./wireguard:/config" ];
ports = [ "51820:51820/udp" ];
sysctls = {
"net.ipv4.conf.all.src_valid_mark" = 1;
};
restartPolicy = "unless-stopped";
};
};
};
}