From 0e9f90a96096eb8881269b87cc55e266e6d3d82e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 30 Sep 2023 17:06:41 +0300 Subject: [PATCH] nix run github:astro/deadnix --- flake.nix | 8 +++++--- hosts/fra1-a/configuration.nix | 1 - hosts/fwminex/configuration.nix | 1 - hosts/vm/configuration.nix | 2 -- modules/base/fileSystems/default.nix | 2 +- modules/base/snapshot/default.nix | 4 ++-- modules/base/sshd/default.nix | 4 ++-- modules/base/users/default.nix | 2 +- modules/base/zfsborg/default.nix | 4 ++-- modules/profiles/desktop/default.nix | 1 - modules/services/default.nix | 7 +------ modules/services/deployerbot/default.nix | 1 - modules/services/friendlyport/default.nix | 1 - modules/services/jakstpub/default.nix | 1 - modules/services/matrix-synapse/default.nix | 1 - modules/services/nsd-acme/default.nix | 3 +-- modules/services/tailscale/default.nix | 1 - secrets.nix | 2 +- 18 files changed, 16 insertions(+), 30 deletions(-) diff --git a/flake.nix b/flake.nix index e0c76fb..af8112c 100644 --- a/flake.nix +++ b/flake.nix @@ -48,7 +48,7 @@ system = "x86_64-linux"; overlays = [ deploy-rs.overlay - (self: super: { + (_self: super: { deploy-rs = { inherit (pkgsIA64) deploy-rs; lib = super.deploy-rs.lib; @@ -60,7 +60,7 @@ system = "aarch64-linux"; overlays = [ deploy-rs.overlay - (self: super: { + (_self: super: { deploy-rs = { inherit (pkgsArm64) deploy-rs; lib = super.deploy-rs.lib; @@ -225,7 +225,9 @@ }; }; - checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; + checks = builtins.mapAttrs (_system: deployLib: + deployLib.deployChecks self.deploy) + deploy-rs.lib; } // flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs {inherit system;}; diff --git a/hosts/fra1-a/configuration.nix b/hosts/fra1-a/configuration.nix index 6441dbb..0534657 100644 --- a/hosts/fra1-a/configuration.nix +++ b/hosts/fra1-a/configuration.nix @@ -1,6 +1,5 @@ { config, - pkgs, myData, modulesPath, ... diff --git a/hosts/fwminex/configuration.nix b/hosts/fwminex/configuration.nix index a84ab5f..e01a48e 100644 --- a/hosts/fwminex/configuration.nix +++ b/hosts/fwminex/configuration.nix @@ -1,6 +1,5 @@ { config, - pkgs, myData, ... }: let diff --git a/hosts/vm/configuration.nix b/hosts/vm/configuration.nix index eb32eea..2380c69 100644 --- a/hosts/vm/configuration.nix +++ b/hosts/vm/configuration.nix @@ -1,7 +1,5 @@ { - config, pkgs, - lib, myData, ... }: let diff --git a/modules/base/fileSystems/default.nix b/modules/base/fileSystems/default.nix index 9e1ad8a..cd25b4d 100644 --- a/modules/base/fileSystems/default.nix +++ b/modules/base/fileSystems/default.nix @@ -4,7 +4,7 @@ ... }: let cfg = config.zfs-root.fileSystems; - inherit (lib) mkIf types mkDefault mkOption mkMerge mapAttrsToList; + inherit (lib) types mkDefault mkOption mkMerge mapAttrsToList; in { options.zfs-root.fileSystems = { datasets = mkOption { diff --git a/modules/base/snapshot/default.nix b/modules/base/snapshot/default.nix index b940ecc..b8d811c 100644 --- a/modules/base/snapshot/default.nix +++ b/modules/base/snapshot/default.nix @@ -23,7 +23,7 @@ }; extraArgs = ["--verbose"]; datasets = let - fs_zfs = lib.filterAttrs (n: v: v.fsType == "zfs") config.fileSystems; + fs_zfs = lib.filterAttrs (_: v: v.fsType == "zfs") config.fileSystems; mountpoint2fs = builtins.listToAttrs (map (mountpoint: { @@ -32,7 +32,7 @@ }) config.mj.base.snapshot.mountpoints); s_datasets = - lib.mapAttrs' (mountpoint: fs: { + lib.mapAttrs' (_mountpoint: fs: { name = fs.device; value = {use_template = ["prod"];}; }) diff --git a/modules/base/sshd/default.nix b/modules/base/sshd/default.nix index 580a9fd..32fbef4 100644 --- a/modules/base/sshd/default.nix +++ b/modules/base/sshd/default.nix @@ -14,8 +14,8 @@ }; programs.mosh.enable = true; programs.ssh.knownHosts = let - sshAttrs = lib.genAttrs ["extraHostNames" "publicKey"] (name: null); + sshAttrs = lib.genAttrs ["extraHostNames" "publicKey"] (_: null); in - lib.mapAttrs (name: cfg: builtins.intersectAttrs sshAttrs cfg) myData.hosts; + lib.mapAttrs (_name: cfg: builtins.intersectAttrs sshAttrs cfg) myData.hosts; }; } diff --git a/modules/base/users/default.nix b/modules/base/users/default.nix index cfbf9bc..3848571 100644 --- a/modules/base/users/default.nix +++ b/modules/base/users/default.nix @@ -55,7 +55,7 @@ passwd.motiejus or {}; root = assert lib.assertMsg (passwd ? root) "root password needs to be defined"; - lib.filterAttrs (n: v: v != null) passwd.root; + lib.filterAttrs (_: v: v != null) passwd.root; }; }; diff --git a/modules/base/zfsborg/default.nix b/modules/base/zfsborg/default.nix index ce9d452..1810101 100644 --- a/modules/base/zfsborg/default.nix +++ b/modules/base/zfsborg/default.nix @@ -4,7 +4,7 @@ pkgs, ... }: let - mkPreHook = mountpoint: zfs_name: i: '' + mkPreHook = zfs_name: i: '' set -x sleep ${toString i} mkdir "$RUNTIME_DIRECTORY/snapshot" @@ -79,7 +79,7 @@ in { extraArgs = "--remote-path=borg1"; compression = "auto,lzma"; startAt = attrs.backup_at; - preHook = mkPreHook mountpoint fs.device i; + preHook = mkPreHook fs.device i; prune.keep = { within = "1d"; daily = 7; diff --git a/modules/profiles/desktop/default.nix b/modules/profiles/desktop/default.nix index e8c641f..0bc9f14 100644 --- a/modules/profiles/desktop/default.nix +++ b/modules/profiles/desktop/default.nix @@ -1,6 +1,5 @@ { config, - lib, pkgs, ... }: { diff --git a/modules/services/default.nix b/modules/services/default.nix index 4b093b2..a74e14b 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: { +{...}: { imports = [ ./borgstor ./certget diff --git a/modules/services/deployerbot/default.nix b/modules/services/deployerbot/default.nix index cf66a71..4f49ddb 100644 --- a/modules/services/deployerbot/default.nix +++ b/modules/services/deployerbot/default.nix @@ -4,7 +4,6 @@ pkgs, ... }: let - cfg = config.mj.services.deployerbot; mkOptional = { derivationTarget, pingTarget, diff --git a/modules/services/friendlyport/default.nix b/modules/services/friendlyport/default.nix index e54a8d3..285dcc8 100644 --- a/modules/services/friendlyport/default.nix +++ b/modules/services/friendlyport/default.nix @@ -1,7 +1,6 @@ { config, lib, - myData, ... }: { options.mj.services.friendlyport = with lib.types; { diff --git a/modules/services/jakstpub/default.nix b/modules/services/jakstpub/default.nix index b480d3b..dfd0bd6 100644 --- a/modules/services/jakstpub/default.nix +++ b/modules/services/jakstpub/default.nix @@ -1,7 +1,6 @@ { config, lib, - pkgs, myData, ... }: let diff --git a/modules/services/matrix-synapse/default.nix b/modules/services/matrix-synapse/default.nix index 267552c..ff751d3 100644 --- a/modules/services/matrix-synapse/default.nix +++ b/modules/services/matrix-synapse/default.nix @@ -2,7 +2,6 @@ config, lib, pkgs, - myData, ... }: { options.mj.services.matrix-synapse = with lib.types; { diff --git a/modules/services/nsd-acme/default.nix b/modules/services/nsd-acme/default.nix index 399e31a..2b41d8b 100644 --- a/modules/services/nsd-acme/default.nix +++ b/modules/services/nsd-acme/default.nix @@ -6,7 +6,6 @@ }: let cfg = config.mj.services.nsd-acme; mkHook = zone: let - rc = config.services.nsd.remoteControl; fullZone = "_acme-endpoint.${zone}"; in pkgs.writeShellScript "nsd-acme-hook" '' @@ -188,7 +187,7 @@ in { systemd.timers = lib.mapAttrs' ( - zone: cfg: + zone: _: lib.nameValuePair "nsd-acme-${zone}" { description = "nsd-acme for zone ${zone}"; wantedBy = ["timers.target"]; diff --git a/modules/services/tailscale/default.nix b/modules/services/tailscale/default.nix index 01e406f..2f55c08 100644 --- a/modules/services/tailscale/default.nix +++ b/modules/services/tailscale/default.nix @@ -1,7 +1,6 @@ { config, lib, - pkgs, myData, ... }: let diff --git a/secrets.nix b/secrets.nix index c74144f..dc591eb 100644 --- a/secrets.nix +++ b/secrets.nix @@ -3,7 +3,7 @@ let motiejus_yk2 = "age1yubikey1qgyvs2ul0enzqf4sscq96zyxk73jnj4lknpemak2hp39lejdwc0s5uzzhpc"; motiejus_bk1 = "age1kyehn8yr9tfu3w0z4d9p9qrj0tjjh92ljxmz2nyr6xnm7y8kpv5spwwc9n"; motiejus_bk2 = "age14f39j0wx84n93lgqn6d9gcd3yhuwak6qwrxy8v83ydn7266uafts09ecva"; - motiejus = [motiejus_yk1 motiejus_yk2 motiejus_bk1]; + motiejus = [motiejus_yk1 motiejus_yk2 motiejus_bk1 motiejus_bk2]; fwminex = (import ./data.nix).hosts."fwminex.motiejus.jakst".publicKey; fra1-a = (import ./data.nix).hosts."fra1-a.servers.jakst".publicKey;