From 19c005b5e3557e936ea97b4e591e0768742bca4d Mon Sep 17 00:00:00 2001 From: BardMoon <144455455+BardMoon@users.noreply.github.com> Date: Tue, 2 Sep 2025 18:51:38 +0900 Subject: nix/hm: add extraEnvironment (#533) * nix: add extraEnvironment in home-manager This PR enables users to easily add environment variables to make systemd services work properly in all use cases. #390 * Update README.md * Update README.md * fix * Update hm-module.nix * Update hm-module.nix * extraEnvironment to environment * Update README.md * [CI] chore: update flake * fix --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- nix/hm-module.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'nix') diff --git a/nix/hm-module.nix b/nix/hm-module.nix index ef463b8..7eb6efa 100644 --- a/nix/hm-module.nix +++ b/nix/hm-module.nix @@ -43,6 +43,14 @@ in { default = ""; description = "Caelestia shell extra configs written to shell.json"; }; + environment = mkOption { + type = types.listOf types.str; + description = "Extra Environment variables to pass to the Caelestia shell systemd service."; + default = [ ]; + example = [ + "QT_QPA_PLATFORMTHEME=gtk3" + ]; + }; cli = { enable = mkEnableOption "Enable Caelestia CLI"; package = mkOption { @@ -87,7 +95,8 @@ in { TimeoutStopSec = "5s"; Environment = [ "QT_QPA_PLATFORM=wayland" - ]; + ] + ++ cfg.environment; Slice = "session.slice"; }; -- cgit v1.2.3-freya