Hi - I am trying to set and use ZSH shell from a standalone Home Manager installation on Arch Linux.
Using the following flake.nix:
{
description = "Home Manager configuration of tim";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
homeConfigurations."tim" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ./home.nix ];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
};
programs.zsh.enable = true;
targets.genericLinux.enable = true;
environment.shells = with pkgs; [ zsh ];
#users.defaultUserShell = pkgs.zsh;
};
}
home.nix imports the following shell.nix:
{ config, pkgs, lib, users, ... }:
{
programs.zsh.enable = true;
programs.zsh = {
shellAliases = {
ll = "ls -l";
update = "home-manager switch --flake ~/hmconf";
};
history = {
size = 10000;
path = "${config.xdg.dataHome}/zsh/history";
};
zplug = {
enable = true;
plugins = [
{ name = "zsh-users/zsh-autosuggestions"; } # Simple plugin installation
];
};
};
home.username = "tim";
home.homeDirectory = "/home/tim";
}
The above two flakes after running do not add ZSH to /etc/shells.
I have tried manually adding the nix ZSH path to /etc/shells and changing the shell with:
chsh tim
Is there a limitation to using standalone home manager in stopping ZSH being activated or being added to /etc/shells for use?
Many thanks in advance for your advice.