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:
@@ -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;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -1,11 +1,5 @@
|
||||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
promptInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
};
|
||||
programs.zsh.enable = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user