forked from mitchellh/nixos-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
45 lines (39 loc) · 1.43 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
{
description = "NixOS systems and tools by mitchellh";
inputs = {
# Pin our primary nixpkgs repository. This is the main nixpkgs repository
# we'll use for our configurations. Be very careful changing this because
# it'll impact your entire system.
nixpkgs.url = "github:nixos/nixpkgs/release-21.05";
home-manager = {
url = "github:nix-community/home-manager/release-21.05";
# We want home-manager to use the same set of nixpkgs as our system.
inputs.nixpkgs.follows = "nixpkgs";
};
# For our aarch64 VM, we use different versions since there are some
# changes that are required for aarch64 to build in reliably.
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager-unstable = {
url = "github:nix-community/home-manager/release-21.05";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
};
outputs = { self, nixpkgs, home-manager, nixpkgs-unstable, home-manager-unstable }:
let
mkVM = import ./lib/mkvm.nix;
in
{
nixosConfigurations.vm-aarch64 = mkVM "vm-aarch64" {
nixpkgs = nixpkgs-unstable;
home-manager = home-manager-unstable;
system = "aarch64-linux";
user = "kohlerm";
};
nixosConfigurations.vm-intel = mkVM "vm-intel" {
nixpkgs = nixpkgs-unstable;
home-manager = home-manager-unstable;
system = "x86_64-linux";
user = "kohlerm";
};
};
}