Enable ssh

This commit is contained in:
jopejoe1 2023-02-24 12:35:58 +01:00
parent 4de8009349
commit 614e4d66ca
7 changed files with 33 additions and 4 deletions

View file

@ -14,7 +14,7 @@ in
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.loader.systemd-boot.configurationLimit = 10;
#boot.loader.systemd-boot.configurationLimit = 10;
# https://github.com/NixOS/nixpkgs/blob/c32c39d6f3b1fe6514598fa40ad2cf9ce22c3fb7/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix#L66
boot.loader.systemd-boot.editor = false;

View file

@ -0,0 +1,18 @@
{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.system.ssh;
in
{
options.custom.system.ssh = with types; {
enable = mkBoolOpt false "Whether or not to enable ssh.";
};
config = mkIf cfg.enable {
services.openssh.enable = true;
services.openssh.settings.X11forwarding = true;
services.openssh.settings.PermitRootLogin = "yes";
};
}

View file

@ -14,6 +14,7 @@ in
isNormalUser = true;
description = "jopejoe1 🚫";
initialPassword = "password";
openssh.authorizedKeys.keys = [];
extraGroups = [ "wheel"]
++ lib.optionals config.custom.hardware.printing.enable [ "scanner" "lp"]
++ lib.optional config.networking.networkmanager.enable "networkmanger";