-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathflake.nix
More file actions
61 lines (54 loc) · 1.46 KB
/
flake.nix
File metadata and controls
61 lines (54 loc) · 1.46 KB
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
{
description = "MartinLwx nix-darwin system flake";
# The dependencies of this flake.nix.
# Syntax: github:owner/name/reference
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin = {
url = "github:nix-darwin/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
# A Nix function whose parameters come from inputs.
outputs =
inputs@{
self,
nixpkgs,
nix-darwin,
home-manager,
...
}:
let
# HINT: import ./lib/mksystem.nix returns a function
mkSystem = import ./lib/mksystem.nix {
inherit nixpkgs inputs;
};
in
{
nixosConfigurations.wsl = mkSystem "wsl" {
system = "x86_64-linux";
user = "martinlwx";
wsl = true;
};
# TIP: You can refer to the return value of each input here.
# e.g., nix-darwin.lib.darwinSystem
# TIP: Build darwin flake using: $ sudo darwin-rebuild build --flake .#mba
darwinConfigurations."mba" = mkSystem "mba" {
system = "aarch64-darwin";
user = "martinlwx";
darwin = true;
};
};
}