all: cleanup dead code

This commit is contained in:
Aaron Bieber 2023-03-22 10:35:46 -06:00
parent 4100ba4a66
commit 7d6022024f
No known key found for this signature in database
66 changed files with 90 additions and 168 deletions

View File

@ -5,7 +5,7 @@ set -e
find . -name \*.nix -exec nix fmt {} \+
find . -name \*.sh -exec shfmt -w {} \+
deadnix -f -l -L .
deadnix -f .
shfmt -w bin/deploy
shfmt -w bin/mkboot
statix check .

View File

@ -1,4 +1,4 @@
{ pkgs, lib, isUnstable, ... }:
{ pkgs, isUnstable, ... }:
let
gosignify = pkgs.callPackage ../pkgs/gosignify.nix { inherit isUnstable; };

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, inputs, xinlib, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.services.xinCA;
stepKmsPlugin = pkgs.callPackage ../pkgs/step-kms-plugin.nix { };

View File

@ -1,4 +1,4 @@
{ inputs, ... }: {
{ ... }: {
imports = [
./ca.nix
./ci.nix
@ -6,7 +6,6 @@
./develop.nix
./dns.nix
./doas.nix
./gitmux.nix
./git.nix
./neovim.nix
./peerix.nix

View File

@ -1,4 +1,4 @@
{ config, pkgs, isUnstable, ... }:
{ config, isUnstable, ... }:
let
rewriteGitHub = if config.networking.hostName != "stan" then {
url = { "ssh://git@github.com/" = { insteadOf = "https://github.com/"; }; };

View File

@ -1,35 +0,0 @@
{ config, lib, pkgs, ... }: {
#environment.systemPackages = with pkgs; [ gitmux ];
environment.etc."gitmux.conf" = {
text = ''
tmux:
symbols:
branch: ' '
hashprefix: ':'
ahead: ·
behind: ·
staged: ' '
conflict: ' '
modified: ' '
untracked: ' '
stashed: ' '
clean:
styles:
clear: '#[fg=default]'
state: '#[fg=default]'
branch: '#[fg=default]'
remote: '#[fg=default]'
staged: '#[fg=default]'
conflict: '#[fg=default]'
modified: '#[fg=default]'
untracked: '#[fg=default]'
stashed: '#[fg=default]'
clean: '#[fg=default]'
divergence: '#[fg=default]'
layout: [branch, .., remote-branch, divergence, ' - ', flags]
options:
branch_max_len: 0
branch_trim: right
'';
};
}

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ lib, ... }:
with lib;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: {
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [ neomutt urlview ];
environment.etc."neomuttrc" = {
text = ''

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
with pkgs;
let
parchment = pkgs.vimUtils.buildVimPluginFrom2Nix rec {

View File

@ -1,5 +1,4 @@
{ config, lib, ... }:
with lib; {
{ ... }: {
programs.tmux = {
enable = true;
extraConfig = ''

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: {
{ ... }: {
config = {
programs.zsh.interactiveShellInit = ''
export NO_COLOR=1

View File

@ -1,4 +1 @@
{ config, lib, ... }:
with lib; {
imports = [ ./build-consumer.nix ./build-server.nix ];
}
{ ... }: { imports = [ ./build-consumer.nix ./build-server.nix ]; }

View File

@ -1,4 +1,4 @@
{ config, lib, options, pkgs, isUnstable, xinlib, ... }:
{ config, lib, options, pkgs, isUnstable, ... }:
let
caPubKeys = builtins.concatStringsSep "\n" [

View File

@ -88,8 +88,8 @@
};
outputs = { self, unstable, unstableSmall, stable, oldStable, nixos-hardware
, reform, microca, gostart, xintray, tsvnstat, pots, po, tsRevProx, taskobs
, mcchunkie, gqrss, darwin, xin-secrets, talon, peerix, ... }@inputs:
, reform, gostart, xintray, tsvnstat, pots, po, tsRevProx, darwin
, xin-secrets, talon, peerix, ... }@inputs:
let
xinlib = import ./lib;
supportedSystems = [ "x86_64-linux" ];
@ -305,7 +305,7 @@
foldl' recursiveUpdate { } (mapAttrsToList (name: system: {
"${system.pkgs.stdenv.hostPlatform.system}"."${name}" =
system.config.system.build.toplevel;
}) (filterAttrs (n: v: (builtins.elem n buildList))
}) (filterAttrs (n: _: (builtins.elem n buildList))
self.nixosConfigurations));
};
}

View File

@ -1,4 +1,4 @@
{ inputs, lib, config, pkgs, isUnstable, ... }:
{ inputs, config, pkgs, isUnstable, ... }:
let
#photoPrismTag = "220901-bullseye";

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ ... }:
{
boot.initrd.availableKernelModules =

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, modulesPath, inputs, xinlib, ... }:
{ config, pkgs, lib, xinlib, ... }:
let
myEmacs = pkgs.callPackage ../../configs/emacs.nix { };
peerixUser = if builtins.hasAttr "peerix" config.users.users then

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, ... }:
{ config, lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, ... }:
let
pubKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIPMaAm4rDxyU975Z54YiNw3itC2fGc3SaE2VaS1fai8 root@box"

View File

@ -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, ... }:
{ config, lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, isUnstable, inputs, ... }:
{ config, pkgs, isUnstable, ... }:
with pkgs;
let
restic = pkgs.writeScriptBin "restic"
@ -68,9 +68,9 @@ in {
tailscale.sshOnly = true;
nixpkgs.overlays = [
(self: super: {
(_: super: {
weechat = super.weechat.override {
configure = { availablePlugins, ... }: {
configure = { }: {
scripts = with super.weechatScripts; [ highmon weepushover ];
};
};

View File

@ -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, ... }:
{ config, lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
let
pubKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIPMaAm4rDxyU975Z54YiNw3itC2fGc3SaE2VaS1fai8 root@box"
@ -19,7 +19,7 @@ in {
networking.networkmanager.enable = true;
networking.firewall.allowedTCPPorts = [ 22 ];
environment.systemPackages = with pkgs; [ ];
environment.systemPackages = [ ];
users.users.root = userBase;
users.users.qbit = userBase;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, ... }:
{ config, lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

View File

@ -1,4 +1,4 @@
{ config, pkgs, emacs, isUnstable, ... }:
{ pkgs, isUnstable, ... }:
let
secretAgent =
"Contents/Library/LoginItems/SecretAgent.app/Contents/MacOS/SecretAgent";

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, xinlib, ... }:
{ pkgs, ... }:
let
myEmacs = pkgs.callPackage ../../configs/emacs.nix { };

View File

@ -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, ... }:
{ config, lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, inputs, ... }:
{ config, pkgs, lib, ... }:
let
inherit (builtins)
head concatStringsSep attrValues mapAttrs attrNames; # hasAttr;
@ -338,7 +338,7 @@ in {
};
};
interfaces = filterAttrsRecursive (n: v: n != "info") interfaces;
interfaces = filterAttrsRecursive (n: _: n != "info") interfaces;
nftables = {
enable = true;
@ -474,10 +474,10 @@ in {
'') val.info.dhcp.staticIPs)
}
}
'') (filterAttrsRecursive (n: v: n != "${wan}") interfaces)))}
'') (filterAttrsRecursive (n: _: n != "${wan}") interfaces)))}
'';
interfaces = attrNames (filterAttrs (n: v: v.info.dhcp.enable)
(filterAttrsRecursive (n: v: n != "${wan}") interfaces));
interfaces = attrNames (filterAttrs (_: v: v.info.dhcp.enable)
(filterAttrsRecursive (n: _: n != "${wan}") interfaces));
# TODO: Probably a better way to pre-filter the interfaces set
};
};

