difftreelog
ci add flake outputs formatter, schemas
in: trunk
4 files changed
flake.nixdiffbeforeafterboth36 craneLib = crane.mkLib pkgs;36 craneLib = crane.mkLib pkgs;37 };37 };38 };38 };39 # To be used with https://github.com/NixOS/nix/pull/889240 schemas = {41 fleetConfigurations = {42 version = 1;43 doc = ''44 The `fleetConfigurations` flake output defines fleet cluster configurations.45 '';46 inventory = output: {47 children =48 builtins.mapAttrs (configName: cluster: {49 what = "fleet cluster configuration";5051 children =52 builtins.mapAttrs (hostName: host: {53 what = "host [${host.system}]";54 })55 cluster.config.hosts;56 # It is possible to implement this inventory right now, but I want to57 # get rid of `fleet.nix` file in the future.58 # children.secrets = { };59 })60 output;61 };62 };63 };39 };64 };40 # Supported and tested list of deployment targets.65 # Supported and tested list of deployment targets.41 systems = ["x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux"];66 systems = ["x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux"];108 # `fleet` crate wants nightly rust, also little sense of supporting it on stable nixpkgs.133 # `fleet` crate wants nightly rust, also little sense of supporting it on stable nixpkgs.109 (prefixAttrs "nixpkgs-" (removeAttrs packages ["fleet"]))134 (prefixAttrs "nixpkgs-" (removeAttrs packages ["fleet"]))110 // (prefixAttrs "nixpkgs-stable-" (removeAttrs packages-with-nixpkgs-stable ["fleet"]));135 // (prefixAttrs "nixpkgs-stable-" (removeAttrs packages-with-nixpkgs-stable ["fleet"]));136 formatter = pkgs.alejandra;111 };137 };112 };138 };113}139}lib/default.nixdiffbeforeafterboth--- a/lib/default.nix
+++ b/lib/default.nix
@@ -1,6 +1,4 @@
-{
- fleetPkgsForPkgs,
-}: {
+{fleetPkgsForPkgs}: {
fleetConfiguration = {
# TODO: Provide by fleet, instead of requesting user to provide it.
# This is not good that user needs to provide it, as it becomes a flake data, and fleet arbitrarily rewriting it
modules/fleet/assertions.nixdiffbeforeafterboth--- a/modules/fleet/assertions.nix
+++ b/modules/fleet/assertions.nix
@@ -1,16 +1,16 @@
-{ lib, ... }:
-
-with lib;
-
-{
-
+{lib, ...}:
+with lib; {
options = {
-
assertions = mkOption {
type = types.listOf types.unspecified;
internal = true;
- default = [ ];
- example = [{ assertion = false; message = "you can't enable this for that reason"; }];
+ default = [];
+ example = [
+ {
+ assertion = false;
+ message = "you can't enable this for that reason";
+ }
+ ];
description = ''
This option allows modules to express conditions that must
hold for the evaluation of the system configuration to
@@ -20,15 +20,14 @@
warnings = mkOption {
internal = true;
- default = [ ];
+ default = [];
type = types.listOf types.str;
- example = [ "The `foo' service is deprecated and will go away soon!" ];
+ example = ["The `foo' service is deprecated and will go away soon!"];
description = ''
This option allows modules to show warnings to users during
the evaluation of the system configuration.
'';
};
-
};
# impl of assertions is in <fleet/lib/default.nix>
}
pkgs/generator-helper.nixdiffbeforeafterboth--- a/pkgs/generator-helper.nix
+++ b/pkgs/generator-helper.nix
@@ -1,4 +1,3 @@
-
{craneLib}:
craneLib.buildPackage rec {
pname = "fleet-generator-helper";
@@ -9,6 +8,6 @@
cargoExtraArgs = "--locked -p ${pname}";
postInstall = ''
- mv bin/${pname} bin/genhelper
+ mv bin/${pname} bin/genhelper
'';
}