dust: remove host ssh keys
This commit is contained in:
parent
636cdc6600
commit
66cd66808c
4 changed files with 12 additions and 17 deletions
|
@ -24,6 +24,10 @@
|
||||||
preservation.nixosModules.preservation
|
preservation.nixosModules.preservation
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
sops = {
|
||||||
|
age.keyFile = "/persist/home/guanranwang/.config/sops/age/keys.txt";
|
||||||
|
};
|
||||||
|
|
||||||
sops.secrets = lib.mapAttrs (_n: v: v // { sopsFile = ./secrets.yaml; }) (
|
sops.secrets = lib.mapAttrs (_n: v: v // { sopsFile = ./secrets.yaml; }) (
|
||||||
lib.listToAttrs (
|
lib.listToAttrs (
|
||||||
lib.map (x: lib.nameValuePair "wireless/${x}" { path = "/var/lib/iwd/${x}.psk"; }) [
|
lib.map (x: lib.nameValuePair "wireless/${x}" { path = "/var/lib/iwd/${x}.psk"; }) [
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{ lib, ... }:
|
|
||||||
{
|
{
|
||||||
sops.age.sshKeyPaths = lib.mkForce [ "/persist/etc/ssh/ssh_host_ed25519_key" ];
|
|
||||||
fileSystems."/persist".neededForBoot = true;
|
fileSystems."/persist".neededForBoot = true;
|
||||||
preservation.enable = true;
|
preservation.enable = true;
|
||||||
preservation.preserveAt."/persist" = {
|
preservation.preserveAt."/persist" = {
|
||||||
|
@ -9,21 +7,15 @@
|
||||||
"/var/lib"
|
"/var/lib"
|
||||||
"/etc/secureboot"
|
"/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 = {
|
users.guanranwang = {
|
||||||
directories = [
|
directories = [
|
||||||
"Desktop"
|
|
||||||
"Documents"
|
"Documents"
|
||||||
"Downloads"
|
"Downloads"
|
||||||
"Music"
|
"Music"
|
||||||
"Pictures"
|
"Pictures"
|
||||||
"Videos"
|
"Videos"
|
||||||
|
# "Desktop"
|
||||||
# "Public"
|
# "Public"
|
||||||
# "Templates"
|
# "Templates"
|
||||||
|
|
||||||
|
|
|
@ -65,10 +65,4 @@
|
||||||
|
|
||||||
# See `nixos-version(8)`
|
# See `nixos-version(8)`
|
||||||
system.configurationRevision = inputs.self.rev or "dirty";
|
system.configurationRevision = inputs.self.rev or "dirty";
|
||||||
|
|
||||||
### sops-nix
|
|
||||||
sops = {
|
|
||||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
||||||
gnupg.sshKeyPaths = [ ];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,4 +17,9 @@
|
||||||
time.timeZone = "UTC";
|
time.timeZone = "UTC";
|
||||||
|
|
||||||
networking.domain = "ny4.dev";
|
networking.domain = "ny4.dev";
|
||||||
|
|
||||||
|
sops = {
|
||||||
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
|
gnupg.sshKeyPaths = [ ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue