-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
90 lines (84 loc) · 2.39 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
{
description = "takeokunn's nix configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs-stable";
};
org-babel.url = "github:emacs-twist/org-babel";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
xremap = {
url = "github:xremap/nix-flake";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-on-droid = {
url = "github:nix-community/nix-on-droid";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts.url = "github:hercules-ci/flake-parts";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
flake-parts,
treefmt-nix,
...
}@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-linux"
];
imports = [ treefmt-nix.flakeModule ];
flake = {
darwinConfigurations = {
OPL2212-2 = import ./hosts/OPL2212-2 { inherit inputs; };
};
nixosConfigurations = {
X13Gen2 = import ./hosts/X13Gen2 { inherit inputs; };
};
nixOnDroidConfigurations = {
OPPO-A79 = import ./hosts/OPPO-A79 { inherit inputs; };
};
};
perSystem =
{ ... }:
{
treefmt = {
projectRootFile = "flake.nix";
programs = {
actionlint.enable = true;
nixfmt.enable = true;
taplo.enable = true;
jsonfmt.enable = true;
yamlfmt.enable = true;
fish_indent.enable = true;
stylua.enable = true;
shfmt.enable = true;
prettier.enable = true;
};
};
};
};
}