feat(wisdom): add vscode editor module

Add a new module for Visual Studio Code configuration including
default extensions (nix-ide, markdown-all-in-one, prettier) and
nixd/nixfmt settings. Enable vscode on 14900k, t2mbp, and uConsole
hosts with additional extensions.

Also clean up unfree predicate logic in ideapad configuration.
This commit is contained in:
2026-07-17 17:17:14 -03:00
parent 548a438f6a
commit 3d2e74d115
5 changed files with 88 additions and 8 deletions
+8
View File
@@ -22,6 +22,14 @@
spotify.openDiscoveryFirewall = true; spotify.openDiscoveryFirewall = true;
pokeclicker.enable = true; pokeclicker.enable = true;
}; };
editors.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
alefragnani.project-manager
johnpapa.vscode-peacock
];
};
}; };
} }
]; ];
+1 -6
View File
@@ -42,12 +42,7 @@
# rebuilds Mobile NixOS' script-loader against the patched mruby. # rebuilds Mobile NixOS' script-loader against the patched mruby.
chiasson.system.ideapadMrubyOverlay.enable = true; chiasson.system.ideapadMrubyOverlay.enable = true;
# Wi-Fi modem (qcom-wcn3990) + Bluetooth (QCA crnv32) need binary blobs. # Wi-Fi modem (qcom-wcn3990) + Bluetooth (QCA crnv32) need binary blobs
nixpkgs.config.allowUnfreePredicate =
pkg: builtins.elem (lib.getName pkg) [
"chromeos-sc7180-unredistributable-firmware"
"chromeos-sc7180-unredistributable-firmware-zstd"
];
hardware.firmware = [ pkgs.chromeos-sc7180-unredistributable-firmware ]; hardware.firmware = [ pkgs.chromeos-sc7180-unredistributable-firmware ];
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
+9 -1
View File
@@ -1,7 +1,7 @@
{ self, inputs, ... }: { self, inputs, ... }:
{ {
flake.nixosModules.t2mbpHome = flake.nixosModules.t2mbpHome =
{ self, ... }: { self, pkgs, ... }:
{ {
imports = [ self.nixosModules.desktopHomeBase ]; imports = [ self.nixosModules.desktopHomeBase ];
@@ -14,6 +14,14 @@
discord.enable = true; discord.enable = true;
pokeclicker.enable = true; pokeclicker.enable = true;
}; };
editors.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
alefragnani.project-manager
johnpapa.vscode-peacock
];
};
}; };
} }
]; ];
+9 -1
View File
@@ -1,13 +1,21 @@
{ self, inputs, ... }: { self, inputs, ... }:
{ {
flake.nixosModules.uConsoleHome = flake.nixosModules.uConsoleHome =
{ self, ... }: { self, pkgs, ... }:
{ {
imports = [ self.nixosModules.desktopHomeBase ]; imports = [ self.nixosModules.desktopHomeBase ];
chiasson.users.extraModules.olivier = [ chiasson.users.extraModules.olivier = [
{ {
chiasson.home.hardware.uconsoleGamepad.enable = true; chiasson.home.hardware.uconsoleGamepad.enable = true;
chiasson.home.editors.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
alefragnani.project-manager
johnpapa.vscode-peacock
];
};
} }
]; ];
}; };
+61
View File
@@ -0,0 +1,61 @@
# Visual Studio Code (Microsoft build, unfree). Default extensions + settings shared by all
# hosts; per-host extras (peacock, comment-anchors, project-manager) go via
# `chiasson.home.editors.vscode.extensions`.
{ self, ... }: {
flake.homeManagerModules.wisdomEditorsVscode =
{ config, lib, pkgs, ... }:
let
root = config.chiasson.home;
cfg = config.chiasson.home.editors.vscode;
defaultExtensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide
yzhang.markdown-all-in-one
esbenp.prettier-vscode
];
coreSettings = {
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nixd";
"nix.serverSettings" = {
nixd = {
formatting = {
command = "nixfmt";
};
};
};
"diffEditor.ignoreTrimWhitespace" = false;
"chat.disableAIFeatures" = true;
};
in
{
options.chiasson.home.editors.vscode = {
enable = lib.mkEnableOption ''
Visual Studio Code (Microsoft build; needs `nixpkgs.config.allowUnfree`). Core
extensions (nix-ide, markdown-all-in-one, prettier) + nixd/nixfmt settings are included.
'' // {
default = false;
};
extensions = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ ];
description = ''
Extra extensions not wanted on every host (e.g. peacock, comment-anchors,
project-manager). Per-host via `chiasson.users.extraModules`.
'';
};
};
config = lib.mkIf (root.enable && cfg.enable) {
home.packages = [ pkgs.vscode ];
programs.vscode = {
enable = true;
package = pkgs.vscode;
extensions = defaultExtensions ++ cfg.extensions;
userSettings = coreSettings;
};
};
};
}