diff --git a/flake.lock b/flake.lock index f25a618..76a2850 100644 --- a/flake.lock +++ b/flake.lock @@ -42,11 +42,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1707830867, - "narHash": "sha256-PAdwm5QqdlwIqGrfzzvzZubM+FXtilekQ/FA0cI49/o=", + "lastModified": 1715290355, + "narHash": "sha256-2T7CHTqBXJJ3ZC6R/4TXTcKoXWHcvubKNj9SfomURnw=", "owner": "ryantm", "repo": "agenix", - "rev": "8cb01a0e717311680e0cbca06a76cbceba6f3ed6", + "rev": "8d37c5bdeade12b6479c85acd133063ab53187a0", "type": "github" }, "original": { @@ -186,33 +186,16 @@ "type": "github" } }, - "dzgui": { - "flake": false, - "locked": { - "lastModified": 1702780245, - "narHash": "sha256-cdW5LN2Q7eYW8xIqKPQfeYPd7e6VdJGaoA9NMHesCrE=", - "owner": "aclist", - "repo": "dztui", - "rev": "28323f3edb8fa747dc559d1939ccdd7729e4e3a1", - "type": "github" - }, - "original": { - "owner": "aclist", - "repo": "dztui", - "type": "github" - } - }, "dzgui-nix": { "inputs": { - "dzgui": "dzgui", "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1702850463, - "narHash": "sha256-qR/c/GjsLUzrCyHN/Q9nnClduf6OqTg26S1AFYKPzxA=", + "lastModified": 1715128199, + "narHash": "sha256-mj23cBtiDKy3pgg+J26UA8giZgmJApO8IQlC6+XTAx8=", "owner": "lelgenio", "repo": "dzgui-nix", - "rev": "2ed6515b27d8186b9fedfe1dcaf861f07e796a0d", + "rev": "03968bade43d23c47e8b4f102c711c171c446645", "type": "github" }, "original": { @@ -392,7 +375,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_6" + "systems": "systems_5" }, "locked": { "lastModified": 1681202837, @@ -410,7 +393,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_7" + "systems": "systems_6" }, "locked": { "lastModified": 1681202837, @@ -428,7 +411,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_9" + "systems": "systems_8" }, "locked": { "lastModified": 1694529238, @@ -446,7 +429,7 @@ }, "flake-utils_7": { "inputs": { - "systems": "systems_10" + "systems": "systems_9" }, "locked": { "lastModified": 1681202837, @@ -464,14 +447,14 @@ }, "flake-utils_8": { "inputs": { - "systems": "systems_11" + "systems": "systems_10" }, "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -508,23 +491,26 @@ ] }, "locked": { - "lastModified": 1706981411, - "narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=", + "lastModified": 1716563886, + "narHash": "sha256-MKSVKxP50gEbdP60G0M5LampyVSIGT8FGGB88nKPmi8=", "owner": "nix-community", "repo": "home-manager", - "rev": "652fda4ca6dafeb090943422c34ae9145787af37", + "rev": "00a86e4f7a6455ad58b7090a931f1c6097e4fcd7", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-23.11", + "ref": "release-24.05", "repo": "home-manager", "type": "github" } }, "hyprcursor": { "inputs": { - "hyprlang": "hyprlang", + "hyprlang": [ + "hyprland", + "hyprlang" + ], "nixpkgs": [ "hyprland", "nixpkgs" @@ -535,11 +521,11 @@ ] }, "locked": { - "lastModified": 1710257359, - "narHash": "sha256-43re5pzE/cswFAgw92/ugsB3+d5ufDaCcLtl9ztKfBo=", + "lastModified": 1713612213, + "narHash": "sha256-zJboXgWNpNhKyNF8H/3UYzWkx7w00TOCGKi3cwi+tsw=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "1761f6cefd77f4fcd2039d930c88d6716ddc4974", + "rev": "cab4746180f210a3c1dd3d53e45c510e309e90e1", "type": "github" }, "original": { @@ -551,21 +537,20 @@ "hyprland": { "inputs": { "hyprcursor": "hyprcursor", - "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang_2", + "hyprlang": "hyprlang", + "hyprwayland-scanner": "hyprwayland-scanner", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_5", - "wlroots": "wlroots", + "systems": "systems_4", "xdph": "xdph" }, "locked": { - "lastModified": 1710864211, - "narHash": "sha256-Uve1/UBnwD4M/9xD0E3XATnLrF8B5vL6MTBhX6Is+TE=", + "lastModified": 1715342341, + "narHash": "sha256-jHCjAwaukNCI7yVsbB8oppl1dUujvFAfRiXaecqWGI0=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "bcba3951f45f11245d424274130eb3a0ac790d93", + "rev": "38911d6df4977b6b00557cc887eb151d032e505b", "type": "github" }, "original": { @@ -578,10 +563,12 @@ "inputs": { "nixpkgs": [ "hyprland", + "xdph", "nixpkgs" ], "systems": [ "hyprland", + "xdph", "systems" ] }, @@ -603,17 +590,19 @@ "inputs": { "nixpkgs": [ "hyprland", - "hyprcursor", "nixpkgs" ], - "systems": "systems_4" + "systems": [ + "hyprland", + "systems" + ] }, "locked": { - "lastModified": 1709914708, - "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", + "lastModified": 1713121246, + "narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", + "rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706", "type": "github" }, "original": { @@ -622,7 +611,7 @@ "type": "github" } }, - "hyprlang_2": { + "hyprwayland-scanner": { "inputs": { "nixpkgs": [ "hyprland", @@ -634,16 +623,16 @@ ] }, "locked": { - "lastModified": 1709914708, - "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", + "lastModified": 1715287423, + "narHash": "sha256-B7AJIjOyWgVMKhu7DlOnWa0VprdhywUVHuB/j+EwSxM=", "owner": "hyprwm", - "repo": "hyprlang", - "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", + "repo": "hyprwayland-scanner", + "rev": "e2fc1c0eb8b392110588f478cce644348ead7271", "type": "github" }, "original": { "owner": "hyprwm", - "repo": "hyprlang", + "repo": "hyprwayland-scanner", "type": "github" } }, @@ -709,11 +698,11 @@ ] }, "locked": { - "lastModified": 1710644923, - "narHash": "sha256-0fjbN5GYYDKPyPay0l8gYoH+tFfNqPPwP5sxxBreeA4=", + "lastModified": 1714878592, + "narHash": "sha256-E68C03sYRsYFsK7wiGHUIJm8IsyPRALOrFoTL0glXnI=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "e25efda85e39fcdc845e371971ac4384989c4295", + "rev": "a362555e9dbd4ecff3bb98969bbdb8f79fe87f10", "type": "github" }, "original": { @@ -724,15 +713,16 @@ }, "nix-software-center": { "inputs": { + "nixos-appstream-data": "nixos-appstream-data", "nixpkgs": "nixpkgs_2", "utils": "utils" }, "locked": { - "lastModified": 1703105285, - "narHash": "sha256-BHoW1RQMc2Auz8paBvTBriKv0F6FI99+3nnz/ELLawg=", + "lastModified": 1714856183, + "narHash": "sha256-Ue7xV+rZqImux4DDj3VMla4LIH2g8VeXbTJwgvX7wOo=", "owner": "vlinkz", "repo": "nix-software-center", - "rev": "68e87fb6e24fb3e6fe65449918d0cbda96622b65", + "rev": "b9e0f53536e1e94e7d8c3cda3c6866b3f9d01386", "type": "github" }, "original": { @@ -741,6 +731,32 @@ "type": "github" } }, + "nixos-appstream-data": { + "inputs": { + "flake-utils": [ + "nix-software-center", + "utils" + ], + "nixpkgs": [ + "nix-software-center", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712858390, + "narHash": "sha256-XE7gr+zU3N4SHPAhsgk8cVAFp1iBg+Lxxp3y4dUF1vE=", + "owner": "korfuri", + "repo": "nixos-appstream-data", + "rev": "0465d42a4433faa63b7a5eb0b8d397937c9fc13a", + "type": "github" + }, + "original": { + "owner": "korfuri", + "ref": "flake", + "repo": "nixos-appstream-data", + "type": "github" + } + }, "nixos-conf-editor": { "inputs": { "flake-compat": "flake-compat_3", @@ -789,11 +805,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1702539185, - "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", + "lastModified": 1714562304, + "narHash": "sha256-Mr3U37Rh6tH0FbaDFu0aZDwk9mPAe7ASaqDOGgLqqLU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", + "rev": "bcd44e224fd68ce7d269b4f44d24c2220fd821e7", "type": "github" }, "original": { @@ -866,16 +882,16 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1710695816, - "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "lastModified": 1716408587, + "narHash": "sha256-el71IUaQdEmntmd51GBpkJs/Hqh6S4dmfmUGP8GQaME=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "rev": "1a7abfa62e8a36f7f2dbe463722ed9ea31be5e43", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "type": "indirect" } }, @@ -898,11 +914,11 @@ "ranger-icons": { "flake": false, "locked": { - "lastModified": 1709209315, - "narHash": "sha256-ETE13REDIVuoFIbvWqWvQLj/2fGST+1koowmmuBzGmo=", + "lastModified": 1713564482, + "narHash": "sha256-sijO9leDXgnjgcVlh5fKYalhjOupwFMRyH0xh2g/rEQ=", "owner": "alexanderjeurissen", "repo": "ranger_devicons", - "rev": "ed718dd6a6d5d2c0f53cba8474c5ad96185057e9", + "rev": "a8d626485ca83719e1d8d5e32289cd96a097c861", "type": "github" }, "original": { @@ -1057,21 +1073,6 @@ "type": "github" } }, - "systems_11": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "systems_2": { "locked": { "lastModified": 1681028828, @@ -1119,16 +1120,16 @@ }, "systems_5": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, @@ -1215,7 +1216,7 @@ }, "utils": { "inputs": { - "systems": "systems_8" + "systems": "systems_7" }, "locked": { "lastModified": 1689068808, @@ -1254,11 +1255,11 @@ ] }, "locked": { - "lastModified": 1685576039, - "narHash": "sha256-WMkWurJsZZG7YkWzW/k2SNquYLsAZjzFs7CFswSjDew=", + "lastModified": 1715216838, + "narHash": "sha256-q5key9BWJjJQqECrhflso9ZTzULBeScvromo0S4fjqE=", "owner": "lelgenio", "repo": "wl-crosshair", - "rev": "57d0908e10d9f58fc37fe866404cc8b66be1f0d9", + "rev": "39b716cf410a1b45006f50f32f8d63de5c43aedb", "type": "github" }, "original": { @@ -1267,31 +1268,9 @@ "type": "github" } }, - "wlroots": { - "flake": false, - "locked": { - "host": "gitlab.freedesktop.org", - "lastModified": 1709983277, - "narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=", - "owner": "wlroots", - "repo": "wlroots", - "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", - "type": "gitlab" - }, - "original": { - "host": "gitlab.freedesktop.org", - "owner": "wlroots", - "repo": "wlroots", - "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", - "type": "gitlab" - } - }, "xdph": { "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], + "hyprland-protocols": "hyprland-protocols", "hyprlang": [ "hyprland", "hyprlang" @@ -1306,11 +1285,11 @@ ] }, "locked": { - "lastModified": 1709299639, - "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=", + "lastModified": 1714662532, + "narHash": "sha256-Pj2xGSYhapYbXL7sk7TTlOtCZcTfPQoL3fPbZeg7L4Y=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "2d2fb547178ec025da643db57d40a971507b82fe", + "rev": "1f228ba2f1f254195c0b571302b37482861abee3", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 2b64fb4..7b042c9 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,8 @@ { description = "My system config"; inputs = { - nixpkgs.url = "nixpkgs/nixos-23.11"; - home-manager.url = "github:nix-community/home-manager/release-23.11"; + nixpkgs.url = "nixpkgs/nixos-24.05"; + home-manager.url = "github:nix-community/home-manager/release-24.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; nix-index-database = { @@ -76,17 +76,9 @@ overlays = old_overlays.all; }; - bootstrapPkgs = import inputs.nixpkgs nixpkgsConfig; - nixpkgs = bootstrapPkgs.applyPatches { - name = "patched-nixpkgs"; - src = inputs.nixpkgs; - patches = lib.mapAttrsToList (k: v: ./patches/nixpkgs/${k}) - (builtins.readDir ./patches/nixpkgs); - }; - inherit (import ./user/variables.nix) desktop; system = "x86_64-linux"; - pkgs = import nixpkgs nixpkgsConfig; + pkgs = import inputs.nixpkgs nixpkgsConfig; lib = inputs.nixpkgs.lib; packages = import ./pkgs { inherit pkgs inputs; }; @@ -131,6 +123,7 @@ modules = [ ./hosts/monolith.nix ./system/monolith-gitlab-runner.nix + ./system/monolith-forgejo-runner.nix ./system/nix-serve.nix ./system/steam.nix ] ++ common_modules; diff --git a/hosts/monolith.nix b/hosts/monolith.nix index 451a6e7..c447c45 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -23,6 +23,7 @@ in "zenpower" ]; boot.kernelParams = [ + "amdgpu.dcdebugmask=0x10" # amdgpu undervolting bug "video=DP-1:1920x1080@144" # hibernation "resume=LABEL=BTRFS_ROOT" # findmnt -o LABEL --noheadings /swap/ @@ -43,10 +44,16 @@ in vaapiVdpau rocm-opencl-icd rocm-opencl-runtime + rocmPackages.rocm-smi ]; - programs.corectrl.enable = true; - virtualisation.virtualbox.host.enable = true; + programs.corectrl = { + enable = true; + gpuOverclock = { + enable = true; + ppfeaturemask = "0xffffffff"; + }; + }; fileSystems."/" = { device = "/dev/disk/by-label/BTRFS_ROOT"; diff --git a/overlays/default.nix b/overlays/default.nix index 6782ca4..060a0c0 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -35,10 +35,6 @@ tlauncher = inputs.tlauncher.packages.${prev.system}.tlauncher; maildir-notify-daemon = inputs.maildir-notify-daemon.packages.${prev.system}.default; wl-crosshair = inputs.wl-crosshair.packages.${prev.system}.default; - - webcord = (prev.webcord.overrideAttrs (old: { - patches = (old.patches or [ ]) ++ [ ../patches/webcord/fix-reading-config.patch ]; - })); }); patches = (final: prev: { @@ -48,9 +44,19 @@ --replace ZWLR_LAYER_SHELL_V1_LAYER_TOP ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY ''; }); - sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: { - patches = old.patches - ++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ]; + mySway = prev.sway.override { + sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: { + patches = old.patches + ++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ]; + }); + }; + mangohud = prev.mangohud.overrideAttrs (o: { + patches = o.patches ++ [ + (prev.fetchpatch { + url = "https://github.com/flightlessmango/MangoHud/commit/95141de657e02577f1d3fab0ca12122bfb68bc56.patch"; + hash = "sha256-a2tESliGBkfF7uYQn8TDgeFt07A9FOioI4VcTT7DC7A="; + }) + ]; }); }); diff --git a/overlays/sway.nix b/overlays/sway.nix index 4de4395..c6d8d5e 100644 --- a/overlays/sway.nix +++ b/overlays/sway.nix @@ -11,7 +11,7 @@ executable = true; text = '' systemctl --user import-environment - dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway + dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway SWAYSOCK # systemctl --user stop pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr # systemctl --user start pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr ''; diff --git a/patches/nixpkgs/fix-steam-generation-after-generation-switch.patch b/patches/nixpkgs/fix-steam-generation-after-generation-switch.patch deleted file mode 100644 index 7c2b37f..0000000 --- a/patches/nixpkgs/fix-steam-generation-after-generation-switch.patch +++ /dev/null @@ -1,27 +0,0 @@ -From ac4d51306af54a088e29e2e5efcfac5dfe87d95c Mon Sep 17 00:00:00 2001 -From: lelgenio -Date: Fri, 4 Aug 2023 01:25:04 -0300 -Subject: [PATCH] HACK: fix steam after generation switch - ---- - pkgs/build-support/build-fhsenv-bubblewrap/default.nix | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/pkgs/build-support/build-fhsenv-bubblewrap/default.nix b/pkgs/build-support/build-fhsenv-bubblewrap/default.nix -index 3500e5e9216f..4d7ac0aa7618 100644 ---- a/pkgs/build-support/build-fhsenv-bubblewrap/default.nix -+++ b/pkgs/build-support/build-fhsenv-bubblewrap/default.nix -@@ -152,6 +152,10 @@ let - fi - if [[ -L $i ]]; then - symlinks+=(--symlink "$(${coreutils}/bin/readlink "$i")" "$i") -+ elif [[ -f $i && -r $i ]]; then -+ SNAPSHOT=$(mktemp --dry-run) -+ cp "$i" "$SNAPSHOT" -+ ro_mounts+=(--ro-bind-try "$SNAPSHOT" "$i") - else - ro_mounts+=(--ro-bind-try "$i" "$i") - fi --- -2.42.0 - diff --git a/patches/webcord/fix-reading-config.patch b/patches/webcord/fix-reading-config.patch deleted file mode 100644 index 92e89ca..0000000 --- a/patches/webcord/fix-reading-config.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/sources/code/main/modules/config.ts b/sources/code/main/modules/config.ts -index caf51df..41faabe 100644 ---- a/sources/code/main/modules/config.ts -+++ b/sources/code/main/modules/config.ts -@@ -158,6 +158,9 @@ class Config { - #read(): unknown { - const encodedData = readFileSync(this.#path+this.#pathExtension); - let decodedData = encodedData.toString(); -+ if (decodedData === "") -+ return {}; -+ - if(this.#pathExtension === FileExt.Encrypted) - decodedData = safeStorage.decryptString(encodedData); - return JSON.parse(decodedData); diff --git a/scripts/default.nix b/scripts/default.nix index 54ee0a2..bc2ac3d 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -42,6 +42,7 @@ create_scripts [ ]; # This will not work unless programs.wshowkeys is enabled systemwide terminal = [ alacritty ]; playerctl-status = [ playerctl ]; + pass-export = [ pass2csv gnupg ]; wpass = [ final.wdmenu fd pass sd wl-clipboard wtype ]; screenshotsh = [ capitaine-cursors grim slurp jq sway wl-clipboard xdg-user-dirs ]; diff --git a/scripts/pass-export b/scripts/pass-export new file mode 100755 index 0000000..658f803 --- /dev/null +++ b/scripts/pass-export @@ -0,0 +1,10 @@ +#!/bin/sh + +if test -z "$PASSWORD_STORE_DIR"; then + PASSWORD_STORE_DIR="$HOME/.password-store" +fi + +pass2csv "$PASSWORD_STORE_DIR" "$HOME/passwords.csv" \ + -f User '(user|login)(:\s*)?' \ + -f TOTP 'otpauth(:)?' \ + -f URL 'url(:\s*)?' diff --git a/secrets/monolith-forgejo-runner-token.age b/secrets/monolith-forgejo-runner-token.age new file mode 100644 index 0000000..fff63ca Binary files /dev/null and b/secrets/monolith-forgejo-runner-token.age differ diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 9a5fe2b..07ed876 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -5,6 +5,7 @@ in "rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ]; "monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ]; "gitlab-runner-thoreb-telemetria-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ]; + "monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ]; "lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ]; "monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ]; "phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ]; diff --git a/system/bluetooth.nix b/system/bluetooth.nix new file mode 100644 index 0000000..20eb72e --- /dev/null +++ b/system/bluetooth.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: { + services.blueman.enable = true; + hardware.bluetooth = { + enable = true; + settings = { + General = { + DiscoverableTimeout = 0; + # Discoverable = true; + AlwaysPairable = true; + }; + Policy = { AutoEnable = true; }; + }; + }; +} diff --git a/system/configuration.nix b/system/configuration.nix index 3c146b1..130ca7d 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -9,115 +9,24 @@ ./boot.nix ./thunar.nix ./nix.nix + ./fonts.nix + ./sound.nix + ./bluetooth.nix + ./locale.nix + ./users.nix + ./containers.nix + ./network.nix ]; + boot.kernelPackages = pkgs.linuxPackages_latest; + zramSwap.enable = true; programs.adb.enable = true; services.udev.packages = [ pkgs.android-udev-rules ]; - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - # Enable networking - networking.networkmanager.enable = true; - # Open kde connect ports - programs.kdeconnect.enable = true; - networking.firewall.allowedTCPPorts = [ 55201 ]; - - # Set your time zone. - time.timeZone = "America/Sao_Paulo"; - environment.variables.TZ = config.time.timeZone; - # Select internationalisation properties. - i18n.defaultLocale = "pt_BR.utf8"; - - # Enable the GNOME Desktop Environment. - # services.xserver.displayManager.gdm.enable = true; - # services.xserver.desktopManager.gnome.enable = true; - # services.xserver.displayManager.autologin.user = "lelgenio"; - - # Configure keymap in X11 - services.xserver = { - layout = "us"; - xkbVariant = "colemak"; - }; - console.keyMap = "colemak"; - # Enable CUPS to print documents. - # services.printing.enable = true; - services.flatpak.enable = true; - virtualisation.docker.enable = true; - virtualisation.docker.autoPrune.enable = true; - virtualisation.docker.autoPrune.dates = "monthly"; - virtualisation.docker.autoPrune.flags = [ "--all --volumes" ]; - - programs.extra-container.enable = true; - - programs.firejail.enable = true; - - security.rtkit.enable = true; - services.openssh = { - enable = true; - ports = [ 9022 ]; - settings = { - PermitRootLogin = "no"; - PasswordAuthentication = false; - KbdInteractiveAuthentication = false; - }; - }; - # programs.ssh = { - # startAgent = true; - # extraConfig = '' - # AddKeysToAgent yes - # ''; - # }; - - ## Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; - services.pipewire = { - enable = true; - wireplumber.enable = true; - pulse.enable = true; - alsa.enable = true; - jack.enable = true; - }; - - services.blueman.enable = true; - hardware.bluetooth = { - enable = true; - settings = { - General = { - DiscoverableTimeout = 0; - # Discoverable = true; - AlwaysPairable = true; - }; - Policy = { AutoEnable = true; }; - }; - }; - # Enable touchpad support (enabled default in most desktopManager). - services.xserver.libinput.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.mutableUsers = false; - users.users.lelgenio = { - isNormalUser = true; - description = "Leonardo Eugênio"; - hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A"; - extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ]; - shell = pkgs.fish; - openssh.authorizedKeys.keys = [ - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15" - ]; - }; - users.users.root.initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3"; - - # services.getty.autologinUser = "lelgenio"; - programs.fish.enable = true; - - programs.dzgui.enable = true; - programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default; + services.libinput.enable = true; packages.media-packages.enable = true; environment.systemPackages = with pkgs; [ @@ -129,21 +38,7 @@ gnome3.adwaita-icon-theme # default gnome cursors ]; - fonts.enableDefaultPackages = true; - fonts.packages = with pkgs; [ - noto-fonts - noto-fonts-cjk - noto-fonts-emoji - nerdfonts_fira_hack - ]; - services.geoclue2.enable = true; - # programs.qt5ct.enable = true; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - services.pcscd.enable = true; - security.sudo.wheelNeedsPassword = false; systemd.extraConfig = '' DefaultTimeoutStopSec=10s diff --git a/system/containers.nix b/system/containers.nix new file mode 100644 index 0000000..c2c2941 --- /dev/null +++ b/system/containers.nix @@ -0,0 +1,11 @@ +{ pkgs, ... }: { + services.flatpak.enable = true; + virtualisation.docker.enable = true; + virtualisation.docker.autoPrune.enable = true; + virtualisation.docker.autoPrune.dates = "monthly"; + virtualisation.docker.autoPrune.flags = [ "--all --volumes" ]; + + programs.extra-container.enable = true; + + programs.firejail.enable = true; +} diff --git a/system/fonts.nix b/system/fonts.nix new file mode 100644 index 0000000..e6d4ccd --- /dev/null +++ b/system/fonts.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: { + fonts.enableDefaultPackages = true; + fonts.packages = with pkgs; [ + noto-fonts + noto-fonts-cjk + noto-fonts-emoji + nerdfonts_fira_hack + ]; +} diff --git a/system/gnome.nix b/system/gnome.nix index 855f5d5..cb8c106 100644 --- a/system/gnome.nix +++ b/system/gnome.nix @@ -8,18 +8,22 @@ services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome.enable = true; - services.xserver.displayManager.autoLogin = { + services.displayManager.autoLogin = { enable = true; user = "lelgenio"; }; + programs.kdeconnect = { + enable = true; + package = pkgs.gnomeExtensions.gsconnect; + }; + # services.xserver.displayManager.autologin.user = "lelgenio"; environment.systemPackages = with pkgs; with gnome; [ gnome-tweaks dconf-editor chrome-gnome-shell - gnomeExtensions.gsconnect gnomeExtensions.quick-settings-audio-devices-hider ]; } diff --git a/system/locale.nix b/system/locale.nix new file mode 100644 index 0000000..bb344c7 --- /dev/null +++ b/system/locale.nix @@ -0,0 +1,12 @@ +{ pkgs, config, ... }: { + time.timeZone = "America/Sao_Paulo"; + environment.variables.TZ = config.time.timeZone; + i18n.defaultLocale = "pt_BR.utf8"; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "us"; + variant = "colemak"; + }; + console.keyMap = "colemak"; +} diff --git a/system/media-packages.nix b/system/media-packages.nix index 95675be..e72ea0a 100644 --- a/system/media-packages.nix +++ b/system/media-packages.nix @@ -16,7 +16,7 @@ in { gimp inkscape krita - kdenlive + kdePackages.kdenlive pitivi blender-hip libreoffice diff --git a/system/monolith-forgejo-runner.nix b/system/monolith-forgejo-runner.nix new file mode 100644 index 0000000..ee07410 --- /dev/null +++ b/system/monolith-forgejo-runner.nix @@ -0,0 +1,19 @@ +{ pkgs, config, ... }: { + services.gitea-actions-runner = { + package = pkgs.forgejo-actions-runner; + instances.default = { + enable = true; + name = "monolith"; + url = "https://git.lelgenio.com"; + tokenFile = config.age.secrets.monolith-forgejo-runner-token.path; + labels = [ + # provide a debian base with nodejs for actions + "debian-latest:docker://node:18-bullseye" + # fake the ubuntu name, because node provides no ubuntu builds + "ubuntu-latest:docker://node:18-bullseye" + # provide native execution on the host + #"native:host" + ]; + }; + }; +} diff --git a/system/network.nix b/system/network.nix new file mode 100644 index 0000000..c8ebdd9 --- /dev/null +++ b/system/network.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: { + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + # Enable networking + networking.networkmanager.enable = true; + # Open kde connect ports + programs.kdeconnect.enable = true; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + security.rtkit.enable = true; + services.openssh = { + enable = true; + ports = [ 9022 ]; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; + }; + }; +} diff --git a/system/secrets.nix b/system/secrets.nix index 22c5d14..c94581c 100644 --- a/system/secrets.nix +++ b/system/secrets.nix @@ -6,6 +6,8 @@ ../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age; secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file = ../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age; + secrets.monolith-forgejo-runner-token.file = + ../secrets/monolith-forgejo-runner-token.age; secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age; secrets.monolith-nix-serve-privkey.file = diff --git a/system/sound.nix b/system/sound.nix new file mode 100644 index 0000000..3cdbf58 --- /dev/null +++ b/system/sound.nix @@ -0,0 +1,11 @@ +{ pkgs, ... }: { + sound.enable = true; + hardware.pulseaudio.enable = false; + services.pipewire = { + enable = true; + wireplumber.enable = true; + pulse.enable = true; + alsa.enable = true; + jack.enable = true; + }; +} diff --git a/system/steam.nix b/system/steam.nix index 3a60930..ce94c3d 100644 --- a/system/steam.nix +++ b/system/steam.nix @@ -17,4 +17,7 @@ protontricks bottles ]; + + programs.dzgui.enable = true; + programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default; } diff --git a/system/users.nix b/system/users.nix new file mode 100644 index 0000000..2334897 --- /dev/null +++ b/system/users.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: { + security.sudo.wheelNeedsPassword = false; + + # services.getty.autologinUser = "lelgenio"; + programs.fish.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.mutableUsers = false; + users.users.lelgenio = { + isNormalUser = true; + description = "Leonardo Eugênio"; + hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A"; + extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ]; + shell = pkgs.fish; + openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15" + ]; + }; + users.users.root.initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3"; +} diff --git a/update b/update index 89694e6..59bd11a 100755 --- a/update +++ b/update @@ -1,4 +1,4 @@ #!/bin/sh nix flake update --verbose --print-build-logs -./switch +exec ./switch "$@" diff --git a/user/alacritty.nix b/user/alacritty.nix index 313b573..8c7ec22 100644 --- a/user/alacritty.nix +++ b/user/alacritty.nix @@ -31,8 +31,8 @@ in cyan = "${color.normal.cyan}"; white = "${color.normal.white}"; }; + draw_bold_text_with_bright_colors = false; }; - draw_bold_text_with_bright_colors = false; window = { opacity = theme.opacity / 100.0; dynamic_padding = true; @@ -65,7 +65,7 @@ in }]; }; mouse = { hide_when_typing = true; }; - key_bindings = [ + keyboard.bindings = [ { key = lib.toUpper key.up; mode = "Vi|~Search"; diff --git a/user/firefox.nix b/user/firefox.nix index 9c29b25..b60f808 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -28,6 +28,12 @@ in url = "https://addons.mozilla.org/firefox/downloads/file/4198829/ublock_origin-1.54.0.xpi"; hash = "sha256-l5cWCQgZFxD/CFhTa6bcKeytmSPDCyrW0+XjcddZ5E0="; }) + (pkgs.fetchFirefoxAddon { + name = "i-still-dont-care-about-cookies"; + url = "https://github.com/OhMyGuus/I-Still-Dont-Care-About-Cookies/releases/download/v1.1.4/istilldontcareaboutcookies-1.1.4.xpi"; + hash = "sha256-yt6yRiLTuaK4K/QwgkL9gCVGsSa7ndFOHqZvKqIGZ5U="; + }) + (pkgs.fetchFirefoxAddon { name = "vimium_ff"; url = "https://addons.mozilla.org/firefox/downloads/file/4191523/vimium_ff-2.0.6.xpi"; @@ -43,6 +49,11 @@ in url = "https://addons.mozilla.org/firefox/downloads/file/4215691/mastodon_simplified_federation-2.2.xpi"; hash = "sha256-4iU25chpjsdsMTPaa0yQOTWc9V9q1qFz6YV0lYtNjLA="; }) + (pkgs.fetchFirefoxAddon { + name = "substitoot"; + url = "https://addons.mozilla.org/firefox/downloads/file/4236602/substitoot-0.7.2.0.xpi"; + hash = "sha256-1auSqEjkebwRSbmAVUsYwy77dl7TQCOnqgozpoVnqgI="; + }) # Locale (pkgs.fetchFirefoxAddon { diff --git a/user/fish/default.nix b/user/fish/default.nix index 344207e..913e514 100644 --- a/user/fish/default.nix +++ b/user/fish/default.nix @@ -69,7 +69,6 @@ in { programs = { zoxide.enable = true; eza.enable = true; - eza.enableAliases = true; direnv.enable = true; direnv.nix-direnv.enable = true; }; diff --git a/user/git.nix b/user/git.nix index 09be75c..f5392df 100644 --- a/user/git.nix +++ b/user/git.nix @@ -4,6 +4,7 @@ in { config = { programs.git = { enable = true; + lfs.enable = true; extraConfig = { user = { name = username; diff --git a/user/gnome.nix b/user/gnome.nix index 956c1cd..70438c3 100644 --- a/user/gnome.nix +++ b/user/gnome.nix @@ -36,6 +36,8 @@ libsForQt5.qt5ct libsForQt5.qtstyleplugin-kvantum + qt6Packages.qt6ct + qt6Packages.qtstyleplugin-kvantum ]; home.sessionVariables = { QT_QPA_PLATFORMTHEME = "qt5ct"; }; diff --git a/user/gpg.nix b/user/gpg.nix index e215440..5dc20d0 100644 --- a/user/gpg.nix +++ b/user/gpg.nix @@ -4,7 +4,7 @@ enable = true; defaultCacheTtl = 604800; maxCacheTtl = 604800; - pinentryFlavor = "gtk2"; + pinentryPackage = pkgs.pinentry-curses; extraConfig = '' allow-preset-passphrase ''; diff --git a/user/home.nix b/user/home.nix index d55c77b..d7a00a3 100644 --- a/user/home.nix +++ b/user/home.nix @@ -70,7 +70,9 @@ comma # System monitors - btop + (btop.override { + cudaSupport = true; + }) amdgpu_top inxi dmidecode diff --git a/user/kakoune/kak-lsp.toml b/user/kakoune/kak-lsp.toml index 413de9e..3a62a08 100644 --- a/user/kakoune/kak-lsp.toml +++ b/user/kakoune/kak-lsp.toml @@ -7,7 +7,7 @@ verbosity = 2 # set to 0 to disable timeout = 1800 # seconds = 30 minutes -[language.angular] +[language_server.angular] filetypes = ["angular"] roots = [".angular", ".git"] command = "node" @@ -20,134 +20,80 @@ args = [ "--stdio", ] -[language.bash] +[language_server.bash-language-server] filetypes = ["sh"] roots = [".git", ".hg"] command = "bash-language-server" args = ["start"] -[language.c_cpp] +[language_server.clangd] filetypes = ["c", "cpp"] -roots = [ "compile_commands.json", ".clangd", ".git" ] +roots = ["compile_commands.json", ".clangd", ".git", ".hg"] command = "clangd" -[language.crystal] -filetypes = ["crystal"] -roots = ["shard.yml"] -command = "scry" - -[language.css] +[language_server.css-language-server] filetypes = ["css"] -roots = ["package.json"] +roots = ["package.json", ".git", ".hg"] command = "vscode-css-languageserver" args = ["--stdio"] -[language.less] +[language_server.less-language-server] filetypes = ["less"] -roots = ["package.json", ".git"] +roots = ["package.json", ".git", ".hg"] command = "vscode-css-languageserver" args = ["--stdio"] -[language.d] -filetypes = ["d", "di"] -roots = [".git", "dub.sdl", "dub.json"] -command = "dls" - -[language.dart] -# start shell to find path to dart analysis server source -filetypes = ["dart"] -roots = ["pubspec.yaml", ".git"] -command = "sh" -args = ["-c", "dart $(dirname $(which dart))/snapshots/analysis_server.dart.snapshot --lsp"] - -[language.elm] -filetypes = ["elm"] -roots = ["elm.json"] -command = "elm-language-server" -args = ["--stdio"] - -# [language.elm.initialization_options] -# runtime = "node" -# elmPath = "elm" -# elmFormatPath = "elm-format" -# elmTestPath = "elm-test" - -[language.go] -filetypes = ["go"] -roots = ["Gopkg.toml", "go.mod", ".git", ".hg"] -command = "gopls" -offset_encoding = "utf-8" - -[language.haskell] -filetypes = ["haskell"] -roots = ["Setup.hs", "stack.yaml", "*.cabal"] -command = "haskell-language-server-wrapper" -args = ["--lsp"] - -[language.html] +[language_server.html-language-server] filetypes = ["html"] roots = ["package.json"] command = "vscode-html-languageserver" args = ["--stdio"] +settings_section = "_" +[language_server.html-language-server.settings._] +# quotePreference = "single" +# javascript.format.semicolons = "insert" -[language.javascript] -filetypes = ["javascript"] -roots = [".flowconfig"] -command = "flow" -args = ["lsp"] - -[language.typescript] -filetypes = ["typescript"] -roots = ["package.json"] +[language_server.typescript-language-server] +filetypes = ["javascript", "typescript"] +roots = ["package.json", "tsconfig.json", "jsconfig.json", ".git", ".hg"] command = "typescript-language-server" args = ["--stdio"] +settings_section = "_" +[language_server.typescript-language-server.settings._] +# quotePreference = "double" +# typescript.format.semicolons = "insert" -[language.json] +[language_server.json-language-server] filetypes = ["json"] roots = ["package.json"] command = "vscode-json-languageserver" args = ["--stdio"] -[language.latex] -filetypes = ["latex"] -roots = [".git"] -command = "texlab" - -[language.nim] -filetypes = ["nim"] -roots = ["*.nimble", ".git"] -command = "nimlsp" - -[language.nix] +[language_server.nil] filetypes = ["nix"] command = "nil" roots = ["flake.nix", "shell.nix", ".git"] -[language.nix.settings.nil] +[language_server.nil.settings.nil] formatting.command = [ "nixpkgs-fmt" ] -[language.ocaml] -filetypes = ["ocaml"] -roots = ["Makefile", "opam", "*.opam", "dune"] -command = "ocaml-language-server" -args = ["--stdio"] - -[language.php] +[language_server.intelephense] filetypes = ["php"] roots = [".htaccess", "composer.json"] command = "intelephense" args = ["--stdio"] settings_section = "intelephense" -[language.php.settings] -intelephense.format.braces = "k&r" -intelephense.storagePath = "/tmp/intelephense" -intelephense.environment.includePaths = [ +[language_server.intelephense.settings.intelephense] +storagePath = "/tmp/intelephense" + +format.braces = "k&r" +environment.includePaths = [ "./vendor", "./vendor/autoload", "./vendor/laravel/framework/", "./vendor/laravel/framework/src/", "./vendor/laravel/framework/src/Illuminate/" ] -intelephense.files.exclude = [ +files.exclude = [ "**/.git/**", "**/.svn/**", "**/.hg/**", @@ -159,42 +105,9 @@ intelephense.files.exclude = [ "**/resources/views/**" ] -[language.python] -filetypes = ["python"] -roots = ["requirements.txt", "setup.py", ".git", ".hg"] -command = "pyls" -offset_encoding = "utf-8" - -[language.reason] -filetypes = ["reason"] -roots = ["package.json", "Makefile", ".git", ".hg"] -command = "ocaml-language-server" -args = ["--stdio"] - -[language.ruby] -filetypes = ["ruby"] -roots = ["Gemfile"] -command = "solargraph" -args = ["stdio"] - -# [language.rust] -# filetypes = ["rust"] -# roots = ["Cargo.toml"] -# command = "sh" -# args = [ -# "-c", -# """ -# if path=$(rustup which rls 2>/dev/null); then -# "$path" -# else -# rls -# fi -# """, -# ] - -[language.rust] +[language_server.rust-analyzer] filetypes = ["rust"] -roots = ["rust-toolchain.toml", "rust-toolchain", "Cargo.toml"] +roots = ["Cargo.toml"] command = "sh" args = [ "-c", @@ -206,99 +119,37 @@ args = [ fi """, ] -[language.rust.settings.rust-analyzer] -## this can use too much space and processing power -# checkOnSave.extraArgs = ["--target-dir", "./target/check"] +[language_server.rust-analyzer.settings.rust-analyzer] +# See https://rust-analyzer.github.io/manual.html#configuration +# cargo.features = [] checkOnSave.command = "clippy" hoverActions.enable = false # kak-lsp doesn't support this at the moment -# procMacro.enable = true -# cargo.loadOutDirsFromCheck = true -# rustfmt.rangeFormatting.enable = true -# rustfmt.extraArgs = ["+nightly"] -[language.terraform] -filetypes = ["terraform"] -roots = ["*.tf"] -command = "terraform-ls" -args = ["serve"] - -[language.godot] +[language_server.godot] filetypes = ["gd", "gdscript", "gdscript3"] roots = ["project.godot", ".git/"] command = "nc" args = [ "localhost", "6008"] -[language.clojure] -filetypes = ["clojure"] -roots = ["project.clj", ".git/"] -command = "clojure-lsp" -args = [] - - - - -[semantic_scopes] -# Map textmate scopes to kakoune faces for semantic highlighting -# the underscores are translated to dots, and indicate nesting. -# That is, if variable_other_field is omitted, it will try the face for -# variable_other and then variable -# -# To see a list of available scopes in the debug buffer, run lsp-semantic-available-scopes -variable = "variable" -entity_name_function = "function" -entity_name_type = "type" -variable_other_enummember = "variable" -entity_name_namespace = "module" - -[semantic_modifiers] -documentation = "documentation" -readonly = "default+d" - - - -[[semantic_tokens]] -token = "comment" -face = "documentation" -modifiers = ["documentation"] - -[[semantic_tokens]] -token = "comment" -face = "comment" - -[[semantic_tokens]] -token = "function" -face = "function" - -[[semantic_tokens]] -token = "keyword" -face = "keyword" - -[[semantic_tokens]] -token = "namespace" -face = "module" - -[[semantic_tokens]] -token = "operator" -face = "operator" - -[[semantic_tokens]] -token = "string" -face = "string" - -[[semantic_tokens]] -token = "type" -face = "type" - -[[semantic_tokens]] -token = "variable" -face = "default+d" -modifiers = ["readonly"] - -[[semantic_tokens]] -token = "variable" -face = "default+d" -modifiers = ["constant"] - -[[semantic_tokens]] -token = "variable" -face = "variable" +# Semantic tokens support +# See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens +# for the default list of tokens and modifiers. +# However, many language servers implement their own values. +# Make sure to check the output of `lsp-capabilities` and each server's documentation and source code as well. +# Examples: +# - TypeScript: https://github.com/microsoft/vscode-languageserver-node/blob/main/client/src/common/semanticTokens.ts +# - Rust Analyzer: https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs +[semantic_tokens] +faces = [ + {face="documentation", token="comment", modifiers=["documentation"]}, + {face="comment", token="comment"}, + {face="function", token="function"}, + {face="keyword", token="keyword"}, + {face="module", token="namespace"}, + {face="operator", token="operator"}, + {face="string", token="string"}, + {face="type", token="type"}, + {face="default+d", token="variable", modifiers=["readonly"]}, + {face="default+d", token="variable", modifiers=["constant"]}, + {face="variable", token="variable"}, +] diff --git a/user/qutebrowser/default.nix b/user/qutebrowser/default.nix index 467340b..0f2914a 100644 --- a/user/qutebrowser/default.nix +++ b/user/qutebrowser/default.nix @@ -10,7 +10,7 @@ in ]; config = { - programs.qutebrowser = { + programs.qutebrowser = lib.mkIf (browser == "qutebrowser") { enable = true; # enableDefaultBindings = false; keyBindings = { diff --git a/user/ssh.nix b/user/ssh.nix index a29dded..8230dc1 100644 --- a/user/ssh.nix +++ b/user/ssh.nix @@ -6,12 +6,12 @@ in { programs.ssh.matchBlocks = { monolith = { user = "lelgenio"; - hostname = "lelgenio.1337.cx"; + hostname = "monolith.lelgenio.com"; port = 9022; }; phantom = { user = "root"; - hostname = "phantom.lelgenio.xyz"; + hostname = "phantom.lelgenio.com"; port = 9022; }; }; diff --git a/user/sway/default.nix b/user/sway/default.nix index 96790be..7719370 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -21,6 +21,7 @@ in wayland.windowManager.sway = { enable = true; + package = pkgs.mySway; config = { bars = [ ]; @@ -52,7 +53,7 @@ in }; output = { "*" = { - adaptive_sync = "on"; + adaptive_sync = "enabled"; bg = "${theme.background} fill"; mode = "1920x1080@144.000Hz"; }; @@ -89,6 +90,7 @@ in exec ${pkgs.dbus-sway-environment}/bin/dbus-sway-environment exec swaymsg workspace 2 exec_always systemctl --user restart waybar.service + exec corectrl --minimize-systray ''; }; services.gammastep = { @@ -104,7 +106,7 @@ in xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json; home.packages = with pkgs; [ - sway + mySway swaybg swaylock wdisplays diff --git a/user/sway/kanshi.nix b/user/sway/kanshi.nix index edc2e3f..22d9550 100644 --- a/user/sway/kanshi.nix +++ b/user/sway/kanshi.nix @@ -5,29 +5,35 @@ let in { services.kanshi = { - profiles = { - sedetary = { - outputs = [ - { + settings = [ + { + profile = { + name = "sedetary"; + outputs = [ + { + criteria = "eDP-1"; + status = "disable"; + position = "1920,312"; + } + { + criteria = "HDMI-A-1"; + position = "0,0"; + } + ]; + exec = [ "xrdb .Xresources" ]; + }; + } + { + profile = { + name = "nomad"; + outputs = [{ criteria = "eDP-1"; - status = "disable"; + status = "enable"; position = "1920,312"; - } - { - criteria = "HDMI-A-1"; - position = "0,0"; - } - ]; - exec = [ "xrdb .Xresources" ]; - }; - nomad = { - outputs = [{ - criteria = "eDP-1"; - status = "enable"; - position = "1920,312"; - }]; - exec = [ "xrdb .Xresources" ]; - }; - }; + }]; + exec = [ "xrdb .Xresources" ]; + }; + } + ]; }; } diff --git a/user/sway/sway-assigns.nix b/user/sway/sway-assigns.nix index 3731222..ff46238 100644 --- a/user/sway/sway-assigns.nix +++ b/user/sway/sway-assigns.nix @@ -54,11 +54,13 @@ in }; floating = { criteria = [ + { class = "Godot"; } { class = "file_picker"; } { app_id = "file_picker"; } { app_id = "wdisplays"; } { app_id = "pavucontrol"; } { app_id = ".*[Hh]elvum.*"; } + { workspace = "9"; } ]; }; }; diff --git a/user/sway/swaylock.nix b/user/sway/swaylock.nix index dfd99bc..f9f06eb 100644 --- a/user/sway/swaylock.nix +++ b/user/sway/swaylock.nix @@ -5,7 +5,7 @@ let in { programs.swaylock.settings = { - image = theme.background; + image = toString theme.background; font = font.interface; font-size = font.size.medium; indicator-thickness = 20; diff --git a/user/sway/theme.nix b/user/sway/theme.nix index 74b6157..2fc1fc1 100644 --- a/user/sway/theme.nix +++ b/user/sway/theme.nix @@ -33,12 +33,10 @@ lib.mkIf (desktop == "sway") in { gtk4 = shared; gtk3 = shared; } ); - # qt = { - # enable = true; - # platformTheme = "gtk"; - # # style.package = pkgs.libsForQt5.qtstyleplugins; - # # style.name = "gtk2"; - # }; + qt = { + enable = true; + platformTheme.name = "qtct"; + }; dconf.settings = { "org/gnome/desktop/interface" = { @@ -79,10 +77,11 @@ lib.mkIf (desktop == "sway") }; }; - home.sessionVariables = { QT_QPA_PLATFORMTHEME = "gtk3"; }; home.packages = with pkgs; [ libsForQt5.qt5ct libsForQt5.qtstyleplugin-kvantum + qt6Packages.qt6ct + qt6Packages.qtstyleplugin-kvantum pkgs.bibata-cursors pkgs.orchis_theme_compact diff --git a/user/syncthing.nix b/user/syncthing.nix index ff2d4db..8f36eeb 100644 --- a/user/syncthing.nix +++ b/user/syncthing.nix @@ -1,8 +1,9 @@ -{ config, pkgs, lib, inputs, ... }: -let inherit (pkgs.uservars) key theme color accent font; -in { +{ ... }: { services.syncthing = { enable = true; - # tray.enable = true; + tray = { + enable = true; + command = "syncthingtray --wait"; + }; }; } diff --git a/user/variables.nix b/user/variables.nix index 1103e8b..80ac8ba 100644 --- a/user/variables.nix +++ b/user/variables.nix @@ -27,7 +27,7 @@ let icon_theme = "Papirus-Dark"; cursor_theme = "Bibata-Modern-Classic"; - background = "~/.local/share/backgrounds/nixos-dark-pattern.png"; + background = ./backgrounds/nixos-dark-pattern.png; opacity = 95; opacityHex = "ee"; color = { @@ -58,7 +58,7 @@ let icon_theme = "Papirus-Light"; cursor_theme = "Bibata-Modern-Classic"; - background = "~/.local/share/backgrounds/nixos-light-pattern.png"; + background = ./backgrounds/nixos-light-pattern.png; opacity = 95; opacityHex = "ee"; color = {