-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.nix
47 lines (38 loc) · 1.17 KB
/
release.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
{ nixpkgs ? <nixpkgs> }:
let
nixos = import nixpkgs { overlays = []; };
master = nixos;
inherit (builtins) attrValues removeAttrs;
inherit (nixos) lib;
inherit (lib) recursiveUpdate hydraJob;
utils = import ./lib/utils.nix { inherit lib; };
inherit (utils) pathsToImportedAttrs recImport;
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = attrValues (pathsToImportedAttrs [ ./overlays/pkgs.nix ]);
config = {
allowUnfree = true;
permittedInsecurePackages = [ "openssl-1.1.1w" ];
};
};
config = hostName: (hydraJob
(import (nixpkgs + "/nixos/lib/eval-config.nix") {
inherit system;
modules =
let
core = import "${toString ./.}/profiles/core";
global = {
networking.hostName = hostName;
nixpkgs = { pkgs = pkgs; };
};
local = import "${toString ./.}/hosts/${hostName}.nix";
flakeModules = attrValues (pathsToImportedAttrs (import ./modules/list.nix));
in flakeModules ++ [ core global local ];
}).config.system.build.toplevel);
in rec {
machines = recImport {
dir = ./hosts;
_import = config;
};
}