applies all recommended deadnix fixes, and adds it to checks

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2024-05-21 19:47:21 -04:00 committed by Richie Cahill
parent f3f6c463ca
commit 3522ebd8c5
19 changed files with 27 additions and 88 deletions

View File

@ -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 = {

View File

@ -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;

View File

@ -1,12 +1,5 @@
{
nixpkgs,
pulls,
branches,
...
}:
{ pulls, branches, ... }:
let
pkgs = import nixpkgs { };
# create the json spec for the jobset
makeSpec =
contents:

View File

@ -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

View File

@ -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:

View File

@ -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" ];

View File

@ -1,9 +1,4 @@
{
config,
lib,
pkgs,
...
}:
{ pkgs, ... }:
{
# rtkit is optional but recommended

View File

@ -1,9 +1,4 @@
{
config,
lib,
pkgs,
...
}:
{ pkgs, ... }:
{
# installs hyprland, and its dependencies

View File

@ -1,9 +1,4 @@
{
config,
lib,
pkgs,
...
}:
{ pkgs, ... }:
{
# custom module from modules/pam-fingerprint-swap.nix
# swaps password and fingerprint in pam ordering

View File

@ -1,9 +1,4 @@
{
config,
lib,
pkgs,
...
}:
{ pkgs, ... }:
{
hardware.opengl = {

View File

@ -1,9 +1,4 @@
{
config,
lib,
pkgs,
...
}:
{ pkgs, ... }:
{
security.polkit.enable = true;

View File

@ -1,9 +1,4 @@
{
config,
lib,
pkgs,
...
}:
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.steam-run ];

View File

@ -4,7 +4,6 @@
{
config,
lib,
pkgs,
modulesPath,
...
}:

View File

@ -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"

View File

@ -4,7 +4,6 @@
{
config,
lib,
pkgs,
modulesPath,
...
}:

View File

@ -1,9 +1,4 @@
{
config,
lib,
pkgs,
...
}:
{ ... }:
{
xdg.configFile = {

View File

@ -1,9 +1,4 @@
{
config,
lib,
pkgs,
...
}:
{ ... }:
{
programs.git = {

View File

@ -1,9 +1,4 @@
{
config,
lib,
pkgs,
...
}:
{ ... }:
{
programs.waybar = {

View File

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ ... }:
{
programs.zsh = {