-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
71 lines (65 loc) · 1.8 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
{
description = "Home Manager configuration of ryanpatterson-cross";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
minixvim.url = "github:rbpatt2019/minixvim";
pre-commit-hooks.url = "github:cachix/git-hooks.nix";
};
outputs =
{
nixpkgs,
home-manager,
pre-commit-hooks,
minixvim,
self,
...
}@inputs:
let
forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux" # Most other systems
"aarch64-linux" # Raspberry Pi 4
"aarch64-darwin" # Apple Silicon
];
in
{
checks = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
import ./checks { inherit inputs system pkgs; }
);
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
precommit = self.checks.${system}.pre-commit-check;
in
import ./shell.nix { inherit pkgs precommit; }
);
# Modules
# Overlays
# Packages
# Stand alone home-manager
homeConfigurations = {
# different user name on mac
"ryanpatterson-cross" =
let
pkgs = nixpkgs.legacyPackages."aarch64-darwin";
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home/ryanpatterson-cross.nix ];
extraSpecialArgs = {
editor = minixvim.packages."aarch64-darwin".default;
};
};
};
};
}