refactor(arion): remove toYAML and use writeYAML instead
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
c1b5d2e360
commit
cea02da54c
2 changed files with 10 additions and 17 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue