mirror of
https://github.com/nix-community/home-manager
synced 2024-11-01 00:39:45 +01:00
5a15f3833d
This is to avoid unnecessary downloads and builds when running the tests suite.
36 lines
805 B
Nix
36 lines
805 B
Nix
{ 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;
|
|
};
|
|
|
|
nixpkgs.overlays =
|
|
[ (self: super: { ne = pkgs.writeScriptBin "dummy-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
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
}
|