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>
This commit is contained in:
BardMoon 2025-09-02 18:51:38 +09:00 committed by GitHub
parent 84cb2f694b
commit 19c005b5e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View file

@ -223,6 +223,7 @@ programs.caelestia = {
};
paths.wallpaperDir = "~/Images";
};
environment = [];
cli = {
enable = true; # Also add caelestia-cli to path
settings = {

View file

@ -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";
};