mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
module moving mostly done
This commit is contained in:
parent
a9de747c25
commit
e78a971b9b
33 changed files with 455 additions and 447 deletions
27
systems/gerg-desktop/mining.nix
Normal file
27
systems/gerg-desktop/mining.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
_: {
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue