1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-30 06:59:45 +01:00
home-manager/tests/modules/programs/ne/defprefs.nix

36 lines
737 B
Nix
Raw Permalink Normal View History

{ config, lib, pkgs, ... }:
with lib;
let
defpref = ''
defined through defaultPreferences
'';
autopref = ''
defined through automaticPreferences
'';
in {
config = {
programs.ne = {
enable = true;
defaultPreferences = defpref;
automaticPreferences.".default" = autopref;
};
test.stubs.ne = { };
nmt = {
description =
"Check that it gracefully handles the case of both defaultPreferences and automaticPreferences.'.default' being set, defaulting to the former.";
script = ''
assertFileExists home-files/.ne/.default#ap
assertFileContent home-files/.ne/.default#ap ${
builtins.toFile "defpref" defpref
}
'';
};
};
}