feat: Integrate Home Manager into the NixOS flake and define initial user configuration for nimmo.

This commit is contained in:
Nimmo 2026-01-25 09:19:09 +00:00
parent afadfd68dd
commit a7fbed952a
2 changed files with 63 additions and 1 deletions

44
common/home.nix Normal file
View file

@ -0,0 +1,44 @@
{ config, pkgs, ... }:
{
home.username = "nimmo";
home.homeDirectory = "/home/nimmo";
home.stateVersion = "24.11";
programs.bash = {
enable = true;
enableCompletion = true;
# History Search (Prefix sensitive)
# Using bashrcExtra ensures it's available in interactive shells
bashrcExtra = ''
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
'';
# Bash-it configuration
initExtra = ''
# Path to the bash-it installation provided by Nix
export BASH_IT="${pkgs.bash-it}/share/bash-it"
# Set the theme
export BASH_IT_THEME="rjorgenson"
# Disable auto-update as Nix manages the package version
export BASH_IT_AUTOMATIC_UPDATE_CHECK=false
# Load Bash-it
if [ -f "$BASH_IT/bash_it.sh" ]; then
source "$BASH_IT/bash_it.sh"
fi
'';
};
# Add bash-it to user packages
home.packages = with pkgs; [
bash-it
];
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

View file

@ -8,6 +8,10 @@
# 2. Antigravity (Google) - Custom Flake
antigravity.url = "github:jacopone/antigravity-nix";
antigravity.inputs.nixpkgs.follows = "nixpkgs";
# 3. Home Manager
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, ... }@inputs: {
@ -21,6 +25,13 @@
specialArgs = { inherit inputs; };
modules = [
./hosts/electra/default.nix
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.nimmo = import ./common/home.nix;
}
];
};
@ -32,6 +43,13 @@
specialArgs = { inherit inputs; };
modules = [
./hosts/lena/default.nix
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.nimmo = import ./common/home.nix;
}
];
};