feat: add Home Manager as NixOS module and Flakes support

- flake.nix: new entrypoint using nixpkgs-unstable + home-manager input;
  builds as nixosConfigurations.chexit (nixos-rebuild switch --flake .#chexit)
- home.nix: Home Manager config for user chexit with zsh (p10k theme,
  autosuggestion, syntax highlighting, completion)
- shell.nix: stripped to system-level programs.zsh.enable only;
  user-specific zsh config moved to home.nix

https://claude.ai/code/session_01JwjdjwvgMGW4TcpYi4MZ6n
This commit is contained in:
Claude
2026-04-17 18:17:08 +00:00
parent 81b1992044
commit 427d756f54
3 changed files with 47 additions and 8 deletions
+26
View File
@@ -0,0 +1,26 @@
{
description = "chexit NixOS configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, ... }: {
nixosConfigurations.chexit = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.chexit = import ./home.nix;
}
];
};
};
}
+19
View File
@@ -0,0 +1,19 @@
{ pkgs, ... }:
{
home.username = "chexit";
home.homeDirectory = "/home/chexit";
home.stateVersion = "25.11";
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
initExtra = ''
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
'';
};
programs.home-manager.enable = true;
}
+2 -8
View File
@@ -1,11 +1,5 @@
{ pkgs, ... }: { ... }:
{ {
programs.zsh = { programs.zsh.enable = true;
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
promptInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
};
} }