configurations & Old-materusPC: vscode settings
This commit is contained in:
parent
aaf9221f44
commit
6590f99c8d
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, materusArg, lib, ... }:
|
||||
{ config, pkgs, materusArg, materusCfg, lib, ... }:
|
||||
{
|
||||
home.stateVersion = "22.11";
|
||||
home.homeDirectory = "/home/materus";
|
||||
|
@ -13,6 +13,27 @@
|
|||
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 = {
|
||||
fonts.enable = lib.mkDefault true;
|
||||
nixpkgs.enable = lib.mkDefault false;
|
||||
|
@ -20,7 +41,80 @@
|
|||
enableTerminal = lib.mkDefault true;
|
||||
enableTerminalExtra = 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 [
|
||||
llvmpkgs.clang
|
||||
llvmpkgs.llvm
|
||||
|
@ -71,56 +165,58 @@
|
|||
editor.emacs.enable = false;
|
||||
|
||||
};
|
||||
xdg.desktopEntries.brave-browser = let env = lib.concatStringsSep " " [
|
||||
''__NV_PRIME_RENDER_OFFLOAD="1"''
|
||||
''__NV_PRIME_RENDER_OFFLOAD_PROVIDER="NVIDIA-G0"''
|
||||
''__GLX_VENDOR_LIBRARY_NAME="nvidia"''
|
||||
''__VK_LAYER_NV_optimus="NVIDIA_only"''
|
||||
''NIXOS_OZONE_WL="1"''
|
||||
];
|
||||
script = pkgs.writeShellScript "brave" ''
|
||||
${env} brave "$@"
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
name = "Brave Web Browser";
|
||||
genericName = "Przeglądarka WWW";
|
||||
comment = "Skorzystaj z internetu";
|
||||
exec = "${script} %U";
|
||||
icon = "brave-browser";
|
||||
terminal = false;
|
||||
categories = [ "Application" "Network" "WebBrowser" ];
|
||||
mimeType = [
|
||||
"application/pdf"
|
||||
"application/rdf+xml"
|
||||
"application/rss+xml"
|
||||
"application/xhtml+xml"
|
||||
"application/xhtml_xml"
|
||||
"application/xml"
|
||||
"image/gif"
|
||||
"image/jpeg"
|
||||
"image/png"
|
||||
"image/webp"
|
||||
"text/html"
|
||||
"text/xml"
|
||||
"x-scheme-handler/http"
|
||||
"x-scheme-handler/https"
|
||||
"x-scheme-handler/ipfs"
|
||||
"x-scheme-handler/ipns"
|
||||
];
|
||||
actions.new-windows = {
|
||||
exec = "${script}";
|
||||
name = "Nowe okno";
|
||||
xdg.desktopEntries.brave-browser =
|
||||
let
|
||||
env = lib.concatStringsSep " " [
|
||||
''__NV_PRIME_RENDER_OFFLOAD="1"''
|
||||
''__NV_PRIME_RENDER_OFFLOAD_PROVIDER="NVIDIA-G0"''
|
||||
''__GLX_VENDOR_LIBRARY_NAME="nvidia"''
|
||||
''__VK_LAYER_NV_optimus="NVIDIA_only"''
|
||||
''NIXOS_OZONE_WL="1"''
|
||||
];
|
||||
script = pkgs.writeShellScript "brave" ''
|
||||
${env} brave "$@"
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
name = "Brave Web Browser";
|
||||
genericName = "Przeglądarka WWW";
|
||||
comment = "Skorzystaj z internetu";
|
||||
exec = "${script} %U";
|
||||
icon = "brave-browser";
|
||||
terminal = false;
|
||||
categories = [ "Application" "Network" "WebBrowser" ];
|
||||
mimeType = [
|
||||
"application/pdf"
|
||||
"application/rdf+xml"
|
||||
"application/rss+xml"
|
||||
"application/xhtml+xml"
|
||||
"application/xhtml_xml"
|
||||
"application/xml"
|
||||
"image/gif"
|
||||
"image/jpeg"
|
||||
"image/png"
|
||||
"image/webp"
|
||||
"text/html"
|
||||
"text/xml"
|
||||
"x-scheme-handler/http"
|
||||
"x-scheme-handler/https"
|
||||
"x-scheme-handler/ipfs"
|
||||
"x-scheme-handler/ipns"
|
||||
];
|
||||
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 = [
|
||||
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 ]; })
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ let
|
|||
(if hmAsModule then hm.nixosModules.home-manager else { })
|
||||
(if hmAsModule then
|
||||
{
|
||||
|
||||
home-manager.backupFileExtension = "hm-backup";
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.sharedModules = [
|
||||
|
|
|
@ -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.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.extensions = lib.mkOption { default = []; };
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.vscode = {
|
||||
enable = lib.mkDefault true;
|
||||
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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue