refactor(romm): inline generated configuration

This commit is contained in:
2026-10-20 23:39:29 -04:00
parent 1c1420b8c0
commit 849491e332

View File

@@ -6,13 +6,6 @@
}: }:
let let
cfg = config.modules.services.romm; cfg = config.modules.services.romm;
rommConfig = (pkgs.formats.yaml { }).generate "romm-config.yml" {
emulatorjs.auto_save_sync = false;
filesystem.structure = {
default = "roms/{platform}/{game}";
firmware = "bios/{platform}";
};
};
in in
{ {
options.modules.services.romm = { options.modules.services.romm = {
@@ -48,9 +41,16 @@ in
inherit (cfg) environmentFile; inherit (cfg) environmentFile;
}; };
systemd.tmpfiles.settings."10-romm"."${config.services.romm.dataDir}/config/config.yml"."L+" = { systemd.tmpfiles.settings."10-romm"."${config.services.romm.dataDir}/config/config.yml"."L+".argument =
argument = toString rommConfig; toString (
(pkgs.formats.yaml { }).generate "romm-config.yml" {
emulatorjs.auto_save_sync = false;
filesystem.structure = {
default = "roms/{platform}/{game}";
firmware = "bios/{platform}";
}; };
}
);
users.users = { users.users = {
romm.uid = config.registry."stable-uid".${config.networking.hostName}.romm; romm.uid = config.registry."stable-uid".${config.networking.hostName}.romm;