-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathflake.nix
44 lines (38 loc) · 1.32 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
{
description = "Home Manager configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, nixpkgs-stable, home-manager, nix-index-database, ... }:
let
withArch = arch:
home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${arch};
modules = [ ./home.nix nix-index-database.hmModules.nix-index ];
extraSpecialArgs = {
pkgs-stable = nixpkgs-stable.legacyPackages.${arch};
};
};
in {
defaultPackage = {
x86_64-darwin = home-manager.defaultPackage.x86_64-darwin;
aarch64-darwin = home-manager.defaultPackage.aarch64-darwin;
aarch64-linux = home-manager.defaultPackage.aarch64-linux;
};
homeConfigurations = {
"arkham@metal" = withArch "aarch64-darwin";
"arkham@mine" = withArch "x86_64-darwin";
"arkham@iMuck" = withArch "x86_64-darwin";
"arkham@pi" = withArch "aarch64-linux";
};
};
}