From 989c5090bf9a56c882745de7198bff26878ec623 Mon Sep 17 00:00:00 2001 From: Frederik Jacobsen Date: Wed, 12 Feb 2025 20:05:08 +0100 Subject: [PATCH] moved ssh into its own file --- configuration.nix | 24 +----------------------- ssh-configuration.nix | 3 +++ 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/configuration.nix b/configuration.nix index 07b0450..85091f7 100644 --- a/configuration.nix +++ b/configuration.nix @@ -73,29 +73,7 @@ git fastfetch ]; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "24.11"; # Did you read the comment? } diff --git a/ssh-configuration.nix b/ssh-configuration.nix index 01600ff..8605884 100644 --- a/ssh-configuration.nix +++ b/ssh-configuration.nix @@ -1,3 +1,5 @@ +{ config, pkgs, ... }: +{ # Enable the OpenSSH daemon. services.openssh = { enable = true; @@ -14,3 +16,4 @@ users.users."frederik".openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDESaa260m4XAX6OJWkaH/MHVAy2eD8BO3QH740wn2CLQXuvAvZjpAVEZbfizPoHXZrEqEKPIALoOXNzUNm1H07+fh7PEOqGGS0x9b/8o1+MuiWYJQ4HlBfgWO80lI0WO40s1qEjminKgfQB8BmfwzrMq16ChCd0Pyt8O0a04K7ItZQBGHocgbEyKTyABUM+2Brz6zo9WJjkmQWbrUAjaCBaqLIJQgiT3GbdU4MPmIRyIDXQuiO0epbF2vyowqDGHar8C1pSSgyRCjnCl8VhCdRY+NjE5+s1WhQ0VFpp4jiUHDTfbIJx+ejXdAGHhEaxZOKqkkQWoEe/DJGTjOKkExkpwphdTMO5Ar/Gi6SQpeCuKQmjCzaVvcHPQRdnCA7txllF96fUPrKMeYI1ImT9npc2BlSZjjUprDGjAS0E5KRPOE2nJLCcRKwrShnCnN54jPW4L5xBPrWJkGkaD2Ks1LhD0RmX3Js5ytF3LLBq52Z/w2LvBEM8tGXglL21vpgyiVXcTKOe7Ywhp2XQ4O5Hukj0edKJLfU/0X4N6iSM8Ho8tnQtRB7oaw7pu1Rpoz63j1dU5knp9GYqCs37bAFBVkLymVn6NJi7NHTWY5IMXmxnov4JaoGQuYrV3Cpgiif7fTU9AlC0yxnJa5tHwJ5UEx4ltcEsIVnl678PLQtAWWmnQ== frederik1904@gmail.com" # content of authorized_keys file ]; +}