-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
63 lines (56 loc) · 1.83 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
{
description = "@GNRSN Nix configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
sqld_pkgs = {
url = "https://github.com/NixOS/nixpkgs/archive/4989a246d7a390a859852baddb1013f825435cee.tar.gz";
};
# Flake that downloads fonts from apples website + patches with nerdfonts. These are not installed system wide by default
# https://github.com/Lyndeno/apple-fonts.nix
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
};
outputs =
inputs@{
self,
nix-darwin,
nixpkgs,
home-manager,
sqld_pkgs,
apple-fonts,
}:
let
system = "aarch64-darwin";
in
{
# Since this isn't the same as our hostname we need to specify the config name during switch:
# darwin-rebuild switch --flake .#GNRSN/MacBook
# Bootstrap: nix run [darwin]/main -- switch --flake .#GNRSN/MacBook
darwinConfigurations."GNRSN/MacBook" = nix-darwin.lib.darwinSystem {
inherit system;
modules = [
(import ./modules/darwin.nix {
inherit system self apple-fonts;
})
];
};
# Expose the package set, including overlays, for convenience.
darwinPackages = self.darwinConfigurations."GNRSN/MacBook".pkgs;
# Bootstrap: nix run home-manager/master -- switch --flake .#GNRSN
homeConfigurations."GNRSN" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
modules = [
(import ./modules/home.nix {
sqld_pkgs = sqld_pkgs.legacyPackages.${system};
})
];
};
};
}