Compare commits

...

13 Commits

20 changed files with 167 additions and 230 deletions

View File

@@ -4,16 +4,3 @@
# Set NeoVim as default editor # Set NeoVim as default editor
export EDITOR=nvim export EDITOR=nvim
export SUDO_EDITOR="$EDITOR" export SUDO_EDITOR="$EDITOR"
declare -A -r EDITOR_CONFIGS=(
["nvim"]="$HOME/.config/nvim/init.lua"
["vim"]="$HOME/.vimrc"
)
edit_editor_config() {
for editor in "${!EDITOR_CONFIGS[@]}"; do
if [ "$EDITOR" = "$editor" ]; then
$EDITOR "${EDITOR_CONFIGS[$editor]}"
fi
done
}

View File

@@ -11,6 +11,6 @@ vim.keymap.set("n", "<leader>fd", fzf.diagnostics_workspace)
vim.keymap.set("n", "<leader>fhe", fzf.help_tags) vim.keymap.set("n", "<leader>fhe", fzf.help_tags)
vim.keymap.set("n", "<leader>fhi", fzf.search_history) vim.keymap.set("n", "<leader>fhi", fzf.search_history)
vim.keymap.set("n", "<leader>fma", fzf.marks) vim.keymap.set("n", "<leader>fma", fzf.marks)
vim.keymap.set("n", "<leader>fma", fzf.man_pages) vim.keymap.set("n", "<leader>fmp", fzf.man_pages)
vim.keymap.set("i", "<c-f>", fzf.complete_path) vim.keymap.set("i", "<c-f>", fzf.complete_path)

View File

@@ -1,8 +1,5 @@
require("neodev").setup() -- should setup before lspconfig require("neodev").setup() -- should setup before lspconfig
-- vim.g.coq_settings = { auto_start = 'shut-up' }
-- local capabilities = coq.lsp_ensure_capabilities()
local cmp_nvim_lsp = require("cmp_nvim_lsp") local cmp_nvim_lsp = require("cmp_nvim_lsp")
local capabilities = cmp_nvim_lsp.default_capabilities() local capabilities = cmp_nvim_lsp.default_capabilities()
@@ -64,7 +61,6 @@ local servers = {
Lua = {}, Lua = {},
}, },
}, },
-- marksman = {},
nixd = {}, nixd = {},
pyright = {}, pyright = {},
-- tsserver = {}, -- tsserver = {},

View File

@@ -1,10 +1,7 @@
require("nixCatsUtils").setup({ non_nix_value = true }) -- https://github.com/BirdeeHub/nixCats-nvim/blob/77dffad8235eb77684fcb7599487c8e9f23d5b8f/templates/example/init.lua require("nixCatsUtils").setup({ non_nix_value = true }) -- https://github.com/BirdeeHub/nixCats-nvim/blob/77dffad8235eb77684fcb7599487c8e9f23d5b8f/templates/example/init.lua
vim.cmd([[ vim.opt.termguicolors = true
set termguicolors vim.api.nvim_set_hl(0, "Normal", { ctermbg = "NONE", bg = "NONE" })
set bg=light
hi Normal ctermbg=none guibg=NONE
]])
require("base") require("base")
require("cursor") require("cursor")
@@ -22,7 +19,5 @@ require("utils")
require("zk") require("zk")
require("reload") require("reload")
require("paq-setup") -- when not on nixCats
vim.opt.background = "dark" vim.opt.background = "dark"
vim.opt.laststatus = 3 vim.opt.laststatus = 3

View File

