nix-managed-macbook/flake.nix

54 lines
1.5 KiB
Nix

{
description = "Home Manager configuration of Abhinav Sarkar";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
dm-mono-font = {
url = "github:googlefonts/dm-mono";
flake = false;
};
fish-plugin-foreign-env = {
url = "github:oh-my-fish/plugin-foreign-env";
flake = false;
};
fish-plugin-fzf = {
url = "github:PatrickF1/fzf.fish";
flake = false;
};
};
outputs = inputs@{ nixpkgs, home-manager, ... }:
let
system = "x86_64-darwin";
nixpkgs-patched = (import nixpkgs { inherit system; }).applyPatches {
name = "nixpkgs-patched-198739";
src = nixpkgs;
patches = [ ./packages/nixos-nixpkgs-198739.patch ];
};
pkgs = import nixpkgs-patched {
inherit system;
config = { allowUnfree = true; };
};
in {
homeConfigurations.abhinav = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = { inherit inputs; };
};
devShells.${system}.default = pkgs.mkShell {
buildInputs = with pkgs; [ (import home-manager { inherit pkgs; }).home-manager just ];
shellHook = ''
export NIXPKGS_PATH=${pkgs.path};
'';
};
};
}