nix-managed-macbook/flake.nix

67 lines
1.9 KiB
Nix
Raw Permalink Normal View History

{
2024-01-31 16:00:03 +05:30
description = "Nix Darwin + Home Manager configuration of Abhinav Sarkar";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
2023-11-25 16:13:20 +05:30
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
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;
};
2023-11-25 12:48:21 +05:30
monaspace-font = {
url = "github:githubnext/monaspace?rev=601eb27f902432999302e0e64db2daacc954f156";
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;
};
};
2023-11-25 16:13:20 +05:30
outputs = inputs@{ self, nixpkgs, nix-darwin, home-manager, ... }:
let
system = "x86_64-darwin";
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
};
2024-01-31 19:23:23 +05:30
in {
2023-11-25 16:13:20 +05:30
darwinConfigurations."Abhinavs-MacBook-Pro" = nix-darwin.lib.darwinSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
./configuration.nix
2024-01-31 16:00:03 +05:30
./homebrew.nix
2023-11-25 16:13:20 +05:30
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.abhinav = import ./home.nix;
home-manager.extraSpecialArgs = { inherit inputs; };
}
];
};
devShells.${system}.default = pkgs.mkShell {
buildInputs = with pkgs; [ (import home-manager { inherit pkgs; }).home-manager just ];
shellHook = ''
2023-11-25 16:13:20 +05:30
export NIXPKGS_PATH=${pkgs.path};
'';
};
};
}