1
0
Prechádzať zdrojové kódy

refactor: remove shell-aliases

Zander Hawke 10 mesiacov pred
rodič
commit
003893f52f

+ 1 - 1
.envrc

@@ -2,9 +2,9 @@ if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
   source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
 fi
 
-watch_file devenv.nix
 watch_file flake.nix
 watch_file flake.lock
+watch_file devenv.nix
 if ! use flake . --no-pure-eval
 then
   echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2

+ 7 - 0
devenv.nix

@@ -5,4 +5,11 @@
   };
 
   scripts.update.exec = "nix flake update";
+  scripts.home-manager.exec = "nix run github:nix-community/home-manager --";
+  scripts.hmb.exec = "home-manager build --flake .#(whoami)@(hostname)";
+  scripts.hms.exec = "home-manager switch --flake .#(whoami)@(hostname)";
+  scripts.drb.exec = "darwin-rebuild build --flake .#(hostname)";
+  scripts.drs.exec = "darwin-rebuild switch --flake .#(hostname)";
+  scripts.nrb.exec = "nixos-rebuild build --flake .#(hostname)";
+  scripts.nrs.exec = "nixos-rebuild switch --flake .#(hostname)";
 }

+ 0 - 4
home/features/cli/bash.nix

@@ -1,4 +0,0 @@
-{
-  programs.bash.enable = true;
-  programs.bash.shellAliases = import ./shell-aliases.nix;
-}

+ 3 - 3
home/features/cli/default.nix

@@ -1,7 +1,6 @@
 {
   imports = [
     ./aider-chat.nix
-    ./bash.nix
     ./bat.nix
     ./direnv.nix
     ./fish.nix
@@ -9,13 +8,14 @@
     ./git.nix
     ./gnupg.nix
     ./nostr.nix
-    ./nushell.nix
     ./pass.nix
     ./ssh.nix
     ./starship.nix
     ./tmux.nix
     ./yazi.nix
     ./zoxide.nix
-    ./zsh.nix
   ];
+
+  programs.bash.enable = true;
+  programs.zsh.enable = true;
 }

+ 0 - 1
home/features/cli/fish.nix

@@ -4,7 +4,6 @@
 }: {
   programs.fish = {
     enable = true;
-    shellAliases = import ./shell-aliases.nix;
 
     interactiveShellInit = lib.mkAfter ''
       fish_config theme choose "Catppuccin Frappe"

+ 0 - 7
home/features/cli/nushell.nix

@@ -1,7 +0,0 @@
-{ config, ... }: {
-  home.sessionVariables.SHELL = "${config.programs.nushell.package}/bin/nu";
-  programs.nushell = {
-    enable = true;
-    shellAliases = import ./shell-aliases.nix;
-  };
-}

+ 0 - 24
home/features/cli/shell-aliases.nix

@@ -1,24 +0,0 @@
-{
-  "..." = "cd ../..";
-  "...." = "cd ../../..";
-
-  la = "ls -la";
-
-  # Git stuff
-  g = "git";
-  gco = "git checkout ";
-  gcob = "git checkout -b ";
-  ghic = "gh issue create --body '' ";
-
-  # nix stuff
-  hmb = "nix run github:nix-community/home-manager -- build --flake .#(whoami)@(hostname)";
-  hms = "nix run github:nix-community/home-manager -- switch --flake .#(whoami)@(hostname)";
-
-  home-manager = "nix run github:nix-community/home-manager --";
-
-  drb = "nix run github:lnl7/nix-darwin -- build --flake .#(hostname)";
-  drs = "nix run github:lnl7/nix-darwin -- switch --flake .#(hostname)";
-
-  nrb = "nixos-rebuild build --flake .#(hostname)";
-  nrs = "nixos-rebuild switch --flake .#(hostname)";
-}

+ 0 - 6
home/features/cli/zsh.nix

@@ -1,6 +0,0 @@
-{
-  programs.zsh = {
-    enable = true;
-    shellAliases = import ./shell-aliases.nix;
-  };
-}