First attempt at flake for home manager config
This commit is contained in:
47
nix/flake.nix
Normal file
47
nix/flake.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
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.xonsh_with_plugins."${system}"
|
||||
];
|
||||
});
|
||||
|
||||
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}"; };
|
||||
# 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"; };
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user