Skip to content

Commit

Permalink
chore: run deadnix
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Nov 20, 2023
1 parent ad574cf commit 9f93122
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 27 deletions.
2 changes: 1 addition & 1 deletion examples/overlays/__fixture/test1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

_:

final: prev:
_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: { }
6 changes: 1 addition & 5 deletions examples/packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
# SPDX-License-Identifier: MIT

# [[file:../../docs/org/pops-packages.org::*Example][Example:1]]
{
omnibus,
inputs,
self,
}:
{ omnibus, inputs }:
omnibus.pops.packages {
src = ./__fixture;
inputs = {
Expand Down
5 changes: 5 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
deadnix:
deadnix . --edit --exclude ./units/std/blockTypes/*

justfmt:
just --fmt --unstable
2 changes: 1 addition & 1 deletion src/lib/addLoadToPopsFilterBySrc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let
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 Down
2 changes: 1 addition & 1 deletion src/lib/attrsets/filterDerivations.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

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

{
lib,
yants,
self,
}:
{ yants, self }:
with yants; {
a = struct "test" { name = string; };
b = either self.a (struct { age = int; });
Expand Down
2 changes: 1 addition & 1 deletion src/pops/_exportsOmnibusProfiles.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{ lib }:
self:
lib.mapAttrs (n: v: (if lib.isAttrs v then v else v { })) self
lib.mapAttrs (_n: v: (if lib.isAttrs v then v else v { })) self
# (self.addLoadExtender {
# load = {
# transformer = [
Expand Down
2 changes: 1 addition & 1 deletion src/pops/configs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let
applyRecursive =
mkFunc: layoutData:
lib.mapAttrsRecursiveCond (as: !(lib.isAttrs as && as ? data)) # Condition to check
(n: v: mkFunc v) # Function to apply
(_n: v: mkFunc v) # Function to apply
layoutData;

# Function to process each layout
Expand Down
5 changes: 1 addition & 4 deletions src/pops/load.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ load:
(flops.haumea.pops.default.setInit (
recursiveMerge' [
{
loader = with haumea; [
(matchers.nix loaders.scoped)
(matchers.nix loaders.default)
];
loader = with haumea; [ (matchers.nix loaders.default) ];
inputs = root.lib.loaderInputs;
}
load
Expand Down
2 changes: 1 addition & 1 deletion src/pops/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ makeScope newScope (
self: _super: {
exports = {
overlay =
final: prev:
final: _prev:
(self.layouts.self.addLoadExtender {
load = {
inputs.inputs.nixpkgs = final;
Expand Down
1 change: 0 additions & 1 deletion templates/hivebus/nix/src/pops/hosts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
lib,
super,
omnibus,
root,
projectDir,
}:
let
Expand Down
1 change: 0 additions & 1 deletion templates/nixos/nix/src/pops/hosts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
lib,
super,
omnibus,
root,
projectDir,
}:
let
Expand Down
2 changes: 0 additions & 2 deletions tests/microvms/__fixture/example.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
config,
lib,
pkgs,
inputs,
...
}:
let
inherit (inputs) nixpkgs;
inherit (pkgs) system;
in
{
Expand Down
1 change: 0 additions & 1 deletion units/nixos/darwinProfiles/presets/bootstrap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

{
omnibus,
pkgs,
lib,
config,
}:
Expand Down
2 changes: 1 addition & 1 deletion units/nixos/homeProfiles/presets/navi.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let
"sunos"
(if isLinux then "osx" else "linux")
(
root: path: type:
_root: path: _type:
if
(builtins.match "[^/]*(rpm|yum|apt).*.cheat" (builtins.baseNameOf path)) == null
then
Expand Down

0 comments on commit 9f93122

Please sign in to comment.