nixos-config/images/etherminer/configuration.nix
2021-05-15 11:27:34 +02:00

51 lines
1.1 KiB
Nix

# $ nixos-generator -f iso -c configuration.nix -o image.iso
{ pkgs, lib, ... }:
let parameters = import ./parameters.nix;
in {
imports = [ ./ethminer.nix ];
nixpkgs.overlays = [
(self: super: {
ethminer = super.lib.callPackageWith super ./ethminer-pkg.nix {
cudaSupport = true;
};
})
];
users.users.root.initialPassword = "root";
# 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;
rig = parameters.rig;
};
hardware.opengl = {
enable = true;
#extraPackages = with pkgs; [];
driSupport = true;
driSupport32Bit = true;
};
environment.systemPackages = with pkgs; [
go-ethereum
i7z # check temperature
pciutils # lspci
];
}