-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
52 lines (47 loc) · 1.8 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
description = "Home Manager configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-24.11-darwin";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixvim.url = "github:nix-community/nixvim/nixos-24.11";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
nixvim.inputs.home-manager.follows = "home-manager";
call-flake.url = "github:divnix/call-flake";
};
outputs = inputs @ { nixpkgs, nixpkgs-unstable, call-flake, nixvim, ... }:
let
overlays = [
inputs.rust-overlay.overlays.default
(call-flake ./flakes/fish-plugins).overlays.default
];
mkHomeManagerConfig = { hmModule, system }:
let
system-specific-overlay = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.${system};
nixvim.nvim = (call-flake ./flakes/nixvim-config).packages.${system}.default;
};
nixpkgs-module = { nixpkgs.overlays = overlays ++ [ system-specific-overlay ]; };
in
inputs.home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
modules = [
hmModule
nixpkgs-module
inputs.nix-index-database.hmModules.nix-index
];
};
in
{
inherit nixpkgs overlays nixvim;
homeConfigurations.personal = mkHomeManagerConfig {
system = "aarch64-darwin";
hmModule = ./machines/personal;
};
};
}