mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-04 16:11:06 +01:00
* nh: Add options for specific flakes * nh: Add tests for specific flake options --------- Co-authored-by: Foxocube <git@foxocube.xyz>
28 lines
909 B
Nix
28 lines
909 B
Nix
{
|
|
programs.nh = {
|
|
enable = true;
|
|
|
|
flake = "/path/to/flake";
|
|
osFlake = "/path/to/osFlake";
|
|
homeFlake = "/path/to/homeFlake";
|
|
darwinFlake = "/path/to/darwinFlake";
|
|
|
|
clean = {
|
|
enable = true;
|
|
dates = "weekly";
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
serviceFile="LaunchAgents/org.nix-community.home.nh-clean.plist"
|
|
serviceFileNormalized="$(normalizeStorePaths "$serviceFile")"
|
|
|
|
assertFileExists $serviceFile
|
|
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"'
|
|
'';
|
|
}
|