Push these changes to a branch cause I'm kind of giving up

This commit is contained in:
Jimbo 2024-10-07 11:42:34 -04:00
parent d9469fc321
commit e3bacb2d84
229 changed files with 1496 additions and 1479 deletions

7
home/utils/default.nix Normal file
View file

@ -0,0 +1,7 @@
{ ... }: {
imports = [
./gnome-keyring
./udiskie
./zsh
];
}

View file

@ -1,153 +0,0 @@
{pkgs, ...}: {
home = {
file = let
fastConf = ''
{
"$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 /) '+%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󰊠"
}
]
}
'';
in {
# Fastfetch config
".config/fastfetch/config.jsonc".text = fastConf;
};
packages = let
# Small Neofetch config
pFetch = let
smallConf = pkgs.writeText "smallconf.jsonc" ''
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"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": " "
}
]
}
'';
in pkgs.writeScriptBin "pfetch"
''fastfetch --config ${smallConf}'';
in with pkgs; [
fastfetch pFetch
];
};
}

View file

@ -1,8 +0,0 @@
{pkgs, outputs, ...}: {
programs.git = {
enable = true;
lfs.enable = true;
userName = outputs.secrets.jimUsername;
userEmail = outputs.secrets.jimEmail;
};
}

View file

@ -0,0 +1,3 @@
{ ... }: {
services.gnome-keyring.enable = true;
}

View file

@ -1,18 +0,0 @@
{pkgs, ...}: {
# Enable NCMPCPP
programs.ncmpcpp = {
enable = true;
settings = {
browser_sort_mode = "name";
user_interface = "alternative";
};
};
# Enable Discord Music RPC
services.mpd-discord-rpc.enable = true;
# Allow terminal control of mpd
home.packages = with pkgs; [
mpc-cli
];
}

View file

@ -1,109 +0,0 @@
{pkgs, outputs, ...}: {
# Install Neovim and plugins
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
];
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=#${outputs.look.colors.mid} ctermbg=238
hi Pmenu guibg=#${outputs.look.colors.mid} 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> :NERDTreeToggle
'';
};
}

View file

@ -1,127 +0,0 @@
{pkgs, ...}: {
# Enable Ranger
programs.ranger = {
enable = true;
settings = {
preview_images = true;
preview_images_method = "sixel";
dirname_in_tabs = true;
cd_tab_fuzzy = 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 = [
# Text editing
{
condition = ''ext xml|json|jsonc|m3u|m3u8|csv|tex|py|pl|rb|js|sh|php|md|nix'';
command = ''vim -- "$@"'';
}
# 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 librewolf, X, flag f'';
command = ''librewolf -- "$@"'';
}
{
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 = ''xdg-open -- "$@"'';
}
];
plugins = [
{
name = "devicons2";
src = builtins.fetchGit {
url = "https://github.com/cdump/ranger-devicons2";
rev = "9606009aa01743768b0f27de0a841f7d8fe196c5";
};
}
];
extraConfig = ''
default_linemode devicons2
'';
};
# Ranger's bookmarks
home.file = let
rangerBookmarks = ''
# Local files
h:/home/jimbo/
k:/home/jimbo/Downloads
v:/home/jimbo/Videos
c:/home/jimbo/.config
L:/home/jimbo/.local
D:/mnt
n:/etc/nixos
# Remote files
a:/home/jimbo/JimboNFS
K:/home/jimbo/JimboNFS/Downloads
p:/home/jimbo/JimboNFS/Photos
P:/home/jimbo/JimboNFS/Projects
V:/home/jimbo/JimboNFS/Videos/Random
m:/home/jimbo/JimboNFS/Music
s:/home/jimbo/JimboNFS/School
'';
in {
".local/share/ranger/bookmarks".text = rangerBookmarks;
};
}

View file

@ -1,22 +0,0 @@
{
# Enable tmux
programs.tmux = {
enable = true;
extraConfig = ''
set -g mouse on
set -g base-index 1
set -g default-terminal "st-256color"
set -g history-limit 4096
set -g set-titles on
set -g set-titles-string "#T"
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"
setw -g pane-base-index 1
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 "
'';
};
}

View file

@ -0,0 +1,6 @@
{ ... }: {
services.udiskie = {
enable = true;
automount = false;
};
}

View file

@ -1,4 +1,4 @@
{pkgs, config, outputs, ...}: {
{ pkgs, config, outputs, ... }: {
programs.zsh = {
enable = true;
autosuggestion.enable = true;