WIP BROKEN SYSTEM ATM
This commit is contained in:
parent
2087ee1015
commit
1d9c4beaf3
21 changed files with 767 additions and 93 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
outputs =
|
||||
{
|
||||
home-manager,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
@ -21,8 +22,10 @@
|
|||
}:
|
||||
{
|
||||
imports = [
|
||||
home-manager.nixosModules.home-manager
|
||||
./options.nix
|
||||
./general
|
||||
./home_manager
|
||||
./boot
|
||||
./users
|
||||
./programs
|
||||
|
|
52
common/home_manager/default.nix
Normal file
52
common/home_manager/default.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ccfg = import ../config.nix;
|
||||
cfg_path = [
|
||||
ccfg.custom_config_key
|
||||
"homeManager"
|
||||
];
|
||||
cfg = lib.attrsets.getAttrFromPath cfg_path config;
|
||||
in
|
||||
{
|
||||
options =
|
||||
{ }
|
||||
// lib.attrsets.setAttrByPath cfg_path {
|
||||
users = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.attrs;
|
||||
default = { };
|
||||
description = "Home manager users to configure. Should match nix options of home-manager.users.<name>.*";
|
||||
};
|
||||
stateVersion = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "23.11";
|
||||
description = "Home manager state version";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
# Home manager options
|
||||
security.polkit.enable = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.backupFileExtension = "bak";
|
||||
|
||||
home-manager.sharedModules = [
|
||||
./programs/tmux/tmux.nix
|
||||
./programs/alacritty.nix
|
||||
./programs/atuin.nix
|
||||
];
|
||||
|
||||
home-manager.users = lib.mapAttrs' (name: userConfig: {
|
||||
inherit name;
|
||||
value = userConfig // {
|
||||
home.stateVersion = cfg.stateVersion;
|
||||
programs.home-manager.enable = true;
|
||||
home.username = name;
|
||||
home.homeDirectory = lib.mkForce "/home/${name}";
|
||||
};
|
||||
}) cfg.users;
|
||||
};
|
||||
}
|
33
common/home_manager/programs/alacritty.nix
Normal file
33
common/home_manager/programs/alacritty.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.alacritty = {
|
||||
settings = {
|
||||
window = {
|
||||
decorations = "None";
|
||||
dynamic_title = false;
|
||||
};
|
||||
colors = {
|
||||
primary = {
|
||||
foreground = "#e0e0e0";
|
||||
background = "#262626";
|
||||
};
|
||||
normal = {
|
||||
# Catppuccin Coal
|
||||
black = "#1f1f1f";
|
||||
red = "#f38ba8";
|
||||
green = "#a6e3a1";
|
||||
yellow = "#f9e2af";
|
||||
blue = "#89b4fa";
|
||||
magenta = "#cba6f7";
|
||||
cyan = "#89dceb";
|
||||
white = "#e0e0e0";
|
||||
};
|
||||
};
|
||||
font = {
|
||||
normal = { family = "JetBrainsMonoNL Nerd Font"; style = "Regular"; };
|
||||
size = 12.0;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
15
common/home_manager/programs/atuin.nix
Normal file
15
common/home_manager/programs/atuin.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.atuin = {
|
||||
enableZshIntegration = true;
|
||||
flags = [ "--disable-up-arrow" ];
|
||||
settings = {
|
||||
workspaces = true;
|
||||
exit-mode = "return-query";
|
||||
enter_accept = true;
|
||||
sync_address = "http://100.64.0.2:8888";
|
||||
sync = { records = true; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
28
common/home_manager/programs/direnv.nix
Normal file
28
common/home_manager/programs/direnv.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
config = {
|
||||
nix-direnv = true;
|
||||
global = {
|
||||
strict_env = true;
|
||||
load_dotenv = true;
|
||||
hide_env_diff = true;
|
||||
};
|
||||
whitelist = {
|
||||
prefix = [
|
||||
"~/projects"
|
||||
"~/.config"
|
||||
];
|
||||
};
|
||||
home.shellAliases = {
|
||||
ndr = "nix-direnv-reload";
|
||||
};
|
||||
programs.zsh.shellAliases = {
|
||||
ndr = "nix-direnv-reload";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
65
common/home_manager/programs/git.nix
Normal file
65
common/home_manager/programs/git.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
# TODO make configurable
|
||||
userEmail = "ringofstorms@gmail.com";
|
||||
userName = "RingOfStorms (Joshua Bell)";
|
||||
|
||||
extraConfig = {
|
||||
core.pager = "cat";
|
||||
core.editor = "nvim";
|
||||
|
||||
pull.rebase = false;
|
||||
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
|
||||
difftastic = {
|
||||
enable = true;
|
||||
background = "dark";
|
||||
};
|
||||
|
||||
ignores = [
|
||||
# --------------
|
||||
# Intellij
|
||||
# --------------
|
||||
"*.iml"
|
||||
# --------------
|
||||
# MAC OS
|
||||
# --------------
|
||||
".DS_Store"
|
||||
".AppleDouble"
|
||||
".LSOverride"
|
||||
# Icon must end with two \r
|
||||
"Icon"
|
||||
# Thumbnails
|
||||
"._*"
|
||||
# Files that might appear in the root of a volume
|
||||
".DocumentRevisions-V100"
|
||||
".fseventsd"
|
||||
".Spotlight-V100"
|
||||
".TemporaryItems"
|
||||
".Trashes"
|
||||
".VolumeIcon.icns"
|
||||
".com.apple.timemachine.donotpresent"
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
".AppleDB"
|
||||
".AppleDesktop"
|
||||
"Network Trash Folder"
|
||||
"Temporary Items"
|
||||
".apdisk"
|
||||
|
||||
# direnv things
|
||||
"/.direnv"
|
||||
|
||||
# local only files
|
||||
"*.local"
|
||||
|
||||
# AI tooling
|
||||
".aider*"
|
||||
"aider"
|
||||
];
|
||||
};
|
||||
}
|
65
common/home_manager/programs/kitty.nix
Normal file
65
common/home_manager/programs/kitty.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.components.kitty = {
|
||||
font_size = lib.mkOption {
|
||||
type = lib.types.float;
|
||||
default = 12.0;
|
||||
description = "Font size for Kitty terminal";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
# Enable Kitty terminal
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
# Window settings
|
||||
background_opacity = 1.0;
|
||||
os_window_class = "kitty";
|
||||
remember_window_size = false;
|
||||
placement_strategy = "center";
|
||||
initial_window_width = "160c";
|
||||
initial_window_height = "55c";
|
||||
|
||||
# Remove window borders
|
||||
hide_window_decorations = "titlebar-only";
|
||||
tab_title_template = "none";
|
||||
active_tab_title_template = "none";
|
||||
draw_minimal_borders = "yes";
|
||||
window_border_width = "0.1pt";
|
||||
|
||||
# Colors (Catppuccin Coal)
|
||||
foreground = "#e0e0e0";
|
||||
background = "#262626";
|
||||
color0 = "#1f1f1f";
|
||||
color1 = "#f38ba8";
|
||||
color2 = "#a6e3a1";
|
||||
color3 = "#f9e2af";
|
||||
color4 = "#89b4fa";
|
||||
color5 = "#cba6f7";
|
||||
color6 = "#89dceb";
|
||||
color7 = "#e0e0e0";
|
||||
color8 = "#565656";
|
||||
color9 = "#f38ba8";
|
||||
color10 = "#a6e3a1";
|
||||
color11 = "#f9e2af";
|
||||
color12 = "#89b4fa";
|
||||
color13 = "#cba6f7";
|
||||
color14 = "#89dceb";
|
||||
color15 = "#ffffff";
|
||||
|
||||
# Font settings
|
||||
font_family = "JetBrainsMonoNL Nerd Font";
|
||||
font_size = config.components.kitty.font_size;
|
||||
bold_font = "auto";
|
||||
italic_font = "auto";
|
||||
italic_bold_font = "auto";
|
||||
};
|
||||
|
||||
# If you want to include extra configuration this way instead of through the main `settings` attribute
|
||||
extraConfig = ''
|
||||
# You can add additional config here if needed
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
18
common/home_manager/programs/launcher_rofi.nix
Normal file
18
common/home_manager/programs/launcher_rofi.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [ rofi-calc ];
|
||||
extraConfig = {
|
||||
modi = "drun,run,ssh,window,calc";
|
||||
terminal = "alacritty";
|
||||
};
|
||||
theme = "glue_pro_blue";
|
||||
};
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
18
common/home_manager/programs/nix_deprecations.nix
Normal file
18
common/home_manager/programs/nix_deprecations.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.zsh.shellAliases = {
|
||||
# Nix deprecations
|
||||
nix-hash = "echo 'The functionality of nix-hash may be covered by various subcommands or options in the new `nix` command.'";
|
||||
nix-build = "echo 'Use `nix build` instead.'";
|
||||
nix-info = "echo 'Use `nix flake info` or other `nix` subcommands to obtain system and Nix information.'";
|
||||
nix-channel = "echo 'Channels are being phased out in favor of flakes. Use `nix flake` subcommands.'";
|
||||
nix-instantiate = "echo 'Use `nix eval` or `nix-instantiate` with flakes.'";
|
||||
nix-collect-garbage = "echo 'Use `nix store gc` instead.'";
|
||||
nix-prefetch-url = "echo 'Use `nix-prefetch` or fetchers in Nix expressions.'";
|
||||
nix-copy-closure = "echo 'Use `nix copy` instead.'";
|
||||
nix-shell = "echo 'Use `nix shell` instead.'";
|
||||
# nix-daemon # No direct replacement: The Nix daemon is still in use and managed by the system service manager.
|
||||
nix-store = "echo 'Use `nix store` subcommands for store operations.'";
|
||||
nix-env = "echo 'Use `nix profile` instead'";
|
||||
};
|
||||
}
|
4
common/home_manager/programs/obs.nix
Normal file
4
common/home_manager/programs/obs.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.obs-studio.enable = true;
|
||||
}
|
7
common/home_manager/programs/postgres.nix
Normal file
7
common/home_manager/programs/postgres.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
home.file.".psqlrc".text = ''
|
||||
\pset pager off
|
||||
'';
|
||||
}
|
||||
|
33
common/home_manager/programs/slicer.nix
Normal file
33
common/home_manager/programs/slicer.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
orca-slicer-fix = pkgs.stdenv.mkDerivation {
|
||||
name = "orca-slicer";
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
unpackPhase = "true";
|
||||
buildPhase = ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${pkgs.orca-slicer}/bin/orca-slicer $out/bin/orca-slicer \
|
||||
--set WEBKIT_DISABLE_DMABUF_RENDERER 1
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/applications
|
||||
cat > $out/share/applications/orca-slicer.desktop <<EOF
|
||||
[Desktop Entry]
|
||||
Name=Orca Slicer
|
||||
Comment=3D printing slicer
|
||||
Exec=$out/bin/orca-slicer
|
||||
Icon=orca-slicer
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Graphics;3DGraphics;
|
||||
EOF
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
prusa-slicer
|
||||
orca-slicer-fix
|
||||
];
|
||||
}
|
142
common/home_manager/programs/ssh.nix
Normal file
142
common/home_manager/programs/ssh.nix
Normal file
|
@ -0,0 +1,142 @@
|
|||
{ osConfig, ... }:
|
||||
let
|
||||
inherit (osConfig) age;
|
||||
in
|
||||
{
|
||||
# TODO can I put all IP's in the flake.nix top level settings and pull them in here instead?
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
Host *
|
||||
SetEnv TERM=xterm-256color
|
||||
'';
|
||||
matchBlocks = {
|
||||
# EXTERNAL
|
||||
"github.com" = {
|
||||
identityFile = age.secrets.nix2github.path;
|
||||
};
|
||||
"bitbucket.org" = {
|
||||
identityFile = age.secrets.nix2bitbucket.path;
|
||||
};
|
||||
"git.joshuabell.xyz" = {
|
||||
identityFile = age.secrets.nix2gitjosh.path;
|
||||
user = "git";
|
||||
};
|
||||
# PERSONAL DEVICES
|
||||
"lio" = {
|
||||
identityFile = age.secrets.nix2lio.path;
|
||||
user = "josh";
|
||||
};
|
||||
"lio_" = {
|
||||
identityFile = age.secrets.nix2lio.path;
|
||||
hostname = "10.12.14.116";
|
||||
user = "josh";
|
||||
};
|
||||
"oren" = {
|
||||
identityFile = age.secrets.nix2oren.path;
|
||||
user = "josh";
|
||||
};
|
||||
"joe" = {
|
||||
identityFile = age.secrets.nix2joe.path;
|
||||
user = "josh";
|
||||
};
|
||||
"gp3" = {
|
||||
identityFile = age.secrets.nix2gpdPocket3.path;
|
||||
user = "josh";
|
||||
};
|
||||
"t" = {
|
||||
identityFile = age.secrets.nix2t.path;
|
||||
user = "joshua.bell";
|
||||
localForwards = [
|
||||
# {
|
||||
# bind.port = 3000;
|
||||
# host.port = 3000;
|
||||
# host.address = "localhost";
|
||||
# }
|
||||
{
|
||||
bind.port = 3002;
|
||||
host.port = 3002;
|
||||
host.address = "localhost";
|
||||
}
|
||||
];
|
||||
setEnv = {
|
||||
TERM = "vt100";
|
||||
};
|
||||
};
|
||||
"t_" = {
|
||||
identityFile = age.secrets.nix2t.path;
|
||||
hostname = "10.12.14.103";
|
||||
user = "joshua.bell";
|
||||
setEnv = {
|
||||
TERM = "vt100";
|
||||
};
|
||||
};
|
||||
"mbptv" = {
|
||||
identityFile = age.secrets.nix2gpdPocket3.path;
|
||||
user = "waka";
|
||||
setEnv = {
|
||||
TERM = "vt100";
|
||||
};
|
||||
};
|
||||
"mbptv_" = {
|
||||
identityFile = age.secrets.nix2gpdPocket3.path;
|
||||
hostname = "10.12.14.101";
|
||||
user = "waka";
|
||||
setEnv = {
|
||||
TERM = "vt100";
|
||||
};
|
||||
};
|
||||
"nothing1" = {
|
||||
identityFile = age.secrets.nix2gpdPocket3.path;
|
||||
user = "TODO";
|
||||
};
|
||||
"tab1" = {
|
||||
identityFile = age.secrets.nix2gpdPocket3.path;
|
||||
user = "TODO";
|
||||
};
|
||||
"pixel6" = {
|
||||
identityFile = age.secrets.nix2gpdPocket3.path;
|
||||
user = "TODO";
|
||||
};
|
||||
# HOME SERVERS
|
||||
"h001" = {
|
||||
identityFile = age.secrets.nix2h001.path;
|
||||
user = "root";
|
||||
};
|
||||
"h001_" = {
|
||||
identityFile = age.secrets.nix2h001.path;
|
||||
hostname = "10.12.14.2";
|
||||
user = "root";
|
||||
};
|
||||
"h002" = {
|
||||
identityFile = age.secrets.nix2h002.path;
|
||||
user = "luser";
|
||||
};
|
||||
# LINODE SERVERS
|
||||
"l001" = {
|
||||
identityFile = age.secrets.nix2linode.path;
|
||||
hostname = "172.236.111.33"; # Not on the tailscale network it is the primary host
|
||||
user = "root";
|
||||
};
|
||||
"l002_" = {
|
||||
identityFile = age.secrets.nix2linode.path;
|
||||
hostname = "172.234.26.141";
|
||||
user = "root";
|
||||
};
|
||||
"l002" = {
|
||||
identityFile = age.secrets.nix2linode.path;
|
||||
user = "root";
|
||||
};
|
||||
# ORACLE SERVERS
|
||||
"o001" = {
|
||||
identityFile = age.secrets.nix2oracle.path;
|
||||
user = "root";
|
||||
};
|
||||
"o001_" = {
|
||||
identityFile = age.secrets.nix2oracle.path;
|
||||
hostname = "64.181.210.7";
|
||||
user = "root";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
52
common/home_manager/programs/starship.nix
Normal file
52
common/home_manager/programs/starship.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
palette = "catppuccin_coal";
|
||||
palettes.catppuccin_coal = {
|
||||
# Same as catppuccin mocha for these
|
||||
rosewater = "#f5e0dc";
|
||||
flamingo = "#f2cdcd";
|
||||
pink = "#f5c2e7";
|
||||
mauve = "#cba6f7";
|
||||
red = "#f38ba8";
|
||||
maroon = "#eba0ac";
|
||||
peach = "#fab387";
|
||||
yellow = "#f9e2af";
|
||||
green = "#a6e3a1";
|
||||
teal = "#94e2d5";
|
||||
sky = "#89dceb";
|
||||
sapphire = "#74c7ec";
|
||||
blue = "#89b4fa";
|
||||
lavender = "#b4befe";
|
||||
# Coal variant: https://gist.joshuabell.xyz/ringofstorms/catppucin-coal
|
||||
text = "#e0e0e0";
|
||||
subtext1 = "#cccccc";
|
||||
subtext0 = "#b8b8b8";
|
||||
overlay2 = "#a3a3a3";
|
||||
overlay1 = "#8c8c8c";
|
||||
overlay0 = "#787878";
|
||||
surface2 = "#636363";
|
||||
surface1 = "#4f4f4f";
|
||||
surface0 = "#3b3b3b";
|
||||
base = "#262626";
|
||||
mantle = "#1f1f1f";
|
||||
crust = "#171717";
|
||||
};
|
||||
nix_shell = {
|
||||
heuristic = true;
|
||||
impure_msg = "不純 \\(ふじゅん\\)";
|
||||
pure_msg = " 純粋 \\(じゅんすい\\)";
|
||||
};
|
||||
git_branch = {
|
||||
format = "オン [$symbol$branch(:$remote_branch)]($style) ";
|
||||
};
|
||||
cmd_duration = {
|
||||
format = "掛かった [$duration]($style) ";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
65
common/home_manager/programs/tmux/tmux-reset.conf
Normal file
65
common/home_manager/programs/tmux/tmux-reset.conf
Normal file
|
@ -0,0 +1,65 @@
|
|||
# Reset everything then add what we want exactly
|
||||
unbind-key -a
|
||||
bind C-Space send-prefix
|
||||
|
||||
# Windows
|
||||
# bind -r p previous-window
|
||||
# bind -r n next-window
|
||||
bind -r & kill-window
|
||||
bind c new-window -a -c "#{pane_current_path}"
|
||||
bind ',' command-prompt "rename-window %%"
|
||||
bind "\|" split-window -h -c "#{pane_current_path}"
|
||||
bind "\\" split-window -v -c "#{pane_current_path}"
|
||||
bind w choose-tree -Zw
|
||||
bind 1 select-window -t:1
|
||||
bind 2 select-window -t:2
|
||||
bind 3 select-window -t:3
|
||||
bind 4 select-window -t:4
|
||||
bind 5 select-window -t:5
|
||||
bind 6 select-window -t:6
|
||||
bind 7 select-window -t:7
|
||||
bind 8 select-window -t:8
|
||||
bind 9 select-window -t:9
|
||||
# custom
|
||||
bind m command-prompt -p "Swap with window index:" "swap-window -t '%%'"
|
||||
bind -r [ swap-window -t -1 \; previous-window
|
||||
bind -r ] swap-window -t +1 \; next-window
|
||||
|
||||
|
||||
# Panes
|
||||
bind ! break-pane
|
||||
bind -r left select-pane -L
|
||||
bind -r down select-pane -D
|
||||
bind -r up select-pane -U
|
||||
bind -r right select-pane -R
|
||||
bind x kill-pane
|
||||
bind -r space resize-pane -Z
|
||||
bind S select-layout tiled
|
||||
bind -r h select-pane -L
|
||||
bind -r j select-pane -D
|
||||
bind -r k select-pane -U
|
||||
bind -r l select-pane -R
|
||||
|
||||
|
||||
# Sessions
|
||||
bind $ command-prompt "rename-session %%"
|
||||
bind -r ) switch-client -n
|
||||
bind -r ( switch-client -p
|
||||
# custom
|
||||
bind C command-prompt -p "session name:" "new-session -s '%%'"
|
||||
|
||||
# Tmux util
|
||||
bind : command-prompt
|
||||
bind C-d detach
|
||||
|
||||
# ==========
|
||||
# My options
|
||||
set-option -g terminal-overrides ',xterm-256color:RGB'
|
||||
set-option -sa terminal-features ',xterm:LRGB'
|
||||
set -g detach-on-destroy off
|
||||
set -g renumber-windows on
|
||||
set -g status-position top
|
||||
set -sg escape-time 0
|
||||
set -g xterm-keys on
|
||||
|
||||
set-option -g focus-events on
|
81
common/home_manager/programs/tmux/tmux.nix
Normal file
81
common/home_manager/programs/tmux/tmux.nix
Normal file
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# home manager doesn't give us an option to add tmux extra config at the top so we do it ourselves here.
|
||||
xdg.configFile = lib.mkIf config.programs.tmux.enable {
|
||||
"tmux/tmux.conf".text = (lib.mkBefore (builtins.readFile ./tmux-reset.conf));
|
||||
};
|
||||
|
||||
programs.tmux = lib.mkIf config.programs.tmux.enable {
|
||||
# Revisit this later, permission denied to make anything in `/run` as my user...
|
||||
secureSocket = false;
|
||||
|
||||
# default is B switch to space for easier dual hand use
|
||||
shortcut = "Space";
|
||||
prefix = "C-Space";
|
||||
baseIndex = 1;
|
||||
mouse = true;
|
||||
keyMode = "vi";
|
||||
shell = "${pkgs.zsh}/bin/zsh";
|
||||
terminal = "screen-256color";
|
||||
aggressiveResize = true;
|
||||
sensibleOnTop = false;
|
||||
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
{
|
||||
plugin = catppuccin.overrideAttrs (_: {
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://git.joshuabell.xyz/tmux-catppuccin-coal.git";
|
||||
rev = "d078123cd81c0dbb3f780e8575a9d38fe2023e1b";
|
||||
sha256 = "sha256-qPY/dovDyut5WoUkZ26F2w3fJVmw4gcC+6l2ugsA65Y=";
|
||||
};
|
||||
});
|
||||
extraConfig = ''
|
||||
set -g @catppuccin_flavour 'mocha'
|
||||
set -g @catppuccin_window_left_separator ""
|
||||
set -g @catppuccin_window_right_separator " "
|
||||
set -g @catppuccin_window_middle_separator " █"
|
||||
set -g @catppuccin_window_number_position "right"
|
||||
set -g @catppuccin_window_default_fill "number"
|
||||
set -g @catppuccin_window_default_text "#W"
|
||||
set -g @catppuccin_window_current_fill "number"
|
||||
set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag,(),}"
|
||||
set -g @catppuccin_status_modules_right "directory application date_time"
|
||||
set -g @catppuccin_status_modules_left "session"
|
||||
set -g @catppuccin_status_left_separator " "
|
||||
set -g @catppuccin_status_right_separator " "
|
||||
set -g @catppuccin_status_right_separator_inverse "no"
|
||||
set -g @catppuccin_status_fill "icon"
|
||||
set -g @catppuccin_status_connect_separator "no"
|
||||
set -g @catppuccin_directory_text "#{b:pane_current_path}"
|
||||
set -g @catppuccin_date_time_text "%H:%M"
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = resurrect;
|
||||
extraConfig = ''
|
||||
set -g @resurrect-strategy-nvim 'session'
|
||||
set -g @resurrect-capture-pane-contents 'on'
|
||||
# Hook to save tmux-resurrect state when a pane is closed
|
||||
set-hook -g pane-died "run-shell 'tmux-resurrect save'"
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = continuum;
|
||||
extraConfig = ''
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @continuum-save-interval '5' # minutes
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
home.shellAliases = lib.mkIf config.programs.tmux.enable {
|
||||
t = "tmux";
|
||||
tat = "tmux attach-session";
|
||||
};
|
||||
}
|
8
common/home_manager/programs/zoxide.nix
Normal file
8
common/home_manager/programs/zoxide.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
options = [ "--cmd cd" ];
|
||||
};
|
||||
}
|
41
common/home_manager/programs/zsh.nix
Normal file
41
common/home_manager/programs/zsh.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
|
||||
shellAliases = { };
|
||||
|
||||
defaultKeymap = "emacs";
|
||||
|
||||
initExtra = ''
|
||||
# Set editor to neovim, TODO only do this if mod.neovim is enabled
|
||||
export EDITOR=nvim
|
||||
export VISUAL=nvim
|
||||
|
||||
# Enable editing command in external editor
|
||||
autoload -Uz edit-command-line
|
||||
zle -N edit-command-line
|
||||
# Try multiple bindings for edit-command-line
|
||||
bindkey '^X^E' edit-command-line # Traditional Ctrl+X,Ctrl+E binding
|
||||
bindkey '^[^M' edit-command-line # Alt+Enter
|
||||
# Note: Ctrl+Enter might not be distinctly capturable in all terminals
|
||||
|
||||
# Make home/end and ctrl + left/right nav how I expect them to like in bash
|
||||
bindkey "\e[1~" beginning-of-line
|
||||
bindkey "\e[4~" end-of-line
|
||||
bindkey '^[[1;5D' emacs-backward-word
|
||||
bindkey '^[[1;5C' emacs-forward-word
|
||||
|
||||
# Auto completion/suggestions/and case insensitivity
|
||||
autoload -Uz compinit && compinit
|
||||
setopt correct
|
||||
setopt extendedglob
|
||||
setopt nocaseglob
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive tab completion
|
||||
zstyle ':completion:*' list-colors "''${(s.:.)LS_COLORS}" # Colored completion (different colors for dirs/files/etc)
|
||||
zstyle ':completion:*' rehash true # automatically find new executables in path
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{ nixConfig, ... }:
|
||||
{ osConfig, ... }:
|
||||
let
|
||||
inherit (nixConfig) age;
|
||||
inherit (osConfig) age;
|
||||
in
|
||||
{
|
||||
# TODO can I put all IP's in the flake.nix top level settings and pull them in here instead?
|
||||
|
|
77
hosts/lio/flake.lock
generated
77
hosts/lio/flake.lock
generated
|
@ -28,7 +28,7 @@
|
|||
"agenix_2": {
|
||||
"inputs": {
|
||||
"darwin": "darwin_2",
|
||||
"home-manager": "home-manager_4",
|
||||
"home-manager": "home-manager_3",
|
||||
"nixpkgs": [
|
||||
"mod_secrets",
|
||||
"ragenix",
|
||||
|
@ -96,7 +96,7 @@
|
|||
},
|
||||
"locked": {
|
||||
"lastModified": 1,
|
||||
"narHash": "sha256-m8fxD1m9NkoFI10VdK3Mc/dd4ECFs5IApuIor9Yr+FI=",
|
||||
"narHash": "sha256-ilegeRmjHmTfQfXlU7DOWYbRpanpNu3hNs2huRz4ldU=",
|
||||
"path": "../../common",
|
||||
"type": "path"
|
||||
},
|
||||
|
@ -337,28 +337,6 @@
|
|||
}
|
||||
},
|
||||
"home-manager_3": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"mod_home-manager",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736373539,
|
||||
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
|
||||
"owner": "rycee",
|
||||
"repo": "home-manager",
|
||||
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rycee",
|
||||
"ref": "release-24.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_4": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"mod_secrets",
|
||||
|
@ -694,26 +672,6 @@
|
|||
"url": "https://git.joshuabell.xyz/dotfiles"
|
||||
}
|
||||
},
|
||||
"mod_home-manager": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager_3",
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736544172,
|
||||
"narHash": "sha256-5Zp1Fg5A827aIjKrhtW84vvJmwRQqBHWzKButnaD14E=",
|
||||
"ref": "mod_home_manager",
|
||||
"rev": "df0c4e95ac6b056202c4ec6fabfcfa5bd205a0b4",
|
||||
"revCount": 2,
|
||||
"type": "git",
|
||||
"url": "https://git.joshuabell.xyz/dotfiles"
|
||||
},
|
||||
"original": {
|
||||
"ref": "mod_home_manager",
|
||||
"type": "git",
|
||||
"url": "https://git.joshuabell.xyz/dotfiles"
|
||||
}
|
||||
},
|
||||
"mod_nebula": {
|
||||
"locked": {
|
||||
"lastModified": 1737504380,
|
||||
|
@ -864,22 +822,6 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1736344531,
|
||||
"narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bffc22eb12172e6db3c5dde9e3e5628f8e3e7912",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1728888510,
|
||||
"narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=",
|
||||
|
@ -895,7 +837,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1725634671,
|
||||
"narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=",
|
||||
|
@ -911,7 +853,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1740463929,
|
||||
"narHash": "sha256-4Xhu/3aUdCKeLfdteEHMegx5ooKQvwPHNkOgNCXQrvc=",
|
||||
|
@ -927,7 +869,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_9": {
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1742225912,
|
||||
"narHash": "sha256-HCD3GrAAJb1jYTEc221DPlBk2VDkBt43hww7DXC1tyc=",
|
||||
|
@ -1905,7 +1847,7 @@
|
|||
"agenix": "agenix_2",
|
||||
"crane": "crane_2",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"rust-overlay": "rust-overlay_3"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -1925,7 +1867,7 @@
|
|||
"ringofstorms-stormd": {
|
||||
"inputs": {
|
||||
"nix-filter": "nix-filter",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -1947,17 +1889,16 @@
|
|||
"common": "common",
|
||||
"mod_common": "mod_common",
|
||||
"mod_de_gnome": "mod_de_gnome",
|
||||
"mod_home-manager": "mod_home-manager",
|
||||
"mod_nebula": "mod_nebula",
|
||||
"mod_ros_stormd": "mod_ros_stormd",
|
||||
"mod_secrets": "mod_secrets",
|
||||
"nixpkgs": "nixpkgs_8",
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"ros_neovim": "ros_neovim"
|
||||
}
|
||||
},
|
||||
"ros_neovim": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_9",
|
||||
"nixpkgs": "nixpkgs_8",
|
||||
"nvim_plugin-Almo7aya/openingh.nvim": "nvim_plugin-Almo7aya/openingh.nvim",
|
||||
"nvim_plugin-CopilotC-Nvim/CopilotChat.nvim": "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim",
|
||||
"nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring": "nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring",
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
# common.url = "git+https://git.joshuabell.xyz/dotfiles?rev=88f2d95e6a871f084dccfc4f45ad9d2b31720998";
|
||||
|
||||
ros_neovim.url = "git+https://git.joshuabell.xyz/nvim";
|
||||
|
||||
mod_common.url = "git+https://git.joshuabell.xyz/dotfiles?ref=mod_common";
|
||||
mod_home-manager.url = "git+https://git.joshuabell.xyz/dotfiles?ref=mod_home_manager";
|
||||
mod_secrets.url = "git+https://git.joshuabell.xyz/dotfiles?ref=mod_secrets";
|
||||
mod_de_gnome.url = "git+https://git.joshuabell.xyz/dotfiles?ref=mod_de_gnome";
|
||||
mod_ros_stormd.url = "git+https://git.joshuabell.xyz/dotfiles?ref=mod_stormd";
|
||||
|
@ -92,6 +92,31 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
homeManager = {
|
||||
users = {
|
||||
josh = {
|
||||
programs = {
|
||||
tmux.enable = true;
|
||||
alacritty.enable = true;
|
||||
atuin.enable = true;
|
||||
};
|
||||
imports = [
|
||||
../../components/hm/kitty.nix
|
||||
../../components/hm/direnv.nix
|
||||
../../components/hm/git.nix
|
||||
../../components/hm/nix_deprecations.nix
|
||||
../../components/hm/obs.nix
|
||||
../../components/hm/postgres.nix
|
||||
../../components/hm/slicer.nix
|
||||
../../components/hm/ssh.nix
|
||||
../../components/hm/starship.nix
|
||||
../../components/hm/zoxide.nix
|
||||
../../components/hm/zsh.nix
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
@ -119,28 +144,6 @@
|
|||
systemName = configuration_name;
|
||||
primaryUser = "josh";
|
||||
};
|
||||
home_manager = {
|
||||
users = {
|
||||
josh = {
|
||||
imports = [
|
||||
../../components/hm/tmux/tmux.nix
|
||||
../../components/hm/alacritty.nix
|
||||
../../components/hm/kitty.nix
|
||||
../../components/hm/atuin.nix
|
||||
../../components/hm/direnv.nix
|
||||
../../components/hm/git.nix
|
||||
../../components/hm/nix_deprecations.nix
|
||||
../../components/hm/obs.nix
|
||||
../../components/hm/postgres.nix
|
||||
../../components/hm/slicer.nix
|
||||
../../components/hm/ssh.nix
|
||||
../../components/hm/starship.nix
|
||||
../../components/hm/zoxide.nix
|
||||
../../components/hm/zsh.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue