Fix everything.
This commit is contained in:
parent
11075719cb
commit
3d25d316fe
118 changed files with 180 additions and 244 deletions
11
home/jimbo/programs/btop/default.nix
Normal file
11
home/jimbo/programs/btop/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim_keys = true;
|
||||
rounded_corners = false;
|
||||
theme_background = false;
|
||||
};
|
||||
};
|
||||
}
|
16
home/jimbo/programs/default.nix
Normal file
16
home/jimbo/programs/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./btop
|
||||
./eza
|
||||
./fastfetch
|
||||
./git
|
||||
./headless
|
||||
./neovim
|
||||
./nh
|
||||
./nix-index
|
||||
./ranger
|
||||
./tmux
|
||||
./zsh
|
||||
];
|
||||
}
|
10
home/jimbo/programs/eza/default.nix
Normal file
10
home/jimbo/programs/eza/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
git = true;
|
||||
icons = "auto";
|
||||
colors = "always";
|
||||
extraOptions = [ "--group-directories-first" ];
|
||||
};
|
||||
}
|
97
home/jimbo/programs/fastfetch/config.jsonc
Normal file
97
home/jimbo/programs/fastfetch/config.jsonc
Normal file
|
@ -0,0 +1,97 @@
|
|||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"logo": {
|
||||
"source": "xenia",
|
||||
"color": {
|
||||
"1": "1;97",
|
||||
"2": "red",
|
||||
"3": "yellow"
|
||||
}
|
||||
},
|
||||
"display": {
|
||||
"separator": " \u001b[33m ",
|
||||
"color": "red"
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[1m—————————————————————————————————————"
|
||||
},
|
||||
{
|
||||
"type": "host",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "cpu",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "gpu",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "disk",
|
||||
"folders": "/",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "memory",
|
||||
"format": "{/1}{-}{/}{/2}{-}{/}{} / {}",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "display",
|
||||
"compactType": "original",
|
||||
"key": " "
|
||||
},
|
||||
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[1m—————————————————————————————————————"
|
||||
},
|
||||
{
|
||||
"type": "os",
|
||||
"format": "{3} {12}",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "kernel",
|
||||
"format": "{1} {2}",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "wm",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "terminal",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "packages",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "uptime",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"text": "date -d @$(stat -c %W /persist) '+%a %b %d %r %Z %Y'",
|
||||
"key": " "
|
||||
},
|
||||
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[1m—————————————————————————————————————"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m"
|
||||
}
|
||||
]
|
||||
}
|
7
home/jimbo/programs/fastfetch/default.nix
Normal file
7
home/jimbo/programs/fastfetch/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [ ./small ];
|
||||
|
||||
programs.fastfetch.enable = true;
|
||||
xdg.configFile."fastfetch/config.jsonc".source = ./config.jsonc;
|
||||
}
|
5
home/jimbo/programs/fastfetch/small/default.nix
Normal file
5
home/jimbo/programs/fastfetch/small/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ (pkgs.writeScriptBin "pfetch" "fastfetch --config ~/.config/fastfetch/small.jsonc") ];
|
||||
xdg.configFile."fastfetch/small.jsonc".source = ./small.jsonc;
|
||||
}
|
34
home/jimbo/programs/fastfetch/small/small.jsonc
Normal file
34
home/jimbo/programs/fastfetch/small/small.jsonc
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"logo": {
|
||||
"type": "small"
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"type": "os",
|
||||
"format": "{3} {12}",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "host",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "kernel",
|
||||
"format": "{1} {2}",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "uptime",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "packages",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "memory",
|
||||
"format": "{/1}{-}{/}{/2}{-}{/}{} / {}",
|
||||
"key": " "
|
||||
}
|
||||
]
|
||||
}
|
15
home/jimbo/programs/git/default.nix
Normal file
15
home/jimbo/programs/git/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Jimbo";
|
||||
userEmail = "jimbo@nixfox.ca";
|
||||
};
|
||||
|
||||
programs.lazygit.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gnupg
|
||||
git-crypt
|
||||
];
|
||||
}
|
8
home/jimbo/programs/headless/default.nix
Normal file
8
home/jimbo/programs/headless/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
dua
|
||||
p7zip
|
||||
vimv
|
||||
];
|
||||
}
|
112
home/jimbo/programs/neovim/default.nix
Normal file
112
home/jimbo/programs/neovim/default.nix
Normal file
|
@ -0,0 +1,112 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
# Vim theme
|
||||
vim-airline
|
||||
vim-airline-themes
|
||||
|
||||
# Internal clipboard
|
||||
vim-vsnip
|
||||
cmp-vsnip
|
||||
|
||||
# Autocomplete manager
|
||||
lspkind-nvim
|
||||
|
||||
# Autocomplete plugins
|
||||
cmp-nvim-lsp
|
||||
cmp-buffer
|
||||
cmp-path
|
||||
cmp-cmdline
|
||||
nvim-cmp
|
||||
|
||||
# Hex color visualizer and color theme
|
||||
nvim-colorizer-lua
|
||||
vim-monokai-pro
|
||||
|
||||
# Discord RPC
|
||||
vimsence
|
||||
|
||||
# Nerdtree
|
||||
nerdtree
|
||||
vim-nerdtree-syntax-highlight
|
||||
|
||||
# Misc languages
|
||||
kdl-vim
|
||||
];
|
||||
extraConfig = ''
|
||||
lua <<EOF
|
||||
-- Set up nvim-cmp
|
||||
local cmp = require'cmp'
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'vsnip' }
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
-- Use buffer source for '/' and '?'
|
||||
cmp.setup.cmdline({ '/', '?' }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':'
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
||||
EOF
|
||||
|
||||
colorscheme monokai_pro
|
||||
let g:airline_theme='onedark'
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
hi Normal guibg=none ctermbg=235
|
||||
hi Visual guibg=#202020 ctermbg=238
|
||||
hi Pmenu guibg=#202020 ctermbg=238
|
||||
hi EndOfBuffer guibg=none ctermbg=235
|
||||
hi LineNr guibg=none ctermbg=none
|
||||
lua require'colorizer'.setup()
|
||||
|
||||
set nu rnu
|
||||
set termguicolors
|
||||
set mouse=a
|
||||
|
||||
set undofile
|
||||
set undodir=$HOME/.local/share/nvim/undo
|
||||
set undolevels=100
|
||||
set undoreload=10000
|
||||
|
||||
nmap <C-x> :bnext<CR>
|
||||
nmap <C-z> :bprev<CR>
|
||||
nmap <C-w> :bd<CR>
|
||||
nmap <C-a> :NERDTreeToggleVCS<CR>
|
||||
'';
|
||||
};
|
||||
}
|
7
home/jimbo/programs/nh/default.nix
Normal file
7
home/jimbo/programs/nh/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
flake = "/etc/nixos";
|
||||
};
|
||||
}
|
4
home/jimbo/programs/nix-index/default.nix
Normal file
4
home/jimbo/programs/nix-index/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.nix-index.enable = true;
|
||||
}
|
122
home/jimbo/programs/ranger/default.nix
Normal file
122
home/jimbo/programs/ranger/default.nix
Normal file
|
@ -0,0 +1,122 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
programs.ranger = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preview_images = true;
|
||||
preview_images_method = "sixel";
|
||||
dirname_in_tabs = true;
|
||||
autosave_bookmarks = false;
|
||||
show_hidden = true;
|
||||
wrap_scroll = true;
|
||||
column_ratios = "2,2,4";
|
||||
hidden_filter = ''^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$'';
|
||||
};
|
||||
rifle = [
|
||||
# Media
|
||||
{
|
||||
condition = ''mime ^image, has imv, X, flag f'';
|
||||
command = ''imv -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''mime ^video, terminal, has mpv'';
|
||||
command = ''mpv -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''mime ^video, terminal, has mpv'';
|
||||
command = ''mpv --video-rotate=270 -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''mime ^audio|ogg$, terminal, has mpv'';
|
||||
command = ''mpv --no-audio-display -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''mime ^audio|ogg$, terminal, has mpv'';
|
||||
command = ''mpv --shuffle --no-audio-display -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''ext x?html?|pdf, has firefox, X, flag f'';
|
||||
command = ''firefox -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f'';
|
||||
command = ''libreoffice "$@"'';
|
||||
}
|
||||
|
||||
# Scripts
|
||||
{
|
||||
condition = ''sh'';
|
||||
command = ''sh -- "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''py'';
|
||||
command = ''python -- "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''pl'';
|
||||
command = ''perl -- "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''js'';
|
||||
command = ''node -- "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''php'';
|
||||
command = ''php -- "$1"'';
|
||||
}
|
||||
|
||||
# Misc
|
||||
{
|
||||
condition = ''ext exe|msi'';
|
||||
command = ''wine "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz|iso|jar|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip|zst, has 7z'';
|
||||
command = ''7z x -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''label open, has xdg-open'';
|
||||
command = ''vim -- "$@"'';
|
||||
}
|
||||
];
|
||||
plugins = [
|
||||
{
|
||||
name = "devicons2";
|
||||
src = builtins.fetchGit {
|
||||
url = "https://github.com/cdump/ranger-devicons2";
|
||||
rev = "94bdcc19218681debb252475fd9d11cfd274d9b1";
|
||||
};
|
||||
}
|
||||
];
|
||||
extraConfig = ''
|
||||
default_linemode devicons2
|
||||
'';
|
||||
};
|
||||
|
||||
# Ranger's bookmarks and necessary tools
|
||||
home = {
|
||||
file = {
|
||||
".local/share/ranger/bookmarks".text = ''
|
||||
# Local files
|
||||
h:/home/${config.home.username}/
|
||||
k:/home/${config.home.username}/Keepers
|
||||
j:/home/${config.home.username}/Downloads
|
||||
v:/home/${config.home.username}/Videos
|
||||
c:/home/${config.home.username}/.config
|
||||
l:/home/${config.home.username}/.local
|
||||
d:/mnt
|
||||
n:/etc/nixos
|
||||
|
||||
# Remote files
|
||||
J:/home/${config.home.username}/KittyNFS
|
||||
K:/home/${config.home.username}/KittyNFS/Files
|
||||
V:/home/${config.home.username}/KittyNFS/Media
|
||||
M:/home/${config.home.username}/KittyNFS/Music
|
||||
'';
|
||||
};
|
||||
packages = with pkgs; [
|
||||
imagemagick
|
||||
poppler_utils
|
||||
];
|
||||
};
|
||||
}
|
24
home/jimbo/programs/tmux/default.nix
Normal file
24
home/jimbo/programs/tmux/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
keyMode = "vi";
|
||||
mouse = true;
|
||||
terminal = "st-256color";
|
||||
historyLimit = 4096;
|
||||
baseIndex = 1;
|
||||
extraConfig = ''
|
||||
set -g status on
|
||||
set -g status-left ""
|
||||
set -g status-position bottom
|
||||
set -g status-right "#[bg=brightblack]#[fg=dark_purple] #T "
|
||||
set -g status-style "bg=black"
|
||||
|
||||
set -g set-titles on
|
||||
set -g set-titles-string "#T"
|
||||
|
||||
setw -g window-status-format "#[bg=brightmagenta]#[fg=black] #I #[bg=brightblack]#[fg=white] #W "
|
||||
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=black] #I #[bg=white]#[fg=black] #W "
|
||||
'';
|
||||
};
|
||||
}
|
23
home/jimbo/programs/zsh/default.nix
Normal file
23
home/jimbo/programs/zsh/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "agnoster";
|
||||
plugins = [
|
||||
"git"
|
||||
"history"
|
||||
];
|
||||
};
|
||||
initExtra = ''
|
||||
pfetch
|
||||
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
|
||||
source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh
|
||||
setopt HIST_IGNORE_SPACE
|
||||
setopt RM_STAR_WAIT
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue