Skip to content

0xshade/HomeManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Home Manager Configuration

A minimal, terminal-focused, Nix Home Manager setup.

image

Quick Setup

Install Nix

sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --no-daemon
. /home/shade/.nix-profile/etc/profile.d/nix.sh

Add Home Manager channel

nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update

Install Home Manager

nix-shell '<home-manager>' -A install
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"

Deploy this configuration

git clone https://github.com/0xshade/HomeManager.git
cd HomeManager

# Update username and home directory in home.nix first!
# Edit lines 11-12 to match your system:
#   home.username = "yourusername";
#   home.homeDirectory = "/home/yourusername";

# Update Git username and email in ./modules/git.nix

home-manager --extra-experimental-features "nix-command flakes" switch -b backup --flake . 

Customization

  1. Packages: Add/remove packages in home.nix. Package configurations are in modules/package.nix.

  2. Alacritty: Modify colors, fonts, and shortcuts in modules/alacritty.nix.

  3. Zellij: Change theme in modules/zellij.nix. Note: tmux shortcut changed to Ctrl + Space (instead of default Ctrl + B).

  4. Shell: Configure shortcuts and bashrc in modules/shell.nix.

OpenGL Applications (Non-NixOS Systems)

This setup already includes NixGL wrapping around Applications requiring OpenGL (like Alacritty) are wrapped with:

(config.lib.nixGL.wrap pkgs.alacritty)

with NiXGL support added in flake.nix:

nixGL.packages = nixgl;
nixGL.defaultWrapper = "mesa";
nixGL.offloadWrapper = "nvidiaPrime";
nixGL.installScripts = [ "mesa" "nvidiaPrime" ];

If you encounter display errors like:

Error: Error { raw_code: None, raw_os_message: None, kind: NotSupported("provided display handle is not supported") }

Then make sure to 1) identify the package causing the issue and 2) wrap NixGL around it like alacritty above.

For one-off runs of OpenGL applications without Home Manager (to verify):

nix --extra-experimental-features "nix-command flakes" run --impure github:nix-community/nixGL -- alacritty

About

A minimal, terminal-focused, Nix Home Manager setup.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published