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

318 lines
7.1 KiB

{ config, pkgs, ... }:
{
6 months ago
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "elal";
home.homeDirectory = "/Users/elal";
6 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.
6 months ago
nixpkgs = {
# You can add overlays here
overlays = [
# If you want to use overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
};
};
imports = [
6 months ago
# Modules
./modules/skhd.nix
];
6 months ago
# The home.packages option allows you to install Nix packages into your
# environment.
6 months ago
home.packages = with pkgs; [
6 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" ]; })
6 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}!"
# '')
6 months ago
# Programs
slack
zathura
irssi
spotify
6 months ago
discord
6 months ago
gimp
5 months ago
vscode
5 months ago
gtkwave
5 months ago
gephi
6 months ago
# Utils
coreutils # *happy rms noises*
6 months ago
stow
curl
wget
6 months ago
ffmpeg
gnupg
jq
3 weeks ago
# tmux
6 months ago
htop
6 months ago
ripgrep
6 months ago
sshfs
6 months ago
libqalculate
imagemagick
5 months ago
figlet
5 months ago
tree
5 months ago
5 months ago
# Deps needed to build stuff
or-tools
gnumake
cmake
swig4
5 months ago
boost
5 months ago
libtorch-bin
5 months ago
5 months ago
# fucking stupid compat workarounds
5 months ago
qemu
5 months ago
libvirt
virt-manager
5 months ago
# compiler stuff
5 months ago
llvm
5 months ago
libllvm
6 months ago
6 months ago
# Simulators
6 months ago
# ngspice
6 months ago
# Cringe
pfetch
neofetch
6 months ago
# Tools
nmap
dig
2 months ago
verilator
# Development stuff
6 months ago
gh
5 months ago
docker
6 months ago
# c/c++
6 months ago
# gcc
clang
6 months ago
6 months ago
# haskell
ghc
6 months ago
haskell-language-server
6 months ago
haskellPackages.cabal-install
6 months ago
haskellPackages.stack
6 months ago
6 months ago
# rust
rustc
rustup
6 months ago
# js/ts/node/web
nodejs_22
nodePackages.pnpm
5 months ago
# vhdl
vhdl-ls
6 months ago
# golang
go
6 months ago
6 months ago
# lua <3 (divine intellect)
lua
6 months ago
# ruby
ruby
6 months ago
# julia
2 months ago
julia-bin
# julia_19-bin # compat
6 months ago
# py
python3
python312Packages.pip
2 months ago
# scala
metals
scalafmt
2 months ago
sbt
coursier
2 months ago
6 months ago
# formatters
shfmt
nodePackages.prettier
black
clang-tools # clang-format
nixpkgs-fmt
stylish-haskell
# DE/WM/Ricing
# yabai # wm
skhd # key mngr
];
6 months ago
home.sessionVariables = {
6 months ago
EDITOR = "nvim";
SHELL = "${pkgs.zsh}/bin/zsh";
5 months ago
LIBTORCH = "${pkgs.libtorch-bin}/lib";
};
6 months ago
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
6 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;
};
};
6 months ago
programs.zsh = {
enable = true;
6 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";
6 months ago
ls = "ls --color";
3 weeks ago
tmux = "tmux -2";
6 months ago
};
6 months ago
oh-my-zsh = {
enable = true;
6 months ago
theme = "half-life";
6 months ago
plugins = [ "git" "macos" ];
6 months ago
extraConfig = ''
# Homebrew
export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH"
# Scripts path
export PATH="$HOME/.scripts:$PATH"
6 months ago
# User bin
export PATH="$HOME/.local/bin:$PATH"
5 months ago
# GHCup
export PATH="$PATH:$HOME/.ghcup/bin"
5 months ago
# Super hacky and fucking stupid way of doing things - stuff
5 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"
5 months ago
6 months ago
# Nix
if [ -e /etc/profile.d/nix.sh ]; then . /etc/profile.d/nix.sh; fi
6 months ago
# TERM
export TERM=xterm-xfree86
6 months ago
'';
};
};
3 weeks ago
programs.tmux = {
enable = true;
mouse = true;
terminal = "xterm-256color";
shell = "${pkgs.zsh}/bin/zsh";
3 weeks 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} "
'';
}
];
3 weeks ago
extraConfig = ''
3 weeks ago
set -g default-command "${pkgs.zsh}/bin/zsh"
3 weeks 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
3 weeks 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
5 days ago
# Truecolor support
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
3 weeks ago
'';
};
6 months ago
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
6 months ago
defaultEditor = true;
6 months ago
};
}