diff --git a/profiles/core/default.nix b/profiles/core/default.nix index d32ae379..2e1f9d5c 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -29,91 +29,9 @@ in ''; }; - #programs.bash = { - # promptInit = '' - # eval "$(starship init bash)" - # ''; - # interactiveShellInit = '' - # flakify() { - # if [ ! -e flake.nix ]; then - # nix flake new -t github:nix-community/nix-direnv . - # elif [ ! -e .envrc ]; then - # echo "use flake" > .envrc - # direnv allow - # fi - # vim flake.nix - # } - - # export STARSHIP_CONFIG=${ - # pkgs.writeText "starship.toml" - # (builtins.readFile ./starship.toml) - # } - - # eval "$(${pkgs.direnv}/bin/direnv hook bash)" - # ''; - # enableCompletion = true; - #}; - - programs.zsh.enable = true; - - environment = { - - shellInit = '' - export STARSHIP_CONFIG=${ - pkgs.writeText "starship.toml" - (fileContents ./starship.toml) - } - ''; - - shellAliases = - let ifSudo = lib.mkIf config.security.sudo.enable; - in - { - # nix - n = "nix"; - np = "n profile"; - ni = "np install"; - nr = "np remove"; - ns = "n search --no-update-lock-file"; - nf = "n flake"; - nepl = "n repl ''"; - srch = "ns nixos"; - orch = "ns override"; - nrb = ifSudo "cd /tmp; sudo nixos-rebuild switch --flake '/etc/nixos/#curve'; cd $OLDPWD"; - nrt = ifSudo "sudo nixos-rebuild test --flake '/etc/nixos/#curve'"; - nedit = "cd /etc/nixos; vim"; - ncd = "cd /etc/nixos"; - mn = '' - manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix - ''; - # fix nixos-option - nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat"; - - # sudo - s = ifSudo "sudo -E "; - pls = ifSudo "s"; - si = ifSudo "sudo -i"; - se = ifSudo "sudoedit"; - - # top - top = "btm"; - - # systemd - ctl = "systemctl"; - stl = ifSudo "s systemctl"; - utl = "systemctl --user"; - ut = "systemctl --user start"; - un = "systemctl --user stop"; - up = ifSudo "s systemctl start"; - dn = ifSudo "s systemctl stop"; - jtl = "journalctl"; - - # quick ssh - sm = "ssh 10.0.69.4"; - ss = "ssh sealight.xyz"; - sc = "ssh lakhwara.com"; # cube - }; - }; + environment.systemPackages = with pkgs; [ + pinentry_gnome + ]; services.devmon.enable = true; diff --git a/profiles/desktop/default.nix b/profiles/desktop/default.nix index 7993552f..90093f7c 100644 --- a/profiles/desktop/default.nix +++ b/profiles/desktop/default.nix @@ -52,7 +52,6 @@ in calibre nheko mpv - scrot newsflash zeal xclip diff --git a/users/profiles/cli/default.nix b/users/profiles/cli/default.nix index d20b7012..6d19f774 100644 --- a/users/profiles/cli/default.nix +++ b/users/profiles/cli/default.nix @@ -1,5 +1,4 @@ -{ pkgs, config, ... }: - +{ self, lib, pkgs, config, ... }: { home.packages = with pkgs; [ binutils @@ -45,7 +44,6 @@ tmux pwgen glow - pinentry_gnome pass less gdb @@ -55,36 +53,41 @@ gnupg syncthing dijo - #kdeconnect + flameshot #ssb-patchwork libreoffice fontconfig pandoc ]; + programs.zsh = { + enable = true; + enableCompletion = true; + enableAutosuggestions = true; + + initExtra = '' + flakify() { + if [ ! -e flake.nix ]; then + nix flake new -t github:nix-community/nix-direnv . + elif [ ! -e .envrc ]; then + echo "use flake" > .envrc + direnv allow + fi + vim flake.nix + } + ''; + sessionVariables = { + EDITOR = "nvim"; + }; + }; programs.starship = { enable = true; enableZshIntegration = true; }; - programs.zsh = { + programs.fzf = { enable = true; - - # interactiveShellInit = '' - # flakify() { - # if [ ! -e flake.nix ]; then - # nix flake new -t github:nix-community/nix-direnv . - # elif [ ! -e .envrc ]; then - # echo "use flake" > .envrc - # direnv allow - # fi - # vim flake.nix - # } - # ''; - sessionVariables = { - EDITOR = "nvim"; - }; - enableCompletion = true; + enableZshIntegration = true; }; programs.direnv = { @@ -92,6 +95,8 @@ enableZshIntegration = true; }; + services.kdeconnect.enable = true; + home.shellAliases = { # quick cd ".." = "cd .."; @@ -101,7 +106,8 @@ # modern cli tools ls = "exa"; - l = "ls"; + l = "exa -l"; + la = "exa -la"; tree = "ls --tree"; cat = "bat"; unzip = "aunpack"; @@ -115,7 +121,8 @@ te = "task edit"; ts = "task sync"; - scrot = "scrot ~/screenshots/%b%d::%H%M%S.png"; + scrot = "flameshot screen -c -p ~/screenshots/"; + scrotgui = "flameshot gui -p ~/screenshots/"; # git g = "git"; @@ -126,5 +133,49 @@ # internet ip myip = "dig +short myip.opendns.com @208.67.222.222 2>&1"; + + # nix + n = "nix"; + np = "n profile"; + ni = "np install"; + nr = "np remove"; + ns = "n search --no-update-lock-file"; + nf = "n flake"; + nepl = "n repl ''"; + srch = "ns nixos"; + orch = "ns override"; + nrb = "cd /tmp; sudo nixos-rebuild switch --flake '/etc/nixos/#curve'; cd $OLDPWD"; + nrt = "cd /tmp; sudo nixos-rebuild test --flake '/etc/nixos/#curve'; cd $OLDPWD"; + ned = "cd /etc/nixos; vim"; + ncd = "cd /etc/nixos"; + mn = '' + manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix + ''; + # fix nixos-option + nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat"; + + # sudo + s = "sudo -E "; + pls = "s"; + si = "sudo -i"; + se = "sudoedit"; + + # top + top = "btm"; + + # systemd + ctl = "systemctl"; + stl = "s systemctl"; + utl = "systemctl --user"; + ut = "systemctl --user start"; + un = "systemctl --user stop"; + up = "s systemctl start"; + dn = "s systemctl stop"; + jtl = "journalctl"; + + # quick ssh + sm = "ssh 10.0.69.4"; + ss = "ssh sealight.xyz"; + sc = "ssh lakhwara.com"; # cube }; }