From 86639b7173e6f349e62ca0f081d76ad523832a2f Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Fri, 27 Dec 2024 18:03:27 +0100 Subject: [PATCH] feat(mrmeeseeks): create a LACT module And activate it for mrmeeseeks host --- hosts/mrmeeseeks/hardware-configuration.nix | 1 - hosts/mrmeeseeks/nixos-config.nix | 1 + modules/nixos/default.nix | 1 + modules/nixos/hardware/lact/default.nix | 28 +++++++++++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 modules/nixos/hardware/lact/default.nix diff --git a/hosts/mrmeeseeks/hardware-configuration.nix b/hosts/mrmeeseeks/hardware-configuration.nix index 2fdf861..72fd750 100644 --- a/hosts/mrmeeseeks/hardware-configuration.nix +++ b/hosts/mrmeeseeks/hardware-configuration.nix @@ -73,5 +73,4 @@ }; hardware.bluetooth.enable = true; hardware.xpadneo.enable = true; - programs.coolercontrol.enable = true; } diff --git a/hosts/mrmeeseeks/nixos-config.nix b/hosts/mrmeeseeks/nixos-config.nix index 6cb7886..2ed041a 100644 --- a/hosts/mrmeeseeks/nixos-config.nix +++ b/hosts/mrmeeseeks/nixos-config.nix @@ -6,4 +6,5 @@ gamescope = true; }; config.modules.hardware.laptop.enable = false; + config.modules.hardware.lact.enable = true; } diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 35e9b1d..70386eb 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -3,6 +3,7 @@ _: imports = [ ./desktop/sway ./gaming/steam + ./hardware/lact ./hardware/laptop ]; } diff --git a/modules/nixos/hardware/lact/default.nix b/modules/nixos/hardware/lact/default.nix new file mode 100644 index 0000000..d437afe --- /dev/null +++ b/modules/nixos/hardware/lact/default.nix @@ -0,0 +1,28 @@ +{ lib, config, pkgs, ... }: +with lib; +let + cfg = config.modules.hardware.lact; +in +{ + options.modules.hardware.lact = { + enable = mkEnableOption "Install LACT daemon"; + + }; + config = mkIf cfg.enable { + + # Enable Lact (testing purpose for now) + environment.systemPackages = with pkgs; [ + lact + ]; + + systemd.services.lact = { + description = "AMDGPU Control Daemon"; + after = ["multi-user.target"]; + wantedBy = ["multi-user.target"]; + serviceConfig = { + ExecStart = "${pkgs.lact}/bin/lact daemon"; + }; + enable = true; + }; + }; +}