style(treewide): Switch to nixfmt
This commit is contained in:
parent
4b0e6f0a8c
commit
82c1d22d3d
8 changed files with 154 additions and 126 deletions
|
|
@ -1,9 +1,8 @@
|
|||
{ pkgs, self }:
|
||||
let
|
||||
callPackage = pkgs.lib.callPackageWith (pkgs // { inherit self; });
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
}: let
|
||||
callPackage = pkgs.lib.callPackageWith (pkgs // {inherit self;});
|
||||
in {
|
||||
lintNix = callPackage ./lint-nix.nix {};
|
||||
openHomepage = callPackage ./open-homepage.nix {};
|
||||
lintNix = callPackage ./lint-nix.nix { };
|
||||
openHomepage = callPackage ./open-homepage.nix { };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,26 +2,31 @@
|
|||
self,
|
||||
lib,
|
||||
stdenv,
|
||||
alejandra,
|
||||
nixfmt-rfc-style,
|
||||
deadnix,
|
||||
statix,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib) sourceFilesBySuffices;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
dontPatch = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontInstall = true;
|
||||
doCheck = true;
|
||||
stdenv.mkDerivation {
|
||||
dontPatch = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontInstall = true;
|
||||
doCheck = true;
|
||||
|
||||
name = "lint-nix";
|
||||
src = sourceFilesBySuffices self [".nix"];
|
||||
checkInputs = [alejandra deadnix statix];
|
||||
checkPhase = ''
|
||||
mkdir -p $out
|
||||
alejandra --check . | tee $out/alejandra.log
|
||||
deadnix --fail | tee $out/deadnix.log
|
||||
statix check | tee $out/statix.log
|
||||
'';
|
||||
}
|
||||
name = "lint-nix";
|
||||
src = sourceFilesBySuffices self [ ".nix" ];
|
||||
checkInputs = [
|
||||
nixfmt-rfc-style
|
||||
deadnix
|
||||
statix
|
||||
];
|
||||
checkPhase = ''
|
||||
mkdir -p $out
|
||||
nixfmt --strict --check . | tee $out/nixfmt.log
|
||||
deadnix --fail | tee $out/deadnix.log
|
||||
statix check | tee $out/statix.log
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,16 @@
|
|||
{
|
||||
self,
|
||||
nixosTest,
|
||||
}:
|
||||
{ self, nixosTest }:
|
||||
nixosTest {
|
||||
name = "open-homepage";
|
||||
|
||||
nodes = {
|
||||
# Host with just the default configuration
|
||||
defaults = {
|
||||
imports = [self.nixosModules.default];
|
||||
imports = [ self.nixosModules.default ];
|
||||
services.tlaternet-webserver.enable = true;
|
||||
};
|
||||
|
||||
host = {
|
||||
imports = [self.nixosModules.default];
|
||||
imports = [ self.nixosModules.default ];
|
||||
|
||||
services.tlaternet-webserver = {
|
||||
enable = true;
|
||||
|
|
@ -23,10 +20,10 @@ nixosTest {
|
|||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [8080];
|
||||
networking.firewall.allowedTCPPorts = [ 8080 ];
|
||||
};
|
||||
|
||||
client = {};
|
||||
client = { };
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue