diff --git a/docs.nix b/docs.nix index 7baa81e..1f8bb75 100644 --- a/docs.nix +++ b/docs.nix @@ -67,7 +67,7 @@ pkgs.mkShellNoCC { facterMarkdown = mkMarkdown "facter" eval.options.facter.detected; otherMarkdown = lib.mapAttrsToList mkMarkdown ( - lib.filterAttrs (n: v: n != "detected") eval.options.facter + lib.filterAttrs (n: _v: n != "detected") eval.options.facter ); optionsMarkdown = pkgs.symlinkJoin { diff --git a/flake.nix b/flake.nix index c3de0aa..aa0d826 100644 --- a/flake.nix +++ b/flake.nix @@ -56,12 +56,16 @@ } ); formatter = eachSystem ( - { pkgs, ... }: pkgs.callPackage ./formatter.nix { inputs = publicInputs // privateInputs; } + { pkgs, ... }: + (pkgs.callPackage ./formatter.nix { inputs = publicInputs // privateInputs; }).config.build.wrapper ); checks = eachSystem ( { pkgs, ... }: { + formatting = + (pkgs.callPackage ./formatter.nix { inputs = publicInputs // privateInputs; }).config.build.check + publicInputs.self; minimal-machine = (pkgs.nixos [ publicInputs.self.nixosModules.facter diff --git a/formatter.nix b/formatter.nix index 1b6b9d2..c067958 100644 --- a/formatter.nix +++ b/formatter.nix @@ -2,7 +2,7 @@ let hasNixFmt = pkgs.lib.meta.availableOn pkgs.stdenv.buildPlatform pkgs.nixfmt-rfc-style.compiler; in -inputs.treefmt-nix.lib.mkWrapper pkgs { +inputs.treefmt-nix.lib.evalModule pkgs { projectRootFile = ".git/config"; programs = { diff --git a/modules/nixos/bluetooth.nix b/modules/nixos/bluetooth.nix index f8fabb8..5195311 100644 --- a/modules/nixos/bluetooth.nix +++ b/modules/nixos/bluetooth.nix @@ -1,8 +1,12 @@ { lib, config, ... }: { - options.facter.detected.bluetooth.enable = lib.mkEnableOption "Enable the Facter bluetooth module" // { - default = builtins.length (config.facter.report.hardware.bluetooth or []) > 0; - }; + options.facter.detected.bluetooth.enable = + lib.mkEnableOption "Enable the Facter bluetooth module" + // { + default = builtins.length (config.facter.report.hardware.bluetooth or [ ]) > 0; + }; - config.hardware.bluetooth.enable = lib.mkIf config.facter.detected.bluetooth.enable (lib.mkDefault true); + config.hardware.bluetooth.enable = lib.mkIf config.facter.detected.bluetooth.enable ( + lib.mkDefault true + ); } diff --git a/modules/nixos/disk.nix b/modules/nixos/disk.nix index dcd14ba..ab5648c 100644 --- a/modules/nixos/disk.nix +++ b/modules/nixos/disk.nix @@ -8,14 +8,14 @@ in options.facter.detected.boot.disk.kernelModules = lib.mkOption { type = lib.types.listOf lib.types.str; default = facterLib.stringSet ( - facterLib.collectDrivers ( - # A disk might be attached. - (report.hardware.firewire_controller or [ ]) - # definitely important - ++ (report.hardware.disk or [ ]) - ++ (report.hardware.storage_controller or [ ]) - ) - ); + facterLib.collectDrivers ( + # A disk might be attached. + (report.hardware.firewire_controller or [ ]) + # definitely important + ++ (report.hardware.disk or [ ]) + ++ (report.hardware.storage_controller or [ ]) + ) + ); description = '' List of kernel modules that are needed to access the disk. ''; diff --git a/modules/nixos/facter.nix b/modules/nixos/facter.nix index 6cd6128..a7bd8ac 100644 --- a/modules/nixos/facter.nix +++ b/modules/nixos/facter.nix @@ -18,7 +18,11 @@ options.facter = with lib; { report = mkOption { type = types.raw; - default = if config.facter.reportPath == null then {} else builtins.fromJSON (builtins.readFile config.facter.reportPath); + default = + if config.facter.reportPath == null then + { } + else + builtins.fromJSON (builtins.readFile config.facter.reportPath); description = "An import for the reportPath."; }; diff --git a/modules/nixos/system.nix b/modules/nixos/system.nix index c447ab6..173beee 100644 --- a/modules/nixos/system.nix +++ b/modules/nixos/system.nix @@ -6,6 +6,8 @@ }: { nixpkgs = lib.mkIf (!options.nixpkgs.pkgs.isDefined) { - hostPlatform = lib.mkIf (config.facter.report.system or null != null) (lib.mkDefault config.facter.report.system); + hostPlatform = lib.mkIf (config.facter.report.system or null != null) ( + lib.mkDefault config.facter.report.system + ); }; } diff --git a/renovate.json b/renovate.json index 5db72dd..d383718 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,4 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:recommended" - ] + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:recommended"] }