mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-11-22 09:22:19 +00:00
Compare commits
No commits in common. "013112f69264b04a71233fd4355c8c850aea0e84" and "590f2a54fcddb24da39802ec9fd5fe37d4539eaf" have entirely different histories.
013112f692
...
590f2a54fc
9 changed files with 1 additions and 378 deletions
16
.gitignore
vendored
16
.gitignore
vendored
|
@ -1,16 +0,0 @@
|
||||||
.vscode/*
|
|
||||||
!.vscode/settings.json
|
|
||||||
!.vscode/tasks.json
|
|
||||||
!.vscode/launch.json
|
|
||||||
!.vscode/extensions.json
|
|
||||||
!.vscode/*.code-snippets
|
|
||||||
|
|
||||||
.history/
|
|
||||||
|
|
||||||
*.vsix
|
|
||||||
|
|
||||||
.direnv
|
|
||||||
result
|
|
||||||
__pycache__
|
|
||||||
**.pyc
|
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
# Config files
|
# Config files
|
||||||
|
|
||||||
## Nix
|
|
||||||
I've started the process of leveraging [Nix](https://nixos.org/explore.html) to manage my system configurations. This repo will (eventually?) hold files used for managing user environments with [Home Manager](https://github.com/nix-community/home-manager). The goods are in [flake.nix](./flake.nix) and the [nix](./nix/) directory.
|
|
||||||
|
|
||||||
It's very much a work-in-progress though so the legacy dotfile configs are below.
|
|
||||||
## Legacy stuff
|
|
||||||
Clone the repo:
|
Clone the repo:
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/jbowdre/dotfiles.git ~/.dotfiles
|
git clone https://github.com/jbowdre/dotfiles.git ~/.dotfiles
|
||||||
|
@ -16,4 +11,4 @@ ln -s ~/.dotfiles/vim/.vimrc ~/.vimrc
|
||||||
ln -s ~/.dotfiles/tmux/.tmux.conf ~/.tmux.conf
|
ln -s ~/.dotfiles/tmux/.tmux.conf ~/.tmux.conf
|
||||||
ln -s ~/.dotfiles/pwsh/Microsoft.PowerShell_profile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1
|
ln -s ~/.dotfiles/pwsh/Microsoft.PowerShell_profile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
48
flake.lock
48
flake.lock
|
@ -1,48 +0,0 @@
|
||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"home-manager": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1690084763,
|
|
||||||
"narHash": "sha256-Nw680m/pyVoosSgXZW415Z657mfVM2BxaxDPjEk48Z0=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "fb03fa5516d4e86059d24ab35a611ffa3a359547",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1690083312,
|
|
||||||
"narHash": "sha256-I3egwgNXavad1eIjWu1kYyi0u73di/sMmlnQIuzQASk=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "af8cd5ded7735ca1df1a1174864daab75feeb64a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"home-manager": "home-manager",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
29
flake.nix
29
flake.nix
|
@ -1,29 +0,0 @@
|
||||||
{
|
|
||||||
description = "A Very Flakey Home Manager";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
||||||
home-manager = {
|
|
||||||
url = "github:nix-community/home-manager";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = {nixpkgs, home-manager, ...}:
|
|
||||||
let
|
|
||||||
system = "x86_64-linux";
|
|
||||||
in {
|
|
||||||
defaultPackage.${system} = home-manager.defaultPackage.${system};
|
|
||||||
|
|
||||||
homeConfigurations = {
|
|
||||||
"john@penguin" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
system = "${system}";
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
modules = [ ./nix/machines/penguin/home.nix ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,83 +0,0 @@
|
||||||
{ pkgs, lib, config, ... }: {
|
|
||||||
imports = [
|
|
||||||
../lib/tmux.nix
|
|
||||||
../lib/vim.nix
|
|
||||||
];
|
|
||||||
# home-manager config
|
|
||||||
home.username = "john";
|
|
||||||
home.homeDirectory = "/home/john";
|
|
||||||
home.stateVersion = "23.05"; # Please read the comment before changing.
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
targets.genericLinux.enable = true;
|
|
||||||
|
|
||||||
# home files
|
|
||||||
home.file = {
|
|
||||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
|
||||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
|
||||||
# # symlink to the Nix store copy.
|
|
||||||
# ".screenrc".source = dotfiles/screenrc;
|
|
||||||
|
|
||||||
# # You can also set the file content immediately.
|
|
||||||
# ".gradle/gradle.properties".text = ''
|
|
||||||
# org.gradle.console=verbose
|
|
||||||
# org.gradle.daemon.idletimeout=3600000
|
|
||||||
# '';
|
|
||||||
};
|
|
||||||
|
|
||||||
# env vars
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "vim";
|
|
||||||
};
|
|
||||||
|
|
||||||
# packages
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
babelfish
|
|
||||||
fish
|
|
||||||
htop
|
|
||||||
hugo
|
|
||||||
libvirt
|
|
||||||
packer
|
|
||||||
powershell
|
|
||||||
terraform
|
|
||||||
tldr
|
|
||||||
vagrant
|
|
||||||
vault
|
|
||||||
|
|
||||||
# # 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}!"
|
|
||||||
# '')
|
|
||||||
];
|
|
||||||
|
|
||||||
# Fish shell settings
|
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
shellInit = "source ${config.home.homeDirectory}/.nix-profile/etc/profile.d/nix.fish";
|
|
||||||
functions = {
|
|
||||||
switch-home = "home-manager switch -b backup --flake ${config.home.homeDirectory}/.dotfiles";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# git settings
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
delta.enable = true;
|
|
||||||
extraConfig = {
|
|
||||||
init.defaultBranch = "main";
|
|
||||||
pull.ff = "only";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# XDG settings
|
|
||||||
xdg.enable = true;
|
|
||||||
xdg.mime.enable = true;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
{ pkgs, lib, ...}: {
|
|
||||||
programs.tmux = {
|
|
||||||
enable = true;
|
|
||||||
baseIndex = 1;
|
|
||||||
clock24 = true;
|
|
||||||
escapeTime = 50;
|
|
||||||
historyLimit = 100000;
|
|
||||||
keyMode = "vi";
|
|
||||||
mouse = true;
|
|
||||||
plugins = with pkgs.tmuxPlugins; [ ];
|
|
||||||
extraConfig = ''
|
|
||||||
# navigating panes with Ctrl+{hjkl}
|
|
||||||
bind -n C-h select-pane -L
|
|
||||||
bind -n C-j select-pane -D
|
|
||||||
bind -n C-k select-pane -U
|
|
||||||
bind -n C-l select-pane -R
|
|
||||||
|
|
||||||
# synchronize panes with S
|
|
||||||
bind S set-window-option synchronize-panes \; display-message 'Synchronize-panes #{?pane_synchronized,on,off}'
|
|
||||||
|
|
||||||
# swap panes with <>
|
|
||||||
bind > swap-pane -D
|
|
||||||
bind < swap-pane -U
|
|
||||||
|
|
||||||
# window operations
|
|
||||||
unbind n
|
|
||||||
unbind w
|
|
||||||
bind n command-prompt "rename-window '%%'"
|
|
||||||
bind w new-window -c "#{pane_current_path}"
|
|
||||||
bind -n M-j previous-window # alt+j
|
|
||||||
bind -n M-k next-window # alt+k
|
|
||||||
|
|
||||||
# default statusbar colors
|
|
||||||
set-option -g status-style fg=yellow,bg=black
|
|
||||||
|
|
||||||
# default window title colors
|
|
||||||
set-window-option -g window-status-style fg=brightblue,bg=default
|
|
||||||
#set-window-option -g window-status-style dim
|
|
||||||
|
|
||||||
# active window title colors
|
|
||||||
set-window-option -g window-status-current-style fg=brightred,bg=default
|
|
||||||
#set-window-options -g window-status-current-style bright
|
|
||||||
|
|
||||||
# pane border
|
|
||||||
set-option -g pane-border-style fg=black
|
|
||||||
set-option -g pane-active-border-style fg=brightgreen
|
|
||||||
|
|
||||||
# message text
|
|
||||||
set-option -g message-style fg=brightred,bg=black
|
|
||||||
|
|
||||||
# pane number display
|
|
||||||
set-option -g display-panes-active-colour blue
|
|
||||||
set-option -g display-panes-colour brightred
|
|
||||||
|
|
||||||
# clock
|
|
||||||
set-window-option -g clock-mode-colour brightgreen
|
|
||||||
|
|
||||||
# bell
|
|
||||||
set-window-option -g window-status-bell-style fg=black,bg=red
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,65 +0,0 @@
|
||||||
{ pkgs, lib, ... }: {
|
|
||||||
programs.vim = {
|
|
||||||
enable = true;
|
|
||||||
defaultEditor = true;
|
|
||||||
settings = {
|
|
||||||
background = "dark";
|
|
||||||
expandtab = true;
|
|
||||||
number = true;
|
|
||||||
shiftwidth = 2;
|
|
||||||
tabstop = 2;
|
|
||||||
};
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
|
||||||
nerdcommenter
|
|
||||||
vim-go
|
|
||||||
vim-sensible
|
|
||||||
vim-trailing-whitespace
|
|
||||||
];
|
|
||||||
extraConfig = ''
|
|
||||||
" Tmux integration to switch panes with Ctrl+{hkjl}
|
|
||||||
if exists('$TMUX')
|
|
||||||
function! TmuxOrSplitSwitch(wincmd, tmuxdir)
|
|
||||||
let previous_winnr = winnr()
|
|
||||||
silent! execute "wincmd " . a:wincmd
|
|
||||||
if previous_winnr == winnr()
|
|
||||||
call system("tmux select-pane -" . a:tmuxdir)
|
|
||||||
redraw!
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
let previous_title = substitute(system("tmux display-message -p '#{pane_title}'"), '\n', "", "")
|
|
||||||
let &t_ti = "\<Esc>2;vim\<Esc>\\" . &t_ti
|
|
||||||
let &t_te = "\<Esc>2;". previous_title . "\<Esc>\\" . &t_te
|
|
||||||
|
|
||||||
nnoremap <silent> <C-h> :call TmuxOrSplitSwitch('h', 'L')<cr>
|
|
||||||
nnoremap <silent> <C-j> :call TmuxOrSplitSwitch('j', 'D')<cr>
|
|
||||||
nnoremap <silent> <C-k> :call TmuxOrSplitSwitch('k', 'U')<cr>
|
|
||||||
nnoremap <silent> <C-l> :call TmuxOrSplitSwitch('l', 'R')<cr>
|
|
||||||
else
|
|
||||||
map <C-h> <C-w>h
|
|
||||||
map <C-j> <C-w>j
|
|
||||||
map <C-k> <C-w>k
|
|
||||||
map <C-l> <C-w>l
|
|
||||||
endif
|
|
||||||
|
|
||||||
" coding preference
|
|
||||||
filetype off
|
|
||||||
filetype plugin indent on
|
|
||||||
|
|
||||||
syntax on
|
|
||||||
set backspace=indent,eol,start
|
|
||||||
set noautoindent
|
|
||||||
set noswapfile
|
|
||||||
set ruler
|
|
||||||
set showmatch
|
|
||||||
set smarttab
|
|
||||||
set sts=2
|
|
||||||
let g:NERDSpaceDelims=1
|
|
||||||
|
|
||||||
let mapleader=","
|
|
||||||
if has("autocmd")
|
|
||||||
autocmd FileType go set ts=2 sw=2 sts=2 noet nolist autowrite
|
|
||||||
endif
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,55 +0,0 @@
|
||||||
{ pkgs, lib, ...}: {
|
|
||||||
programs.vscode = {
|
|
||||||
enable = true;
|
|
||||||
enableExtensionUpdateCheck = false;
|
|
||||||
enableUpdateCheck = false;
|
|
||||||
extensions = with pkgs.vscode-extensions; [
|
|
||||||
bbenoist.nix
|
|
||||||
eamodio.gitlens
|
|
||||||
github.copilot
|
|
||||||
golang.go
|
|
||||||
hashicorp.terraform
|
|
||||||
ms-kubernetes-tools.vscode-kubernetes-tools
|
|
||||||
ms-vscode-remote.remote-ssh
|
|
||||||
ms-vscode.powershell
|
|
||||||
redhat.vscode-yaml
|
|
||||||
timonwong.shellcheck
|
|
||||||
vscodevim.vim
|
|
||||||
yzhang.markdown-all-in-one
|
|
||||||
];
|
|
||||||
userSettings = {
|
|
||||||
"diffEditor.ignoreTrimWhitespace" = false;
|
|
||||||
"editor.acceptSuggestionOnCommitCharacter" = false;
|
|
||||||
"editor.acceptSuggestionOnEnter" = "off";
|
|
||||||
"editor.lineNumbers" = "relative";
|
|
||||||
"editor.renderControlCharacters" = true;
|
|
||||||
"editor.renderWhitespace" = "boundary";
|
|
||||||
"editor.tabCompletion" = "off";
|
|
||||||
"editor.tabSize" = 2;
|
|
||||||
"explorer.confirmDragAndDrop" = false;
|
|
||||||
"files.hotExit" = "onExitAndWindowClose";
|
|
||||||
"git.confirmSync" = false;
|
|
||||||
"git.ignoreLegacyWarning" = true;
|
|
||||||
"powershell.codeFormatting.useCorrectCasing" = true;
|
|
||||||
"security.workspace.trust.untrustedFiles" = "open";
|
|
||||||
"vim.statusBarColorControl" = true;
|
|
||||||
"vim.useCtrlKeys" = false;
|
|
||||||
"window.restoreWindows" = "all";
|
|
||||||
"workbench.startupEditor" = "none";
|
|
||||||
"workbench.colorCustomizations" = {
|
|
||||||
"statusBar.background" = "#005f5f";
|
|
||||||
"statusBar.debuggingBackground" = "#005f5f";
|
|
||||||
"statusBar.noFolderBackground" = "#005f5f";
|
|
||||||
};
|
|
||||||
"vim.normalModeKeyBindings" = [
|
|
||||||
{
|
|
||||||
"after" = ["@q"];
|
|
||||||
"before" = ["Q"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.gnome-keyring.enable = true;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
{ pkgs, lib, config, ... }: {
|
|
||||||
imports = [
|
|
||||||
../../common/home.nix
|
|
||||||
../../lib/vscode.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# packages
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
firefox-esr
|
|
||||||
obsidian
|
|
||||||
qFlipper
|
|
||||||
];
|
|
||||||
}
|
|
Loading…
Reference in a new issue