View File

@ -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, ... }:
{ config, lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

View File

@ -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, ... }:
{ config, lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ ... }:
{
fileSystems = {

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
let
pubKeys = [
@ -40,7 +40,7 @@ in {
isNormalUser = true;
description = "Aaron Bieber";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [ ];
packages = [ ];
};
# neovim will overwrite my neovim!!

View File

@ -1,2 +1,2 @@
{ config, lib, pkgs, ... }: { imports = [ ./ssh-fido-agent.nix ]; }
{ ... }: { imports = [ ./ssh-fido-agent.nix ]; }

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, inputs, ... }:
{ config, lib, pkgs, ... }:
with pkgs;
let
cfg = config.services.golink;

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, prettyJSON, ... }:
{ config, lib, pkgs, ... }:
with pkgs;
let
cfg = config.services.gotosocial;

View File

@ -1,4 +1,4 @@
{ lib, config, pkgs, inputs, ... }:
{ lib, config, pkgs, ... }:
let cfg = config.services.sliding-sync;
in {
options = with lib; {

View File

@ -1,4 +1,4 @@
{ lib, config, pkgs, inputs, ... }:
{ lib, config, pkgs, ... }:
let cfg = config.services.tsrevprox;
in {
options = with lib; {

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, prettyJSON, ... }:
{ config, lib, pkgs, ... }:
with pkgs;
let
cfg = config.services.yarr;

View File

@ -1,4 +1,4 @@
{ pkgs, lib, isUnstable, ... }:
{ pkgs, isUnstable, ... }:
let
openssh = import ./openssh.nix;
tailscale = import ./tailscale.nix;
@ -9,8 +9,8 @@ in {
openssh
tailscale
(self: super: {
rex = super.rex.overrideAttrs (old: {
(_: super: {
rex = super.rex.overrideAttrs (_: {
patches = [
(pkgs.fetchurl {
url = "https://deftly.net/rex-git.diff";

View File

@ -1,6 +1,6 @@
let
matrix-synapse = self: super: {
matrix-synapse = super.matrix-synapse.overrideAttrs (old: rec {
matrix-synapse = _: super: {
matrix-synapse = super.matrix-synapse.overrideAttrs (_: rec {
version = "1.79.0";
pname = "matrix-synapse";

View File

@ -1,6 +1,6 @@
let
openssh = self: super: {
openssh = super.openssh.overrideAttrs (old: rec {
openssh = _: super: {
openssh = super.openssh.overrideAttrs (_: rec {
version = "9.3p1";
src = super.fetchurl {
url = "mirror://openbsd/OpenSSH/portable/openssh-${version}.tar.gz";

View File

@ -1,5 +1,5 @@
let
tailscale = self: super: {
tailscale = _: super: {
tailscale = super.callPackage "${super.path}/pkgs/servers/tailscale" {
buildGoModule = args:
super.buildGo120Module (args // rec {

View File

@ -1,5 +1,4 @@
{ lib, fetchurl, appimageTools, makeDesktopItem, isUnstable, desktop-file-utils
, ... }:
{ fetchurl, appimageTools, desktop-file-utils, ... }:
let
name = "cinny-desktop";

View File

@ -1,10 +1,9 @@
{ config, lib, pkgs, isUnstable, ... }:
{ ... }:
with pkgs; {
environment.systemPackages = with pkgs;
[
#(callPackage ./cinny-desktop.nix { inherit isUnstable; })
#(callPackage ./mudita-center.nix { inherit isUnstable; })
#(callPackage ./govulncheck.nix { inherit isUnstable; })
];
{
environment.systemPackages = [
#(callPackage ./cinny-desktop.nix { inherit isUnstable; })
#(callPackage ./mudita-center.nix { inherit isUnstable; })
#(callPackage ./govulncheck.nix { inherit isUnstable; })
];
}

View File

@ -1,5 +1,4 @@
{ pkgs, buildPythonPackage, setuptools-scm, fetchFromGitHub, PyGithub, pytz, ...
}:
{ buildPythonPackage, setuptools-scm, fetchFromGitHub, PyGithub, pytz, ... }:
buildPythonPackage rec {
pname = "ghexport";

View File

@ -1,35 +0,0 @@
{ lib, buildGoModule, fetchFromGitHub, isUnstable, ... }:
let
vendorHash = if isUnstable then
"sha256-lUVngyYnLwCmNXFBMEDO7ecFZNkSi9GGDNTIG4Mk1Zw="
else
"sha256-oBZaMS7O6MvvznVn9kQ7h0srWvD3VvxerXgghj0CIzM=";
in with lib;
buildGoModule rec {
pname = "gitmux";
version = "0.7.9";
src = fetchFromGitHub {
owner = "arl";
repo = pname;
rev = "v${version}";
sha256 = "sha256-tB/HPOJQEgs3/rHFn7ezi6R9C3HceASLU3WjjKDii9o=";
};
vendorSha256 = vendorHash;
ldflags = [ "-X main.version=${version}" ];
proxyVendor = true;
doCheck = false;
meta = {
description = "Gitmux shows git status in your tmux status bar";
homepage = "https://github.com/arl/gitmux";
license = licenses.mit;
maintainers = with maintainers; [ qbit ];
};
}

View File

@ -1,5 +1,4 @@
{ stdenv, lib, buildGo119Module, fetchFromGitHub, makeWrapper, go, git, ffmpeg
, ... }:
{ lib, buildGo119Module, fetchFromGitHub, go, ffmpeg, ... }:
let
gotosocialVersion = "0.7.1";
gtswaHash = "sha256:0k0i3qw89fq6w2akdbrbg4s3amp5hznr2b5z5dzz2jragvb8a6yx";

View File

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub, isUnstable, ... }:
{ lib, buildGoModule, fetchFromGitHub, ... }:
let vendorHash = "sha256-1zBZREClt8jy0TUXJ1FuBEAJEPQoUcl4DZZ6U2LtRzg=";

View File

@ -1,4 +1,4 @@
{ lib, fetchurl, stdenv, unzip, isUnstable }:
{ lib, fetchurl, stdenv, unzip }:
stdenv.mkDerivation rec {
pname = "hammerspoon";

View File

@ -1,4 +1,4 @@
{ lib, rustPlatform, fetchFromGitHub, stdenv }:
{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage rec {
pname = "iamb";
version = "2023-03-09";

View File

@ -1,11 +1,11 @@
{ lib, stdenv, fetchpatch, fetchurl, pkgs, ... }:
{ lib, stdenv, fetchurl, pkgs, ... }:
stdenv.mkDerivation rec {
pname = "icbirc";
version = "2.1";
src = fetchurl {
url = "http://www.benzedrine.ch/icbirc-2.1.tar.gz";
url = "http://www.benzedrine.ch/icbirc-${version}.tar.gz";
sha256 = "sha256-aDk0TZPABNqX7Gu12AWh234Kee/DhwRFeIBDYnFiu7E=";
};

View File

@ -1,5 +1,4 @@
{ lib, fetchurl, appimageTools, makeDesktopItem, isUnstable, desktop-file-utils
, ... }:
{ fetchurl, appimageTools, desktop-file-utils, ... }:
let
name = "mudita-center";

View File

@ -1,4 +1,4 @@
{ lib, fetchurl, stdenv, undmg, isUnstable }:
{ lib, fetchurl, stdenv, undmg }:
stdenv.mkDerivation rec {
pname = "nheko";

View File

@ -1,4 +1,4 @@
{ pkgs, buildPythonPackage, setuptools-scm, pytest, fetchPypi, ... }:
{ buildPythonPackage, setuptools-scm, pytest, fetchPypi, ... }:
buildPythonPackage rec {
pname = "orgparse";

View File

@ -1,8 +1,7 @@
{ lib, buildPythonPackage, fetchFromGitHub, beautifulsoup4, fastapi, httptools
, pytest, logzero, lxml, mistletoe, more-itertools, mypy, pytz, setuptools
, appdirs, sqlalchemy, tzlocal, urlextract, uvicorn, uvloop, watchfiles
, websockets, orjson, pandas, simplejson, setuptools-scm, decorator, geopy, pkgs
, ... }:
, logzero, lxml, mistletoe, more-itertools, mypy, pytz, setuptools, tzlocal
, urlextract, uvicorn, uvloop, watchfiles, websockets, setuptools-scm, pkgs, ...
}:
with pkgs;
let
hpi = pkgs.python3Packages.callPackage ./hpi.nix { inherit pkgs; };

View File

@ -1,5 +1,5 @@
{ pkgs, lib, stdenv, cargo, fetchFromGitHub, rustPlatform, pkg-config
, openssl_1_1, llvmPackages, libevdev, linuxHeaders }:
{ lib, fetchFromGitHub, rustPlatform, pkg-config, openssl_1_1, llvmPackages
, libevdev, linuxHeaders }:
rustPlatform.buildRustPackage {
pname = "rkvm";

View File

@ -1,4 +1,4 @@
{ lib, fetchurl, stdenv, unzip, isUnstable }:
{ lib, fetchurl, stdenv, unzip }:
stdenv.mkDerivation rec {
pname = "secretive";

View File

@ -1,4 +1,4 @@
{ pkgs, buildPythonPackage, setuptools-scm, sqlcipher, fetchPypi, ... }:
{ buildPythonPackage, setuptools-scm, sqlcipher, fetchPypi, ... }:
buildPythonPackage rec {
pname = "sqlcipher3";

View File

@ -1,5 +1,5 @@
{ lib, buildGoModule, fetchFromGitHub, pkg-config, pcsclite, softhsm, opensc
, yubihsm-shell, writeScriptBin }:
, yubihsm-shell }:
buildGoModule rec {
pname = "step-kms-plugin";

View File

@ -1,4 +1,4 @@
{ pkgs, buildPythonPackage, lib, stdenv, fetchurl, python, weechat }:
{ buildPythonPackage, lib, fetchurl, python, weechat }:
buildPythonPackage {
pname = "weepushover";

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchpatch, fetchFromGitHub, pkgs, go-font, ... }:
{ lib, stdenv, fetchFromGitHub, pkgs, go-font, ... }:
stdenv.mkDerivation rec {
pname = "zutty";

View File

@ -1 +1 @@
{ config, lib, pkgs, ... }: with lib; { imports = [ ./config-manager.nix ]; }
{ lib, ... }: with lib; { imports = [ ./config-manager.nix ]; }

3
statix.toml Normal file
View File

@ -0,0 +1,3 @@
disabled = [
"empty_pattern"
]

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, isUnstable, ... }:
{ pkgs, ... }:
let
nixOptions = {

View File

@ -1,4 +1,4 @@
{ config, lib, isUnstable, ... }:
{ config, lib, ... }:
with lib; {
options = {
nixLockdown = {

View File

@ -10,7 +10,7 @@
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
in {
overlay = final: prev: { inherit (self.packages.${prev.system}) thing; };
overlay = _: prev: { inherit (self.packages.${prev.system}) thing; };
packages = forAllSystems (system:
let pkgs = nixpkgsFor.${system};