aboutsummaryrefslogtreecommitdiffstats
path: root/home/don
diff options
context:
space:
mode:
Diffstat (limited to 'home/don')
-rw-r--r--home/don/common/core/bash.nix16
-rw-r--r--home/don/common/core/default.nix29
-rw-r--r--home/don/common/core/vim/default.nix6
-rw-r--r--home/don/common/core/vim/vimrc47
-rw-r--r--home/don/fangorn.nix6
5 files changed, 104 insertions, 0 deletions
diff --git a/home/don/common/core/bash.nix b/home/don/common/core/bash.nix
new file mode 100644
index 0000000..7bfb808
--- /dev/null
+++ b/home/don/common/core/bash.nix
@@ -0,0 +1,16 @@
+{
+ programs.bash = {
+ enable = true;
+ enableCompletion = true;
+ shellAliases = {
+ grep = "grep --color=auto";
+ ip = "ip -c=auto";
+ la = "ls -aF --color=auto";
+ ll = "ls -alF --color=auto";
+ lock = "xscreensaver-command -lock";
+ nix-list-derivations = "nix-store --query --requisites /run/current-system | cut -d- -f2- | sort | uniq";
+ nix-list-generations = "nixos-rebuild list-generations";
+ zgrep = "zgrep --color=auto";
+ };
+ };
+}
diff --git a/home/don/common/core/default.nix b/home/don/common/core/default.nix
new file mode 100644
index 0000000..8250d0c
--- /dev/null
+++ b/home/don/common/core/default.nix
@@ -0,0 +1,29 @@
+{ config, lib, pkgs, outputs, ... }:
+{
+ imports = [
+ ./bash.nix
+ ./vim
+ ];
+
+ home = {
+ username = lib.mkDefault "don";
+ homeDirectory = lib.mkDefault "/home/${config.home.username}";
+ stateVersion = lib.mkDefault "23.11";
+ };
+
+ #home.packages = builtins.attrValues {
+ # inherit (pkgs)
+ # wget
+ # zip;
+ #};
+
+ nix = {
+ package = lib.mkDefault pkgs.nix;
+ settings = {
+ experimental-features = [ "nix-command" "flakes" ];
+ warn-dirty = false;
+ };
+ };
+
+ programs.home-manager.enable = true;
+}
diff --git a/home/don/common/core/vim/default.nix b/home/don/common/core/vim/default.nix
new file mode 100644
index 0000000..ea4ed5e
--- /dev/null
+++ b/home/don/common/core/vim/default.nix
@@ -0,0 +1,6 @@
+{
+ programs.vim = {
+ enable = true;
+ extraConfig = (builtins.readFile ./vimrc);
+ };
+}
diff --git a/home/don/common/core/vim/vimrc b/home/don/common/core/vim/vimrc
new file mode 100644
index 0000000..87de2a0
--- /dev/null
+++ b/home/don/common/core/vim/vimrc
@@ -0,0 +1,47 @@
+" Handling of big files - William Natter, Tony Mechelynck and others
+" fairly certain that BufSizeThreshold is in bytes
+let g:SaveUndoLevels = &undolevels
+let g:BufSizeThreshold = 5242880
+if has("autocmd")
+ au VimEnter * let g:SaveUndoLevels = &undolevels
+ au BufReadPre * if getfsize(expand("%")) >= g:BufSizeThreshold | setlocal noswapfile | endif
+ au BufEnter * if getfsize(expand("%")) < g:BufSizeThreshold | let &undolevels=g:SaveUndoLevels | else | setlocal undolevels=-1 | endif
+ au BufEnter * if getfsize(expand("%")) < g:BufSizeThreshold | syntax on | else | syntax off | endif
+endif
+
+set mouse&
+set noautoindent " always set autoindenting off
+
+" enable better 24-bit color support
+"let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
+"let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
+set termguicolors
+
+" If using a dark background within the editing area and syntax highlighting
+" turn on this option as well
+set background=dark
+
+if has("autocmd")
+ " Enabled file type detection
+ " Use the default filetype settings. If you also want to load indent files
+ " to automatically do language-dependent indenting add 'indent' as well.
+ filetype plugin on
+ "filetype indent on
+endif " has ("autocmd")
+
+" The following are commented out as they cause vim to behave a lot
+" different from regular vi. They are highly recommended though.
+set showcmd " Show (partial) command in status line.
+set showmatch " Show matching brackets.
+set ignorecase " Do case insensitive matching
+set incsearch " Incremental search
+"set expandtab " replace tabs with spaces
+set smarttab " use shiftwidth instead of tabstop at start of line
+set spell spelllang=en_us " turn on the spell check
+set hlsearch " highlight all search matches
+
+set laststatus=2
+set statusline=%<%f%h%m%r%=%{&ff}\ %Y\ %b\ 0x%B\ \ %l,%c%V\ %P
+
+"map <F5> :w<CR><bar>:!clear;go run %<CR>
+"map <F6> :w<CR><bar>:%! gofmt<CR>
diff --git a/home/don/fangorn.nix b/home/don/fangorn.nix
new file mode 100644
index 0000000..83c92cd
--- /dev/null
+++ b/home/don/fangorn.nix
@@ -0,0 +1,6 @@
+{ inputs, lib, pkgs, config, outputs, ... }:
+{
+ imports = [
+ common/core
+ ];
+}