-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfiguration.nix
84 lines (70 loc) · 3.27 KB
/
configuration.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{ config, pkgs, lib, ... }:
{
#isoImage.squashfsCompression = "gzip -Xcompression-level 1";
boot.kernelParams = [ "net.ifnames=0" ];
services.openssh.enable = lib.mkForce false;
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
time.timeZone = "Europe/Berlin";
networking.hostName = "setup-mode-trigger";
console = {
font = "Lat2-Terminus16";
keyMap = lib.mkForce "de";
useXkbConfig = true;
};
environment.systemPackages = with pkgs; [
htop
nano
wget
curl
tcpdump
ethtool
tmux
(import ./ffda-network-setup-mode.nix)
];
networking = {
useNetworkd = true;
usePredictableInterfaceNames = false;
useDHCP = false;
};
services.getty.helpLine = lib.mkForce ''
#####################################################################
# #
# Run `sudo send-network-request eth0` to start sending requests. #
# #
#####################################################################
'';
programs.ssh.extraConfig = ''
Host 192.168.0.1 192.168.1.1 192.168.8.1 192.168.88.1 192.168.1.254 192.168.1.20 fdc3:67ce:cc7e:9001::1:1 fdc3:67ce:cc7e:9040::1:1 fd01:67c:2ed8:10*::1:1
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LogLevel QUIET
Host *
LogLevel ERROR
User root
'';
environment.shellAliases = {
ssh_force_password = "ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no";
scp_force_password = "scp -o PreferredAuthentications=password -o PubkeyAuthentication=no";
sftp_force_password = "sftp -o PreferredAuthentications=password -o PubkeyAuthentication=no";
ssh_stupid = "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=no";
scp_stupid = "scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=no";
ssh_rsa = "ssh -o 'HostKeyAlgorithms +ssh-rsa' -o 'PubkeyAcceptedKeyTypes +ssh-rsa'";
scp_rsa = "scp -o 'HostKeyAlgorithms +ssh-rsa' -o 'PubkeyAcceptedKeyTypes +ssh-rsa'";
ssh_rsa_stupid = "ssh -o 'HostKeyAlgorithms +ssh-rsa' -o 'PubkeyAcceptedKeyTypes +ssh-rsa' -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=no";
scp_rsa_stupid = "scp -o 'HostKeyAlgorithms +ssh-rsa' -o 'PubkeyAcceptedKeyTypes +ssh-rsa' -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=no";
ssh_old = "ssh -o 'KexAlgorithms diffie-hellman-group1-sha1' -o 'HostKeyAlgorithms +ssh-dss' -o 'Ciphers aes128-cbc,3des-cbc'";
ssh_old_stupid = "ssh -o 'KexAlgorithms diffie-hellman-group1-sha1' -o 'HostKeyAlgorithms +ssh-dss' -o 'Ciphers aes128-cbc,3des-cbc' -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=no";
scp_old_stupid = "scp -o 'KexAlgorithms diffie-hellman-group1-sha1' -o 'HostKeyAlgorithms +ssh-dss' -o 'Ciphers aes128-cbc,3des-cbc' -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=no";
};
systemd.network = {
networks = {
"99-default" = {
matchConfig.Name = "*";
networkConfig = {
IPv6AcceptRA = true;
DHCP = "yes";
};
};
};
};
}