addin ssh key

This commit is contained in:
2023-11-21 14:00:06 +00:00
parent 4178372853
commit 54c3d889ab
33 changed files with 873 additions and 829 deletions

View File

@@ -1,7 +1,12 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{ lib, config, pkgs, modulesPath, ... }: {
{
lib,
config,
pkgs,
modulesPath,
...
}: {
# You can import other NixOS modules here
imports = [
@@ -10,10 +15,9 @@
# Include static network settings.
./networking.nix
"${modulesPath}/virtualisation/hyperv-image.nix"
];
nixpkgs = { config = { allowUnfree = true; }; };
nixpkgs = {config = {allowUnfree = true;};};
nix = {
settings = {
@@ -28,12 +32,12 @@
system.stateVersion = "23.05";
mymods = {
gnome.enable = true;
user_sstent.enable = true;
sshd.enable = true;
gnome.enable = true;
user_sstent.enable = true;
sshd.enable = true;
};
networking.firewall.allowedTCPPorts = [ 22 ];
networking.firewall.allowedTCPPorts = [22];
environment.etc."ssh/ssh_host_rsa_key".source = ./ssh/ssh_host_rsa_key;
environment.etc."ssh/ssh_host_rsa_key".mode = "0400";
@@ -41,7 +45,4 @@
environment.etc."ssh/ssh_host_ed25519_key".source = ./ssh/ssh_host_ed25519_key;
environment.etc."ssh/ssh_host_ed25519_key".mode = "0400";
environment.etc."ssh/ssh_host_ed25519_key.pub".source = ./ssh/ssh_host_ed25519_key.pub;
}