split apps into separate file

This commit is contained in:
Sean Buckley 2022-05-04 13:27:07 -04:00
parent 269fed1954
commit da1686c7bc
2 changed files with 17 additions and 17 deletions

View file

@ -49,24 +49,10 @@
nixosConfigurations = import ./hosts nixpkgs hardware self.nixosModule;
apps = forAllSystems (system:
import lib/apps.nix nixpkgs.legacyPackages.${system});
packages = forAllSystems
(system: mypkgs nixpkgs.legacyPackages.${system});
apps = forAllSystems (system:
with nixpkgs.legacyPackages.${system};
{
jupyterlab =
let
jupy = python3.withPackages (p: with p; [ jupyterlab ipython ]);
in
writeShellScriptBin "jupyterlab" ''
exec ${jupy}/bin/python -m jupyterlab "$@"
'';
qemu-uefi = writeShellScriptBin "qemu-uefi" ''
exec ${qemu_kvm}/bin/qemu-kvm -bios ${OVMF.fd}/FV/OVMF.fd "$@"
'';
}
);
};
}

14
lib/apps.nix Normal file
View file

@ -0,0 +1,14 @@
pkgs:
{
jupyterlab =
let
jupy = pkgs.python3.withPackages (p: with p; [ jupyterlab ipython ]);
in
pkgs.writeShellScriptBin "jupyterlab" ''
exec ${jupy}/bin/python -m jupyterlab "$@"
'';
qemu-uefi = pkgs.writeShellScriptBin "qemu-uefi" ''
exec ${pkgs.qemu_kvm}/bin/qemu-kvm -bios ${pkgs.OVMF.fd}/FV/OVMF.fd "$@"
'';
}