2020-06-16 03:47:58 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
2020-06-24 23:02:18 +02:00
|
|
|
|
2020-06-16 03:47:58 +02:00
|
|
|
let
|
|
|
|
defpref = ''
|
|
|
|
defined through defaultPreferences
|
|
|
|
'';
|
2020-06-24 23:02:18 +02:00
|
|
|
|
2020-06-16 03:47:58 +02:00
|
|
|
autopref = ''
|
|
|
|
defined through automaticPreferences
|
|
|
|
'';
|
2020-06-24 23:02:18 +02:00
|
|
|
|
2020-06-16 03:47:58 +02:00
|
|
|
in {
|
|
|
|
config = {
|
|
|
|
programs.ne = {
|
|
|
|
enable = true;
|
|
|
|
defaultPreferences = defpref;
|
|
|
|
automaticPreferences.".default" = autopref;
|
|
|
|
};
|
2020-06-24 23:02:18 +02:00
|
|
|
|
|
|
|
nixpkgs.overlays =
|
|
|
|
[ (self: super: { ne = pkgs.writeScriptBin "dummy-ne" ""; }) ];
|
|
|
|
|
2020-06-16 03:47:58 +02: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
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|