aboutsummaryrefslogtreecommitdiff
path: root/home/shell
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--home/profiles/zsh/completion-style.zsh (renamed from home/shell/zsh/completion-style.zsh)0
-rw-r--r--home/profiles/zsh/new-go-project.zsh (renamed from home/shell/zsh/new-go-project.zsh)0
-rw-r--r--home/profiles/zsh/options.zsh (renamed from home/shell/zsh/options.zsh)0
-rw-r--r--home/profiles/zsh/prompt.zsh (renamed from home/shell/zsh/prompt.zsh)0
-rw-r--r--home/profiles/zsh/tmux.zsh (renamed from home/shell/zsh/tmux.zsh)0
-rw-r--r--home/shell/aliases.nix10
-rw-r--r--home/shell/default.nix25
-rw-r--r--home/shell/fish/default.nix20
-rw-r--r--home/shell/fish/functions/find-ssh-agent.fish20
-rw-r--r--home/shell/fish/functions/new-go-project.fish27
-rw-r--r--home/shell/fish/functions/nix-rebuild-hm.fish4
-rw-r--r--home/shell/fish/functions/nix-rebuild-host.fish4
-rw-r--r--home/shell/fish/interactive.fish8
-rw-r--r--home/shell/fish/login.fish10
-rw-r--r--home/shell/zsh/default.nix48
15 files changed, 0 insertions, 176 deletions
diff --git a/home/shell/zsh/completion-style.zsh b/home/profiles/zsh/completion-style.zsh
index 79a4e68..79a4e68 100644
--- a/home/shell/zsh/completion-style.zsh
+++ b/home/profiles/zsh/completion-style.zsh
diff --git a/home/shell/zsh/new-go-project.zsh b/home/profiles/zsh/new-go-project.zsh
index 0b96a34..0b96a34 100644
--- a/home/shell/zsh/new-go-project.zsh
+++ b/home/profiles/zsh/new-go-project.zsh
diff --git a/home/shell/zsh/options.zsh b/home/profiles/zsh/options.zsh
index 6d39bc1..6d39bc1 100644
--- a/home/shell/zsh/options.zsh
+++ b/home/profiles/zsh/options.zsh
diff --git a/home/shell/zsh/prompt.zsh b/home/profiles/zsh/prompt.zsh
index 8a3efa9..8a3efa9 100644
--- a/home/shell/zsh/prompt.zsh
+++ b/home/profiles/zsh/prompt.zsh
diff --git a/home/shell/zsh/tmux.zsh b/home/profiles/zsh/tmux.zsh
index 97944f5..97944f5 100644
--- a/home/shell/zsh/tmux.zsh
+++ b/home/profiles/zsh/tmux.zsh
diff --git a/home/shell/aliases.nix b/home/shell/aliases.nix
deleted file mode 100644
index 49d1725..0000000
--- a/home/shell/aliases.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- ll = "ls -l --color=auto";
- lt = "ls -ltrh --color=auto";
- la = "ls -ltrha --color=auto";
- pkgsearch = "nix search nixpkgs";
- hms = "home-manager switch --flake .";
- nr = "sudo nixos-rebuild switch --flake .";
- flup = "nix flake update --commit-lock-file";
- dhcp-leasese = "xdg-open http://192.168.6.1:8067/";
-}
diff --git a/home/shell/default.nix b/home/shell/default.nix
deleted file mode 100644
index f34d997..0000000
--- a/home/shell/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-let
- cfg = config.my.home.shell;
- aliases = import ./aliases.nix;
-in
-{
- options.my.home.shell = {
- name = mkOption {
- default = "zsh";
- type = types.enum [ "fish" "zsh" ];
- example = "zsh";
- };
- aliases = mkOption {
- default = aliases;
- description = ''
- A wrapper for shellAliases for zsh and fish
- '';
- type = types.attrsOf types.str;
- };
- };
-
- imports = [ ./fish ./zsh ];
-}
diff --git a/home/shell/fish/default.nix b/home/shell/fish/default.nix
deleted file mode 100644
index f3e41d9..0000000
--- a/home/shell/fish/default.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ config, lib, pkgs, ... }:
-let
- cfg = config.my.home.shell;
- aliases = config.my.home.shell.aliases;
-in
-{
- config = lib.mkIf (cfg.name == "fish") {
- programs.fish = {
- enable = true;
- shellAliases = aliases;
- interactiveShellInit = builtins.readFile ./interactive.fish;
- loginShellInit = builtins.readFile ./login.fish;
- };
-
- xdg.configFile."fish/functions" = {
- source = ./functions;
- recursive = true;
- };
- };
-}
diff --git a/home/shell/fish/functions/find-ssh-agent.fish b/home/shell/fish/functions/find-ssh-agent.fish
deleted file mode 100644
index 9e2de8d..0000000
--- a/home/shell/fish/functions/find-ssh-agent.fish
+++ /dev/null
@@ -1,20 +0,0 @@
-function find-ssh-agent --description "find or run ssh-agent"
- # let's avoid storing the agent's socket under /tmp
- set -l ssh_auth_sock $XDG_RUNTIME_DIR/ssh-agent.sock
-
- if set -q SSH_AGENT_PID; and set -q SSH_AUTH_SOCK
- # if variables already defined, then try to connect to agent
- ssh-add -l &>/dev/null
- test $status -ne 2; and return
- end
-
- set -l user_id (id -u)
- set -l ssh_agent_pid (pgrep --exact --newest --uid $user_id ssh-agent)
-
- if test -S $ssh_auth_sock
- set --global --export SSH_AUTH_SOCK $ssh_auth_sock
- set --global --export SSH_AGENT_PID $ssh_agent_pid
- else
- eval (ssh-agent -c -a $ssh_auth_sock)
- end
-end
diff --git a/home/shell/fish/functions/new-go-project.fish b/home/shell/fish/functions/new-go-project.fish
deleted file mode 100644
index e00a036..0000000
--- a/home/shell/fish/functions/new-go-project.fish
+++ /dev/null
@@ -1,27 +0,0 @@
-function new-go-project --description "create a new go project"
- set -l project_name $argv[1]
-
- echo "> creating $project_name"
- cd ~/workspace/
- mkdir $project_name
- cd $project_name
-
- echo "> running `git init'"
- git init .
-
- echo "> setting the default template for go projects"
- nix flake init -t ~/workspace/world/templates#go
- direnv allow
-
- echo "> creating initial commit, touch your yubikey"
- git add .
- git commit -m 'initial commit'
-
- echo "> pushing to https://git.fcuny.net/fcuny/$project_name"
- git remote add origin https://git.fcuny.net/fcuny/$project_name
- git push origin --all
-
- echo "> enabling drone CI for the repository"
- drone --token (pass credentials/ci.fcuny.net) repo sync
- drone --token (pass credentials/ci.fcuny.net) repo enable fcuny/$project_name
-end
diff --git a/home/shell/fish/functions/nix-rebuild-hm.fish b/home/shell/fish/functions/nix-rebuild-hm.fish
deleted file mode 100644
index 3101e51..0000000
--- a/home/shell/fish/functions/nix-rebuild-hm.fish
+++ /dev/null
@@ -1,4 +0,0 @@
-function nix-rebuild-hm --description "rebuild home manager"
- cd ~/workspace/world
- home-manager switch --flake .
-end
diff --git a/home/shell/fish/functions/nix-rebuild-host.fish b/home/shell/fish/functions/nix-rebuild-host.fish
deleted file mode 100644
index 02c0050..0000000
--- a/home/shell/fish/functions/nix-rebuild-host.fish
+++ /dev/null
@@ -1,4 +0,0 @@
-function nix-rebuild-host --description "rebuild the current host"
- cd ~/workspace/world
- sudo nixos-rebuild switch --flake .
-end
diff --git a/home/shell/fish/interactive.fish b/home/shell/fish/interactive.fish
deleted file mode 100644
index 4adcba8..0000000
--- a/home/shell/fish/interactive.fish
+++ /dev/null
@@ -1,8 +0,0 @@
-# Tmux on terminal start, unless we're in a SSH connection
-if status is-interactive
- if test -z "$SSH_CONNECTION"
- if not tmux has-session 2>/dev/null; or test -z "$TMUX"
- exec tmux new-session -A -s 0
- end
- end
-end
diff --git a/home/shell/fish/login.fish b/home/shell/fish/login.fish
deleted file mode 100644
index 8f29553..0000000
--- a/home/shell/fish/login.fish
+++ /dev/null
@@ -1,10 +0,0 @@
-# disable greeting
-set -U fish_greeting ''
-
-# set up ssh-agent
-find-ssh-agent
-
-# start sway
-if test -z "$DISPLAY"; and test (tty) = "/dev/tty1"
- exec sway
-end
diff --git a/home/shell/zsh/default.nix b/home/shell/zsh/default.nix
deleted file mode 100644
index 3734fc3..0000000
--- a/home/shell/zsh/default.nix
+++ /dev/null
@@ -1,48 +0,0 @@
-{ config, pkgs, lib, ... }:
-let
- cfg = config.my.home.shell;
- aliases = config.my.home.shell.aliases;
-in
-{
- config = lib.mkIf (cfg.name == "zsh") {
- home.packages = with pkgs; [ zsh-completions ];
-
- programs.zsh = {
- enable = true;
- dotDir = ".config/zsh";
-
- enableCompletion = true;
- enableAutosuggestions = true;
-
- history = {
- size = 500000;
- save = 500000;
- extended = false;
- ignoreSpace = true;
- ignoreDups = true;
- share = false;
- # see
- # https://github.com/nix-community/home-manager/blob/32a7da69dc53c9eb5ad0675eb7fdc58f7fe35272/modules/programs/zsh.nix#L537
- path = ".local/share/zsh/zsh_history";
- };
-
- localVariables = {
- # Print timing statistics for everything which takes longer than 5 seconds of
- # user + system time.
- REPORTTIME = 5;
- };
-
- shellAliases = aliases;
-
- defaultKeymap = "emacs";
-
- initExtra = lib.concatMapStrings builtins.readFile [
- ./completion-style.zsh
- ./options.zsh
- ./prompt.zsh
- ./tmux.zsh
- ./new-go-project.zsh
- ];
- };
- };
-}