diff options
| author | Chris Wells <chris@mathematicaster.org> | 2024-09-10 14:51:28 -0500 |
|---|---|---|
| committer | Chris Wells <chris@mathematicaster.org> | 2024-09-10 14:51:28 -0500 |
| commit | 4f471484b3a1e16230979a8406503a220b9101f4 (patch) | |
| tree | dc3f5256f275f34d3bcc9573462ed34c7fd97f77 /modules/plato/default.nix | |
| parent | 5cb16c34a8c5b803ec723934c1dc828c0e8e3bad (diff) | |
| download | kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.tar kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.tar.gz kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.tar.bz2 kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.tar.lz kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.tar.xz kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.tar.zst kobo-manager-4f471484b3a1e16230979a8406503a220b9101f4.zip | |
I think this is almost working!
Diffstat (limited to 'modules/plato/default.nix')
| -rw-r--r-- | modules/plato/default.nix | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/modules/plato/default.nix b/modules/plato/default.nix index ac0c5d7..74fe8c1 100644 --- a/modules/plato/default.nix +++ b/modules/plato/default.nix @@ -55,25 +55,36 @@ in { }; }; - _finalPackage = mkOption { + finalPackage = mkOption { type = types.package; internal = true; readOnly = true; - default = pkgs.symlinkJoin { + default = pkgs.mergePaths { name = "plato-package"; paths = [ + (pkgs.linkFarm "plato" [{ + name = removePrefix "/" cfg.devicePath; + path = cfg.package.out; + }]) cfg._createdFiles - # (pkgs.linkFarm "plato-files" [{ - # name = removePrefix "/" cfg.devicePath; - # path = cfg.package.out; - # }]) - (pkgs.runCommandLocal "plato-files" {} '' - mkdir -p "$(dirname "$out${cfg.devicePath}")" - cp -r "${cfg.package.out}" "$out${cfg.devicePath}" - '') cfg.package.KoboRoot ]; }; + # pkgs.symlinkJoin { + # name = "plato-package"; + # paths = [ + # cfg._createdFiles + # # (pkgs.linkFarm "plato-files" [{ + # # name = removePrefix "/" cfg.devicePath; + # # path = cfg.package.out; + # # }]) + # (pkgs.runCommandLocal "plato-files" {} '' + # mkdir -p "$(dirname "$out${cfg.devicePath}")" + # cp -r "${cfg.package.out}" "$out${cfg.devicePath}" + # '') + # cfg.package.KoboRoot + # ]; + # }; }; _allFiles = mkOption { @@ -173,6 +184,7 @@ in { config = mkMerge [ { + info.plato = cfg.enable; plato.file = { "Settings.toml" = mkIf (cfg.settings != {}) { source = toml.generate "Settings.toml" cfg.settings; @@ -205,11 +217,8 @@ in { }; } (mkIf cfg.enable { - koboroot.include = singleton cfg._finalPackage; - # singleton (pkgs.linkFarm [{ - # name = cfg.devicePath; - # path = cfg._allFiles; - # }]); + koboroot.include = singleton cfg.finalPackage; + nickel.menu.item = mkIf cfg.nickel.enable { plato = singleton { |
