system/hm/home.nix

246 lines
7.4 KiB
Nix
Raw Normal View History

2024-10-14 17:28:31 -04:00
# Last stable generation 359 10/13/24
2024-11-01 12:04:24 -04:00
# home-manager works by soft-linking the software packages configured by the user to /etc/profiles/per-user/your-username and modifying environment variables like PATH to point to this path, thus installing user software packages.
2024-12-03 13:21:22 -05:00
{
inputs,
outputs,
lib,
config,
pkgs,
systemSettings,
userSettings,
zen-browser,
hyprland,
nix-colors,
...
}:
2024-10-14 17:28:31 -04:00
let
2024-11-01 12:04:24 -04:00
system = "x86_64-linux";
2024-10-14 17:28:31 -04:00
myAliases = {
# Sysadmin
ll = "ls -alF";
la = "ls -A";
l = "ls -CF";
".." = "cd ..";
version = "lsb_release -cs";
cpu-speed = "cat /proc/cpuinfo | grep 'cpu MHz'";
update = "sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y";
2024-11-29 18:31:17 -05:00
nixFlakeUpdate = "nix flake update";
2024-10-14 17:28:31 -04:00
listServices = "systemctl list-units --all --type=service --no-pager";
listUserServices = "systemctl list-units --all --type=service --no-pager --user";
2024-11-01 12:04:24 -04:00
listGenerations = "sudo nix-env -p /nix/var/nix/profiles/system --list-generations";
switchGenerations = "nix-env --switch-generation $1";
nixClean = "nix-env -e '*'";
takeOutTrash = "nix-collect-garbage --delete-older-than $1";
2024-10-14 17:28:31 -04:00
ls = "eza --icons -l -T -L=1";
cat = "bat";
htop = "btm";
fd = "fd -Lu";
w3m = "w3m -no-cookie -v";
neofetch = "disfetch";
fetch = "disfetch";
# NixOS
pkgsList="nix-env -qaP \\'*\\' --description";
nixUpdate="nix-env -u \\'*\\'";
updateChannel="nix-channel --update nixos";
nixOptimize="nix-store --optimise";
2024-10-14 19:37:56 -04:00
mkhome="cd ~/system && home-manager switch --flake .";
2024-11-29 18:31:17 -05:00
buildsys="cd ~/system && sudo nixos-rebuild switch --flake \\'.\\#\\'";
2024-11-01 12:04:24 -04:00
get256="nix-prefetch-url --type sha256 $1";
remapKeys="input-remapper-control --command autoload";
2024-10-14 17:28:31 -04:00
# Zoxide
# cd="z";
# Kitty
icat="kitten icat";
s="kitten ssh";
2025-05-03 12:34:07 -04:00
kitty-logs="kitty --class='kitty-logs' journalctl -f";
2024-10-14 17:28:31 -04:00
# init_0="sudo systemctl isolate emergency.target";
# init_1="sudo systemctl isolate rescue.target";
# init_3="sudo systemctl isolate multi-user.target";
# init_5="sudo systemctl isolate graphical.target";
2024-10-14 17:28:31 -04:00
stop-containers="listServices | grep container | grep active | awk '{print $1}' | xargs -n1 sudo systemctl stop";
2024-10-14 17:28:31 -04:00
# history="history | fzf";
};
# URL of your dotfiles repository
dotfilesRepo = "http://nas.local/git/wayne/dotfiles.git";
# Path where the dotfiles repository will be cloned
dotfilesPath = "${config.home.homeDirectory}/.dotfiles";
# Path to the directory within the dotfiles repository that contains home directory dotfiles
homeStowPath = "${dotfilesPath}/home";
# pip hack
# system = "x86_64-linux";
# pkgs = pkgs.legacyPackages.${system};
# buildPythonPackage = pkgs.python311Packages.buildPythonPackage;
# fetchPypi = pkgs.python311Packages.fetchPypi;
# Mopidy-WebSettings = buildPythonPackage rec {
# pname = "Mopidy-WebSettings";
# version = "0.2.3";
# format = "mopidyPlugin";
# src = fetchPypi {
# inherit pname version;
# sha256 = "6aa2284cd7af4a34cb10e60e721e92b98f06b2f064be2e1e2191f73374baa1ff";
# };
# doCheck = false;
# propogateBuildInputs = with pkgs.python311Packages; [];
# };
2024-11-01 12:04:24 -04:00
unstablePkgs = import (
fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz";
2025-04-11 18:43:57 -04:00
sha256 = "146hn6w57hr341k5y003668gzh5l7shbikidn3r0ix33hb49sc5p";
2024-11-01 12:04:24 -04:00
})
{
# config = config.nixpkgs.config;
inherit system;
};
2024-10-14 17:28:31 -04:00
in
{
2024-10-14 18:35:04 -04:00
imports = [
2024-11-01 12:04:24 -04:00
(import ./modules/hypr.nix { inherit pkgs config lib; })
(import ./modules/theme.nix { inherit pkgs unstablePkgs; })
./modules/wayland.nix
./modules/xdg.nix
2025-04-11 18:43:57 -04:00
# (import ../pkgs/app/audio/mopidy.nix { inherit pkgs; })
# (import ../pkgs/app/editor/nvim.nix { pkgs = pkgs; })
2024-11-01 12:04:24 -04:00
(import ../pkgs/git/git.nix { inherit userSettings pkgs; })
(import ../pkgs/lang/cc/cc.nix { inherit pkgs; })
2024-10-14 18:35:04 -04:00
# (import ../pkgs/lang/python/python.nix { pkgs = pkgs; })
# (import ../pkgs/lang/python/python-packages.nix { pkgs = pkgs; })
# (import ../pkgs/app/terminal/alacritty.nix { pkgs = pkgs; })
2025-04-11 18:43:57 -04:00
(import ../pkgs/app/terminal/ghostty.nix { inherit pkgs; })
(import ../pkgs/app/terminal/kitty.nix { inherit pkgs lib nix-colors config; })
(import ../pkgs/app/terminal/parrot-starship.nix { inherit pkgs; })
# (import ../pkgs/app/terminal/starship.nix { pkgs = pkgs; })
(import ../pkgs/app/terminal/tmux.nix { inherit pkgs lib config; })
(import ../pkgs/app/terminal/yazi.nix { inherit pkgs; })
(import ../pkgs/shell/bash.nix { inherit pkgs config myAliases; })
(import ../pkgs/shell/cli-collection.nix { inherit pkgs; })
(import ../pkgs/shell/sh.nix { inherit myAliases pkgs;})
(import ../pkgs/shell/stow.nix { inherit pkgs lib config; })
(import ../pkgs/shell/zsh.nix { inherit myAliases pkgs;})
2024-10-14 18:35:04 -04:00
];
2024-10-14 17:28:31 -04:00
nixpkgs = {
config = {
2024-10-14 18:35:04 -04:00
allowUnfree = true;
2024-10-14 17:28:31 -04:00
};
};
systemd.user.sessionVariables = config.home.sessionVariables;
home = {
username = "${userSettings.username}";
homeDirectory = "/home/${userSettings.username}";
sessionVariables = {
2024-11-01 12:04:24 -04:00
EDITOR = userSettings.editor;
TERM = userSettings.term;
2024-11-29 18:31:17 -05:00
# PYTHONPATH = "${pkgs.mopidy}/lib/python3.11/site-packages:${pkgs.mopidy-tidal}/lib/python3.11/site-packages:${pkgs.mopidy-musicbox-webclient}/lib/python3.11/site-packages";
2024-10-14 17:28:31 -04:00
};
};
fonts.fontconfig.enable = true;
2024-12-03 13:21:22 -05:00
# colorScheme = nix-colors.colorSchemes.nord;
2024-10-14 17:28:31 -04:00
home.packages = with pkgs; [
zsh bash git stow tmux tmuxPlugins.tmux-fzf
vim neovim lunarvim # vimPlugins.vim-kitty-navigator
zoxide # vimPlugins.telescope-zoxide vimPlugins.zoxide-vim
bottom htop jq
starship
2024-11-01 12:04:24 -04:00
yazi
2024-10-14 17:28:31 -04:00
appimage-run
nerdfonts ubuntu_font_family
2024-11-29 18:31:17 -05:00
doublecmd filezilla
2024-10-14 17:28:31 -04:00
libreoffice
bottles winePackages.wayland
2025-04-11 18:43:57 -04:00
2025-05-03 12:34:07 -04:00
vlc
2024-11-01 12:04:24 -04:00
] ++ (import ./pkgs { inherit unstablePkgs pkgs system zen-browser; });
2024-10-14 17:28:31 -04:00
programs = {
home-manager.enable = true;
2025-05-03 12:34:07 -04:00
direnv = {
enable = true;
package = pkgs.direnv;
enableBashIntegration = true;
enableZshIntegration = true;
nix-direnv = {
enable = true;
package = pkgs.nix-direnv;
};
};
mpv = {
enable = true;
package = pkgs.mpv-unwrapped.wrapper { mpv = pkgs.mpv-unwrapped.override { vapoursynthSupport = true; }; youtubeSupport = true; };
bindings = {
WHEEL_UP = "seek 10";
WHEEL_DOWN = "seek -10";
"Alt+0" = "set window-scale 0.5";
};
# config = {
# };
# includes = [
# "${config.home.homeDirectory}/.config/mpv/config.inc"
# ];
};
2024-10-14 17:28:31 -04:00
ripgrep.enable = true;
2024-11-29 18:31:17 -05:00
vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
devsense.profiler-php-vscode
devsense.phptools-vscode
devsense.composer-php-vscode
xdebug.php-debug
firefox-devtools.vscode-firefox-debug
bbenoist.nix
];
};
2024-10-14 17:28:31 -04:00
};
services = {
blueman-applet.enable = true;
2025-06-16 14:00:25 -04:00
keybase.enable = true;
2024-10-14 17:28:31 -04:00
nextcloud-client = {
enable = false;
startInBackground = false;
};
udiskie = {
2025-05-03 12:34:07 -04:00
enable = true;
notify = true;
2025-06-16 14:00:25 -04:00
# tray = "auto";
automount = true;
2024-10-14 17:28:31 -04:00
settings = {
program_options = {
tray = "auto";
notify = true;
};
icon_names.media = [ "media-optical" ];
};
};
};
news.display = "silent";
systemd.user.startServices = "sd-switch";
2025-06-16 14:00:25 -04:00
home.stateVersion = "25.05";
2024-10-14 17:28:31 -04:00
}