🧹 restructure layout

This commit is contained in:
Moritz Böhme 2022-07-15 13:11:54 +02:00
parent 40c2a5fb29
commit 268374ad58
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
115 changed files with 2641 additions and 2085 deletions

49
modules/programs/zsh.nix Normal file
View file

@ -0,0 +1,49 @@
{ config
, lib
, pkgs
, inputs
, ...
}:
with lib;
let
cfg = config.my.programs.zsh;
shellConfig = config.my.shell;
in
{
options.my.programs.zsh = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = lib.mkIf cfg.enable {
environment.pathsToLink = [ "/share/zsh" ];
users.users.moritz.shell = pkgs.zsh;
home-manager.users.moritz.programs = {
zsh = {
enable = true;
dotDir = ".config/zsh";
history.expireDuplicatesFirst = true;
localVariables = shellConfig.variables;
shellAliases = lib.trivial.mergeAttrs shellConfig.aliases shellConfig.abbreviations;
enableSyntaxHighlighting = true;
enableAutosuggestions = true;
enableCompletion = true;
initExtra = ''
function nix-which() {
readlink -f $(which $1)
}
'';
plugins = [
{
name = "forgit";
src = inputs.forgit-git;
}
];
};
};
};
}