-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
100 lines (95 loc) · 3.16 KB
/
Copy pathflake.nix
File metadata and controls
100 lines (95 loc) · 3.16 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
{
description = "k-adachi-01 macOS development environment";
# Bootstrap Numtide's cache before the first switch persists the same
# settings through nix/nix.custom.conf in nix/darwin.nix. Only effective
# for trusted users (root); after activation, nix.custom.conf covers all users.
nixConfig = {
extra-substituters = ["https://cache.numtide.com"];
extra-trusted-substituters = ["https://cache.numtide.com"];
extra-trusted-public-keys = [
"niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
];
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
nixvim.url = "github:nix-community/nixvim";
llm-agents-nix.url = "github:numtide/llm-agents.nix";
agent-skills-nix.url = "github:Kyure-A/agent-skills-nix";
# Local checkout of k-adachi-01/agent-skills (private). Flake path input
# copies ~/agent-skills into the store at eval time (module-level `path`
# cannot be read under the default eval sandbox). After editing skills,
# refresh the pinned narHash before switch:
# nix flake update agent-skills --flake ~/.config/nix-darwin
agent-skills = {
url = "path:/Users/adachi/agent-skills";
flake = false;
};
};
outputs = inputs @ {
self,
nix-darwin,
home-manager,
nix-homebrew,
nixpkgs,
...
}: let
username = "adachi";
darwinSystem = "aarch64-darwin";
linuxSystem = "x86_64-linux";
linuxPkgs = import nixpkgs {
system = linuxSystem;
config.allowUnfree = true;
};
in {
darwinConfigurations.macbook = nix-darwin.lib.darwinSystem {
system = darwinSystem;
specialArgs = {
inherit inputs self username;
system = darwinSystem;
dotfilesRepo = "/Users/${username}/.config/nix-darwin";
enableAgentSkills = true;
};
modules = [
./nix/darwin.nix
nix-homebrew.darwinModules.nix-homebrew
home-manager.darwinModules.home-manager
{
nix-homebrew = {
enable = true;
enableRosetta = true;
user = username;
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs username;
system = darwinSystem;
dotfilesRepo = "/Users/${username}/.config/nix-darwin";
enableAgentSkills = true;
};
users.${username} = import ./nix/home.nix;
};
}
];
};
homeConfigurations."adachi@nixos" = home-manager.lib.homeManagerConfiguration {
pkgs = linuxPkgs;
extraSpecialArgs = {
inherit inputs username;
system = linuxSystem;
dotfilesRepo = "/home/${username}/dotfiles";
enableAgentSkills = false;
enableLlmAgents = true;
};
modules = [
./nix/home.nix
];
};
};
}