From 450118d234daa43497dc7615b6cdc3f9f4517c4e Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 20 Feb 2023 20:45:56 -0500 Subject: [PATCH] remove dead code with deadnix --- flake.nix | 2 +- generators/staff/default.nix | 2 +- hosts/flame/hardware-configuration.nix | 2 +- hosts/tempest/hardware-configuration.nix | 2 +- modules/common/neovim/config/syntax.nix | 2 +- modules/common/programming/default.nix | 2 +- modules/common/programming/haskell.nix | 2 +- modules/common/shell/fish/default.nix | 2 +- modules/common/shell/nixpkgs.nix | 2 +- modules/common/shell/utilities.nix | 4 ++-- modules/darwin/default.nix | 2 +- modules/nixos/services/backups.nix | 2 +- modules/nixos/services/n8n.nix | 2 +- modules/nixos/services/netdata.nix | 2 +- modules/nixos/services/prometheus.nix | 2 +- overlays/calibre-web.nix | 2 +- overlays/neovim-plugins.nix | 14 +++++++------- templates/basic/flake.nix | 2 +- templates/haskell/flake.nix | 2 +- templates/poetry/flake.nix | 2 +- templates/python/flake.nix | 4 ++-- 21 files changed, 29 insertions(+), 29 deletions(-) diff --git a/flake.nix b/flake.nix index 933868e..55c564c 100644 --- a/flake.nix +++ b/flake.nix @@ -94,7 +94,7 @@ }; - outputs = { self, nixpkgs, ... }@inputs: + outputs = { nixpkgs, ... }@inputs: let diff --git a/generators/staff/default.nix b/generators/staff/default.nix index 2f225b2..6d4fe0a 100644 --- a/generators/staff/default.nix +++ b/generators/staff/default.nix @@ -1,7 +1,7 @@ # The Staff # ISO configuration for my USB drive -{ inputs, globals, system, overlays, ... }: +{ inputs, system, ... }: with inputs; diff --git a/hosts/flame/hardware-configuration.nix b/hosts/flame/hardware-configuration.nix index ef1e850..e8347f5 100644 --- a/hosts/flame/hardware-configuration.nix +++ b/hosts/flame/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, ... }: +{ lib, modulesPath, ... }: { imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; diff --git a/hosts/tempest/hardware-configuration.nix b/hosts/tempest/hardware-configuration.nix index bf692e8..113ff46 100644 --- a/hosts/tempest/hardware-configuration.nix +++ b/hosts/tempest/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/modules/common/neovim/config/syntax.nix b/modules/common/neovim/config/syntax.nix index 0f223e5..56b8529 100644 --- a/modules/common/neovim/config/syntax.nix +++ b/modules/common/neovim/config/syntax.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { plugins = [ - (pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: + (pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins: with pkgs.tree-sitter-grammars; [ tree-sitter-hcl tree-sitter-python diff --git a/modules/common/programming/default.nix b/modules/common/programming/default.nix index 9650fc7..f8e9f5d 100644 --- a/modules/common/programming/default.nix +++ b/modules/common/programming/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: { +{ ... }: { imports = [ ./haskell.nix diff --git a/modules/common/programming/haskell.nix b/modules/common/programming/haskell.nix index 7bf3df7..203a7c0 100644 --- a/modules/common/programming/haskell.nix +++ b/modules/common/programming/haskell.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: { +{ config, lib, ... }: { options.haskell.enable = lib.mkEnableOption "Haskell programming language."; diff --git a/modules/common/shell/fish/default.nix b/modules/common/shell/fish/default.nix index 55e00e0..c9f6d22 100644 --- a/modules/common/shell/fish/default.nix +++ b/modules/common/shell/fish/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: { +{ config, pkgs, ... }: { users.users.${config.user}.shell = pkgs.fish; programs.fish.enable = diff --git a/modules/common/shell/nixpkgs.nix b/modules/common/shell/nixpkgs.nix index 0a8358c..2534d55 100644 --- a/modules/common/shell/nixpkgs.nix +++ b/modules/common/shell/nixpkgs.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: { +{ config, pkgs, ... }: { home-manager.users.${config.user} = { programs.fish = { diff --git a/modules/common/shell/utilities.nix b/modules/common/shell/utilities.nix index 53a59ef..38aca7d 100644 --- a/modules/common/shell/utilities.nix +++ b/modules/common/shell/utilities.nix @@ -19,8 +19,8 @@ in { # Fix: age won't build nixpkgs.overlays = [ - (final: prev: { - age = prev.age.overrideAttrs (old: { + (_final: prev: { + age = prev.age.overrideAttrs (_old: { src = prev.fetchFromGitHub { owner = "FiloSottile"; repo = "age"; diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix index 3ce9ed2..1db4a11 100644 --- a/modules/darwin/default.nix +++ b/modules/darwin/default.nix @@ -1,4 +1,4 @@ -{ config, ... }: { +{ ... }: { imports = [ ./alacritty.nix diff --git a/modules/nixos/services/backups.nix b/modules/nixos/services/backups.nix index c1e143b..026325d 100644 --- a/modules/nixos/services/backups.nix +++ b/modules/nixos/services/backups.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: { +{ config, lib, ... }: { options = { diff --git a/modules/nixos/services/n8n.nix b/modules/nixos/services/n8n.nix index e61096d..1b1c3d4 100644 --- a/modules/nixos/services/n8n.nix +++ b/modules/nixos/services/n8n.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: { +{ config, lib, ... }: { options = { n8nServer = lib.mkOption { diff --git a/modules/nixos/services/netdata.nix b/modules/nixos/services/netdata.nix index 5082c4c..5911c89 100644 --- a/modules/nixos/services/netdata.nix +++ b/modules/nixos/services/netdata.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: { +{ config, lib, ... }: { options.netdata.enable = lib.mkEnableOption "Netdata metrics."; diff --git a/modules/nixos/services/prometheus.nix b/modules/nixos/services/prometheus.nix index b372cca..914d824 100644 --- a/modules/nixos/services/prometheus.nix +++ b/modules/nixos/services/prometheus.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: { +{ config, lib, ... }: { options.metricsServer = lib.mkOption { type = lib.types.nullOr lib.types.str; diff --git a/overlays/calibre-web.nix b/overlays/calibre-web.nix index 6717ec4..3f8e172 100644 --- a/overlays/calibre-web.nix +++ b/overlays/calibre-web.nix @@ -1,6 +1,6 @@ # Fix: https://github.com/janeczku/calibre-web/issues/2422 -final: prev: { +_final: prev: { calibre-web = prev.calibre-web.overrideAttrs (old: { patches = (old.patches or [ ]) ++ [ ./calibre-web-cloudflare.patch ]; }); diff --git a/overlays/neovim-plugins.nix b/overlays/neovim-plugins.nix index a08dd2a..9941492 100644 --- a/overlays/neovim-plugins.nix +++ b/overlays/neovim-plugins.nix @@ -1,18 +1,18 @@ # Adopted from here: https://github.com/DieracDelta/vimconfig/blob/801b62dd56cfee59574639904a6c95b525725f66/plugins.nix -inputs: final: prev: +inputs: _final: prev: let # Use nixpkgs vimPlugin but with source directly from plugin author withSrc = pkg: src: pkg.overrideAttrs (_: { inherit src; }); - # Package plugin - plugin = pname: src: - prev.vimUtils.buildVimPluginFrom2Nix { - inherit pname src; - version = "master"; - }; + # Package plugin - disabling until in use + # plugin = pname: src: + # prev.vimUtils.buildVimPluginFrom2Nix { + # inherit pname src; + # version = "master"; + # }; in { diff --git a/templates/basic/flake.nix b/templates/basic/flake.nix index edfb050..dadd0fb 100644 --- a/templates/basic/flake.nix +++ b/templates/basic/flake.nix @@ -1,7 +1,7 @@ { description = "Basic project"; inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - outputs = { self, nixpkgs }: + outputs = { nixpkgs }: let forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" diff --git a/templates/haskell/flake.nix b/templates/haskell/flake.nix index f6eb37e..f9c6904 100644 --- a/templates/haskell/flake.nix +++ b/templates/haskell/flake.nix @@ -8,7 +8,7 @@ inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable"; inputs.flake-utils.url = "github:numtide/flake-utils"; - outputs = { self, nixpkgs, flake-utils, haskellNix }: + outputs = { nixpkgs, flake-utils, haskellNix }: flake-utils.lib.eachDefaultSystem (system: let overlay = self: _: { diff --git a/templates/poetry/flake.nix b/templates/poetry/flake.nix index 10f1e5f..c03832c 100644 --- a/templates/poetry/flake.nix +++ b/templates/poetry/flake.nix @@ -5,7 +5,7 @@ inputs.nixpkgs.url = "github:NixOS/nixpkgs"; inputs.poetry2nix.url = "github:nix-community/poetry2nix"; - outputs = { self, nixpkgs, flake-utils, poetry2nix }: + outputs = { nixpkgs, flake-utils, poetry2nix }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { diff --git a/templates/python/flake.nix b/templates/python/flake.nix index 3e4e7cf..ca6e685 100644 --- a/templates/python/flake.nix +++ b/templates/python/flake.nix @@ -3,14 +3,14 @@ inputs.mach-nix.url = "github:DavHau/mach-nix/3.5.0"; - outputs = { self, nixpkgs, mach-nix }@inp: + outputs = { nixpkgs, mach-nix }: let supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]; forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system (import nixpkgs { inherit system; })); in rec { - defaultApp = forAllSystems (system: pkgs: + defaultApp = forAllSystems (system: _pkgs: mach-nix.lib."${system}".mkPython { requirements = builtins.readFile ./requirements.txt; });