flake: refactor checks, packages
This commit is contained in:
parent
41e81a15a1
commit
fa19f663e5
1 changed files with 12 additions and 14 deletions
26
flake.nix
26
flake.nix
|
@ -61,16 +61,13 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
perSystem = { config, inputs', lib, pkgs, self', system, ... }:
|
perSystem = { config, inputs', lib, pkgs, self', system, ... }:
|
||||||
let
|
|
||||||
defaultPlatform = pkgs.stdenv.hostPlatform.system == "x86_64-linux";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./dev/shell.nix
|
./dev/shell.nix
|
||||||
./terraform/shell.nix
|
./terraform/shell.nix
|
||||||
];
|
];
|
||||||
treefmt = {
|
treefmt = {
|
||||||
flakeCheck = defaultPlatform;
|
flakeCheck = system == "x86_64-linux";
|
||||||
imports = [ ./dev/treefmt.nix ];
|
imports = [ ./dev/treefmt.nix ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -79,18 +76,19 @@
|
||||||
darwinConfigurations = lib.mapAttrs' (name: config: lib.nameValuePair name config.config.system.build.toplevel) ((lib.filterAttrs (_: config: config.pkgs.system == system)) self.darwinConfigurations);
|
darwinConfigurations = lib.mapAttrs' (name: config: lib.nameValuePair name config.config.system.build.toplevel) ((lib.filterAttrs (_: config: config.pkgs.system == system)) self.darwinConfigurations);
|
||||||
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
|
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
|
||||||
nixosConfigurations = lib.mapAttrs' (name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel) ((lib.filterAttrs (_: config: config.pkgs.system == system)) self.nixosConfigurations);
|
nixosConfigurations = lib.mapAttrs' (name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel) ((lib.filterAttrs (_: config: config.pkgs.system == system)) self.nixosConfigurations);
|
||||||
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages;
|
|
||||||
in
|
in
|
||||||
darwinConfigurations // devShells // { inherit (self') formatter; } // nixosConfigurations // packages
|
darwinConfigurations // devShells // { inherit (self') formatter; } // nixosConfigurations
|
||||||
// pkgs.lib.optionalAttrs defaultPlatform {
|
// pkgs.lib.optionalAttrs (system == "x86_64-linux")
|
||||||
nixosTests-buildbot = pkgs.nixosTests.buildbot;
|
{
|
||||||
nixosTests-buildbot-nix-master = inputs'.buildbot-nix.checks.master;
|
inherit (self'.packages) pages;
|
||||||
nixosTests-buildbot-nix-worker = inputs'.buildbot-nix.checks.worker;
|
nixpkgs-update-supervisor-test = pkgs.callPackage ./hosts/build02/supervisor_test.nix { };
|
||||||
nixosTests-hydra = pkgs.nixosTests.hydra.hydra_unstable;
|
nixosTests-buildbot = pkgs.nixosTests.buildbot;
|
||||||
};
|
nixosTests-buildbot-nix-master = inputs'.buildbot-nix.checks.master;
|
||||||
|
nixosTests-buildbot-nix-worker = inputs'.buildbot-nix.checks.worker;
|
||||||
|
nixosTests-hydra = pkgs.nixosTests.hydra.hydra_unstable;
|
||||||
|
};
|
||||||
|
|
||||||
packages = pkgs.lib.optionalAttrs defaultPlatform {
|
packages = {
|
||||||
nixpkgs-update-supervisor-test = pkgs.callPackage ./hosts/build02/supervisor_test.nix { };
|
|
||||||
pages = pkgs.runCommand "pages"
|
pages = pkgs.runCommand "pages"
|
||||||
{
|
{
|
||||||
buildInputs = [ config.devShells.mkdocs.nativeBuildInputs ];
|
buildInputs = [ config.devShells.mkdocs.nativeBuildInputs ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue