Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6d738e3
Bunch of neovim config changes, addition of Ghostty config
mpriscella Jan 16, 2025
7ea83e6
Nix tests
mpriscella Jan 24, 2025
2122a23
More nix test
mpriscella Jan 24, 2025
c638a81
Committing local changes
mpriscella Jan 30, 2025
58236f1
Replace other plugins with Snacks.nvim
mpriscella Feb 6, 2025
d9d8d8e
Pushing incomplete changes to dotfiles install script
mpriscella Feb 6, 2025
e200cc9
More updates to install script
mpriscella Feb 7, 2025
9d395e6
Install brew using pkg file
mpriscella Feb 7, 2025
d60aec7
Move homebrew installation to function
mpriscella Feb 7, 2025
44b41b2
Enforce running as sudo for MacOS
mpriscella Feb 7, 2025
2ddb48b
Fixed conditional
mpriscella Feb 7, 2025
084dad0
Move functions into separate file
mpriscella Feb 7, 2025
9f41089
Updates to statusline
mpriscella Feb 7, 2025
7528ab9
Add gitignore and shell.nix file
mpriscella Feb 16, 2025
7c97635
Committing current changes
mpriscella Feb 16, 2025
e480852
Install CodeCompanion plugin
mpriscella Feb 21, 2025
e92823d
Small updates
mpriscella Mar 13, 2025
17ea1cb
Updates to custom plugin format
mpriscella Mar 28, 2025
bf7714d
Updates to plugins
mpriscella Mar 31, 2025
8633c2c
Modify k9s plugin
mpriscella May 19, 2025
509fe3a
Committing fish config
mpriscella May 19, 2025
84f94e8
Update ghostty config
mpriscella May 19, 2025
2a5c07b
Commit plugin changes
mpriscella May 19, 2025
4ab89dd
Update lazy lock file
mpriscella May 19, 2025
311deb8
Load atuin and nvm if they exist
mpriscella May 19, 2025
11da5d2
Initial commit of nix home-manager configuration
mpriscella Jun 15, 2025
02681b9
Move fish config into home-manager conifg
mpriscella Jun 15, 2025
389bbd6
Move gitconfig into home-manager
mpriscella Jun 15, 2025
67bdb7a
Added a couple more packages
mpriscella Jun 15, 2025
34ab2ab
Cleanup files
mpriscella Jun 15, 2025
28473d3
Move ackrc and tmux conf to home-manager
mpriscella Jun 15, 2025
62c3989
More nix updates
mpriscella Jun 15, 2025
8620971
Add nvim files
mpriscella Jun 15, 2025
04e1f93
Symlink neovim config via home-manager
mpriscella Jun 15, 2025
0dcd103
Update macbook air host
mpriscella Jun 15, 2025
1759895
Update install script to install nix and home-manager
mpriscella Jun 15, 2025
ae19ca9
Add default host
mpriscella Jun 16, 2025
59cdf50
Add github workflow to test home manager configs
mpriscella Jun 16, 2025
53da7bb
Take two
mpriscella Jun 16, 2025
6f4e3b2
Third times a charm
mpriscella Jun 16, 2025
900d5d9
Resolve shellcheck issues
mpriscella Jun 16, 2025
b390a75
Couple more shellcheck issues
mpriscella Jun 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .ackrc

This file was deleted.

4 changes: 3 additions & 1 deletion .config/ghostty/config
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
# on Ghostty's website, at https://ghostty.org/docs/config.

theme = tokyonight

working-directory = home
quit-after-last-window-closed = true
window-inherit-working-directory = false
155 changes: 155 additions & 0 deletions .config/home-manager/common.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{ config, pkgs, ... }:

{
home.packages = [
pkgs.ack
pkgs.act
pkgs.awscli2
pkgs.dive
pkgs.fd
pkgs.fzf
pkgs.gh
pkgs.git
pkgs.gnupg
pkgs.jq
pkgs.kind
pkgs.k9s
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.lazydocker
pkgs.lazygit
pkgs.neovim
pkgs.ripgrep
pkgs.tmux
pkgs.yq
pkgs.yt-dlp
];

home.file = {
".ackrc".text = ''
--pager=less -R
--ignore-case
'';

".tmux.conf".source = ../../tmux.conf;

".config/atuin".source = ../atuin;
".config/ghostty".source = ../ghostty;
".config/k9s".source = ../k9s;
".config/nvim".source = ../nvim;
};

# Common session variables
home.sessionVariables = {
AWS_CLI_AUTO_PROMPT = "on-partial";
EDITOR = "nvim";
KUBE_EDITOR = "nvim";
};

# Enable and configure Fish shell
programs.fish = {
enable = true;

plugins = [
{
name = "pure";
src = pkgs.fishPlugins.pure.src;
}
];

functions = {
aws-ps = ''
set profile $(aws configure list-profiles | fzf --height=30% --layout=reverse)
if set --query profile
set -gx AWS_PROFILE $profile
echo "AWS profile $AWS_PROFILE now active."
end
'';
};

# Fish shell configuration
shellInit = ''
# Commands to run when fish starts (non-interactive)
set PATH $PATH /opt/homebrew/bin
set PATH $HOME/.orbstack/bin $PATH
'';

interactiveShellInit = ''
# Commands to run in interactive sessions
# Initialize atuin if available
if command -q atuin
atuin init fish | source
end
'';

# Fish shell aliases
shellAliases = {
lg = "lazygit";

# Quick reload aliases
rl = "exec fish";
src = "source ~/.config/fish/config.fish";

# Home Manager aliases
hm = "home-manager";
hms = "home-manager switch";
hmb = "home-manager build --no-out-link";
};
};

# Configure direnv with nix-direnv for automatic Nix environment loading
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};

programs.git = {
enable = true;
userName = "Mike Priscella";
userEmail = "mpriscella@gmail.com";

extraConfig = {
core.editor = "nvim";
color.ui = "auto";
init.defaultBranch = "main";
pull.rebase = false;
push.default = "simple";
};

aliases = {
chb = "checkout -b";
empty = "commit --allow-empty -n -m 'Empty-Commit'";
};

ignores = [
# OS generated files
".DS_Store"
".DS_Store?"
"._*"
".Spotlight-V100"
".Trashes"
"ehthumbs.db"
"Thumbs.db"

# IDE files
".vscode/"
".idea/"
"*.swp"
"*.swo"
"*~"

# Build artifacts
"node_modules/"
"target/"
"dist/"
"build/"

# Environment files
".env"
".env.local"
];
};

# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}
45 changes: 45 additions & 0 deletions .config/home-manager/hosts/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{ config, pkgs, lib, ... }:

let
# Automatically detect username from environment
username = builtins.getEnv "USER";

# Construct home directory based on detected username and OS
homeDirectory =
if pkgs.stdenv.isDarwin
then "/Users/${username}"
else "/home/${username}";

# Detect hostname for configuration path
hostname =
let
envHostname = builtins.getEnv "HOSTNAME";
in
if envHostname != "" then envHostname
else if builtins.pathExists /etc/hostname then builtins.readFile /etc/hostname
else "unknown";
in

{
imports = [
../common.nix
../modules/machine-config.nix
];

# Automatically inferred values
home.username = username;
home.homeDirectory = homeDirectory;
home.stateVersion = "25.05";

# Custom configuration using our module
myConfig = {
configPath = "${homeDirectory}/.config/home-manager/hosts/default.nix";
};

# Optional: Add some debug info to session variables
home.sessionVariables = {
HM_DETECTED_USER = username;
HM_DETECTED_HOME = homeDirectory;
HM_DETECTED_HOST = hostname;
};
}
17 changes: 17 additions & 0 deletions .config/home-manager/hosts/macbook-air.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ config, pkgs, ... }:

{
imports = [
../common.nix
../modules/machine-config.nix
];

home.username = "mpriscella";
home.homeDirectory = "/Users/mpriscella";
home.stateVersion = "25.05";

# Custom configuration using our module
myConfig = {
configPath = "${config.home.homeDirectory}/.config/home-manager/hosts/macbook-air.nix";
};
}
17 changes: 17 additions & 0 deletions .config/home-manager/hosts/work-macbook-pro.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ config, pkgs, ... }:

{
imports = [
../common.nix
../modules/machine-config.nix
];

home.username = "michaelpriscella";
home.homeDirectory = "/Users/michaelpriscella";
home.stateVersion = "25.05";

# Custom configuration using our module
myConfig = {
configPath = "${config.home.homeDirectory}/.config/home-manager/hosts/work-macbook-pro.nix";
};
}
32 changes: 32 additions & 0 deletions .config/home-manager/modules/machine-config.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{ config, lib, pkgs, ... }:

with lib;

{
options.myConfig = {
configPath = mkOption {
type = types.str;
default = "${config.home.homeDirectory}/.config/home-manager/home.nix";
description = "Path to the home-manager configuration file for this machine";
};
};

config = {
# Use your custom options here
home.packages = with pkgs; [
# Custom build script
(writeShellScriptBin "home-manager-build" ''
echo "Building Home Manager configuration..."
echo "Using config: ${config.myConfig.configPath}"
exec home-manager build --file "${config.myConfig.configPath}" "$@"
'')

# Custom switch script
(writeShellScriptBin "home-manager-switch" ''
echo "Switching Home Manager configuration..."
echo "Using config: ${config.myConfig.configPath}"
exec home-manager switch --file "${config.myConfig.configPath}" "$@"
'')
];
};
}
2 changes: 1 addition & 1 deletion .config/k9s/plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins:
# Create debug container for selected pod in current namespace.
# See https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container
debug-container:
shortCut: Shift-D
shortCut: d
description: Add debug container
dangerous: true
scopes:
Expand Down
13 changes: 9 additions & 4 deletions .config/nvim/after/ftplugin/terraform.lua
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
vim.bo.commentstring = '# %s'

local function add_comment_header()
local line_number = vim.api.nvim_win_get_cursor(0)[1]
local line_length = 80
local current_line = vim.api.nvim_win_get_cursor(0)[1]
local line = vim.api.nvim_get_current_line()
local bookend = '################################################################################'

vim.api.nvim_buf_set_lines(0, line_number - 1, line_number, true, {
-- for i = 1, line_length, 1 do
-- bookend = bookend .. '#'
-- end

vim.api.nvim_buf_set_lines(0, current_line - 1, current_line, true, {
bookend,
'# ' .. line,
})
vim.api.nvim_buf_set_lines(0, line_number + 1, line_number + 1, true, { bookend })
vim.api.nvim_buf_set_lines(0, current_line + 1, current_line + 1, true, { bookend })

if line == '' then
vim.api.nvim_win_set_cursor(0, { line_number + 1, 2 })
vim.api.nvim_win_set_cursor(0, { current_line + 1, 2 })
vim.cmd 'startinsert'
end
end
Expand Down
25 changes: 8 additions & 17 deletions .config/nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
-- Set ',' as the leader key
-- See `:help mapleader`
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
vim.g.mapleader = ','
vim.g.maplocalleader = ','

Expand All @@ -12,14 +10,18 @@ vim.g.have_nerd_font = true
-- NOTE: You can change these options as you wish!
-- For more options, you can see `:help option-list`

-- Make line numbers default
-- Make line numbers default.
vim.opt.number = true
-- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it!

-- Ensure statusline is full width.
vim.o.laststatus = 3

-- Enable relative line numbers.
vim.opt.relativenumber = true

-- Enable mouse mode, can be useful for resizing splits for example!
vim.opt.mouse = 'a'

-- Disable horizontal scroll.
vim.opt.mousescroll = 'ver:3,hor:0'

Expand Down Expand Up @@ -137,7 +139,7 @@ vim.api.nvim_create_autocmd('TextYankPost', {
})

-- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info.
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
Expand All @@ -149,18 +151,7 @@ end ---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(lazypath)

-- [[ Configure and install plugins ]]
--
-- To check the current status of your plugins, run
-- :Lazy
--
-- You can press `?` in this menu for help. Use `:q` to close the window
--
-- To update plugins you can run
-- :Lazy update
--
-- NOTE: Here is where you install your plugins.
require('lazy').setup {
-- LSP Plugins
{
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
Expand Down
Loading