dotfiles/.config/home-manager/flake.nix

27 lines
745 B
Nix

{
description = "Home Manager multi-machine flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, ... }: let
# Get system type (Linux or MacOS, x86_64 or ARM)
system = builtins.currentSystem;
pkgs = import nixpkgs { inherit system; };
# Get current machine hostname
hostname = builtins.getEnv "HOSTNAME";
in {
homeConfigurations = {
"${hostname}" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./common.nix
./${hostname}/home.nix
];
}
};
};
}