-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
124 lines (110 loc) · 3.3 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
{
description = "Zoey's personal config, aka dotfiles";
inputs = {
nixpkgs.url = "flake:nixpkgs/nixos-24.05";
nixpkgs-22.url = "flake:nixpkgs/nixos-22.05";
unstable.url = "flake:nixpkgs/nixos-unstable";
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "unstable";
};
# My custom NeoVim config
# 26/09/2024 - using helix/zed
# lvim.url = "github:zoedsoupe/lvim";
# mnvim.url = "github:zoedsoupe/mnvim";
# need to solve this about fcitx-engines
home-manager.url = "github:nix-community/home-manager?ref=release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Helix build from main
helix.url = "github:helix-editor/helix?ref=HEAD";
presenterm.url = "github:mfontanini/presenterm?ref=HEAD";
};
outputs = {
nixpkgs,
home-manager,
darwin,
lix-module,
...
} @ inputs: let
inherit (nixpkgs.lib) nixosSystem;
inherit (darwin.lib) darwinSystem;
in {
darwinConfigurations = let
pkgs = import nixpkgs {
system = "aarch64-darwin";
overlays = with inputs; [
rust-overlay.overlays.default
helix.overlays.default
];
config.allowUnfree = true;
};
unstable = import inputs.unstable {
system = "aarch64-darwin";
overlays = [inputs.helix.overlays.default];
config.allowUnfree = true;
};
pkgs-22 = import inputs.nixpkgs-22 {
system = "aarch64-darwin";
overlays = [inputs.helix.overlays.default];
config.allowUnfree = true;
};
in {
zoedsoupe-mac = darwinSystem rec {
inherit pkgs;
modules = let
zoedsoupe.custom-config = import ./hosts/mac/custom.nix {
inherit pkgs unstable;
};
in [
lix-module.nixosModules.default
./hosts/mac/configuration.nix
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.sharedModules = [./modules/users];
home-manager.users = let
args = host: {
inherit pkgs-22 unstable;
inherit (inputs) next-ls helix presenterm;
inherit (host) custom-config;
};
in {
zoedsoupe = {
_module.args = args zoedsoupe;
imports = [./hosts/mac/home.nix];
};
};
}
];
};
};
installMedia = {
minimal = let
system = "x86_64-linux";
in
nixosSystem {
inherit system;
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
config.allowBroken = true;
};
modules = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
./modules/iso/core.nix
./modules/iso/user.nix
./modules/iso/desktop.nix
];
};
};
};
}