From bdd527ddad11fd7c48b5e7b015ea8b365257d401 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Fri, 19 Apr 2024 18:12:23 +0200 Subject: [PATCH] add gui option --- home-modules/common/default.nix | 1 + modules/local/default.nix | 8 ++++---- modules/nix/default.nix | 1 + modules/users/jopejoe1/default.nix | 8 ++++---- modules/users/root/default.nix | 1 + modules/zerotierone/default.nix | 4 +--- systems/kuraokami/default.nix | 1 + systems/zap/default.nix | 1 + 8 files changed, 14 insertions(+), 11 deletions(-) diff --git a/home-modules/common/default.nix b/home-modules/common/default.nix index 79ada5f..1769843 100644 --- a/home-modules/common/default.nix +++ b/home-modules/common/default.nix @@ -4,6 +4,7 @@ let cfg = config.jopejoe1.common; in { options.jopejoe1.common = { enable = lib.mkEnableOption "Enable Common Homanger settings"; + gui = lib.mkEnableOption "Graphical programms"; fonts = { monospace = lib.mkOption { type = lib.types.listOf lib.types.str; diff --git a/modules/local/default.nix b/modules/local/default.nix index 0f771a0..764c18e 100644 --- a/modules/local/default.nix +++ b/modules/local/default.nix @@ -6,13 +6,13 @@ in { config = lib.mkIf cfg.enable { xdg = { - sounds.enable = true; + sounds.enable = config.jopejoe1.gui.enable; mime.enable = true; - menus.enable = true; - icons.enable = true; + menus.enable = config.jopejoe1.gui.enable; + icons.enable = config.jopejoe1.gui.enable; autostart.enable = true; portal = { - enable = true; + enable = config.jopejoe1.gui.enable; extraPortals = with pkgs; [ xdg-desktop-portal ]; }; }; diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 58b8896..d044bc9 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -3,6 +3,7 @@ let cfg = config.jopejoe1.nix; in { options.jopejoe1.nix = { enable = lib.mkEnableOption "Enable Nix"; }; + options.jopejoe1.gui = { enable = lib.mkEnableOption "Enable GUI"; }; config = lib.mkIf cfg.enable { nix = { diff --git a/modules/users/jopejoe1/default.nix b/modules/users/jopejoe1/default.nix index 817775c..013a1c3 100644 --- a/modules/users/jopejoe1/default.nix +++ b/modules/users/jopejoe1/default.nix @@ -21,7 +21,8 @@ in { "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZDUoC+1lNR2JTY1Q+vhXpuLmKMdVl2OMFLVbQ3cGkw jopejoe1@kuraokami" ]; packages = with pkgs; - [ + [] + ++ lib.optionals config.jopejoe1.gui.enable [ libsForQt5.kate libsForQt5.ark element-desktop @@ -32,8 +33,6 @@ in { catppuccin-kde #catppuccin-gtk localPkgs.tela-icon-theme-git - ] - ++ lib.optionals (config.system == "x86_64-linux") [ discord lutris bottles @@ -60,8 +59,9 @@ in { }; nushell.enable = true; git.enable = true; + gui.enable = config.jopejoe1.gui.enable; direnv.enable = true; - firefox.enable = true; + firefox.enable = config.jopejoe1.gui.enable; }; }; }; diff --git a/modules/users/root/default.nix b/modules/users/root/default.nix index e475894..0fefe14 100644 --- a/modules/users/root/default.nix +++ b/modules/users/root/default.nix @@ -29,6 +29,7 @@ in { }; git.enable = true; direnv.enable = true; + gui.enable = config.jopejoe1.gui.enable; }; }; }; diff --git a/modules/zerotierone/default.nix b/modules/zerotierone/default.nix index 580776d..b53140d 100644 --- a/modules/zerotierone/default.nix +++ b/modules/zerotierone/default.nix @@ -10,9 +10,7 @@ in { services.zerotierone.enable = true; services.zerotierone.joinNetworks = [ "9e1948db638e9f93" ] ++ lib.optional (config.networking.hostName == "kuraokami") "7c31a21e86f9a75c"; services.zerotierone.port = 9993; - environment.systemPackages = with pkgs; [ - moonlight-qt - ]; + environment.systemPackages = with pkgs; lib.optinal config.jopejoe1.gui.enable moonlight-qt; }; } diff --git a/systems/kuraokami/default.nix b/systems/kuraokami/default.nix index 706b72f..92c81d1 100644 --- a/systems/kuraokami/default.nix +++ b/systems/kuraokami/default.nix @@ -29,6 +29,7 @@ asf.enable = true; sway.enable = true; zerotierone.enable = true; + gui.enable = true; keyboard = { enable = true; layout = "de"; diff --git a/systems/zap/default.nix b/systems/zap/default.nix index c7421a4..3e37823 100644 --- a/systems/zap/default.nix +++ b/systems/zap/default.nix @@ -10,6 +10,7 @@ root.enable = true; }; ssh.enable = true; + gui.enable = false; }; imports =