From b08d50f4c2099be0a9eab8953e9be9204d39657f Mon Sep 17 00:00:00 2001 From: Ethan Simmons Date: Mon, 15 Jul 2024 12:16:09 -0500 Subject: [PATCH] Move fish config to shared --- flake.lock | 8 ++++++ hosts/alpheratz/home.nix | 2 +- hosts/ankaa/dotfiles/fish/config.fish | 12 -------- hosts/ankaa/home.nix | 3 +- hosts/default/home.nix | 1 + hosts/shared/dotfiles/fish/cli-config.fish | 28 ++++++++++++++++++ hosts/shared/dotfiles/fish/gui-config.fish | 33 ++++++++++++++++++++++ 7 files changed, 73 insertions(+), 14 deletions(-) create mode 100644 hosts/shared/dotfiles/fish/cli-config.fish create mode 100644 hosts/shared/dotfiles/fish/gui-config.fish diff --git a/flake.lock b/flake.lock index 7268e37..1dab5ff 100644 --- a/flake.lock +++ b/flake.lock @@ -158,11 +158,19 @@ }, "nixpkgs-unstable": { "locked": { +<<<<<<< HEAD "lastModified": 1720957393, "narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=", "owner": "nixos", "repo": "nixpkgs", "rev": "693bc46d169f5af9c992095736e82c3488bf7dbb", +======= + "lastModified": 1720768451, + "narHash": "sha256-EYekUHJE2gxeo2pM/zM9Wlqw1Uw2XTJXOSAO79ksc4Y=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9", +>>>>>>> 53d356d (Move fish config to shared) "type": "github" }, "original": { diff --git a/hosts/alpheratz/home.nix b/hosts/alpheratz/home.nix index b5f0b1a..f9433c1 100644 --- a/hosts/alpheratz/home.nix +++ b/hosts/alpheratz/home.nix @@ -20,8 +20,8 @@ home.file.".config/nvim".source = ../shared/dotfiles/nvim; home.file.".tmux.conf".source = ../shared/dotfiles/tmux; + home.file.".config/fish/config.fish".source = ../shared/dotfiles/fish/gui-config.fish; home.file.".config/waybar".source = ./dotfiles/waybar; - home.file.".config/fish/config.fish".source = ./dotfiles/fish/config.fish; programs.home-manager.enable = true; diff --git a/hosts/ankaa/dotfiles/fish/config.fish b/hosts/ankaa/dotfiles/fish/config.fish index 797bc55..787510e 100644 --- a/hosts/ankaa/dotfiles/fish/config.fish +++ b/hosts/ankaa/dotfiles/fish/config.fish @@ -13,30 +13,18 @@ if status is-interactive function fish_mode_prompt end - ### Local environment variables - set -x DENO_INSTALL "/home/eesim/.deno" - direnv hook fish | source end if status is-login - # SSH settings - eval (ssh-agent -c) - ssh-add /home/eesim/.ssh/id_ed25519 - - # Set environment variables in /etc/profile.d/ - # exec bash -c "test -e /etc/profile && source /etc/profile" - # Disable GTK portal set -x GTK_USE_PORTAL "0" - # Java fix set -x _JAVA_AWT_WM_NONREPARENTING "1" - end if test (tty) = "/dev/tty1" diff --git a/hosts/ankaa/home.nix b/hosts/ankaa/home.nix index 76b75b5..49917e4 100644 --- a/hosts/ankaa/home.nix +++ b/hosts/ankaa/home.nix @@ -20,8 +20,9 @@ }; home.file.".config/nvim".source = ../shared/dotfiles/nvim; + home.file.".config/fish/config.fish".source = ../shared/dotfiles/fish/gui-config.fish; + home.file.".config/waybar".source = ./dotfiles/waybar; - home.file.".config/fish/config.fish".source = ./dotfiles/fish/config.fish; home.file.".config/alacritty/alacritty.toml".source = ./dotfiles/alacritty/alacritty.toml; home.file.".ssh/config".source = ./dotfiles/ssh/config; diff --git a/hosts/default/home.nix b/hosts/default/home.nix index cddd1a1..2f65289 100644 --- a/hosts/default/home.nix +++ b/hosts/default/home.nix @@ -20,6 +20,7 @@ home.file.".config/nvim".source = ../shared/dotfiles/nvim; home.file.".tmux.conf".source = ../shared/dotfiles/tmux; + home.file.".config/fish/config.fish".source = ../shared/dotfiles/fish/cli-config.fish; programs.home-manager.enable = true; diff --git a/hosts/shared/dotfiles/fish/cli-config.fish b/hosts/shared/dotfiles/fish/cli-config.fish new file mode 100644 index 0000000..a70692f --- /dev/null +++ b/hosts/shared/dotfiles/fish/cli-config.fish @@ -0,0 +1,28 @@ +if status is-interactive + fish_add_path "/home/eesim/.cargo/bin/" + + set fish_greeting + + set fish_cursor_default block + set fish_cursor_insert line + set fish_cursor_replace_one underscore + set fish_cursor_replace underscore + set fish_cursor_external line + set fish_cursor_visual block + + function fish_mode_prompt + end + + direnv hook fish | source + +end + +if status is-login + + # Disable GTK portal + set -x GTK_USE_PORTAL "0" + + # Java fix + set -x _JAVA_AWT_WM_NONREPARENTING "1" + +end diff --git a/hosts/shared/dotfiles/fish/gui-config.fish b/hosts/shared/dotfiles/fish/gui-config.fish new file mode 100644 index 0000000..787510e --- /dev/null +++ b/hosts/shared/dotfiles/fish/gui-config.fish @@ -0,0 +1,33 @@ +if status is-interactive + fish_add_path "/home/eesim/.cargo/bin/" + + set fish_greeting + + set fish_cursor_default block + set fish_cursor_insert line + set fish_cursor_replace_one underscore + set fish_cursor_replace underscore + set fish_cursor_external line + set fish_cursor_visual block + + function fish_mode_prompt + end + + direnv hook fish | source + +end + +if status is-login + + # Disable GTK portal + set -x GTK_USE_PORTAL "0" + + # Java fix + set -x _JAVA_AWT_WM_NONREPARENTING "1" + +end + +if test (tty) = "/dev/tty1" + sway +end +