-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
105 lines (93 loc) · 2.46 KB
/
flake.nix
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
{
description = "NixOS systems & configuration";
inputs = {
# consider switching to github:numtide/nixpkgs-unfree?ref=nixos-unstable
# nixpkgs.url = "github:nixos/nixpkgs?rev=9be3e110508ee6ad12d6b4935a9df4a82c29c4f2";
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/0.1";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-parts.url = "github:hercules-ci/flake-parts";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
ghostty.url = "github:ghostty-org/ghostty";
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
helix.url = "github:helix-editor/helix";
};
outputs =
inputs@{
chaotic,
nixpkgs,
ghostty,
flake-utils,
determinate,
flake-parts,
home-manager,
...
}:
let
user = "o";
overlays = [ ];
mkNixos = import ./nixos.nix;
mkDarwin = import ./darwin.nix;
in
# Custom packages and modifications, exported as overlays
{
overlays = import ./overlays {
inherit inputs nixpkgs;
};
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#vm-orb'
nixosConfigurations =
let
system = "aarch64-linux";
in
{
# orbstack machine
vm-orb = mkNixos "vm-orb" {
inherit
user
inputs
system
nixpkgs
ghostty
overlays
determinate
home-manager
;
};
};
# darwinConfigurations =
# let
# system = "aarch64-darwin";
# in
# {
# vm-osx = mkDarwin "vm-osx" {
# inherit
# user
# inputs
# system
# nixpkgs
# ghostty
# overlays
# determinate
# home-manager
# ;
# };
# };
}
// (flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit
system
;
};
in
{
devShells = import ./shell.nix { inherit pkgs; };
}
));
}