diff --git a/devices/nos/modules/arion/homepage/compose.nix b/devices/nos/modules/arion/homepage/compose.nix index 0d9b33a..d777ea2 100644 --- a/devices/nos/modules/arion/homepage/compose.nix +++ b/devices/nos/modules/arion/homepage/compose.nix @@ -1,6 +1,10 @@ -{config, ...}: let - inherit (config.arion) toYAML; +{ + config, + pkgs, + ... +}: let inherit (config.sops) secrets; + inherit (pkgs.writers) writeYAML; in { arion.projects."homepage"."homepage" = { image = ./images/homepage.nix; @@ -15,11 +19,11 @@ in { env_file = [secrets.homepage.path]; volumes = let - services = toYAML "services.yaml" (import ./services.nix); + services = writeYAML "services.yaml" (import ./services.nix); - bookmarks = toYAML "bookmarks.yaml" {}; + bookmarks = writeYAML "bookmarks.yaml" {}; - settings = toYAML "settings.yaml" { + settings = writeYAML "settings.yaml" { # FIXME: title not working title = "bruh"; theme = "dark"; @@ -33,7 +37,7 @@ in { }; }; - widgets = toYAML "widgets.yaml" [ + widgets = writeYAML "widgets.yaml" [ { resources = { cpu = true; diff --git a/modules/arion/default.nix b/modules/arion/default.nix index cd4a72e..41da620 100644 --- a/modules/arion/default.nix +++ b/modules/arion/default.nix @@ -27,17 +27,6 @@ in { options.arion = { enable = mkEnableOption (lib.mdDoc "My custom arion config layer module"); - # TODO: move this somewhere else - toYAML = mkOption { - type = types.anything; - readOnly = true; - default = name: attrs: - pkgs.runCommandCC name {} '' - echo '${builtins.toJSON attrs}' | - ${pkgs.remarshal}/bin/remarshal --if json --of yaml > $out - ''; - }; - rwDataDir = mkOption { default = "/var/lib/arion"; type = types.str;