nix/home.nix

407 lines
7.4 KiB
Nix
Raw Permalink Normal View History

2024-06-20 12:42:11 -04:00
{ conf, more-packages ? [], leanpkgs }:
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
2023-11-05 08:50:30 -05:00
# ugh
2023-11-08 23:22:10 -05:00
chromium
2023-11-05 08:50:30 -05:00
2023-08-14 07:45:15 -04:00
# 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
# lutris
# mono5
nethack
2024-02-06 20:55:46 -05:00
angband
brogue
# cataclysm-dda
keeperrl
2024-04-16 22:33:48 -04:00
# adom
2024-02-11 22:49:35 -05:00
openrct2
2024-02-06 20:55:46 -05:00
# not yet
# celeste64
2024-04-16 22:33:48 -04:00
tetrio-desktop
2023-08-14 07:45:15 -04:00
# foliate
# thunderbird
2024-04-16 22:33:48 -04:00
prismlauncher
2023-08-14 07:45:15 -04:00
starship
2023-11-20 11:22:15 -05:00
eza
2023-08-15 12:52:48 -04:00
dmenu
2024-04-16 22:33:48 -04:00
watchexec
wl-clipboard
2023-08-16 11:30:24 -04:00
xsel
manix
2023-08-18 23:23:23 -04:00
shellcheck
jq
file
fd
zip
semgrep
pandoc
2023-08-17 23:27:39 -04:00
rlwrap
# i like having easy access to a lot of repls
deno
ghc
2024-06-20 12:42:11 -04:00
ghcid
cabal-install
2023-08-17 23:27:39 -04:00
sbcl
chez
2024-02-06 20:55:46 -05:00
guile
2024-04-16 22:33:48 -04:00
gambit
2023-08-17 23:27:39 -04:00
racket
2023-09-10 00:04:10 -04:00
clojure
ruby_3_3
julia
lua
gcc
zls
2023-08-19 11:06:45 -04:00
cargo
clippy
rustc
2023-11-08 23:22:10 -05:00
rustfmt
2023-09-21 22:39:53 -04:00
idris2
2024-06-20 12:42:11 -04:00
# might as well use it consistently
leanpkgs.lean-all
# (builtins.foldl' (a: b: "${a} ${b}") "" (builtins.attrNames leanpkgs))
haskell-language-server
typst
2023-09-21 22:39:53 -04:00
2023-08-19 11:06:45 -04:00
discord
steam
2024-02-13 17:22:08 -05:00
steam-run
gamemode
2023-11-20 11:22:15 -05:00
rare
2024-04-16 22:33:48 -04:00
minigalaxy
2024-02-06 20:55:46 -05:00
slipstream
2023-12-23 18:56:13 -05:00
obs-studio
2023-11-20 11:22:15 -05:00
# drm more like pooprm
# might as well use a newer version
#(itch.override {electron_11 = electron_22;})
2023-10-31 00:04:16 -04:00
fzf
2023-10-31 00:04:16 -04:00
kolourpaint
# yeah
2023-10-31 00:04:16 -04:00
audacious
2023-11-08 23:22:10 -05:00
audacity
2024-02-06 20:55:46 -05:00
ffmpeg
libjxl
exiftool
2024-02-06 20:55:46 -05:00
godot_4
blender
2023-09-10 00:04:10 -04:00
2023-09-21 22:39:53 -04:00
akku
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
helix
numbat
hyperfine
2023-10-31 00:04:16 -04:00
2023-10-28 12:18:15 -04:00
lm_sensors
2023-10-31 00:04:16 -04:00
libnotify
hunspell
aspell
libsForQt5.krunner-symbols
libsForQt5.khotkeys
libsForQt5.kio
2023-10-31 00:04:16 -04:00
mpv
yt-dlp
qbittorrent
2023-10-31 00:04:16 -04:00
2023-11-26 14:36:26 -05:00
lmms
helm
2023-12-23 18:56:13 -05:00
obsidian
2024-02-06 20:55:46 -05:00
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
lmmath
julia-mono
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-11-24 20:35:37 -05:00
userSettings = (import ./vscode-settings.nix) { rust-analyzer = pkgs.rust-analyzer; };
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
vim-suda
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
2024-02-06 20:55:46 -05:00
vim-elixir
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 = "*";
};
2024-04-16 22:33:48 -04:00
core.autocrlf = false;
2023-10-27 23:44:20 -04:00
};
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;
2023-11-20 11:22:15 -05:00
# not working right now
programs.emacs = {
enable = true;
2024-06-20 12:42:11 -04:00
package = pkgs.emacs29-pgtk;
2023-11-03 23:41:31 -04:00
extraPackages = epkgs: with epkgs; [
lsp-mode
leanpkgs.lean4-mode
markdown-mode
yaml-mode
json-mode
elixir-mode
clojure-mode
haskell-mode
zig-mode
2023-11-03 23:41:31 -04:00
which-key
all-the-icons-ivy
bind-key
2023-11-03 23:41:31 -04:00
counsel
gruvbox-theme
avy
consult
embark
embark-consult
vertico
#vertico-directory
marginalia
corfu
#corfu-popupinfo
corfu-terminal
kind-icon
#eshell
orderless
magit
eglot
org
org-roam
paredit
rainbow-delimiters
geiser-chez
2024-02-06 20:55:46 -05:00
geiser-guile
2024-04-16 22:33:48 -04:00
geiser-gambit
2023-11-03 23:41:31 -04:00
macrostep-geiser
evil
evil-leader
evil-goggles
evil-surround
evil-commentary
evil-org
erc-hl-nicks
2024-02-06 20:55:46 -05:00
gcmh
2024-04-16 22:33:48 -04:00
sly
2024-02-06 20:55:46 -05:00
general
lispyville
2024-04-16 22:33:48 -04:00
cider
direnv
2024-04-16 22:33:48 -04:00
esup
2023-11-03 23:41:31 -04:00
];
# apparently errors in the config matter? nvm?
2024-02-06 20:55:46 -05:00
extraConfig = (import ./init.el.nix) pkgs;
};
2023-10-31 00:04:16 -04:00
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
2024-02-06 20:55:46 -05:00
# services.syncthing = {
# enable = true;
# tray.enable = true;
# };
2023-08-13 22:57:02 -04:00
}