feat: add sensors
This commit is contained in:
@@ -21,6 +21,20 @@ local function setup_luau()
|
||||
sync = true,
|
||||
},
|
||||
})
|
||||
vim.lsp.config("luau-lsp", {
|
||||
settings = {
|
||||
["luau-lsp"] = {
|
||||
completion = {
|
||||
autocompleteEnd = true,
|
||||
imports = {
|
||||
enabled = true,
|
||||
suggestServices = true,
|
||||
suggestRequires = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
local function setup_lua()
|
||||
@@ -31,11 +45,11 @@ local function setup_lua()
|
||||
globals = { "vim" },
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file('', true),
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
checkThirdParty = false,
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
desktop.enable = true;
|
||||
kanata.enable = true;
|
||||
kanata.apple = true;
|
||||
sensors.enable = true;
|
||||
|
||||
users.users.luca = {
|
||||
isNormalUser = true;
|
||||
|
||||
@@ -17,5 +17,6 @@
|
||||
./zed-editor.nix
|
||||
./virtualization.nix
|
||||
./printing.nix
|
||||
./sensors.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
awscli2
|
||||
gitui
|
||||
htop
|
||||
lm_sensors
|
||||
fanctl
|
||||
];
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
|
||||
27
nix/modules/sensors.nix
Normal file
27
nix/modules/sensors.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user