mirror of
https://github.com/srid/nixos-config.git
synced 2026-05-11 17:36:07 +08:00
Make pux a script
This commit is contained in:
parent
d737a9da91
commit
de443adbce
2 changed files with 13 additions and 14 deletions
|
|
@ -1,28 +1,18 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{ lib, ... }:
|
||||
let
|
||||
# These aliases should work on all shells.
|
||||
shellAliasesSimple = {
|
||||
shellAliases = {
|
||||
e = "nvim";
|
||||
ee = ''
|
||||
fzf --bind "enter:execute(nvim {})"
|
||||
'';
|
||||
g = "${pkgs.git}/bin/git";
|
||||
g = "git";
|
||||
lg = "lazygit";
|
||||
};
|
||||
# These aliases should work on bash/zsh.
|
||||
shellAliases = shellAliasesSimple // {
|
||||
ls = "${pkgs.exa}/bin/exa";
|
||||
l = "ls";
|
||||
ll = "ls -l";
|
||||
lt = "ls --tree";
|
||||
# Project tmux.
|
||||
pux = "sh -c \"tmux -S $(pwd).tmux attach\"";
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.bash = { inherit shellAliases; };
|
||||
programs.zsh = { inherit shellAliases; };
|
||||
programs.nushell.extraConfig =
|
||||
lib.concatStringsSep "\n" (lib.mapAttrsToList (k: v: "alias ${k} = ${v} ") shellAliasesSimple);
|
||||
lib.concatStringsSep "\n" (lib.mapAttrsToList (k: v: "alias ${k} = ${v} ") shellAliases);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,15 @@
|
|||
ripgrep
|
||||
htop
|
||||
nix-output-monitor
|
||||
|
||||
# Open tmux for current project.
|
||||
(pkgs.writeShellApplication {
|
||||
name = "pux";
|
||||
runtimeInputs = [ pkgs.tmux ];
|
||||
text = ''
|
||||
tmux -S "$(pwd)".tmux attach
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
||||
programs = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue