-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
68 lines (61 loc) · 1.73 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
{
description = "refnode's Nix configurations";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nix-darwin.url = "github:lnl7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
pre-commit-hooks.url = "github:cachix/git-hooks.nix";
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs @ {
self,
nixpkgs,
nixpkgs-unstable,
nix-darwin,
home-manager,
pre-commit-hooks,
...
}: let
user = "refnode";
flake = self;
lib =
nixpkgs.lib
// nix-darwin.lib
// home-manager.lib
// import ./lib {inherit inputs;};
in {
inherit lib;
formatter = lib.refnode.pkgsForEachSystem (pkgs: pkgs.alejandra);
checks = lib.refnode.forEachSystem (
system: let
pkgs = lib.refnode.pkgsFor.${system};
in
import ./checks {inherit pre-commit-hooks system;}
);
devShells = lib.refnode.forEachSystem (
system: let
pkgs = lib.refnode.pkgsFor.${system};
checks = self.checks.${system};
in {
default = import ./shell.nix {inherit pkgs checks;};
}
);
# Build darwin flake using:
# $ darwin-rebuild build --flake .#defiant
darwinConfigurations = {
defiant = lib.darwinSystem {
system = "aarch64-darwin";
modules = [./hosts/defiant];
specialArgs = {
inherit flake inputs;
system = "aarch64-darwin";
pkgs = lib.refnode.pkgsFor.aarch64-darwin;
};
};
};
nixosConfigurations = {};
};
}