nixos/hosts/gAluminum/default.nix

76 lines
1.7 KiB
Nix
Raw Permalink Normal View History

{ config, pkgs, lib, ... }:
2021-07-01 01:53:43 +01:00
let
hostname = "gAluminum";
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
export __NV_PRIME_RENDER_OFFLOAD=1
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
exec -a "$0" "$@"
'';
2023-02-11 02:29:48 +00:00
in
{
imports = [ ./hardware.nix ./wireguard.nix ./sound.nix ];
2021-07-01 01:53:43 +01:00
boot = {
2021-10-13 13:29:07 +01:00
supportedFilesystems = [ "ntfs" ];
2021-07-01 01:53:43 +01:00
loader = {
efi.canTouchEfiVariables = true;
efi.efiSysMountPoint = "/boot/efi";
systemd-boot.enable = true;
};
kernelPackages = pkgs.linuxPackages_latest;
2021-07-01 01:53:43 +01:00
initrd.luks.devices = {
root = {
device = "/dev/disk/by-uuid/c2bac3a6-0999-4e1d-a676-bf4bcafee2d4";
preLVM = true;
allowDiscards = true;
};
};
};
networking = {
hostName = hostname;
2021-10-13 13:29:07 +01:00
networkmanager.wifi = {
powersave = false;
macAddress = "random";
2021-07-01 01:53:43 +01:00
};
};
time.timeZone = "Europe/London";
virtualisation.virtualbox.host = {
enable = true;
enableExtensionPack = true;
};
2021-11-25 11:42:32 +00:00
users.extraGroups = {
vboxusers.members = [ "giulio" ];
video.members = [ "giulio" ];
};
services = {
printing.enable = true;
xserver.videoDrivers = [ "nvidia" ];
teamviewer.enable = true;
davfs2.enable = true;
};
2021-11-25 11:38:00 +00:00
hardware = {
ledger.enable = true;
nvidia = {
prime = {
offload.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
2021-11-25 11:38:00 +00:00
};
programs.steam.enable = true;
environment.systemPackages = with pkgs; [ efibootmgr nvidia-offload ];
2023-02-11 02:29:48 +00:00
# system.stateVersion = "21.05"; # Did you read the comment?
2021-07-01 01:53:43 +01:00
}