@@ -39,10 +39,22 @@ bind-key -T root F7 select-window -t 7
bind-key -T root F8 select-window -t 8 bind-key -T root F8 select-window -t 8
bind-key -T root F9 select-window -t 9 bind-key -T root F9 select-window -t 9
# bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
# bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
bind-key -T root S-F1 join-pane -s :1
bind-key -T root S-F2 join-pane -s :2
bind-key -T root S-F3 join-pane -s :3
bind-key -T root S-F4 join-pane -s :4
bind-key -T root S-F5 join-pane -s :5
bind-key -T root S-F6 join-pane -s :6
bind-key -T root S-F7 join-pane -s :7
bind-key -T root S-F8 join-pane -s :8
bind-key -T root S-F9 join-pane -s :9
# 1-based indexing makes most sense for keyboard layouts (where number row start at 1) # 1-based indexing makes most sense for keyboard layouts (where number row start at 1)
set -g base-index 1 set -g base-index 1
set -g pane-base-index 1 set -g pane-base-index 1
setw -g automatic-rename
# statusbar # statusbar
set -g status-position top set -g status-position top
@@ -53,7 +65,7 @@ set -g status-left "#[bg=colour235,fg=colour255] #S #[fg=colour235,bg=default]
set -g status-right "" set -g status-right ""
%else %else
set -g status-left '#h ' set -g status-left '#h '
set -g status-right '#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") %a%l:%M:%S %p %Y-%m-%d' set -g status-right '#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") %a %l:%M:%S %p %Y-%m-%d'
%endif %endif
# theming # theming
@@ -75,3 +87,5 @@ set-hook -g after-new-session 'if -F "#{==:#{session_name},ssh}" "source ${XDG_C
if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 4 \)'" 'bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel' if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 4 \)'" 'bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel'
if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 4\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'bind-key -t vi-copy v begin-selection; bind-key -t vi-copy y copy-selection' if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 4\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'bind-key -t vi-copy v begin-selection; bind-key -t vi-copy y copy-selection'
if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 2\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'set-option -g status-utf8 on' if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 2\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'set-option -g status-utf8 on'
set -g allow-passthrough on

View File

@@ -64,6 +64,7 @@
inherit system; inherit system;
overlays = [ nixgl.overlay ]; overlays = [ nixgl.overlay ];
}; };
dotsPath = ./dots;
in in
{ {
nix.nixPath = [ nix.nixPath = [
@@ -74,7 +75,7 @@
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
modules = [ ./hosts/${host} ]; modules = [ ./hosts/${host} ];
specialArgs = { specialArgs = {
inherit inputs outputs; inherit inputs outputs dotsPath;
}; };
} }
); );
@@ -83,7 +84,7 @@
inherit pkgs; inherit pkgs;
modules = [ ./home/hosts/work ]; modules = [ ./home/hosts/work ];
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs outputs; inherit inputs outputs dotsPath;
}; };
}; };
}; };

View File

@@ -47,12 +47,4 @@ in
inherit pkgs; inherit pkgs;
inherit config; inherit config;
}; };
home.file = {
".config/kitty/kitty.conf".source = ../../../dots/.config/kitty/kitty.conf;
".config/kitty/themes/zenwritten_light.conf".source =
../../../dots/.config/kitty/themes/zenwritten_light.conf;
".config/kitty/themes/zenwritten_dark.conf".source =
../../../dots/.config/kitty/themes/zenwritten_dark.conf;
};
} }

View File

@@ -45,12 +45,4 @@ in
inherit pkgs; inherit pkgs;
inherit config; inherit config;
}; };
home.file = {
".config/kitty/kitty.conf".source = ../../../dots/.config/kitty/kitty.conf;
".config/kitty/themes/zenwritten_light.conf".source =
../../../dots/.config/kitty/themes/zenwritten_light.conf;
".config/kitty/themes/zenwritten_dark.conf".source =
../../../dots/.config/kitty/themes/zenwritten_dark.conf;
};
} }

View File

@@ -28,8 +28,6 @@ with pkgs;
sops sops
sshfs sshfs
tldr tldr
tmux
tmuxp
tree tree
unzip unzip
vimPlugins.vim-plug vimPlugins.vim-plug

View File

@@ -0,0 +1,78 @@
{ inputs, pkgs }:
let
bookmarks = import ./bookmarks.nix;
in
{
nativeMessagingHosts = with pkgs; [
tridactyl-native
];
profiles = {
default = {
settings = {
"signon.rememberSignons" = false;
"findbar.highlightAll" = true;
"extensions.autoDisableScopes" = 0;
};
extensions = {
packages = with inputs.firefox-addons.packages.${pkgs.system}; [
duckduckgo-privacy-essentials
istilldontcareaboutcookies
libredirect
keepassxc-browser
react-devtools
sponsorblock
tridactyl
ublock-origin
];
};
bookmarks = {
force = true;
settings = [
{
toolbar = true;
bookmarks = [
bookmarks.nixos
];
}
];
};
};
};
policies = {
DefaultDownloadDirectory = "\${home}/dl";
ExtensionSettings = {
"jid1-ZAdIEUB7XOzOJw@jetpack" = {
default_area = "navbar";
private_browsing = true;
};
"idcac-pub@guus.ninja" = {
default_area = "navbar";
private_browsing = true;
};
"7esoorv3@alefvanoon.anonaddy.me" = {
default_area = "navbar";
};
"keepassxc-browser@keepassxc.org" = {
default_area = "navbar";
private_browsing = true;
};
"@react-devtools" = {
default_area = "navbar";
private_browsing = true;
};
"sponsorBlocker@ajay.app" = {
default_area = "navbar";
private_browsing = true;
};
"tridactyl.vim@cmcaine.co.uk".settings = {
private_browsing = true;
};
"uBlock0@raymondhill.net".settings = {
default_area = "navbar";
private_browsing = true;
};
};
};
}

View File

@@ -1,89 +1,10 @@
{ { config, lib, inputs, pkgs, ... }:
config,
inputs,
lib,
pkgs,
...
}:
let
bookmarks = import ./bookmarks.nix;
in
{ {
config = lib.mkIf (config.browser.primary == "firefox" || config.browser.secondary == "firefox") { config = lib.mkIf (config.browser.primary == "firefox" || config.browser.secondary == "firefox") {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
nativeMessagingHosts = with pkgs; [
tridactyl-native
];
profiles = {
default = {
settings = {
"signon.rememberSignons" = false;
"findbar.highlightAll" = true;
"extensions.autoDisableScopes" = 0;
};
extensions = {
packages = with inputs.firefox-addons.packages.${pkgs.system}; [
duckduckgo-privacy-essentials
istilldontcareaboutcookies
libredirect
keepassxc-browser
react-devtools
sponsorblock
tridactyl
ublock-origin
];
};
bookmarks = {
force = true;
settings = [
{
toolbar = true;
bookmarks = [
bookmarks.nixos
];
} }
]; // (import ./firefox-base.nix { inherit inputs pkgs; });
};
};
};
policies = {
DefaultDownloadDirectory = "\${home}/dl";
ExtensionSettings = {
"jid1-ZAdIEUB7XOzOJw@jetpack" = {
default_area = "navbar";
private_browsing = true;
};
"idcac-pub@guus.ninja" = {
default_area = "navbar";
private_browsing = true;
};
"7esoorv3@alefvanoon.anonaddy.me" = {
default_area = "navbar";
};
"keepassxc-browser@keepassxc.org" = {
default_area = "navbar";
private_browsing = true;
};
"@react-devtools" = {
default_area = "navbar";
private_browsing = true;
};
"sponsorBlocker@ajay.app" = {
default_area = "navbar";
private_browsing = true;
};
"tridactyl.vim@cmcaine.co.uk".settings = {
private_browsing = true;
};
"uBlock0@raymondhill.net".settings = {
default_area = "navbar";
private_browsing = true;
};
};
};
};
}; };
} }

View File

