-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
71 lines (63 loc) · 2.12 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
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware";
impermanence.url = "github:nix-community/impermanence";
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
microvm = {
url = "github:josqu4red/microvm.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, ... }@inputs:
let
lib = import ./lib { inherit inputs; };
inherit (import ./secrets/build/facts.nix {}) facts;
inherit (lib) buildHomeConfigs buildNixosConfigs expandFacts filterSystem forAllSystems;
hosts = expandFacts facts;
local-pkgs = final: _prev: import ./pkgs { pkgs = final; };
legacyPackages = forAllSystems (system:
import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ local-pkgs ];
}
);
in {
inherit facts legacyPackages lib;
nixosConfigurations = buildNixosConfigs (filterSystem "linux" hosts);
nixosModules = import ./modules/nixos;
nixosProfiles = import ./modules/profiles;
homeConfigurations = buildHomeConfigs hosts;
homeModules = import ./modules/home-manager;
devShells = forAllSystems (system: {
default = import ./shell.nix { pkgs = legacyPackages.${system};
sops-import-keys-hook = inputs.sops-nix.packages.${system}.sops-import-keys-hook; };
});
packages = forAllSystems (system: let
pkgs = legacyPackages.${system};
in {
nixlive = self.nixosConfigurations.nixlive.config.system.build.isoImage;
doc = pkgs.callPackage ./pkgs/doc.nix {};
});
};
}