mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
xsession: add option xsession.scriptPath
This option allows overriding the default script path `~/.xsession`. On NixOS, this is needed to allow multiple possible graphical login sessions. Fixes #391.
This commit is contained in:
parent
701b4130bd
commit
9f0fdc68a9
1 changed files with 11 additions and 1 deletions
|
@ -15,6 +15,16 @@ in
|
||||||
xsession = {
|
xsession = {
|
||||||
enable = mkEnableOption "X Session";
|
enable = mkEnableOption "X Session";
|
||||||
|
|
||||||
|
scriptPath = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = ".xsession";
|
||||||
|
example = ".xsession-hm";
|
||||||
|
description = ''
|
||||||
|
Path, relative <envar>HOME</envar>, where Home Manager
|
||||||
|
should write the X session script.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
windowManager.command = mkOption {
|
windowManager.command = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
|
@ -117,7 +127,7 @@ in
|
||||||
export HM_XPROFILE_SOURCED=1
|
export HM_XPROFILE_SOURCED=1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
home.file.".xsession" = {
|
home.file.${cfg.scriptPath} = {
|
||||||
executable = true;
|
executable = true;
|
||||||
text = ''
|
text = ''
|
||||||
if [[ ! -v HM_XPROFILE_SOURCED ]]; then
|
if [[ ! -v HM_XPROFILE_SOURCED ]]; then
|
||||||
|
|
Loading…
Reference in a new issue