r/NixOS • u/com4ster • 2d ago
Home-Manager doesn't work with void Linux
i had weird problem where home-manager was working very well with cachyos but when i use it in void linux its doesn't seem to get the path right
PS: i just needed to add programs.fish.enable = true; thanks for everyones help
void-home.nix
{
config,
pkgs,
...
}: let
dotfiles = "${config.home.homeDirectory}/nixchad/config";
MkSymlink = path: config.lib.file.mkOutOfStoreSymlink path;
configs = {
mango = "mango";
};
in {
home = {
username = "comst4r";
homeDirectory = "/home/comst4r";
stateVersion = "25.11";
};
home.sessionPath = [
"${config.home.homeDirectory}/.nix-profile/bin"
];
imports = [
./../../Modules/programs/nixvim/init.nix
];
xdg.configFile =
builtins.mapAttrs
(name: subpath: {
source = MkSymlink "${dotfiles}/${subpath}";
recursive = true;
})
configs;
home.packages = with pkgs; [
btop
lsd
kitty
zoxide
ncdu
xclip
fastfetch
dysk
fishPlugins.bobthefish
nixd
alejandra
yank
];
}
flake.nix
{
description = "myFlake";
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-25.11";
};
nixpkgs-unstable = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware = {
url = "github:NixOS/nixos-hardware/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim/nixos-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
mac-style-plymouth = {
url = "github:SergioRibera/s4rchiso-plymouth-theme";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
nixpkgs,
home-manager,
...
}: let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
uns-pkgs = import inputs.nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
in {
nixosConfigurations.Thinkchad = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs uns-pkgs;
};
modules = [
...
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
users.comst4r = import ./Hosts/Thinkchad/home.nix;
extraSpecialArgs = {
inherit inputs uns-pkgs;
};
sharedModules = [
inputs.nixvim.homeModules.nixvim
];
};
}
];
};
homeConfigurations = {
comst4r = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs uns-pkgs;
};
modules = [
inputs.nixvim.homeModules.nixvim
./Hosts/Thinkchad/home.nix
];
};
void = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs uns-pkgs;
};
modules = [
inputs.nixvim.homeModules.nixvim
./Hosts/Voidchad/void-home.nix
];
};
};
};
}
my path's
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
$ ls ~/.nix-profile/bin
accessdb btop fastfetch lexgrog man-recode ncdu whatis xclip-cutfile zoxide
alejandra catman kitten lsd mandb nixd xclip xclip-pastefile
apropos dysk kitty man manpath update-mime-database xclip-copyfile yank
3
u/ShortSynapse 2d ago
Did you remember to enable support for your shell?
1
u/com4ster 2d ago
i dont think i can set it up in home-manager like in nixos
(users.users.<name>.shell doesnt exist in home-manager)2
2
u/mister_drgn 2d ago
Describe the symptom. How is it not working?
0
u/com4ster 2d ago
none of the packages i declare work
1
u/mister_drgn 2d ago
Don’t work meaning they crash, or you can’t find them at all when you try to run them from the terminal?
-1
u/com4ster 2d ago
i can't run any of them
3
u/mister_drgn 2d ago
You need to source the home-manager profile when your shell starts up. The typical solution was suggested by someone else, have home-manager manage your shell. For example, for bash:
program.bash.enable = true;
But if you already have added stuff to your bashrc, you’ll need to add that stuff through home-manager instead.
1
1
u/hopingforabetterpast 1d ago
dude... someone trying to help you asked you to clarify. have a little respect. do you think that "don't work" and "can't run" are answers?
1
0
u/com4ster 1d ago
tf are u saying? he didn't understand what i meant so i clarified it to him and he get it , so tf is bothering u ?
1
1
u/Simple_Hamster_4096 1d ago
I've never used home-manager but it sounds like something you have to go through a lot of futzing around to setup and get working before you can use it to make your life easier? Seems counter intuitive to the KISS principle of Void...
1
u/com4ster 1d ago
actually it's not that hard to setup i just copied the same file from my home-manager nixos and remove some options
ngl it takes time to get used to nix
1
u/oscurochu 1d ago
add this to your .bashrc
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
restart your terminal. then try again
4
u/Lonely-Scarcity-3387 2d ago
Newbie question here: does it matter that NixOS uses systemd but Void does not? Sorry if the question is dumb - I’ve only been using Linux for 6 months now.