rayfish package and config
This commit is contained in:
parent
8233e7abf1
commit
c08f7b8540
2 changed files with 41 additions and 1 deletions
|
|
@ -5,6 +5,9 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = import ./jailed-packages.nix;
|
pkgs = import ./jailed-packages.nix;
|
||||||
|
more_pkgs = {
|
||||||
|
rayfish = pkgs.callPackage ./pkgs/rayfish.nix { };
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -67,10 +70,13 @@ in
|
||||||
services."getty@tty1" = {
|
services."getty@tty1" = {
|
||||||
overrideStrategy = "asDropin";
|
overrideStrategy = "asDropin";
|
||||||
serviceConfig.ExecStart = [
|
serviceConfig.ExecStart = [
|
||||||
""
|
|
||||||
"@${pkgs.util-linux}/sbin/agetty agetty --login-program ${config.services.getty.loginProgram} --autologin zo --noclear --keep-baud %I 115200,38400,9600 $TERM"
|
"@${pkgs.util-linux}/sbin/agetty agetty --login-program ${config.services.getty.loginProgram} --autologin zo --noclear --keep-baud %I 115200,38400,9600 $TERM"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
packages = [
|
||||||
|
more_pkgs.rayfish
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
@ -78,6 +84,7 @@ in
|
||||||
wget
|
wget
|
||||||
cryptsetup
|
cryptsetup
|
||||||
cachix
|
cachix
|
||||||
|
more_pkgs.rayfish
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
|
|
|
||||||
33
pkgs/rayfish.nix
Normal file
33
pkgs/rayfish.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
fetchFromGitHub,
|
||||||
|
rustPlatform,
|
||||||
|
}:
|
||||||
|
|
||||||
|
rustPlatform.buildRustPackage {
|
||||||
|
pname = "rayfish";
|
||||||
|
version = "0.2.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "rayfish";
|
||||||
|
repo = "rayfish";
|
||||||
|
tag = "v0.2.0";
|
||||||
|
hash = "sha256-Y9XQt6HhGWXI7Uwpw4TjqMavqEE/+pa0gEhQ0Gh/SqM=";
|
||||||
|
};
|
||||||
|
|
||||||
|
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