From 52ce4eed01283d77903b393cee76348c9c8e26d5 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Thu, 4 Nov 2021 19:51:49 +0100 Subject: [PATCH] modules: Extend sway and emacs by common options --- hosts/miku.nix | 18 ------------------ modules/programs/emacs/default.nix | 1 + modules/programs/sway/default.nix | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/hosts/miku.nix b/hosts/miku.nix index d7f0746..ea5e9ca 100644 --- a/hosts/miku.nix +++ b/hosts/miku.nix @@ -17,7 +17,6 @@ }; environment.systemPackages = with pkgs; [ - emacsPgtkGcc gajim-mainwindow virt-manager qemu scream replaysorcery # Custom package @@ -136,12 +135,6 @@ # sdma0 time out (whatever this means). Maybe bisect? kernelPackages = pkgs.linuxPackages_zen; }; - xdg.portal = { - enable = true; - extraPortals = [ - pkgs.xdg-desktop-portal-wlr - ]; - }; services = { ratbagd.enable = true; flatpak.enable = true; @@ -160,17 +153,6 @@ }; }; - environment.sessionVariables = { - # sway - #"_JAVA_AWT_NONREPARENTING" = 1; - - # Wayland - "QT_QPA_PLATFORM" = "wayland-egl"; - "ECORE_EVAS_ENGINE" = "wayland-egl"; - "ELM_ENGINE" = "wayland-egl"; - "SDL_VIDEODRIVER" = "wayland"; - }; - # TODO: Move into modules systemd.user.services = { scream = { diff --git a/modules/programs/emacs/default.nix b/modules/programs/emacs/default.nix index be1ac1c..7e13fd1 100644 --- a/modules/programs/emacs/default.nix +++ b/modules/programs/emacs/default.nix @@ -8,6 +8,7 @@ in { }; config = lib.mkIf cfg.enable { + environment.systemPackages = with pkgs; [ emacsPgtkGcc ]; services.emacs.package = pkgs.emacsPgtkGcc; home-manager.users."${config.ptw.system.singleUser}".home.file = { diff --git a/modules/programs/sway/default.nix b/modules/programs/sway/default.nix index b3a2d6f..9e7df96 100644 --- a/modules/programs/sway/default.nix +++ b/modules/programs/sway/default.nix @@ -38,6 +38,24 @@ in { }; config = lib.mkIf cfg.enable { + xdg.portal = { + enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal-wlr + ]; + }; + + environment.sessionVariables = { + # sway + #"_JAVA_AWT_NONREPARENTING" = 1; + + # Wayland + "QT_QPA_PLATFORM" = "wayland-egl"; + "ECORE_EVAS_ENGINE" = "wayland-egl"; + "ELM_ENGINE" = "wayland-egl"; + "SDL_VIDEODRIVER" = "wayland"; + }; + programs.sway.enable = true; home-manager.users."${config.ptw.system.singleUser}" = { wayland.windowManager.sway = {