@@ -1,14 +1,4 @@
{ { config, lib, inputs, pkgs, ... }:
config,
inputs,
lib,
pkgs,
...
}:
let
bookmarks = import ./bookmarks.nix;
in
{ {
config = config =
@@ -16,76 +6,7 @@ in
{ {
programs.librewolf = { programs.librewolf = {
enable = true; enable = true;
nativeMessagingHosts = with pkgs; [
tridactyl-native
];
profiles = {
default = {
settings = {
"signon.rememberSignons" = false;
"findbar.highlightAll" = true;
"extensions.autoDisableScopes" = 0;
};
extensions = {
packages = with inputs.firefox-addons.packages.${pkgs.system}; [
duckduckgo-privacy-essentials
istilldontcareaboutcookies
libredirect
keepassxc-browser
react-devtools
sponsorblock
tridactyl
ublock-origin
];
};
bookmarks = {
force = true;
settings = [
{
toolbar = true;
bookmarks = [
bookmarks.nixos
];
} }
]; // (import ./firefox-base.nix { inherit inputs pkgs; });
};
};
};
policies = {
DefaultDownloadDirectory = "\${home}/dl";
ExtensionSettings = {
"jid1-ZAdIEUB7XOzOJw@jetpack" = {
default_area = "navbar";
private_browsing = true;
};
"idcac-pub@guus.ninja" = {
default_area = "navbar";
private_browsing = true;
};
"7esoorv3@alefvanoon.anonaddy.me" = {
default_area = "navbar";
};
"keepassxc-browser@keepassxc.org" = {
default_area = "navbar";
private_browsing = true;
};
"@react-devtools" = {
default_area = "navbar";
private_browsing = true;
};
"sponsorBlocker@ajay.app" = {
default_area = "navbar";
private_browsing = true;
};
"tridactyl.vim@cmcaine.co.uk".settings = {
private_browsing = true;
};
"uBlock0@raymondhill.net".settings = {
default_area = "navbar";
private_browsing = true;
};
};
};
};
}; };
} }

View File

@@ -1,8 +1,10 @@
{ dotsPath, ... }:
{ {
programs.git.enable = true; programs.git.enable = true;
home.file = { home.file = {
".gitconfig".source = ../../dots/.gitconfig; ".gitconfig".source = dotsPath + "/.gitconfig";
".gitconfig.work".source = ../../dots/.gitconfig.work; ".gitconfig.work".source = dotsPath + "/.gitconfig.work";
".gitignore".source = ../../dots/.gitignore; ".gitignore".source = dotsPath + "/.gitignore";
}; };
} }

View File

@@ -1,10 +1,23 @@
{ pkgs, ... }: { pkgs, config, lib, dotsPath, ... }:
{ {
config = { config = {
home.packages = [ pkgs.kitty ]; home.packages = [
(if config.lib ? nixGL
then config.lib.nixGL.wrap pkgs.kitty
else pkgs.kitty)
];
programs.bash.shellAliases = { programs.bash.shellAliases = {
icat = "kitty +kitten icat"; icat = "kitty +kitten icat";
}; };
home.file = {
".config/kitty/kitty.conf".source = dotsPath + "/.config/kitty/kitty.conf";
".config/kitty/nvim.conf".source = dotsPath + "/.config/kitty/nvim.conf";
".config/kitty/themes/zenwritten_light.conf".source =
dotsPath + "/.config/kitty/themes/zenwritten_light.conf";
".config/kitty/themes/zenwritten_dark.conf".source =
dotsPath + "/.config/kitty/themes/zenwritten_dark.conf";
};
}; };
} }

View File

@@ -1,9 +1,9 @@
{ inputs, ... }: { inputs, pkgs, ... }:
{ {
config = { config = {
home.packages = [ home.packages = [
inputs.nvim.packages.${builtins.currentSystem}.nvim inputs.nvim.packages.${pkgs.system}.nvim
]; ];
}; };
} }

View File

