mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-22 03:41:26 +00:00
Add more SSH settings
This commit is contained in:
parent
05627a1dc9
commit
7193030b37
|
@ -45,9 +45,13 @@ Example JSON config:
|
||||||
},
|
},
|
||||||
"timezone": "Europe/Moscow",
|
"timezone": "Europe/Moscow",
|
||||||
"resticPassword": "PASS",
|
"resticPassword": "PASS",
|
||||||
|
"ssh": {
|
||||||
|
"enable": true,
|
||||||
"rootSshKeys": [
|
"rootSshKeys": [
|
||||||
"ssh-ed25519 KEY user@host"
|
"ssh-ed25519 KEY user@host"
|
||||||
],
|
],
|
||||||
|
"passwordAuthentication": true
|
||||||
|
},
|
||||||
"username": "owner",
|
"username": "owner",
|
||||||
"users": [
|
"users": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,10 +37,10 @@
|
||||||
};
|
};
|
||||||
time.timeZone = config.services.userdata.timezone;
|
time.timeZone = config.services.userdata.timezone;
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
users.users.root.openssh.authorizedKeys.keys = config.services.userdata.rootSshKeys;
|
users.users.root.openssh.authorizedKeys.keys = config.services.userdata.ssh.rootKeys;
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = config.services.userdata.ssh.enable;
|
||||||
passwordAuthentication = true;
|
passwordAuthentication = config.services.userdata.ssh.passwordAuthentication;
|
||||||
permitRootLogin = "yes";
|
permitRootLogin = "yes";
|
||||||
openFirewall = false;
|
openFirewall = false;
|
||||||
};
|
};
|
||||||
|
|
|
@ -103,12 +103,23 @@
|
||||||
"resticPassword": {
|
"resticPassword": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"rootSshKeys": {
|
"ssh": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"enable": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"rootKeys": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"passwordAuthentication": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"users": {
|
"users": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
|
|
|
@ -117,12 +117,25 @@ in
|
||||||
'';
|
'';
|
||||||
type = types.nullOr types.string;
|
type = types.nullOr types.string;
|
||||||
};
|
};
|
||||||
rootSshKeys = mkOption {
|
ssh = {
|
||||||
|
enable = mkOption {
|
||||||
|
default = true;
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
};
|
||||||
|
rootKeys = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Root SSH Keys
|
Root SSH Keys
|
||||||
'';
|
'';
|
||||||
type = types.nullOr (types.listOf types.string);
|
type = types.nullOr (types.listOf types.string);
|
||||||
};
|
};
|
||||||
|
passwordAuthentication = mkOption {
|
||||||
|
description = ''
|
||||||
|
Password authentication for SSH
|
||||||
|
'';
|
||||||
|
default = true;
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
};
|
||||||
|
};
|
||||||
timezone = mkOption {
|
timezone = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Timezone used by the server
|
Timezone used by the server
|
||||||
|
|
Loading…
Reference in a new issue