yep, more dotfiles
1{
2 description = "NixOS and Home Manager configuration for Milo's laptops";
3
4 inputs = {
5 nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
6 unixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
7
8 home-manager.url = "github:nix-community/home-manager/release-25.05";
9 home-manager.inputs.nixpkgs.follows = "nixpkgs";
10
11 stylix.url = "github:nix-community/stylix/release-25.05";
12 stylix.inputs.nixpkgs.follows = "nixpkgs";
13
14 ## Misc
15
16 nix-darwin.url = "github:LnL7/nix-darwin";
17 nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
18
19 agenix.url = "github:ryantm/agenix";
20 agenix.inputs.nixpkgs.follows = "nixpkgs";
21 agenix.inputs.home-manager.follows = "home-manager";
22
23 disko.url = "github:nix-community/disko";
24 disko.inputs.nixpkgs.follows = "nixpkgs";
25
26 nixos-hardware.url = "github:nixos/nixos-hardware";
27
28 lanzaboote.url = "github:nix-community/lanzaboote/v0.4.2";
29 lanzaboote.inputs.nixpkgs.follows = "unixpkgs";
30
31 srvos.url = "github:nix-community/srvos";
32 # srvos.inputs.nixpkgs.follows = "srvos/nixpkgs";
33 srvos.inputs.nixpkgs.follows = "nixpkgs";
34
35 ## Packages
36
37 git-leave.url = "github:mrnossiom/git-leave";
38 git-leave.inputs.nixpkgs.follows = "nixpkgs";
39
40 helix.url = "github:helix-editor/helix";
41 helix.inputs.nixpkgs.follows = "unixpkgs";
42
43 jujutsu.url = "github:jj-vcs/jj";
44 jujutsu.inputs.nixpkgs.follows = "unixpkgs";
45
46 tangled.url = "git+https://tangled.org/@tangled.org/core";
47 tangled.inputs.nixpkgs.follows = "unixpkgs";
48
49 wakatime-ls.url = "github:mrnossiom/wakatime-ls";
50 wakatime-ls.inputs.nixpkgs.follows = "nixpkgs";
51 };
52
53 outputs = { self, nixpkgs, ... }:
54 let
55 inherit (self) outputs;
56 inherit (flake-lib) forAllSystems;
57
58 flake-lib = import ./lib/flake (nixpkgs // { inherit self; });
59
60 forAllPkgs = func: forAllSystems (system: func pkgs.${system});
61
62 # This should be the only constructed nixpkgs instances in this flake
63 pkgs = forAllSystems (system: (import nixpkgs {
64 inherit system;
65 config.allowUnfreePredicate = import ./lib/unfree.nix { lib = nixpkgs.lib; };
66 overlays = [ outputs.overlays.all ];
67 }));
68 in
69 {
70 formatter = forAllPkgs (pkgs: pkgs.nixpkgs-fmt);
71
72 inherit flake-lib; # Nonstandard
73 lib = forAllPkgs (import ./lib);
74 templates = import ./templates;
75
76 apps = forAllPkgs (import ./apps { pkgs-per-system = pkgs; });
77 devShells = forAllPkgs (import ./shells.nix);
78 overlays = import ./overlays (nixpkgs // { inherit self; });
79 packages = forAllPkgs (import ./pkgs);
80
81 homeManagerModules = import ./modules/home-manager;
82 nixosModules = import ./modules/nixos;
83
84 # `nixos`, `home-manager` and `nix-darwin` configs are generic over `pkgs` and placed in `configurations.nix`
85 # `legacyPackages` tree structure is not checked by `nix flake check` but picked up by all rebuild tools
86 legacyPackages = forAllPkgs (import ./configurations.nix flake-lib);
87 };
88}