refactor: complete rewrite
This commit is contained in:
parent
19a4bbda3c
commit
8e81943cf9
399 changed files with 3396 additions and 8042 deletions
31
modules/nixos/base/secrets.nix
Normal file
31
modules/nixos/base/secrets.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
inherit (config.ooknet) host;
|
||||
inherit (host) admin;
|
||||
inherit (config.services) tailscale;
|
||||
in {
|
||||
age.identityPaths = [
|
||||
"/home/${admin.name}/.ssh/id_ed25519"
|
||||
];
|
||||
|
||||
age.secrets = {
|
||||
tailscale-auth = mkIf tailscale.enable {
|
||||
file = "${self}/secrets/tailscale-auth.age";
|
||||
owner = "${admin.name}";
|
||||
group = "users";
|
||||
mode = "400";
|
||||
};
|
||||
github_key = mkIf admin.homeManager {
|
||||
file = "${self}/secrets/github_key.age";
|
||||
path = "/home/${admin.name}/.ssh/github_key";
|
||||
owner = "${admin.name}";
|
||||
group = "users";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue