mirror of
https://github.com/nix-community/home-manager
synced 2024-12-27 12:19:48 +01:00
27 lines
558 B
Nix
27 lines
558 B
Nix
|
{ pkgs, ... }:
|
||
|
|
||
|
{
|
||
|
programs.sapling = {
|
||
|
enable = true;
|
||
|
userName = "John Doe";
|
||
|
userEmail = "johndoe@example.com";
|
||
|
};
|
||
|
|
||
|
test.stubs.sapling = { };
|
||
|
|
||
|
nmt.script = let
|
||
|
configfile = if pkgs.stdenv.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}
|
||
|
'';
|
||
|
}
|