From 7d6022024f47f5e4fad99c563e1aaf7011b49665 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Wed, 22 Mar 2023 10:35:46 -0600 Subject: [PATCH] all: cleanup dead code --- bin/fmt | 2 +- bins/default.nix | 2 +- configs/ca.nix | 2 +- configs/default.nix | 3 +- configs/git.nix | 2 +- configs/gitmux.nix | 35 ------------------------ configs/hardened.nix | 2 +- configs/neomutt.nix | 2 +- configs/neovim.nix | 2 +- configs/tmux.nix | 3 +- configs/zsh.nix | 2 +- dbuild/default.nix | 5 +--- default.nix | 2 +- flake.nix | 6 ++-- hosts/box/default.nix | 2 +- hosts/box/hardware-configuration.nix | 2 +- hosts/europa/default.nix | 2 +- hosts/europa/hardware-configuration.nix | 2 +- hosts/faf/default.nix | 2 +- hosts/faf/hardware-configuration.nix | 2 +- hosts/h/default.nix | 6 ++-- hosts/h/hardware-configuration.nix | 2 +- hosts/luna/default.nix | 4 +-- hosts/luna/hardware-configuration.nix | 2 +- hosts/plq/default.nix | 2 +- hosts/pwntie/default.nix | 2 +- hosts/pwntie/hardware-configuration.nix | 2 +- hosts/router/default.nix | 10 +++---- hosts/router/hardware-configuration.nix | 2 +- hosts/stan/hardware-configuration.nix | 2 +- hosts/weather/hardware-configuration.nix | 2 +- install_template.nix | 4 +-- modules/default.nix | 2 +- modules/golink.nix | 2 +- modules/gotosocial.nix | 2 +- modules/sliding-sync.nix | 2 +- modules/ts-rev-prox.nix | 2 +- modules/yarr.nix | 2 +- overlays/default.nix | 6 ++-- overlays/matrix-synapse.nix | 4 +-- overlays/openssh.nix | 4 +-- overlays/tailscale.nix | 2 +- pkgs/cinny-desktop.nix | 3 +- pkgs/default.nix | 15 +++++----- pkgs/ghexport.nix | 3 +- pkgs/gitmux.nix | 35 ------------------------ pkgs/gotosocial.nix | 3 +- pkgs/gqrss.nix | 2 +- pkgs/hammerspoon.nix | 2 +- pkgs/iamb.nix | 2 +- pkgs/icbirc.nix | 4 +-- pkgs/mudita-center.nix | 3 +- pkgs/nheko.nix | 2 +- pkgs/orgparse.nix | 2 +- pkgs/promnesia.nix | 7 ++--- pkgs/rkvm.nix | 4 +-- pkgs/secretive.nix | 2 +- pkgs/sqlcipher3.nix | 2 +- pkgs/step-kms-plugin.nix | 2 +- pkgs/weepushover.nix | 2 +- pkgs/zutty.nix | 2 +- services/default.nix | 2 +- statix.toml | 3 ++ system/nix-config.nix | 2 +- system/nix-lockdown.nix | 2 +- templates/go/flake.nix | 2 +- 66 files changed, 90 insertions(+), 168 deletions(-) delete mode 100644 configs/gitmux.nix delete mode 100644 pkgs/gitmux.nix create mode 100644 statix.toml diff --git a/bin/fmt b/bin/fmt index 4984712..442ffed 100755 --- a/bin/fmt +++ b/bin/fmt @@ -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 . diff --git a/bins/default.nix b/bins/default.nix index db7e653..9bd146c 100644 --- a/bins/default.nix +++ b/bins/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, isUnstable, ... }: +{ pkgs, isUnstable, ... }: let gosignify = pkgs.callPackage ../pkgs/gosignify.nix { inherit isUnstable; }; diff --git a/configs/ca.nix b/configs/ca.nix index 8872566..73ea119 100644 --- a/configs/ca.nix +++ b/configs/ca.nix @@ -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 { }; diff --git a/configs/default.nix b/configs/default.nix index 63e59a4..45e5526 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -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 diff --git a/configs/git.nix b/configs/git.nix index 885e2a1..58c9076 100644 --- a/configs/git.nix +++ b/configs/git.nix @@ -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/"; }; }; diff --git a/configs/gitmux.nix b/configs/gitmux.nix deleted file mode 100644 index ba2d708..0000000 --- a/configs/gitmux.nix +++ /dev/null @@ -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 - ''; - }; -} diff --git a/configs/hardened.nix b/configs/hardened.nix index dbca23a..7b02620 100644 --- a/configs/hardened.nix +++ b/configs/hardened.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, ... }: with lib; diff --git a/configs/neomutt.nix b/configs/neomutt.nix index d2e785e..1b51f61 100644 --- a/configs/neomutt.nix +++ b/configs/neomutt.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: { +{ pkgs, ... }: { environment.systemPackages = with pkgs; [ neomutt urlview ]; environment.etc."neomuttrc" = { text = '' diff --git a/configs/neovim.nix b/configs/neovim.nix index c3f7383..d9f768f 100644 --- a/configs/neovim.nix +++ b/configs/neovim.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ pkgs, ... }: with pkgs; let parchment = pkgs.vimUtils.buildVimPluginFrom2Nix rec { diff --git a/configs/tmux.nix b/configs/tmux.nix index 7a91560..669cb14 100644 --- a/configs/tmux.nix +++ b/configs/tmux.nix @@ -1,5 +1,4 @@ -{ config, lib, ... }: -with lib; { +{ ... }: { programs.tmux = { enable = true; extraConfig = '' diff --git a/configs/zsh.nix b/configs/zsh.nix index daf2960..e4b5810 100644 --- a/configs/zsh.nix +++ b/configs/zsh.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: { +{ ... }: { config = { programs.zsh.interactiveShellInit = '' export NO_COLOR=1 diff --git a/dbuild/default.nix b/dbuild/default.nix index 89bbee8..3e55b79 100644 --- a/dbuild/default.nix +++ b/dbuild/default.nix @@ -1,4 +1 @@ -{ config, lib, ... }: -with lib; { - imports = [ ./build-consumer.nix ./build-server.nix ]; -} +{ ... }: { imports = [ ./build-consumer.nix ./build-server.nix ]; } diff --git a/default.nix b/default.nix index d9224a3..6e01813 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,4 @@ -{ config, lib, options, pkgs, isUnstable, xinlib, ... }: +{ config, lib, options, pkgs, isUnstable, ... }: let caPubKeys = builtins.concatStringsSep "\n" [ diff --git a/flake.nix b/flake.nix index 19ce08c..5a2d0cb 100644 --- a/flake.nix +++ b/flake.nix @@ -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)); }; } diff --git a/hosts/box/default.nix b/hosts/box/default.nix index 1939f91..e723c71 100644 --- a/hosts/box/default.nix +++ b/hosts/box/default.nix @@ -1,4 +1,4 @@ -{ inputs, lib, config, pkgs, isUnstable, ... }: +{ inputs, config, pkgs, isUnstable, ... }: let #photoPrismTag = "220901-bullseye"; diff --git a/hosts/box/hardware-configuration.nix b/hosts/box/hardware-configuration.nix index a940f92..600645b 100644 --- a/hosts/box/hardware-configuration.nix +++ b/hosts/box/hardware-configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ ... }: { boot.initrd.availableKernelModules = diff --git a/hosts/europa/default.nix b/hosts/europa/default.nix index 99a3eca..2afe828 100644 --- a/hosts/europa/default.nix +++ b/hosts/europa/default.nix @@ -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 diff --git a/hosts/europa/hardware-configuration.nix b/hosts/europa/hardware-configuration.nix index 44532c2..cbec932 100644 --- a/hosts/europa/hardware-configuration.nix +++ b/hosts/europa/hardware-configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ config, lib, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; diff --git a/hosts/faf/default.nix b/hosts/faf/default.nix index a55a0bd..348c74a 100644 --- a/hosts/faf/default.nix +++ b/hosts/faf/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, ... }: let pubKeys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIPMaAm4rDxyU975Z54YiNw3itC2fGc3SaE2VaS1fai8 root@box" diff --git a/hosts/faf/hardware-configuration.nix b/hosts/faf/hardware-configuration.nix index aacfcce..ef850b7 100644 --- a/hosts/faf/hardware-configuration.nix +++ b/hosts/faf/hardware-configuration.nix @@ -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") ]; diff --git a/hosts/h/default.nix b/hosts/h/default.nix index 79fffd8..7653fb3 100644 --- a/hosts/h/default.nix +++ b/hosts/h/default.nix @@ -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 ]; }; }; diff --git a/hosts/h/hardware-configuration.nix b/hosts/h/hardware-configuration.nix index 6e4d501..980eaad 100644 --- a/hosts/h/hardware-configuration.nix +++ b/hosts/h/hardware-configuration.nix @@ -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") ]; diff --git a/hosts/luna/default.nix b/hosts/luna/default.nix index 8717b63..9955ad4 100644 --- a/hosts/luna/default.nix +++ b/hosts/luna/default.nix @@ -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; diff --git a/hosts/luna/hardware-configuration.nix b/hosts/luna/hardware-configuration.nix index fb49928..77102f3 100644 --- a/hosts/luna/hardware-configuration.nix +++ b/hosts/luna/hardware-configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ config, lib, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; diff --git a/hosts/plq/default.nix b/hosts/plq/default.nix index 8cf44c0..a404e7f 100644 --- a/hosts/plq/default.nix +++ b/hosts/plq/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, emacs, isUnstable, ... }: +{ pkgs, isUnstable, ... }: let secretAgent = "Contents/Library/LoginItems/SecretAgent.app/Contents/MacOS/SecretAgent"; diff --git a/hosts/pwntie/default.nix b/hosts/pwntie/default.nix index ad43af8..3571fbd 100644 --- a/hosts/pwntie/default.nix +++ b/hosts/pwntie/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, xinlib, ... }: +{ pkgs, ... }: let myEmacs = pkgs.callPackage ../../configs/emacs.nix { }; diff --git a/hosts/pwntie/hardware-configuration.nix b/hosts/pwntie/hardware-configuration.nix index e19de22..e10e546 100644 --- a/hosts/pwntie/hardware-configuration.nix +++ b/hosts/pwntie/hardware-configuration.nix @@ -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") ]; diff --git a/hosts/router/default.nix b/hosts/router/default.nix index 3194122..4a27096 100644 --- a/hosts/router/default.nix +++ b/hosts/router/default.nix @@ -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 }; }; diff --git a/hosts/router/hardware-configuration.nix b/hosts/router/hardware-configuration.nix index b0beab5..87dcb81 100644 --- a/hosts/router/hardware-configuration.nix +++ b/hosts/router/hardware-configuration.nix @@ -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") ]; diff --git a/hosts/stan/hardware-configuration.nix b/hosts/stan/hardware-configuration.nix index 1021266..6ebde0c 100644 --- a/hosts/stan/hardware-configuration.nix +++ b/hosts/stan/hardware-configuration.nix @@ -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") ]; diff --git a/hosts/weather/hardware-configuration.nix b/hosts/weather/hardware-configuration.nix index d97f53d..a95c9e0 100644 --- a/hosts/weather/hardware-configuration.nix +++ b/hosts/weather/hardware-configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ ... }: { fileSystems = { diff --git a/install_template.nix b/install_template.nix index 998d3c0..bf5c109 100644 --- a/install_template.nix +++ b/install_template.nix @@ -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!! diff --git a/modules/default.nix b/modules/default.nix index b83e511..a6784d4 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,2 +1,2 @@ -{ config, lib, pkgs, ... }: { imports = [ ./ssh-fido-agent.nix ]; } +{ ... }: { imports = [ ./ssh-fido-agent.nix ]; } diff --git a/modules/golink.nix b/modules/golink.nix index a83cff6..8da5098 100644 --- a/modules/golink.nix +++ b/modules/golink.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, inputs, ... }: +{ config, lib, pkgs, ... }: with pkgs; let cfg = config.services.golink; diff --git a/modules/gotosocial.nix b/modules/gotosocial.nix index e2344fd..07c597f 100644 --- a/modules/gotosocial.nix +++ b/modules/gotosocial.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, prettyJSON, ... }: +{ config, lib, pkgs, ... }: with pkgs; let cfg = config.services.gotosocial; diff --git a/modules/sliding-sync.nix b/modules/sliding-sync.nix index 3364fe5..1fb4249 100644 --- a/modules/sliding-sync.nix +++ b/modules/sliding-sync.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, inputs, ... }: +{ lib, config, pkgs, ... }: let cfg = config.services.sliding-sync; in { options = with lib; { diff --git a/modules/ts-rev-prox.nix b/modules/ts-rev-prox.nix index b0487a2..b0c72f8 100644 --- a/modules/ts-rev-prox.nix +++ b/modules/ts-rev-prox.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, inputs, ... }: +{ lib, config, pkgs, ... }: let cfg = config.services.tsrevprox; in { options = with lib; { diff --git a/modules/yarr.nix b/modules/yarr.nix index 03d6a68..687d032 100644 --- a/modules/yarr.nix +++ b/modules/yarr.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, prettyJSON, ... }: +{ config, lib, pkgs, ... }: with pkgs; let cfg = config.services.yarr; diff --git a/overlays/default.nix b/overlays/default.nix index cea50ba..98c49fa 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -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"; diff --git a/overlays/matrix-synapse.nix b/overlays/matrix-synapse.nix index e8ae59f..e6d8acf 100644 --- a/overlays/matrix-synapse.nix +++ b/overlays/matrix-synapse.nix @@ -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"; diff --git a/overlays/openssh.nix b/overlays/openssh.nix index 3e45601..f4e137b 100644 --- a/overlays/openssh.nix +++ b/overlays/openssh.nix @@ -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"; diff --git a/overlays/tailscale.nix b/overlays/tailscale.nix index 01f7f27..ab410f4 100644 --- a/overlays/tailscale.nix +++ b/overlays/tailscale.nix @@ -1,5 +1,5 @@ let - tailscale = self: super: { + tailscale = _: super: { tailscale = super.callPackage "${super.path}/pkgs/servers/tailscale" { buildGoModule = args: super.buildGo120Module (args // rec { diff --git a/pkgs/cinny-desktop.nix b/pkgs/cinny-desktop.nix index 12219fd..2601c6d 100644 --- a/pkgs/cinny-desktop.nix +++ b/pkgs/cinny-desktop.nix @@ -1,5 +1,4 @@ -{ lib, fetchurl, appimageTools, makeDesktopItem, isUnstable, desktop-file-utils -, ... }: +{ fetchurl, appimageTools, desktop-file-utils, ... }: let name = "cinny-desktop"; diff --git a/pkgs/default.nix b/pkgs/default.nix index 342089b..eea2a33 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -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; }) + ]; } diff --git a/pkgs/ghexport.nix b/pkgs/ghexport.nix index eec8352..42e5e73 100644 --- a/pkgs/ghexport.nix +++ b/pkgs/ghexport.nix @@ -1,5 +1,4 @@ -{ pkgs, buildPythonPackage, setuptools-scm, fetchFromGitHub, PyGithub, pytz, ... -}: +{ buildPythonPackage, setuptools-scm, fetchFromGitHub, PyGithub, pytz, ... }: buildPythonPackage rec { pname = "ghexport"; diff --git a/pkgs/gitmux.nix b/pkgs/gitmux.nix deleted file mode 100644 index 823238e..0000000 --- a/pkgs/gitmux.nix +++ /dev/null @@ -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 ]; - }; -} diff --git a/pkgs/gotosocial.nix b/pkgs/gotosocial.nix index bf0b953..b80c6b4 100644 --- a/pkgs/gotosocial.nix +++ b/pkgs/gotosocial.nix @@ -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"; diff --git a/pkgs/gqrss.nix b/pkgs/gqrss.nix index caf485d..af125ae 100644 --- a/pkgs/gqrss.nix +++ b/pkgs/gqrss.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, isUnstable, ... }: +{ lib, buildGoModule, fetchFromGitHub, ... }: let vendorHash = "sha256-1zBZREClt8jy0TUXJ1FuBEAJEPQoUcl4DZZ6U2LtRzg="; diff --git a/pkgs/hammerspoon.nix b/pkgs/hammerspoon.nix index 1677e6a..063ecf7 100644 --- a/pkgs/hammerspoon.nix +++ b/pkgs/hammerspoon.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, stdenv, unzip, isUnstable }: +{ lib, fetchurl, stdenv, unzip }: stdenv.mkDerivation rec { pname = "hammerspoon"; diff --git a/pkgs/iamb.nix b/pkgs/iamb.nix index 8421028..4987233 100644 --- a/pkgs/iamb.nix +++ b/pkgs/iamb.nix @@ -1,4 +1,4 @@ -{ lib, rustPlatform, fetchFromGitHub, stdenv }: +{ lib, rustPlatform, fetchFromGitHub }: rustPlatform.buildRustPackage rec { pname = "iamb"; version = "2023-03-09"; diff --git a/pkgs/icbirc.nix b/pkgs/icbirc.nix index 972f9e0..9244b7b 100644 --- a/pkgs/icbirc.nix +++ b/pkgs/icbirc.nix @@ -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="; }; diff --git a/pkgs/mudita-center.nix b/pkgs/mudita-center.nix index 941d410..bf79e15 100644 --- a/pkgs/mudita-center.nix +++ b/pkgs/mudita-center.nix @@ -1,5 +1,4 @@ -{ lib, fetchurl, appimageTools, makeDesktopItem, isUnstable, desktop-file-utils -, ... }: +{ fetchurl, appimageTools, desktop-file-utils, ... }: let name = "mudita-center"; diff --git a/pkgs/nheko.nix b/pkgs/nheko.nix index 2e279f0..0042925 100644 --- a/pkgs/nheko.nix +++ b/pkgs/nheko.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, stdenv, undmg, isUnstable }: +{ lib, fetchurl, stdenv, undmg }: stdenv.mkDerivation rec { pname = "nheko"; diff --git a/pkgs/orgparse.nix b/pkgs/orgparse.nix index 08f881b..78c4f2c 100644 --- a/pkgs/orgparse.nix +++ b/pkgs/orgparse.nix @@ -1,4 +1,4 @@ -{ pkgs, buildPythonPackage, setuptools-scm, pytest, fetchPypi, ... }: +{ buildPythonPackage, setuptools-scm, pytest, fetchPypi, ... }: buildPythonPackage rec { pname = "orgparse"; diff --git a/pkgs/promnesia.nix b/pkgs/promnesia.nix index 1a66d71..fd7fc74 100644 --- a/pkgs/promnesia.nix +++ b/pkgs/promnesia.nix @@ -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; }; diff --git a/pkgs/rkvm.nix b/pkgs/rkvm.nix index 234706d..5bd3216 100644 --- a/pkgs/rkvm.nix +++ b/pkgs/rkvm.nix @@ -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"; diff --git a/pkgs/secretive.nix b/pkgs/secretive.nix index 4159897..f4b397e 100644 --- a/pkgs/secretive.nix +++ b/pkgs/secretive.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, stdenv, unzip, isUnstable }: +{ lib, fetchurl, stdenv, unzip }: stdenv.mkDerivation rec { pname = "secretive"; diff --git a/pkgs/sqlcipher3.nix b/pkgs/sqlcipher3.nix index 9bfadde..0c606e8 100644 --- a/pkgs/sqlcipher3.nix +++ b/pkgs/sqlcipher3.nix @@ -1,4 +1,4 @@ -{ pkgs, buildPythonPackage, setuptools-scm, sqlcipher, fetchPypi, ... }: +{ buildPythonPackage, setuptools-scm, sqlcipher, fetchPypi, ... }: buildPythonPackage rec { pname = "sqlcipher3"; diff --git a/pkgs/step-kms-plugin.nix b/pkgs/step-kms-plugin.nix index 5b3d048..b31127c 100644 --- a/pkgs/step-kms-plugin.nix +++ b/pkgs/step-kms-plugin.nix @@ -1,5 +1,5 @@ { lib, buildGoModule, fetchFromGitHub, pkg-config, pcsclite, softhsm, opensc -, yubihsm-shell, writeScriptBin }: +, yubihsm-shell }: buildGoModule rec { pname = "step-kms-plugin"; diff --git a/pkgs/weepushover.nix b/pkgs/weepushover.nix index af224bb..a364c82 100644 --- a/pkgs/weepushover.nix +++ b/pkgs/weepushover.nix @@ -1,4 +1,4 @@ -{ pkgs, buildPythonPackage, lib, stdenv, fetchurl, python, weechat }: +{ buildPythonPackage, lib, fetchurl, python, weechat }: buildPythonPackage { pname = "weepushover"; diff --git a/pkgs/zutty.nix b/pkgs/zutty.nix index 62e098a..18de973 100644 --- a/pkgs/zutty.nix +++ b/pkgs/zutty.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchpatch, fetchFromGitHub, pkgs, go-font, ... }: +{ lib, stdenv, fetchFromGitHub, pkgs, go-font, ... }: stdenv.mkDerivation rec { pname = "zutty"; diff --git a/services/default.nix b/services/default.nix index 2a787ac..c4f7b77 100644 --- a/services/default.nix +++ b/services/default.nix @@ -1 +1 @@ -{ config, lib, pkgs, ... }: with lib; { imports = [ ./config-manager.nix ]; } +{ lib, ... }: with lib; { imports = [ ./config-manager.nix ]; } diff --git a/statix.toml b/statix.toml new file mode 100644 index 0000000..c6fd647 --- /dev/null +++ b/statix.toml @@ -0,0 +1,3 @@ +disabled = [ + "empty_pattern" +] diff --git a/system/nix-config.nix b/system/nix-config.nix index c0ea0ba..5616144 100644 --- a/system/nix-config.nix +++ b/system/nix-config.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, isUnstable, ... }: +{ pkgs, ... }: let nixOptions = { diff --git a/system/nix-lockdown.nix b/system/nix-lockdown.nix index 1ef74cc..46a4f52 100644 --- a/system/nix-lockdown.nix +++ b/system/nix-lockdown.nix @@ -1,4 +1,4 @@ -{ config, lib, isUnstable, ... }: +{ config, lib, ... }: with lib; { options = { nixLockdown = { diff --git a/templates/go/flake.nix b/templates/go/flake.nix index 0fb4a3d..0122ee2 100644 --- a/templates/go/flake.nix +++ b/templates/go/flake.nix @@ -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};