2024-07-19 12:00:55 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-07-19 11:59:26 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.modules.nix;
|
2024-07-19 12:00:55 +00:00
|
|
|
in
|
|
|
|
{
|
2024-07-19 11:59:26 +00:00
|
|
|
options.modules.nix = {
|
|
|
|
enable = mkEnableOption "nix";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
# Development packages
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
nix-tree
|
|
|
|
nixfmt-rfc-style
|
|
|
|
nixd
|
|
|
|
];
|
|
|
|
|
|
|
|
# VSCode configuration
|
|
|
|
programs.vscode = {
|
2024-07-19 12:00:55 +00:00
|
|
|
extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide ];
|
2024-07-19 11:59:26 +00:00
|
|
|
|
|
|
|
userSettings = {
|
|
|
|
"[nix]" = {
|
|
|
|
"editor.tabSize" = 2;
|
|
|
|
};
|
|
|
|
"nix.enableLanguageServer" = true;
|
|
|
|
"nix.serverPath" = "nixd";
|
|
|
|
"nix.serverSettings" = {
|
|
|
|
nixd = {
|
|
|
|
formatting = {
|
|
|
|
command = [ "nixfmt" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Neovim configuration
|
|
|
|
programs.nixvim = {
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
2024-07-19 12:00:55 +00:00
|
|
|
}
|