Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
162 lines (150 loc) · 4.82 KB
/
Copy pathflake.nix
File metadata and controls
162 lines (150 loc) · 4.82 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
{
# Substituters used when building this flake on a machine that has not yet
# activated this config (e.g. CI, fresh installs, new machines). On machines
# that have already activated this config, nix.settings takes over instead.
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Last nixpkgs with a cached aarch64 atuin; see modules/pkgs/atuin-wrapped
nixpkgs-atuin.url = "github:nixos/nixpkgs/7a6522c868711d06e3a520bbcdfafe9806f4337f";
flake-parts.url = "github:hercules-ci/flake-parts";
nix-darwin = {
url = "github:nix-darwin/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
pronto = {
url = "github:etrobert/pronto";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
preservation.url = "github:nix-community/preservation";
tsnsrv = {
url = "github:boinkor-net/tsnsrv";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
# Upstream's default branch is its dev branch; the moving `latest` tag
# tracks stable releases and still follows `nix flake update`.
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
creatures = {
url = "github:etrobert/creatures";
inputs.nixpkgs.follows = "nixpkgs";
};
countdown = {
url = "github:etrobert/countdown";
inputs.nixpkgs.follows = "nixpkgs";
};
rift-radar = {
url = "github:etrobert/rift-radar";
inputs.nixpkgs.follows = "nixpkgs";
};
rack = {
url = "github:etrobert/rack";
inputs.nixpkgs.follows = "nixpkgs";
};
dispatch = {
url = "github:etrobert/dispatch";
inputs.nixpkgs.follows = "nixpkgs";
};
taskgraph = {
url = "github:etrobert/taskgraph";
inputs.nixpkgs.follows = "nixpkgs";
};
nutricalc = {
url = "github:Palomia/nutricalc";
inputs.nixpkgs.follows = "nixpkgs";
};
noctalia-official-plugins = {
url = "github:noctalia-dev/official-plugins";
flake = false;
};
# Tracks the latest Claude Code release ahead of nixpkgs' packaging cadence
# (hourly bot, official Anthropic binaries). `nix flake update` keeps it
# current. Built against our own nixpkgs via the follows below.
nix-claude-code = {
url = "github:ryoppippi/nix-claude-code";
inputs.nixpkgs.follows = "nixpkgs";
};
# Our fork, adding the `command` client: backed by a local command.
aichat = {
url = "github:etrobert/aichat";
inputs.nixpkgs.follows = "nixpkgs";
};
neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
};
outputs =
inputs@{ flake-parts, ... }:
let
inherit (inputs.nixpkgs) lib;
# A `_` prefix marks a path that is not a flake module — a package's own
# evalModules or callPackage tree. Same convention as vic/import-tree.
importTree =
path:
lib.filter (file: !lib.hasInfix "/_" (toString file)) (
lib.fileset.toList (lib.fileset.fileFilter (file: file.hasExt "nix") path)
);
in
flake-parts.lib.mkFlake { inherit inputs; } {
imports = importTree ./modules;
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
perSystem =
{
pkgs,
system,
lib,
...
}:
{
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ inputs.neovim-nightly.overlays.default ];
config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"claude-code"
"copilot-language-server"
"vscode"
"vscode-extension-ms-vsliveshare-vsliveshare"
];
};
devShells.pimsync = pkgs.mkShell {
packages = [
(pkgs.python3.withPackages (ps: with ps; [ vobject ]))
];
};
formatter = pkgs.nixfmt-tree.override {
runtimeInputs = [ pkgs.nufmt ];
settings.formatter.nufmt = {
command = "nufmt";
includes = [ "*.nu" ];
};
};
};
};
}