applies all recommended deadnix fixes, and adds it to checks
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
parent
f3f6c463ca
commit
3522ebd8c5
@ -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 = {
|
||||
|
14
flake.nix
14
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;
|
||||
|
@ -1,12 +1,5 @@
|
||||
{
|
||||
nixpkgs,
|
||||
pulls,
|
||||
branches,
|
||||
...
|
||||
}:
|
||||
{ pulls, branches, ... }:
|
||||
let
|
||||
pkgs = import nixpkgs { };
|
||||
|
||||
# create the json spec for the jobset
|
||||
makeSpec =
|
||||
contents:
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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" ];
|
||||
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# rtkit is optional but recommended
|
||||
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# installs hyprland, and its dependencies
|
||||
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# custom module from modules/pam-fingerprint-swap.nix
|
||||
# swaps password and fingerprint in pam ordering
|
||||
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.opengl = {
|
||||
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
security.polkit.enable = true;
|
||||
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = [ pkgs.steam-run ];
|
||||
|
@ -4,7 +4,6 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
@ -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"
|
||||
|
@ -4,7 +4,6 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
xdg.configFile = {
|
||||
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
|
@ -1,9 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.waybar = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
|
||||
programs.zsh = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user