Configuration files for my GNU/Linux installation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dotfiles/nix-darwin/home.nix

278 lines
6.3 KiB

{ config, pkgs, ... }:
{
7 months ago
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "elal";
home.homeDirectory = "/Users/elal";
7 months ago
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
imports = [
7 months ago
# Modules
./modules/skhd.nix
];
7 months ago
# The home.packages option allows you to install Nix packages into your
# environment.
7 months ago
home.packages = with pkgs; [
7 months ago
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
7 months ago
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
7 months ago
# Programs
7 months ago
libqalculate
imagemagick
7 months ago
figlet
6 months ago
tree
7 months ago
7 months ago
# Deps needed to build stuff
or-tools
gnumake
cmake
swig4
7 months ago
boost
6 months ago
libtorch-bin
7 months ago
7 months ago
# fucking stupid compat workarounds
7 months ago
qemu
7 months ago
libvirt
virt-manager
7 months ago
# compiler stuff
7 months ago
llvm
7 months ago
libllvm
7 months ago
7 months ago
# Simulators
7 months ago
# ngspice
7 months ago
# Cringe
pfetch
neofetch
7 months ago
# Tools
nmap
dig
3 months ago
verilator
# Development stuff
7 months ago
gh
7 months ago
docker
7 months ago
# c/c++
7 months ago
# gcc
clang
7 months ago
7 months ago
# haskell
ghc
7 months ago
haskell-language-server
7 months ago
haskellPackages.cabal-install
7 months ago
haskellPackages.stack
7 months ago
7 months ago
# rust
rustc
rustup
7 months ago
# js/ts/node/web
nodejs_22
nodePackages.pnpm
7 months ago
# vhdl
vhdl-ls
7 months ago
# golang
go
7 months ago
7 months ago
# lua <3 (divine intellect)
lua
7 months ago
# ruby
ruby
7 months ago
# julia
3 months ago
julia-bin
# julia_19-bin # compat
7 months ago
# py
python3
python312Packages.pip
1 month ago
# Scala
# metals # handled by coursier
4 months ago
scalafmt
3 months ago
sbt
coursier
1 month ago
jdk
4 months ago
7 months ago
# formatters
shfmt
nodePackages.prettier
black
clang-tools # clang-format
nixpkgs-fmt
stylish-haskell
# DE/WM/Ricing
# yabai # wm
skhd # key mngr
];
7 months ago
home.sessionVariables = {
7 months ago
EDITOR = "nvim";
SHELL = "${pkgs.zsh}/bin/zsh";
6 months ago
LIBTORCH = "${pkgs.libtorch-bin}/lib";
};
7 months ago
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
7 months ago
programs.git = {
package = pkgs.gitFull;
enable = true;
userName = "Elias Almqvist";
userEmail = "elalmqvist@gmail.com";
lfs.enable = true;
ignores = [
".dir-locals.el"
".envrc"
".DS_Store"
];
signing.signByDefault = true;
signing.key = "E31A99CE3E75A158";
extraConfig = {
commit.gpgsign = true;
};
};
7 months ago
programs.zsh = {
enable = true;
7 months ago
shellAliases = {
dev = "cd $HOME/Projects/almtech/exa/";
xcopy = "pbcopy";
xpaste = "pbpaste";
ccd = "echo $PWD | xcopy";
cr = "cd $(git rev-parse --show-toplevel)";
nd = "nix develop -c $SHELL";
7 months ago
ls = "ls --color";
2 months ago
tmux = "tmux -2";
1 month ago
py = "python";
7 months ago
};
7 months ago
oh-my-zsh = {
enable = true;
7 months ago
theme = "half-life";
7 months ago
plugins = [ "git" "macos" ];
7 months ago
extraConfig = ''
# Homebrew
export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH"
# Scripts path
export PATH="$HOME/.scripts:$PATH"
7 months ago
# User bin
export PATH="$HOME/.local/bin:$PATH"
7 months ago
# GHCup
export PATH="$PATH:$HOME/.ghcup/bin"
1 month ago
# CS (Scala)
1 month ago
export PATH="$PATH:$HOME/Library/Application Support/Coursier/bin"
1 month ago
7 months ago
# Super hacky and fucking stupid way of doing things - stuff
7 months ago
# export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
# export LDFLAGS="-L/opt/homebrew/opt/llvm/lib $LDFLAGS"
# export CPPFLAGS="-I/opt/homebrew/opt/llvm/include $CPPFLAGS"
# export DYLD_LIBRARY_PATH="/opt/homebrew/opt/llvm/lib:$DYLD_LIBRARY_PATH"
7 months ago
7 months ago
# Nix
if [ -e /etc/profile.d/nix.sh ]; then . /etc/profile.d/nix.sh; fi
7 months ago
# TERM
export TERM=xterm-xfree86
7 months ago
'';
};
};
2 months ago
programs.tmux = {
enable = true;
mouse = true;
terminal = "xterm-256color";
shell = "${pkgs.zsh}/bin/zsh";
2 months ago
prefix = "C-s";
keyMode = "vi";
plugins = [
{
plugin = pkgs.tmuxPlugins.cpu;
extraConfig = ''
set-option -g status-interval 1
set-option -g status-right "#[fg=green,bg=default,bright]#{cpu_bg_color}#{cpu_percentage} "
'';
}
];
2 months ago
extraConfig = ''
2 months ago
set -g default-command "${pkgs.zsh}/bin/zsh"
2 months ago
# Reload config with prefix + r
unbind r
bind r source-file ~/.config/tmux/tmux.conf
# Vim-like pane navigation
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
2 months ago
# Split panes using h and v
unbind '"'
unbind %
bind å split-window -h
bind ä split-window -v
# Status bar configuration
set-option -g status on
set-option -g status-justify centre
set-option -g status-keys vi
set-option -g status-position bottom
set-option -g status-style fg=colour136,bg=colour235
set-option -g status-left-length 20
set-option -g status-left-style default
set-option -g status-left "#[fg=green,bright]#(whoami)#[default]"
set-option -g status-right-length 140
set-option -g status-right-style default
# Window status styling
set-window-option -g window-status-style fg=colour244,bg=default
set-window-option -g window-status-current-style fg=colour166,bg=default
1 month ago
# Truecolor support
1 month ago
set-option -sa terminal-overrides ",xterm*:Tc"
2 months ago
'';
};
7 months ago
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
7 months ago
defaultEditor = true;
7 months ago
};
}