snowfall lib migration WIP

This commit is contained in:
Aleksandr Lebedev 2025-08-06 12:18:08 +02:00
parent dc2440015e
commit b9dadac2af
31 changed files with 9106 additions and 382 deletions

View file

@ -0,0 +1,36 @@
{
lib,
pkgs,
inputs,
namespace,
system,
target,
format,
virtual,
systems,
config,
...
}:
with lib;
with lib.${namespace}; let
cfg = config.${namespace}.programs.sops;
impermanence = config.${namespace}.impermanence;
keyPath =
if impermanence.enable
then "${impermanence.persistentStorage}/sops/age/keys.txt"
else "/var/lib/sops/age/keys.txt";
in {
options.${namespace}.programs.sops = with types; {
enable = mkBoolOpt true "Enable KyleKrein's default sops settings";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [sops];
sops.defaultSopsFile = ./secrets/secrets.yaml;
sops.defaultSopsFormat = "yaml";
sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key" "${impermanence.persistentStorage}/home/kylekrein/.ssh/id_ed25519" "/home/kylekrein/.ssh/id_ed25519"];
sops.age.keyFile = keyPath;
# This will generate a new key if the key specified above does not exist
sops.age.generateKey = true;
};
}