-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
136 lines (113 loc) · 3.77 KB
/
Copy pathflake.nix
File metadata and controls
136 lines (113 loc) · 3.77 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
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
125
126
127
128
129
130
131
132
133
134
135
136
{
description = "booxter Nix* flake configs";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-darwin.url = "github:NixOS/nixpkgs/nixpkgs-26.05-darwin";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nix-darwin.url = "github:nix-darwin/nix-darwin/nix-darwin-26.05";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs-darwin";
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
homebrew-core = {
url = "github:homebrew/homebrew-core";
flake = false;
};
homebrew-cask = {
url = "github:homebrew/homebrew-cask";
flake = false;
};
cocoa-way-homebrew-tap = {
url = "github:J-x-Z/homebrew-tap";
flake = false;
};
home-manager.url = "github:nix-community/home-manager/release-26.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
stylix.url = "github:nix-community/stylix/release-26.05";
stylix.inputs.nixpkgs.follows = "nixpkgs";
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
nixvim.url = "github:nix-community/nixvim/nixos-26.05";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
nur.url = "github:nix-community/NUR";
nur.inputs.nixpkgs.follows = "nixpkgs";
proxmox-nixos.url = "github:booxter/proxmox-nixos/my-fork";
disko.url = "github:nix-community/disko/latest";
# TODO: switch to official when diff is contributed upstream
jellarr.url = "github:booxter/jellarr/my-fork-plus-fix-plugin-404";
#jellarr.url = "github:venkyr77/jellarr/v0.1.0";
jellarr.inputs.nixpkgs.follows = "nixpkgs";
vpnconfinement.url = "github:Maroka-chan/VPN-Confinement";
determinate-nix-installer = {
url = "github:DeterminateSystems/nix-installer";
flake = false;
};
lolek = {
url = "github:dziaineka/lolek";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{ self, ... }:
let
inherit (self) outputs;
hostInventory = import ./inv { lib = inputs.nixpkgs.lib; };
hostSpecialArgs =
spec:
let
hostPlatform = inputs.nixpkgs.lib.systems.elaborate spec.platform;
in
{
inherit
inputs
outputs
hostInventory
;
inherit (hostPlatform) isDarwin isLinux;
hostSpec = spec;
};
mkNixos =
spec:
inputs.nixpkgs.lib.nixosSystem {
specialArgs = hostSpecialArgs spec;
modules = [ ./nixos ];
};
mkDarwin =
spec:
inputs.nix-darwin.lib.darwinSystem {
specialArgs = hostSpecialArgs spec;
modules = [ ./darwin ];
};
perSystem =
inputs.nixpkgs.lib.genAttrs
[
"x86_64-linux"
"aarch64-darwin"
]
(
system:
import ./per-system.nix {
inherit
inputs
outputs
system
;
}
);
selectPerSystem = outputName: builtins.mapAttrs (_: value: value.${outputName}) perSystem;
in
{
darwinConfigurations = builtins.mapAttrs (_: mkDarwin) hostInventory.darwinHosts;
nixosConfigurations = builtins.mapAttrs (_: mkNixos) hostInventory.nixosHosts;
apps = selectPerSystem "apps";
checks = selectPerSystem "checks";
formatter = selectPerSystem "formatter";
lib.ciTargetInventory = import ./ci {
inherit hostInventory;
lib = inputs.nixpkgs.lib;
};
overlays = import ./overlays { inherit inputs; };
packages = selectPerSystem "packages";
};
}