modules: share opengl only when graphics is enabled
This commit is contained in:
parent
be8de8cc58
commit
7784352dc8
3 changed files with 38 additions and 22 deletions
|
@ -91,9 +91,13 @@ in
|
||||||
isReadOnly = false;
|
isReadOnly = false;
|
||||||
hostPath = "/home/jan/downloads/browser";
|
hostPath = "/home/jan/downloads/browser";
|
||||||
};
|
};
|
||||||
"/run/opengl-driver/lib" = { };
|
|
||||||
"/run/opengl-driver-32/lib" = { };
|
|
||||||
}
|
}
|
||||||
|
(lib.mkIf config.hardware.graphics.enable {
|
||||||
|
"/run/opengl-driver/lib" = { };
|
||||||
|
})
|
||||||
|
(lib.mkIf config.hardware.graphics.enable32Bit {
|
||||||
|
"/run/opengl-driver-32/lib" = { };
|
||||||
|
})
|
||||||
(lib.mkIf cfg.librewolf.enable {
|
(lib.mkIf cfg.librewolf.enable {
|
||||||
"/home/kira/.librewolf" = {
|
"/home/kira/.librewolf" = {
|
||||||
isReadOnly = false;
|
isReadOnly = false;
|
||||||
|
|
|
@ -62,15 +62,21 @@ in
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
inherit hostAddress localAddress;
|
inherit hostAddress localAddress;
|
||||||
|
|
||||||
bindMounts = {
|
bindMounts = lib.mkMerge [
|
||||||
|
{
|
||||||
"/tmp/.X11-unix" = { };
|
"/tmp/.X11-unix" = { };
|
||||||
"/etc/ssh/keys" = {
|
"/etc/ssh/keys" = {
|
||||||
isReadOnly = false;
|
isReadOnly = false;
|
||||||
hostPath = "/persistent/per-machine/skype/etc/ssh/keys";
|
hostPath = "/persistent/per-machine/skype/etc/ssh/keys";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
(lib.mkIf config.hardware.graphics.enable {
|
||||||
"/run/opengl-driver/lib" = { };
|
"/run/opengl-driver/lib" = { };
|
||||||
|
})
|
||||||
|
(lib.mkIf config.hardware.graphics.enable32Bit {
|
||||||
"/run/opengl-driver-32/lib" = { };
|
"/run/opengl-driver-32/lib" = { };
|
||||||
};
|
})
|
||||||
|
];
|
||||||
|
|
||||||
config = { pkgs, ... }: {
|
config = { pkgs, ... }: {
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
|
|
@ -62,15 +62,21 @@ in
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
inherit hostAddress localAddress;
|
inherit hostAddress localAddress;
|
||||||
|
|
||||||
bindMounts = {
|
bindMounts = lib.mkMerge [
|
||||||
|
{
|
||||||
"/tmp/.X11-unix" = { };
|
"/tmp/.X11-unix" = { };
|
||||||
"/etc/ssh/keys" = {
|
"/etc/ssh/keys" = {
|
||||||
isReadOnly = false;
|
isReadOnly = false;
|
||||||
hostPath = "/persistent/per-machine/telegram/etc/ssh/keys";
|
hostPath = "/persistent/per-machine/telegram/etc/ssh/keys";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
(lib.mkIf config.hardware.graphics.enable {
|
||||||
"/run/opengl-driver/lib" = { };
|
"/run/opengl-driver/lib" = { };
|
||||||
|
})
|
||||||
|
(lib.mkIf config.hardware.graphics.enable32Bit {
|
||||||
"/run/opengl-driver-32/lib" = { };
|
"/run/opengl-driver-32/lib" = { };
|
||||||
};
|
})
|
||||||
|
];
|
||||||
|
|
||||||
config = { pkgs, ... }: {
|
config = { pkgs, ... }: {
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
|
Loading…
Reference in a new issue