diff --git a/checks.nix b/checks.nix index a214212..3cfebe5 100644 --- a/checks.nix +++ b/checks.nix @@ -23,6 +23,15 @@ forEachSystem (system: { ## static analysis checks for nix nil.enable = true; statix.enable = true; + deadnix = { + enable = true; + settings = { + noUnderscore = true; # ignore variables starting with underscore + # ignore lambda patterns (useful for passing args from ({}@args) + # to other functions) + noLambdaPatternNames = true; + }; + }; # json hooks check-json = { diff --git a/flake.nix b/flake.nix index 453e0ad..b7bfe35 100644 --- a/flake.nix +++ b/flake.nix @@ -110,17 +110,7 @@ }; outputs = - { - self, - nix, - home-manager, - nixos-hardware, - nixos-modules, - nixpkgs, - sops-nix, - wired-notify, - ... - }@inputs: + { self, nixpkgs, ... }@inputs: let systems = [ "x86_64-linux" @@ -135,7 +125,7 @@ # adds our lib functions to lib namespace lib = nixpkgs.lib.extend ( - self: super: + self: _: import ./lib { inherit nixpkgs inputs; lib = self; diff --git a/hydra/jobsets.nix b/hydra/jobsets.nix index 2918536..d04b2be 100644 --- a/hydra/jobsets.nix +++ b/hydra/jobsets.nix @@ -1,12 +1,5 @@ -{ - nixpkgs, - pulls, - branches, - ... -}: +{ pulls, branches, ... }: let - pkgs = import nixpkgs { }; - # create the json spec for the jobset makeSpec = contents: diff --git a/lib/default.nix b/lib/default.nix index 240ebb3..35d23a8 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -44,7 +44,7 @@ lsdir = dir: lib.optionals (builtins.pathExists dir) ( - lib.attrNames (lib.filterAttrs (path: type: type == "directory") (builtins.readDir dir)) + lib.attrNames (lib.filterAttrs (_: type: type == "directory") (builtins.readDir dir)) ); # return full paths of all files in a directory diff --git a/lib/systems.nix b/lib/systems.nix index 3a15482..c8b179a 100644 --- a/lib/systems.nix +++ b/lib/systems.nix @@ -69,8 +69,8 @@ rec { user: src: { config, - lib, pkgs, + lib, ... }@args: { @@ -153,7 +153,7 @@ rec { users, home ? true, modules ? [ ], - server ? true, + # server ? true, sops ? true, system ? "x86_64-linux", }@args: diff --git a/modules/autopull.nix b/modules/autopull.nix index 0a112c3..897622b 100644 --- a/modules/autopull.nix +++ b/modules/autopull.nix @@ -66,7 +66,7 @@ in ]; systemd.services = lib.mapAttrs' ( - repo: + _: { repo-name, ssh-key, @@ -90,7 +90,7 @@ in ) repos; systemd.timers = lib.mapAttrs' ( - repo: + _: { repo-name, frequency, ... }: lib.nameValuePair "autopull@${repo-name}" { wantedBy = [ "timers.target" ]; diff --git a/systems/artemision/audio.nix b/systems/artemision/audio.nix index a72fb51..f41b4e0 100644 --- a/systems/artemision/audio.nix +++ b/systems/artemision/audio.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ pkgs, ... }: { # rtkit is optional but recommended diff --git a/systems/artemision/desktop.nix b/systems/artemision/desktop.nix index 085cf03..1c4aab3 100644 --- a/systems/artemision/desktop.nix +++ b/systems/artemision/desktop.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ pkgs, ... }: { # installs hyprland, and its dependencies diff --git a/systems/artemision/fingerprint.nix b/systems/artemision/fingerprint.nix index beafc0d..27a1d8b 100644 --- a/systems/artemision/fingerprint.nix +++ b/systems/artemision/fingerprint.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ pkgs, ... }: { # custom module from modules/pam-fingerprint-swap.nix # swaps password and fingerprint in pam ordering diff --git a/systems/artemision/graphics.nix b/systems/artemision/graphics.nix index eee1b17..f0730e3 100644 --- a/systems/artemision/graphics.nix +++ b/systems/artemision/graphics.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ pkgs, ... }: { hardware.opengl = { diff --git a/systems/artemision/polkit.nix b/systems/artemision/polkit.nix index 2655902..1b012c9 100644 --- a/systems/artemision/polkit.nix +++ b/systems/artemision/polkit.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ pkgs, ... }: { security.polkit.enable = true; diff --git a/systems/artemision/steam.nix b/systems/artemision/steam.nix index aab9c6e..e6a0cff 100644 --- a/systems/artemision/steam.nix +++ b/systems/artemision/steam.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ pkgs, ... }: { environment.systemPackages = [ pkgs.steam-run ]; diff --git a/systems/jeeves/hardware.nix b/systems/jeeves/hardware.nix index 6407767..b4ae8c8 100644 --- a/systems/jeeves/hardware.nix +++ b/systems/jeeves/hardware.nix @@ -4,7 +4,6 @@ { config, lib, - pkgs, modulesPath, ... }: diff --git a/systems/palatine-hill/configuration.nix b/systems/palatine-hill/configuration.nix index d3ecdc6..e4c04a2 100644 --- a/systems/palatine-hill/configuration.nix +++ b/systems/palatine-hill/configuration.nix @@ -5,12 +5,6 @@ ... }: let - keygen = key: { - format = "binary"; - sopsFile = ./keys/${key}; - mode = "0400"; - path = "/crypto/keys/${key}"; - }; bootkey = key: { "/crypto/keys/${key}" = /crypto/keys/${key}; }; zfskeys = [ "zfs-attic-key" diff --git a/systems/rhapsody-in-green/hardware.nix b/systems/rhapsody-in-green/hardware.nix index 4fd80b7..b9c1e39 100644 --- a/systems/rhapsody-in-green/hardware.nix +++ b/systems/rhapsody-in-green/hardware.nix @@ -4,7 +4,6 @@ { config, lib, - pkgs, modulesPath, ... }: diff --git a/users/alice/home/doom/default.nix b/users/alice/home/doom/default.nix index b0b8c4a..bdfe9db 100644 --- a/users/alice/home/doom/default.nix +++ b/users/alice/home/doom/default.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ ... }: { xdg.configFile = { diff --git a/users/alice/home/git.nix b/users/alice/home/git.nix index 661b2a8..284da0c 100644 --- a/users/alice/home/git.nix +++ b/users/alice/home/git.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ ... }: { programs.git = { diff --git a/users/alice/home/waybar.nix b/users/alice/home/waybar.nix index 3623ea2..a768fd6 100644 --- a/users/alice/home/waybar.nix +++ b/users/alice/home/waybar.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ ... }: { programs.waybar = { diff --git a/users/alice/home/zsh.nix b/users/alice/home/zsh.nix index daa93f7..b58b2a8 100644 --- a/users/alice/home/zsh.nix +++ b/users/alice/home/zsh.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ ... }: { programs.zsh = {