feat: add sensors
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -17,5 +17,6 @@
|
|||||||
./zed-editor.nix
|
./zed-editor.nix
|
||||||
./virtualization.nix
|
./virtualization.nix
|
||||||
./printing.nix
|
./printing.nix
|
||||||
|
./sensors.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
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