Files
dotfiles/nix/flake.nix

49 lines
1.4 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";
home-manager.inputs.utils.follows = "utils";
# mach-nix.url = "mach-nix/3.5.0";
# mach-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
self,
nixpkgs,
utils,
home-manager,
# mach-nix,
...}: let
pkgsForSystem = (system: import nixpkgs {
inherit system;
overlays = [
# self.overlays."${system}".xonsh_with_plugins
];
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: {
# overlays.xonsh_with_plugins = import ./overlays/xonsh.nix { mach-nix = mach-nix.lib."${system}"; };
legacyPackages.homeConfigurations.std = mkHomeConfig { inherit system; };
});
}