Skip to content

Commit

Permalink
chore: update nixfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Nov 30, 2023
1 parent abbde0b commit 80933e6
Show file tree
Hide file tree
Showing 245 changed files with 504 additions and 517 deletions.
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ let
+ "/flake.nix"
);
in
call-flake.outputs { } ./.
call-flake.outputs {} ./.
2 changes: 1 addition & 1 deletion examples/overlays/__fixture/test1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
_:

_final: _prev:
{ }
{}
2 changes: 1 addition & 1 deletion examples/overlays/__fixture/test2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
# SPDX-License-Identifier: MIT

{ inputs }: _final: _prev: { }
{inputs}: _final: _prev: {}
2 changes: 1 addition & 1 deletion examples/overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
# SPDX-License-Identifier: MIT

{ omnibus }: omnibus.pops.overlays { src = ./__fixture; }
{omnibus}: omnibus.pops.overlays {src = ./__fixture;}
2 changes: 1 addition & 1 deletion examples/packages/__fixture/hello1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ stdenv.mkDerivation {
};
meta = {
description = "An example package with unfree license (for testing)";
maintainers = [ lib.maintainers.oxij ];
maintainers = [lib.maintainers.oxij];
};
}
2 changes: 1 addition & 1 deletion examples/packages/__fixture/hello2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ stdenv.mkDerivation {

meta = {
description = "An example package with unfree license (for testing)";
maintainers = [ lib.maintainers.oxij ];
maintainers = [lib.maintainers.oxij];
};
}
2 changes: 1 addition & 1 deletion examples/packages/__fixture/py/btest_1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ buildPythonPackage rec {
homepage = "https://github.com/zeek/btest";
changelog = "https://github.com/zeek/btest/blob/${version}/CHANGES";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
maintainers = with maintainers; [fab];
};
}
2 changes: 1 addition & 1 deletion examples/packages/__fixture/py/btest_2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ buildPythonPackage rec {
homepage = "https://github.com/zeek/btest";
changelog = "https://github.com/zeek/btest/blob/${version}/CHANGES";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
maintainers = with maintainers; [fab];
};
}
4 changes: 2 additions & 2 deletions examples/packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: MIT

# [[file:../../docs/org/pops-packages.org::*Example][Example:1]]
{ omnibus, inputs }:
{omnibus, inputs}:
let
nixpkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
in
Expand All @@ -18,7 +18,7 @@ in
fetchurl
fetchFromGitHub
dockerTools
;
;
};
};
};
Expand Down
4 changes: 2 additions & 2 deletions examples/packagesOverlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: MIT

# [[file:../docs/org/pops-packages.org::*Example][Example:3]]
{ super, omnibus }:
{super, omnibus}:
let
nixos-23_05 = omnibus.flake.inputs.nixos-23_05;
in
Expand All @@ -13,7 +13,7 @@ nixos-23_05.legacyPackages.x86_64-linux.appendOverlays [
(final: prev: {
python3Packages = prev.python3Packages.override (
old: {
overrides = prev.lib.composeExtensions (old.overrides or (_: _: { })) (
overrides = prev.lib.composeExtensions (old.overrides or (_: _: {})) (
selfP: _:
# can be either super.packages.exports.packages.py.packages selfP
{
Expand Down
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
};

outputs =
{ self, ... }@inputs:
{self, ...}@inputs:
let
srcPops = import ./src/__init.nix { inherit inputs; };
srcPops = import ./src/__init.nix {inherit inputs;};
src = srcPops.exports.default;
in
src.flakeOutputs
Expand Down
2 changes: 1 addition & 1 deletion local/cells/repo/configs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
(2) have all the things in one place / fromat
(3) potentially share / re-use configuration data - keeping it in sync
*/
{ inputs, cell }:
{inputs, cell}:
with inputs.std.inputs.dmerge;
let
cfg = {
Expand Down
2 changes: 1 addition & 1 deletion local/cells/repo/pops.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: MIT

{ inputs, cell }:
{inputs, cell}:
let
inherit (inputs) nixpkgs;
inputs' = (inputs.omnibus.pops.flake.setSystem nixpkgs.system).inputs;
Expand Down
6 changes: 3 additions & 3 deletions local/cells/repo/shells.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
They conveniently also generate config files in their startup hook.
*/
{ inputs, cell }:
{inputs, cell}:
let
inherit (inputs.std) lib;
inherit (inputs) nixpkgs std;
Expand All @@ -16,7 +16,7 @@ in
default = lib.dev.mkShell {
name = "omnibus devshell";

imports = [ cell.pops.devshellProfiles.exports.default.nickel ];
imports = [cell.pops.devshellProfiles.exports.default.nickel];

# Tool Homepage: https://nix-community.github.io/nixago/
# This is Standard's devshell integration.
Expand All @@ -37,6 +37,6 @@ in
nixpkgs.nixci
];

commands = [ ];
commands = [];
};
}
2 changes: 1 addition & 1 deletion local/ci/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
inputs.call-flake.url = "github:divnix/call-flake";

outputs =
{ self, call-flake }:
{self, call-flake}:
let
local = call-flake ../.;
inherit (local) examples;
Expand Down
6 changes: 3 additions & 3 deletions local/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions local/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
inputs.haumea.follows = "namaka/haumea";

outputs =
{ std, self, ... }@inputs:
{std, self, ...}@inputs:
let
omnibus = inputs.call-flake ../.;
in
Expand Down Expand Up @@ -71,7 +71,7 @@
{
examples = omnibus.load {
src = ../examples;
transformer = [ (_cursor: dir: if dir ? default then dir.default else dir) ];
transformer = [(_cursor: dir: if dir ? default then dir.default else dir)];
inputs = inputs.nixpkgs.lib.recursiveUpdate omnibus.lib.loaderInputs {
inherit inputs;
trace = true;
Expand Down
6 changes: 3 additions & 3 deletions local/lock/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion local/lock/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@
catppuccin-foliate.url = "github:catppuccin/foliate";
catppuccin-foliate.flake = false;
};
outputs = _: { };
outputs = _: {};
}
4 changes: 2 additions & 2 deletions src/__init.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
#
# SPDX-License-Identifier: MIT

{ inputs }:
{inputs}:
let
inherit (inputs) flops self;
inherit (flops.inputs)
POP
yants
haumea
nixlib
;
;
in
flops.lib.haumea.pops.default.setInit {
src = ./.;
Expand Down
2 changes: 1 addition & 1 deletion src/errors/inputsSource.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: MIT

{ lib }:
{lib}:
list:
let
sources = (import ../../local/lock/flake.nix).inputs;
Expand Down
4 changes: 2 additions & 2 deletions src/errors/requiredInputs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: MIT

{ lib, super }:
{lib, super}:
inputs': object: listNames:
let
notFoundInputs =
Expand All @@ -13,7 +13,7 @@ let
msg =
(lib.concatMapStringsSep "\n "
(
{ name, url }:
{name, url}:
''
# please get the input from `${name}.url = "${url}"`
${name} = inputs.${name};
Expand Down
2 changes: 1 addition & 1 deletion src/flakeOutputs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ in
devshellModules
devshellProfiles
flake
;
;

scripts =
(super.pops.scripts.addLoadExtender {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/addLoadToPops.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: MIT

{ lib }:
{lib}:
list: pops: load:
lib.listToAttrs (
map
Expand Down
8 changes: 4 additions & 4 deletions src/lib/addLoadToPopsFilterBySrc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
#
# SPDX-License-Identifier: MIT

{ lib, super }:
{lib, super}:
dir: pops: ext:
let
list = lib.attrNames (lib.readDir dir);
getDirs = host: lib.attrNames (lib.readDir (dir + "/${host}"));
processPops =
name:
lib.filterAttrs (_n: v: v != { }) (
lib.filterAttrs (_n: v: v != {}) (
lib.mapAttrs
(
n: v:
Expand All @@ -21,11 +21,11 @@ let
if lib.isFunction ext then
ext v
else if lib.isAttrs ext then
(v.addLoadExtender { load.src = src; }).addLoadExtender { load = ext; }
(v.addLoadExtender {load.src = src;}).addLoadExtender {load = ext;}
else
v
else
{ }
{}
)
pops
);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/attrsets/filterAttrsOnlyRecursive.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: MIT

{ lib, super }:
{lib, super}:
pred: set:
lib.listToAttrs (
lib.concatMap
Expand All @@ -21,7 +21,7 @@ lib.listToAttrs (
))
]
else
[ ]
[]
)
(lib.attrNames set)
)
2 changes: 1 addition & 1 deletion src/lib/attrsets/filterDerivations.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: MIT

{ super, lib }:
{super, lib}:
super.filterAttrsOnlyRecursive (
_n: attrs: lib.isDerivation attrs || attrs.recurseForDerivations or false
)
2 changes: 1 addition & 1 deletion src/lib/attrsets/stripAttrsForHydra.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: MIT

{ super }:
{super}:
super.filterAttrsOnlyRecursive (
n: _: n != "recurseForDerivations" && n != "dimension"
)
4 changes: 2 additions & 2 deletions src/lib/filterSrc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#
# SPDX-License-Identifier: MIT

{ lib, root }:
{lib, root}:
src:
let
inherit (root.pops.flake.inputs) nix-filter;
in
nix-filter.lib.filter { root = src; }
nix-filter.lib.filter {root = src;}
# include =
# let
# srcDirs = lib.attrNames (lib.readDir src);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/inputsToPaths.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: MIT

{ lib, flops }:
{lib, flops}:
# let
# # Helper function to collect outPath attributes recursively
# collectPaths =
Expand Down Expand Up @@ -64,7 +64,7 @@ let
attrsToPaths = i: lib.attrValues (extractAttrsFromInputs i);

inherit (flops) recursiveMerge;
updatedInputs = (recursiveMerge (l.flatten [ inputs ]));
updatedInputs = (recursiveMerge (l.flatten [inputs]));
in
l.pipe updatedInputs [
(
Expand Down
2 changes: 1 addition & 1 deletion src/lib/loaderInputs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
inputs.self.pops.self.load.inputs
// {
omnibus =
(lib.recursiveUpdate root { pops.self = inputs.self.pops.self; })
(lib.recursiveUpdate root {pops.self = inputs.self.pops.self;})
// root.flakeOutputs;
}
2 changes: 1 addition & 1 deletion src/lib/mapLoadToPops.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: MIT

{ lib }:
{lib}:
pops: load:
lib.mapAttrsRecursiveCond ((as: !(as ? "addLoadExtender")))
(n: v: v.addLoadExtender (load n v))
Expand Down
Loading

0 comments on commit 80933e6

Please sign in to comment.