feat: Integrate Home Manager into the NixOS flake and define initial user configuration for nimmo.
This commit is contained in:
parent
afadfd68dd
commit
a7fbed952a
2 changed files with 63 additions and 1 deletions
44
common/home.nix
Normal file
44
common/home.nix
Normal 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;
|
||||||
|
}
|
||||||
20
flake.nix
20
flake.nix
|
|
@ -7,7 +7,11 @@
|
||||||
|
|
||||||
# 2. Antigravity (Google) - Custom Flake
|
# 2. Antigravity (Google) - Custom Flake
|
||||||
antigravity.url = "github:jacopone/antigravity-nix";
|
antigravity.url = "github:jacopone/antigravity-nix";
|
||||||
antigravity.inputs.nixpkgs.follows = "nixpkgs";
|
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: {
|
outputs = { self, nixpkgs, ... }@inputs: {
|
||||||
|
|
@ -21,6 +25,13 @@
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/electra/default.nix
|
./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; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/lena/default.nix
|
./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;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue