nix/home.nix

325 lines
6.2 KiB
Nix
Raw Normal View History

2023-11-03 23:41:31 -04:00
{ conf, more-packages ? [] }:
2023-08-13 22:57:02 -04:00
{ config, pkgs, ... }:
2023-08-15 09:38:01 -04:00
let
2023-08-15 12:24:09 -04:00
wm = conf.wm;
2023-08-15 09:38:01 -04:00
in
2023-08-13 22:57:02 -04:00
{
2023-08-14 07:45:15 -04:00
/* The home.stateVersion option does not have a default and must be set */
2023-08-14 07:51:54 -04:00
home.stateVersion = "22.05";
2023-08-14 09:18:08 -04:00
2023-08-14 07:45:15 -04:00
home.packages = with pkgs; [
firefox
# bsdgames
2023-08-16 03:28:41 -04:00
# CRITICAL THREE
2023-08-14 07:45:15 -04:00
fortune
cowsay
2023-08-16 03:28:41 -04:00
ponysay
2023-08-14 07:45:15 -04:00
lispPackages.trivia
2023-08-17 23:27:39 -04:00
lispPackages.quicklisp
2023-08-14 07:45:15 -04:00
# lutris
# mono5
nethack
2023-08-14 16:40:58 -04:00
# chezmoi
2023-08-14 07:45:15 -04:00
# wineWowPackages.stable
# winetricks
# foliate
# thunderbird
starship
exa
2023-08-15 12:52:48 -04:00
dmenu
2023-08-16 11:30:24 -04:00
xsel
manix
2023-08-18 23:23:23 -04:00
shellcheck
2023-08-17 23:27:39 -04:00
rlwrap
# i like having easy access to a lot of repls
deno
ghc
sbcl
chez
racket
2023-09-10 00:04:10 -04:00
clojure
2023-08-19 11:06:45 -04:00
cargo
clippy
rustc
2023-09-21 22:39:53 -04:00
idris2
2023-11-03 23:41:31 -04:00
# emacs likes this
2023-09-21 22:39:53 -04:00
semgrep
2023-08-19 11:06:45 -04:00
discord
steam
2023-10-31 00:04:16 -04:00
fzf
2023-10-31 00:04:16 -04:00
kolourpaint
audacious
2023-09-10 00:04:10 -04:00
2023-09-21 22:39:53 -04:00
akku
# managing with elpas :(
2023-09-10 00:04:10 -04:00
# emacsPackages.idris2-mode
# emacsPackages.evil
2023-10-27 23:44:20 -04:00
ripgrep
2023-10-28 12:18:15 -04:00
tldr
htop
2023-10-31 00:04:16 -04:00
pv
2023-10-28 12:18:15 -04:00
lm_sensors
2023-10-31 00:04:16 -04:00
libnotify
hunspell
aspell
libsForQt5.krunner-symbols
mpv
yt-dlp
# i only need one font :[
nerdfonts
2023-10-31 00:04:16 -04:00
# glow and gum are a good example of something that should really be in a flake.nix or whatever
2023-11-03 23:41:31 -04:00
] ++ more-packages;
2023-08-13 22:57:02 -04:00
2023-08-14 07:45:15 -04:00
programs.fish = {
enable = true;
2023-08-14 09:18:08 -04:00
shellInit = import ./fish.conf.nix;
2023-08-14 07:45:15 -04:00
};
2023-08-13 22:57:02 -04:00
2023-08-14 16:40:58 -04:00
programs.vscode = {
enable = true;
enableUpdateCheck = false;
# i prefer to let vscode manage stuff
mutableExtensionsDir = true;
2023-10-31 19:06:45 -04:00
userSettings = import ./vscode-settings.nix;
2023-08-14 16:40:58 -04:00
};
2023-08-14 07:45:15 -04:00
programs.neovim = {
enable = true;
coc.enable = true;
2023-08-15 12:07:30 -04:00
coc.settings = ''
{
"rust-analyzer.checkOnSave.command": "clippy",
"rust-analyzer.checkOnSave.extraArgs": ["-- -W clippy::pedantic"],
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": ["c", "cpp", "objc", "objcpp"],
"rootPatterns": [".ccls", "compile_commands.json", ".vim/", ".git/", ".hg/"],
"initializationOptions": {
"cache": {
"directory": "/tmp/ccls"
}
}
}
},
"inlayHint.enable": true,
"zig.zls.path": "/home/mbk/.config/coc/extensions/coc-zls-data/zls_install/zls"
}
'';
2023-08-14 07:45:15 -04:00
defaultEditor = true;
2023-08-16 11:30:24 -04:00
# should probably extract this out but meh
2023-08-14 07:45:15 -04:00
plugins = with pkgs.vimPlugins; [
vim-airline
vim-airline-themes
ale
vim-fugitive
vim-bufkill
suda-vim
2023-08-14 07:45:15 -04:00
2023-08-16 11:30:24 -04:00
# navigation
2023-08-14 07:45:15 -04:00
nerdtree
nerdtree-git-plugin
plenary-nvim
telescope-nvim
2023-08-16 11:30:24 -04:00
telescope-manix
2023-08-14 07:45:15 -04:00
vim-rooter
fzfWrapper
2023-08-14 07:45:15 -04:00
# Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
# Plug 'junegunn/fzf.vim'
# Plug 'jlanzarotta/bufexplorer'
vim-commentary
#Plug 'mrtazz/DoxygenToolkit.vim'
vim-surround
vim-sexp
vim-operator-user
#Plug 'rhysd/vim-clang-format'
#vim-scripts/a.vim
vim-highlightedyank
# Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh' }
ncm2
nvim-yarp
# Completion plugins
#Plug 'ncm2/ncm2-bufword'
ncm2-path
# CoC
# Plug 'neoclide/coc.nvim', {'branch': 'release'}
2023-08-18 23:23:23 -04:00
coc-sh
coc-json
2023-08-14 07:45:15 -04:00
haskell-vim
# Syntactic language support
rust-vim
vim-toml
elixir-tools-nvim
#vim-rubocop
zig-vim
2023-08-16 11:30:24 -04:00
gruvbox
2023-08-14 07:45:15 -04:00
];
2023-08-14 09:18:08 -04:00
extraConfig = import ./nvim.conf.nix;
2023-08-13 22:57:02 -04:00
};
2023-08-14 09:23:17 -04:00
programs.kitty = {
enable = true;
extraConfig = import ./kitty.conf.nix;
};
2023-08-15 09:38:01 -04:00
2023-08-15 17:23:19 -04:00
programs.git = {
enable = true;
2023-08-15 18:19:41 -04:00
userName = "mehbark";
userEmail = "terezi@pyrope.net";
2023-10-27 23:44:20 -04:00
extraConfig = {
safe = {
directory = "*";
};
};
2023-08-15 17:23:19 -04:00
};
programs.git.difftastic = {
enable = true;
background = "dark";
};
2023-08-15 12:24:09 -04:00
xsession.windowManager.xmonad = if wm == "xmonad" then {
enable = true;
config = pkgs.writeText "xmonad.hs" ''
import XMonad
2023-08-15 13:22:30 -04:00
import XMonad.Config.Kde
main = xmonad kde4Config
2023-08-15 12:24:09 -04:00
{ terminal = "kitty"
, modMask = mod4Mask
2023-08-15 12:52:48 -04:00
, borderWidth = 1
2023-08-15 12:24:09 -04:00
}
'';
} else {};
wayland.windowManager.hyprland = if wm == "hyprland"
then {
enable = true;
enableNvidiaPatches = true;
extraConfig = ''
$mod = SUPER
bind = $mod, F, exec, firefox
bind = , Print, exec, grimblast copy area
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
${builtins.concatStringsSep "\n" (builtins.genList (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in ''
bind = $mod, ${ws}, workspace, ${toString (x + 1)}
bind = $mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}
''
)
10)}
# ...
'';
2023-08-15 12:24:09 -04:00
} else {};
2023-08-16 02:16:32 -04:00
wayland.windowManager.sway = if wm == "sway"
then {
enable = true;
config = rec {
modifier = "Mod4";
terminal = "kitty";
startup = [
];
};
} else {};
2023-08-16 02:16:32 -04:00
services.polybar = if wm == "i3"
then {
enable = true;
script = "polybar bar &";
settings = import ./polybar.conf.nix;
} else {};
xsession.windowManager.i3 = if wm == "i3"
then {
2023-08-16 02:44:02 -04:00
enable = true;
extraConfig = import ./i3.conf.nix;
2023-08-16 02:16:32 -04:00
} else {};
2023-08-16 11:30:24 -04:00
programs.readline = {
enable = true;
};
2023-11-03 23:41:31 -04:00
# services.emacs.client.enable = true;
programs.emacs = {
enable = true;
2023-11-03 23:41:31 -04:00
package = pkgs.emacs29;
extraPackages = epkgs: with epkgs; [
which-key
emacs
all-the-icons-ivy
counsel
gruvbox-theme
lsp-mode
avy
consult
embark
embark-consult
vertico
#vertico-directory
marginalia
corfu
#corfu-popupinfo
corfu-terminal
kind-icon
#eshell
orderless
magit
markdown-mode
yaml-mode
json-mode
eglot
org
org
org-roam
paredit
rainbow-delimiters
geiser-chez
macrostep-geiser
evil
evil-leader
evil-goggles
evil-surround
evil-commentary
evil-org
erc-hl-nicks
];
# apparently errors in the config matter? nvm?
extraConfig = builtins.readFile ./init.el;
};
2023-10-31 00:04:16 -04:00
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
2023-08-13 22:57:02 -04:00
}