From 59da1af0a012635259bfb8d6c06e09732911ea8f Mon Sep 17 00:00:00 2001 From: arunoruto Date: Tue, 1 Oct 2024 00:00:41 +0000 Subject: [PATCH] Move gui packages to gui and enable flatpak only if xdg portals is enabled --- modules/nixos/desktop/gnome.nix | 6 ++++ modules/nixos/environment/gui/default.nix | 4 ++- modules/nixos/environment/gui/packages.nix | 29 +++++++++++++++ modules/nixos/environment/gui/wayland.nix | 4 +++ modules/nixos/environment/packages.nix | 42 +++++++++++----------- modules/nixos/services/default.nix | 4 +-- 6 files changed, 65 insertions(+), 24 deletions(-) create mode 100644 modules/nixos/environment/gui/packages.nix diff --git a/modules/nixos/desktop/gnome.nix b/modules/nixos/desktop/gnome.nix index 8571649..de4ce72 100644 --- a/modules/nixos/desktop/gnome.nix +++ b/modules/nixos/desktop/gnome.nix @@ -23,6 +23,12 @@ (with pkgs; [ gnome-photos gnome-tour + nautilus-open-any-terminal + gnome.nautilus-python + gnome.gnome-software + gnome.pomodoro + gnome.gnome-remote-desktop + gnome3.gnome-tweaks ]) ++ (with pkgs.gnome; [ #cheese # webcam tool diff --git a/modules/nixos/environment/gui/default.nix b/modules/nixos/environment/gui/default.nix index 4e6ae47..7a3948f 100644 --- a/modules/nixos/environment/gui/default.nix +++ b/modules/nixos/environment/gui/default.nix @@ -4,9 +4,10 @@ ... }: { imports = [ + ./chrome.nix ./firefox.nix ./steam.nix - ./chrome.nix + ./packages.nix ./wayland.nix ]; @@ -14,6 +15,7 @@ options.gui.enable = lib.mkEnableOption "Setup GUI Modules"; config = lib.mkIf config.gui.enable { + gui.packages.enable = lib.mkDefault true; wayland.enable = lib.mkDefault true; chrome.enable = lib.mkDefault true; diff --git a/modules/nixos/environment/gui/packages.nix b/modules/nixos/environment/gui/packages.nix new file mode 100644 index 0000000..b84ce2a --- /dev/null +++ b/modules/nixos/environment/gui/packages.nix @@ -0,0 +1,29 @@ +{ + pkgs, + lib, + config, + ... +}: { + options.gui.packages.enable = lib.mkEnableOption "Setup amd tools"; + + config = lib.mkIf config.gui.packages.enable { + environment.systemPackages = with pkgs; [ + vlc + unstable.vscode + # wezterm + + discord + gthumb + # jabref + libsForQt5.kdenlive + libsForQt5.okular + #mailspring + # masterpdfeditor + # mprime + unstable.plex-desktop + remmina + zoom-us + zotero + ]; + }; +} diff --git a/modules/nixos/environment/gui/wayland.nix b/modules/nixos/environment/gui/wayland.nix index 592cf94..c4496e8 100644 --- a/modules/nixos/environment/gui/wayland.nix +++ b/modules/nixos/environment/gui/wayland.nix @@ -18,5 +18,9 @@ xdgOpenUsePortal = true; }; }; + + environment.systemPackages = with pkgs; [ + wl-clipboard + ]; }; } diff --git a/modules/nixos/environment/packages.nix b/modules/nixos/environment/packages.nix index c54fcd6..d0988dc 100644 --- a/modules/nixos/environment/packages.nix +++ b/modules/nixos/environment/packages.nix @@ -1,7 +1,7 @@ {pkgs, ...}: { - imports = [ - ./chrome.nix - ]; + # imports = [ + # ./chrome.nix + # ]; environment = { # Enable shells @@ -39,25 +39,25 @@ tmux unstable.ventoy vim - vlc - unstable.vscode + # vlc + # unstable.vscode #vscode - wezterm + # wezterm wget - wl-clipboard + # wl-clipboard - discord - gthumb + # discord + # gthumb # jabref - libsForQt5.kdenlive - libsForQt5.okular + # libsForQt5.kdenlive + # libsForQt5.okular #mailspring # masterpdfeditor # mprime - unstable.plex-desktop - remmina - zoom-us - zotero + # unstable.plex-desktop + # remmina + # zoom-us + # zotero texlive.combined.scheme-full @@ -65,12 +65,12 @@ #ultrastar-manager # Gnome specific applications - nautilus-open-any-terminal - gnome.nautilus-python - gnome.gnome-software - gnome.pomodoro - gnome.gnome-remote-desktop - gnome3.gnome-tweaks + # nautilus-open-any-terminal + # gnome.nautilus-python + # gnome.gnome-software + # gnome.pomodoro + # gnome.gnome-remote-desktop + # gnome3.gnome-tweaks ]; }; } diff --git a/modules/nixos/services/default.nix b/modules/nixos/services/default.nix index 16b8fdb..2cdd04e 100644 --- a/modules/nixos/services/default.nix +++ b/modules/nixos/services/default.nix @@ -1,5 +1,5 @@ { - pkgs, + config, lib, ... }: { @@ -19,7 +19,7 @@ ]; davmail.enable = lib.mkDefault false; - flatpak.enable = lib.mkDefault true; + flatpak.enable = lib.mkDefault config.xdg.portal.enable; secrets.enable = lib.mkDefault true; oneapi.enable = lib.mkDefault false; # oneapi.enable = lib.mkDefault true;