implementing modules for system applications

This commit is contained in:
cnst
2024-08-18 13:49:05 +02:00
parent 38f68c3550
commit a4306380e3
101 changed files with 1105 additions and 452 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
egl-wayland
];
sessionVariables = {
BROWSER = "firefox";
EDITOR = "nvim";
TERM = "foot";
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/toothpick/.steam/root/compatibilitytools.d"; # proton and steam compat
XDG_SESSION_TYPE = "wayland";
MOZ_ENABLE_WAYLAND = "1";
MOZ_DISABLE_RDD_SANDBOX = "1";
WLR_DRM_NO_ATOMIC = "1";
WLR_NO_HARDWARE_CURSORS = "1";
LIBVA_DRIVER_NAME = "nvidia";
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;
}

View File

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

View File

@@ -0,0 +1,51 @@
{
modules = {
wm = {
hyprland = {
cnst.enable = false;
toothpick.enable = true;
# adam.enable = false;
};
utils = {
hypridle.enable = true;
hyprlock.enable = true;
hyprpaper.enable = true;
};
};
browsers = {
firefox.enable = true;
chromium.enable = false;
};
devtools = {
neovim.enable = true;
vscode.enable = true;
};
comm = {
discord.enable = true;
};
gaming = {
lutris.enable = false;
mangohud.enable = false;
};
terminal = {
alacritty.enable = true;
foot.enable = true;
kitty.enable = true;
zellij.enable = false;
};
utils = {
ags.enable = false;
anyrun.enable = false;
rofi.enable = false;
waybar.enable = true;
yazi.enable = true;
misc.enable = true;
};
userd = {
sops.enable = false;
copyq.enable = true;
mako.enable = true;
udiskie.enable = true;
};
};
}

View File

@@ -0,0 +1,65 @@
{config, ...}: {
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
usermodules = "nvim /home/toothpick/.nix-config/home/users/toothpick/modules.nix";
umod = "nvim /home/toothpick/.nix-config/home/users/toothpick/modules.nix";
systemmodules = "nvim /home/toothpick/.nix-config/hosts/toothpc/modules.nix";
smod = "nvim /home/toothpick/.nix-config/hosts/toothpc/modules.nix";
nixclean = "sudo nix run .#cleanup-boot";
nixdev = "nix develop ~/.nix-config -c $SHELL";
nixconfig = "cd /home/toothpick/.nix-config/";
ll = "ls -l";
nixupdate = "nh os switch -v -H toothpc && sudo nix run .#cleanup-boot";
nixup = "nh os switch -H toothpc && sudo nix run .#cleanup-boot";
flakeupdate = "nh os switch -u -v -H toothpc && sudo nix run .#cleanup-boot";
flakeup = "nh os switch -u -H toothpc && sudo nix run .#cleanup-boot";
};
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"
PROMPT='%F{143}%~%f $(git_prompt_info)$(virtualenv_prompt_info)
%F{143}$ '
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
'';
};
}