This repository has been archived by the owner on Dec 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathflake.nix
75 lines (74 loc) · 2.59 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
{
inputs = {
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-22.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
nixos-hardware.url = "github:nixos/nixos-hardware";
nix-colors.url = "github:misterio77/nix-colors";
nix-monitored = {
url = "github:ners/nix-monitored";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.flake-utils.follows = "flake-utils";
inputs.flake-compat.follows = "flake-compat";
inputs.pre-commit-hooks.follows = "pre-commit-hooks";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
nix-darwin = {
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
vscodeInsiders = {
url =
"tarball+https://code.visualstudio.com/sha/download?build=insider&os=linux-x64";
flake = false;
};
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.nixpkgs-stable.follows = "nixpkgs-stable";
inputs.flake-utils.follows = "flake-utils";
inputs.flake-compat.follows = "flake-compat";
};
};
outputs = inputs:
let
lib = import ./profiles/lib { inherit inputs; };
overlayModules = lib.findModules ./overlays;
overlaySrcs = [ overlayModules.pkgs ]
++ (with builtins; attrValues (removeAttrs overlayModules [ "pkgs" ]));
mkOverlay = o:
import o {
inherit lib inputs;
overlays = overlaySrcs;
};
overlays = map mkOverlay overlaySrcs;
in
{
version = inputs.nixpkgs-stable.lib.trivial.release;
profiles = lib.findModules ./profiles;
roles = lib.findModules ./roles;
nixosConfigurations = import ./nixos { inherit inputs lib overlays; };
darwinConfigurations = import ./darwin { inherit inputs lib overlays; };
} // inputs.flake-utils.lib.eachDefaultSystem (system:
let pkgs = import inputs.nixpkgs-stable { inherit system overlays; };
in {
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs.unstable; [
nixpkgs-fmt
];
};
packages = pkgs // {
iso-image =
inputs.self.nixosConfigurations.iso-image.config.system.build.isoImage;
};
formatter = pkgs.unstable.nixpkgs-fmt;
});
}