-
Notifications
You must be signed in to change notification settings - Fork 4
/
flake.nix
119 lines (102 loc) · 3.27 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
117
118
119
{
description = "Luke's toolbox";
inputs = {
devenv-root.url = "file+file:///dev/null";
devenv-root.flake = false;
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs-darwin.url = "github:NixOS/nixpkgs/nixpkgs-24.11-darwin";
flake-parts.url = "github:hercules-ci/flake-parts";
devenv.url = "github:cachix/devenv";
treefmt-nix.url = "github:numtide/treefmt-nix";
vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
darwin.url = "github:LnL7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
brew-api.url = "github:BatteredBunny/brew-api";
brew-api.flake = false;
brew-nix.url = "github:LukeChannings/brew-nix";
brew-nix.inputs.nixpkgs.follows = "nixpkgs";
brew-nix.inputs.nix-darwin.follows = "darwin";
brew-nix.inputs.brew-api.follows = "brew-api";
_1password-shell-plugins.url = "github:1Password/shell-plugins";
_1password-shell-plugins.inputs.nixpkgs.follows = "nixpkgs";
toolbox.url = "github:lukechannings/toolbox";
toolbox.inputs.nixpkgs.follows = "nixpkgs";
toolbox.inputs.flake-parts.follows = "flake-parts";
toolbox.inputs.devenv.follows = "devenv";
};
outputs =
inputs@{
self,
flake-parts,
nixpkgs,
...
}:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
flake-parts.flakeModules.modules
inputs.devenv.flakeModule
inputs.treefmt-nix.flakeModule
./devenv.nix
./config
./templates
];
systems = [
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
"aarch64-linux"
];
flake.vscode.systemExtensions =
(nixpkgs.lib.importJSON ./.devcontainer.json).customizations.vscode.extensions;
flake.overlays = {
vscode-extensions = inputs.vscode-extensions.overlays.default;
};
perSystem =
{
pkgs,
lib,
system,
...
}:
{
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.vscode-extensions.overlays.default
];
config = { };
};
packages = {
inherit (inputs.home-manager.packages.${system}) home-manager;
};
legacyPackages.homeConfigurations.luke = self.lib.mkHomeManagerConfiguration {
inherit pkgs;
disabledModules = [
"default-packages"
"chromium"
"wezterm"
"vscode"
"fonts"
];
config.home = {
username = "luke";
homeDirectory = "/home/luke";
};
};
};
};
nixConfig = {
extra-substituters = [
"https://devenv.cachix.org"
"https://luke-channings.cachix.org"
];
extra-trusted-public-keys = [
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
"luke-channings.cachix.org-1:ETsZ3R5ue9QOwO4spg8aGJMwMU6k5tQIaHWnTakGHjo="
];
};
}