[feat] Change paths around
This commit is contained in:
194
config/nix/common/home.nix
Normal file
194
config/nix/common/home.nix
Normal file
@@ -0,0 +1,194 @@
|
||||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, device
|
||||
, overlays
|
||||
, ...
|
||||
|
||||
}:
|
||||
let
|
||||
start-tmux = (import ../scripts/start-tmux.nix) pkgs;
|
||||
in
|
||||
# https://mipmip.github.io/home-manager-option-search/
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
neovim-nightly = overlays.neovim-nightly;
|
||||
})
|
||||
];
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./tmux.nix
|
||||
./wezterm.nix
|
||||
../linux/hyprland.nix
|
||||
];
|
||||
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
shellAbbrs = {
|
||||
vim = "nvim";
|
||||
vi = "nvim";
|
||||
nv = "nvim";
|
||||
g = "git";
|
||||
cd = "z";
|
||||
ls = "exa";
|
||||
t = "${start-tmux}";
|
||||
};
|
||||
interactiveShellInit = ''
|
||||
set fish_greeting
|
||||
${pkgs.macchina.outPath}/bin/macchina
|
||||
'';
|
||||
};
|
||||
|
||||
nushell = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
"cd" = "z";
|
||||
};
|
||||
package = pkgs.nushellFull;
|
||||
configFile.text = ''
|
||||
$env.config = {
|
||||
show_banner: false,
|
||||
}
|
||||
'';
|
||||
};
|
||||
zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
starship = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
eza = {
|
||||
enable = true;
|
||||
enableAliases = true;
|
||||
git = true;
|
||||
icons = true;
|
||||
};
|
||||
carapace = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
fzf = {
|
||||
enable = true;
|
||||
package = pkgs.fzf;
|
||||
enableFishIntegration = true;
|
||||
tmux.enableShellIntegration = true;
|
||||
};
|
||||
keychain = {
|
||||
enable = true;
|
||||
# keys = [ "id_ed25519" ];
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
yazi = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
foot = {
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
shell = "${pkgs.fish.outPath}/bin/fish";
|
||||
font = "Hasklug Nerd Font Mono:size=13";
|
||||
initial-window-size-pixels = "1440x800";
|
||||
};
|
||||
colors = {
|
||||
foreground = "f8f8f2";
|
||||
background = 000000;
|
||||
alpha = 0.8;
|
||||
|
||||
"136" = "af8700";
|
||||
|
||||
regular0 = "21222c";
|
||||
regular1 = "ff5555";
|
||||
regular2 = "50fa7b";
|
||||
regular3 = "f1fa8c";
|
||||
regular4 = "bd93f9";
|
||||
regular5 = "ff79c6";
|
||||
regular6 = "8be9fd";
|
||||
regular7 = "f8f8f2";
|
||||
|
||||
bright0 = "6272a4";
|
||||
bright1 = "ff6e6e";
|
||||
bright2 = "69ff94";
|
||||
bright3 = "ffffa5";
|
||||
bright4 = "d6acff";
|
||||
bright5 = "ff92df";
|
||||
bright6 = "a4ffff";
|
||||
bright7 = "ffffff";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
home-manager = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
username = device.user;
|
||||
homeDirectory =
|
||||
if device.system == "x86-64-linux" then
|
||||
lib.mkForce "/home/${device.user}"
|
||||
else
|
||||
lib.mkForce "/Users/${device.user}";
|
||||
|
||||
|
||||
stateVersion = "23.11";
|
||||
|
||||
packages = [
|
||||
pkgs.macchina
|
||||
pkgs.ripgrep
|
||||
pkgs.alejandra
|
||||
# pkgs.neovim-nightly
|
||||
pkgs.cachix
|
||||
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||
# # "Hello, world!" when run.
|
||||
# pkgs.hello
|
||||
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||
# # fonts?
|
||||
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||
|
||||
# # You can also create simple shell scripts directly inside your
|
||||
# # configuration. For example, this adds a command 'my-hello' to your
|
||||
# # environment:
|
||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||
# echo "Hello, ${config.home.username}!"
|
||||
# '')
|
||||
];
|
||||
|
||||
file = {
|
||||
".config/tmux/sessions".source = ../../tmux/sessions;
|
||||
".config/nvim".source = ../../nvim;
|
||||
|
||||
# # You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
SHELL = "${pkgs.fish.outPath}/bin/fish";
|
||||
};
|
||||
sessionPath = [
|
||||
"${config.home.homeDirectory}/.local/bin"
|
||||
"${config.home.homeDirectory}/.nix-profile/bin"
|
||||
];
|
||||
};
|
||||
}
|
||||
74
config/nix/common/tmux.nix
Normal file
74
config/nix/common/tmux.nix
Normal file
@@ -0,0 +1,74 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
tmux-super-fingers =
|
||||
pkgs.tmuxPlugins.mkTmuxPlugin
|
||||
{
|
||||
pluginName = "tmux-super-fingers";
|
||||
version = "v1-2024-02-14";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "artemave";
|
||||
repo = "tmux_super_fingers";
|
||||
rev = "518044ef78efa1cf3c64f2e693fef569ae570ddd";
|
||||
sha256 = "sha256-iKfx9Ytk2vSuINvQTB6Kww8Vv7i51cFEnEBHLje+IJw=";
|
||||
};
|
||||
};
|
||||
scratchpad = pkgs.writeShellScript "scratchpad" ''
|
||||
width=''\${2:-95%}
|
||||
height=''\${2:-95%}
|
||||
if [ "$(tmux display-message -p -F "#{session_name}")" = "scratch" ];then
|
||||
tmux detach-client
|
||||
else
|
||||
tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux attach -t scratch || tmux new -s scratch"
|
||||
fi
|
||||
'';
|
||||
in
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
shell = "${pkgs.nushellFull}/bin/nu";
|
||||
terminal = "tmux-256color";
|
||||
prefix = "C-q";
|
||||
historyLimit = 100000;
|
||||
keyMode = "vi";
|
||||
plugins = with pkgs; [
|
||||
tmuxPlugins.better-mouse-mode
|
||||
{
|
||||
plugin = tmux-super-fingers;
|
||||
extraConfig = "set -g @super-fingers-key o";
|
||||
}
|
||||
{
|
||||
plugin = tmuxPlugins.catppuccin;
|
||||
extraConfig = ''
|
||||
set -g @catppuccin_flavour 'mocha'
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = tmuxPlugins.battery;
|
||||
extraConfig = ''
|
||||
set -g @catppuccin_status_modules_right "battery application session date_time"
|
||||
'';
|
||||
}
|
||||
];
|
||||
extraConfig = ''
|
||||
set -gw mode-keys vi
|
||||
set -g status-keys vi
|
||||
set -g allow-passthrough on
|
||||
set -ga update-environment TERM
|
||||
set -ga update-environment TERM_PROGRAM
|
||||
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
bind-key -n C-\\ run-shell ${scratchpad}
|
||||
|
||||
bind C-n next-window
|
||||
bind C-p previous-window
|
||||
bind C-q last-window
|
||||
|
||||
if-shell 'uname | grep -q "Darwin"' { set -s copy-command "pbcopy" }
|
||||
if-shell 'uname | grep -q "Linux"' { set -s copy-command "wl-copy" }
|
||||
'';
|
||||
};
|
||||
}
|
||||
63
config/nix/common/wezterm.nix
Normal file
63
config/nix/common/wezterm.nix
Normal file
@@ -0,0 +1,63 @@
|
||||
{pkgs, ...}: {
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
local wezterm = require 'wezterm';
|
||||
return {
|
||||
-- -- font = wezterm.font("Hasklug Nerd Font Mono", { weight = "Regular", stretch = "Normal", style = "Normal" }),
|
||||
-- font = wezterm.font_with_fallback({
|
||||
-- "Hasklig",
|
||||
-- "Symbols Nerd Font Mono"
|
||||
-- }),
|
||||
|
||||
font_size = 16,
|
||||
colors = {
|
||||
-- The default text color
|
||||
foreground = "#f8f8f2",
|
||||
-- The default background color
|
||||
-- background = "#282a36",
|
||||
-- Overrides the cell background color when the current cell is occupied by the
|
||||
-- cursor and the cursor style is set to Block
|
||||
cursor_bg = "#f8f8f2",
|
||||
-- Overrides the text color when the current cell is occupied by the cursor
|
||||
cursor_fg = "#000",
|
||||
-- Specifies the border color of the cursor when the cursor style is set to Block,
|
||||
-- or the color of the vertical or horizontal bar when the cursor style is set to
|
||||
-- Bar or Underline.
|
||||
cursor_border = "#52ad70",
|
||||
-- the foreground color of selected text
|
||||
selection_fg = "#ffffff",
|
||||
-- the background color of selected text
|
||||
selection_bg = "#ffffff",
|
||||
-- The color of the scrollbar "thumb"; the portion that represents the current viewport
|
||||
scrollbar_thumb = "#222222",
|
||||
-- The color of the split lines between panes
|
||||
split = "#444444",
|
||||
ansi = { "#21222c", "#ff5555", "#50fa7b", "#f1fa8c", "#bd93f9", "#ff79c6", "#8be9fd", "#f8f8f2" },
|
||||
brights = { "#6272a4", "#ff6e6e", "#69ff94", "#ffffa5", "#d6acff", "#ff92df", "#a4ffff", "#ffffff" },
|
||||
-- Arbitrary colors of the palette in the range from 16 to 255
|
||||
indexed = { [136] = "#af8700" },
|
||||
-- Since: nightly builds only
|
||||
-- When the IME, a dead key or a leader key are being processed and are effectively
|
||||
-- holding input pending the result of input composition, change the cursor
|
||||
-- to this color to give a visual cue about the compose state.
|
||||
compose_cursor = "orange",
|
||||
},
|
||||
initial_cols = 120,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
window_background_opacity = 0.8,
|
||||
cursor_blink_rate = 8,
|
||||
default_cursor_style = "BlinkingBlock",
|
||||
default_prog = { "${pkgs.fish.outPath}/bin/fish", "-l" },
|
||||
window_padding = {
|
||||
left = 2,
|
||||
right = 0,
|
||||
top = 2,
|
||||
bottom = 0,
|
||||
},
|
||||
window_decorations = "RESIZE",
|
||||
use_ime = false,
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user