-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
57 lines (47 loc) · 1.5 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
{
description = "dotfiles";
inputs = {
nixpkgs.url = "nixpkgs/24.05";
nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:rycee/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:nixos/nixos-hardware";
nixgl.url = "github:guibou/nixGL";
};
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, ... }:
let
inherit (mylib) mapModules mapModulesRec mapHosts mapHomes;
system = "x86_64-linux";
mkPkgs = pkgs: overlays: import pkgs {
inherit system;
config.allowUnfree = true;
overlays = overlays;
};
pkgs = mkPkgs nixpkgs (lib.attrValues self.overlays);
pkgs' = mkPkgs nixpkgs-unstable [ ];
lib = nixpkgs.lib;
mylib = import ./lib { inherit pkgs inputs lib; };
overlay =
final: prev: {
unstable = pkgs';
my = self.packages."${system}";
} // (import ./overlays { inherit inputs; }) final prev // inputs.nixgl.overlay final prev;
in
{
overlays.default = overlay;
packages."${system}" =
mapModules ./packages (p: pkgs.callPackage p { inherit inputs; });
nixosModules =
{ dotfiles = import ./.; } // mapModulesRec ./modules import;
nixosConfigurations =
mapHosts ./hosts { };
homeConfigurations =
mapHomes ./homes { };
};
}