feat(checks): make #nixFastChecks an attrset
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
3cb4315fab
commit
1fd44269a2
5 changed files with 29 additions and 11 deletions
|
@ -6,5 +6,5 @@
|
|||
in
|
||||
mapAttrs'
|
||||
(name: app:
|
||||
nameValuePair "app-${name}" app)
|
||||
nameValuePair "app_${name}" app)
|
||||
self.appsPackages.${pkgs.system}
|
||||
|
|
|
@ -5,5 +5,13 @@
|
|||
apps = import ./apps {inherit pkgs self;};
|
||||
devices = import ./devices {inherit pkgs self;};
|
||||
packages = import ./packages {inherit pkgs self;};
|
||||
in
|
||||
apps // devices // packages
|
||||
in {
|
||||
# Allow homie to serve a binary cache for the devices away from servivi
|
||||
aptDevices = import ./devices {
|
||||
onlyApt = true;
|
||||
inherit pkgs self;
|
||||
};
|
||||
|
||||
all = apps // devices // packages;
|
||||
inherit apps packages devices;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,18 @@
|
|||
{
|
||||
pkgs,
|
||||
self,
|
||||
onlyApt ? false,
|
||||
}: let
|
||||
inherit (pkgs.lib) filterAttrs mapAttrs' nameValuePair;
|
||||
inherit (pkgs.lib) elem filterAttrs mapAttrs' nameValuePair;
|
||||
|
||||
devices = filterAttrs (n: config: let
|
||||
isSameSystem = config.pkgs.system == pkgs.system;
|
||||
in
|
||||
if onlyApt
|
||||
then isSameSystem && elem n ["bbsteamie" "binto" "homie" "wim"]
|
||||
else isSameSystem)
|
||||
self.nixosConfigurations;
|
||||
in
|
||||
mapAttrs'
|
||||
(name: config: nameValuePair "nixos-${name}" config.config.system.build.toplevel)
|
||||
((filterAttrs (_: config: config.pkgs.system == pkgs.system)) self.nixosConfigurations)
|
||||
(name: config: nameValuePair "device_${name}" config.config.system.build.toplevel)
|
||||
devices
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
pkgs,
|
||||
self,
|
||||
}: let
|
||||
inherit (pkgs.lib) elem filterAttrs hasAttr;
|
||||
inherit (pkgs.lib) elem filterAttrs hasAttr mapAttrs' nameValuePair;
|
||||
|
||||
packages =
|
||||
filterAttrs (
|
||||
|
@ -12,4 +12,6 @@
|
|||
)
|
||||
self.packages.${pkgs.system};
|
||||
in
|
||||
mapAttrs'
|
||||
(name: pkg: nameValuePair "pkg_${name}" pkg)
|
||||
packages
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
# FIXME: make #nixFastChecks an attrset of all, packages, devices and aptDevices
|
||||
# add binary cache at apartment
|
||||
# FIXME: add binary cache at apartment
|
||||
inherit (builtins) attrValues;
|
||||
inherit (config.sops) secrets;
|
||||
|
||||
|
@ -28,7 +27,7 @@
|
|||
nom build --no-link \
|
||||
..#nixosConfigurations.homie.config.services.home-assistant.package
|
||||
|
||||
nix-fast-build -f ..#nixFastChecks "$@"
|
||||
nix-fast-build -f ..#nixFastChecks.${pkgs.system}.all "$@"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
|
@ -70,7 +69,7 @@ in {
|
|||
git clone https://git.nelim.org/matt1432/nixos-configs.git nix-clone
|
||||
cd nix-clone
|
||||
|
||||
nix-fast-build -f .#nixFastChecks
|
||||
nix-fast-build -f .#nixFastChecks.${pkgs.system}.all
|
||||
|
||||
cd ..
|
||||
rm -r nix-clone
|
||||
|
|
Loading…
Reference in a new issue