-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
64 lines (64 loc) · 1.74 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
{
description = "Ordenada is a Reproducible Development Environment for Nix";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
nur.url = "github:nix-community/NUR";
nix-rice.url = "github:bertof/nix-rice";
base16.url = "github:SenchoPens/base16.nix";
arkenfox-nixos.url = "github:dwarfmaster/arkenfox-nixos";
systems.url = "github:nix-systems/default";
};
outputs =
inputs@{
nixpkgs,
nur,
nix-rice,
base16,
systems,
...
}:
let
ordenada = nixpkgs.lib.callPackagesWith {
inherit (nixpkgs) lib;
inherit pkgs;
} ./lib { };
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ overlay ];
};
overlay = _final: prev: {
lib = prev.lib // {
inherit ordenada;
base16 = pkgs.callPackage base16.lib { };
};
};
eachSystem =
f: nixpkgs.lib.genAttrs (import systems) (system: f (import nixpkgs { inherit system; }));
in
rec {
lib = ordenada;
overlays.default = overlay;
packages = eachSystem (pkgs': rec {
docs = pkgs'.callPackage ./mkDocs.nix { inherit pkgs; };
default = docs;
});
nixosModules.ordenada =
{ pkgs, ... }:
{
imports = [ ./modules ];
config = {
nixpkgs.overlays = [
overlays.default
nur.overlay
nix-rice.overlays.default
(final: prev: { inherit inputs; })
];
};
};
};
}