mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-01-08 15:09:42 +01:00
modules(desktop): Add graphical option for containers
xserver is required to make GUI applications run inside containers.
This commit is contained in:
parent
b5b20c7b19
commit
372811f651
@ -9,6 +9,8 @@ let
|
|||||||
sakayaPort = 39493;
|
sakayaPort = 39493;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
modules.desktop.graphical = true;
|
||||||
|
|
||||||
networking.nat.forwardPorts = singleton {
|
networking.nat.forwardPorts = singleton {
|
||||||
destination = "192.168.100.49:${sakayaPort}";
|
destination = "192.168.100.49:${sakayaPort}";
|
||||||
sourcePort = sakayaPort;
|
sourcePort = sakayaPort;
|
||||||
|
@ -4,7 +4,7 @@ let
|
|||||||
inherit (lib) mkEnableOption mkIf mkMerge mkOption;
|
inherit (lib) mkEnableOption mkIf mkMerge mkOption;
|
||||||
inherit (lib.types) str float int;
|
inherit (lib.types) str float int;
|
||||||
inherit (config.modules.system) username;
|
inherit (config.modules.system) username;
|
||||||
inherit (cfg) bloat gnome plasma container theme opacity fontSize;
|
inherit (cfg) bloat gnome plasma container theme opacity fontSize graphical;
|
||||||
inherit (nix-config.packages.${pkgs.system}) aleo-fonts;
|
inherit (nix-config.packages.${pkgs.system}) aleo-fonts;
|
||||||
inherit (pkgs) phinger-cursors noto-fonts-cjk-sans maple-mono noto-fonts-emoji;
|
inherit (pkgs) phinger-cursors noto-fonts-cjk-sans maple-mono noto-fonts-emoji;
|
||||||
inherit (builtins) attrValues;
|
inherit (builtins) attrValues;
|
||||||
@ -37,6 +37,7 @@ in
|
|||||||
gnome = mkEnableOption "GNOME specialization";
|
gnome = mkEnableOption "GNOME specialization";
|
||||||
plasma = mkEnableOption "Plasma specialization";
|
plasma = mkEnableOption "Plasma specialization";
|
||||||
container = mkEnableOption "disable some options for container performance";
|
container = mkEnableOption "disable some options for container performance";
|
||||||
|
graphical = mkEnableOption "xserver for graphical containers";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@ -70,7 +71,7 @@ in
|
|||||||
mountOnMedia = true;
|
mountOnMedia = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
xserver = mkIf (!container) {
|
xserver = mkIf (!container || graphical) {
|
||||||
enable = true;
|
enable = true;
|
||||||
excludePackages = [ pkgs.xterm ];
|
excludePackages = [ pkgs.xterm ];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user