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:
@@ -22,6 +22,14 @@
|
||||
spotify.openDiscoveryFirewall = true;
|
||||
pokeclicker.enable = true;
|
||||
};
|
||||
|
||||
editors.vscode = {
|
||||
enable = true;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
alefragnani.project-manager
|
||||
johnpapa.vscode-peacock
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
@@ -42,12 +42,7 @@
|
||||
# rebuilds Mobile NixOS' script-loader against the patched mruby.
|
||||
chiasson.system.ideapadMrubyOverlay.enable = true;
|
||||
|
||||
# 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"
|
||||
];
|
||||
# Wi-Fi modem (qcom-wcn3990) + Bluetooth (QCA crnv32) need binary blobs
|
||||
hardware.firmware = [ pkgs.chromeos-sc7180-unredistributable-firmware ];
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ self, inputs, ... }:
|
||||
{
|
||||
flake.nixosModules.t2mbpHome =
|
||||
{ self, ... }:
|
||||
{ self, pkgs, ... }:
|
||||
{
|
||||
imports = [ self.nixosModules.desktopHomeBase ];
|
||||
|
||||
@@ -14,6 +14,14 @@
|
||||
discord.enable = true;
|
||||
pokeclicker.enable = true;
|
||||
};
|
||||
|
||||
editors.vscode = {
|
||||
enable = true;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
alefragnani.project-manager
|
||||
johnpapa.vscode-peacock
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
{ self, inputs, ... }:
|
||||
{
|
||||
flake.nixosModules.uConsoleHome =
|
||||
{ self, ... }:
|
||||
{ self, pkgs, ... }:
|
||||
{
|
||||
imports = [ self.nixosModules.desktopHomeBase ];
|
||||
|
||||
chiasson.users.extraModules.olivier = [
|
||||
{
|
||||
chiasson.home.hardware.uconsoleGamepad.enable = true;
|
||||
|
||||
chiasson.home.editors.vscode = {
|
||||
enable = true;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
alefragnani.project-manager
|
||||
johnpapa.vscode-peacock
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user