feat(openssh): init module
This commit is contained in:
@@ -105,16 +105,9 @@
|
|||||||
(import ../../scripts/vpn-tools { inherit pkgs; })
|
(import ../../scripts/vpn-tools { inherit pkgs; })
|
||||||
];
|
];
|
||||||
|
|
||||||
services.openssh = {
|
# This server is connected to the internet! Port 22 is open!! Aagghhhh!!!
|
||||||
enable = true;
|
# Stay safe!
|
||||||
settings = {
|
services.openssh.settings.PasswordAuthentication = false;
|
||||||
PermitRootLogin = "yes";
|
|
||||||
X11Forwarding = true;
|
|
||||||
# This server is connected to the internet! Port 22 is open!!
|
|
||||||
# Aagghhhh!!! Stay safe!
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# This option defines the first version of NixOS you have installed on this
|
# This option defines the first version of NixOS you have installed on this
|
||||||
# particular machine, and is used to maintain compatibility with application
|
# particular machine, and is used to maintain compatibility with application
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
steam.enable = true;
|
steam.enable = true;
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
sddm.enable = true;
|
sddm.enable = true;
|
||||||
|
openssh.enable = true;
|
||||||
|
|
||||||
users.users = [
|
users.users = [
|
||||||
"crumb"
|
"crumb"
|
||||||
"msyds"
|
"msyds"
|
||||||
@@ -96,12 +98,6 @@
|
|||||||
|
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
settings.PermitRootLogin = "yes";
|
|
||||||
settings.X11Forwarding = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
security.pki.certificateFiles = [
|
security.pki.certificateFiles = [
|
||||||
../../public-keys/lolc.at.crt
|
../../public-keys/lolc.at.crt
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -121,12 +121,6 @@
|
|||||||
pkgs.cachix
|
pkgs.cachix
|
||||||
];
|
];
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
settings.PermitRootLogin = "yes";
|
|
||||||
settings.X11Forwarding = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
security.pki.certificateFiles = [
|
security.pki.certificateFiles = [
|
||||||
../../public-keys/lolc.at.crt
|
../../public-keys/lolc.at.crt
|
||||||
];
|
];
|
||||||
|
|||||||
16
modules/nixos/openssh.nix
Normal file
16
modules/nixos/openssh.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let cfg = config.sydnix.openssh;
|
||||||
|
in {
|
||||||
|
options.sydnix.openssh = {
|
||||||
|
enable = lib.mkEnableOption "OpenSSH server";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings.PermitRootLogin = "yes";
|
||||||
|
settings.X11Forwarding = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user