uvms/pkgs/default.nix
Else Someone 384b45bdef pkgs.uvms: init
...with some basic optional persistence and without having to rebuild
images for every app

nix run -f . pkgs.uvms -- --persist-home librewolf alacritty --run librewolf --run alacritty
2026-02-27 18:26:41 +02:00

31 lines
732 B
Nix

{ lib, newScope }:
let
dirToAttrs = import ../lib/dirToAttrs.nix { inherit lib; };
in
lib.makeScope newScope (
self:
let
callPackage =
fun: overrides:
let
result = self.callPackage fun overrides;
in
result // { override = result.__originalOverride or result.override; };
in
dirToAttrs ./.
[
(
path: fname: _:
if fname == "default.nix" then null else lib.strings.removeSuffix ".nix" fname
)
]
(
name: fpath: typ:
if typ == "regular" then
callPackage fpath { }
else if typ == "directory" && builtins.pathExists (fpath + "/package.nix") then
callPackage (fpath + "/package.nix") { }
else
null
)
)