home: fish: use real .fish files for functions
This commit is contained in:
parent
325d3ee1b2
commit
df15e6b6c2
4 changed files with 23 additions and 26 deletions
15
home/fish/default.nix
Normal file
15
home/fish/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.fish;
|
||||
in
|
||||
{
|
||||
options.my.home.fish.enable = lib.mkEnableOption "Fish shell";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
xdg.configFile."fish/functions" = { source = ./. + "/functions"; };
|
||||
};
|
||||
}
|
||||
7
home/fish/functions/nfl.fish
Normal file
7
home/fish/functions/nfl.fish
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
function nfl
|
||||
set -l flags "--commit-lock-file"
|
||||
for flake in $argv
|
||||
set -a flags "--update-input" "$flake"
|
||||
end
|
||||
nix flake lock $flags
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue