-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
82 lines (74 loc) · 2.17 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
description = "Nix flake for Nix Home Manager config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
bash-env-json = {
url = "github:tesujimath/bash-env-json/main";
inputs.nixpkgs.follows = "nixpkgs";
};
bash-env-nushell = {
url = "github:tesujimath/bash-env-nushell/main";
inputs.nixpkgs.follows = "nixpkgs";
inputs.bash-env-json.follows = "bash-env-json";
};
eza = {
url = "github:eza-community/eza/main";
inputs.nixpkgs.follows = "nixpkgs";
};
nix_search_cli = {
url = "github:peterldowns/nix-search-cli/main";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, bash-env-json, bash-env-nushell, eza, nix_search_cli, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
allowUnfreePredicate = (pkg: true);
};
overlays = [
(import ./overlays/volnoti.nix)
];
};
flakePkgs = {
bash-env-json = bash-env-json.packages.${system}.default;
bash-env-nushell = bash-env-nushell.packages.${system}.default;
eza = eza.packages.${system}.default;
nix_search_cli = nix_search_cli.packages.${system}.default;
};
lib = pkgs.lib;
in
{
homeConfigurations =
let
configurations = (
import ./config/default.nix
{
inherit lib pkgs;
}
);
in
builtins.mapAttrs
(name: attrs:
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./main.nix
(lib.attrsets.recursiveUpdate attrs {
home.sessionVariables.HOME_MANAGER_FLAKE_REF_ATTR = "path:$HOME/home.nix#${name}";
})
];
extraSpecialArgs = {
inherit flakePkgs;
};
})
configurations;
};
}