-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
62 lines (57 loc) · 1.67 KB
/
flake.nix
File metadata and controls
62 lines (57 loc) · 1.67 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
{
description = "jojo's dotfiles";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-25.11-darwin";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
nix-darwin = {
url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
nixpkgs-unstable,
nix-darwin,
home-manager,
...
}@inputs:
let
# nix-darwin configuration for macOS
mkMac =
hostName:
nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
specialArgs = {
inherit inputs self hostName;
unstable = import nixpkgs-unstable {
system = "aarch64-darwin";
config.allowUnfree = true;
};
};
modules = [
./nix/darwin-configuration.nix
home-manager.darwinModules.home-manager
];
};
in
{
# nix-darwin configuration for macOS
darwinConfigurations."jojo-m1" = mkMac "jojo-m1";
darwinConfigurations."jojo-m2" = mkMac "jojo-m2";
darwinConfigurations."jojo-m4-mini" = mkMac "jojo-m4-mini";
# Home-manager module that can be imported by other flakes
homeManagerModules = {
default = self.homeManagerModules.shared;
shared = import ./nix/home-shared.nix;
vim = import ./vim/module.nix;
};
# For convenience, also expose as homeModule (singular)
homeModule = self.homeManagerModules.shared;
};
}