nh: add options for specific flakes (#7566)
* nh: Add options for specific flakes * nh: Add tests for specific flake options --------- Co-authored-by: Foxocube <git@foxocube.xyz>
This commit is contained in:
parent
bd82507edd
commit
4e97102bd4
3 changed files with 87 additions and 10 deletions
|
|
@ -3,6 +3,9 @@
|
|||
enable = true;
|
||||
|
||||
flake = "/path/to/flake";
|
||||
osFlake = "/path/to/osFlake";
|
||||
homeFlake = "/path/to/homeFlake";
|
||||
darwinFlake = "/path/to/darwinFlake";
|
||||
|
||||
clean = {
|
||||
enable = true;
|
||||
|
|
@ -18,5 +21,8 @@
|
|||
assertFileContent $serviceFileNormalized ${./launchd.plist}
|
||||
|
||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh 'NH_FLAKE="/path/to/flake"'
|
||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh 'NH_OS_FLAKE="/path/to/osFlake"'
|
||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh 'NH_HOME_FLAKE="/path/to/homeFlake"'
|
||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh 'NH_DARWIN_FLAKE="/path/to/darwinFlake"'
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@
|
|||
package = config.lib.test.mkStubPackage { version = "4.0.0"; };
|
||||
|
||||
flake = "/path/to/flake";
|
||||
osFlake = "/path/to/osFlake";
|
||||
homeFlake = "/path/to/homeFlake";
|
||||
darwinFlake = "/path/to/darwinFlake";
|
||||
|
||||
clean = {
|
||||
enable = true;
|
||||
|
|
@ -31,5 +34,8 @@
|
|||
assertFileExists $unitDir/timers.target.wants/nh-clean.timer
|
||||
|
||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh 'NH_FLAKE="/path/to/flake"'
|
||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh 'NH_OS_FLAKE="/path/to/osFlake"'
|
||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh 'NH_HOME_FLAKE="/path/to/homeFlake"'
|
||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.sh 'NH_DARWIN_FLAKE="/path/to/darwinFlake"'
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue