chore: small fixes

This commit is contained in:
Patrick 2024-12-23 17:02:30 +01:00
parent 29b100e13e
commit 606829afb0
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
3 changed files with 9 additions and 8 deletions

View file

@ -5,7 +5,9 @@
... ...
}: }:
let let
onlyHost = lib.mkIf (!config.boot.isContainer); onlyHost = lib.mkIf (
!config.boot.isContainer && !(config ? microvm.guest && config.microvm.guest.enable)
);
prune = prune =
folder: folder:
pkgs.writers.writePython3Bin "impermanence-prune" { } '' pkgs.writers.writePython3Bin "impermanence-prune" { } ''

View file

@ -1,3 +1,4 @@
{ config, lib, ... }:
{ {
age.generators.argon2id = age.generators.argon2id =
{ {
@ -17,5 +18,9 @@
| ${pkgs.libargon2}/bin/argon2 "$(${pkgs.openssl}/bin/openssl rand -base64 16)" -id -e \ | ${pkgs.libargon2}/bin/argon2 "$(${pkgs.openssl}/bin/openssl rand -base64 16)" -id -e \
|| die "Failure while generating argon2id hash" || die "Failure while generating argon2id hash"
''; '';
secrets.secretFiles =
let
local = config.node.secretsDir + "/secrets.nix.age";
in
lib.optionalAttrs (config.node.name != null && lib.pathExists local) { inherit local; };
} }

View file

@ -72,10 +72,4 @@
environment.ldso32 = null; environment.ldso32 = null;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
secrets.secretFiles =
let
local = config.node.secretsDir + "/secrets.nix.age";
in
lib.optionalAttrs (config.node.name != null && lib.pathExists local) { inherit local; };
} }