48 lines
1.6 KiB
Nix
48 lines
1.6 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";
|
|
|
|
pypi-deps-db.url = "github:DavHau/pypi-deps-db";
|
|
pypi-deps-db.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
mach-nix.url = "github:DavHau/mach-nix/master";
|
|
mach-nix.inputs.nixpkgs.follows = "nixpkgs";
|
|
mach-nix.inputs.pypi-deps-db.follows = "pypi-deps-db";
|
|
};
|
|
|
|
outputs = {self, nixpkgs, flake-utils, home-manager, mach-nix, ...}: let
|
|
pkgsForSystem = (system: import nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
self.overlays."${system}".xonsh_with_plugins
|
|
];
|
|
});
|
|
|
|
mkHomeConfig = ({system, username ? "ttm" }: home-manager.lib.homeManagerConfiguration {
|
|
pkgs = pkgsForSystem system;
|
|
modules = [
|
|
./home.nix
|
|
{
|
|
home = {
|
|
inherit username;
|
|
};
|
|
}
|
|
];
|
|
});
|
|
in
|
|
flake-utils.lib.eachDefaultSystem (system: {
|
|
overlays.xonsh_with_plugins = import ./overlays/xonsh.nix { mach-nix = mach-nix.lib."${system}"; };
|
|
legacyPackages.homeConfigurations.std = mkHomeConfig { inherit system; };
|
|
});
|
|
# {
|
|
# overlays.xonsh_with_plugins.x86_64-linux = import ./overlays/xonsh.nix { mach-nix = mach-nix.lib."x86_64-linux"; };
|
|
# overlays.xonsh_with_plugins.x86_64-darwin = import ./overlays/xonsh.nix { mach-nix = mach-nix.lib."x86_64-darwin"; };
|
|
# homeConfigurations.linux = mkHomeConfig { system="x86_64-linux"; };
|
|
# homeConfigurations.mac = mkHomeConfig { system="x86_64-darwin"; };
|
|
# };
|
|
}
|