-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
116 lines (110 loc) · 2.8 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
107
108
109
110
111
112
113
114
115
116
{
description = "My system configurations";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
privateConfig = {
url = "git+ssh://[email protected]/kenranunderscore/private-config?ref=master";
flake = false;
};
nixgl = {
url = "github:nix-community/nixgl";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs";
};
ghostty = {
url = "git+ssh://[email protected]/ghostty-org/ghostty";
inputs.nixpkgs-stable.follows = "nixpkgs";
inputs.nixpkgs-unstable.follows = "nixpkgs";
};
zsh-autopair = {
url = "github:hlissner/zsh-autopair";
flake = false;
};
zsh-autosuggestions = {
url = "github:zsh-users/zsh-autosuggestions";
flake = false;
};
zsh-history-substring-search = {
url = "github:zsh-users/zsh-history-substring-search";
flake = false;
};
zsh-syntax-highlighting = {
url = "github:zsh-users/zsh-syntax-highlighting";
flake = false;
};
};
outputs =
inputs@{
self,
nixpkgs,
home-manager,
...
}:
let
system = "x86_64-linux";
overlays = [
inputs.emacs-overlay.overlays.default
inputs.nixgl.overlays.default
(final: prev: { inherit (inputs.ghostty.packages.${system}) ghostty; })
];
pkgs = import nixpkgs {
config.allowUnfree = true;
inherit overlays system;
};
inherit (pkgs) lib;
in
{
formatter.${system} = pkgs.nixfmt-rfc-style;
lib = import ./lib;
nixosConfigurations =
let
machines = self.lib.readDirNames ./nixos;
in
builtins.foldl' (
acc: dir:
acc
// self.lib.mkNixosSystem {
inherit
dir
system
inputs
pkgs
;
}
) { } machines;
homeConfigurations =
let
users = self.lib.readDirNames ./users;
in
builtins.foldl' (
acc: dir:
acc
// self.lib.mkHomeConfiguration {
inherit
dir
system
inputs
pkgs
;
}
) { } users;
templates = {
devShell = {
path = ./templates/devShell;
description = "A simple default devShell";
};
haskell = {
path = ./templates/haskell;
description = "A template for a simple, single-package Haskell project using cabal-install";
};
};
};
}