mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
refactor: get rid of config folder
This commit is contained in:
parent
2606e1d874
commit
cb3ae5f434
254 changed files with 79 additions and 101 deletions
56
profiles/hardware/ryzen.nix
Normal file
56
profiles/hardware/ryzen.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ config, pkgs, lib, ... }: with lib; {
|
||||
/*
|
||||
This hardware profile corresponds to any machine which has an AMD Ryzen processor.
|
||||
*/
|
||||
|
||||
options.home-manager.users = let
|
||||
waybarExtend = { config, ... }: {
|
||||
options = {
|
||||
programs.waybar.settings = mkOption {
|
||||
type = with types; listOf (submodule waybarExtend2);
|
||||
};
|
||||
};
|
||||
};
|
||||
waybarExtend2 = { config, ... }: {
|
||||
config = {
|
||||
modules."temperature#icon".hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp2_input";
|
||||
modules.temperature.hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp2_input";
|
||||
};
|
||||
};
|
||||
polybarExtend = { config, ... }: {
|
||||
services.polybar.settings."module/temp".hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp1_input";
|
||||
};
|
||||
/*
|
||||
polybarExtend2 = { config, ... }: {
|
||||
config = {
|
||||
modules."temperature#icon".hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp2_input";
|
||||
modules.temperature.hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp2_input";
|
||||
};
|
||||
};*/
|
||||
in mkOption {
|
||||
type = types.attrsOf (types.submoduleWith {
|
||||
modules = [ waybarExtend polybarExtend ];
|
||||
});
|
||||
};
|
||||
|
||||
config = {
|
||||
deploy.profile.hardware.ryzen = true;
|
||||
|
||||
boot = {
|
||||
kernelModules = [
|
||||
"msr"
|
||||
"ryzen_smu"
|
||||
"kvm-amd"
|
||||
];
|
||||
kernelParams = [ "amd_iommu=on" ];
|
||||
};
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
lm_sensors
|
||||
ryzen-smu-monitor_cpu
|
||||
ryzen-monitor
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue