♻️ [shared] Moved files to base shared directory

This commit is contained in:
2025-05-22 19:36:29 +02:00
parent 7455299dd7
commit 21d07edcf1
18 changed files with 43 additions and 58 deletions

View File

@ -1,9 +1,5 @@
{
imports = [
./sops.nix
./ssh.nix
./yubikey.nix
];
programs.gnupg.agent.enable = true;
}

View File

@ -1,20 +0,0 @@
{
inputs,
lib,
systemConfig,
...
}:
{
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
defaultSopsFile = lib.custom.relativeToRoot "shared/secrets/secrets.yaml";
defaultSopsFormat = "yaml";
age.keyFile = "/home/${systemConfig.username}/.config/sops/age/keys.txt";
secrets.password-hash.neededForUsers = true;
};
}

View File

@ -1,27 +0,0 @@
# /nix/store/<hash>/etc/ssh/ssh_config & /nix/store/<hash>/etc/ssh/authorized_keys
{
systemConfig,
systems,
common,
...
}:
with builtins;
let
domain = "dns.${common.domain}";
in
{
programs.ssh.knownHosts = listToAttrs (
map (system: {
name = system.hostName;
value = {
extraHostNames = [
"${system.hostName}.${domain}"
];
publicKey = system.ssh.publicKey;
};
}) systems
);
users.users.${systemConfig.username}.openssh.authorizedKeys.keys = (
map (system: system.ssh.publicKey) systems
);
}