-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
109 lines (104 loc) · 2.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
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
{
description = "d12bb's dotfiles";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
darwin = {
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# helix = {
# url = "github:helix-editor/helix";
# inputs.nixpkgs.follows = "nixpkgs";
# };
# TODO: how to Rust
# rust-overlay = {
# url = "github:oxalica/rust-overlay";
# inputs.nixpkgs.follows = "nixpkgs";
# inputs.flake-utils.follows = "utils";
# };
};
outputs = {
nixpkgs,
darwin,
# helix,
home-manager,
utils,
...
}: let
hmConfig = {
home-manager.backupFileExtension = "bak";
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
};
in
{
# Thpr: Home Macbook Pro
darwinConfigurations.thor = darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
./hosts/thor.nix
home-manager.darwinModules.home-manager
(hmConfig
// {
# home-manager.extraSpecialArgs = {helix = helix;};
home-manager.users.bene = import ./homes/thor.nix;
})
# ({
# config,
# lib,
# modulesPath,
# options,
# pkgs,
# specialArgs,
# }: {
# nixpkgs.overlays = [rust-overlay.overlays.default];
# environment.systemPackages = [pkgs.rust-bin.stable.latest.default];
# })
];
};
# TODO: fast-lane VM
# nixosConfigurations.heimdal = nixpkgs.lib.nixosSystem {
# system = "aarch64-linux";
# modules = [
# ./hosts/heimdal.nix
# home-manager.nixosModules.home-manager
# (hmConfig
# // {
# home-manager.users.bene = import ./homes/heimdal.nix;
# })
# ];
# };
# Loki: Home Raspberry Pi
homeConfigurations.loki = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.aarch64-linux;
modules = [./homes/loki.nix];
# ./hosts/loki.nix
# home-manager.nixosModules.home-manager
# (hmConfig
# // {
# home-manager.users.bene = import ./homes/loki.nix;
# })
# ];
};
}
// utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
alejandra
just
nil
nvd
];
};
formatter = pkgs.alejandra;
}
);
}