nix/home.nix

430 lines
8 KiB
Nix
Raw Normal View History

2024-11-24 03:20:56 -05:00
{ conf, more-packages ? [], darwin ? false }:
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: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; [
# 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
2024-11-23 13:21:04 -05:00
brogue-ce
# cataclysm-dda
2024-04-16 22:33:48 -04:00
# adom
2024-02-06 20:55:46 -05:00
# not yet
# celeste64
2024-04-16 22:33:48 -04:00
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-09-10 00:04:10 -04:00
clojure
ruby_3_3
2024-11-23 13:21:04 -05:00
ruby-lsp
rubocop
lua
2024-11-23 13:21:04 -05:00
maxima
zls
2023-08-19 11:06:45 -04:00
2024-11-23 13:21:04 -05:00
# ocaml
# ocamlPackages.utop
# ocamlPackages.ocaml-lsp
# ocamlPackages.ocamlformat
2023-09-21 22:39:53 -04:00
idris2
2024-06-20 12:42:11 -04:00
# might as well use it consistently
haskell-language-server
typst
2023-09-21 22:39:53 -04:00
2024-02-06 20:55:46 -05:00
slipstream
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
# yeah
2023-11-08 23:22:10 -05:00
audacity
2024-02-06 20:55:46 -05:00
ffmpeg
libjxl
exiftool
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
2024-11-23 13:21:04 -05:00
# numbat
hyperfine
2023-10-31 00:04:16 -04:00
libnotify
hunspell
aspell
yt-dlp
qbittorrent
2023-10-31 00:04:16 -04:00
2023-12-23 18:56:13 -05:00
obsidian
2024-02-06 20:55:46 -05:00
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
lmmath
julia-mono
2024-11-23 13:21:04 -05:00
] ++ more-packages
++ (if darwin then [
m-cli
libiconvReal
# (racket-minimal.overrideAttrs (finalAttrs: previousAttrs: {
# configureFlags = [
# "--enable-${previousAttrs.shared}"
# "--enable-lt=${pkgs.libtool}/bin/libtool"
# "--enable-macprefix"
# ];
# }))
pkg-config
rustup
podman
] else [
racket
mpv
gcc
julia
godot_4
blender
firefox
chromium
steam
steam-run
gamemode
rare
minigalaxy
openrct2
obs-studio
kolourpaint
audacious
lm_sensors
libsForQt5.krunner-symbols
libsForQt5.khotkeys
libsForQt5.kio
lmms
helm
cargo
clippy
rustc
rustfmt
]);
home.file = {
".config/kitty/kitty.app.png".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/samholmes/whiskers/main/whiskers.png";
hash = "sha256-By6sRGNyK5Myk608crIO2vrnixZ0dJjoW26Y1I23Dto=";
};
};
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
2024-11-23 13:21:04 -05:00
programs.zsh.enable = true;
2023-08-14 16:40:58 -04:00
programs.vscode = {
enable = true;
enableUpdateCheck = false;
# i prefer to let vscode manage stuff
mutableExtensionsDir = true;
2024-11-23 13:21:04 -05:00
userSettings = (import ./vscode-settings.nix) { inherit pkgs; };
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;
2024-11-23 13:21:04 -05:00
init.defaultBranch = "main";
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
markdown-mode
yaml-mode
json-mode
elixir-mode
clojure-mode
haskell-mode
zig-mode
2024-11-23 13:21:04 -05:00
quack
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
2024-11-23 13:21:04 -05:00
geiser-racket
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
2024-11-23 13:21:04 -05:00
maxima
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
2024-11-23 13:21:04 -05:00
programs.home-manager.enable = true;
services.syncthing = {
enable = true;
tray.enable = !darwin;
};
2023-08-13 22:57:02 -04:00
}