I am trying to get home manager working as a module. I don’t get any errors in the build but I can’t seem to even get a basic shell alias to work.
configuration.nix
{ config, pkgs, ... }:
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz";
unstableTarball = fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz";
unstable = import unstableTarball {
config = config.nixpkgs.config;
};
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
(import "${home-manager}/nixos")
];
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.backupFileExtension = "backup";
home-manager.users.szemlicka = import ./home.nix;
home.nix
{ config, pkgs, ... }:
{
home.username = "szemlicka";
home.homeDirectory = "/home/szemlicka";
home.stateVersion = "25.05";
programs.bash = {
enable = true;
shellAliases = {
btw = "echo working";
};
};
}
This all rebuilds without error and I’m confirming my shell is using bash with:
echo $SHELL
/run/current-system/sw/bin/bash
But for some reason I get:
btw
I: command not found
I suspect I’m missing something obvious. Can someone help point out what I’m missing?