2020-06-16 01:47:58 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
2020-06-24 21:02:18 +00:00
|
|
|
|
2020-06-16 01:47:58 +00:00
|
|
|
let
|
|
|
|
defpref = ''
|
|
|
|
defined through defaultPreferences
|
|
|
|
'';
|
2020-06-24 21:02:18 +00:00
|
|
|
|
2020-06-16 01:47:58 +00:00
|
|
|
autopref = ''
|
|
|
|
defined through automaticPreferences
|
|
|
|
'';
|
2020-06-24 21:02:18 +00:00
|
|
|
|
2020-06-16 01:47:58 +00:00
|
|
|
in {
|
|
|
|
config = {
|
|
|
|
programs.ne = {
|
|
|
|
enable = true;
|
|
|
|
defaultPreferences = defpref;
|
|
|
|
automaticPreferences.".default" = autopref;
|
|
|
|
};
|
2020-06-24 21:02:18 +00:00
|
|
|
|
2021-09-26 09:08:45 +00:00
|
|
|
test.stubs.ne = { };
|
2020-06-24 21:02:18 +00:00
|
|
|
|
2020-06-16 01:47:58 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|