-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
95 lines (90 loc) · 2.7 KB
/
Copy pathflake.nix
File metadata and controls
95 lines (90 loc) · 2.7 KB
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 = "Flake for nix darwin system";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
homebrew-core = {
url = "github:homebrew/homebrew-core";
flake = false;
};
homebrew-cask = {
url = "github:homebrew/homebrew-cask";
flake = false;
};
homebrew-bundle = {
url = "github:homebrew/homebrew-bundle";
flake = false;
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nil = {
url = "github:oxalica/nil/c8e8ce72442a164d89d3fdeaae0bcc405f8c015a";
flake = true;
};
neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay";
};
baouncer = {
url = "github:lalilul3lo/baouncer";
inputs.nixpkgs.follows = "nixpkgs";
};
kopye = {
url = "github:lalilul3lo/kopye";
inputs.nixpkgs.follows = "nixpkgs";
};
claude-code = {
url = "github:sadjow/claude-code-nix";
};
tree-sitter-achitek = {
url = "github:achitek-org/tree-sitter-achitek";
flake = false;
};
};
outputs =
inputs:
let
username = "sjoli";
system = "aarch64-darwin";
rebuild = pkgs.writeShellScriptBin "rebuild" (builtins.readFile ./scripts/rebuild.sh);
vim_pkg = pkgs.writeShellScriptBin "vim_pkg" ''
#!/usr/bin/env bash
exec ${pkgs.nodejs_24}/bin/node ${./scripts/prefetch_vim_pkgs.js} "$@"
'';
pkgs = import inputs.nixpkgs { inherit system; };
utils = import ./utils { inherit pkgs; };
nix-lsp-server = inputs.nil.packages.${system}.nil;
nixfmt-rfc-style = inputs.nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
machines = import ./machines {
inherit inputs;
inherit username;
inherit system;
};
in
machines.forEach (machine: {
darwinConfigurations.${machine.hostname} = machine.darwinConfiguration inputs;
homeConfigurations.${username} = machine.homeConfiguration inputs;
})
// {
# expose rebuild script in this environment
devShells.${system}.default = pkgs.mkShell {
packages = [
rebuild
vim_pkg
nix-lsp-server
nixfmt-rfc-style
pkgs.lua-language-server
pkgs.just
# For scripting with node
pkgs.nodejs_24
pkgs.typescript
pkgs.typescript-language-server
];
};
apps.${system} = machines.forEach utils.generateApp;
formatter.${system} = nixfmt-rfc-style;
};
}