mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2026-02-02 17:35:08 +01:00
style: Apply nixpkgs-fmt and fix
Apply standard formatting and some statix conventions using; ```sh nixpkgs-fmt **.nix && statix fix . ``` With the intent of making contribution a bit easier and reducing mental load in hand formatting (in the same vein as [black]). [black]: https://github.com/psf/black#the-uncompromising-code-formatter
This commit is contained in:
parent
b1a4ecb8ca
commit
08435eec4b
23 changed files with 171 additions and 158 deletions
95
flake.nix
95
flake.nix
|
|
@ -6,49 +6,56 @@
|
|||
#inputs.nixpkgs.url = "nixpkgs";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
outputs = { self, nixpkgs, ... }: let
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
in {
|
||||
nixosModules.disko = import ./module.nix;
|
||||
lib = import ./. {
|
||||
inherit (nixpkgs) lib;
|
||||
};
|
||||
packages = forAllSystems (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
disko = pkgs.callPackage ./package.nix {};
|
||||
disko-doc = pkgs.callPackage ./doc.nix { };
|
||||
default = self.packages.${system}.disko;
|
||||
# The way bcachefs support is maintained in nixpkgs is prone to breakage.
|
||||
# That's why we need to maintain a fork here:
|
||||
# https://github.com/NixOS/nixpkgs/issues/212086
|
||||
linux-bcachefs = pkgs.callPackage ./linux-testing-bcachefs.nix {};
|
||||
});
|
||||
legacyPackages = forAllSystems (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
linuxPackages_bcachefs = pkgs.linuxPackagesFor self.packages.${pkgs.system}.linux-bcachefs;
|
||||
});
|
||||
# TODO: disable bios-related tests on aarch64...
|
||||
# Run checks: nix flake check -L
|
||||
checks = forAllSystems (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
nixosTests = import ./tests {
|
||||
inherit pkgs;
|
||||
makeTest = import (pkgs.path + "/nixos/tests/make-test-python.nix");
|
||||
eval-config = import (pkgs.path + "/nixos/lib/eval-config.nix");
|
||||
};
|
||||
shellcheck = pkgs.runCommand "shellcheck" { nativeBuildInputs = [ pkgs.shellcheck ]; } ''
|
||||
cd ${./.}
|
||||
shellcheck disk-deactivate/disk-deactivate disko
|
||||
touch $out
|
||||
'';
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
let
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
in
|
||||
nixosTests // { inherit shellcheck; });
|
||||
};
|
||||
{
|
||||
nixosModules.disko = import ./module.nix;
|
||||
lib = import ./. {
|
||||
inherit (nixpkgs) lib;
|
||||
};
|
||||
packages = forAllSystems (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
disko = pkgs.callPackage ./package.nix { };
|
||||
disko-doc = pkgs.callPackage ./doc.nix { };
|
||||
default = self.packages.${system}.disko;
|
||||
# The way bcachefs support is maintained in nixpkgs is prone to breakage.
|
||||
# That's why we need to maintain a fork here:
|
||||
# https://github.com/NixOS/nixpkgs/issues/212086
|
||||
linux-bcachefs = pkgs.callPackage ./linux-testing-bcachefs.nix { };
|
||||
});
|
||||
legacyPackages = forAllSystems (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
linuxPackages_bcachefs = pkgs.linuxPackagesFor self.packages.${pkgs.system}.linux-bcachefs;
|
||||
});
|
||||
# TODO: disable bios-related tests on aarch64...
|
||||
# Run checks: nix flake check -L
|
||||
checks = forAllSystems (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
nixosTests = import ./tests {
|
||||
inherit pkgs;
|
||||
makeTest = import (pkgs.path + "/nixos/tests/make-test-python.nix");
|
||||
eval-config = import (pkgs.path + "/nixos/lib/eval-config.nix");
|
||||
};
|
||||
shellcheck = pkgs.runCommand "shellcheck" { nativeBuildInputs = [ pkgs.shellcheck ]; } ''
|
||||
cd ${./.}
|
||||
shellcheck disk-deactivate/disk-deactivate disko
|
||||
touch $out
|
||||
'';
|
||||
in
|
||||
nixosTests // { inherit shellcheck; });
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue