nixos-config/images/etherminer/configuration.nix

52 lines
1.1 KiB
Nix
Raw Normal View History

2021-05-06 07:58:41 +02:00
# $ nixos-generator -f iso -c configuration.nix -o image.iso
{ pkgs, lib, ... }:
2021-05-15 11:27:34 +02:00
let parameters = import ./parameters.nix;
in {
2021-05-06 07:58:41 +02:00
2021-05-15 11:27:34 +02:00
imports = [ ./ethminer.nix ];
2021-05-06 07:58:41 +02:00
nixpkgs.overlays = [
(self: super: {
ethminer = super.lib.callPackageWith super ./ethminer-pkg.nix {
cudaSupport = true;
};
})
];
2021-05-06 15:02:42 +02:00
users.users.root.initialPassword = "root";
2021-05-06 07:58:41 +02:00
# allow un-free
# -------------
nixpkgs.config.allowUnfree = true;
environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
time.timeZone = lib.mkDefault "Europe/Berlin";
networking.wireless = {
enable = true;
networks."${parameters.ssid}".psk = parameters.password;
};
# configure ethminer
own.services.ethminer = {
enable = true;
pool = "eu1.ethermine.org";
wallet = parameters.wallet;
2021-05-06 15:02:42 +02:00
rig = parameters.rig;
2021-05-06 07:58:41 +02:00
};
hardware.opengl = {
enable = true;
#extraPackages = with pkgs; [];
driSupport = true;
driSupport32Bit = true;
};
environment.systemPackages = with pkgs; [
go-ethereum
i7z # check temperature
2021-05-06 15:02:42 +02:00
pciutils # lspci
2021-05-06 07:58:41 +02:00
];
}