Files
home-manager/tests/modules/programs/sapling/sapling-basic.nix
K900 0668fdbc15 treewide: stdenv.is* -> stdenv.hostPlatform.is*
Nixpkgs officialy deprecated the former.
2026-08-13 08:40:58 +02:00

28 lines
588 B
Nix

{ pkgs, ... }:
{
programs.sapling = {
enable = true;
userName = "John Doe";
userEmail = "johndoe@example.com";
};
nmt.script =
let
configfile =
if pkgs.stdenv.hostPlatform.isDarwin then
"Library/Preferences/sapling/sapling.conf"
else
".config/sapling/sapling.conf";
expected = builtins.toFile "sapling.conf" ''
[ui]
username=John Doe <johndoe@example.com>
'';
in
''
assertFileExists home-files/${configfile}
assertFileContent home-files/${configfile} ${expected}
'';
}