From bfb1842988da8b67e43317bde2aeca0d439bbb5a Mon Sep 17 00:00:00 2001 From: Philipp Hochkamp Date: Mon, 6 Feb 2023 21:52:10 +0100 Subject: [PATCH] fix: warnings --- nixos-modules/services/grafana.nix | 6 +++--- nixos-modules/services/ssh.nix | 4 ++-- nixos-modules/system/agenix.nix | 2 +- nixos-modules/system/security.nix | 5 ++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/nixos-modules/services/grafana.nix b/nixos-modules/services/grafana.nix index d7a916e5..83256efd 100644 --- a/nixos-modules/services/grafana.nix +++ b/nixos-modules/services/grafana.nix @@ -13,14 +13,14 @@ in config = lib.mkIf cfg.enable { services.grafana = { enable = true; - domain = "${cfg.domainPrefix}.${domain}"; - rootUrl = "https://${cfg.domainPrefix}.${domain}/"; + settings.server.domain = "${cfg.domainPrefix}.${domain}"; + settings.server.root_url = "https://${cfg.domainPrefix}.${domain}/"; }; services.nginx.virtualHosts."${cfg.domainPrefix}.${domain}" = { useACMEHost = "${domain}"; addSSL = true; locations = { - "/".proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}"; + "/".proxyPass = "http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}"; "/".proxyWebsockets = true; }; }; diff --git a/nixos-modules/services/ssh.nix b/nixos-modules/services/ssh.nix index b8d1f5d1..bfa4ddb2 100644 --- a/nixos-modules/services/ssh.nix +++ b/nixos-modules/services/ssh.nix @@ -6,9 +6,9 @@ in { options.ragon.services.ssh.enable = lib.mkEnableOption "Enables sshd"; config = lib.mkIf cfg.enable { - services.openssh.permitRootLogin = "without-password"; + services.openssh.settings.PermitRootLogin = "without-password"; services.openssh.enable = true; - services.openssh.passwordAuthentication = false; + services.openssh.settings.PasswordAuthentication = false; users.users.root.openssh.authorizedKeys.keys = pubkeys.ragon.user; }; } diff --git a/nixos-modules/system/agenix.nix b/nixos-modules/system/agenix.nix index b10035d5..b3c8cce6 100644 --- a/nixos-modules/system/agenix.nix +++ b/nixos-modules/system/agenix.nix @@ -17,7 +17,7 @@ in }; }; config = mkIf cfg.enable { - environment.systemPackages = [ inputs.agenix.defaultPackage.${pkgs.system} ]; + environment.systemPackages = [ inputs.agenix.packages.${pkgs.system}.default ]; # Set passwords users.users.root.passwordFile = config.age.secrets.rootPasswd.path; age.identityPaths = diff --git a/nixos-modules/system/security.nix b/nixos-modules/system/security.nix index 53fc4c49..c8bad5a1 100644 --- a/nixos-modules/system/security.nix +++ b/nixos-modules/system/security.nix @@ -11,9 +11,8 @@ in config = mkIf cfg.enable { security.sudo.execWheelOnly = true; services.openssh = { - passwordAuthentication = false; - allowSFTP = true; # just use rsync, lol - kbdInteractiveAuthentication = false; + settings.PasswordAuthentication = false; + settings.KbdInteractiveAuthentication = false; extraConfig = '' AllowTcpForwarding yes X11Forwarding no