mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
updated parrot
and removed old mining module
This commit is contained in:
parent
8f75d166da
commit
f7adbbcc4e
4 changed files with 14 additions and 32 deletions
|
|
@ -1,10 +1,14 @@
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
openssl,
|
openssl,
|
||||||
cmake,
|
cmake,
|
||||||
libopus,
|
libopus,
|
||||||
|
yt-dlp,
|
||||||
|
ffmpeg,
|
||||||
|
makeWrapper,
|
||||||
}:
|
}:
|
||||||
# yt-dlp and ffmpeg required at runtime
|
# yt-dlp and ffmpeg required at runtime
|
||||||
rustPlatform.buildRustPackage {
|
rustPlatform.buildRustPackage {
|
||||||
|
|
@ -25,7 +29,14 @@ rustPlatform.buildRustPackage {
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkg-config
|
pkg-config
|
||||||
cmake
|
cmake
|
||||||
|
makeWrapper
|
||||||
];
|
];
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/parrot \
|
||||||
|
--set PATH ${lib.makeBinPath [
|
||||||
|
yt-dlp
|
||||||
|
ffmpeg
|
||||||
|
]}'';
|
||||||
cargoSha256 = "sha256-qPyuj5OxHrWz0YbrquCTTKZM3j1poXuioNNvn9z+xDQ=";
|
cargoSha256 = "sha256-qPyuj5OxHrWz0YbrquCTTKZM3j1poXuioNNvn9z+xDQ=";
|
||||||
|
|
||||||
RUSTC_BOOTSTRAP = 1;
|
RUSTC_BOOTSTRAP = 1;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ inputs: {
|
||||||
(import ./vfio.nix inputs)
|
(import ./vfio.nix inputs)
|
||||||
(import ./parrot.nix inputs)
|
(import ./parrot.nix inputs)
|
||||||
(import ./spicetify.nix inputs)
|
(import ./spicetify.nix inputs)
|
||||||
#(import ./mining.nix inputs)
|
|
||||||
(import ./zfs inputs)
|
(import ./zfs inputs)
|
||||||
(import ./containers inputs)
|
(import ./containers inputs)
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
_: {
|
|
||||||
pkgs,
|
|
||||||
settings,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
boot = {
|
|
||||||
kernelModules = ["msr"];
|
|
||||||
kernelParams = ["iomem=relaxed" "msr.allow_writes=on"];
|
|
||||||
};
|
|
||||||
systemd.services.mining = {
|
|
||||||
enable = true;
|
|
||||||
path = with pkgs; [t-rex-miner afk-cmds st zsh dbus xmrig];
|
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
wants = ["graphical.target"];
|
|
||||||
script = ''
|
|
||||||
afk-cmds -c /home/${settings.username}/saveme/afk-cmds.json
|
|
||||||
'';
|
|
||||||
environment = {
|
|
||||||
# PATH="/run/current-system/sw/bin"; missing something with dbus
|
|
||||||
XAUTHORITY = "/home/${settings.username}/.Xauthority";
|
|
||||||
DISPLAY = ":0";
|
|
||||||
XDG_DATA_DIRS = "/nix/var/nix/profiles/default/share:/run/current-system/sw/share";
|
|
||||||
DBUS_SESSION_BUS_ADDRESS = "unix:path=/run/user/1000/bus";
|
|
||||||
NO_AT_BRIDGE = "1";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -6,11 +6,10 @@ _: {
|
||||||
#discord bot stuff
|
#discord bot stuff
|
||||||
systemd.services.parrot = {
|
systemd.services.parrot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
path = with pkgs; [parrot yt-dlp ffmpeg];
|
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
wants = ["NetworkManager-wait-online.service"];
|
wants = ["network-online.target"];
|
||||||
after = ["NetworkManager-wait-online.service"];
|
after = ["network-online.target"];
|
||||||
script = "parrot";
|
script = "${pkgs.parrot}/bin/parrot";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
EnvironmentFile = config.sops.secrets.discordenv.path;
|
EnvironmentFile = config.sops.secrets.discordenv.path;
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue