add home manager as a flake

This commit is contained in:
Pim Kunis 2023-10-08 18:03:14 +02:00
parent 7f900c6be3
commit 747d2bd03f
4 changed files with 31 additions and 5 deletions

View file

@ -3,9 +3,13 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
home-manager = {
url = "https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs }:
outputs = { self, nixpkgs, home-manager }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
@ -18,10 +22,16 @@
{
nixosConfigurations = {
myNixos = nixpkgs.lib.nixosSystem {
specialArgs = { inherit system; };
inherit system;
modules = [
./configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.pim = {
imports = [ ./home/home.nix ];
};
}
];
};
};