From dbe1afbfcdfb349d0bd1f16908f571bb76ad20c4 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 22 Apr 2021 17:37:34 +0200 Subject: [PATCH] home: fish: setup wrapper around flake lock --- home/fish.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/home/fish.nix b/home/fish.nix index f16c1fa..d31d7f4 100644 --- a/home/fish.nix +++ b/home/fish.nix @@ -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"; + }; + }; + }; }; }