-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
58 lines (57 loc) · 1.89 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
home-manager.url = "github:nix-community/home-manager";
nix-darwin.url = "github:LnL7/nix-darwin";
};
outputs = inputs@{ self, nixpkgs, flake-parts, home-manager, nix-darwin, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "aarch64-darwin" "x86_64-darwin" ];
perSystem = { pkgs, system, ... }: {
formatter = pkgs.nixpkgs-fmt;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ nixpkgs-fmt just ];
};
packages = {
default = pkgs.writeShellApplication {
name = "activate";
runtimeInputs = [ inputs.home-manager.packages.${system}.default ];
text = ''
${pkgs.lib.getExe inputs.home-manager.packages.${system}.default} switch --flake .#lukasz@${system}
'';
};
};
};
flake = {
homeConfigurations."lukasz@aarch64-darwin" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
extraSpecialArgs = { inherit inputs; };
modules = [
./home
{
home = {
username = "lukasz";
homeDirectory = "/Users/lukasz";
stateVersion = "24.05";
};
}
];
};
darwinConfigurations."lukasz-macbook-pro-13" = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
{
security.pam.enableSudoTouchIdAuth = true;
system.stateVersion = 4;
}
];
};
};
};
}