nixos/modules/home-manager/home.nix

146 lines
3.9 KiB
Nix
Raw Normal View History

2023-12-16 16:36:03 -07:00
{ inputs, outputs, lib, config, pkgs, userName, fullName, email, hostName, desktop, gaming, ... }:
2023-12-14 17:23:01 -07:00
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
2023-12-15 09:24:13 -07:00
#
2023-12-18 20:12:41 -07:00
# nixpkgs.overlays = [
# inputs.nur.overlay
# ];
2023-12-15 11:43:28 -07:00
# nixpkgs.config.allowUnfree = true;
2023-12-15 09:24:13 -07:00
# inputs.nixpkgs-stable.config.allowUnfree = true;
2023-12-18 20:12:41 -07:00
imports = [
../apps/firefox/firefox.nix
];
2023-12-14 17:23:01 -07:00
home.username = userName;
home.homeDirectory = "/home/${userName}";
programs.home-manager.enable = true;
home.stateVersion = "23.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
2023-12-18 20:12:41 -07:00
firefoxApp.enable = true;
2023-12-14 17:23:01 -07:00
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
2023-12-18 20:12:41 -07:00
# nur.repos.crazazy.js.eslint
# inputs.nixpkgs-stable.legacyPackages.x86_64-linux.corectrl
# kakoune
2023-12-14 17:23:01 -07:00
keepassxc
2023-12-14 21:58:29 -07:00
obs-studio
signal-desktop
2023-12-14 17:23:01 -07:00
waybar
wofi
2023-12-14 21:58:29 -07:00
xfce.thunar
2023-12-14 17:23:01 -07:00
# Install fonts
2023-12-16 16:36:03 -07:00
(nerdfonts.override { fonts = [ "Hermit" "Overpass" ]; })
2023-12-14 17:23:01 -07:00
# # 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}!"
# '')
];
2023-12-15 09:24:13 -07:00
# TODO not working firefox plugins
# extensions = with inputs.firefox-addons.packages.${pkgs.system}; [ ublock-origin bitwarden ];
2023-12-14 17:23:01 -07:00
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file."${config.xdg.configHome}" = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
source = ../../dotfiles;
recursive = true;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
2023-12-15 11:43:28 -07:00
2023-12-14 17:23:01 -07:00
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. If you don't want to manage your shell through Home
# Manager then you have to manually source 'hm-session-vars.sh' located at
# either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/nate/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
EDITOR = "kak";
2023-12-18 20:12:41 -07:00
XDG_CURRENT_DESKTOP="sway";
2023-12-14 17:23:01 -07:00
};
wayland.windowManager.sway = {
enable = true;
2023-12-16 16:36:03 -07:00
# config = rec {
# modifier = "Mod4";
# terminal = "foot";
# # startup = [
# # {command = "firefox";}
# # ];
# };
2023-12-14 17:23:01 -07:00
};
2023-12-15 11:43:28 -07:00
2023-12-14 17:23:01 -07:00
# kdeconnect setup
2023-12-16 16:36:03 -07:00
# services.kdeconnect = {
# enable = true;
# indicator = true;
# };
2023-12-14 17:23:01 -07:00
# Git setup
programs.git = {
2023-12-14 21:58:29 -07:00
enable = true;
2023-12-16 16:36:03 -07:00
userEmail = email;
userName = fullName;
2023-12-14 17:23:01 -07:00
};
# Zsh setup
programs.zsh = {
enable = true;
#history = {
# Size = 10000;
#};
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
theme = "half-life";
};
2023-12-18 20:12:41 -07:00
initExtra = ''
alias ask="nix-shell -p python310Packages.openai --run 'python ~/source/python/chat.py'"
fzf_projects() {
DIR=`
fd .git --search-path="$HOME/source/" -H --ignore-file ~/.config/fd-ignore -tdirectory | \
xargs dirname | \
sed 's|$HOME||g' | \
sort | \
uniq | \
fzf --preview 'ls $HOME/{}/README.md 2>/dev/null && bat $HOME/{}/README.md || printf "No README.md file found in this directory\n%s" {}' --preview-window=top | \
xargs printf "$HOME/%s/"
`
cd $DIR
}
alias p="fzf_projects source/"
### Busykid Bash Functions
'';
2023-12-14 17:23:01 -07:00
};
}