config=mkIf(cfg.desktop.enable||cfg.server.application.enable||cfg.server.network.enable||cfg.server.operation.enable||cfg.server.kubernetes.enable+++||cfg.server.webserver.enable+++||cfg.server.storage.enable)(mkMerge[{environment.systemPackages=[agenix.packages."${pkgs.system}".default];# if you changed this key, you need to regenerate all encrypt files from the decrypt contents!age.identityPaths=ifcfg.impermanence.enablethen[# To decrypt secrets on boot, this key should exists when the system is booting,# so we should use the real key file path(prefixed by `/persistent/`) here, instead of the path mounted by impermanence."/persistent/etc/ssh/ssh_host_ed25519_key"# Linux]else["/etc/ssh/ssh_host_ed25519_key"];
Originally created by @LokiSharp on GitHub (Nov 16, 2024).
https://github.com/ryan4yin/nix-config/blob/main/secrets/nixos.nix
```nix
config =
mkIf (
cfg.desktop.enable
|| cfg.server.application.enable
|| cfg.server.network.enable
|| cfg.server.operation.enable
|| cfg.server.kubernetes.enable
+++ || cfg.server.webserver.enable
+++ || cfg.server.storage.enable
) (mkMerge [
{
environment.systemPackages = [
agenix.packages."${pkgs.system}".default
];
# if you changed this key, you need to regenerate all encrypt files from the decrypt contents!
age.identityPaths =
if cfg.impermanence.enable
then [
# To decrypt secrets on boot, this key should exists when the system is booting,
# so we should use the real key file path(prefixed by `/persistent/`) here, instead of the path mounted by impermanence.
"/persistent/etc/ssh/ssh_host_ed25519_key" # Linux
]
else [
"/etc/ssh/ssh_host_ed25519_key"
];
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @LokiSharp on GitHub (Nov 16, 2024).
https://github.com/ryan4yin/nix-config/blob/main/secrets/nixos.nix
@ryan4yin commented on GitHub (Nov 17, 2024):
确实有点问题,不过我这这些东西现在都跑在一台机器上所以没报过错,已修复。