adds vpn docker container
adds smile disables ollama on server
This commit is contained in:
@ -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;
|
||||
|
4
config/nixos/docker/default.nix
Normal file
4
config/nixos/docker/default.nix
Normal file
@ -0,0 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [ ./vpn.nix ];
|
||||
}
|
22
config/nixos/docker/vpn.nix
Normal file
22
config/nixos/docker/vpn.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user