init-ssh: fix tor
This commit is contained in:
parent
5743e4bc82
commit
817d2b5bdb
1 changed files with 4 additions and 19 deletions
|
@ -28,15 +28,6 @@ in {
|
|||
++ (map (keyFile: lib.fileContents keyFile)
|
||||
config.users.users.root.openssh.authorizedKeys.keyFiles);
|
||||
};
|
||||
|
||||
hostDSSKey = mkOption {
|
||||
default = null;
|
||||
type = with types; nullOr path;
|
||||
description = ''
|
||||
you only need one host key
|
||||
nix-shell -p dropbear --run "dropbearkey -t dss -f ./host_dss_key"
|
||||
'';
|
||||
};
|
||||
hostECDSAKey = mkOption {
|
||||
default = null;
|
||||
type = with types; nullOr path;
|
||||
|
@ -45,14 +36,6 @@ in {
|
|||
nix-shell -p dropbear --run "dropbearkey -t ecdsa -f ./host_ecdsa_key"
|
||||
'';
|
||||
};
|
||||
hostRSAKey = mkOption {
|
||||
default = null;
|
||||
type = with types; nullOr path;
|
||||
description = ''
|
||||
you only need one host key
|
||||
nix-shell -p dropbear --run "dropbearkey -t rsa -f ./host_rsa_key"
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
@ -90,6 +73,10 @@ in {
|
|||
# have to do this otherwise tor does not want to start
|
||||
chmod -R 700 /etc/tor
|
||||
|
||||
echo "make sure localhost is up"
|
||||
ip a a 127.0.0.1/8 dev lo
|
||||
ifconfig lo up
|
||||
|
||||
echo "tor: starting tor"
|
||||
tor -f ${torRc} --verify-config
|
||||
tor -f ${torRc} &
|
||||
|
@ -105,9 +92,7 @@ in {
|
|||
port = cfg.port;
|
||||
};
|
||||
boot.initrd.availableKernelModules = cfg.kernelModules;
|
||||
boot.initrd.network.ssh.hostDSSKey = cfg.hostDSSKey;
|
||||
boot.initrd.network.ssh.hostECDSAKey = cfg.hostECDSAKey;
|
||||
boot.initrd.network.ssh.hostRSAKey = cfg.hostRSAKey;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue