From da6c28e055eb78ec2b7bd8689c38b5020873ec18 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:46:18 +0400 Subject: [PATCH] server: add sakotop key --- modules/server/default.nix | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/modules/server/default.nix b/modules/server/default.nix index 76a2a9f7..d82cf401 100644 --- a/modules/server/default.nix +++ b/modules/server/default.nix @@ -1,17 +1,10 @@ -{ - config, - lib, - ... -}: -with lib; let - cfg = config.modules.server; +{ config, lib, ... }: +with lib; +let cfg = config.modules.server; in { - imports = [ - ]; + imports = [ ]; - options.modules.server = { - isServer = mkEnableOption false; - }; + options.modules.server = { isServer = mkEnableOption false; }; config = mkIf cfg.isServer { # we need this if you say otherwise ill throw you @@ -23,11 +16,13 @@ in { PermitRootLogin = "no"; # its so easy to use keys your grandmother could use it PasswordAuthentication = false; - ports = [ - 69 - ]; + ports = [ 69 ]; openFirewall = true; }; }; + + users.users.sako.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPGAwG2Fqs3xNF/6/9GdznH/jUIqxW3aTYvmteuq9odZ sako@sakotop" + ]; }; }