-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
78 lines (58 loc) · 2.72 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
{
description = "NixOS and Home Manager configuration for Milo's laptops";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.home-manager.follows = "home-manager";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:nixos/nixos-hardware";
# ——— Packages
ghostty.url = "github:ghostty-org/ghostty";
ghostty.inputs.nixpkgs-stable.follows = "nixpkgs";
git-leave.url = "github:mrnossiom/git-leave";
git-leave.inputs.nixpkgs.follows = "nixpkgs";
helix.url = "github:helix-editor/helix";
helix.inputs.nixpkgs.follows = "nixpkgs-unstable";
jujutsu.url = "github:jj-vcs/jj";
jujutsu.inputs.nixpkgs.follows = "nixpkgs-unstable";
radicle.url = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5";
radicle.inputs.nixpkgs.follows = "nixpkgs";
wakatime-ls.url = "github:mrnossiom/wakatime-ls";
wakatime-ls.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, ... }:
let
inherit (self) outputs;
inherit (flake-lib) forAllSystems;
flake-lib = import ./lib/flake (nixpkgs // { inherit self; });
forAllPkgs = func: forAllSystems (system: func pkgs.${system});
# This should be the only constructed nixpkgs instances in this flake
pkgs = forAllSystems (system: (import nixpkgs {
inherit system;
config.allowUnfreePredicate = import ./lib/unfree.nix { lib = nixpkgs.lib; };
overlays = [ outputs.overlays.all ];
}));
in
{
formatter = forAllPkgs (pkgs: pkgs.nixpkgs-fmt);
inherit flake-lib; # Nonstandard
lib = forAllPkgs (import ./lib);
templates = import ./templates;
apps = forAllPkgs (import ./apps { inherit forAllPkgs; });
devShells = forAllPkgs (import ./shells.nix);
overlays = import ./overlays (nixpkgs // { inherit self; });
packages = forAllPkgs (import ./pkgs);
homeManagerModules = import ./modules/home-manager;
nixosModules = import ./modules/nixos;
# `nixos`, `home-manager` and `nix-darwin` configs are generic over `pkgs` and placed in `configurations.nix`
# `legacyPackages` tree structure is not checked by `nix flake check` but picked up by all rebuild tools
legacyPackages = forAllPkgs (import ./configurations.nix flake-lib);
};
}