configurations & Old-materusPC: vscode settings

This commit is contained in:
Mateusz Słodkowicz 2024-11-01 00:10:11 +01:00
parent aaf9221f44
commit 6590f99c8d
Signed by: materus
SSH Key Fingerprint: SHA256:rzVduzTiiszuYfLPYD0SDZV+g8lxhpcRgpbOZA1X0Uo
3 changed files with 151 additions and 51 deletions

View File

@ -1,4 +1,4 @@
{ config, pkgs, materusArg, lib, ... }: { config, pkgs, materusArg, materusCfg, lib, ... }:
{ {
home.stateVersion = "22.11"; home.stateVersion = "22.11";
home.homeDirectory = "/home/materus"; home.homeDirectory = "/home/materus";
@ -13,6 +13,27 @@
gpg.format = "ssh"; gpg.format = "ssh";
}; };
}; };
programs.vscode.userSettings = {
"vscord.app.name" = "VSCodium";
"window.dialogStyle" = "custom";
"window.titleBarStyle" = "custom";
"editor.fontFamily" = "'Hack Nerd Font', 'monospace', monospace";
"workbench.colorTheme" = "Tokyo Night";
"workbench.productIconTheme" = "material-product-icons";
"workbench.iconTheme" = "material-icon-theme";
"d.aggressiveUpdate" = false;
"d.servedPath" = "${pkgs.serve-d}/bin/serve-d";
"direnv.path.executable" = "${pkgs.direnv}/bin/direnv";
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${pkgs.nixd}/bin/nixd";
"nix.formatterPath" = "${pkgs.nixfmt-classic}/bin/nixfmt";
};
materus.profile = { materus.profile = {
fonts.enable = lib.mkDefault true; fonts.enable = lib.mkDefault true;
nixpkgs.enable = lib.mkDefault false; nixpkgs.enable = lib.mkDefault false;
@ -20,7 +41,80 @@
enableTerminal = lib.mkDefault true; enableTerminal = lib.mkDefault true;
enableTerminalExtra = lib.mkDefault true; enableTerminalExtra = lib.mkDefault true;
enableNixDevel = lib.mkDefault true; enableNixDevel = lib.mkDefault true;
editor.code.fhs.enable = true; editor.code.fhs.enable = false;
editor.code.fhs.extensions =
let
ext = (materusCfg.configInputs.nix-vscode-extensions.extensions."${materusCfg.arch}".forVSCodeVersion
config.programs.vscode.package.version);
in
with ext;
with pkgs;
[
#Cpp
vscode-marketplace.twxs.cmake
vscode-extensions.ms-vscode.cpptools
vscode-marketplace.ms-vscode.cmake-tools
vscode-marketplace.ms-vscode.cpptools-themes
#Python
vscode-marketplace.ms-python.python
vscode-marketplace.ms-python.vscode-pylance
vscode-marketplace.ms-python.debugpy
# CSharp
vscode-marketplace.ms-dotnettools.csharp
vscode-marketplace.ms-dotnettools.csdevkit
#Java
vscode-marketplace.redhat.java
vscode-marketplace.vscjava.vscode-java-debug
#DLang
vscode-marketplace.webfreak.code-d
#Nix
vscode-marketplace.jnoortheen.nix-ide
vscode-marketplace.arrterian.nix-env-selector
#Web
vscode-marketplace.ecmel.vscode-html-css
vscode-marketplace.formulahendry.auto-close-tag
#Lua
vscode-marketplace.sumneko.lua
#YAML, XML
vscode-marketplace.redhat.vscode-yaml
vscode-marketplace.redhat.vscode-xml
#Git
vscode-marketplace.donjayamanne.githistory
vscode-marketplace.mhutchie.git-graph
vscode-marketplace.eamodio.gitlens
#Other
vscode-marketplace.ms-azuretools.vscode-docker
vscode-marketplace.webfreak.debug
vscode-marketplace.mkhl.direnv
vscode-marketplace.ms-vscode-remote.remote-ssh
vscode-marketplace.ms-vscode-remote.remote-containers
vscode-marketplace.esbenp.prettier-vscode
vscode-marketplace.formulahendry.code-runner
vscode-marketplace.leonardssh.vscord
vscode-marketplace.ms-vscode.hexeditor
vscode-marketplace.alefragnani.project-manager
#Icons
vscode-marketplace.pkief.material-icon-theme
vscode-marketplace.pkief.material-product-icons
#Themes
vscode-marketplace.enkia.tokyo-night
vscode-marketplace.ghgofort.neon-vommit
#Languages
vscode-marketplace.ms-ceintl.vscode-language-pack-pl
];
editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_16; in [ editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_16; in [
llvmpkgs.clang llvmpkgs.clang
llvmpkgs.llvm llvmpkgs.llvm
@ -71,56 +165,58 @@
editor.emacs.enable = false; editor.emacs.enable = false;
}; };
xdg.desktopEntries.brave-browser = let env = lib.concatStringsSep " " [ xdg.desktopEntries.brave-browser =
''__NV_PRIME_RENDER_OFFLOAD="1"'' let
''__NV_PRIME_RENDER_OFFLOAD_PROVIDER="NVIDIA-G0"'' env = lib.concatStringsSep " " [
''__GLX_VENDOR_LIBRARY_NAME="nvidia"'' ''__NV_PRIME_RENDER_OFFLOAD="1"''
''__VK_LAYER_NV_optimus="NVIDIA_only"'' ''__NV_PRIME_RENDER_OFFLOAD_PROVIDER="NVIDIA-G0"''
''NIXOS_OZONE_WL="1"'' ''__GLX_VENDOR_LIBRARY_NAME="nvidia"''
]; ''__VK_LAYER_NV_optimus="NVIDIA_only"''
script = pkgs.writeShellScript "brave" '' ''NIXOS_OZONE_WL="1"''
${env} brave "$@" ];
''; script = pkgs.writeShellScript "brave" ''
${env} brave "$@"
in '';
{
name = "Brave Web Browser"; in
genericName = "Przeglądarka WWW"; {
comment = "Skorzystaj z internetu"; name = "Brave Web Browser";
exec = "${script} %U"; genericName = "Przeglądarka WWW";
icon = "brave-browser"; comment = "Skorzystaj z internetu";
terminal = false; exec = "${script} %U";
categories = [ "Application" "Network" "WebBrowser" ]; icon = "brave-browser";
mimeType = [ terminal = false;
"application/pdf" categories = [ "Application" "Network" "WebBrowser" ];
"application/rdf+xml" mimeType = [
"application/rss+xml" "application/pdf"
"application/xhtml+xml" "application/rdf+xml"
"application/xhtml_xml" "application/rss+xml"
"application/xml" "application/xhtml+xml"
"image/gif" "application/xhtml_xml"
"image/jpeg" "application/xml"
"image/png" "image/gif"
"image/webp" "image/jpeg"
"text/html" "image/png"
"text/xml" "image/webp"
"x-scheme-handler/http" "text/html"
"x-scheme-handler/https" "text/xml"
"x-scheme-handler/ipfs" "x-scheme-handler/http"
"x-scheme-handler/ipns" "x-scheme-handler/https"
]; "x-scheme-handler/ipfs"
actions.new-windows = { "x-scheme-handler/ipns"
exec = "${script}"; ];
name = "Nowe okno"; actions.new-windows = {
exec = "${script}";
name = "Nowe okno";
};
actions.new-private-windows = {
exec = "${script} --incognito";
name = "Nowe okno incognito";
};
}; };
actions.new-private-windows = {
exec = "${script} --incognito";
name = "Nowe okno incognito";
};
};
home.packages = [ home.packages = [
pkgs.papirus-icon-theme pkgs.papirus-icon-theme
(materusArg.pkgs.polymc-qt5.wrap { withWaylandGLFW=true; extraJDKs = [ pkgs.graalvm-ce ]; }) (materusArg.pkgs.polymc-qt5.wrap { withWaylandGLFW = true; extraJDKs = [ pkgs.graalvm-ce ]; })
]; ];
} }

