Okay, this is a weird one, but hang with me. Let’s say I make a change to my Home Manager config and rebuild my system. The change isn’t reflected. So, I do a systemctl restart home-manager-phil.service
. Nothing. Then, I grep the actual unit file for the ExecStart
and run that. Now I get a bit of output and my configuration is perfectly applied. But if I run systemctl restart ...
again, it’s not like it goes back and is just one unit file behind; nothing happens at all. The only way to make anything happen is the find the ExecStart
in the unit file, and run it from bash. Crazy right?
Logs are all fine. Every time I rebuild, I get logs saying that the home manager service started and stopped successfully.
I’m using flakes, totally bog standard:
{
description = "Phil's Flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager }: {
nixosConfigurations = {
bloop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
./hardware-configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.phil = import ./home;
}
];
};
};
};
}
And here’s my home default.nix (a few lines in the Fish config removed for brevity, but this really is about it):
{ config, pkgs, ... }:
{
home.username = "phil";
home.homeDirectory = "/home/phil";
programs.fish = {
enable = true;
shellInit = ''
fish_add_path --path ~/bin
'';
shellAliases = {
ts = "sudo tailscale up --accept-routes --hostname=phil";
rebuild = "sudo nixos-rebuild --flake ~/nix/#bloop switch";
};
};
home.stateVersion = "24.05"; # Don't change this.
programs.home-manager.enable = true;
}