From fb310f9e29322148756649f01be58d0270b2650a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 27 Nov 2023 17:54:44 +0200 Subject: [PATCH] 23.11: get rid of most warnings --- flake.nix | 2 +- hosts/fra1-a/configuration.nix | 4 +- hosts/fwminex/configuration.nix | 4 +- hosts/vno1-oh2/configuration.nix | 4 +- hosts/vno3-rp3b/configuration.nix | 4 +- modules/base/default.nix | 2 +- modules/base/users/default.nix | 4 +- modules/services/syncthing/default.nix | 130 +++++++++++++------------ 8 files changed, 78 insertions(+), 76 deletions(-) diff --git a/flake.nix b/flake.nix index ece1c9f..4023509 100644 --- a/flake.nix +++ b/flake.nix @@ -283,7 +283,7 @@ hooks = { alejandra.enable = true; deadnix.enable = true; - #statix.enable = true; + statix.enable = true; }; }; } diff --git a/hosts/fra1-a/configuration.nix b/hosts/fra1-a/configuration.nix index 9a9ca7a..e660b1c 100644 --- a/hosts/fra1-a/configuration.nix +++ b/hosts/fra1-a/configuration.nix @@ -32,8 +32,8 @@ timeZone = "UTC"; base = { users.passwd = { - root.passwordFile = config.age.secrets.root-passwd-hash.path; - motiejus.passwordFile = config.age.secrets.motiejus-passwd-hash.path; + root.hashedPasswordFile = config.age.secrets.root-passwd-hash.path; + motiejus.hashedPasswordFile = config.age.secrets.motiejus-passwd-hash.path; }; unitstatus = { enable = true; diff --git a/hosts/fwminex/configuration.nix b/hosts/fwminex/configuration.nix index 854eeba..9eb2d49 100644 --- a/hosts/fwminex/configuration.nix +++ b/hosts/fwminex/configuration.nix @@ -39,8 +39,8 @@ in { users = { devEnvironment = true; passwd = { - root.passwordFile = config.age.secrets.root-passwd-hash.path; - motiejus.passwordFile = config.age.secrets.motiejus-passwd-hash.path; + root.hashedPasswordFile = config.age.secrets.root-passwd-hash.path; + motiejus.hashedPasswordFile = config.age.secrets.motiejus-passwd-hash.path; }; }; diff --git a/hosts/vno1-oh2/configuration.nix b/hosts/vno1-oh2/configuration.nix index ba7211b..615ade9 100644 --- a/hosts/vno1-oh2/configuration.nix +++ b/hosts/vno1-oh2/configuration.nix @@ -42,8 +42,8 @@ zfs.enable = true; users = { passwd = { - root.passwordFile = config.age.secrets.root-passwd-hash.path; - motiejus.passwordFile = config.age.secrets.motiejus-passwd-hash.path; + root.hashedPasswordFile = config.age.secrets.root-passwd-hash.path; + motiejus.hashedPasswordFile = config.age.secrets.motiejus-passwd-hash.path; }; }; diff --git a/hosts/vno3-rp3b/configuration.nix b/hosts/vno3-rp3b/configuration.nix index 9932fa8..80e7103 100644 --- a/hosts/vno3-rp3b/configuration.nix +++ b/hosts/vno3-rp3b/configuration.nix @@ -57,8 +57,8 @@ base = { zfs.enable = true; users.passwd = { - root.passwordFile = config.age.secrets.root-passwd-hash.path; - motiejus.passwordFile = config.age.secrets.motiejus-passwd-hash.path; + root.hashedPasswordFile = config.age.secrets.root-passwd-hash.path; + motiejus.hashedPasswordFile = config.age.secrets.motiejus-passwd-hash.path; }; unitstatus = { enable = true; diff --git a/modules/base/default.nix b/modules/base/default.nix index 9fa236f..f0ef446 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -179,7 +179,7 @@ locate = { enable = true; - locate = pkgs.plocate; + package = pkgs.plocate; localuser = null; }; }; diff --git a/modules/base/users/default.nix b/modules/base/users/default.nix index da7c42f..9f1e236 100644 --- a/modules/base/users/default.nix +++ b/modules/base/users/default.nix @@ -14,7 +14,7 @@ in { passwd = lib.mkOption { type = attrsOf (submodule { options = { - passwordFile = lib.mkOption { + hashedPasswordFile = lib.mkOption { type = nullOr path; default = null; }; @@ -49,7 +49,7 @@ in { } // lib.filterAttrs ( n: v: - (n == "passwordFile" || n == "initialPassword") && v != null + (n == "hashedPasswordFile" || n == "initialPassword") && v != null ) cfg.passwd.motiejus or {}; diff --git a/modules/services/syncthing/default.nix b/modules/services/syncthing/default.nix index cd1849a..9132ff1 100644 --- a/modules/services/syncthing/default.nix +++ b/modules/services/syncthing/default.nix @@ -120,70 +120,72 @@ in { guiPortStr = builtins.toString guiPort; in "${jakstIP}:${guiPortStr}"; - extraOptions.gui.insecureAdminAccess = true; - devices = - {} - // (lib.optionalAttrs (config.networking.hostName == "vno1-oh2") { - inherit - (devices) - mtwork - fwminex - vno1-oh2 - mxp10 - rzj-744P2PE - KrekenavosNamai - vno1-vinc - vno2-irena - ; - }) - // (lib.optionalAttrs (config.networking.hostName == "fwminex") { - inherit - (devices) - mtwork - fwminex - vno1-oh2 - mxp10 - rzj-744P2PE - vno1-vinc - ; - }) - // {}; - folders = with folders; - {} - // ( - lib.optionalAttrs (config.networking.hostName == "vno1-oh2") { - "/var/www/dl/tel" = www-mxp10; - "/var/www/dl/fwminex" = www-fwminex; - "/var/www/dl/mykolo" = mykolo; - "${cfg.dataDir}/M-V" = M-V; - "${cfg.dataDir}/annex2/Books" = Books; - "${cfg.dataDir}/annex2/M-Active" = M-Active; - "${cfg.dataDir}/annex2/M-Camera" = M-Camera; - "${cfg.dataDir}/annex2/M-Documents" = M-Documents; - "${cfg.dataDir}/annex2/R-Documents" = R-Documents; - "${cfg.dataDir}/annex2/Pictures" = Pictures; - "${cfg.dataDir}/annex2/M-R" = M-R; - "${cfg.dataDir}/stud-cache" = stud-cache; - "${cfg.dataDir}/video/shared" = video-shared; - "${cfg.dataDir}/music" = Music; - "${cfg.dataDir}/irenos" = Irenos; - } - ) - // ( - lib.optionalAttrs (config.networking.hostName == "fwminex") { - "${cfg.dataDir}/Books" = Books; - "${cfg.dataDir}/M-Active" = M-Active; - "${cfg.dataDir}/M-Documents" = M-Documents; - "${cfg.dataDir}/M-Camera" = M-Camera; - "${cfg.dataDir}/Pictures" = Pictures; - "${cfg.dataDir}/Music" = Music; - "${cfg.dataDir}/M-R" = M-R; - "${cfg.dataDir}/M-V" = M-V; - "${cfg.dataDir}/Video" = video-shared; - "${cfg.dataDir}/stud-cache" = stud-cache; - "${cfg.dataDir}/www" = www-fwminex; - } - ); + settings = { + gui.insecureAdminAccess = true; + devices = + {} + // (lib.optionalAttrs (config.networking.hostName == "vno1-oh2") { + inherit + (devices) + mtwork + fwminex + vno1-oh2 + mxp10 + rzj-744P2PE + KrekenavosNamai + vno1-vinc + vno2-irena + ; + }) + // (lib.optionalAttrs (config.networking.hostName == "fwminex") { + inherit + (devices) + mtwork + fwminex + vno1-oh2 + mxp10 + rzj-744P2PE + vno1-vinc + ; + }) + // {}; + folders = with folders; + {} + // ( + lib.optionalAttrs (config.networking.hostName == "vno1-oh2") { + "/var/www/dl/tel" = www-mxp10; + "/var/www/dl/fwminex" = www-fwminex; + "/var/www/dl/mykolo" = mykolo; + "${cfg.dataDir}/M-V" = M-V; + "${cfg.dataDir}/annex2/Books" = Books; + "${cfg.dataDir}/annex2/M-Active" = M-Active; + "${cfg.dataDir}/annex2/M-Camera" = M-Camera; + "${cfg.dataDir}/annex2/M-Documents" = M-Documents; + "${cfg.dataDir}/annex2/R-Documents" = R-Documents; + "${cfg.dataDir}/annex2/Pictures" = Pictures; + "${cfg.dataDir}/annex2/M-R" = M-R; + "${cfg.dataDir}/stud-cache" = stud-cache; + "${cfg.dataDir}/video/shared" = video-shared; + "${cfg.dataDir}/music" = Music; + "${cfg.dataDir}/irenos" = Irenos; + } + ) + // ( + lib.optionalAttrs (config.networking.hostName == "fwminex") { + "${cfg.dataDir}/Books" = Books; + "${cfg.dataDir}/M-Active" = M-Active; + "${cfg.dataDir}/M-Documents" = M-Documents; + "${cfg.dataDir}/M-Camera" = M-Camera; + "${cfg.dataDir}/Pictures" = Pictures; + "${cfg.dataDir}/Music" = Music; + "${cfg.dataDir}/M-R" = M-R; + "${cfg.dataDir}/M-V" = M-V; + "${cfg.dataDir}/Video" = video-shared; + "${cfg.dataDir}/stud-cache" = stud-cache; + "${cfg.dataDir}/www" = www-fwminex; + } + ); + }; }; }; }