fix: vscode settings is read only

This commit is contained in:
ryan4yin
2023-05-06 05:17:14 +08:00
parent 8619d9a284
commit 65e2672a68
4 changed files with 18 additions and 126 deletions

View File

@@ -5,16 +5,6 @@ This repository is home to the nix code that builds my systems.
## TODO
- custom hyprland configs
- monitor resolution - 4k
- bar adjustment
- vscode run in wayland mode
- xwayland adjustment
- references
- https://github.com/notusknot/dotfiles-nix
- https://wiki.hyprland.org/Configuring/Configuring-Hyprland/
- https://github.com/notwidow/hyprland
- vscode extensions - [nix-vscode-extensions](https://github.com/nix-community/nix-vscode-extensions)
- secret management - [sops-nix](https://github.com/Mic92/sops-nix)
## Why Nix?
@@ -30,3 +20,11 @@ After installed NixOS with `nix-command` & `flake` enabled, you can deploy this
sudo nixos-rebuild switch .#nixos-test
```
## Other Interesting Dotfiles
Other configurations from where I learned and copied:
- https://github.com/notwidow/hyprland
- https://github.com/notusknot/dotfiles-nix

View File

@@ -42,9 +42,6 @@
hyprland.url = "github:hyprwm/Hyprland";
# community wayland nixpkgs
nixpkgs-wayland = { url = "github:nix-community/nixpkgs-wayland"; };
# vscode 插件库
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
};
# outputs 的参数都是 inputs 中定义的依赖项,可以通过它们的名称来引用。
@@ -54,7 +51,6 @@
self,
nixpkgs,
home-manager,
nix-vscode-extensions,
...
}: {
# 名为 nixosConfigurations 的 outputs 会在执行 `nixos-rebuild switch --flake .` 时被使用

View File

@@ -1,123 +1,17 @@
{
{
config,
pkgs,
home-manager,
nix-vscode-extensions,
...
}:
...
}:
{
programs.vscode = {
enable = true;
userSettings = {
"editor.renderWhitespace" = "all";
"files.autoSave" = "onFocusChange";
"editor.rulers" = [ 80 120 ];
"telemetry.enableTelemetry" = false;
"telemetry.enableCrashReporter" = false;
"editor.tabSize" = 2;
"files.exclude" = { "**/node_modules/**" = true; };
"editor.formatOnSave" = false;
"breadcrumbs.enabled" = true;
"editor.useTabStops" = false;
"editor.fontFamily" = "JetBrainsMono Nerd Font";
"editor.fontSize" = 16;
"editor.fontLigatures" = true;
"editor.lineHeight" = 20;
"workbench.fontAliasing" = "antialiased";
"files.trimTrailingWhitespace" = true;
"editor.minimap.enabled" = false;
"workbench.editor.enablePreview" = false;
"terminal.integrated.fontFamily" = "JetBrainsMono Nerd Font";
};
package =
let
config.packageOverrides = pkgs: {
vscode = pkgs.vscode-with-extensions.override {
# pkgs.vscode-extensions 里包含的 vscode 太少了
# 必须使用社区的 <https://github.com/nix-community/nix-vscode-extensions> 才能安装更多插件
vscodeExtensions = with nix-vscode-extensions.extensions; [
aaron-bond.better-comments
anweber.vscode-httpyac
arrterian.nix-env-selector
bierner.markdown-mermaid
christian-kohler.path-intellisense
cschlosser.doxdocgen
DanishSarwar.reverse-search
eamodio.gitlens
esbenp.prettier-vscode
espressif.esp-idf-extension
fabiospampinato.vscode-diff
GitHub.copilot
golang.go
hashicorp.terraform
janisdd.vscode-edit-csv
jebbs.plantuml
jeff-hykin.better-cpp-syntax
jnoortheen.nix-ide
JuanBlanco.solidity
k--kato.intellij-idea-keybindings
llvm-vs-code-extensions.vscode-clangd
mcu-debug.debug-tracker-vscode
mcu-debug.memory-view
mcu-debug.rtos-views
mikestead.dotenv
mkhl.direnv
ms-azuretools.vscode-docker
ms-dotnettools.vscode-dotnet-runtime
ms-kubernetes-tools.vscode-kubernetes-tools
ms-python.isort
ms-python.python
ms-python.vscode-pylance
ms-toolsai.jupyter
ms-toolsai.jupyter-keymap
ms-toolsai.jupyter-renderers
ms-toolsai.vscode-jupyter-cell-tags
ms-toolsai.vscode-jupyter-slideshow
ms-vscode-remote.remote-containers
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode-remote.vscode-remote-extensionpack
ms-vscode.cmake-tools
ms-vscode.cpptools
ms-vscode.cpptools-extension-pack
ms-vscode.cpptools-themes
ms-vscode.remote-explorer
ms-vscode.remote-server
pinage404.nix-extension-pack
platformio.platformio-ide
pomdtr.excalidraw-editor
redhat.java
redhat.vscode-commons
redhat.vscode-xml
redhat.vscode-yaml
rust-lang.rust-analyzer
shd101wyy.markdown-preview-enhanced
sumneko.lua
tamasfe.even-better-toml
timonwong.shellcheck
tintinweb.graphviz-interactive-preview
tintinweb.solidity-visual-auditor
tintinweb.vscode-inline-bookmarks
tintinweb.vscode-solidity-flattener
tintinweb.vscode-solidity-language
twxs.cmake
vadimcn.vscode-lldb
VisualStudioExptTeam.intellicode-api-usage-examples
VisualStudioExptTeam.vscodeintellicode
vscjava.vscode-java-debug
vscjava.vscode-java-pack
vscjava.vscode-java-test
vscjava.vscode-maven
vscode-icons-team.vscode-icons
WakaTime.vscode-wakatime
yzhang.markdown-all-in-one
zxh404.vscode-proto3
];
};
};
in
pkgs.vscode;
# let vscode sync and update its configuration & extensions across devices, using github account.
# userSettings = {};
};
}

View File

@@ -103,10 +103,14 @@
sound.enable = true;
hardware.pulseaudio.enable = false;
# security with polkit
services.power-profiles-daemon = {
enable = true;
};
security.polkit.enable = true;
# security with gnome-kering
services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd.enableGnomeKeyring = true;
services = {
dbus.packages = [ pkgs.gcr ];