Compare commits
3 commits
228cbf3734
...
befadf8ed2
| Author | SHA1 | Date | |
|---|---|---|---|
| befadf8ed2 | |||
| a3d1a8a744 | |||
| 4ea69cf70d |
2 changed files with 32 additions and 5 deletions
8
flake.lock
generated
8
flake.lock
generated
|
|
@ -377,11 +377,11 @@
|
|||
"secrets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1713107869,
|
||||
"narHash": "sha256-TniJoCQfJ3OXrcqhH/8xcV6o4Sa5C/4KSRtk0c0/RK4=",
|
||||
"lastModified": 1713776544,
|
||||
"narHash": "sha256-EQW8P1TfkYQV0EEK1n3Gh9wRp9KlC0EbidH2j+niCaE=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "a00a07cd931b6eab722727a0606837cb895997f0",
|
||||
"revCount": 11,
|
||||
"rev": "61410d68f15b3b970067a3fdd39667fdd9a89edd",
|
||||
"revCount": 12,
|
||||
"type": "git",
|
||||
"url": "ssh://forgejo@git.everest.sable-pancake.ts.net:4222/Toast/nix-secrets"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,10 +1,37 @@
|
|||
{...}: {
|
||||
{
|
||||
flakeSelf,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
hostSecrets = "${flakeSelf.inputs.secrets}/" + config.networking.hostName + "/";
|
||||
hostKeyPath = "/etc/ssh/everest_host_key";
|
||||
in {
|
||||
age.secrets = {
|
||||
everest-host-key = {
|
||||
file = hostSecrets + "host-private-key.age";
|
||||
path = hostKeyPath;
|
||||
mode = "0400";
|
||||
};
|
||||
"everest-host-key.pub" = {
|
||||
file = hostSecrets + "host-public-key.age";
|
||||
path = hostKeyPath + ".pub";
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
UseDns = true;
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
hostKeys = [
|
||||
{
|
||||
path = hostKeyPath;
|
||||
type = "ed25519";
|
||||
comment = "Everest host key";
|
||||
}
|
||||
];
|
||||
startWhenNeeded = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue