remove ssh private key and add it to sops.

This commit is contained in:
Ulic-youthlic 2025-01-08 20:35:26 +08:00
parent 914c64e982
commit 635f3cec9b
10 changed files with 91 additions and 14 deletions

View file

@ -1,6 +1,7 @@
{
pkgs,
config,
rootPath,
inputs,
...
}:
@ -97,4 +98,14 @@
uris = [ "qemu:///system" ];
};
};
sops.secrets."ssh-private-key" = {
mode = "0600";
path = "${config.home.homeDirectory}/.ssh/id_ed25519";
};
sops.gnupg = {
home = "${config.home.homeDirectory}/.gnupg";
};
sops.defaultSopsFile = rootPath + "/secrets/general.yaml";
}

View file

@ -1,8 +1,12 @@
{ lib, ... }:
{ inputs, lib, ... }:
{
imports = [
./nix.nix
];
imports =
(with inputs; [
sops-nix.homeManagerModules.sops
])
++ [
./nix.nix
];
options = {
youthlic.nixos.enable = lib.mkOption {