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> --- README.md | 1 + nix/hm-module.nix | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c033353..8992cf8 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,7 @@ programs.caelestia = { }; paths.wallpaperDir = "~/Images"; }; + environment = []; cli = { enable = true; # Also add caelestia-cli to path settings = { 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