-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
91 lines (82 loc) · 2.73 KB
/
flake.nix
File metadata and controls
91 lines (82 loc) · 2.73 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
{
description = "zupo's multi-system configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# Darwin support
nix-darwin.url = "github:LnL7/nix-darwin/nix-darwin-25.11";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
# Home Manager
home-manager.url = "github:nix-community/home-manager/release-25.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Shared Claude Code configuration for Niteo
niteo-claude.url = "github:teamniteo/claude";
};
outputs =
{
self,
nixpkgs,
nixpkgs-unstable,
nix-darwin,
home-manager,
niteo-claude,
}:
let
# Common modules that can be imported by any system
commonModules = {
ai = import ./common/ai.nix;
gitconfig = import ./common/gitconfig.nix;
tools = import ./common/tools.nix;
direnv = import ./common/direnv.nix;
vim = import ./common/vim.nix;
zsh = import ./common/zsh.nix;
files = import ./common/files.nix;
};
# Helper function to create pkgsUnstable for any system
mkPkgsUnstable =
system:
import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
in
{
# macOS configuration
darwinConfigurations."zbook" = nix-darwin.lib.darwinSystem {
modules = [
./darwin/zbook.nix
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.zupo = import ./darwin/home.nix;
home-manager.extraSpecialArgs = {
pkgsUnstable = mkPkgsUnstable "aarch64-darwin";
inherit commonModules niteo-claude;
};
}
];
};
# NixOS VM configuration for UTM
nixosConfigurations."utm" = nixpkgs.lib.nixosSystem {
system = "aarch64-linux"; # or "x86_64-linux" depending on your VM
modules = [
./nixos/utm/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.zupo = import ./nixos/utm/home.nix;
home-manager.extraSpecialArgs = {
pkgsUnstable = mkPkgsUnstable "aarch64-linux";
inherit commonModules niteo-claude;
};
}
];
};
# Export common modules for use by other flakes (like your remote server)
lib = commonModules;
};
}