generated from juspay/nixos-unified-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
95 lines (84 loc) · 2.39 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
{
description = "Nix for macOS configuration";
nixConfig = {
substituters = [
"https://mirrors.ustc.edu.cn/nix-channels/store"
"https://cache.nixos.org"
];
};
# This is the standard format for flake.nix. `inputs` are the dependencies of the flake,
# Each item in `inputs` will be passed as a parameter to the `outputs` function after being pulled and built.
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-24.11-darwin";
flake-parts.url = "github:hercules-ci/flake-parts";
home-manager = {
url = "github:nix-community/home-manager/master";
# url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
helix = {
url = "github:CedricMeu/helix/better-bufferline";
inputs.nixpkgs.follows = "nixpkgs";
};
vscoqls = {
url = "github:coq/vscoq/v2.2.1";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs @ { self
, nixpkgs
, flake-parts
, home-manager
, darwin
, ...
}:
flake-parts.lib.mkFlake { inherit inputs; } (
let
username = "cedricmeukens";
useremail = "cedric.meukens@icloud.com";
in
{
systems = [
"x86_64-darwin"
"aarch64-darwin"
];
flake = {
darwinConfigurations = (
import ./hosts/macbook-2015
{
inherit self inputs nixpkgs home-manager darwin username useremail;
}
//
import ./hosts/macbook-2017
{
inherit self inputs nixpkgs home-manager darwin username useremail;
}
//
import ./hosts/macbook-gs
{
inherit self inputs nixpkgs home-manager darwin;
username = "cedric.meukens";
useremail = "cedric.meukens@guardsquare.com";
}
);
};
perSystem = { pkgs, ... }: {
devShells.default =
pkgs.mkShell {
name = "nixconfig";
nativeBuildInputs = with pkgs;
[
just
];
};
formatter = pkgs.nixpkgs-fmt;
};
}
);
}