From 142a6401547c80dbd8b29d3cc784d0397997e804 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 17 Oct 2022 14:54:48 +0200 Subject: [PATCH] treewide: apply deadnix fixes --- cluster/lib/inject-nixos-config.nix | 2 +- cluster/lib/service-module.nix | 2 +- cluster/services/dns/admin.nix | 2 +- cluster/services/dns/authoritative.nix | 2 +- cluster/services/irc/default.nix | 2 +- cluster/services/websites/default.nix | 2 -- cluster/services/websites/host.nix | 2 +- hosts/VEGAS/hardware-configuration.nix | 2 +- hosts/VEGAS/modules/nginx/default.nix | 2 +- hosts/VEGAS/modules/oauth2-proxy/default.nix | 4 ++-- hosts/VEGAS/services/fbi/default.nix | 2 +- hosts/VEGAS/services/ipfs/default.nix | 2 +- hosts/VEGAS/services/jokes/default.nix | 2 +- hosts/VEGAS/services/mail/imap.nix | 2 +- hosts/VEGAS/services/monitoring/default.nix | 2 +- hosts/VEGAS/services/object-storage/default.nix | 2 +- hosts/VEGAS/services/websites/default.nix | 2 +- hosts/VEGAS/services/wireguard-server/default.nix | 2 +- hosts/VEGAS/system.nix | 2 +- hosts/prophet/hardware-configuration.nix | 2 +- hosts/prophet/modules/nginx/default.nix | 2 +- hosts/prophet/system.nix | 2 +- hosts/soda/system.nix | 2 +- modules/autopatch/default.nix | 1 - modules/enterprise/default.nix | 2 +- modules/hardened/default.nix | 1 - modules/hydra/default.nix | 2 +- modules/nix-builder/default.nix | 1 - modules/nix-register-flakes/default.nix | 2 +- modules/port-magic/default.nix | 2 +- modules/shell-config/default.nix | 2 +- modules/ssh/default.nix | 2 +- packages/checks/default.nix | 2 +- packages/part.nix | 2 +- packages/projects.nix | 2 +- 35 files changed, 32 insertions(+), 37 deletions(-) diff --git a/cluster/lib/inject-nixos-config.nix b/cluster/lib/inject-nixos-config.nix index c8b8bc3..0355f97 100644 --- a/cluster/lib/inject-nixos-config.nix +++ b/cluster/lib/inject-nixos-config.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ lib, ... }: with lib; { diff --git a/cluster/lib/service-module.nix b/cluster/lib/service-module.nix index a9dfee8..684ff44 100644 --- a/cluster/lib/service-module.nix +++ b/cluster/lib/service-module.nix @@ -1,5 +1,5 @@ vars: -{ name, config, lib, ... }: +{ config, lib, ... }: with lib; let diff --git a/cluster/services/dns/admin.nix b/cluster/services/dns/admin.nix index 77c009e..3f9ce65 100644 --- a/cluster/services/dns/admin.nix +++ b/cluster/services/dns/admin.nix @@ -1,4 +1,4 @@ -{ cluster, config, hosts, inputs, lib, pkgs, tools, ... }: +{ cluster, config, lib, pkgs, tools, ... }: let inherit (tools.meta) domain; diff --git a/cluster/services/dns/authoritative.nix b/cluster/services/dns/authoritative.nix index 014d091..e381a6d 100644 --- a/cluster/services/dns/authoritative.nix +++ b/cluster/services/dns/authoritative.nix @@ -1,4 +1,4 @@ -{ cluster, config, hosts, inputs, lib, pkgs, tools, ... }: +{ cluster, config, hosts, lib, ... }: let inherit (hosts.${config.networking.hostName}) interfaces; diff --git a/cluster/services/irc/default.nix b/cluster/services/irc/default.nix index 4ff99c5..03620ad 100644 --- a/cluster/services/irc/default.nix +++ b/cluster/services/irc/default.nix @@ -1,4 +1,4 @@ -{ config, tools, ... }: +{ tools, ... }: { vars = { diff --git a/cluster/services/websites/default.nix b/cluster/services/websites/default.nix index 4f1787a..85c6380 100644 --- a/cluster/services/websites/default.nix +++ b/cluster/services/websites/default.nix @@ -1,5 +1,3 @@ -{ config, ... }: - { services.websites = { nodes = { diff --git a/cluster/services/websites/host.nix b/cluster/services/websites/host.nix index fd30e7b..e9a6e6d 100644 --- a/cluster/services/websites/host.nix +++ b/cluster/services/websites/host.nix @@ -1,4 +1,4 @@ -{ config, inputs, lib, pkgs, tools, ... }: +{ inputs, lib, pkgs, tools, ... }: let importWebsites = expr: import expr { diff --git a/hosts/VEGAS/hardware-configuration.nix b/hosts/VEGAS/hardware-configuration.nix index f718cc3..620c69a 100644 --- a/hosts/VEGAS/hardware-configuration.nix +++ b/hosts/VEGAS/hardware-configuration.nix @@ -1,7 +1,7 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ modulesPath, ... }: { imports = diff --git a/hosts/VEGAS/modules/nginx/default.nix b/hosts/VEGAS/modules/nginx/default.nix index 595c3c6..f3a9566 100644 --- a/hosts/VEGAS/modules/nginx/default.nix +++ b/hosts/VEGAS/modules/nginx/default.nix @@ -1,4 +1,4 @@ -{ lib, config, tools, ... }: +{ config, tools, ... }: let inherit (tools.meta) adminEmail; diff --git a/hosts/VEGAS/modules/oauth2-proxy/default.nix b/hosts/VEGAS/modules/oauth2-proxy/default.nix index 9724b49..cada4a9 100644 --- a/hosts/VEGAS/modules/oauth2-proxy/default.nix +++ b/hosts/VEGAS/modules/oauth2-proxy/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, tools, ... }: +{ config, lib, tools, ... }: let inherit (tools.meta) domain; login = x: "https://login.${domain}/auth/realms/master/protocol/openid-connect/${x}"; @@ -35,7 +35,7 @@ in skip-provider-button = true; }; }; - services.nginx.virtualHosts = lib.genAttrs cfg.nginx.virtualHosts (vhost: { + services.nginx.virtualHosts = lib.genAttrs cfg.nginx.virtualHosts (_vhost: { # apply protection to the whole vhost, not just / extraConfig = '' auth_request /oauth2/auth; diff --git a/hosts/VEGAS/services/fbi/default.nix b/hosts/VEGAS/services/fbi/default.nix index 7886a8d..74f7755 100644 --- a/hosts/VEGAS/services/fbi/default.nix +++ b/hosts/VEGAS/services/fbi/default.nix @@ -1,4 +1,4 @@ -{ config, lib, tools, ... }: +{ config, tools, ... }: with tools.nginx; { links = { diff --git a/hosts/VEGAS/services/ipfs/default.nix b/hosts/VEGAS/services/ipfs/default.nix index 7a6a559..0f93fc7 100644 --- a/hosts/VEGAS/services/ipfs/default.nix +++ b/hosts/VEGAS/services/ipfs/default.nix @@ -1,4 +1,4 @@ -{ aspect, config, hosts, lib, pkgs, tools, ... }: +{ aspect, config, hosts, tools, ... }: with tools.nginx; let inherit (tools.meta) domain; diff --git a/hosts/VEGAS/services/jokes/default.nix b/hosts/VEGAS/services/jokes/default.nix index 7bbc14b..3a545c4 100644 --- a/hosts/VEGAS/services/jokes/default.nix +++ b/hosts/VEGAS/services/jokes/default.nix @@ -1,4 +1,4 @@ -{ config, lib, tools, ... }: +{ tools, ... }: with tools.nginx.mappers; with tools.nginx.vhosts; { diff --git a/hosts/VEGAS/services/mail/imap.nix b/hosts/VEGAS/services/mail/imap.nix index a346e26..bfdd544 100644 --- a/hosts/VEGAS/services/mail/imap.nix +++ b/hosts/VEGAS/services/mail/imap.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, tools, ... }: +{ config, pkgs, tools, ... }: let inherit (tools.identity) ldap; inherit (tools.meta) domain; diff --git a/hosts/VEGAS/services/monitoring/default.nix b/hosts/VEGAS/services/monitoring/default.nix index ee68073..418f48d 100644 --- a/hosts/VEGAS/services/monitoring/default.nix +++ b/hosts/VEGAS/services/monitoring/default.nix @@ -1,4 +1,4 @@ -{ cluster, config, hosts, inputs, lib, pkgs, tools, ... }: +{ cluster, config, inputs, lib, pkgs, tools, ... }: let inherit (tools.meta) domain; diff --git a/hosts/VEGAS/services/object-storage/default.nix b/hosts/VEGAS/services/object-storage/default.nix index 9c83fb9..55f6e90 100644 --- a/hosts/VEGAS/services/object-storage/default.nix +++ b/hosts/VEGAS/services/object-storage/default.nix @@ -1,4 +1,4 @@ -{ config, inputs, lib, pkgs, tools, ... }: +{ config, lib, tools, ... }: with tools.nginx; let inherit (config) links; diff --git a/hosts/VEGAS/services/websites/default.nix b/hosts/VEGAS/services/websites/default.nix index ee9358e..f657d4b 100644 --- a/hosts/VEGAS/services/websites/default.nix +++ b/hosts/VEGAS/services/websites/default.nix @@ -1,4 +1,4 @@ -{ config, inputs, lib, pkgs, tools, ... }: +{ inputs, pkgs, tools, ... }: let importWebsites = expr: import expr { diff --git a/hosts/VEGAS/services/wireguard-server/default.nix b/hosts/VEGAS/services/wireguard-server/default.nix index c38436d..8da670a 100644 --- a/hosts/VEGAS/services/wireguard-server/default.nix +++ b/hosts/VEGAS/services/wireguard-server/default.nix @@ -1,4 +1,4 @@ -{ config, hosts, ... }: +{ config, ... }: let inherit (config.networking) hostName; diff --git a/hosts/VEGAS/system.nix b/hosts/VEGAS/system.nix index b6cdaa6..6a9357d 100644 --- a/hosts/VEGAS/system.nix +++ b/hosts/VEGAS/system.nix @@ -1,4 +1,4 @@ -{ aspect, config, hosts, inputs, lib, pkgs, tools, ... }: +{ aspect, config, hosts, inputs, tools, ... }: { imports = diff --git a/hosts/prophet/hardware-configuration.nix b/hosts/prophet/hardware-configuration.nix index 3b47d1f..ba0f2e0 100644 --- a/hosts/prophet/hardware-configuration.nix +++ b/hosts/prophet/hardware-configuration.nix @@ -1,7 +1,7 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ modulesPath, ... }: { imports = diff --git a/hosts/prophet/modules/nginx/default.nix b/hosts/prophet/modules/nginx/default.nix index 595c3c6..f3a9566 100644 --- a/hosts/prophet/modules/nginx/default.nix +++ b/hosts/prophet/modules/nginx/default.nix @@ -1,4 +1,4 @@ -{ lib, config, tools, ... }: +{ config, tools, ... }: let inherit (tools.meta) adminEmail; diff --git a/hosts/prophet/system.nix b/hosts/prophet/system.nix index 3811fda..41157d4 100644 --- a/hosts/prophet/system.nix +++ b/hosts/prophet/system.nix @@ -1,4 +1,4 @@ -{ aspect, inputs, config, hosts, pkgs, ... }: +{ aspect, inputs, hosts, ... }: { imports = diff --git a/hosts/soda/system.nix b/hosts/soda/system.nix index e6cf987..0fbec11 100644 --- a/hosts/soda/system.nix +++ b/hosts/soda/system.nix @@ -1,4 +1,4 @@ -{ pkgs, aspect, hosts, tools, ... }: +{ aspect, hosts, ... }: { imports = with aspect; [ diff --git a/modules/autopatch/default.nix b/modules/autopatch/default.nix index 5c0c1df..1cb0565 100644 --- a/modules/autopatch/default.nix +++ b/modules/autopatch/default.nix @@ -1,4 +1,3 @@ -{ pkgs, lib, config, inputs, ... }: { nixpkgs.overlays = [ (self: super: diff --git a/modules/enterprise/default.nix b/modules/enterprise/default.nix index fc7cccf..da4aa9c 100644 --- a/modules/enterprise/default.nix +++ b/modules/enterprise/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, hosts, inputs, lib, tools, ... }: +{ config, hosts, lib, tools, ... }: let orgDomain = tools.meta.domain; orgRealm = lib.toUpper orgDomain; diff --git a/modules/hardened/default.nix b/modules/hardened/default.nix index b2e336e..d51d7ac 100644 --- a/modules/hardened/default.nix +++ b/modules/hardened/default.nix @@ -1,4 +1,3 @@ -{ pkgs, config, ... }: { boot.kernel.sysctl = { "kernel.yama.ptrace_scope" = 1; diff --git a/modules/hydra/default.nix b/modules/hydra/default.nix index 6fd9e7d..df93901 100644 --- a/modules/hydra/default.nix +++ b/modules/hydra/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, config, ... }: +{ lib, config, ... }: { age.secrets = { hydraS3 = { diff --git a/modules/nix-builder/default.nix b/modules/nix-builder/default.nix index 430df41..e825c0c 100644 --- a/modules/nix-builder/default.nix +++ b/modules/nix-builder/default.nix @@ -1,4 +1,3 @@ -{ pkgs, config, ... }: { nix.trustedUsers = [ "nix" ]; users.users.nix = { diff --git a/modules/nix-register-flakes/default.nix b/modules/nix-register-flakes/default.nix index 009148e..7b698f9 100644 --- a/modules/nix-register-flakes/default.nix +++ b/modules/nix-register-flakes/default.nix @@ -1,4 +1,4 @@ -{ config, inputs, ... }: +{ inputs, ... }: with inputs; { diff --git a/modules/port-magic/default.nix b/modules/port-magic/default.nix index f867d5d..974f824 100644 --- a/modules/port-magic/default.nix +++ b/modules/port-magic/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ lib, ... }: with lib; diff --git a/modules/shell-config/default.nix b/modules/shell-config/default.nix index 024cedb..947c68b 100644 --- a/modules/shell-config/default.nix +++ b/modules/shell-config/default.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: +{ pkgs, ... }: let component = name: builtins.readFile (builtins.toString ../../config/zsh/components + "/${name}.zsh"); diff --git a/modules/ssh/default.nix b/modules/ssh/default.nix index 2f0e197..57d87fd 100644 --- a/modules/ssh/default.nix +++ b/modules/ssh/default.nix @@ -1,4 +1,4 @@ -{ hosts, config, lib, ... }: +{ hosts, lib, ... }: let filtered = lib.filterAttrs (_: host: host ? ssh) hosts; idCapable = lib.filterAttrs (_: host: host.ssh ? id) filtered; diff --git a/packages/checks/default.nix b/packages/checks/default.nix index 25e9189..7eba7c9 100644 --- a/packages/checks/default.nix +++ b/packages/checks/default.nix @@ -1,4 +1,4 @@ -{ filters, inputs', pkgs, self, self', ... }: +{ filters, pkgs, self, self', ... }: { checks = filters.doFilter filters.checks { keycloak = pkgs.callPackage ./keycloak-custom-jre.nix { diff --git a/packages/part.nix b/packages/part.nix index c0df59f..946dbb2 100644 --- a/packages/part.nix +++ b/packages/part.nix @@ -1,4 +1,4 @@ -{ inputs, lib, ... }: +{ lib, ... }: let filters = import ./system-filter.nix; doFilter' = system: filterSet: lib.filterAttrs (name: _: diff --git a/packages/projects.nix b/packages/projects.nix index 14e7ed1..cca0e2e 100644 --- a/packages/projects.nix +++ b/packages/projects.nix @@ -1,7 +1,7 @@ { inputs, self, ... }: { - perSystem = { filters, inputs', pkgs, self', system, ... }: + perSystem = { filters, pkgs, self', ... }: let inherit (self'.packages) nix-super;