-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
91 lines (88 loc) · 2.37 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
{
description = "rluckie's dotfiles";
inputs = {
nixpkgs = {url = "github:nixos/nixpkgs/nixpkgs-unstable";};
darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# cemacs = {
# url = "github:cmacrae/emacs";
# inputs.nixpkgs.follows = "nixpkgs";
# };
# emacs-overlay = {
# url = "github:nix-community/emacs-overlay";
# inputs.nixpkgs.follows = "nixpkgs";
# inputs.flake-utils.follows = "flake-utils";
# };
# flake-utils = {url = "github:numtide/flake-utils";};
# rust-overlay = {
# url = "github:oxalica/rust-overlay";
# inputs.nixpkgs.follows = "nixpkgs";
# inputs.flake-utils.follows = "flake-utils";
# };
};
outputs = inputs @ {
self,
# cemacs,
darwin,
# devenv,
# devshell,
# emacs-overlay,
# flake-utils,
home-manager,
nixpkgs,
# nur,
# rust-overlay,
...
}: let
# inherit (flake-utils.lib) eachDefaultSystem eachSystem;
inherit (darwin.lib) darwinSystem;
inherit
(inputs.nixpkgs.lib)
attrValues
makeOverridable
optionalAttrs
singleton
;
overlays = [
# emacs-overlay.overlay
# cemacs.overlay
# rust-overlay.overlays.default
(final: prev: {devenv = inputs.devenv.defaultPackage.${prev.system};})
(import ./nix/overlays)
];
mkDarwinSystem = {modules}:
makeOverridable darwin.lib.darwinSystem {
inputs = inputs;
system = "x86_64-darwin";
modules =
[
home-manager.darwinModules.home-manager
{nixpkgs.overlays = overlays;}
./nix/modules/systems/common
./nix/modules/systems/darwin
({lib, ...}: {
imports = import ./nix/modules/modules.nix {
inherit lib;
isDarwin = true;
};
})
]
++ modules;
};
in {
darwinConfigurations = {
example = mkDarwinSystem {modules = [./nix/hosts/example];};
gull = (mkDarwinSystem {modules = [./nix/hosts/gull];}).override {
system = "aarch64-darwin";
};
};
example = self.darwinConfigurations.example.system;
gull = self.darwinConfigurations.gull.system;
};
}