From 562d1dffb36a0b9c1c76db913a14154b4ba4acdc Mon Sep 17 00:00:00 2001 From: oddlama Date: Mon, 4 Sep 2023 22:01:47 +0200 Subject: [PATCH] chore: run deadnix --- apps/show-wireguard-qr.nix | 2 +- hosts/potksed/default.nix | 6 +----- hosts/sentinel/default.nix | 6 +----- hosts/sentinel/net.nix | 1 - hosts/sentinel/oauth2.nix | 2 -- hosts/ward/microvms/grafana.nix | 1 - hosts/ward/microvms/immich.nix | 2 -- hosts/ward/microvms/kanidm.nix | 1 - hosts/ward/microvms/loki.nix | 1 - hosts/ward/microvms/paperless.nix | 1 - hosts/zackbiene/default.nix | 1 - hosts/zackbiene/esphome.nix | 6 +----- hosts/zackbiene/mosquitto.nix | 6 +----- hosts/zackbiene/zigbee2mqtt.nix | 6 +----- lib/disko.nix | 2 +- lib/types.nix | 2 +- modules/meta/kanidm.nix | 2 -- modules/meta/microvms.nix | 11 +---------- modules/meta/oauth2-proxy.nix | 9 +-------- modules/meta/wireguard.nix | 12 ------------ modules/optional/graphical/default.nix | 5 ----- modules/optional/laptop.nix | 2 +- modules/repo/distributed-config.nix | 8 +------- modules/repo/meta.nix | 2 -- modules/repo/secrets.nix | 3 --- modules/system/deteministic-ids.nix | 1 - nix/generate-node.nix | 3 --- pkgs/caddy.nix | 1 - pkgs/default.nix | 4 ++-- pkgs/oauth2-proxy/default.nix | 2 +- users/common/default.nix | 2 +- users/common/shell/default.nix | 2 +- users/myuser/gpg.nix | 6 +----- users/myuser/graphical/kitty.nix | 8 ++------ users/myuser/ssh.nix | 2 +- 35 files changed, 21 insertions(+), 110 deletions(-) diff --git a/apps/show-wireguard-qr.nix b/apps/show-wireguard-qr.nix index 75346bb..0d21f71 100644 --- a/apps/show-wireguard-qr.nix +++ b/apps/show-wireguard-qr.nix @@ -2,7 +2,7 @@ self, pkgs, ... -} @ inputs: let +}: let inherit (pkgs.lib) attrNames diff --git a/hosts/potksed/default.nix b/hosts/potksed/default.nix index 1d6449d..84184f5 100644 --- a/hosts/potksed/default.nix +++ b/hosts/potksed/default.nix @@ -1,8 +1,4 @@ -{ - inputs, - pkgs, - ... -}: { +{inputs, ...}: { imports = [ inputs.nixos-hardware.nixosModules.common-cpu-amd inputs.nixos-hardware.nixosModules.common-cpu-amd-pstate diff --git a/hosts/sentinel/default.nix b/hosts/sentinel/default.nix index 2b0b7c5..9e82750 100644 --- a/hosts/sentinel/default.nix +++ b/hosts/sentinel/default.nix @@ -1,8 +1,4 @@ -{ - config, - lib, - ... -}: { +{config, ...}: { imports = [ ../../modules/optional/hardware/hetzner-cloud.nix diff --git a/hosts/sentinel/net.nix b/hosts/sentinel/net.nix index e9f70f7..a1151a8 100644 --- a/hosts/sentinel/net.nix +++ b/hosts/sentinel/net.nix @@ -1,7 +1,6 @@ { config, lib, - utils, ... }: { networking.hostId = config.repo.secrets.local.networking.hostId; diff --git a/hosts/sentinel/oauth2.nix b/hosts/sentinel/oauth2.nix index 48f6109..3fc580e 100644 --- a/hosts/sentinel/oauth2.nix +++ b/hosts/sentinel/oauth2.nix @@ -1,7 +1,5 @@ { - lib, config, - pkgs, nodes, ... }: { diff --git a/hosts/ward/microvms/grafana.nix b/hosts/ward/microvms/grafana.nix index a29839c..5b8dfa4 100644 --- a/hosts/ward/microvms/grafana.nix +++ b/hosts/ward/microvms/grafana.nix @@ -1,6 +1,5 @@ { config, - lib, nodes, ... }: let diff --git a/hosts/ward/microvms/immich.nix b/hosts/ward/microvms/immich.nix index 504d3da..c645955 100644 --- a/hosts/ward/microvms/immich.nix +++ b/hosts/ward/microvms/immich.nix @@ -1,8 +1,6 @@ { config, - lib, nodes, - pkgs, ... }: let sentinelCfg = nodes.sentinel.config; diff --git a/hosts/ward/microvms/kanidm.nix b/hosts/ward/microvms/kanidm.nix index 95fb030..637a640 100644 --- a/hosts/ward/microvms/kanidm.nix +++ b/hosts/ward/microvms/kanidm.nix @@ -1,6 +1,5 @@ { config, - lib, nodes, pkgs, ... diff --git a/hosts/ward/microvms/loki.nix b/hosts/ward/microvms/loki.nix index 04e3e1f..08a25cf 100644 --- a/hosts/ward/microvms/loki.nix +++ b/hosts/ward/microvms/loki.nix @@ -1,6 +1,5 @@ { config, - lib, nodes, ... }: let diff --git a/hosts/ward/microvms/paperless.nix b/hosts/ward/microvms/paperless.nix index 69c1b3e..9b2a286 100644 --- a/hosts/ward/microvms/paperless.nix +++ b/hosts/ward/microvms/paperless.nix @@ -1,6 +1,5 @@ { config, - lib, nodes, ... }: let diff --git a/hosts/zackbiene/default.nix b/hosts/zackbiene/default.nix index 0b5db61..ad3e850 100644 --- a/hosts/zackbiene/default.nix +++ b/hosts/zackbiene/default.nix @@ -6,7 +6,6 @@ }: let inherit (config.repo.secrets.local) acme; sentinelCfg = nodes.sentinel.config; - inherit (sentinelCfg.repo.secrets.local) personalDomain; in { imports = [ ../../modules/optional/hardware/odroid-n2plus.nix diff --git a/hosts/zackbiene/esphome.nix b/hosts/zackbiene/esphome.nix index 0703a64..f911121 100644 --- a/hosts/zackbiene/esphome.nix +++ b/hosts/zackbiene/esphome.nix @@ -1,8 +1,4 @@ -{ - lib, - config, - ... -}: { +{config, ...}: { services.esphome = { enable = true; enableUnixSocket = true; diff --git a/hosts/zackbiene/mosquitto.nix b/hosts/zackbiene/mosquitto.nix index 9e3f964..a400dac 100644 --- a/hosts/zackbiene/mosquitto.nix +++ b/hosts/zackbiene/mosquitto.nix @@ -1,8 +1,4 @@ -{ - lib, - config, - ... -}: { +{config, ...}: { age.secrets.mosquitto-pw-zigbee2mqtt = { rekeyFile = ./secrets/mosquitto-pw-zigbee2mqtt.age; mode = "440"; diff --git a/hosts/zackbiene/zigbee2mqtt.nix b/hosts/zackbiene/zigbee2mqtt.nix index d4af159..469ebf6 100644 --- a/hosts/zackbiene/zigbee2mqtt.nix +++ b/hosts/zackbiene/zigbee2mqtt.nix @@ -1,8 +1,4 @@ -{ - lib, - config, - ... -}: { +{config, ...}: { age.secrets."mosquitto-pw-zigbee2mqtt.yaml" = { rekeyFile = ./secrets/mosquitto-pw-zigbee2mqtt.yaml.age; mode = "440"; diff --git a/lib/disko.nix b/lib/disko.nix index bc90f34..d603877 100644 --- a/lib/disko.nix +++ b/lib/disko.nix @@ -1,4 +1,4 @@ -inputs: self: super: { +_inputs: _self: super: { lib = super.lib // { diff --git a/lib/types.nix b/lib/types.nix index bcfc18f..019086f 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -1,4 +1,4 @@ -inputs: self: super: let +inputs: _self: super: let inherit (inputs.nixpkgs.lib) all diff --git a/modules/meta/kanidm.nix b/modules/meta/kanidm.nix index 8037aef..e8fd67e 100644 --- a/modules/meta/kanidm.nix +++ b/modules/meta/kanidm.nix @@ -7,7 +7,6 @@ }: let inherit (lib) - all any attrNames attrValues @@ -16,7 +15,6 @@ concatMap concatMapStrings converge - elem escapeShellArg escapeShellArgs filter diff --git a/modules/meta/microvms.nix b/modules/meta/microvms.nix index 297cff9..d5fd4dd 100644 --- a/modules/meta/microvms.nix +++ b/modules/meta/microvms.nix @@ -11,11 +11,8 @@ any attrNames attrValues - concatStringsSep disko escapeShellArg - filterAttrs - foldl' makeBinPath mapAttrsToList mdDoc @@ -24,12 +21,10 @@ mkEnableOption mkForce mkIf - mkMerge mkOption net optional optionalAttrs - recursiveUpdate types ; @@ -277,11 +272,7 @@ in { vms = mkOption { default = {}; description = "Defines the actual vms and handles the necessary base setup for them."; - type = types.attrsOf (types.submodule ({ - name, - config, - ... - }: { + type = types.attrsOf (types.submodule ({name, ...}: { options = { nodeName = mkOption { type = types.str; diff --git a/modules/meta/oauth2-proxy.nix b/modules/meta/oauth2-proxy.nix index bb03f6a..05e742c 100644 --- a/modules/meta/oauth2-proxy.nix +++ b/modules/meta/oauth2-proxy.nix @@ -1,14 +1,11 @@ { lib, config, - pkgs, ... }: let inherit (lib) concatStringsSep - flip - mapAttrs mdDoc mkDefault mkEnableOption @@ -35,11 +32,7 @@ in { }; options.services.nginx.virtualHosts = mkOption { - type = types.attrsOf (types.submodule ({ - name, - config, - ... - }: { + type = types.attrsOf (types.submodule ({config, ...}: { options.oauth2 = { enable = mkEnableOption (mdDoc "access protection of this resource using oauth2_proxy."); allowedGroups = mkOption { diff --git a/modules/meta/wireguard.nix b/modules/meta/wireguard.nix index b15a17c..01d3cda 100644 --- a/modules/meta/wireguard.nix +++ b/modules/meta/wireguard.nix @@ -1,43 +1,31 @@ { config, lib, - nodes, - pkgs, ... }: let inherit (lib) any - assertMsg attrNames attrValues concatAttrs - concatLists concatMap concatMapStrings concatStringsSep duplicates escapeShellArg filter - filterAttrs - flatten - flip genAttrs head - mapAttrs' mapAttrsToList mdDoc - mergeAttrs mergeToplevelConfigs mkForce mkIf - mkMerge mkOption - nameValuePair net optionalAttrs optionals - partition removeSuffix stringLength types diff --git a/modules/optional/graphical/default.nix b/modules/optional/graphical/default.nix index 4246a0b..d1903b8 100644 --- a/modules/optional/graphical/default.nix +++ b/modules/optional/graphical/default.nix @@ -3,9 +3,4 @@ ./fonts.nix ./wayland.nix ]; - - environment.systemPackages = with pkgs; [ - vaapiVdpau - libvdpau-va-gl - ]; } diff --git a/modules/optional/laptop.nix b/modules/optional/laptop.nix index c471824..8ec703c 100644 --- a/modules/optional/laptop.nix +++ b/modules/optional/laptop.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ systemd.network.wait-online.anyInterface = true; services = { diff --git a/modules/repo/distributed-config.nix b/modules/repo/distributed-config.nix index becec99..37864f8 100644 --- a/modules/repo/distributed-config.nix +++ b/modules/repo/distributed-config.nix @@ -1,6 +1,5 @@ { config, - inputs, lib, options, nodes, @@ -10,17 +9,12 @@ (lib) attrNames concatMap - elem - foldl' getAttrFromPath mdDoc - mkIf mkOption mkOptionType mkMerge - recursiveUpdate hasAttrByPath - setAttrByPath types ; @@ -31,7 +25,7 @@ in { description = mdDoc "Allows extending the configuration of other machines."; type = types.attrsOf (mkOptionType { name = "Toplevel NixOS config"; - merge = loc: map (x: x.value); + merge = _loc: map (x: x.value); }); }; diff --git a/modules/repo/meta.nix b/modules/repo/meta.nix index 3a6d4d4..1ecc9c1 100644 --- a/modules/repo/meta.nix +++ b/modules/repo/meta.nix @@ -9,8 +9,6 @@ mkOption types ; - - cfg = config.node; in { options.node = { name = mkOption { diff --git a/modules/repo/secrets.nix b/modules/repo/secrets.nix index e17cc34..ad063ea 100644 --- a/modules/repo/secrets.nix +++ b/modules/repo/secrets.nix @@ -2,17 +2,14 @@ config, inputs, lib, - pkgs, ... }: let inherit (lib) assertMsg - attrNames literalExpression mapAttrs mdDoc - mkIf mkOption types ; diff --git a/modules/system/deteministic-ids.nix b/modules/system/deteministic-ids.nix index 505ae25..65d931c 100644 --- a/modules/system/deteministic-ids.nix +++ b/modules/system/deteministic-ids.nix @@ -11,7 +11,6 @@ mkDefault mdDoc mkIf - mkMerge mkOption types ; diff --git a/nix/generate-node.nix b/nix/generate-node.nix index ab2a407..eb1c4f6 100644 --- a/nix/generate-node.nix +++ b/nix/generate-node.nix @@ -2,14 +2,11 @@ self, agenix, agenix-rekey, - colmena, disko, elewrap, home-manager, impermanence, - microvm, nixos-nftables-firewall, - nixpkgs, ... } @ inputs: { # The name of the generated node diff --git a/pkgs/caddy.nix b/pkgs/caddy.nix index 17513ef..f452b30 100644 --- a/pkgs/caddy.nix +++ b/pkgs/caddy.nix @@ -3,7 +3,6 @@ self: super: let (self.lib) escapeShellArg concatMapStrings - flatten flip ; diff --git a/pkgs/default.nix b/pkgs/default.nix index e621d4f..8f26365 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,9 +1,9 @@ [ (import ./caddy.nix) (import ./oauth2-proxy) - (self: super: { + (_self: super: { kanidm-secret-manipulator = super.callPackage ./kanidm-secret-manipulator.nix {}; - kanidm = super.kanidm.overrideAttrs (finalAttrs: previousAttrs: { + kanidm = super.kanidm.overrideAttrs (_finalAttrs: _previousAttrs: { patches = [ (super.fetchpatch { name = "group-list-json-output.patch"; diff --git a/pkgs/oauth2-proxy/default.nix b/pkgs/oauth2-proxy/default.nix index 72a5e14..76dc995 100644 --- a/pkgs/oauth2-proxy/default.nix +++ b/pkgs/oauth2-proxy/default.nix @@ -1,4 +1,4 @@ -self: super: { +_self: super: { oauth2-proxy = super.oauth2-proxy.overrideAttrs (_: { patches = [./0001-scopes-as-groups.patch]; }); diff --git a/users/common/default.nix b/users/common/default.nix index 11f0c36..d31034c 100644 --- a/users/common/default.nix +++ b/users/common/default.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{...}: { imports = [ ./modules/uid.nix diff --git a/users/common/shell/default.nix b/users/common/shell/default.nix index 3fc52af..edabaf2 100644 --- a/users/common/shell/default.nix +++ b/users/common/shell/default.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{...}: { imports = [ ./nushell.nix ./starship.nix diff --git a/users/myuser/gpg.nix b/users/myuser/gpg.nix index 51f7ef0..53abb42 100644 --- a/users/myuser/gpg.nix +++ b/users/myuser/gpg.nix @@ -1,8 +1,4 @@ -{ - lib, - nixosConfig, - ... -}: { +{nixosConfig, ...}: { programs.gpg = { enable = true; scdaemonSettings.disable-ccid = true; diff --git a/users/myuser/graphical/kitty.nix b/users/myuser/graphical/kitty.nix index bdeafe1..f08f5c3 100644 --- a/users/myuser/graphical/kitty.nix +++ b/users/myuser/graphical/kitty.nix @@ -1,14 +1,10 @@ -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { home.sessionVariables = { TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo"; }; programs.kitty = { enable = true; - package = pkgs.kitty.overrideAttrs (finalAttrs: prevAttrs: { + package = pkgs.kitty.overrideAttrs (_finalAttrs: _prevAttrs: { doCheck = false; }); font = { diff --git a/users/myuser/ssh.nix b/users/myuser/ssh.nix index 7006700..7828eb6 100644 --- a/users/myuser/ssh.nix +++ b/users/myuser/ssh.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ home.file.".ssh/yubikey.pub".text = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA5Uq+CDy5Pmt3If5M6d8K/Q7HArU6sZ7sgoj3T521Wm"; programs.ssh = { enable = true;