Merge branch 'main' of https://github.com/bloxx12/nichts
This commit is contained in:
commit
03eea56a44
99 changed files with 679 additions and 12821 deletions
|
@ -3,6 +3,7 @@ _: {
|
|||
./git.nix
|
||||
./starship.nix
|
||||
./zsh.nix
|
||||
./neovim.nix
|
||||
./neovim.nix
|
||||
./fish.nix
|
||||
];
|
||||
}
|
||||
|
|
66
modules/cli/fish.nix
Normal file
66
modules/cli/fish.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: with lib; let
|
||||
cfg = config.modules.programs.fish;
|
||||
username = config.modules.other.system.username;
|
||||
in {
|
||||
options.modules.programs.fish = {
|
||||
enable = mkEnableOption "fish";
|
||||
extraAliases = mkOption {
|
||||
type = types.attrs;
|
||||
description = "extra shell aliases";
|
||||
default = {};
|
||||
};
|
||||
profiling = mkOption {
|
||||
type = types.bool;
|
||||
description = "enable zsh profiling";
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.fish.enable = true;
|
||||
|
||||
users.users.${username}.shell = pkgs.fish;
|
||||
|
||||
environment = {
|
||||
shells = [ pkgs.fish ];
|
||||
pathsToLink = [ "/share/fish" ];
|
||||
};
|
||||
|
||||
home-manager.users.${username} = {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = "set fish_greeting";
|
||||
plugins = [
|
||||
];
|
||||
shellAliases = {
|
||||
|
||||
cl = "clear";
|
||||
cp = "cp -ivr";
|
||||
mv = "mv -iv";
|
||||
rm = "trash -v";
|
||||
l = "eza -a --icons";
|
||||
e = "eza -lha --icons --git";
|
||||
untar = "tar -xvf";
|
||||
untargz = "tar -xzf";
|
||||
mnt = "udisksctl mount -b";
|
||||
umnt = "udisksctl unmount -b";
|
||||
v = "nvim";
|
||||
kys = "shutdown now";
|
||||
gpl = "curl https://www.gnu.org/licenses/gpl-3.0.txt -o LICENSE";
|
||||
agpl = "curl https://www.gnu.org/licenses/agpl-3.0.txt -o LICENSE";
|
||||
g = "git";
|
||||
gs = "g stash";
|
||||
n = "nix";
|
||||
woman = "man";
|
||||
open = "xdg-open";
|
||||
":q" = "exit";
|
||||
} // cfg.extraAliases;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -34,7 +34,7 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
programs.zsh.enable = true;
|
||||
users.users.${username}.shell = pkgs.zsh;
|
||||
# users.users.${username}.shell = pkgs.zsh;
|
||||
environment = {
|
||||
shells = [ pkgs.zsh ];
|
||||
pathsToLink = [ "/share/zsh" ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue