1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-15 15:49:45 +01:00
home-manager/tests/modules/programs/fish/functions.nix

33 lines
570 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
with lib;
let
func = pkgs.writeText "func.fish" ''
function func
echo "Hello"
end
'';
in {
config = {
programs.fish = {
enable = true;
functions = { func = ''echo "Hello"''; };
};
nmt = {
description =
"if fish.function is set, check file exists and contents match";
script = ''
assertFileExists home-files/.config/fish/functions/func.fish
echo ${func}
assertFileContent home-files/.config/fish/functions/func.fish ${func}
'';
};
};
}