parent
1ce40f2c1a
commit
6ca0d7248b
329 changed files with 178 additions and 139 deletions
nixFastChecks
10
nixFastChecks/apps/default.nix
Normal file
10
nixFastChecks/apps/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
pkgs,
|
||||
self,
|
||||
}: let
|
||||
inherit (pkgs.lib) mapAttrs' nameValuePair;
|
||||
in
|
||||
mapAttrs'
|
||||
(name: app:
|
||||
nameValuePair "app_${name}" app)
|
||||
self.appsPackages.${pkgs.system}
|
26
nixFastChecks/default.nix
Normal file
26
nixFastChecks/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Inspired by :
|
||||
# https://github.com/Mic92/dotfiles/blob/c2f538934d67417941f83d8bb65b8263c43d32ca/flake.nix#L168
|
||||
{
|
||||
perSystem,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (self.lib.attrs) recursiveUpdateList;
|
||||
|
||||
aptDevices = perSystem (pkgs:
|
||||
import ./devices {
|
||||
onlyApt = true;
|
||||
inherit pkgs self;
|
||||
});
|
||||
|
||||
apps = perSystem (pkgs: import ./apps {inherit pkgs self;});
|
||||
devices = perSystem (pkgs: import ./devices {inherit pkgs self;});
|
||||
devShells = perSystem (pkgs: import ./devShells {inherit pkgs self;});
|
||||
packages = perSystem (pkgs: import ./packages {inherit pkgs self;});
|
||||
in {
|
||||
# Allow homie to serve a binary cache for the devices away from servivi
|
||||
aptDevices = recursiveUpdateList [aptDevices devShells];
|
||||
|
||||
all = recursiveUpdateList [apps devices devShells packages];
|
||||
inherit apps devices devShells packages;
|
||||
}
|
10
nixFastChecks/devShells/default.nix
Normal file
10
nixFastChecks/devShells/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
pkgs,
|
||||
self,
|
||||
}: let
|
||||
inherit (pkgs.lib) mapAttrs' nameValuePair;
|
||||
in
|
||||
mapAttrs'
|
||||
(name: shell:
|
||||
nameValuePair "devShell_${name}" shell)
|
||||
self.devShells.${pkgs.system}
|
19
nixFastChecks/devices/default.nix
Normal file
19
nixFastChecks/devices/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
pkgs,
|
||||
self,
|
||||
onlyApt ? false,
|
||||
}: let
|
||||
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 "device_${name}" config.config.system.build.toplevel)
|
||||
devices
|
18
nixFastChecks/packages/default.nix
Normal file
18
nixFastChecks/packages/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
pkgs,
|
||||
self,
|
||||
}: let
|
||||
inherit (pkgs.lib) elem filterAttrs hasAttr mapAttrs' nameValuePair;
|
||||
|
||||
packages =
|
||||
filterAttrs (
|
||||
_: v:
|
||||
!(hasAttr "platforms" v.meta)
|
||||
|| elem pkgs.system v.meta.platforms
|
||||
)
|
||||
self.packages.${pkgs.system};
|
||||
in
|
||||
mapAttrs'
|
||||
(name: pkg:
|
||||
nameValuePair "pkg_${name}" pkg)
|
||||
packages
|
Loading…
Add table
Add a link
Reference in a new issue