This repository has been archived by the owner on Jun 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
57 lines (53 loc) · 1.87 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
{
description = "Personal configurations";
nixConfig.extra-experimental-features = "nix-command flakes";
inputs = {
stable.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-urils.url = "github:numtide/flake-utils";
treefmt-nix.url = "github:numtide/treefmt-nix";
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
devenv.url = "github:cachix/devenv/latest";
};
outputs =
{ self
, nixpkgs
, home-manager
, ...
} @ inputs:
let
inherit (self) outputs;
systems = [
# "x86_64-linux"
# "x86_64-darwin"
"aarch64-darwin"
];
# Define a function which generates an attribute by calling a provided function,
# with each system in the systems list.
forAllSystems = nixpkgs.lib.genAttrs systems;
in
{
# Build our custom packages
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
# Format nix files, via `nix fmt`.
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
# Overlay additionnal packages and modifications.
overlays = import ./overlays { inherit inputs; };
# Standalone home-manager configurations.
# Available via `home-manager --fake .#matousdzivjak`
homeConfigurations."matousdzivjak" = home-manager.lib.homeManagerConfiguration {
# home-manager requires 'pkgs' instance
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
# Without this, our overlays won't be available.
extraSpecialArgs = { inherit inputs outputs; };
# We specify the home-manager configuration module here.
modules = [
./users/matousdzivjak.nix
];
};
};
}