Nix #3

Merged
DashieTM merged 10 commits from nix into main 2024-05-12 23:29:50 +02:00
5 changed files with 26 additions and 5 deletions
Showing only changes of commit 52d35e019d - Show all commits

View file

@ -76,7 +76,4 @@
};
programs.ssh.startAgent = true;
virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ "dashie" ];
virtualisation.virtualbox.guest.enable = true;
}

View file

@ -1,9 +1,14 @@
{ pkgs, ... }:
{
imports = [
../../modules/gamemode.nix
];
boot.kernelPackages = pkgs.linuxPackages_zen;
boot.kernelParams = [
"amdgpu.ppfeaturemask=0xffffffff"
];
networking.hostName = "marmo";
programs.gamemode = {
device = 1;
};
}

View file

@ -6,7 +6,14 @@
];
networking.hostName = "spaceship";
programs.gamemode = {
device = 0;
};
environment.systemPackages = with pkgs; [
linuxKernel.packages.linux_zen.virtualbox
];
virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ "dashie" ];
virtualisation.virtualbox.guest.enable = true;
}

11
nix/modules/gamemode.nix Normal file
View file

@ -0,0 +1,11 @@
{ lib, ... }: {
options.programs.gamemode = {
device = lib.mkOption {
default = 0;
example = 0;
description = ''
GPU device number
'';
};
};
}

View file

@ -1,4 +1,5 @@
{ pkgs
, config
, ...
}: {
imports = [
@ -24,7 +25,7 @@
};
gpu = {
apply_gpu_optimisations = "accept-responsibility";
gpu_device = 0;
gpu_device = config.programs.gamemode.device;
amd_performance_level = "high";
};
custom = {