-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
49 lines (43 loc) · 1.44 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
{
description = "GDWR's Nix Configs";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ self, nixpkgs, home-manager, ... }:
let
forAllSystems = function:
nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ]
(system: function nixpkgs.legacyPackages.${system});
in {
homeConfigurations = {
gdwr = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # This should be inherited from the caller machine?
extraSpecialArgs = { inherit inputs; };
modules = [
./homes/gdwr
];
};
};
nixosConfigurations = {
desktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [ ./hosts/desktop ];
};
laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [ ./hosts/laptop ];
};
};
packages = forAllSystems (pkgs: {
krisp-patch = pkgs.callPackage ./packages/krisp-patch { inherit pkgs; };
hauler = pkgs.callPackage ./packages/hauler { inherit pkgs; system = pkgs.system; };
});
formatter = forAllSystems (pkgs: pkgs.nixfmt);
};
}