This commit is contained in:
cnst
2024-10-17 20:06:17 +02:00
parent f70061cc24
commit ec57cb7599
196 changed files with 1150 additions and 1271 deletions

View File

@@ -0,0 +1,42 @@
{pkgs, ...}: {
imports = [
./modules.nix
./git.nix
./shell.nix
];
home = {
username = "toothpick";
homeDirectory = "/home/toothpick";
stateVersion = "23.11";
extraOutputsToInstall = ["doc" "devdoc"];
packages = with pkgs; [
# user specific pkgs
filezilla
];
sessionVariables = {
BROWSER = "firefox";
EDITOR = "nvim";
TERM = "xterm-256color";
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/toothpick/.steam/root/compatibilitytools.d"; # proton and steam compat
QT_QPA_PLATFORM = "wayland";
SDL_VIDEODRIVER = "wayland";
LIBVA_DRIVER_NAME = "nvidia";
XDG_SESSION_TYPE = "wayland";
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
NVD_BACKEND = "direct";
EGL_PLATFORM = "wayland";
};
};
# disable manuals as nmd fails to build often
manual = {
html.enable = false;
json.enable = false;
manpages.enable = false;
};
# let HM manage itself when in standalone mode
programs.home-manager.enable = true;
}

7
users/toothpick/git.nix Normal file
View File

@@ -0,0 +1,7 @@
{
programs.git = {
enable = true;
userName = "toothpick";
userEmail = "fredrik@libellux.com";
};
}

136
users/toothpick/modules.nix Normal file
View File

@@ -0,0 +1,136 @@
{
monitors = [
{
name = "DVI-D-1";
width = 1920;
height = 1080;
refreshRate = 144;
workspace = "1";
primary = true;
}
];
home = {
browsers = {
firefox = {
enable = true;
};
chromium = {
enable = true;
};
};
comm = {
discord = {
enable = true;
};
};
devtools = {
neovim = {
enable = true;
};
vscode = {
enable = true;
};
helix = {
enable = true;
};
};
gaming = {
steam = {
enable = true;
};
# mangohud = {
# enable = false;
# };
};
terminal = {
alacritty = {
enable = true;
};
foot = {
enable = true;
};
kitty = {
enable = true;
};
wezterm = {
enable = false;
};
zellij = {
enable = false;
};
};
userd = {
blueman-applet = {
enable = false;
};
copyq = {
enable = true;
};
gpg = {
enable = false;
};
mako = {
enable = true;
};
udiskie = {
enable = true;
};
syncthing = {
enable = false;
};
};
utils = {
anyrun = {
enable = false;
};
rofi = {
enable = false;
};
waybar = {
enable = true;
};
yazi = {
enable = true;
};
zathura = {
enable = false;
};
tuirun = {
enable = true;
};
misc = {
enable = true;
};
mpv = {
enable = true;
};
eza = {
enable = true;
};
ssh = {
enable = true;
};
};
wm = {
hyprland = {
cnst = {
enable = false;
};
toothpick = {
enable = true;
};
};
utils = {
hypridle = {
enable = true;
};
hyprlock = {
enable = true;
};
hyprpaper = {
enable = true;
};
};
};
};
}

90
users/toothpick/shell.nix Normal file
View File

@@ -0,0 +1,90 @@
{
config,
pkgs,
lib,
...
}: let
inherit (lib.meta) getExe;
inherit (pkgs) eza bat;
in {
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
cat = "${getExe bat} --style=plain";
ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension";
la = "${getExe eza} -lah --tree";
tree = "${getExe eza} --tree --icons=always";
extract = "extract.sh";
usermodules = "$EDITOR /home/$USER/.nix-config/home/users/$USER/modules.nix";
umod = "$EDITOR /home/$USER/.nix-config/home/users/$USER/modules.nix";
systemmodules = "$EDITOR /home/$USER/.nix-config/hosts/$HOST/modules.nix";
smod = "$EDITOR /home/$USER/.nix-config/hosts/$HOST/modules.nix";
nixcleanboot = "sudo nix run /home/$USER/.nix-config#cleanup-boot";
nixclean = "nh clean all --keep 3";
nixdev = "nix develop ~/.nix-config -c $SHELL";
nixconfig = "cd /home/$USER/.nix-config/";
ll = "ls -l";
nixupdate = "nh os switch -v -H $HOST";
nixup = "nh os switch -H $HOST";
flakeupdate = "nh os switch -u -v -H $HOST";
flakeup = "nh os switch -u -H $HOST";
".." = "cd ..";
"..." = "cd ../../";
"...." = "cd ../../../";
"....." = "cd ../../../../";
"......" = "cd ../../../../../";
};
history = {
size = 1000;
path = "${config.xdg.dataHome}/zsh/history";
};
oh-my-zsh = {
enable = true;
plugins = [
"git"
# "thefuck"
];
theme = "robbyrussell";
};
profileExtra = ''
export PATH="$HOME/.local/bin:$PATH"
'';
initExtraFirst = ''
autoload -U colors && colors
'';
initExtra = ''
ZSH_THEME_GIT_PROMPT_PREFIX="%F{143}(%F{167}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%f "
ZSH_THEME_GIT_PROMPT_DIRTY="%F{143}) %F{202}%1{%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%F{143})"
ZSH_THEME_RUBY_PROMPT_PREFIX="%F{167}"
ZSH_THEME_RUBY_PROMPT_SUFFIX="%f"
# Check if we're in a nix-shell or nix develop environment
if [[ -n "$IN_NIX_SHELL" ]]; then
PROMPT='%F{red}DEV%f%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info)
%F{143}$ '
else
PROMPT='%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info)
%F{143}$ '
fi
RPROMPT='$(ruby_prompt_info)'
VIRTUAL_ENV_DISABLE_PROMPT=0
ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX=" %F{66}🐍 "
ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX="%f"
ZSH_THEME_VIRTUALENV_PREFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX
ZSH_THEME_VIRTUALENV_SUFFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=241'
microfetch
'';
};
}