Moved openssh
This commit is contained in:
1 parent
723dd77cc3
commit
4b03beb264
8 files changed
+45
-27
No files matched your search
@@ -2,6 +2,7 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
imports = [ ./hl-bigbox1.hardware-configuration.nix ];
|
||||
skyg.user.enabled = true;
|
||||
skyg.ssh-server.enabled = true;
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
virtualisation.docker.enableNvidia = true;
|
||||
@@ -60,12 +61,12 @@
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
# Steam Settings
|
||||
users.users.steam = {
|
||||
shell = pkgs.zsh;
|
||||
isNormalUser = true;
|
||||
description = "Steam User";
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
users.users.steam = {
|
||||
shell = pkgs.zsh;
|
||||
isNormalUser = true;
|
||||
description = "Steam User";
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
imports = [ ./hl-minipc1.hardware-configuration.nix ];
|
||||
skyg.user.enabled = true;
|
||||
skyg.ssh-server.enabled = true;
|
||||
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
imports = [ ./hl-minipc1.hardware-configuration.nix ];
|
||||
skyg.user.enabled = true;
|
||||
skyg.ssh-server.enabled = true;
|
||||
|
||||
# Nix Stores
|
||||
services.nix-serve = {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
imports = [ ./hl-minipc2.hardware-configuration.nix ];
|
||||
skyg.user.enabled = true;
|
||||
skyg.ssh-server.enabled = true;
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
# Bootloader.
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{
|
||||
imports = [ ./hl-terra1.hardware-configuration.nix ];
|
||||
skyg.user.enabled = true;
|
||||
skyg.ssh-server.enabled = true;
|
||||
# firmware updater
|
||||
services.fwupd.enable = true;
|
||||
# Bootloader.
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
./hardware
|
||||
./core.nix
|
||||
./user.nix
|
||||
./ssh-server.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.skyg.ssh-server;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
skyg.ssh-server = {
|
||||
enabled = mkEnableOption
|
||||
"enable ssh server";
|
||||
masterPubKey = mkOption {
|
||||
type = types.str;
|
||||
default = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCuatskL9qXvgvS3E8zRwosFnpcN0f8PkKl8syAvpn297V2iPk6mi8yK3EE7xPpxaKKlwUuBHDj3BNUCoLgdRFKUgroRDzr3BMm+gZTHy6CuEZBY9zBRTmH+aOV6FZ96QPW4zba0BW5YPkPNy/FhYibjpXyZ3nX4/LWSbPKQJ7wTnUJZgq4VFmevBOttvhzUJUgTziMFsGXn6I38fAi6LI8qwI+zOOdsNjtKgr/TIlO/7VqcH7GYnQEwlthl577sDd1V6+XWz649qoiBYyq0Ahm09dwYx2iGQwLo8IYFbSy4aJRK/PI0+ytnPBoF5QCl+ILb5E8uV3e6Wb9WpXl9Hv2iLx91/9iq5hykHPnfVtkq3MK0C2vqkvX1qFOIkKM7vmxvXGbaDZDGK3G+/zkQ7GUw8ydbl9wGwE9cKbm9miqs4w2Ry/+3IZasE6G2TI97bSzSYInQd2RwoglqBOaJojbUqgI9wvNdKxGhADNFbZah2+s6SSe1ByQRN3b9wtmqu0= ari@shared";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enabled {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.PermitRootLogin = "yes";
|
||||
};
|
||||
users.users.${config.skyg.user.name}.openssh.authorizedKeys.keys = [
|
||||
cfg.masterPubKey
|
||||
];
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
cfg.masterPubKey
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
{ enableSSHServer, user }:
|
||||
{ ... }:
|
||||
{
|
||||
services.openssh =
|
||||
if enableSSHServer then {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.KbdInteractiveAuthentication = false;
|
||||
settings.PermitRootLogin = "yes";
|
||||
} else {
|
||||
enable = false;
|
||||
};
|
||||
users.users.${user.name}.openssh.authorizedKeys.keys =
|
||||
if enableSSHServer then [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCuatskL9qXvgvS3E8zRwosFnpcN0f8PkKl8syAvpn297V2iPk6mi8yK3EE7xPpxaKKlwUuBHDj3BNUCoLgdRFKUgroRDzr3BMm+gZTHy6CuEZBY9zBRTmH+aOV6FZ96QPW4zba0BW5YPkPNy/FhYibjpXyZ3nX4/LWSbPKQJ7wTnUJZgq4VFmevBOttvhzUJUgTziMFsGXn6I38fAi6LI8qwI+zOOdsNjtKgr/TIlO/7VqcH7GYnQEwlthl577sDd1V6+XWz649qoiBYyq0Ahm09dwYx2iGQwLo8IYFbSy4aJRK/PI0+ytnPBoF5QCl+ILb5E8uV3e6Wb9WpXl9Hv2iLx91/9iq5hykHPnfVtkq3MK0C2vqkvX1qFOIkKM7vmxvXGbaDZDGK3G+/zkQ7GUw8ydbl9wGwE9cKbm9miqs4w2Ry/+3IZasE6G2TI97bSzSYInQd2RwoglqBOaJojbUqgI9wvNdKxGhADNFbZah2+s6SSe1ByQRN3b9wtmqu0= ari@shared"
|
||||
] else [ ];
|
||||
users.users.root.openssh.authorizedKeys.keys =
|
||||
if enableSSHServer then [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCuatskL9qXvgvS3E8zRwosFnpcN0f8PkKl8syAvpn297V2iPk6mi8yK3EE7xPpxaKKlwUuBHDj3BNUCoLgdRFKUgroRDzr3BMm+gZTHy6CuEZBY9zBRTmH+aOV6FZ96QPW4zba0BW5YPkPNy/FhYibjpXyZ3nX4/LWSbPKQJ7wTnUJZgq4VFmevBOttvhzUJUgTziMFsGXn6I38fAi6LI8qwI+zOOdsNjtKgr/TIlO/7VqcH7GYnQEwlthl577sDd1V6+XWz649qoiBYyq0Ahm09dwYx2iGQwLo8IYFbSy4aJRK/PI0+ytnPBoF5QCl+ILb5E8uV3e6Wb9WpXl9Hv2iLx91/9iq5hykHPnfVtkq3MK0C2vqkvX1qFOIkKM7vmxvXGbaDZDGK3G+/zkQ7GUw8ydbl9wGwE9cKbm9miqs4w2Ry/+3IZasE6G2TI97bSzSYInQd2RwoglqBOaJojbUqgI9wvNdKxGhADNFbZah2+s6SSe1ByQRN3b9wtmqu0= ari@shared"
|
||||
] else [ ];
|
||||
}
|
||||
Reference in new issue
Block a user