refactor(cache): move nix-fast-build-pkg to overlays
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
08e1645697
commit
3cb4315fab
4 changed files with 36 additions and 38 deletions
|
@ -1,35 +1,24 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
mainUser,
|
mainUser,
|
||||||
nix-eval-jobs,
|
|
||||||
nix-fast-build,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
# FIXME: move nix-fast-build-pkg to overlays, make #nixFastChecks an attrset of all, packages, devices and aptDevices. add binary cache at apartment
|
# FIXME: make #nixFastChecks an attrset of all, packages, devices and aptDevices
|
||||||
|
# add binary cache at apartment
|
||||||
|
inherit (builtins) attrValues;
|
||||||
inherit (config.sops) secrets;
|
inherit (config.sops) secrets;
|
||||||
|
|
||||||
nix-fast-build-pkg = nix-fast-build.packages.${pkgs.system}.nix-fast-build.override {
|
|
||||||
nix-eval-jobs =
|
|
||||||
nix-eval-jobs.packages.${pkgs.system}.default.override {
|
|
||||||
nix = config.nix.package;
|
|
||||||
}
|
|
||||||
// {
|
|
||||||
nix = config.nix.package;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nixFastBuild = pkgs.writeShellApplication {
|
nixFastBuild = pkgs.writeShellApplication {
|
||||||
name = "nixFastBuild";
|
name = "nixFastBuild";
|
||||||
|
|
||||||
runtimeInputs = builtins.attrValues {
|
runtimeInputs = attrValues {
|
||||||
inherit
|
inherit
|
||||||
(pkgs)
|
(pkgs)
|
||||||
gnugrep
|
gnugrep
|
||||||
|
nix-fast-build
|
||||||
nix-output-monitor
|
nix-output-monitor
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit nix-fast-build-pkg;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
|
@ -45,11 +34,10 @@
|
||||||
in {
|
in {
|
||||||
services.nix-serve = {
|
services.nix-serve = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nix-serve-ng;
|
|
||||||
secretKeyFile = secrets.binary-cache-key.path;
|
secretKeyFile = secrets.binary-cache-key.path;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [nix-fast-build-pkg nixFastBuild];
|
environment.systemPackages = [pkgs.nix-fast-build nixFastBuild];
|
||||||
|
|
||||||
# Populate cache
|
# Populate cache
|
||||||
systemd = {
|
systemd = {
|
||||||
|
@ -60,17 +48,16 @@ in {
|
||||||
Group = config.users.users.${mainUser}.group;
|
Group = config.users.users.${mainUser}.group;
|
||||||
};
|
};
|
||||||
|
|
||||||
path = builtins.attrValues {
|
path = attrValues {
|
||||||
inherit
|
inherit
|
||||||
(pkgs)
|
(pkgs)
|
||||||
bash
|
bash
|
||||||
git
|
git
|
||||||
|
nix-fast-build
|
||||||
openssh
|
openssh
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit (config.nix) package;
|
inherit (config.nix) package;
|
||||||
|
|
||||||
inherit nix-fast-build-pkg;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
script = ''
|
script = ''
|
||||||
|
|
|
@ -134,7 +134,7 @@
|
||||||
perSystem (pkgs:
|
perSystem (pkgs:
|
||||||
import ./packages {inherit inputs mkVersion pkgs;});
|
import ./packages {inherit inputs mkVersion pkgs;});
|
||||||
|
|
||||||
overlays = import ./overlays {};
|
overlays = import ./overlays {inherit self;};
|
||||||
|
|
||||||
apps =
|
apps =
|
||||||
perSystem (pkgs:
|
perSystem (pkgs:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{...}: {
|
{self, ...}: {
|
||||||
build-failures = import ./build-failures;
|
build-failures = import ./build-failures;
|
||||||
nix-version = import ./nix-version;
|
nix-version = import ./nix-version self;
|
||||||
xdg-desktop-portal-kde = import ./xdg-desktop-portal-kde;
|
xdg-desktop-portal-kde = import ./xdg-desktop-portal-kde;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,26 @@
|
||||||
{nix ? null}: (
|
self: {nix ? null}: final: prev: let
|
||||||
final: prev:
|
inherit (builtins) mapAttrs;
|
||||||
builtins.mapAttrs
|
inherit (self.inputs) nix-eval-jobs nix-fast-build;
|
||||||
(n: v:
|
|
||||||
if nix == null
|
|
||||||
then prev.${n}
|
|
||||||
else v)
|
|
||||||
{
|
|
||||||
inherit nix;
|
|
||||||
|
|
||||||
nix-serve-ng = prev.nix-serve-ng.override {
|
nullCheck = n: v:
|
||||||
inherit nix;
|
if nix == null
|
||||||
};
|
then prev.${n}
|
||||||
}
|
else v;
|
||||||
)
|
in
|
||||||
|
mapAttrs nullCheck {
|
||||||
|
inherit nix;
|
||||||
|
|
||||||
|
nix-serve = prev.nix-serve-ng.override {
|
||||||
|
inherit nix;
|
||||||
|
};
|
||||||
|
|
||||||
|
nix-fast-build = nix-fast-build.packages.${final.system}.nix-fast-build.override {
|
||||||
|
nix-eval-jobs =
|
||||||
|
nix-eval-jobs.packages.${final.system}.default.override {
|
||||||
|
inherit nix;
|
||||||
|
}
|
||||||
|
// {
|
||||||
|
inherit nix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue