dust: remove host ssh keys

This commit is contained in:
Guanran Wang 2024-12-22 19:28:56 +08:00
parent 636cdc6600
commit 66cd66808c
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF
4 changed files with 12 additions and 17 deletions

View file

@ -24,6 +24,10 @@
preservation.nixosModules.preservation
]);
sops = {
age.keyFile = "/persist/home/guanranwang/.config/sops/age/keys.txt";
};
sops.secrets = lib.mapAttrs (_n: v: v // { sopsFile = ./secrets.yaml; }) (
lib.listToAttrs (
lib.map (x: lib.nameValuePair "wireless/${x}" { path = "/var/lib/iwd/${x}.psk"; }) [

View file

@ -1,6 +1,4 @@
{ lib, ... }:
{
sops.age.sshKeyPaths = lib.mkForce [ "/persist/etc/ssh/ssh_host_ed25519_key" ];
fileSystems."/persist".neededForBoot = true;
preservation.enable = true;
preservation.preserveAt."/persist" = {
@ -9,23 +7,17 @@
"/var/lib"
"/etc/secureboot"
];
files = [
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
];
users.guanranwang = {
directories = [
"Desktop"
"Documents"
"Downloads"
"Music"
"Pictures"
"Videos"
#"Public"
#"Templates"
# "Desktop"
# "Public"
# "Templates"
".ssh"
".mozilla/firefox"

View file

@ -65,10 +65,4 @@
# See `nixos-version(8)`
system.configurationRevision = inputs.self.rev or "dirty";
### sops-nix
sops = {
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
gnupg.sshKeyPaths = [ ];
};
}

View file

@ -17,4 +17,9 @@
time.timeZone = "UTC";
networking.domain = "ny4.dev";
sops = {
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
gnupg.sshKeyPaths = [ ];
};
}