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
|
## static analysis checks for nix
|
||||||
nil.enable = true;
|
nil.enable = true;
|
||||||
statix.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
|
# json hooks
|
||||||
check-json = {
|
check-json = {
|
||||||
|
14
flake.nix
14
flake.nix
@ -110,17 +110,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{ self, nixpkgs, ... }@inputs:
|
||||||
self,
|
|
||||||
nix,
|
|
||||||
home-manager,
|
|
||||||
nixos-hardware,
|
|
||||||
nixos-modules,
|
|
||||||
nixpkgs,
|
|
||||||
sops-nix,
|
|
||||||
wired-notify,
|
|
||||||
...
|
|
||||||
}@inputs:
|
|
||||||
let
|
let
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
@ -135,7 +125,7 @@
|
|||||||
|
|
||||||
# adds our lib functions to lib namespace
|
# adds our lib functions to lib namespace
|
||||||
lib = nixpkgs.lib.extend (
|
lib = nixpkgs.lib.extend (
|
||||||
self: super:
|
self: _:
|
||||||
import ./lib {
|
import ./lib {
|
||||||
inherit nixpkgs inputs;
|
inherit nixpkgs inputs;
|
||||||
lib = self;
|
lib = self;
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
{
|
{ pulls, branches, ... }:
|
||||||
nixpkgs,
|
|
||||||
pulls,
|
|
||||||
branches,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { };
|
|
||||||
|
|
||||||
# create the json spec for the jobset
|
# create the json spec for the jobset
|
||||||
makeSpec =
|
makeSpec =
|
||||||
contents:
|
contents:
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
lsdir =
|
lsdir =
|
||||||
dir:
|
dir:
|
||||||
lib.optionals (builtins.pathExists 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
|
# return full paths of all files in a directory
|
||||||
|
@ -69,8 +69,8 @@ rec {
|
|||||||
user: src:
|
user: src:
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}@args:
|
}@args:
|
||||||
{
|
{
|
||||||
@ -153,7 +153,7 @@ rec {
|
|||||||
users,
|
users,
|
||||||
home ? true,
|
home ? true,
|
||||||
modules ? [ ],
|
modules ? [ ],
|
||||||
server ? true,
|
# server ? true,
|
||||||
sops ? true,
|
sops ? true,
|
||||||
system ? "x86_64-linux",
|
system ? "x86_64-linux",
|
||||||
}@args:
|
}@args:
|
||||||
|
@ -66,7 +66,7 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
systemd.services = lib.mapAttrs' (
|
systemd.services = lib.mapAttrs' (
|
||||||
repo:
|
_:
|
||||||
{
|
{
|
||||||
repo-name,
|
repo-name,
|
||||||
ssh-key,
|
ssh-key,
|
||||||
@ -90,7 +90,7 @@ in
|
|||||||
) repos;
|
) repos;
|
||||||
|
|
||||||
systemd.timers = lib.mapAttrs' (
|
systemd.timers = lib.mapAttrs' (
|
||||||
repo:
|
_:
|
||||||
{ repo-name, frequency, ... }:
|
{ repo-name, frequency, ... }:
|
||||||
lib.nameValuePair "autopull@${repo-name}" {
|
lib.nameValuePair "autopull@${repo-name}" {
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
{
|
{ pkgs, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
# rtkit is optional but recommended
|
# rtkit is optional but recommended
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
{
|
{ pkgs, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
# installs hyprland, and its dependencies
|
# installs hyprland, and its dependencies
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
{
|
{ pkgs, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
# custom module from modules/pam-fingerprint-swap.nix
|
# custom module from modules/pam-fingerprint-swap.nix
|
||||||
# swaps password and fingerprint in pam ordering
|
# swaps password and fingerprint in pam ordering
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
{
|
{ pkgs, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
{
|
{ pkgs, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
{
|
{ pkgs, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ pkgs.steam-run ];
|
environment.systemPackages = [ pkgs.steam-run ];
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
@ -5,12 +5,6 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
keygen = key: {
|
|
||||||
format = "binary";
|
|
||||||
sopsFile = ./keys/${key};
|
|
||||||
mode = "0400";
|
|
||||||
path = "/crypto/keys/${key}";
|
|
||||||
};
|
|
||||||
bootkey = key: { "/crypto/keys/${key}" = /crypto/keys/${key}; };
|
bootkey = key: { "/crypto/keys/${key}" = /crypto/keys/${key}; };
|
||||||
zfskeys = [
|
zfskeys = [
|
||||||
"zfs-attic-key"
|
"zfs-attic-key"
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
{
|
{ ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
{
|
{ ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
{
|
{ ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user