From ce74f30025a901ce99709fe55745f8a9846aa784 Mon Sep 17 00:00:00 2001 From: notgne2 Date: Mon, 31 Oct 2022 16:58:00 +0000 Subject: [PATCH] ezpc system module --- home-manager/modules/ezpcusr.nix | 9 -------- modules/ezpc.nix | 39 ++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 modules/ezpc.nix diff --git a/home-manager/modules/ezpcusr.nix b/home-manager/modules/ezpcusr.nix index 2620183..76688c9 100644 --- a/home-manager/modules/ezpcusr.nix +++ b/home-manager/modules/ezpcusr.nix @@ -384,15 +384,6 @@ in { }; }; - home.sessionVariables = { - QT_QPA_PLATFORM = "wayland-egl;xcb"; - MOZ_ENABLE_WAYLAND = "1"; - QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; - ECORE_EVAS_ENGINE = "wayland_egl"; - ELM_ENGINE = "wayland_egl"; - _JAVA_AWT_WM_NONREPARENTING = "1"; - }; - programs.firefox.enable = true; programs.waybar = { diff --git a/modules/ezpc.nix b/modules/ezpc.nix new file mode 100644 index 0000000..5abc25a --- /dev/null +++ b/modules/ezpc.nix @@ -0,0 +1,39 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.ezpc; +in { + options.ezpc.enable = mkEnableOption "Enable ezpc system stuff"; + + config = mkIf cfg.enable { + xdg.portal.enable = lib.mkDefault true; + xdg.portal.extraPortals = lib.mkDefault (with pkgs; [ + xdg-desktop-portal-wlr + xdg-desktop-portal-gtk + ]); + + environment.sessionVariables = { + QT_QPA_PLATFORM = "wayland-egl;xcb"; + MOZ_ENABLE_WAYLAND = "1"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + ECORE_EVAS_ENGINE = "wayland_egl"; + ELM_ENGINE = "wayland_egl"; + _JAVA_AWT_WM_NONREPARENTING = "1"; + }; + + environment.loginShellInit = lib.mkAfter '' + [[ "$(tty)" == /dev/tty1 ]] && { + sway + } + ''; + + i18n.inputMethod = { + enabled = "ibus"; + ibus.engines = with pkgs.ibus-engines; [typing-booster uniemoji]; + }; + }; +}