desktop stuff

This commit is contained in:
mjallen18
2024-03-14 13:11:43 -05:00
parent eceb599970
commit 7e343c4ed7
4 changed files with 72 additions and 16 deletions

View File

@@ -6,7 +6,7 @@ in {
config = mkIf cfg.enable {
boot.kernelParams = [
(if cfg.corectrl.enable then "amdgpu.ppfeaturemask=0xffffffff" else "")
(if cfg.enable then "amdgpu.ppfeaturemask=0xffffffff" else null)
];
# Configure programs
@@ -30,7 +30,7 @@ in {
# Configure polkit
security.polkit = {
enable = cfg.corectrl.enablePolkit;
# enable = cfg.corectrl.enablePolkit;
extraConfig = ''
polkit.addRule(function(action, subject) {
if ((action.id == "org.corectrl.helper.init" ||
@@ -43,5 +43,19 @@ in {
});
'';
};
# nixpkg is broken so need to manually define
systemd.services.lactd = mkIf cfg.lact.enable {
description = "AMDGPU Control Daemon";
path = [ pkgs.bash pkgs.lact ];
script = ''
lact daemon
'';
wantedBy = [ "multi-user.target" ];
after = [ "multi-user.target" ];
};
# Configure environment
environment.systemPackages = mkIf cfg.lact.enable [ pkgs.lact ];
};
}

View File

@@ -17,5 +17,10 @@ with lib; {
type = types.str;
default = "wheel";
};
lact.enable = mkOption {
type = types.bool;
default = false;
};
};
}