View File

@ -31,7 +31,7 @@ let
(if hmAsModule then hm.nixosModules.home-manager else { }) (if hmAsModule then hm.nixosModules.home-manager else { })
(if hmAsModule then (if hmAsModule then
{ {
home-manager.backupFileExtension = "hm-backup";
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.sharedModules = [ home-manager.sharedModules = [

View File

@ -6,11 +6,15 @@ in
options.materus.profile.editor.code.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable VSCodium with materus cfg"; options.materus.profile.editor.code.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable VSCodium with materus cfg";
options.materus.profile.editor.code.fhs.enable = materusArg.pkgs.lib.mkBoolOpt false "Use fhs vscodium"; options.materus.profile.editor.code.fhs.enable = materusArg.pkgs.lib.mkBoolOpt false "Use fhs vscodium";
options.materus.profile.editor.code.fhs.packages = lib.mkOption { default = (ps: [ ]); }; options.materus.profile.editor.code.fhs.packages = lib.mkOption { default = (ps: [ ]); };
options.materus.profile.editor.code.fhs.extensions = lib.mkOption { default = []; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.vscode = { programs.vscode = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
package = lib.mkDefault (if (cfg.fhs.enable) then (pkgs.vscodium.fhsWithPackages cfg.fhs.packages) else pkgs.vscodium); package = lib.mkDefault (if (cfg.fhs.enable) then (pkgs.vscodium.fhsWithPackages cfg.fhs.packages) else pkgs.vscodium);
mutableExtensionsDir = lib.mkDefault true; mutableExtensionsDir = lib.mkDefault config.materus.profile.editor.code.fhs.enable;
extensions = lib.mkDefault config.materus.profile.editor.code.fhs.extensions;
enableExtensionUpdateCheck = lib.mkDefault config.materus.profile.editor.code.fhs.enable;
enableUpdateCheck = lib.mkDefault false;
}; };
materus.profile.fonts.enable = lib.mkDefault true; materus.profile.fonts.enable = lib.mkDefault true;
}; };