From 4ab4767d5083a7ca8a05a48df09796ae00cb234e Mon Sep 17 00:00:00 2001 From: Tobias Happ Date: Wed, 26 Oct 2022 12:28:02 +0200 Subject: [PATCH] treewide: format code --- modules/environment/nix.nix | 2 +- modules/nixpkgs/config.nix | 4 ++-- modules/nixpkgs/options.nix | 4 ++-- modules/time.nix | 4 +--- overlays/typespeed.nix | 6 +++--- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/modules/environment/nix.nix b/modules/environment/nix.nix index 9c82558..092eb2e 100644 --- a/modules/environment/nix.nix +++ b/modules/environment/nix.nix @@ -149,7 +149,7 @@ in "nix/registry.json".text = builtins.toJSON { version = 2; - flakes = mapAttrsToList (n: v: { inherit (v) from to exact; }) cfg.registry; + flakes = mapAttrsToList (_n: v: { inherit (v) from to exact; }) cfg.registry; }; }; diff --git a/modules/nixpkgs/config.nix b/modules/nixpkgs/config.nix index 7941b5a..45fc835 100644 --- a/modules/nixpkgs/config.nix +++ b/modules/nixpkgs/config.nix @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE. # Inspired by # https://github.com/rycee/home-manager/blob/master/modules/misc/nixpkgs.nix @@ -15,7 +15,7 @@ with lib; config = { _module.args.pkgs = import ( - filterAttrs (n: v: v != null) config.nixpkgs + filterAttrs (_n: v: v != null) config.nixpkgs ); nixpkgs.overlays = import ../../overlays; diff --git a/modules/nixpkgs/options.nix b/modules/nixpkgs/options.nix index 2f793ce..586bfd5 100644 --- a/modules/nixpkgs/options.nix +++ b/modules/nixpkgs/options.nix @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE. # Inspired by # https://github.com/rycee/home-manager/blob/master/modules/misc/nixpkgs.nix @@ -46,7 +46,7 @@ let else lib.traceSeqN 1 x false; in traceXIfNot isConfig; - merge = args: fold (def: mergeConfig def.value) { }; + merge = _args: fold (def: mergeConfig def.value) { }; }; overlayType = mkOptionType { diff --git a/modules/time.nix b/modules/time.nix index 67ef512..e566940 100644 --- a/modules/time.nix +++ b/modules/time.nix @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE. # Inspired by # https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/config/locale.nix @@ -10,8 +10,6 @@ with lib; let - cfg = config.time; - tzdir = "${pkgs.tzdata}/share/zoneinfo"; nospace = str: filter (c: c == " ") (stringToCharacters str) == [ ]; timezoneType = types.nullOr (types.addCheck types.str nospace) diff --git a/overlays/typespeed.nix b/overlays/typespeed.nix index c2e8e07..57500bf 100644 --- a/overlays/typespeed.nix +++ b/overlays/typespeed.nix @@ -1,13 +1,13 @@ -# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE. +# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE. -self: super: +_self: super: let nixpkgs = import ./lib/nixpkgs.nix { inherit super; }; in { - typespeed = nixpkgs.typespeed.overrideAttrs (old: { + typespeed = nixpkgs.typespeed.overrideAttrs (_old: { patches = nixpkgs.typespeed.patches ++ [ ./typespeed-no-drop-priv.patch ];