From f626840f779ac0350d591068095d627faec7e364 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sat, 15 Jun 2024 22:56:54 -0300 Subject: [PATCH 01/35] nixos: configure xdg-desktop-portal --- kernel/zenergy.nix | 24 +++++++++++++----------- nixos.nix | 17 +++++++++++++++++ 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/kernel/zenergy.nix b/kernel/zenergy.nix index cd89f03..9a77d48 100644 --- a/kernel/zenergy.nix +++ b/kernel/zenergy.nix @@ -1,9 +1,11 @@ { lib, stdenv, fetchFromGitHub, kernel, kmod }: -let kernelDirectory = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; -in stdenv.mkDerivation { +let + kernelDirectory = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; +in +stdenv.mkDerivation { pname = "zenergy"; - version = "a3e124477ee8197015481156b90100d49fa3cd84"; + version = "0-unstable-2024-05-19"; src = fetchFromGitHub { owner = "BoukeHaarsma23"; @@ -12,29 +14,29 @@ in stdenv.mkDerivation { hash = "sha256-10hiUHJvLTG3WGrr4WXMo/mCoJGFqWk2l5PryjNhcHg="; }; + nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies; + hardeningDisable = [ "format" "pic" ]; - makeFlags = kernel.makeFlags ++ [ "KDIR=${kernelDirectory}" ]; + makeFlags = kernel.makeFlags ++ [ + "KDIR=${kernelDirectory}" + ]; + + makeTargets = [ "modules_install" ]; preBuild = '' substituteInPlace Makefile --replace-fail "PWD modules_install" "PWD INSTALL_MOD_PATH=$out modules_install" ''; - nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies; - installPhase = '' make modules_install KDIR=${kernelDirectory} ''; - outputs = [ "out" ]; - meta = with lib; { - description = - "Based on AMD_ENERGY driver, but with some jiffies added so non-root users can read it safely."; + description = "Based on AMD_ENERGY driver, but with some jiffies added so non-root users can read it safely."; homepage = "https://github.com/BoukeHaarsma23/zenergy"; license = licenses.gpl2Only; maintainers = with maintainers; [ wizardlink ]; platforms = platforms.linux; - outputsToInstall = [ "out" ]; }; } diff --git a/nixos.nix b/nixos.nix index b9779a0..4752538 100644 --- a/nixos.nix +++ b/nixos.nix @@ -210,6 +210,23 @@ # Enable Hyprland programs.hyprland.enable = true; + # Enable XDG Desktop Portals. + xdg.portal = { + enable = true; + + extraPortals = with pkgs; [ + xdg-desktop-portal-hyprland + ]; + + config = { + common = { + default = [ + "hyprland" + ]; + }; + }; + }; + # Enable OpenGL. hardware.opengl = { enable = true; From d313ea192716452a5555745f292746a9c4ace308 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sat, 15 Jun 2024 22:57:44 -0300 Subject: [PATCH 02/35] neovim: use vtsls instead of typescript-language-server --- programs/neovim/default.nix | 2 +- programs/vtsls/package-lock.json | 551 +++++++++++++++++++++++++++++++ programs/vtsls/package.nix | 31 ++ 3 files changed, 583 insertions(+), 1 deletion(-) create mode 100644 programs/vtsls/package-lock.json create mode 100644 programs/vtsls/package.nix diff --git a/programs/neovim/default.nix b/programs/neovim/default.nix index 30493f0..32604d5 100644 --- a/programs/neovim/default.nix +++ b/programs/neovim/default.nix @@ -37,7 +37,7 @@ nixpkgs-fmt # TypeScript - nodePackages.typescript-language-server + (callPackage ../vtsls/package.nix { }) # Rust rust-analyzer diff --git a/programs/vtsls/package-lock.json b/programs/vtsls/package-lock.json new file mode 100644 index 0000000..b2b9401 --- /dev/null +++ b/programs/vtsls/package-lock.json @@ -0,0 +1,551 @@ +{ + "name": "@vtsls/language-server", + "version": "0.2.3", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@vtsls/language-server", + "version": "0.2.3", + "license": "MIT", + "dependencies": { + "@vtsls/language-service": "0.2.3", + "vscode-languageserver": "^9.0.1", + "vscode-uri": "^3.0.8" + }, + "bin": { + "vtsls": "bin/vtsls.js" + }, + "devDependencies": { + "esbuild": "^0.21.3" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@vscode/l10n": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.18.tgz", + "integrity": "sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ==" + }, + "node_modules/@vtsls/language-service": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@vtsls/language-service/-/language-service-0.2.3.tgz", + "integrity": "sha512-VqjmaSGbW0LHiJNdhBrKnxKXFrpBUUDc/FxakrRh6z26d4kg55mRpm9IM1khR0tkl3MYtejn0lLNQYcfCVHgYg==", + "dependencies": { + "@vscode/l10n": "^0.0.18", + "@vtsls/vscode-fuzzy": "0.0.1", + "jsonc-parser": "^3.2.0", + "semver": "7.5.2", + "typescript": "5.4.5", + "vscode-languageserver-protocol": "^3.17.5", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-uri": "^3.0.8" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@vtsls/vscode-fuzzy": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@vtsls/vscode-fuzzy/-/vscode-fuzzy-0.0.1.tgz", + "integrity": "sha512-2KCtA+/OmPVttsdVggO0WQFXZwM0zbG7G8KRGExe4YeoaHB0fDWyfsNrWnutnFVRlpmu8quVTjTI15YK6KGCFw==" + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==" + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/vscode-jsonrpc": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "dependencies": { + "vscode-languageserver-protocol": "3.17.5" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "dependencies": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + } + }, + "node_modules/vscode-languageserver-textdocument": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", + "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==" + }, + "node_modules/vscode-languageserver-types": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" + }, + "node_modules/vscode-uri": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", + "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==" + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/programs/vtsls/package.nix b/programs/vtsls/package.nix new file mode 100644 index 0000000..8d2431d --- /dev/null +++ b/programs/vtsls/package.nix @@ -0,0 +1,31 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +, importNpmLock +}: + +buildNpmPackage rec { + pname = "vtsls"; + version = "0.2.3"; + + src = fetchFromGitHub { + owner = "yioneko"; + repo = "vtsls"; + rev = "server-v${version}"; + hash = "sha256-bc8KDsvAxvHdUhO2wn1KBc4jB/LKz+fozfrPGmD15wQ="; + fetchSubmodules = true; + }; + + sourceRoot = "${src.name}/packages/server"; + + npmDeps = importNpmLock { + npmRoot = "${src}/packages/server"; + packageLock = lib.importJSON ./package-lock.json; + }; + + npmDepsHash = "sha256-R70+8vwcZHlT9J5MMCw3rjUQmki4/IoRYHO45CC8TiI="; + + npmConfigHook = importNpmLock.npmConfigHook; + + dontNpmPrune = true; +} From 05e80f826dd70595ef641e3422637f7e667db0d8 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sat, 15 Jun 2024 22:58:08 -0300 Subject: [PATCH 03/35] neovim: use astrocommunity typescript pack instead of all-in-one --- programs/neovim/lua/community.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/neovim/lua/community.lua b/programs/neovim/lua/community.lua index 949aa0d..5ec0465 100644 --- a/programs/neovim/lua/community.lua +++ b/programs/neovim/lua/community.lua @@ -33,7 +33,7 @@ return { { import = "astrocommunity.pack.nix" }, { import = "astrocommunity.pack.rust" }, { import = "astrocommunity.pack.toml" }, - { import = "astrocommunity.pack.typescript-all-in-one" }, + { import = "astrocommunity.pack.typescript" }, { import = "astrocommunity.pack.vue" }, { import = "astrocommunity.pack.yaml" }, } From 634fd78eee0ea39e3a10aab1dc3fb8c1122ff585 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sat, 15 Jun 2024 22:59:13 -0300 Subject: [PATCH 04/35] neovim: new alpha-nvim header --- programs/neovim/lua/plugins/user.lua | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/programs/neovim/lua/plugins/user.lua b/programs/neovim/lua/plugins/user.lua index e3df0f5..f674b21 100644 --- a/programs/neovim/lua/plugins/user.lua +++ b/programs/neovim/lua/plugins/user.lua @@ -17,15 +17,18 @@ return { opts = function(_, opts) -- customize the dashboard header opts.section.header.val = { - "⠀⠀⠀⠀⠀⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", - "⠀⠀⠀⠀⣰⠿⡇⢸⡟⡇⠀⠘⡷⠶⢶⣆⠘⣶⠶⠶⠶⣦⣤⣤⣤⣤⣄⣀⣀⣀⡀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⠤⠤⣤⡀⠀⠀", - "⠀⠀⠀⣰⣿⠀⠹⡌⣇⢹⣀⣠⣿⣦⠀⠹⣄⠸⣆⠀⣄⠹⡇⠀⠈⠃⠁⢹⢻⠀⣿⠈⢻⡛⢳⣤⣶⣿⣿⣿⣿⡶⠶⣶⣶⣶⣶⣶⣶⣶⣶⣾⡁⠀⢠⠴⠙⢦⡀", - "⠀⠀⣴⣿⡙⠀⠀⢳⣾⣿⣿⣿⣿⣿⣷⣦⣼⣿⣿⣷⡘⣆⠁⠀⠀⠀⢠⣼⣿⣴⠇⠀⠀⠙⢿⣿⣿⠟⢹⠃⠀⠀⣀⠀⠉⠈⢷⠈⢻⣿⠁⡿⢿⣄⡘⣄⠀⠀⠁", - "⠀⢸⠻⣿⠉⠓⣶⣶⣿⣿⣿⡿⠿⠿⢿⠿⣿⡉⠻⠇⠙⢿⣷⣀⠀⠀⢼⡙⠿⠃⠀⠀⠀⠀⠈⠿⠋⠀⢸⠄⠀⠀⠛⠃⠀⠀⢸⠀⠀⣿⢀⠇⢸⡿⠛⠛⢷⡶⠂", - "⠀⣸⡄⠙⣆⠀⣿⡿⠹⣏⡤⢤⣸⣿⠼⠀⠘⠇⠆⠀⠀⠀⠉⠉⢳⠦⣼⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢳⡀⠀⠀⠀⠀⢀⡞⠀⣰⣿⣾⣀⣾⡅⠀⡞⠉⠙⢆", - "⢀⡿⢿⢦⠹⣿⣿⡇⠀⢉⠀⠈⠁⠀⠀⠀⢠⢃⡗⠀⠀⠀⠀⠀⢻⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠲⢤⣙⣲⣤⣤⣶⣫⠤⠖⠹⠋⠉⠉⠉⠻⣶⣽⣦⣀⡼", - "⠼⣧⣬⣿⡿⣭⠈⠿⣤⡬⠷⠴⠒⠒⠒⠲⠿⠛⠀⠂⠀⠂⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⠉⠉⠉⠁⠀", - "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠴⠶⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⣤⣶⣶⣾⣿⣿⣿⣿⣷⣶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣶⣾⣿⣿⣿⣿⣷⣶⣶⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⢀⣠⡴⠾⠟⠋⠉⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠉⠉⠙⠛⠷⢦⣄⡀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠘⠋⠁⠀⠀⢀⣀⣤⣶⣖⣒⣒⡲⠶⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⠶⢖⣒⣒⣲⣶⣤⣀⡀⠀⠀⠈⠙⠂⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⣠⢖⣫⣷⣿⣿⣿⣿⣿⣿⣶⣤⡙⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⢋⣤⣾⣿⣿⣿⣿⣿⣿⣾⣝⡲⣄⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⣄⣀⣠⢿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠻⢿⣿⣿⣦⣳⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣟⣴⣿⣿⡿⠟⠻⢿⣿⣿⣿⣿⣿⣿⣿⡻⣄⣀⣤⠀⠀⠀", + "⠀⠀⠀⠈⠟⣿⣿⣿⡿⢻⣿⣿⣿⠃⠀⠀⠀⠀⠙⣿⣿⣿⠓⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⣿⣿⣿⠋⠀⠀⠀⠀⠘⣿⣿⣿⡟⢿⣿⣿⣟⠻⠁⠀⠀⠀", + "⠤⣤⣶⣶⣿⣿⣿⡟⠀⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⢻⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⡏⠀⠀⠀⠀⠀⠀⣹⣿⣿⣷⠈⢻⣿⣿⣿⣶⣦⣤⠤", + "⠀⠀⠀⠀⠀⢻⣟⠀⠀⣿⣿⣿⣿⡀⠀⠀⠀⠀⢀⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⡀⠀⠀⠀⠀⢀⣿⣿⣿⣿⠀⠀⣿⡟⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠻⣆⠀⢹⣿⠟⢿⣿⣦⣤⣤⣴⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡿⢷⣤⣤⣤⣴⣿⣿⣿⣿⡇⠀⣰⠟⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠙⠂⠀⠙⢀⣀⣿⣿⣿⣿⣿⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⠁⠀⣻⣿⣿⣿⣿⣿⣿⠏⠀⠘⠃⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡈⠻⠿⣿⣿⣿⡿⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠻⢿⣿⣿⣿⠿⠛⢁⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⠛⣶⣦⣤⣤⣤⡤⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⢤⣤⣤⣤⣶⣾⠛⠓⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", } return opts end, From bbb222ef0d1af08642632995a95fde2a24f2b9c4 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sat, 15 Jun 2024 23:00:08 -0300 Subject: [PATCH 05/35] fix: remove unused attributes --- services/jellyfin.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/services/jellyfin.nix b/services/jellyfin.nix index 078feff..e512e4b 100644 --- a/services/jellyfin.nix +++ b/services/jellyfin.nix @@ -1,5 +1,3 @@ -{ pkgs, ... }: - { services.jellyfin = { enable = true; From b5149f0304550caed08a83ed85f0e3d7cdf593ea Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sat, 15 Jun 2024 23:02:19 -0300 Subject: [PATCH 06/35] hm: remove logseq temporarily Once again it's broken since it uses an EOL version of Electron on it's latest stable release. Maybe it's time for me to maintain it in nixpkgs since no one is taking that spot. --- home-manager.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/home-manager.nix b/home-manager.nix index fdf3440..f8ce032 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -86,7 +86,6 @@ # Editing krita libreoffice - logseq shotcut ## Entertainment From 8cc3bcd17d2d4c81f2e579f385b879b1e21349da Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sat, 15 Jun 2024 23:02:26 -0300 Subject: [PATCH 07/35] flake: update --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index ba47222..72a7b94 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1717316182, - "narHash": "sha256-Xi0EpZcu39N0eW7apLjFfUOR9y80toyjYizez7J1wMI=", + "lastModified": 1718243258, + "narHash": "sha256-abBpj2VU8p6qlRzTU8o22q68MmOaZ4v8zZ4UlYl5YRU=", "owner": "nix-community", "repo": "home-manager", - "rev": "9b53a10f4c91892f5af87cf55d08fba59ca086af", + "rev": "8d5e27b4807d25308dfe369d5a923d87e7dbfda3", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1717196966, - "narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=", + "lastModified": 1718318537, + "narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "57610d2f8f0937f39dbd72251e9614b1561942d8", + "rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420", "type": "github" }, "original": { From 5ad03ee2e81d84e32d5e0ba070b4ba37217ac3e9 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sun, 16 Jun 2024 05:28:06 -0300 Subject: [PATCH 08/35] neovim: tell lspconfig that vtsls is present and update vtsls hash --- programs/neovim/lua/plugins/astrolsp.lua | 2 +- programs/vtsls/package.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/neovim/lua/plugins/astrolsp.lua b/programs/neovim/lua/plugins/astrolsp.lua index 91a9954..9d25c02 100644 --- a/programs/neovim/lua/plugins/astrolsp.lua +++ b/programs/neovim/lua/plugins/astrolsp.lua @@ -59,8 +59,8 @@ return { "rust_analyzer", "svelte", "taplo", - "tsserver", "volar", + "vtsls", "yamlls", }, -- customize language server configuration options passed to `lspconfig` diff --git a/programs/vtsls/package.nix b/programs/vtsls/package.nix index 8d2431d..147780b 100644 --- a/programs/vtsls/package.nix +++ b/programs/vtsls/package.nix @@ -12,7 +12,7 @@ buildNpmPackage rec { owner = "yioneko"; repo = "vtsls"; rev = "server-v${version}"; - hash = "sha256-bc8KDsvAxvHdUhO2wn1KBc4jB/LKz+fozfrPGmD15wQ="; + hash = "sha256-rHiH42WpKR1nZjsW+Q4pit1aLbNIKxpYSy7sjPS0WGc="; fetchSubmodules = true; }; From ecbe0c069c31fc79975cd10f9bf345fc30d98f9d Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 24 Jun 2024 03:20:30 -0300 Subject: [PATCH 09/35] fix: move to nixfmt-rfc-style instead of nixpkgs-fmt --- flake.nix | 16 ++++++-- hardware-configuration.nix | 37 +++++++++++++---- home-manager.nix | 54 +++++++++++++------------ kernel/zenergy.nix | 17 +++++--- nixos.nix | 39 ++++++++++-------- programs/fish/default.nix | 8 +++- programs/git.nix | 16 ++++++-- programs/hyprland/default.nix | 2 +- programs/mangohud.nix | 33 ++++++++++++--- programs/neovim/default.nix | 2 +- programs/neovim/lua/plugins/none-ls.lua | 4 +- programs/vtsls/package.nix | 17 ++++++-- programs/waybar.nix | 19 +++++++-- services/caddy.nix | 3 +- 14 files changed, 184 insertions(+), 83 deletions(-) diff --git a/flake.nix b/flake.nix index 28bfa66..ae5d3a2 100644 --- a/flake.nix +++ b/flake.nix @@ -10,9 +10,17 @@ }; }; - outputs = { self, home-manager, nixpkgs, ... }@inputs: - let system = "x86_64-linux"; - in { + outputs = + { + self, + home-manager, + nixpkgs, + ... + }@inputs: + let + system = "x86_64-linux"; + in + { nixosConfigurations."nixos" = let specialArgs = inputs; @@ -31,6 +39,6 @@ in nixpkgs.lib.nixosSystem { inherit system specialArgs modules; }; - formatter."${system}" = nixpkgs.legacyPackages.${system}.nixpkgs-fmt; + formatter."${system}" = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style; }; } diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 60a6183..b1ec4d1 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -1,13 +1,25 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; @@ -25,19 +37,29 @@ fileSystems."/mnt/ssd" = { device = "/dev/disk/by-uuid/f27f2224-d351-46fd-89f5-991de36166ad"; fsType = "ext4"; - options = [ "defaults" "nofail" ]; + options = [ + "defaults" + "nofail" + ]; }; fileSystems."/mnt/internal" = { device = "/dev/disk/by-uuid/b8541c0d-9146-4388-b217-431f196957cc"; fsType = "ext4"; - options = [ "defaults" "nofail" ]; + options = [ + "defaults" + "nofail" + ]; }; fileSystems."/mnt/media" = { device = "/dev/disk/by-uuid/52c17b8b-46c1-4870-b86c-c3b9f4bd4434"; fsType = "ext4"; - options = [ "defaults" "nofail" ]; + options = [ + "defaults" + "nofail" + ]; + }; }; swapDevices = [ ]; @@ -51,6 +73,5 @@ # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/home-manager.nix b/home-manager.nix index f8ce032..a982173 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -125,22 +125,28 @@ # Create an FHS environment using the command `fhs`, enabling the execution of non-NixOS packages in NixOS! ( - let base = pkgs.appimageTools.defaultFhsEnvArgs; - in pkgs.buildFHSUserEnv (base // { - name = "fhs"; - targetPkgs = pkgs: - ( - # pkgs.buildFHSUserEnv provides only a minimal FHS environment, - # lacking many basic packages needed by most software. - # Therefore, we need to add them manually. - # - # pkgs.appimageTools provides basic packages required by most software. - (base.targetPkgs pkgs) ++ (with pkgs; [ nodejs ]) - ); - profile = "export FHS=1"; - runScript = "bash"; - extraOutputsToInstall = [ "dev" ]; - }) + let + base = pkgs.appimageTools.defaultFhsEnvArgs; + in + pkgs.buildFHSUserEnv ( + base + // { + name = "fhs"; + targetPkgs = + pkgs: + ( + # pkgs.buildFHSUserEnv provides only a minimal FHS environment, + # lacking many basic packages needed by most software. + # Therefore, we need to add them manually. + # + # pkgs.appimageTools provides basic packages required by most software. + (base.targetPkgs pkgs) ++ (with pkgs; [ nodejs ]) + ); + profile = "export FHS=1"; + runScript = "bash"; + extraOutputsToInstall = [ "dev" ]; + } + ) ) ]; @@ -152,8 +158,7 @@ # plain files is through 'home.file'. home.file = { # Cattpuccin theme for fish shell. - ".config/fish/themes/Catppuccin-Frappe.theme".source = - ./programs/fish/Catppuccin-Frappe.theme; + ".config/fish/themes/Catppuccin-Frappe.theme".source = ./programs/fish/Catppuccin-Frappe.theme; # Configuration for gamemode, for running games with optimizations. ".config/gamemode.ini".source = ./programs/gamemode.ini; @@ -164,11 +169,11 @@ ## Kvantum's theme configuration. ".config/Kvantum/Catppuccin-Frappe-Lavender" = { source = "${ - pkgs.catppuccin-kvantum.override { - accent = "Lavender"; - variant = "Frappe"; - } - }/share/Kvantum/Catppuccin-Frappe-Lavender"; + pkgs.catppuccin-kvantum.override { + accent = "Lavender"; + variant = "Frappe"; + } + }/share/Kvantum/Catppuccin-Frappe-Lavender"; }; ".config/Kvantum/kvantum.kvconfig".text = '' @@ -180,8 +185,7 @@ ## Themeing configuration for qt5 and qt6 ".config/qt5ct/colors".source = ./theming/qt5ct; - ".config/qt6ct/colors".source = - ./theming/qt5ct; # We use the qt5ct because it's the SAME spec + ".config/qt6ct/colors".source = ./theming/qt5ct; # We use the qt5ct because it's the SAME spec ## # Configure pipewire for microphone noise supression. diff --git a/kernel/zenergy.nix b/kernel/zenergy.nix index 9a77d48..00d20c2 100644 --- a/kernel/zenergy.nix +++ b/kernel/zenergy.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, fetchFromGitHub, kernel, kmod }: +{ + lib, + stdenv, + fetchFromGitHub, + kernel, + kmod, +}: let kernelDirectory = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; @@ -16,12 +22,13 @@ stdenv.mkDerivation { nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies; - hardeningDisable = [ "format" "pic" ]; - - makeFlags = kernel.makeFlags ++ [ - "KDIR=${kernelDirectory}" + hardeningDisable = [ + "format" + "pic" ]; + makeFlags = kernel.makeFlags ++ [ "KDIR=${kernelDirectory}" ]; + makeTargets = [ "modules_install" ]; preBuild = '' diff --git a/nixos.nix b/nixos.nix index 4752538..155d26c 100644 --- a/nixos.nix +++ b/nixos.nix @@ -19,7 +19,10 @@ ]; # Enable experimental features - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; # Enable automatic garbage collection. nix.gc = { @@ -91,15 +94,17 @@ 8211 # Palworld ]; - allowedTCPPortRanges = [{ - from = 1714; - to = 1764; - } # KDEConnect + allowedTCPPortRanges = [ + { + from = 1714; + to = 1764; + } # KDEConnect ]; - allowedUDPPortRanges = [{ - from = 1714; - to = 1764; - } # KDEConnect + allowedUDPPortRanges = [ + { + from = 1714; + to = 1764; + } # KDEConnect ]; }; # Or disable the firewall altogether. @@ -115,7 +120,13 @@ users.users.wizardlink = { createHome = true; description = "Alexandre Cavalheiro"; - extraGroups = [ "networkmanager" "wheel" "postgresql" "docker" "openrazer" ]; + extraGroups = [ + "networkmanager" + "wheel" + "postgresql" + "docker" + "openrazer" + ]; initialPassword = "wizardlink"; isNormalUser = true; @@ -214,15 +225,11 @@ xdg.portal = { enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-hyprland - ]; + extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ]; config = { common = { - default = [ - "hyprland" - ]; + default = [ "hyprland" ]; }; }; }; diff --git a/programs/fish/default.nix b/programs/fish/default.nix index 8ca63ad..946bf8f 100644 --- a/programs/fish/default.nix +++ b/programs/fish/default.nix @@ -28,9 +28,13 @@ zoxide init --cmd cd fish | source ''; - shellAbbrs = { z = "zoxide"; }; + shellAbbrs = { + z = "zoxide"; + }; - shellAliases = { del = "trash_file"; }; + shellAliases = { + del = "trash_file"; + }; functions = { fish_prompt.body = '' diff --git a/programs/git.nix b/programs/git.nix index 30f536b..c7d6e42 100644 --- a/programs/git.nix +++ b/programs/git.nix @@ -47,9 +47,13 @@ gpgsign = true; }; - tag = { gpgsign = true; }; + tag = { + gpgsign = true; + }; - difftool = { prompt = true; }; + difftool = { + prompt = true; + }; mergetool = { # https://www.git-scm.com/docs/git-mergetool#Documentation/git-mergetool.txt---no-prompt @@ -75,9 +79,13 @@ signingkey = "A1D3A2B4E14BD7C0445BB749A5767B54367CFBDF"; }; - pull = { ff = "only"; }; + pull = { + ff = "only"; + }; - init = { defaultBranch = "main"; }; + init = { + defaultBranch = "main"; + }; credential = { helper = "/usr/libexec/git-core/git-credential-libsecret"; diff --git a/programs/hyprland/default.nix b/programs/hyprland/default.nix index a90e5b9..b631706 100644 --- a/programs/hyprland/default.nix +++ b/programs/hyprland/default.nix @@ -247,7 +247,7 @@ bind = $mainMod SHIFT, J, movewindow, d bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow - + # Volume changes binde = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 1%+ binde = , XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 1%- diff --git a/programs/mangohud.nix b/programs/mangohud.nix index a98090b..a03c3c3 100644 --- a/programs/mangohud.nix +++ b/programs/mangohud.nix @@ -15,8 +15,15 @@ gpu_fan = true; gpu_junction_temp = true; gpu_load_change = true; - gpu_load_color = [ "39F900" "FDFD09" "B22222" ]; - gpu_load_value = [ 60 90 ]; + gpu_load_color = [ + "39F900" + "FDFD09" + "B22222" + ]; + gpu_load_value = [ + 60 + 90 + ]; gpu_mem_clock = true; gpu_mem_temp = true; gpu_power = true; @@ -26,8 +33,15 @@ # CPU Statistics cpu_load_change = true; - cpu_load_color = [ "39F900" "FDFD09" "B22222" ]; - cpu_load_value = [ 60 90 ]; + cpu_load_color = [ + "39F900" + "FDFD09" + "B22222" + ]; + cpu_load_value = [ + 60 + 90 + ]; cpu_mhz = true; cpu_power = true; cpu_stats = true; @@ -46,8 +60,15 @@ # FPS Statistics fps = true; fps_color_change = true; - fps_value = [ 60 90 ]; - fps_color = [ "B22222" "FDFD09" "39F900" ]; + fps_value = [ + 60 + 90 + ]; + fps_color = [ + "B22222" + "FDFD09" + "39F900" + ]; frametime = true; frame_timing = true; # Display graphs histogram = true; # ^ diff --git a/programs/neovim/default.nix b/programs/neovim/default.nix index 32604d5..7078b35 100644 --- a/programs/neovim/default.nix +++ b/programs/neovim/default.nix @@ -34,7 +34,7 @@ # Nix nil - nixpkgs-fmt + nixfmt-rfc-style # TypeScript (callPackage ../vtsls/package.nix { }) diff --git a/programs/neovim/lua/plugins/none-ls.lua b/programs/neovim/lua/plugins/none-ls.lua index 2bf5082..6132628 100644 --- a/programs/neovim/lua/plugins/none-ls.lua +++ b/programs/neovim/lua/plugins/none-ls.lua @@ -12,9 +12,7 @@ return { -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics config.sources = { -- Set a formatter - -- null_ls.builtins.formatting.stylua, - -- null_ls.builtins.formatting.prettier, - null_ls.builtins.formatting.nixpkgs_fmt, + null_ls.builtins.formatting.nixfmt, null_ls.builtins.formatting.prettier, null_ls.builtins.formatting.stylua, } diff --git a/programs/vtsls/package.nix b/programs/vtsls/package.nix index 147780b..fe824ae 100644 --- a/programs/vtsls/package.nix +++ b/programs/vtsls/package.nix @@ -1,7 +1,8 @@ -{ lib -, buildNpmPackage -, fetchFromGitHub -, importNpmLock +{ + lib, + buildNpmPackage, + fetchFromGitHub, + importNpmLock, }: buildNpmPackage rec { @@ -28,4 +29,12 @@ buildNpmPackage rec { npmConfigHook = importNpmLock.npmConfigHook; dontNpmPrune = true; + + meta = with lib; { + description = "LSP wrapper around TypeScript extension bundled with VSCode."; + homepage = "https://github.com/yioneko/vtsls"; + license = licenses.mit; + maintainers = with maintainers; [ wizardlink ]; + platforms = platforms.all; + }; } diff --git a/programs/waybar.nix b/programs/waybar.nix index 14cb554..57aff3a 100644 --- a/programs/waybar.nix +++ b/programs/waybar.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ programs.waybar = { enable = true; @@ -92,7 +93,13 @@ critical-threshold = 90; interval = 5; format = "{icon} {temperatureC}°"; - format-icons = [ "" "" "" "" "" ]; + format-icons = [ + "" + "" + "" + "" + "" + ]; tooltip = false; }; @@ -110,7 +117,13 @@ format-charging-full = " {capacity}%"; format-full = "{icon} {capacity}%"; format-alt = "{icon} {power}W"; - format-icons = [ "" "" "" "" "" ]; + format-icons = [ + "" + "" + "" + "" + "" + ]; tooltip = false; }; diff --git a/services/caddy.nix b/services/caddy.nix index 2d6f8cb..ef9a55c 100644 --- a/services/caddy.nix +++ b/services/caddy.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ services.caddy = { enable = true; From 8fc3fa57e19ed1ee63165ff501dc2c3837626199 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 24 Jun 2024 03:20:47 -0300 Subject: [PATCH 10/35] nixos: move back to zen kernel --- nixos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos.nix b/nixos.nix index 155d26c..9e7f82d 100644 --- a/nixos.nix +++ b/nixos.nix @@ -48,7 +48,7 @@ ## # Kernel - boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackages_zen; # Add AMD drivers. boot.initrd.kernelModules = [ "amdgpu" ]; @@ -56,7 +56,7 @@ # TODO: FIX IT BEING BEING OVERWRITTEN boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback - (pkgs.callPackage ./kernel/zenergy.nix { kernel = pkgs.linux_latest; }) + (pkgs.callPackage ./kernel/zenergy.nix { kernel = pkgs.linux_zen; }) ]; # Bootloader. From 9d41e27590d2d995fb2f2287bcae13945daed27f Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 24 Jun 2024 03:21:05 -0300 Subject: [PATCH 11/35] nixos: remove xpadneo, conflicts with qmk somehow --- nixos.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos.nix b/nixos.nix index 9e7f82d..5799c23 100644 --- a/nixos.nix +++ b/nixos.nix @@ -200,8 +200,8 @@ # Enable QMK support. hardware.keyboard.qmk.enable = true; - # Enable xpadneo support. - hardware.xpadneo.enable = true; + # Enable the udev rules Steam recommends for controllers. + hardware.steam-hardware.enable = true; # Enable fstrim for better ssd lifespan services.fstrim.enable = true; From df3604c844a4194e20d42e8215aca8b596536ab0 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 24 Jun 2024 03:21:23 -0300 Subject: [PATCH 12/35] hardware: add new ssd --- hardware-configuration.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hardware-configuration.nix b/hardware-configuration.nix index b1ec4d1..8839954 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -60,6 +60,14 @@ "nofail" ]; }; + + fileSystems."/mnt/extra" = { + device = "/dev/disk/by-uuid/0d4ef3e0-7e7a-4a70-bbbc-040fe7aa7c2a"; + fsType = "ext4"; + options = [ + "defaults" + "nofail" + ]; }; swapDevices = [ ]; From fe1b72557af3d1e264b7b79b798692ee29c70bfb Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 24 Jun 2024 03:21:34 -0300 Subject: [PATCH 13/35] chore: remove unused file --- theming/catppuccin-qt5ct.nix | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 theming/catppuccin-qt5ct.nix diff --git a/theming/catppuccin-qt5ct.nix b/theming/catppuccin-qt5ct.nix deleted file mode 100644 index 29932d2..0000000 --- a/theming/catppuccin-qt5ct.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ fetchFromGitHub, flavor ? "Mocha", lib, stdenvNoCC }: -let - validFlavors = [ "Frappe" "Latte" "Macchiato" "Mocha" ]; - pname = "catppucin-qt5ct"; -in -lib.checkListOfEnum "${pname}: flavors" validFlavors [ flavor ] - - stdenvNoCC.mkDerivation -{ - inherit pname; - version = "unstable-2023-10-24"; - - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "qt5ct"; - rev = "89ee948e72386b816c7dad72099855fb0d46d41e"; - sha256 = "sha256-t/uyK0X7qt6qxrScmkTU2TvcVJH97hSQuF0yyvSO/qQ="; - }; - - nativeBuildInputs = [ ]; - buildInputs = [ ]; - - postPatch = '' - export HOME=$(mktemp -d) - cp -r themes/* $HOME/.config/qt5ct/colors/ - ''; - - meta = with lib; { - description = "Catppuccin for qt5ct"; - homepage = "https://github.com/catppuccin/qt5ct"; - license = licenses.mit; - maintainers = with maintainers; [ ]; - }; -} From 8264555760a1afff4564c874d423a66ab9e0107f Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 24 Jun 2024 03:21:39 -0300 Subject: [PATCH 14/35] flake: update --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 72a7b94..ed3c428 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1718243258, - "narHash": "sha256-abBpj2VU8p6qlRzTU8o22q68MmOaZ4v8zZ4UlYl5YRU=", + "lastModified": 1718983978, + "narHash": "sha256-lp6stESwTLBZUQ5GBivxwNehShmBp4jqeX/1xahM61w=", "owner": "nix-community", "repo": "home-manager", - "rev": "8d5e27b4807d25308dfe369d5a923d87e7dbfda3", + "rev": "c559542f0aa87971a7f4c1b3478fe33cc904b902", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1718318537, - "narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=", + "lastModified": 1718895438, + "narHash": "sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw+0Bwe5DLU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420", + "rev": "d603719ec6e294f034936c0d0dc06f689d91b6c3", "type": "github" }, "original": { From 2ea6d797b41dc22848d81978452d5e3c61cb6580 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 24 Jun 2024 03:21:58 -0300 Subject: [PATCH 15/35] hm: catppuccin-gtk has been archived, so just use gtk dark theme --- home-manager.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index a982173..43c9497 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -250,13 +250,12 @@ gtk = { enable = true; - theme = { - name = "Catppuccin-Frappe-Standard-Lavender-Dark"; - package = pkgs.catppuccin-gtk.override { - accents = [ "lavender" ]; - tweaks = [ "rimless" ]; - variant = "frappe"; - }; + gtk3.extraConfig = { + gtk-application-prefer-dark-theme = true; + }; + + gtk4.extraConfig = { + gtk-application-prefer-dark-theme = true; }; iconTheme = { From a61557e3de6a69cd1e4eb5869144575e393ab32f Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 24 Jun 2024 03:22:26 -0300 Subject: [PATCH 16/35] nixos: hardware.opengl -> hardware.graphics --- nixos.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos.nix b/nixos.nix index 5799c23..fe0e7ea 100644 --- a/nixos.nix +++ b/nixos.nix @@ -235,10 +235,9 @@ }; # Enable OpenGL. - hardware.opengl = { + hardware.graphics = { enable = true; - driSupport = true; - driSupport32Bit = true; + enable32Bit = true; extraPackages = with pkgs; [ rocm-opencl-icd # OpenGL hwa @@ -298,6 +297,8 @@ programs.steam = { enable = true; remotePlay.openFirewall = true; + + extraCompatPackages = with pkgs; [ proton-ge-bin ]; }; # Enable and configure gamemode. From 13b9de2b128c713b1706a78bc28a8a643d6f6bb4 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Wed, 26 Jun 2024 02:10:58 -0300 Subject: [PATCH 17/35] neovim: add otter.nvim --- programs/neovim/lua/plugins/user.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/programs/neovim/lua/plugins/user.lua b/programs/neovim/lua/plugins/user.lua index f674b21..6a04d5a 100644 --- a/programs/neovim/lua/plugins/user.lua +++ b/programs/neovim/lua/plugins/user.lua @@ -33,4 +33,12 @@ return { return opts end, }, + { + "jmbuhr/otter.nvim", + dependencies = { + "hrsh7th/nvim-cmp", + "neovim/nvim-lspconfig", + "nvim-treesitter/nvim-treesitter", + }, + }, } From c9d8d353ba20c37c65c40d1f6345499af0eef0e4 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Wed, 26 Jun 2024 02:11:25 -0300 Subject: [PATCH 18/35] hm: move wezterm lua config to the nix file --- programs/wezterm/default.nix | 21 ++++++++++++++++++++- programs/wezterm/wezterm.lua | 17 ----------------- 2 files changed, 20 insertions(+), 18 deletions(-) delete mode 100644 programs/wezterm/wezterm.lua diff --git a/programs/wezterm/default.nix b/programs/wezterm/default.nix index 66a1d5c..599ccfa 100644 --- a/programs/wezterm/default.nix +++ b/programs/wezterm/default.nix @@ -3,6 +3,25 @@ { programs.wezterm = { enable = true; - extraConfig = builtins.readFile ./wezterm.lua; + extraConfig = # lua + '' + local wezterm = require("wezterm") + + return { + color_scheme = "Catppuccin Frappe", + enable_wayland = false, -- Unfortunately broken on Hyprland, AGAIN + font = wezterm.font("FantasqueSansM Nerd Font"), + font_size = 13, + hide_tab_bar_if_only_one_tab = true, + hide_mouse_cursor_when_typing = false, + window_background_opacity = 0.88, + window_padding = { + left = 18, + right = 18, + top = 18, + bottom = 18, + }, + } + ''; }; } diff --git a/programs/wezterm/wezterm.lua b/programs/wezterm/wezterm.lua deleted file mode 100644 index 92ee0d1..0000000 --- a/programs/wezterm/wezterm.lua +++ /dev/null @@ -1,17 +0,0 @@ -local wezterm = require("wezterm") - -return { - color_scheme = "Catppuccin Frappe", - enable_wayland = false, -- Unfortunately broken on Hyprland, AGAIN - font = wezterm.font("FantasqueSansM Nerd Font"), - font_size = 13, - hide_tab_bar_if_only_one_tab = true, - hide_mouse_cursor_when_typing = false, - window_background_opacity = 0.88, - window_padding = { - left = 18, - right = 18, - top = 18, - bottom = 18, - }, -} From c5be754716f03de3e3f0c1c705eb8e00fcdfc1e8 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Wed, 26 Jun 2024 02:11:57 -0300 Subject: [PATCH 19/35] hyprland: remove xclip sync --- scripts/hyprland/start_services.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/hyprland/start_services.sh b/scripts/hyprland/start_services.sh index ccf927c..ec4da13 100755 --- a/scripts/hyprland/start_services.sh +++ b/scripts/hyprland/start_services.sh @@ -53,7 +53,5 @@ kdeconnect-cli --refresh & # # Clipboard manager # -wl-paste -w cliphist store & - - # Need this to be able to paste in xwayland applications. -wl-paste -t text -w sh -c 'xclip -selection clipboard -o > /dev/null 2> /dev/null || xclip -selection clipboard' +wl-paste --type text --watch cliphist store & +wl-paste --type image --watch cliphist store & From c2391b31d71b10dfb476274c8d723f747fe6f145 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Wed, 26 Jun 2024 02:12:09 -0300 Subject: [PATCH 20/35] hm: add emacs --- home-manager.nix | 1 + programs/emacs/default.nix | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 programs/emacs/default.nix diff --git a/home-manager.nix b/home-manager.nix index 43c9497..4ac9b22 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -7,6 +7,7 @@ # Import configurations for better modularity. imports = [ + ./programs/emacs ./programs/fish ./programs/git.nix ./programs/hyprland diff --git a/programs/emacs/default.nix b/programs/emacs/default.nix new file mode 100644 index 0000000..2068f15 --- /dev/null +++ b/programs/emacs/default.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: + +{ + programs.emacs = { + enable = true; + + home.packages = with pkgs; [ + # Optional for DOOM + clang + coreutils + fd + ]; + }; +} From f2882f16a0980cbc8fa61d299b01ef175fffdd19 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Wed, 26 Jun 2024 02:12:13 -0300 Subject: [PATCH 21/35] flake: update --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index ed3c428..88d4700 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1718983978, - "narHash": "sha256-lp6stESwTLBZUQ5GBivxwNehShmBp4jqeX/1xahM61w=", + "lastModified": 1719180626, + "narHash": "sha256-vZAzm5KQpR6RGple1dzmSJw5kPivES2heCFM+ZWkt0I=", "owner": "nix-community", "repo": "home-manager", - "rev": "c559542f0aa87971a7f4c1b3478fe33cc904b902", + "rev": "6b1f90a8ff92e81638ae6eb48cd62349c3e387bb", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1718895438, - "narHash": "sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw+0Bwe5DLU=", + "lastModified": 1719075281, + "narHash": "sha256-CyyxvOwFf12I91PBWz43iGT1kjsf5oi6ax7CrvaMyAo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d603719ec6e294f034936c0d0dc06f689d91b6c3", + "rev": "a71e967ef3694799d0c418c98332f7ff4cc5f6af", "type": "github" }, "original": { From 30ed9f1e1f46b778d7b35d7a9201b9c5ecaeae53 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 27 Jun 2024 00:42:51 -0300 Subject: [PATCH 22/35] emacs: add onChange script to run doom sync and add missing symbols font --- home-manager.nix | 7 +- programs/emacs/default.nix | 49 ++++- programs/emacs/doom/config.el | 100 +++++++++ programs/emacs/doom/init.el | 199 ++++++++++++++++++ programs/emacs/doom/packages.el | 57 +++++ .../emacs/doom/snippets/org-mode/daily.org | 19 ++ programs/emacs/doom/templates/roam/daily.org | 25 +++ 7 files changed, 445 insertions(+), 11 deletions(-) create mode 100644 programs/emacs/doom/config.el create mode 100644 programs/emacs/doom/init.el create mode 100644 programs/emacs/doom/packages.el create mode 100644 programs/emacs/doom/snippets/org-mode/daily.org create mode 100644 programs/emacs/doom/templates/roam/daily.org diff --git a/home-manager.nix b/home-manager.nix index 4ac9b22..d57f8ed 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -118,7 +118,12 @@ swww ## Theming - (nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) + (nerdfonts.override { + fonts = [ + "FantasqueSansMono" + "NerdFontsSymbolsOnly" + ]; + }) libsForQt5.qtstyleplugin-kvantum libsForQt5.qtwayland qt6Packages.qtstyleplugin-kvantum diff --git a/programs/emacs/default.nix b/programs/emacs/default.nix index 2068f15..9fb5428 100644 --- a/programs/emacs/default.nix +++ b/programs/emacs/default.nix @@ -1,14 +1,43 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { - programs.emacs = { - enable = true; + programs.emacs.enable = true; - home.packages = with pkgs; [ - # Optional for DOOM - clang - coreutils - fd - ]; - }; + home.packages = with pkgs; [ + # Optional for DOOM + clang + coreutils + fd + + pandoc # For org-pandoc + ]; + + # Neatly place the configuration files for doom in their right place. + xdg.configFile."doom" = + let + # What DOOM needs to be able to install/sync. + packagesNeeded = with pkgs; [ + git + emacs + ripgrep + ]; + in + { + source = ./doom; + recursive = true; + + onChange = # sh + '' + # Need to set this so DOOM can find all binaries. + export PATH="${lib.strings.concatMapStrings (x: x + "/bin:") packagesNeeded}$PATH" + + if [ ! -d "$HOME/.emacs.d" ]; then + git clone https://github.com/hlissner/doom-emacs $HOME/.emacs.d + $HOME/.emacs.d/bin/doom install + else + # Needed to apply the configuration changes. + $HOME/.emacs.d/bin/doom sync + fi + ''; + }; } diff --git a/programs/emacs/doom/config.el b/programs/emacs/doom/config.el new file mode 100644 index 0000000..5ac5236 --- /dev/null +++ b/programs/emacs/doom/config.el @@ -0,0 +1,100 @@ +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- + +;; Place your private configuration here! Remember, you do not need to run 'doom +;; sync' after modifying this file! + + +;; Some functionality uses this to identify you, e.g. GPG configuration, email +;; clients, file templates and snippets. It is optional. +(setq user-full-name "Alexandre Cavalheiro S. Tiago da Silva" + user-mail-address "contact@thewizard.link") + +;; Doom exposes five (optional) variables for controlling fonts in Doom: +;; +;; - `doom-font' -- the primary font to use +;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable) +;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. +;; - `doom-symbol-font' -- for symbols +;; - `doom-serif-font' -- for the `fixed-pitch-serif' face +;; +;; See 'C-h v doom-font' for documentation and more examples of what they +;; accept. For example: +;; +;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light) +;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13)) +;; +;; If you or Emacs can't find your font, use 'M-x describe-font' to look them +;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to +;; refresh your font settings. If Emacs still can't find your font, it likely +;; wasn't installed correctly. Font issues are rarely Doom issues! +(setq doom-font (font-spec :family "FantasqueSansM Nerd Font" :size 16)) + +;; There are two ways to load a theme. Both assume the theme is installed and +;; available. You can either set `doom-theme' or manually load a theme with the +;; `load-theme' function. This is the default: +(setq doom-theme 'catppuccin) + +;; This determines the style of line numbers in effect. If set to `nil', line +;; numbers are disabled. For relative line numbers, set this to `relative'. +(setq display-line-numbers-type 'relative) + +;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! +(setq org-directory "~/Documents/notes" + org-agenda-files (doom-files-in `(,org-directory, "~/Documents/zettelkasten") :type 'files :match "\\.org\\'")) + + +;; Whenever you reconfigure a package, make sure to wrap your config in an +;; `after!' block, otherwise Doom's defaults may override your settings. E.g. +;; +;; (after! PACKAGE +;; (setq x y)) +;; +;; The exceptions to this rule: +;; +;; - Setting file/directory variables (like `org-directory') +;; - Setting variables which explicitly tell you to set them before their +;; package is loaded (see 'C-h v VARIABLE' to look up their documentation). +;; - Setting doom variables (which start with 'doom-' or '+'). +;; +;; Here are some additional functions/macros that will help you configure Doom. +;; +;; - `load!' for loading external *.el files relative to this one +;; - `use-package!' for configuring packages +;; - `after!' for running code after a package has loaded +;; - `add-load-path!' for adding directories to the `load-path', relative to +;; this file. Emacs searches the `load-path' when you load packages with +;; `require' or `use-package'. +;; - `map!' for binding new keys +;; +;; To get information about any of these functions/macros, move the cursor over +;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). +;; This will open documentation for it, including demos of how they are used. +;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces, +;; etc). +;; +;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how +;; they are implemented. + +;; Set the tab size to 2 +(setq tab-width 2) + +;; Configure initial major mode for the scratch buffer +(setq initial-major-mode 'org-mode) + +;; Configure orm-roam +(setq org-roam-directory "~/Documents/zettelkasten") +(map! (:leader :desc "Opens a daily note through the calendar" :n "nrdF" #'org-roam-dailies-find-date)) + +(use-package! org-roam-ui + :after org-roam + :config + (setq org-roam-ui-sync-theme t + org-roam-ui-follow t + org-roam-ui-update-on-save t + org-roam-ui-open-on-start t)) + +;; Configure doom-themes with treemacs +(with-eval-after-load 'doom-themes + (doom-themes-treemacs-config)) diff --git a/programs/emacs/doom/init.el b/programs/emacs/doom/init.el new file mode 100644 index 0000000..5482596 --- /dev/null +++ b/programs/emacs/doom/init.el @@ -0,0 +1,199 @@ +;;; init.el -*- lexical-binding: t; -*- + +;; This file controls what Doom modules are enabled and what order they load +;; in. Remember to run 'doom sync' after modifying it! + +;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's +;; documentation. There you'll find a link to Doom's Module Index where all +;; of our modules are listed, including what flags they support. + +;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or +;; 'C-c c k' for non-vim users) to view its documentation. This works on +;; flags as well (those symbols that start with a plus). +;; +;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its +;; directory (for easy access to its source code). + +(doom! :input + ;;bidi ; (tfel ot) thgir etirw uoy gnipleh + ;;chinese + ;;japanese + ;;layout ; auie,ctsrnm is the superior home row + + :completion + company ; the ultimate code completion backend + ;;(corfu +orderless) ; complete with cap(f), cape and a flying feather! + ;;helm ; the *other* search engine for love and life + ;;ido ; the other *other* search engine... + ;;ivy ; a search engine for love and life + vertico ; the search engine of the future + + :ui + ;;deft ; notational velocity for Emacs + doom ; what makes DOOM look the way it does + doom-dashboard ; a nifty splash screen for Emacs + ;;doom-quit ; DOOM quit-message prompts when you quit Emacs + ;;(emoji +unicode) ; 🙂 + hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW + ;;hydra + ;;indent-guides ; highlighted indent columns + ;;ligatures ; ligatures and symbols to make your code pretty again + ;;minimap ; show a map of the code on the side + modeline ; snazzy, Atom-inspired modeline, plus API + ;;nav-flash ; blink cursor line after big motions + ;;neotree ; a project drawer, like NERDTree for vim + ophints ; highlight the region an operation acts on + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;tabs ; a tab bar for Emacs + treemacs ; a project drawer, like neotree but cooler + unicode ; extended unicode support for various languages + (vc-gutter +pretty) ; vcs diff in the fringe + vi-tilde-fringe ; fringe tildes to mark beyond EOB + ;;window-select ; visually switch windows + workspaces ; tab emulation, persistence & separate workspaces + ;;zen ; distraction-free coding or writing + + :editor + (evil +everywhere); come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding + ;;(format +onsave) ; automated prettiness + ;;god ; run Emacs commands without modifier keys + ;;lispy ; vim for lisp, for people who don't like vim + ;;multiple-cursors ; editing in many places at once + ;;objed ; text object editing for the innocent + ;;parinfer ; turn lisp into python, sort of + ;;rotate-text ; cycle region at point between text candidates + snippets ; my elves. They type so I don't have to + ;;word-wrap ; soft wrapping with language-aware indent + + :emacs + dired ; making dired pretty [functional] + electric ; smarter, keyword-based electric-indent + ;;ibuffer ; interactive buffer management + undo ; persistent, smarter undo for your inevitable mistakes + vc ; version-control and Emacs, sitting in a tree + + :term + ;;eshell ; the elisp shell that works everywhere + ;;shell ; simple shell REPL for Emacs + ;;term ; basic terminal emulator for Emacs + ;;vterm ; the best terminal emulation in Emacs + + :checkers + syntax ; tasing you for every semicolon you forget + ;;(spell +flyspell) ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make + + :tools + ;;ansible + ;;biblio ; Writes a PhD for you (citation needed) + ;;collab ; buffers with friends + ;;debugger ; FIXME stepping through code, to help you add bugs + ;;direnv + ;;docker + ;;editorconfig ; let someone else argue about tabs vs spaces + ;;ein ; tame Jupyter notebooks with emacs + (eval +overlay) ; run code, run (also, repls) + lookup ; navigate your code and its documentation + ;;lsp ; M-x vscode + magit ; a git porcelain for Emacs + ;;make ; run make tasks from Emacs + ;;pass ; password manager for nerds + ;;pdf ; pdf enhancements + ;;prodigy ; FIXME managing external services & code builders + ;;rgb ; creating color strings + ;;taskrunner ; taskrunner for all your projects + ;;terraform ; infrastructure as code + ;;tmux ; an API for interacting with tmux + ;;tree-sitter ; syntax and parsing, sitting in a tree... + ;;upload ; map local to remote projects via ssh/ftp + + :os + (:if (featurep :system 'macos) macos) ; improve compatibility with macOS + ;;tty ; improve the terminal Emacs experience + + :lang + ;;agda ; types of types of types of types... + ;;beancount ; mind the GAAP + ;;(cc +lsp) ; C > C++ == 1 + ;;clojure ; java with a lisp + ;;common-lisp ; if you've seen one lisp, you've seen them all + ;;coq ; proofs-as-programs + ;;crystal ; ruby at the speed of c + ;;csharp ; unity, .NET, and mono shenanigans + ;;data ; config/data formats + ;;(dart +flutter) ; paint ui and not much else + ;;dhall + ;;elixir ; erlang done right + ;;elm ; care for a cup of TEA? + emacs-lisp ; drown in parentheses + ;;erlang ; an elegant language for a more civilized age + ;;ess ; emacs speaks statistics + ;;factor + ;;faust ; dsp, but you get to keep your soul + ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER) + ;;fsharp ; ML stands for Microsoft's Language + ;;fstar ; (dependent) types and (monadic) effects and Z3 + ;;gdscript ; the language you waited for + ;;(go +lsp) ; the hipster dialect + ;;(graphql +lsp) ; Give queries a REST + ;;(haskell +lsp) ; a language that's lazier than I am + ;;hy ; readability of scheme w/ speed of python + ;;idris ; a language you can depend on + ;;json ; At least it ain't XML + ;;(java +lsp) ; the poster child for carpal tunnel syndrome + ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) + ;;julia ; a better, faster MATLAB + ;;kotlin ; a better, slicker Java(Script) + ;;latex ; writing papers in Emacs has never been so fun + ;;lean ; for folks with too much to prove + ;;ledger ; be audit you can be + ;;lua ; one-based indices? one-based indices + markdown ; writing docs for people to ignore + ;;nim ; python + lisp at the speed of c + ;;nix ; I hereby declare "nix geht mehr!" + ;;ocaml ; an objective camel + (org ; organize your plain life in plain text + +gnuplot + +pandoc + +pretty + +roam2) + ;;php ; perl's insecure younger brother + ;;plantuml ; diagrams for confusing people more + ;;purescript ; javascript, but functional + ;;python ; beautiful is better than ugly + ;;qt ; the 'cutest' gui framework ever + ;;racket ; a DSL for DSLs + ;;raku ; the artist formerly known as perl6 + ;;rest ; Emacs as a REST client + ;;rst ; ReST in peace + ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + ;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + ;;scala ; java, but good + ;;(scheme +guile) ; a fully conniving family of lisps + sh ; she sells {ba,z,fi}sh shells on the C xor + ;;sml + ;;solidity ; do you need a blockchain? No. + ;;swift ; who asked for emoji variables? + ;;terra ; Earth and Moon in alignment for performance. + ;;web ; the tubes + ;;yaml ; JSON, but readable + ;;zig ; C, but simpler + + :email + ;;(mu4e +org +gmail) + ;;notmuch + ;;(wanderlust +gmail) + + :app + ;;calendar + ;;emms + ;;everywhere ; *leave* Emacs!? You must be joking + ;;irc ; how neckbeards socialize + ;;(rss +org) ; emacs as an RSS reader + ;;twitter ; twitter client https://twitter.com/vnought + + :config + ;;literate + (default +bindings +smartparens)) diff --git a/programs/emacs/doom/packages.el b/programs/emacs/doom/packages.el new file mode 100644 index 0000000..f7bb06c --- /dev/null +++ b/programs/emacs/doom/packages.el @@ -0,0 +1,57 @@ +;; -*- no-byte-compile: t; -*- +;;; $DOOMDIR/packages.el + +;; To install a package with Doom you must declare them here and run 'doom sync' +;; on the command line, then restart Emacs for the changes to take effect -- or +;; use 'M-x doom/reload'. + + +;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: +;; (package! some-package) + +;; To install a package directly from a remote git repo, you must specify a +;; `:recipe'. You'll find documentation on what `:recipe' accepts here: +;; https://github.com/radian-software/straight.el#the-recipe-format +;; (package! another-package +;; :recipe (:host github :repo "username/repo")) + +;; If the package you are trying to install does not contain a PACKAGENAME.el +;; file, or is located in a subdirectory of the repo, you'll need to specify +;; `:files' in the `:recipe': +;; (package! this-package +;; :recipe (:host github :repo "username/repo" +;; :files ("some-file.el" "src/lisp/*.el"))) + +;; If you'd like to disable a package included with Doom, you can do so here +;; with the `:disable' property: +;; (package! builtin-package :disable t) + +;; You can override the recipe of a built in package without having to specify +;; all the properties for `:recipe'. These will inherit the rest of its recipe +;; from Doom or MELPA/ELPA/Emacsmirror: +;; (package! builtin-package :recipe (:nonrecursive t)) +;; (package! builtin-package-2 :recipe (:repo "myfork/package")) + +;; Specify a `:branch' to install a package from a particular branch or tag. +;; This is required for some packages whose default branch isn't 'master' (which +;; our package manager can't deal with; see radian-software/straight.el#279) +;; (package! builtin-package :recipe (:branch "develop")) + +;; Use `:pin' to specify a particular commit to install. +;; (package! builtin-package :pin "1a2b3c4d5e") + + +;; Doom's packages are pinned to a specific commit and updated from release to +;; release. The `unpin!' macro allows you to unpin single packages... +;; (unpin! pinned-package) +;; ...or multiple packages +;; (unpin! pinned-package another-pinned-package) +;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) +;; (unpin! t) + +;; Add org-roam-ui so I can see the node graph of my notes. +(unpin! org-roam) +(package! org-roam-ui) + +;; Add catppuccin theme. +(package! catppuccin-theme) diff --git a/programs/emacs/doom/snippets/org-mode/daily.org b/programs/emacs/doom/snippets/org-mode/daily.org new file mode 100644 index 0000000..285b70c --- /dev/null +++ b/programs/emacs/doom/snippets/org-mode/daily.org @@ -0,0 +1,19 @@ +# -*- mode: snippet -*- +# name: daily +# key: daily +# -- +#+filetags: :daily:$1 + +* Tasks +$2 +* Input +* Output +* Morning Journal +** What are you grateful for? +** What do you want today's highlight to be? +** What's on your mind? +* Evening Reflection +** How are you feeling today? +** What could you have done better? +** Amazing things that happened +** What did you learn today? diff --git a/programs/emacs/doom/templates/roam/daily.org b/programs/emacs/doom/templates/roam/daily.org new file mode 100644 index 0000000..ae34e9a --- /dev/null +++ b/programs/emacs/doom/templates/roam/daily.org @@ -0,0 +1,25 @@ +#+title: %<%Y-%m-%d> +#+filetags: :daily: + +* Morning Journal +** What are you grateful for? + +** What do you want the today's highlight to be? + +** Daily affirmations +*** What's on your mind? + +* Tasks + +* Input + +* Output + +* Evening Reflection +** How are you feeling today? + +** What could you have done better? + +** Amazing things that happend + +** What did you learn today? From cfbc17730ada41225003e98b85e4778d2ff21efd Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 27 Jun 2024 00:44:00 -0300 Subject: [PATCH 23/35] neovim: use a more clean file linking for config --- programs/neovim/default.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/programs/neovim/default.nix b/programs/neovim/default.nix index 7078b35..d180e6d 100644 --- a/programs/neovim/default.nix +++ b/programs/neovim/default.nix @@ -55,10 +55,8 @@ ]; }; - xdg.configFile = lib.mkMerge [ - { "nvim/lua/community.lua".source = ./lua/community.lua; } - { "nvim/lua/lazy_setup.lua".source = ./lua/lazy_setup.lua; } - { "nvim/lua/plugins".source = ./lua/plugins; } - { "nvim/lua/polish.lua".source = ./lua/polish.lua; } - ]; + xdg.configFile."nvim/lua" = { + recursive = true; + source = ./lua; + }; } From 80336410e2b0a4105e0b5ba601bbde2e98a8e537 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 27 Jun 2024 00:44:16 -0300 Subject: [PATCH 24/35] nixos: add virt-manager --- nixos.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/nixos.nix b/nixos.nix index fe0e7ea..13fbfb0 100644 --- a/nixos.nix +++ b/nixos.nix @@ -121,11 +121,12 @@ createHome = true; description = "Alexandre Cavalheiro"; extraGroups = [ - "networkmanager" - "wheel" - "postgresql" "docker" + "libvirtd" + "networkmanager" "openrazer" + "postgresql" + "wheel" ]; initialPassword = "wizardlink"; @@ -313,6 +314,10 @@ # Enable Docker. virtualisation.docker.enable = true; + # Enable virt-manager + virtualisation.libvirtd.enable = true; + programs.virt-manager.enable = true; + # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ From 845471f4d94e736cda06b41a47ceca706bb4a0f0 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 27 Jun 2024 00:44:45 -0300 Subject: [PATCH 25/35] nixos: add the recommendation from home-manager for xdg-desktop-portal --- nixos.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos.nix b/nixos.nix index 13fbfb0..2338e35 100644 --- a/nixos.nix +++ b/nixos.nix @@ -235,6 +235,12 @@ }; }; + # Needed for home-manager + environment.pathsToLink = [ + "/share/xdg-desktop-portal" + "/share/applications" + ]; + # Enable OpenGL. hardware.graphics = { enable = true; From f6d75e1db17895aefd836b2ee3afc6fd48afdff2 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 27 Jun 2024 00:44:53 -0300 Subject: [PATCH 26/35] flake: update --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 88d4700..c905410 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1719180626, - "narHash": "sha256-vZAzm5KQpR6RGple1dzmSJw5kPivES2heCFM+ZWkt0I=", + "lastModified": 1719438532, + "narHash": "sha256-/Vmso2ZMoFE3M7d1MRsQ2K5sR8CVKnrM6t1ys9Xjpz4=", "owner": "nix-community", "repo": "home-manager", - "rev": "6b1f90a8ff92e81638ae6eb48cd62349c3e387bb", + "rev": "1a4f12ae0bda877ec4099b429cf439aad897d7e9", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1719075281, - "narHash": "sha256-CyyxvOwFf12I91PBWz43iGT1kjsf5oi6ax7CrvaMyAo=", + "lastModified": 1719254875, + "narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a71e967ef3694799d0c418c98332f7ff4cc5f6af", + "rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60", "type": "github" }, "original": { From 2b65a9b926e7703131868726d0992be38e65dbcc Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sat, 29 Jun 2024 22:51:17 -0300 Subject: [PATCH 27/35] nixos: remove unused firewall ports --- nixos.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nixos.nix b/nixos.nix index 2338e35..5667f69 100644 --- a/nixos.nix +++ b/nixos.nix @@ -80,15 +80,11 @@ # Open ports in the firewall. networking.firewall = { allowedTCPPorts = [ - 11753 # OpenRCT2 - 14004 # Veloren 443 # SSL 80 # HTTP ]; allowedUDPPorts = [ - 11753 # OpenRCT2 - 14004 # Veloren 2626 # Dolphin emulator 27015 # Source games 8211 # Palworld From 4ee935feb6c1633cdfc6afae906b603521a2cf70 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sat, 29 Jun 2024 22:52:18 -0300 Subject: [PATCH 28/35] obs: remove wlorbs plugin - it's breaking it --- programs/obs-studio.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/programs/obs-studio.nix b/programs/obs-studio.nix index b232ce9..bc3348e 100644 --- a/programs/obs-studio.nix +++ b/programs/obs-studio.nix @@ -10,7 +10,6 @@ obs-pipewire-audio-capture obs-vaapi obs-vkcapture - wlrobs ]; }; } From 745174f417d2061c695202b1aeab7c4a3df82087 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sat, 29 Jun 2024 22:52:38 -0300 Subject: [PATCH 29/35] neovim: add hyprlang treesitter --- programs/hyprland/default.nix | 433 +++++++++++---------- programs/neovim/lua/plugins/treesitter.lua | 1 + 2 files changed, 218 insertions(+), 216 deletions(-) diff --git a/programs/hyprland/default.nix b/programs/hyprland/default.nix index b631706..d8358e9 100644 --- a/programs/hyprland/default.nix +++ b/programs/hyprland/default.nix @@ -2,267 +2,268 @@ wayland.windowManager.hyprland = { enable = true; - extraConfig = '' - # Catppuccin Macchiato - https://github.com/catppuccin/hyprland - $rosewaterAlpha = rgb(f4dbd6) - $flamingoAlpha = rgb(f0c6c6) - $pinkAlpha = rgb(f5bde6) - $mauveAlpha = rgb(c6a0f6) - $redAlpha = rgb(ed8796) - $maroonAlpha = rgb(ee99a0) - $peachAlpha = rgb(f5a97f) - $yellowAlpha = rgb(eed49f) - $greenAlpha = rgb(a6da95) - $tealAlpha = rgb(8bd5ca) - $skyAlpha = rgb(91d7e3) - $sapphireAlpha = rgb(7dc4e4) - $blueAlpha = rgb(8aadf4) - $lavenderAlpha = rgb(b7bdf8) + extraConfig = # hyprlang + '' + # Catppuccin Macchiato - https://github.com/catppuccin/hyprland + $rosewaterAlpha = rgb(f4dbd6) + $flamingoAlpha = rgb(f0c6c6) + $pinkAlpha = rgb(f5bde6) + $mauveAlpha = rgb(c6a0f6) + $redAlpha = rgb(ed8796) + $maroonAlpha = rgb(ee99a0) + $peachAlpha = rgb(f5a97f) + $yellowAlpha = rgb(eed49f) + $greenAlpha = rgb(a6da95) + $tealAlpha = rgb(8bd5ca) + $skyAlpha = rgb(91d7e3) + $sapphireAlpha = rgb(7dc4e4) + $blueAlpha = rgb(8aadf4) + $lavenderAlpha = rgb(b7bdf8) - $textAlpha = rgb(cad3f5) - $subtext1Alpha = rgb(b8c0e0) - $subtext0Alpha = rgb(a5adcb) + $textAlpha = rgb(cad3f5) + $subtext1Alpha = rgb(b8c0e0) + $subtext0Alpha = rgb(a5adcb) - $overlay2Alpha = rgb(939ab7) - $overlay1Alpha = rgb(8087a2) - $overlay0Alpha = rgb(6e738d) + $overlay2Alpha = rgb(939ab7) + $overlay1Alpha = rgb(8087a2) + $overlay0Alpha = rgb(6e738d) - $surface2Alpha = rgb(5b6078) - $surface1Alpha = rgb(494d64) - $surface0Alpha = rgb(363a4f) + $surface2Alpha = rgb(5b6078) + $surface1Alpha = rgb(494d64) + $surface0Alpha = rgb(363a4f) - $baseAlpha = rgb(24273a) - $mantleAlpha = rgb(1e2030) - $crustAlpha = rgb(181926) + $baseAlpha = rgb(24273a) + $mantleAlpha = rgb(1e2030) + $crustAlpha = rgb(181926) - $rosewater = 0xfff5e0dc - $flamingo = 0xfff2cdcd - $pink = 0xfff5c2e7 - $mauve = 0xffcba6f7 - $red = 0xfff38ba8 - $maroon = 0xffeba0ac - $peach = 0xfffab387 - $yellow = 0xfff9e2af - $green = 0xffa6e3a1 - $teal = 0xff94e2d5 - $sky = 0xff89dceb - $sapphire = 0xff74c7ec - $blue = 0xff89b4fa - $lavender = 0xffb4befe + $rosewater = 0xfff5e0dc + $flamingo = 0xfff2cdcd + $pink = 0xfff5c2e7 + $mauve = 0xffcba6f7 + $red = 0xfff38ba8 + $maroon = 0xffeba0ac + $peach = 0xfffab387 + $yellow = 0xfff9e2af + $green = 0xffa6e3a1 + $teal = 0xff94e2d5 + $sky = 0xff89dceb + $sapphire = 0xff74c7ec + $blue = 0xff89b4fa + $lavender = 0xffb4befe - $text = 0xffcdd6f4 - $subtext1 = 0xffbac2de - $subtext0 = 0xffa6adc8 + $text = 0xffcdd6f4 + $subtext1 = 0xffbac2de + $subtext0 = 0xffa6adc8 - $overlay2 = 0xff9399b2 - $overlay1 = 0xff7f849c - $overlay0 = 0xff6c7086 + $overlay2 = 0xff9399b2 + $overlay1 = 0xff7f849c + $overlay0 = 0xff6c7086 - $surface2 = 0xff585b70 - $surface1 = 0xff45475a - $surface0 = 0xff313244 + $surface2 = 0xff585b70 + $surface1 = 0xff45475a + $surface0 = 0xff313244 - $base = 0xff1e1e2e - $mantle = 0xff181825 - $crust = 0xff11111b + $base = 0xff1e1e2e + $mantle = 0xff181825 + $crust = 0xff11111b - # - # Please note not all available settings / options are set here. - # For a full list, see the wiki - # + # + # Please note not all available settings / options are set here. + # For a full list, see the wiki + # - autogenerated = 0 # remove this line to remove the warning + autogenerated = 0 # remove this line to remove the warning - # See https://wiki.hyprland.org/Configuring/Monitors/ - monitor = DP-3, 1920x1080@75, 2560x0, 1 - monitor = DP-2, 2560x1440@165, 0x0, 1 + # See https://wiki.hyprland.org/Configuring/Monitors/ + monitor = DP-3, 1920x1080@75, 2560x0, 1 + monitor = DP-2, 2560x1440@165, 0x0, 1 - # See https://wiki.hyprland.org/Configuring/Keywords/ for more + # See https://wiki.hyprland.org/Configuring/Keywords/ for more - # Inject home-manager session variables - exec-once = /etc/profiles/per-user/wizardlink/etc/profile.d/hm-session-vars.sh + # Inject home-manager session variables + exec-once = /etc/profiles/per-user/wizardlink/etc/profile.d/hm-session-vars.sh - # Execute your favorite apps at launch - exec-once = ~/.local/share/scripts/hyprland/start_services.sh + # Execute your favorite apps at launch + exec-once = ~/.local/share/scripts/hyprland/start_services.sh - # Source a file (multi-file configs) - # source = ~/.config/hypr/myColors.conf + # Source a file (multi-file configs) + # source = ~/.config/hypr/myColors.conf - # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ - input { - kb_layout = us,br,jp - kb_variant = ,,kana86 - kb_model = - kb_options = grp:alts_toggle - kb_rules = + # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ + input { + kb_layout = us,br,jp + kb_variant = ,,kana86 + kb_model = + kb_options = grp:alts_toggle + kb_rules = - follow_mouse = 1 - float_switch_override_focus = 1 + follow_mouse = 1 + float_switch_override_focus = 1 - accel_profile = flat - force_no_accel = true + accel_profile = flat + force_no_accel = true - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - tablet { - output = DP-2 - } - } + tablet { + output = DP-2 + } + } - general { - # See https://wiki.hyprland.org/Configuring/Variables/ for more + general { + # See https://wiki.hyprland.org/Configuring/Variables/ for more - gaps_in = 6 - gaps_out = 18 - border_size = 2 - col.active_border = $base $surface0 $green 45deg - col.inactive_border = $base $surface0 $blue 45deg + gaps_in = 6 + gaps_out = 18 + border_size = 2 + col.active_border = $base $surface0 $green 45deg + col.inactive_border = $base $surface0 $blue 45deg - layout = dwindle - } + layout = dwindle + } - decoration { - # See https://wiki.hyprland.org/Configuring/Variables/ for more + decoration { + # See https://wiki.hyprland.org/Configuring/Variables/ for more - rounding = 8 - # FIXME: Check these deprecations. - #blur = yes - #blur_size = 3 - #blur_passes = 1 - #blur_new_optimizations = on + rounding = 8 + # FIXME: Check these deprecations. + #blur = yes + #blur_size = 3 + #blur_passes = 1 + #blur_new_optimizations = on - drop_shadow = yes - shadow_range = 4 - shadow_render_power = 3 - col.shadow = $crust - } + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = $crust + } - animations { - enabled = yes + animations { + enabled = yes - # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more - bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - animation = windows, 1, 7, myBezier - animation = windowsOut, 1, 7, default, popin 80% - animation = border, 1, 10, default - animation = borderangle, 1, 8, default - animation = fade, 1, 7, default - animation = workspaces, 1, 6, default - } + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default + } - dwindle { - # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more - pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below - preserve_split = yes # you probably want this - } + dwindle { + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this + } - master { - # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more - new_is_master = true - } + master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + new_status = slave + } - gestures { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - workspace_swipe = off - } + gestures { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + workspace_swipe = off + } - # Example windowrule v1 - # windowrule = float, ^(kitty)$ - # Example windowrule v2 - # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ - # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more + # Example windowrule v1 + # windowrule = float, ^(kitty)$ + # Example windowrule v2 + # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ + # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more - # Bind workspaces to specific monitors - workspace = 1, monitor:DP-2 - workspace = 2, monitor:DP-3 - workspace = 3, monitor:DP-2 - workspace = 4, monitor:DP-3 - workspace = 5, monitor:DP-2 - workspace = 6, monitor:DP-3 - workspace = 7, monitor:DP-2 - workspace = 8, monitor:DP-3 - workspace = 9, monitor:DP-2 - workspace = 0, monitor:DP-3 + # Bind workspaces to specific monitors + workspace = 1, monitor:DP-2 + workspace = 2, monitor:DP-3 + workspace = 3, monitor:DP-2 + workspace = 4, monitor:DP-3 + workspace = 5, monitor:DP-2 + workspace = 6, monitor:DP-3 + workspace = 7, monitor:DP-2 + workspace = 8, monitor:DP-3 + workspace = 9, monitor:DP-2 + workspace = 0, monitor:DP-3 - # See https://wiki.hyprland.org/Configuring/Keywords/ for more - $mainMod = SUPER + # See https://wiki.hyprland.org/Configuring/Keywords/ for more + $mainMod = SUPER - # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more - bind = $mainMod CTRL, F, fakefullscreen - bind = $mainMod CTRL, L, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy - bind = $mainMod CTRL, P, exec, ~/.local/share/scripts/hyprland/screenshot_area.sh - bind = $mainMod CTRL, V, pin - bind = $mainMod SHIFT, F, fullscreen, 1 - bind = $mainMod SHIFT, P, exec, ~/.local/share/scripts/hyprland/screenshot.sh - bind = $mainMod, C, killactive - bind = $mainMod, E, exec, wezterm start fish -c "ya" - bind = $mainMod, F, fullscreen - bind = $mainMod, M, exit - bind = $mainMod, O, togglesplit # dwindle - bind = $mainMod, P, pseudo # dwindle - bind = $mainMod, Q, exec, wezterm - bind = $mainMod, R, exec, rofi -show drun - bind = $mainMod, V, togglefloating + # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more + bind = $mainMod CTRL, F, fakefullscreen + bind = $mainMod CTRL, L, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy + bind = $mainMod CTRL, P, exec, ~/.local/share/scripts/hyprland/screenshot_area.sh + bind = $mainMod CTRL, V, pin + bind = $mainMod SHIFT, F, fullscreen, 1 + bind = $mainMod SHIFT, P, exec, ~/.local/share/scripts/hyprland/screenshot.sh + bind = $mainMod, C, killactive + bind = $mainMod, E, exec, wezterm start fish -c "ya" + bind = $mainMod, F, fullscreen + bind = $mainMod, M, exit + bind = $mainMod, O, togglesplit # dwindle + bind = $mainMod, P, pseudo # dwindle + bind = $mainMod, Q, exec, wezterm + bind = $mainMod, R, exec, rofi -show drun + bind = $mainMod, V, togglefloating - # Move focus with mainMod + arrow keys - bind = $mainMod, H, movefocus, l - bind = $mainMod, L, movefocus, r - bind = $mainMod, K, movefocus, u - bind = $mainMod, J, movefocus, d + # Move focus with mainMod + arrow keys + bind = $mainMod, H, movefocus, l + bind = $mainMod, L, movefocus, r + bind = $mainMod, K, movefocus, u + bind = $mainMod, J, movefocus, d - # Switch workspaces with mainMod + [0-9] - bind = $mainMod, 1, workspace, 1 - bind = $mainMod, 2, workspace, 2 - bind = $mainMod, 3, workspace, 3 - bind = $mainMod, 4, workspace, 4 - bind = $mainMod, 5, workspace, 5 - bind = $mainMod, 6, workspace, 6 - bind = $mainMod, 7, workspace, 7 - bind = $mainMod, 8, workspace, 8 - #bind = $mainMod, 9, workspace, 9 - #bind = $mainMod, 0, workspace, 10 + # Switch workspaces with mainMod + [0-9] + bind = $mainMod, 1, workspace, 1 + bind = $mainMod, 2, workspace, 2 + bind = $mainMod, 3, workspace, 3 + bind = $mainMod, 4, workspace, 4 + bind = $mainMod, 5, workspace, 5 + bind = $mainMod, 6, workspace, 6 + bind = $mainMod, 7, workspace, 7 + bind = $mainMod, 8, workspace, 8 + #bind = $mainMod, 9, workspace, 9 + #bind = $mainMod, 0, workspace, 10 - # Move active window to a workspace with mainMod + SHIFT + [0-9] - bind = $mainMod SHIFT, 1, movetoworkspace, 1 - bind = $mainMod SHIFT, 2, movetoworkspace, 2 - bind = $mainMod SHIFT, 3, movetoworkspace, 3 - bind = $mainMod SHIFT, 4, movetoworkspace, 4 - bind = $mainMod SHIFT, 5, movetoworkspace, 5 - bind = $mainMod SHIFT, 6, movetoworkspace, 6 - bind = $mainMod SHIFT, 7, movetoworkspace, 7 - bind = $mainMod SHIFT, 8, movetoworkspace, 8 - bind = $mainMod SHIFT, 9, movetoworkspace, 9 - bind = $mainMod SHIFT, 0, movetoworkspace, 10 + # Move active window to a workspace with mainMod + SHIFT + [0-9] + bind = $mainMod SHIFT, 1, movetoworkspace, 1 + bind = $mainMod SHIFT, 2, movetoworkspace, 2 + bind = $mainMod SHIFT, 3, movetoworkspace, 3 + bind = $mainMod SHIFT, 4, movetoworkspace, 4 + bind = $mainMod SHIFT, 5, movetoworkspace, 5 + bind = $mainMod SHIFT, 6, movetoworkspace, 6 + bind = $mainMod SHIFT, 7, movetoworkspace, 7 + bind = $mainMod SHIFT, 8, movetoworkspace, 8 + bind = $mainMod SHIFT, 9, movetoworkspace, 9 + bind = $mainMod SHIFT, 0, movetoworkspace, 10 - # Scroll through existing workspaces with mainMod + scroll - bind = $mainMod, mouse_down, workspace, e+1 - bind = $mainMod, mouse_up, workspace, e-1 + # Scroll through existing workspaces with mainMod + scroll + bind = $mainMod, mouse_down, workspace, e+1 + bind = $mainMod, mouse_up, workspace, e-1 - # Move/resize windows with mainMod + LMB/RMB and dragging - bind = $mainMod SHIFT, H, movewindow, l - bind = $mainMod SHIFT, L, movewindow, r - bind = $mainMod SHIFT, K, movewindow, u - bind = $mainMod SHIFT, J, movewindow, d - bindm = $mainMod, mouse:272, movewindow - bindm = $mainMod, mouse:273, resizewindow + # Move/resize windows with mainMod + LMB/RMB and dragging + bind = $mainMod SHIFT, H, movewindow, l + bind = $mainMod SHIFT, L, movewindow, r + bind = $mainMod SHIFT, K, movewindow, u + bind = $mainMod SHIFT, J, movewindow, d + bindm = $mainMod, mouse:272, movewindow + bindm = $mainMod, mouse:273, resizewindow - # Volume changes - binde = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 1%+ - binde = , XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 1%- - bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle + # Volume changes + binde = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 1%+ + binde = , XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 1%- + bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle - # Window rules - windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$ - windowrulev2 = noanim,class:^(xwaylandvideobridge)$ - windowrulev2 = nofocus,class:^(xwaylandvideobridge)$ - windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$ + # Window rules + windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$ + windowrulev2 = noanim,class:^(xwaylandvideobridge)$ + windowrulev2 = nofocus,class:^(xwaylandvideobridge)$ + windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$ - # Rules for windowkill - windowrule = noborder, ^(steam_app_2726450)$ - windowrule = pin, ^(steam_app_2726450)$ - windowrule = opacity 0.9, ^(steam_app_2726450)$ - ''; + # Rules for windowkill + windowrule = noborder, ^(steam_app_2726450)$ + windowrule = pin, ^(steam_app_2726450)$ + windowrule = opacity 0.9, ^(steam_app_2726450)$ + ''; }; } diff --git a/programs/neovim/lua/plugins/treesitter.lua b/programs/neovim/lua/plugins/treesitter.lua index a3af93a..0244de8 100644 --- a/programs/neovim/lua/plugins/treesitter.lua +++ b/programs/neovim/lua/plugins/treesitter.lua @@ -14,6 +14,7 @@ return { "gdscript", "godot_resource", "html", + "hyprlang", "javascript", "jsdoc", "lua", From 6c14098aaaeaf46e7aed842497b1d306f67c55a2 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sat, 29 Jun 2024 22:52:54 -0300 Subject: [PATCH 30/35] neovim: nodePackages.volar -> vscode-extensions.vue.volar --- programs/neovim/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/neovim/default.nix b/programs/neovim/default.nix index d180e6d..415bc72 100644 --- a/programs/neovim/default.nix +++ b/programs/neovim/default.nix @@ -45,7 +45,7 @@ vscode-extensions.vadimcn.vscode-lldb.adapter # Vue - nodePackages.volar + vscode-extensions.vue.volar # Svelte nodePackages.svelte-language-server From 80c1a962901a30105bed32f17124ab3b82ff16ca Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Sat, 29 Jun 2024 22:52:59 -0300 Subject: [PATCH 31/35] flake: update --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index c905410..83eb4c9 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1719438532, - "narHash": "sha256-/Vmso2ZMoFE3M7d1MRsQ2K5sR8CVKnrM6t1ys9Xjpz4=", + "lastModified": 1719588253, + "narHash": "sha256-A03i8xiVgP14DCmV5P7VUv37eodCjY4e1iai0b2EuuM=", "owner": "nix-community", "repo": "home-manager", - "rev": "1a4f12ae0bda877ec4099b429cf439aad897d7e9", + "rev": "7e68e55d2e16d3a1e92a679430728c35a30fd24e", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1719254875, - "narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=", + "lastModified": 1719506693, + "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60", + "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", "type": "github" }, "original": { From 0bc820f976274298fb95717735d83fe4c30301fc Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Tue, 2 Jul 2024 17:19:01 -0300 Subject: [PATCH 32/35] emacs: update modules --- programs/emacs/doom/init.el | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/programs/emacs/doom/init.el b/programs/emacs/doom/init.el index 5482596..511e06f 100644 --- a/programs/emacs/doom/init.el +++ b/programs/emacs/doom/init.el @@ -36,28 +36,28 @@ ;;(emoji +unicode) ; 🙂 hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW ;;hydra - ;;indent-guides ; highlighted indent columns - ;;ligatures ; ligatures and symbols to make your code pretty again + indent-guides ; highlighted indent columns + ligatures ; ligatures and symbols to make your code pretty again ;;minimap ; show a map of the code on the side modeline ; snazzy, Atom-inspired modeline, plus API - ;;nav-flash ; blink cursor line after big motions + nav-flash ; blink cursor line after big motions ;;neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on (popup +defaults) ; tame sudden yet inevitable temporary windows ;;tabs ; a tab bar for Emacs - treemacs ; a project drawer, like neotree but cooler + (treemacs +lsp) ; a project drawer, like neotree but cooler unicode ; extended unicode support for various languages (vc-gutter +pretty) ; vcs diff in the fringe vi-tilde-fringe ; fringe tildes to mark beyond EOB ;;window-select ; visually switch windows workspaces ; tab emulation, persistence & separate workspaces - ;;zen ; distraction-free coding or writing + zen ; distraction-free coding or writing :editor (evil +everywhere); come to the dark side, we have cookies file-templates ; auto-snippets for empty files fold ; (nigh) universal code folding - ;;(format +onsave) ; automated prettiness + (format +onsave) ; automated prettiness ;;god ; run Emacs commands without modifier keys ;;lispy ; vim for lisp, for people who don't like vim ;;multiple-cursors ; editing in many places at once @@ -82,7 +82,7 @@ :checkers syntax ; tasing you for every semicolon you forget - ;;(spell +flyspell) ; tasing you for misspelling mispelling + (spell +flyspell) ; tasing you for misspelling mispelling ;;grammar ; tasing grammar mistake every you make :tools @@ -92,21 +92,21 @@ ;;debugger ; FIXME stepping through code, to help you add bugs ;;direnv ;;docker - ;;editorconfig ; let someone else argue about tabs vs spaces + editorconfig ; let someone else argue about tabs vs spaces ;;ein ; tame Jupyter notebooks with emacs (eval +overlay) ; run code, run (also, repls) lookup ; navigate your code and its documentation - ;;lsp ; M-x vscode - magit ; a git porcelain for Emacs + ;lsp ; M-x vscode + ;;magit ; a git porcelain for Emacs ;;make ; run make tasks from Emacs ;;pass ; password manager for nerds ;;pdf ; pdf enhancements ;;prodigy ; FIXME managing external services & code builders - ;;rgb ; creating color strings + rgb ; creating color strings ;;taskrunner ; taskrunner for all your projects ;;terraform ; infrastructure as code ;;tmux ; an API for interacting with tmux - ;;tree-sitter ; syntax and parsing, sitting in a tree... + tree-sitter ; syntax and parsing, sitting in a tree... ;;upload ; map local to remote projects via ssh/ftp :os @@ -146,9 +146,11 @@ ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) ;;julia ; a better, faster MATLAB ;;kotlin ; a better, slicker Java(Script) - ;;latex ; writing papers in Emacs has never been so fun + (latex ; writing papers in Emacs has never been so fun + +lsp + +cdlatex) ;;lean ; for folks with too much to prove - ;;ledger ; be audit you can be + ledger ; be audit you can be ;;lua ; one-based indices? one-based indices markdown ; writing docs for people to ignore ;;nim ; python + lisp at the speed of c @@ -191,7 +193,7 @@ ;;emms ;;everywhere ; *leave* Emacs!? You must be joking ;;irc ; how neckbeards socialize - ;;(rss +org) ; emacs as an RSS reader + (rss +org) ; emacs as an RSS reader ;;twitter ; twitter client https://twitter.com/vnought :config From 969817faffeabad0aa1f89b9f14d5624ae1fb59c Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Tue, 2 Jul 2024 17:19:23 -0300 Subject: [PATCH 33/35] home-manager: remove unused env and lldb package --- home-manager.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/home-manager.nix b/home-manager.nix index d57f8ed..97ffff1 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -47,7 +47,6 @@ EDITOR = "nvim"; NIXOS_OZONE_WL = "1"; QT_QPA_PLATFORM = "wayland"; - XCURSOR_SIZE = 36; }; ## @@ -107,7 +106,6 @@ ## Development lazygit - vscode-extensions.vadimcn.vscode-lldb ## Desktop environment cliphist From fe84499235dca973336369a8b6a6ba06809bcd47 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Tue, 2 Jul 2024 17:19:45 -0300 Subject: [PATCH 34/35] nixos: add amdgpu xserver driver and move sddm back to xorg --- nixos.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/nixos.nix b/nixos.nix index 5667f69..9c18a15 100644 --- a/nixos.nix +++ b/nixos.nix @@ -52,6 +52,7 @@ # Add AMD drivers. boot.initrd.kernelModules = [ "amdgpu" ]; + services.xserver.videoDrivers = [ "amdgpu" ]; # TODO: FIX IT BEING BEING OVERWRITTEN boot.extraModulePackages = [ @@ -207,11 +208,22 @@ ## DESKTOP ## ## + # Enable XServer + services.xserver = { + enable = true; + + xrandrHeads = [ + { + output = "DP-2"; + primary = true; + } + "DP-3" + ]; + }; + # Enable SDDM. services.displayManager.sddm = { enable = true; - wayland.enable = true; - theme = "${import ./theming/sddm.nix { inherit pkgs; }}"; }; From 1e3f9fed266edf02e2e7c17e79c44514f72396ac Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Tue, 2 Jul 2024 17:19:49 -0300 Subject: [PATCH 35/35] flake: update --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 83eb4c9..f584a7a 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1719588253, - "narHash": "sha256-A03i8xiVgP14DCmV5P7VUv37eodCjY4e1iai0b2EuuM=", + "lastModified": 1719827439, + "narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=", "owner": "nix-community", "repo": "home-manager", - "rev": "7e68e55d2e16d3a1e92a679430728c35a30fd24e", + "rev": "59ce796b2563e19821361abbe2067c3bb4143a7d", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1719506693, - "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", + "lastModified": 1719848872, + "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", + "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8", "type": "github" }, "original": {