@@ -2,12 +2,12 @@
config, config,
lib, lib,
pkgs, pkgs,
dotsPath,
... ...
}: }:
let let
cfg = config.shell.bash; cfg = config.shell.bash;
username = config.home.username; username = config.home.username;
dotsPath = ../../../dots;
in in
{ {
options.shell.bash = { options.shell.bash = {

View File

@@ -3,5 +3,6 @@
./bash.nix ./bash.nix
./utils.nix ./utils.nix
./prompt.nix ./prompt.nix
../tmux.nix
]; ];
} }

View File

@@ -2,6 +2,7 @@
config, config,
lib, lib,
pkgs, pkgs,
dotsPath,
osConfig ? null, osConfig ? null,
... ...
}: }:
@@ -25,19 +26,19 @@ in
home.file = { home.file = {
".config/task/taskrc" = { ".config/task/taskrc" = {
force = true; # overwrite when present force = true; # overwrite when present
source = ../../dots/.config/task/taskrc; source = dotsPath + "/.config/task/taskrc";
}; };
".config/task/taskrc.d/aliases".source = ../../dots/.config/task/taskrc.d/aliases; ".config/task/taskrc.d/aliases".source = dotsPath + "/.config/task/taskrc.d/aliases";
".config/task/taskrc.d/colors".source = ../../dots/.config/task/taskrc.d/colors; ".config/task/taskrc.d/colors".source = dotsPath + "/.config/task/taskrc.d/colors";
".config/task/taskrc.d/contexts".source = ../../dots/.config/task/taskrc.d/contexts; ".config/task/taskrc.d/contexts".source = dotsPath + "/.config/task/taskrc.d/contexts";
".config/task/taskrc.d/reports".source = ../../dots/.config/task/taskrc.d/reports; ".config/task/taskrc.d/reports".source = dotsPath + "/.config/task/taskrc.d/reports";
".config/task/taskrc.d/udas".source = ../../dots/.config/task/taskrc.d/udas; ".config/task/taskrc.d/udas".source = dotsPath + "/.config/task/taskrc.d/udas";
".config/task/taskrc.d/urgency".source = ../../dots/.config/task/taskrc.d/urgency; ".config/task/taskrc.d/urgency".source = dotsPath + "/.config/task/taskrc.d/urgency";
".local/share/task/hooks/on-exit.sync.py" = { ".local/share/task/hooks/on-exit.sync.py" = {
source = ../../dots/.local/share/task/hooks/on-exit.sync.py; source = dotsPath + "/.local/share/task/hooks/on-exit.sync.py";
}; };
".local/share/task/scripts/sync-and-notify.sh" = { ".local/share/task/scripts/sync-and-notify.sh" = {
source = ../../dots/.local/share/task/scripts/sync-and-notify.sh; source = dotsPath + "/.local/share/task/scripts/sync-and-notify.sh";
executable = true; executable = true;
}; };
}; };

25
home/modules/tmux.nix Normal file
View File

@@ -0,0 +1,25 @@
{
pkgs,
dotsPath,
...
}:
{
config = {
home.packages = with pkgs; [
tmux
tmuxp
reptyr
];
home.file = {
".config/tmux/tmux.conf".source = dotsPath + "/.config/tmux/tmux.conf";
".config/tmux/tmux.regular.conf".source = dotsPath + "/.config/tmux/tmux.regular.conf";
".config/tmux/themes/zenwritten_light.tmux".source =
dotsPath + "/.config/tmux/themes/zenwritten_light.tmux";
".config/tmux/themes/zenwritten_dark.tmux".source =
dotsPath + "/.config/tmux/themes/zenwritten_dark.tmux";
".config/tmux/hooks/tmux.ssh.conf".source = dotsPath + "/.config/tmux/hooks/tmux.ssh.conf";
".config/tmux/hooks/tmux.regular.conf".source = dotsPath + "/.config/tmux/hooks/tmux.regular.conf";
};
};
}

View File

@@ -1,4 +1,4 @@
{ inputs, outputs, ... }: { inputs, outputs, dotsPath, ... }:
{ {
imports = [ imports = [
@@ -19,7 +19,7 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs outputs; inherit inputs outputs dotsPath;
}; };
}; };