home: fish: setup wrapper around flake lock

This commit is contained in:
Antoine Martin 2021-04-22 17:37:34 +02:00
parent ee7f2eb7bd
commit dbe1afbfcd

View file

@ -6,6 +6,20 @@ in
options.my.home.fish.enable = lib.mkEnableOption "Fish shell";
config = lib.mkIf cfg.enable {
programs.fish.enable = true;
programs.fish = {
enable = true;
functions = {
nfl = {
body = ''
set -l flags "--commit-lock-file"
for flake in $argv
set -a flags "--update-input" "$flake"
end
nix flake lock $flags
'';
description = "convenience wrapper around `nix flake lock` to only update certain flake inputs";
};
};
};
};
}