-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
99 lines (85 loc) · 2.33 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
description = "Nix and home-manager configurations for Softinio's macbook";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/nur";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nix-darwin,
home-manager,
nur,
nixpkgs,
...
}:
let
homeManagerConfFor =
config:
{ ... }:
{
nixpkgs.overlays = [ nur.overlay ];
imports = [ config ];
};
m3maxConfiguration =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ home-manager ];
fonts = {
packages = with pkgs; [ fira-code ];
};
services.nix-daemon.enable = true;
nix = {
nixPath = nixpkgs.lib.mkForce [ "nixpkgs=${nixpkgs}" ];
package = pkgs.nixVersions.stable;
settings = {
experimental-features = "nix-command flakes";
extra-platforms = [
"x86_64-darwin"
"aarch64-darwin"
];
trusted-users = [
"root"
"salar"
];
};
distributedBuilds = false;
};
programs.fish.enable = true;
system.configurationRevision = self.rev or self.dirtyRev or null;
system.stateVersion = 4;
nixpkgs.hostPlatform = "aarch64-darwin";
users = {
users.salar = {
home = /Users/salar;
};
};
};
in
{
darwinConfigurations.salarm3max = nix-darwin.lib.darwinSystem {
system = "aarc64-darwin";
modules = [
m3maxConfiguration
home-manager.darwinModules.home-manager
{
home-manager.useUserPackages = true;
home-manager.users.salar = homeManagerConfFor ./home.nix;
}
];
specialArgs = {
inherit nixpkgs;
};
};
darwinPackages = self.darwinConfigurations.salarm3max.pkgs;
defaultPackage.aarch64-darwin = self.darwinConfigurations.salarm3max.system;
};
}