NixOS/flake.nix
Leo 7c37492c69 Use Home Manager as a NixOS module
Replace the standalone homeConfigurations output with the Home Manager
NixOS module, so a single nixos-rebuild applies both the system and the
user configuration.

- flake.nix: import home-manager.nixosModules.home-manager, set
  home-manager.users.leo, drop the now-unused pkgs let-binding
  (allowUnfree comes from configuration.nix via useGlobalPkgs)
- home.nix: drop home.username/homeDirectory and
  programs.home-manager.enable, all provided by the module
- README.md: remove the separate install and home-manager switch steps

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FStCxmGBXQUWjgN2xMSvjU
2026-07-28 10:53:06 +03:00

30 lines
787 B
Nix

{
description = "Babbys first flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
home-manager.url = "github:nix-community/home-manager/release-26.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, ... }:
let
lib = nixpkgs.lib;
system = "x86_64-linux";
in {
nixosConfigurations = {
nixos = lib.nixosSystem {
inherit system;
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.leo = import ./home.nix;
}
];
};
};
};
}