feat(virtualisation): enable gvisor for containers
This commit is contained in:
parent
4eab62fe3b
commit
5da5d66d6a
|
@ -18,6 +18,8 @@ in {
|
||||||
extra_params = "--o:ssl.enable=false --o:ssl.termination=true";
|
extra_params = "--o:ssl.enable=false --o:ssl.termination=true";
|
||||||
};
|
};
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
|
"--runtime-flag=directfs=false"
|
||||||
|
"--runtime-flag=network=host"
|
||||||
"--uidmap=0:65534:1"
|
"--uidmap=0:65534:1"
|
||||||
"--gidmap=0:65534:1"
|
"--gidmap=0:65534:1"
|
||||||
"--uidmap=100:${toString uid}:1"
|
"--uidmap=100:${toString uid}:1"
|
||||||
|
|
|
@ -59,6 +59,8 @@ in {
|
||||||
# only secrets need to be included, e.g. FOCALBOARD_DBCONFIG
|
# only secrets need to be included, e.g. FOCALBOARD_DBCONFIG
|
||||||
environmentFiles = [ config.age.secrets.focalboard-env.path ];
|
environmentFiles = [ config.age.secrets.focalboard-env.path ];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
|
"--runtime-flag=directfs=false"
|
||||||
|
"--runtime-flag=network=host"
|
||||||
"--uidmap=0:65534:1"
|
"--uidmap=0:65534:1"
|
||||||
"--gidmap=0:65534:1"
|
"--gidmap=0:65534:1"
|
||||||
"--uidmap=65534:${toString uid}:1"
|
"--uidmap=65534:${toString uid}:1"
|
||||||
|
|
|
@ -37,6 +37,8 @@ let
|
||||||
config.age.secrets.immich-typesense-env.path
|
config.age.secrets.immich-typesense-env.path
|
||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
|
"--runtime-flag=directfs=false"
|
||||||
|
"--runtime-flag=network=host"
|
||||||
"--uidmap=0:65534:1"
|
"--uidmap=0:65534:1"
|
||||||
"--gidmap=0:65534:1"
|
"--gidmap=0:65534:1"
|
||||||
"--uidmap=${toString uid}:${toString uid}:1"
|
"--uidmap=${toString uid}:${toString uid}:1"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
_:
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Enable /etc/containers configuration (used by podman, cri-o, etc.)
|
# Enable /etc/containers configuration (used by podman, cri-o, etc.)
|
||||||
|
@ -6,6 +6,11 @@ _:
|
||||||
virtualisation.containers.containersConf.settings = {
|
virtualisation.containers.containersConf.settings = {
|
||||||
# Create unique User Namespace for the container
|
# Create unique User Namespace for the container
|
||||||
containers.userns = "auto";
|
containers.userns = "auto";
|
||||||
|
engine = {
|
||||||
|
conmon_env_vars = [ "PATH=${lib.makeBinPath [ pkgs.gvisor ]}" ];
|
||||||
|
runtimes.runsc = [ "${pkgs.gvisor}/bin/runsc" ];
|
||||||
|
runtime = "runsc";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
virtualisation.containers.storage.settings = {
|
virtualisation.containers.storage.settings = {
|
||||||
# defaults
|
# defaults
|
||||||
|
|
Loading…
Reference in a new issue