moving toward a multi-machine configuration !
This commit is contained in:
parent
6cc7df17a7
commit
4cef631a8c
18 changed files with 250 additions and 181 deletions
1
pkgs/default.nix
Normal file
1
pkgs/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
(import ./jailed-packages.nix)
|
||||
21
pkgs/jailed-packages.nix
Normal file
21
pkgs/jailed-packages.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
let
|
||||
sources = import /etc/nixos/npins/default.nix;
|
||||
jail-nix = import /home/zo/dev/jail.nix { };
|
||||
jailOverlay =
|
||||
final: prev:
|
||||
jail-nix.lib.mkOverlay {
|
||||
inherit final prev;
|
||||
packages =
|
||||
combinators: with combinators; {
|
||||
waydroid-nftables = [
|
||||
network
|
||||
gui
|
||||
gpu
|
||||
];
|
||||
};
|
||||
};
|
||||
pkgs = import sources.nixpkgs {
|
||||
overlays = [ jailOverlay ];
|
||||
};
|
||||
in
|
||||
pkgs
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
}:
|
||||
let
|
||||
sources = import ../npins/default.nix;
|
||||
rayfish-repo = sources.rayfish;
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "rayfish";
|
||||
version = "0.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = rayfish-repo.repository.owner;
|
||||
repo = rayfish-repo.repository.repo;
|
||||
tag = rayfish-repo.version;
|
||||
hash = rayfish-repo.hash;
|
||||
};
|
||||
|
||||
cargoHash = "sha256-mh4lGbI3GUH32vf0FwVqyh737gCM7nEphQJr1rQed48=";
|
||||
doCheck = false;
|
||||
|
||||
installPhase = /* bash */ ''
|
||||
runHook installPhase
|
||||
|
||||
mkdir -p $out/bin/
|
||||
mkdir -p $out/lib/systemd/system/
|
||||
|
||||
# Copy binary and service to out
|
||||
cp ./target/x86_64-unknown-linux-gnu/release/ray $out/bin/
|
||||
cp ./contrib/rayfish.service $out/lib/systemd/system/
|
||||
|
||||
# Patch binary path in service file to match derivation path
|
||||
sed -i "s|/usr/local/bin/ray|$out/bin/ray|g" $out/lib/systemd/system/rayfish.service
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue