61 lines
1.0 KiB
Nix
Raw Normal View History

2024-07-19 14:00:55 +02:00
{
lib,
config,
pkgs,
...
}:
2024-07-19 13:59:26 +02:00
with lib;
let
cfg = config.modules.nix;
2024-07-19 14:00:55 +02:00
in
{
2024-07-19 13:59:26 +02:00
options.modules.nix = {
enable = mkEnableOption "nix";
};
config = mkIf cfg.enable {
# Development packages
home.packages = with pkgs; [
nix-tree
nixfmt-rfc-style
nixd
];
2024-07-20 06:10:56 +02:00
# Add nix tree
xdg.desktopEntries.nix-tree = {
exec = "${pkgs.nix-tree}/bin/nix-tree";
name = "Nix Tree";
terminal = true;
type = "Application";
};
2024-07-19 13:59:26 +02:00
# VSCode configuration
programs.vscode = {
2025-04-16 13:03:45 +02:00
profiles.default = {
extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide ];
2024-07-19 13:59:26 +02:00
2025-04-16 13:03:45 +02:00
userSettings = {
"[nix]" = {
"editor.tabSize" = 2;
};
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nixd";
"nix.serverSettings" = {
nixd = {
formatting = {
command = [ "nixfmt" ];
};
2024-07-19 13:59:26 +02:00
};
};
};
};
};
# Neovim configuration
programs.nixvim = {
};
};
2024-07-19 14:00:55 +02:00
}