Files
dotfiles/nix/flake.nix

42 lines
1.1 KiB
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
self,
nixpkgs,
utils,
home-manager,
...}: let
pkgsForSystem = (system: import nixpkgs {
inherit system;
overlays = [
];
config.allowUnfree = true;
});
mkHomeConfig = ({system, username ? "ttm" }: home-manager.lib.homeManagerConfiguration {
pkgs = pkgsForSystem system;
modules = [
./home.nix
{
home = {
inherit username;
};
# Pin nixpkgs flake to local nix registry so it gets used by commands like nix-shell
# https://discourse.nixos.org/t/local-flake-based-nix-search-nix-run-and-nix-shell/13433/12
nix.registry.nixpkgs.flake = nixpkgs;
}
];
});
in
utils.lib.eachDefaultSystem (system: {
legacyPackages.homeConfigurations.std = mkHomeConfig { inherit system; };
});
}