-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fish: expose session variables package
This allows fish users to source the `hm-session-vars.fish` if they are not using the generated `config.fish` (which now sources the same file).
- Loading branch information
1 parent
7e00856
commit b06023b
Showing
4 changed files
with
53 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
{ | ||
config = { | ||
home.sessionVariables = { | ||
V1 = "v1"; | ||
V2 = "v2-${config.home.sessionVariables.V1}"; | ||
}; | ||
|
||
programs.fish = { | ||
enable = true; | ||
|
||
# TODO: should there be an equivalent sessionVariables here like bash + zsh? | ||
}; | ||
|
||
nmt.script = '' | ||
assertFileExists home-path/etc/profile.d/hm-session-vars.fish | ||
assertFileRegex home-path/etc/profile.d/hm-session-vars.fish \ | ||
"set -gx V1 'v1'" | ||
assertFileRegex home-path/etc/profile.d/hm-session-vars.fish \ | ||
"set -gx V1 'v1'" | ||
''; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters