-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
85 lines (80 loc) · 2.21 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
83
84
85
{
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware = {
url = "github:NixOS/nixos-hardware";
};
darwin = {
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nixgl = {
url = "github:guibou/nixGL/main";
};
};
outputs = { self, nixpkgs, home-manager, nixos-hardware, darwin, nixgl }:
{
inherit nixpkgs nixos-hardware;
nixosConfigurations = {
x1 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
(import ./hardware/x1.nix { inherit nixpkgs nixos-hardware; })
./machines/x1.nix
];
};
vm = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
(import ./hardware/vm.nix { inherit nixos-hardware; })
./machines/vm.nix
];
};
};
darwinConfigurations = {
mbp = darwin.lib.darwinSystem {
system = "x86_64-darwin";
modules = [
home-manager.darwinModules.home-manager
./machines/mbp.nix
];
};
};
homeConfigurations =
let
system = "x86_64-linux";
in
{
xps = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
inherit system;
# See https://github.com/nix-community/home-manager/issues/2942.
config.allowUnfree = true;
};
modules = [
./machines/xps.nix
];
# Pass through nixgl overlayed onto the pkgs.
# See: https://github.com/guibou/nixGL#use-an-overlay
extraSpecialArgs =
let
nixgl-pkgs = import nixpkgs {
inherit system;
overlays = [ nixgl.overlay ];
};
in
{
inherit nixgl-pkgs;
};
};
};
};
}