This commit is contained in:
mjallen18
2025-08-24 18:56:51 -05:00
parent cfaf900db6
commit 2ea82a643d
22 changed files with 338 additions and 531 deletions

View File

@@ -2,11 +2,11 @@
lib,
pkgs,
config,
namespace,
...
}:
let
cfg = config.share.hardware.amd;
pkgsVersion = pkgs; # .unstable;
cfg = config.${namespace}.hardware.amd;
in
{
imports = [ ./options.nix ];
@@ -20,7 +20,7 @@ in
# Configure programs
programs.corectrl = {
enable = cfg.corectrl.enable;
package = pkgsVersion.corectrl;
package = pkgs.corectrl;
};
# Configure environment
@@ -51,7 +51,7 @@ in
# nixpkg is broken so need to manually define
systemd.services.lactd = lib.mkIf cfg.lact.enable {
description = "AMDGPU Control Daemon";
path = with pkgsVersion; [
path = with pkgs; [
bash
lact
];
@@ -64,7 +64,7 @@ in
# Configure environment
environment = {
systemPackages = with pkgsVersion; lib.mkIf cfg.lact.enable [ lact ];
systemPackages = with pkgs; lib.mkIf cfg.lact.enable [ lact ];
};
};
}

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{ lib, namespace, ... }:
with lib;
{
options.share.hardware.amd = {
options.${namespace}.hardware.amd = {
enable = mkEnableOption "amd hardware config";
corectrl.enable = mkOption {