-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
100 lines (90 loc) · 2.77 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
{
description = "cole-h's NixOS configuration";
inputs = {
# Flakes
# nixpkgs.url = "git+file:///home/vin/workspace/vcs/nixpkgs/master";
# nixpkgs.url = "git+file:///home/vin/workspace/vcs/nixpkgs/nixos-unstable-small";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# nixpkgs.url = "github:nixos/nixpkgs/2f47650c2f28d87f86ab807b8a339c684d91ec56";
# nixpkgs.url = "github:nixos/nixpkgs/master";
# nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
# nixpkgs.url = "github:nixos/nixpkgs/nixos-20.09";
# nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-unstable";
agenix-cli = {
url = "github:cole-h/agenix-cli";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.darwin.follows = "darwin";
inputs.home-manager.follows = "home";
};
home = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix = {
url = "github:nixos/nix";
# url = "github:edolstra/nix/lazy-trees";
# inputs.nixpkgs.follows = "nixpkgs";
};
naersk = {
url = "github:nix-community/naersk";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-compat.url = "github:edolstra/flake-compat";
# Not flakes
wezterm = {
url = "git+https://github.com/wez/wezterm.git?submodules=1&rev=b6cc0382cb5af089c5a2039173cece194e861f46";
flake = false;
};
};
outputs = inputs:
let
inherit (inputs.self.lib)
forAllSystems
nameValuePair
mkNixosSystem
mkDarwinSystem
;
inherit (inputs.nixpkgs.lib)
flip
;
in
{
inherit inputs;
lib = import ./lib/lib.nix { inherit inputs; };
nixosConfigurations =
builtins.mapAttrs
(flip
({ system, modules ? [ ] }: hostname:
mkNixosSystem {
inherit
system
modules
;
}))
(import ./hosts/nixos { inherit inputs; });
darwinConfigurations =
builtins.mapAttrs
(flip
({ system, modules ? [ ] }: hostname:
mkDarwinSystem {
inherit
system
modules
;
}))
(import ./hosts/darwin { inherit inputs; });
packages = {
x86_64-linux.iso = import ./lib/iso.nix { system = "x86_64-linux"; inherit inputs; };
};
legacyPackages = forAllSystems
({ pkgs, ... }: builtins.trace "Using <nixpkgs> compat wrapper..." (pkgs.recurseIntoAttrs pkgs));
};
}