feat: add sensors

This commit is contained in:
2025-08-22 21:31:41 -07:00
parent 421dacc3cf
commit 22a5fc2dfe
5 changed files with 119 additions and 74 deletions

View File

@@ -21,6 +21,20 @@ local function setup_luau()
sync = true, sync = true,
}, },
}) })
vim.lsp.config("luau-lsp", {
settings = {
["luau-lsp"] = {
completion = {
autocompleteEnd = true,
imports = {
enabled = true,
suggestServices = true,
suggestRequires = true,
},
},
},
},
})
end end
local function setup_lua() local function setup_lua()
@@ -31,11 +45,11 @@ local function setup_lua()
globals = { "vim" }, globals = { "vim" },
}, },
workspace = { workspace = {
library = vim.api.nvim_get_runtime_file('', true), library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false, checkThirdParty = false,
}, },
} },
} },
}) })
end end

View File

@@ -50,6 +50,7 @@
desktop.enable = true; desktop.enable = true;
kanata.enable = true; kanata.enable = true;
kanata.apple = true; kanata.apple = true;
sensors.enable = true;
users.users.luca = { users.users.luca = {
isNormalUser = true; isNormalUser = true;

View File

@@ -17,5 +17,6 @@
./zed-editor.nix ./zed-editor.nix
./virtualization.nix ./virtualization.nix
./printing.nix ./printing.nix
./sensors.nix
]; ];
} }

View File

@@ -48,6 +48,8 @@
awscli2 awscli2
gitui gitui
htop htop
lm_sensors
fanctl
]; ];
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;

27
nix/modules/sensors.nix Normal file
View File

@@ -0,0 +1,27 @@
{
pkgs,
lib,
config,
...
}:
{
options.sensors = {
enable = lib.mkEnableOption "enable sensors";
};
config = lib.mkIf config.sensors.enable {
boot.kernelModules = [
"coretemp"
"nct6775"
];
systemd.services."sensors-init" = {
description = "Initialize sensor settings";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "/run/current-system/sw/bin/sensors -s";
};
};
};
}