This repository has been archived by the owner on Nov 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
flake.nix
84 lines (80 loc) · 3.01 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
{
description = "Harry Ying's NixOS configuration";
inputs = {
nixos.url = "github:NixOS/nixpkgs/nixos-unstable";
home = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixos";
};
# We may have multiple flakes using std, but we only may use one version of std. So we declare it here and let others which depend on it follow.
std.url = "github:icebox-nix/std";
#url = "/home/ash/Documents/git/netkit.nix";
netkit.url = "github:icebox-nix/netkit.nix";
dcompass.url = "github:LEXUGE/dcompass";
nixos-cn.url = "github:nixos-cn/flakes";
#ash-emacs.url = "/home/ash/Documents/git/emacs.d";
ash-emacs.url = "github:LEXUGE/emacs.d";
iceberg.url = "github:icebox-nix/iceberg";
# nix-dram.url = "github:dramforever/nix-dram";
};
outputs = { self, nixos, home, std, netkit, ash-emacs, iceberg, nixos-cn
, dcompass, ... }@inputs: {
x1c7-toplevel =
self.nixosConfigurations.x1c7.config.system.build.toplevel;
niximg = self.nixosConfigurations.niximg.config.system.build.isoImage;
nixosModules = {
ash-profile = (import ./src/modules/ash-profile);
x-os = (import ./src/modules/x-os);
};
nixosConfigurations = {
x1c7 = nixos.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{
x-os.publicKeys = [
dcompass.publicKey
netkit.publicKey
"dram.cachix.org-1:baoy1SXpwYdKbqdTbfKGTKauDDeDlHhUpC+QuuILEMY="
];
nixpkgs.overlays = [
ash-emacs.overlay
iceberg.overlay
nixos-cn.overlay
dcompass.overlay
# nix-dram.overlay
];
}
./configuration.nix
./src/devices/x1c7
std.nixosModule
self.nixosModules.x-os
self.nixosModules.ash-profile
home.nixosModules.home-manager
netkit.nixosModule
iceberg.nixosModules.wolfram-jupyter
# FIXME: Currently, nixos-generate-config by defualt writes out modulePath which is unsupported by flake.
# FIXME: This means on installation, we need to MANUALLY edit the generated hardware-configuration.nix
# COMMENT: Seems like it is causing no problem.
nixos.nixosModules.notDetected
];
};
niximg = nixos.lib.nixosSystem {
system = "x86_64-linux";
modules = [
"${nixos}/nixos/modules/installer/cd-dvd/installation-cd-base.nix"
{
nixpkgs.overlays =
[ ash-emacs.overlay dcompass.overlay ]; # nix-dram.overlay
x-os.publicKeys = [ dcompass.publicKey netkit.publicKey ];
}
./niximg.nix
std.nixosModule
self.nixosModules.x-os
self.nixosModules.ash-profile
home.nixosModules.home-manager
netkit.nixosModule
];
};
};
};
}