Add 'users/glittershark/system/' from commit '3b174300ae'
git-subtree-dir: users/glittershark/system git-subtree-mainline:85d82a9dc2git-subtree-split:3b174300ae
This commit is contained in:
commit
81564185e9
49 changed files with 3802 additions and 0 deletions
21
users/glittershark/system/home/modules/lib/zshFunctions.nix
Normal file
21
users/glittershark/system/home/modules/lib/zshFunctions.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
options = {
|
||||
programs.zsh.functions = mkOption {
|
||||
description = "An attribute set that maps function names to their source";
|
||||
default = {};
|
||||
type = with types; attrsOf (either str path);
|
||||
};
|
||||
};
|
||||
|
||||
config.programs.zsh.initExtra = concatStringsSep "\n" (
|
||||
mapAttrsToList (name: funSrc: ''
|
||||
function ${name}() {
|
||||
${funSrc}
|
||||
}
|
||||
'') config.programs.zsh.functions
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue