-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
95 lines (87 loc) · 2.49 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
{
description = "Nix Schmix";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
grub-theme = {
url = "github:catppuccin/grub";
flake = false;
};
hyprland-git = {
url = "github:hyprwm/hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
catppuccin.url = "github:catppuccin/nix";
neonix = {
url = "github:rgroemmer/neonix";
inputs.nixpkgs.follows = "nixpkgs";
};
krewfile = {
url = "github:brumhard/krewfile";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
self,
nixpkgs,
home-manager,
pre-commit-hooks,
...
}: let
inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib;
systems = ["aarch64-darwin" "x86_64-linux"];
pkgsFor = lib.genAttrs systems (system: import nixpkgs {inherit system;});
forAllSystems = f: lib.genAttrs systems (system: f pkgsFor.${system});
in {
inherit lib;
formatter = forAllSystems (pkgs: pkgs.alejandra);
devShells = forAllSystems (pkgs: import ./shell.nix {inherit pkgs pre-commit-hooks;});
nixosConfigurations = {
# Main workstation
zion = lib.nixosSystem {
modules = [./hosts/zion];
specialArgs = {inherit inputs outputs;};
};
# K3S home-lab
kubex = lib.nixosSystem {
modules = [./hosts/kubex];
specialArgs = {inherit inputs outputs;};
};
# ISO multi-tool
vinox = lib.nixosSystem {
modules = [./hosts/vinox];
specialArgs = {inherit inputs outputs;};
};
};
homeConfigurations = {
# Main workstation
"rap@zion" = lib.homeManagerConfiguration {
modules = [./home-manager/zion.nix];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
};
# Apple macbook work-device
"groemmer@intoshi" = lib.homeManagerConfiguration {
modules = [./home-manager/intoshi.nix];
pkgs = pkgsFor.aarch64-darwin;
extraSpecialArgs = {inherit self inputs outputs;};
};
};
};
}