-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
106 lines (94 loc) · 2.86 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
description = "My Nix Environment";
inputs = {
unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
darwin = {
url = "github:LnL7/nix-darwin/master";
inputs.nixpkgs.follows = "unstable";
};
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "unstable";
};
nixos-pkgs.url = "github:nixos/nixpkgs/nixos-22.05";
home-manager-nixos = {
url = "github:nix-community/home-manager/release-22.05";
inputs.nixpkgs.follows = "nixos-pkgs";
};
oxilica-nil = {
url = "github:oxalica/nil";
};
};
outputs = inputs: {
darwinConfigurations = {
macos-laptop = inputs.darwin.lib.darwinSystem {
system = "x86_64-darwin";
inputs = inputs;
modules = [
./shared/modules/nix-darwin
(import ./macos-laptop/configuration.nix)
inputs.home-manager.darwinModules.home-manager
];
};
mac-mini = inputs.darwin.lib.darwinSystem {
system = "aarch64-darwin";
inputs = inputs;
modules = [
(import ./mac-mini/configuration.nix)
inputs.home-manager.darwinModules.home-manager
];
};
atomic = inputs.darwin.lib.darwinSystem {
inherit inputs;
system = "aarch64-darwin";
modules = [
./shared/modules/nix-darwin
(import ./atomic/configuration.nix inputs)
inputs.home-manager.darwinModules.home-manager
];
};
cosmic = inputs.darwin.lib.darwinSystem {
inherit inputs;
system = "aarch64-darwin";
modules = [
./shared/modules/nix-darwin
(import ./cosmic/configuration.nix inputs)
inputs.home-manager.darwinModules.home-manager
];
};
};
nixosConfigurations = {
nixos-x86-vm = inputs.nixos-pkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(import ./nixos-x86-vm/configuration.nix inputs)
inputs.home-manager-nixos.nixosModules.home-manager
];
};
nixos-linode = inputs.nixos-pkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(import ./nixos-linode/configuration.nix inputs)
inputs.home-manager-nixos.nixosModules.home-manager
];
};
};
devShell =
let
mkDevShell = arch:
let pkgs = inputs.unstable.legacyPackages."${arch}";
in pkgs.mkShell {
buildInputs = [
pkgs.sumneko-lua-language-server
inputs.oxilica-nil.packages."${arch}".nil
];
};
in
{
"x86_64-darwin" = mkDevShell "x86_64-darwin";
"aarch64-darwin" = mkDevShell "aarch64-darwin";
"x86_64-linux" = mkDevShell "x86_64-linux";
"aarch64-linux" = mkDevShell "aarch64-linux";
};
};
}