blob: 277c525dc86581877e5709572ecabe62b32fe34f (
plain) (
blame)
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
|
{
description = "Jon's NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database.url = "github:Mic92/nix-index-database";
};
outputs = inputs @ {
self,
nixpkgs,
nix-index-database,
...
}: let
system = "x86_64-linux";
lib = nixpkgs.lib.extend (
final: prev: {
custom = import ./lib.nix nixpkgs.lib;
}
);
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ self.overlays.default ];
};
in {
overlays.default = import ./overlay.nix {inherit inputs system;};
nixosModules =
{ nixosConfig = import ./.;}
// lib.custom.mapModulesRec ./modules import;
nixosConfigurations = let
mkHost = system: path:
lib.nixosSystem {
inherit system;
specialArgs = {inherit lib inputs system;};
modules = [
nix-index-database.nixosModules.nix-index
{
nixpkgs.pkgs = pkgs;
modules.device.name = lib.mkDefault (builtins.baseNameOf path);
}
./.
(import path)
];
};
in
lib.custom.mapModules ./hosts (mkHost system);
};
}
|