From 90938796030d9654a9dddca9db28e2cd4361a3dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 9 Dec 2023 12:10:14 -0300 Subject: [PATCH 001/107] switch to nixpkgs unstable --- flake.lock | 387 ++++-------------- flake.nix | 4 +- ...m-generation-after-generation-switch.patch | 27 -- system/configuration.nix | 2 + 4 files changed, 83 insertions(+), 337 deletions(-) delete mode 100644 patches/nixpkgs/fix-steam-generation-after-generation-switch.patch diff --git a/flake.lock b/flake.lock index f25a618..ca0d863 100644 --- a/flake.lock +++ b/flake.lock @@ -38,15 +38,14 @@ "home-manager": "home-manager", "nixpkgs": [ "nixpkgs" - ], - "systems": "systems" + ] }, "locked": { - "lastModified": 1707830867, - "narHash": "sha256-PAdwm5QqdlwIqGrfzzvzZubM+FXtilekQ/FA0cI49/o=", + "lastModified": 1701216516, + "narHash": "sha256-jKSeJn+7hZ1dZdiH1L+NWUGT2i/BGomKAJ54B9kT06Q=", "owner": "ryantm", "repo": "agenix", - "rev": "8cb01a0e717311680e0cbca06a76cbceba6f3ed6", + "rev": "13ac9ac6d68b9a0896e3d43a082947233189e247", "type": "github" }, "original": { @@ -55,22 +54,6 @@ "type": "github" } }, - "blobs": { - "flake": false, - "locked": { - "lastModified": 1604995301, - "narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=", - "owner": "simple-nixos-mailserver", - "repo": "blobs", - "rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265", - "type": "gitlab" - }, - "original": { - "owner": "simple-nixos-mailserver", - "repo": "blobs", - "type": "gitlab" - } - }, "crane": { "inputs": { "flake-compat": "flake-compat", @@ -127,11 +110,11 @@ ] }, "locked": { - "lastModified": 1700795494, - "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", + "lastModified": 1673295039, + "narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", + "rev": "87b9d090ad39b25b2400029c64825fc2a8868943", "type": "github" }, "original": { @@ -205,7 +188,9 @@ "dzgui-nix": { "inputs": { "dzgui": "dzgui", - "nixpkgs": "nixpkgs" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { "lastModified": 1702850463, @@ -305,25 +290,9 @@ "type": "github" } }, - "flake-compat_5": { - "flake": false, - "locked": { - "lastModified": 1668681692, - "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "009399224d5e398d03b22badca40a37ac85412a1", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "inputs": { - "systems": "systems_2" + "systems": "systems" }, "locked": { "lastModified": 1681202837, @@ -359,7 +328,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1681202837, @@ -392,7 +361,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_6" + "systems": "systems_4" }, "locked": { "lastModified": 1681202837, @@ -410,7 +379,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_7" + "systems": "systems_5" }, "locked": { "lastModified": 1681202837, @@ -428,7 +397,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_9" + "systems": "systems_7" }, "locked": { "lastModified": 1694529238, @@ -446,7 +415,7 @@ }, "flake-utils_7": { "inputs": { - "systems": "systems_10" + "systems": "systems_8" }, "locked": { "lastModified": 1681202837, @@ -464,7 +433,7 @@ }, "flake-utils_8": { "inputs": { - "systems": "systems_11" + "systems": "systems_9" }, "locked": { "lastModified": 1681202837, @@ -488,11 +457,11 @@ ] }, "locked": { - "lastModified": 1703113217, - "narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", + "lastModified": 1682203081, + "narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=", "owner": "nix-community", "repo": "home-manager", - "rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", + "rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1", "type": "github" }, "original": { @@ -508,64 +477,35 @@ ] }, "locked": { - "lastModified": 1706981411, - "narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=", + "lastModified": 1703026685, + "narHash": "sha256-AkualfMbc40HkDR2AZc6u71pcap50wDQOXFCY1ULDUA=", "owner": "nix-community", "repo": "home-manager", - "rev": "652fda4ca6dafeb090943422c34ae9145787af37", + "rev": "efc177c15f2a8bb063aeb250fe3c7c21e1de265e", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-23.11", "repo": "home-manager", "type": "github" } }, - "hyprcursor": { - "inputs": { - "hyprlang": "hyprlang", - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1710257359, - "narHash": "sha256-43re5pzE/cswFAgw92/ugsB3+d5ufDaCcLtl9ztKfBo=", - "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "1761f6cefd77f4fcd2039d930c88d6716ddc4974", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprcursor", - "type": "github" - } - }, "hyprland": { "inputs": { - "hyprcursor": "hyprcursor", "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang_2", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_5", + "systems": "systems_3", "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1710864211, - "narHash": "sha256-Uve1/UBnwD4M/9xD0E3XATnLrF8B5vL6MTBhX6Is+TE=", + "lastModified": 1702986956, + "narHash": "sha256-HSXyJxXKqDqaAVoJhvbA+u8iDLS/TuCD6+w4eDqMIeI=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "bcba3951f45f11245d424274130eb3a0ac790d93", + "rev": "d9b74ff96b3e3f0341a386451b9a3375b6f05503", "type": "github" }, "original": { @@ -599,54 +539,6 @@ "type": "github" } }, - "hyprlang": { - "inputs": { - "nixpkgs": [ - "hyprland", - "hyprcursor", - "nixpkgs" - ], - "systems": "systems_4" - }, - "locked": { - "lastModified": 1709914708, - "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprlang_2": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1709914708, - "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, "lipsum": { "flake": false, "locked": { @@ -689,11 +581,11 @@ "material-wifi-icons": { "flake": false, "locked": { - "lastModified": 1703850449, - "narHash": "sha256-KykU5J7SdpBDG+6rkD//XeHd+6pK3qabe+88RduhwKc=", + "lastModified": 1537083724, + "narHash": "sha256-neh+keoYyKum2K1lutE4HKVscA+TeWccikB85osbX/8=", "owner": "dcousens", "repo": "material-wifi-icons", - "rev": "2daf6b3d96d65beb2a3e37a9a53556aab3826d97", + "rev": "d56927c95ca17aa3e0dda15b23840ba3ad3f44cb", "type": "github" }, "original": { @@ -709,11 +601,11 @@ ] }, "locked": { - "lastModified": 1710644923, - "narHash": "sha256-0fjbN5GYYDKPyPay0l8gYoH+tFfNqPPwP5sxxBreeA4=", + "lastModified": 1702864432, + "narHash": "sha256-xR5Igg2hnm979W3YgMDrSjErHFhHo4rbMboF6DC0mbc=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "e25efda85e39fcdc845e371971ac4384989c4295", + "rev": "4605ccd764fac78b9e4b5b058698cb9f04430b91", "type": "github" }, "original": { @@ -724,15 +616,15 @@ }, "nix-software-center": { "inputs": { - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "utils": "utils" }, "locked": { - "lastModified": 1703105285, - "narHash": "sha256-BHoW1RQMc2Auz8paBvTBriKv0F6FI99+3nnz/ELLawg=", + "lastModified": 1693158194, + "narHash": "sha256-jDTKAmei9UgwoVHAskalRilTunWYlWOESNGY4BKscuU=", "owner": "vlinkz", "repo": "nix-software-center", - "rev": "68e87fb6e24fb3e6fe65449918d0cbda96622b65", + "rev": "8faa762f9b710520f8b7f81f4892a6e0aba749dc", "type": "github" }, "original": { @@ -744,15 +636,15 @@ "nixos-conf-editor": { "inputs": { "flake-compat": "flake-compat_3", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "snowfall-lib": "snowfall-lib" }, "locked": { - "lastModified": 1707338010, - "narHash": "sha256-UtLeZzDdk96sLTRcWsGrkWCslNUDytrGe0VmOTB/iig=", + "lastModified": 1698685411, + "narHash": "sha256-N93S17LLkckv25qB/aMdFyfV+sNvhiGyHfFVMczoBs8=", "owner": "vlinkz", "repo": "nixos-conf-editor", - "rev": "27b5e92f580f794c690093503869aab242f075ab", + "rev": "f79009587708571f79b3299898723c131473e2b4", "type": "github" }, "original": { @@ -761,78 +653,7 @@ "type": "github" } }, - "nixos-mailserver": { - "inputs": { - "blobs": "blobs", - "flake-compat": "flake-compat_5", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-23_05": "nixpkgs-23_05", - "nixpkgs-23_11": "nixpkgs-23_11", - "utils": "utils_2" - }, - "locked": { - "lastModified": 1706219574, - "narHash": "sha256-qO+8UErk+bXCq2ybHU4GzXG4Ejk4Tk0rnnTPNyypW4g=", - "owner": "simple-nixos-mailserver", - "repo": "nixos-mailserver", - "rev": "e47f3719f1db3e0961a4358d4cb234a0acaa7baf", - "type": "gitlab" - }, - "original": { - "owner": "simple-nixos-mailserver", - "ref": "nixos-23.11", - "repo": "nixos-mailserver", - "type": "gitlab" - } - }, "nixpkgs": { - "locked": { - "lastModified": 1702539185, - "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixpkgs-unstable", - "type": "indirect" - } - }, - "nixpkgs-23_05": { - "locked": { - "lastModified": 1704290814, - "narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-23.05", - "type": "indirect" - } - }, - "nixpkgs-23_11": { - "locked": { - "lastModified": 1706098335, - "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a77ab169a83a4175169d78684ddd2e54486ac651", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-23.11", - "type": "indirect" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1692638711, "narHash": "sha256-J0LgSFgJVGCC1+j5R2QndadWI1oumusg6hCtYAzLID4=", @@ -848,7 +669,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_2": { "locked": { "lastModified": 1698318101, "narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", @@ -864,18 +685,18 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { - "lastModified": 1710695816, - "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "lastModified": 1702830618, + "narHash": "sha256-lvhwIvRwhOLgzbRuYkqHy4M5cQHYs4ktL6/hyuBS6II=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "rev": "91a00709aebb3602f172a0bf47ba1ef013e34835", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-23.11", + "ref": "nixos-unstable", "type": "indirect" } }, @@ -898,11 +719,11 @@ "ranger-icons": { "flake": false, "locked": { - "lastModified": 1709209315, - "narHash": "sha256-ETE13REDIVuoFIbvWqWvQLj/2fGST+1koowmmuBzGmo=", + "lastModified": 1691165140, + "narHash": "sha256-6JEhyU08QEkGdRW2L00ynRaoaaR5PaiVUccEUbtTQuU=", "owner": "alexanderjeurissen", "repo": "ranger_devicons", - "rev": "ed718dd6a6d5d2c0f53cba8474c5ad96185057e9", + "rev": "de64ab26fb581c00a803381d522c6b3e48b79415", "type": "github" }, "original": { @@ -925,8 +746,7 @@ "nix-index-database": "nix-index-database", "nix-software-center": "nix-software-center", "nixos-conf-editor": "nixos-conf-editor", - "nixos-mailserver": "nixos-mailserver", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", "tlauncher": "tlauncher", @@ -1042,36 +862,6 @@ "type": "github" } }, - "systems_10": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "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, @@ -1088,6 +878,21 @@ } }, "systems_3": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1102,33 +907,18 @@ "type": "github" } }, - "systems_4": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, "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 +1005,7 @@ }, "utils": { "inputs": { - "systems": "systems_8" + "systems": "systems_6" }, "locked": { "lastModified": 1689068808, @@ -1231,21 +1021,6 @@ "type": "github" } }, - "utils_2": { - "locked": { - "lastModified": 1605370193, - "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5021eac20303a61fafe17224c087f5519baed54d", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "wl-crosshair": { "inputs": { "flake-utils": "flake-utils_8", @@ -1271,18 +1046,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1709983277, - "narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=", + "lastModified": 1701368958, + "narHash": "sha256-7kvyoA91etzVEl9mkA/EJfB6z/PltxX7Xc4gcr7/xlo=", "owner": "wlroots", "repo": "wlroots", - "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", + "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", + "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350", "type": "gitlab" } }, @@ -1292,10 +1067,6 @@ "hyprland", "hyprland-protocols" ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], "nixpkgs": [ "hyprland", "nixpkgs" @@ -1306,11 +1077,11 @@ ] }, "locked": { - "lastModified": 1709299639, - "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=", + "lastModified": 1702334919, + "narHash": "sha256-ibOZ3TLjqndGMcj2f+07NFwDWoum4IbzF58byZuJJNg=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "2d2fb547178ec025da643db57d40a971507b82fe", + "rev": "f5c3576c3b6cb1c31a8dfa3e4113f59bfe40cd71", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 2b64fb4..06e915f 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-unstable"; + home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; nix-index-database = { 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/system/configuration.nix b/system/configuration.nix index 3c146b1..76e64c0 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -11,6 +11,8 @@ ./nix.nix ]; + boot.kernelPackages = pkgs.linuxPackages_latest; + zramSwap.enable = true; programs.adb.enable = true; From 6433d484909ab5c2dfa80a457b5cfb7853050c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 22 Dec 2023 22:46:34 -0300 Subject: [PATCH 002/107] update --- flake.lock | 36 ++++++++++++++++++------------------ flake.nix | 10 +--------- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index ca0d863..63013d3 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ ] }, "locked": { - "lastModified": 1701216516, - "narHash": "sha256-jKSeJn+7hZ1dZdiH1L+NWUGT2i/BGomKAJ54B9kT06Q=", + "lastModified": 1703260116, + "narHash": "sha256-ipqShkBmHKC9ft1ZAsA6aeKps32k7+XZSPwfxeHLsAU=", "owner": "ryantm", "repo": "agenix", - "rev": "13ac9ac6d68b9a0896e3d43a082947233189e247", + "rev": "d0d4ad5be611da43da04321f49684ad72d705c7e", "type": "github" }, "original": { @@ -477,11 +477,11 @@ ] }, "locked": { - "lastModified": 1703026685, - "narHash": "sha256-AkualfMbc40HkDR2AZc6u71pcap50wDQOXFCY1ULDUA=", + "lastModified": 1703265279, + "narHash": "sha256-5jVtOwyMH1FzclxHrsFWzBdB+VyjUUSu1wyZhZlR6WU=", "owner": "nix-community", "repo": "home-manager", - "rev": "efc177c15f2a8bb063aeb250fe3c7c21e1de265e", + "rev": "07c322a7cff03267fd881adae1afe63367c5d608", "type": "github" }, "original": { @@ -501,11 +501,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1702986956, - "narHash": "sha256-HSXyJxXKqDqaAVoJhvbA+u8iDLS/TuCD6+w4eDqMIeI=", + "lastModified": 1703271271, + "narHash": "sha256-q6bb5S6l/fEIpO4QRmxACgNfVdTvWktEvKVKWtygzx8=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "d9b74ff96b3e3f0341a386451b9a3375b6f05503", + "rev": "c416880cf96aee783b6a00f356512e5d758e6056", "type": "github" }, "original": { @@ -620,11 +620,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1693158194, - "narHash": "sha256-jDTKAmei9UgwoVHAskalRilTunWYlWOESNGY4BKscuU=", + "lastModified": 1703105285, + "narHash": "sha256-BHoW1RQMc2Auz8paBvTBriKv0F6FI99+3nnz/ELLawg=", "owner": "vlinkz", "repo": "nix-software-center", - "rev": "8faa762f9b710520f8b7f81f4892a6e0aba749dc", + "rev": "68e87fb6e24fb3e6fe65449918d0cbda96622b65", "type": "github" }, "original": { @@ -640,11 +640,11 @@ "snowfall-lib": "snowfall-lib" }, "locked": { - "lastModified": 1698685411, - "narHash": "sha256-N93S17LLkckv25qB/aMdFyfV+sNvhiGyHfFVMczoBs8=", + "lastModified": 1703104726, + "narHash": "sha256-9wD01mLe7tQCzTtLIRzUaAvOKzfPuWPfpCfYkeCsQD0=", "owner": "vlinkz", "repo": "nixos-conf-editor", - "rev": "f79009587708571f79b3299898723c131473e2b4", + "rev": "18dc1d25b2025dc437490c71653429a05f9e0bf2", "type": "github" }, "original": { @@ -687,11 +687,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1702830618, - "narHash": "sha256-lvhwIvRwhOLgzbRuYkqHy4M5cQHYs4ktL6/hyuBS6II=", + "lastModified": 1703013332, + "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "91a00709aebb3602f172a0bf47ba1ef013e34835", + "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 06e915f..3bff3c6 100644 --- a/flake.nix +++ b/flake.nix @@ -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; }; From f68473c6cfd06ae351d72f10dfae14ae2e87e0fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 26 Dec 2023 02:41:54 -0300 Subject: [PATCH 003/107] update --- flake.lock | 114 +++++++++++++++++++++++++++++---------------------- user/gpg.nix | 2 +- 2 files changed, 66 insertions(+), 50 deletions(-) diff --git a/flake.lock b/flake.lock index 63013d3..fa629df 100644 --- a/flake.lock +++ b/flake.lock @@ -38,14 +38,15 @@ "home-manager": "home-manager", "nixpkgs": [ "nixpkgs" - ] + ], + "systems": "systems" }, "locked": { - "lastModified": 1703260116, - "narHash": "sha256-ipqShkBmHKC9ft1ZAsA6aeKps32k7+XZSPwfxeHLsAU=", + "lastModified": 1703433843, + "narHash": "sha256-nmtA4KqFboWxxoOAA6Y1okHbZh+HsXaMPFkYHsoDRDw=", "owner": "ryantm", "repo": "agenix", - "rev": "d0d4ad5be611da43da04321f49684ad72d705c7e", + "rev": "417caa847f9383e111d1397039c9d4337d024bf0", "type": "github" }, "original": { @@ -110,11 +111,11 @@ ] }, "locked": { - "lastModified": 1673295039, - "narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=", + "lastModified": 1700795494, + "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "87b9d090ad39b25b2400029c64825fc2a8868943", + "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", "type": "github" }, "original": { @@ -292,7 +293,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1681202837, @@ -328,7 +329,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1681202837, @@ -361,7 +362,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1681202837, @@ -379,7 +380,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1681202837, @@ -397,7 +398,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_7" + "systems": "systems_8" }, "locked": { "lastModified": 1694529238, @@ -415,7 +416,7 @@ }, "flake-utils_7": { "inputs": { - "systems": "systems_8" + "systems": "systems_9" }, "locked": { "lastModified": 1681202837, @@ -433,7 +434,7 @@ }, "flake-utils_8": { "inputs": { - "systems": "systems_9" + "systems": "systems_10" }, "locked": { "lastModified": 1681202837, @@ -457,11 +458,11 @@ ] }, "locked": { - "lastModified": 1682203081, - "narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=", + "lastModified": 1703113217, + "narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", "owner": "nix-community", "repo": "home-manager", - "rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1", + "rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", "type": "github" }, "original": { @@ -477,11 +478,11 @@ ] }, "locked": { - "lastModified": 1703265279, - "narHash": "sha256-5jVtOwyMH1FzclxHrsFWzBdB+VyjUUSu1wyZhZlR6WU=", + "lastModified": 1703527373, + "narHash": "sha256-AjypRssRtS6F3xkf7rE3/bXkIF2WJOZLbTIspjcE1zM=", "owner": "nix-community", "repo": "home-manager", - "rev": "07c322a7cff03267fd881adae1afe63367c5d608", + "rev": "80679ea5074ab7190c4cce478c600057cfb5edae", "type": "github" }, "original": { @@ -496,16 +497,16 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_3", + "systems": "systems_4", "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1703271271, - "narHash": "sha256-q6bb5S6l/fEIpO4QRmxACgNfVdTvWktEvKVKWtygzx8=", + "lastModified": 1703525245, + "narHash": "sha256-uDkNQgMmmVtTDKvRjO2TmUwlKSV4gwMLGj5pGr3xDIM=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "c416880cf96aee783b6a00f356512e5d758e6056", + "rev": "4f99e805b900b72f5e2bed54a1a44d10c8d54771", "type": "github" }, "original": { @@ -601,11 +602,11 @@ ] }, "locked": { - "lastModified": 1702864432, - "narHash": "sha256-xR5Igg2hnm979W3YgMDrSjErHFhHo4rbMboF6DC0mbc=", + "lastModified": 1703387252, + "narHash": "sha256-XKJqGj0BaEn/zyctEnkgVIh6Ba1rgTRc+UBi9EU8Y54=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "4605ccd764fac78b9e4b5b058698cb9f04430b91", + "rev": "f4340c1a42c38d79293ba69bfd839fbd6268a538", "type": "github" }, "original": { @@ -687,11 +688,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", + "lastModified": 1703255338, + "narHash": "sha256-Z6wfYJQKmDN9xciTwU3cOiOk+NElxdZwy/FiHctCzjU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", + "rev": "6df37dc6a77654682fe9f071c62b4242b5342e04", "type": "github" }, "original": { @@ -862,6 +863,21 @@ "type": "github" } }, + "systems_10": { + "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, @@ -878,21 +894,6 @@ } }, "systems_3": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -907,6 +908,21 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, "systems_5": { "locked": { "lastModified": 1681028828, @@ -1005,7 +1021,7 @@ }, "utils": { "inputs": { - "systems": "systems_6" + "systems": "systems_7" }, "locked": { "lastModified": 1689068808, @@ -1077,11 +1093,11 @@ ] }, "locked": { - "lastModified": 1702334919, - "narHash": "sha256-ibOZ3TLjqndGMcj2f+07NFwDWoum4IbzF58byZuJJNg=", + "lastModified": 1703514399, + "narHash": "sha256-VRr5Xc4S/VPr/gU3fiOD3vSIL2+GJ+LUrmFTWTwnTz4=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "f5c3576c3b6cb1c31a8dfa3e4113f59bfe40cd71", + "rev": "0a318a7a217a6402b0b705837cd5b50b0e94b31b", "type": "github" }, "original": { diff --git a/user/gpg.nix b/user/gpg.nix index e215440..a56529e 100644 --- a/user/gpg.nix +++ b/user/gpg.nix @@ -4,7 +4,7 @@ enable = true; defaultCacheTtl = 604800; maxCacheTtl = 604800; - pinentryFlavor = "gtk2"; + pinentryFlavor = "qt"; extraConfig = '' allow-preset-passphrase ''; From 2da1f75abc81203c7486447cf2b3fe909ec51abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 26 Dec 2023 21:10:32 -0300 Subject: [PATCH 004/107] sway: disable adaptive sync --- user/sway/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/sway/default.nix b/user/sway/default.nix index 96790be..84e3b6e 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -52,7 +52,7 @@ in }; output = { "*" = { - adaptive_sync = "on"; + adaptive_sync = "off"; bg = "${theme.background} fill"; mode = "1920x1080@144.000Hz"; }; From 9962f750671f7ebbee19850ac698c0419499d58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 7 Jan 2024 18:40:39 -0300 Subject: [PATCH 005/107] update --- flake.lock | 108 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 78 insertions(+), 30 deletions(-) diff --git a/flake.lock b/flake.lock index fa629df..d1af186 100644 --- a/flake.lock +++ b/flake.lock @@ -189,9 +189,7 @@ "dzgui-nix": { "inputs": { "dzgui": "dzgui", - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1702850463, @@ -478,11 +476,11 @@ ] }, "locked": { - "lastModified": 1703527373, - "narHash": "sha256-AjypRssRtS6F3xkf7rE3/bXkIF2WJOZLbTIspjcE1zM=", + "lastModified": 1704498488, + "narHash": "sha256-yINKdShHrtjdiJhov+q0s3Y3B830ujRoSbHduUNyKag=", "owner": "nix-community", "repo": "home-manager", - "rev": "80679ea5074ab7190c4cce478c600057cfb5edae", + "rev": "51e44a13acea71b36245e8bd8c7db53e0a3e61ee", "type": "github" }, "original": { @@ -502,11 +500,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1703525245, - "narHash": "sha256-uDkNQgMmmVtTDKvRjO2TmUwlKSV4gwMLGj5pGr3xDIM=", + "lastModified": 1704632672, + "narHash": "sha256-roOtCL13u9/UBMyA3DJtSfRD7bn89iKoqPWrZzXQxWM=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "4f99e805b900b72f5e2bed54a1a44d10c8d54771", + "rev": "7904188de9ca631436484cde733ef871f518d962", "type": "github" }, "original": { @@ -540,6 +538,24 @@ "type": "github" } }, + "hyprlang": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1704287638, + "narHash": "sha256-TuRXJGwtK440AXQNl5eiqmQqY4LZ/9+z/R7xC0ie3iA=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "6624f2bb66d4d27975766e81f77174adbe58ec97", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, "lipsum": { "flake": false, "locked": { @@ -582,11 +598,11 @@ "material-wifi-icons": { "flake": false, "locked": { - "lastModified": 1537083724, - "narHash": "sha256-neh+keoYyKum2K1lutE4HKVscA+TeWccikB85osbX/8=", + "lastModified": 1703850449, + "narHash": "sha256-KykU5J7SdpBDG+6rkD//XeHd+6pK3qabe+88RduhwKc=", "owner": "dcousens", "repo": "material-wifi-icons", - "rev": "d56927c95ca17aa3e0dda15b23840ba3ad3f44cb", + "rev": "2daf6b3d96d65beb2a3e37a9a53556aab3826d97", "type": "github" }, "original": { @@ -602,11 +618,11 @@ ] }, "locked": { - "lastModified": 1703387252, - "narHash": "sha256-XKJqGj0BaEn/zyctEnkgVIh6Ba1rgTRc+UBi9EU8Y54=", + "lastModified": 1704596958, + "narHash": "sha256-BK3Ohsz7m8X6qVKFxDtr8KVcHipfr5hYE9PDIJevHbQ=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "f4340c1a42c38d79293ba69bfd839fbd6268a538", + "rev": "f46800ac5a6e9f892fe36e50821c5d85794ecc62", "type": "github" }, "original": { @@ -617,7 +633,7 @@ }, "nix-software-center": { "inputs": { - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_3", "utils": "utils" }, "locked": { @@ -637,7 +653,7 @@ "nixos-conf-editor": { "inputs": { "flake-compat": "flake-compat_3", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_4", "snowfall-lib": "snowfall-lib" }, "locked": { @@ -655,6 +671,37 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1702539185, + "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixpkgs-unstable", + "type": "indirect" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1702645756, + "narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1692638711, "narHash": "sha256-J0LgSFgJVGCC1+j5R2QndadWI1oumusg6hCtYAzLID4=", @@ -670,7 +717,7 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_4": { "locked": { "lastModified": 1698318101, "narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", @@ -686,13 +733,13 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_5": { "locked": { - "lastModified": 1703255338, - "narHash": "sha256-Z6wfYJQKmDN9xciTwU3cOiOk+NElxdZwy/FiHctCzjU=", + "lastModified": 1704194953, + "narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6df37dc6a77654682fe9f071c62b4242b5342e04", + "rev": "bd645e8668ec6612439a9ee7e71f7eac4099d4f6", "type": "github" }, "original": { @@ -747,7 +794,7 @@ "nix-index-database": "nix-index-database", "nix-software-center": "nix-software-center", "nixos-conf-editor": "nixos-conf-editor", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_5", "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", "tlauncher": "tlauncher", @@ -1062,18 +1109,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1701368958, - "narHash": "sha256-7kvyoA91etzVEl9mkA/EJfB6z/PltxX7Xc4gcr7/xlo=", + "lastModified": 1703963193, + "narHash": "sha256-ke8drv6PTrdQDruWbajrRJffP9A9PU6FRyjJGNZRTs4=", "owner": "wlroots", "repo": "wlroots", - "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350", + "rev": "f81c3d93cd6f61b20ae784297679283438def8df", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350", + "rev": "f81c3d93cd6f61b20ae784297679283438def8df", "type": "gitlab" } }, @@ -1083,6 +1130,7 @@ "hyprland", "hyprland-protocols" ], + "hyprlang": "hyprlang", "nixpkgs": [ "hyprland", "nixpkgs" @@ -1093,11 +1141,11 @@ ] }, "locked": { - "lastModified": 1703514399, - "narHash": "sha256-VRr5Xc4S/VPr/gU3fiOD3vSIL2+GJ+LUrmFTWTwnTz4=", + "lastModified": 1704400467, + "narHash": "sha256-IsEAKBCorRlN53FwFAMbyGLRsPVu/ZrWEJtCwykPds8=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "0a318a7a217a6402b0b705837cd5b50b0e94b31b", + "rev": "1c802128f6cc3db29a8ef01552b1a22f894eeefd", "type": "github" }, "original": { From 304bb4d64441ba59b649132812fb3001492afed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 31 Jan 2024 17:35:26 -0300 Subject: [PATCH 006/107] update --- flake.lock | 70 ++++++++++++++++++++++-------------------------------- 1 file changed, 29 insertions(+), 41 deletions(-) diff --git a/flake.lock b/flake.lock index d1af186..be15b30 100644 --- a/flake.lock +++ b/flake.lock @@ -476,11 +476,11 @@ ] }, "locked": { - "lastModified": 1704498488, - "narHash": "sha256-yINKdShHrtjdiJhov+q0s3Y3B830ujRoSbHduUNyKag=", + "lastModified": 1706473109, + "narHash": "sha256-iyuAvpKTsq2u23Cr07RcV5XlfKExrG8gRpF75hf1uVc=", "owner": "nix-community", "repo": "home-manager", - "rev": "51e44a13acea71b36245e8bd8c7db53e0a3e61ee", + "rev": "d634c3abafa454551f2083b054cd95c3f287be61", "type": "github" }, "original": { @@ -500,11 +500,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1704632672, - "narHash": "sha256-roOtCL13u9/UBMyA3DJtSfRD7bn89iKoqPWrZzXQxWM=", + "lastModified": 1706571425, + "narHash": "sha256-VwVUPb5vuy4GGUx1XMhDMaKk9n8Gs5xUTG9CItoHL04=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "7904188de9ca631436484cde733ef871f518d962", + "rev": "3ff59e7e1d859daa503b88ef125d087bc100abfe", "type": "github" }, "original": { @@ -540,7 +540,11 @@ }, "hyprlang": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": [ + "hyprland", + "xdph", + "nixpkgs" + ] }, "locked": { "lastModified": 1704287638, @@ -618,11 +622,11 @@ ] }, "locked": { - "lastModified": 1704596958, - "narHash": "sha256-BK3Ohsz7m8X6qVKFxDtr8KVcHipfr5hYE9PDIJevHbQ=", + "lastModified": 1706411424, + "narHash": "sha256-BzziJYucEZvdCE985vjPoo3ztWcmUiSQ1wJ2CoT6jCc=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "f46800ac5a6e9f892fe36e50821c5d85794ecc62", + "rev": "c782f2a4f6fc94311ab5ef31df2f1149a1856181", "type": "github" }, "original": { @@ -633,7 +637,7 @@ }, "nix-software-center": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "utils": "utils" }, "locked": { @@ -653,7 +657,7 @@ "nixos-conf-editor": { "inputs": { "flake-compat": "flake-compat_3", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "snowfall-lib": "snowfall-lib" }, "locked": { @@ -686,22 +690,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1702645756, - "narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1692638711, "narHash": "sha256-J0LgSFgJVGCC1+j5R2QndadWI1oumusg6hCtYAzLID4=", @@ -717,7 +705,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1698318101, "narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", @@ -733,13 +721,13 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { - "lastModified": 1704194953, - "narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=", + "lastModified": 1706371002, + "narHash": "sha256-dwuorKimqSYgyu8Cw6ncKhyQjUDOyuXoxDTVmAXq88s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bd645e8668ec6612439a9ee7e71f7eac4099d4f6", + "rev": "c002c6aa977ad22c60398daaa9be52f2203d0006", "type": "github" }, "original": { @@ -794,7 +782,7 @@ "nix-index-database": "nix-index-database", "nix-software-center": "nix-software-center", "nixos-conf-editor": "nixos-conf-editor", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", "tlauncher": "tlauncher", @@ -1109,18 +1097,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1703963193, - "narHash": "sha256-ke8drv6PTrdQDruWbajrRJffP9A9PU6FRyjJGNZRTs4=", + "lastModified": 1706359063, + "narHash": "sha256-5HUTG0p+nCJv3cn73AmFHRZdfRV5AD5N43g8xAePSKM=", "owner": "wlroots", "repo": "wlroots", - "rev": "f81c3d93cd6f61b20ae784297679283438def8df", + "rev": "00b869c1a96f300a8f25da95d624524895e0ddf2", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "f81c3d93cd6f61b20ae784297679283438def8df", + "rev": "00b869c1a96f300a8f25da95d624524895e0ddf2", "type": "gitlab" } }, @@ -1141,11 +1129,11 @@ ] }, "locked": { - "lastModified": 1704400467, - "narHash": "sha256-IsEAKBCorRlN53FwFAMbyGLRsPVu/ZrWEJtCwykPds8=", + "lastModified": 1706145785, + "narHash": "sha256-j9MP4fv2U/vdRKAXXc2gyMTmYwVnHP6kHx1/y6jprrU=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "1c802128f6cc3db29a8ef01552b1a22f894eeefd", + "rev": "5a592647587cd20b9692a347df6939b6d371b3bb", "type": "github" }, "original": { From dbc16a31b6d2e1d7d79f5813a7dcb09f5fcfc665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 8 Feb 2024 23:54:47 -0300 Subject: [PATCH 007/107] update --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index be15b30..e7be22f 100644 --- a/flake.lock +++ b/flake.lock @@ -476,11 +476,11 @@ ] }, "locked": { - "lastModified": 1706473109, - "narHash": "sha256-iyuAvpKTsq2u23Cr07RcV5XlfKExrG8gRpF75hf1uVc=", + "lastModified": 1707175763, + "narHash": "sha256-0MKHC6tQ4KEuM5rui6DjKZ/VNiSANB4E+DJ/+wPS1PU=", "owner": "nix-community", "repo": "home-manager", - "rev": "d634c3abafa454551f2083b054cd95c3f287be61", + "rev": "f99eace7c167b8a6a0871849493b1c613d0f1b80", "type": "github" }, "original": { @@ -500,11 +500,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1706571425, - "narHash": "sha256-VwVUPb5vuy4GGUx1XMhDMaKk9n8Gs5xUTG9CItoHL04=", + "lastModified": 1707431350, + "narHash": "sha256-fCt2EOgBdpS4DslBsFJBhmQCvkV97tFxS6KWFaAd7SQ=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "3ff59e7e1d859daa503b88ef125d087bc100abfe", + "rev": "289d4241bea72ebd891e037996ec4ffd356aadc8", "type": "github" }, "original": { @@ -622,11 +622,11 @@ ] }, "locked": { - "lastModified": 1706411424, - "narHash": "sha256-BzziJYucEZvdCE985vjPoo3ztWcmUiSQ1wJ2CoT6jCc=", + "lastModified": 1707016097, + "narHash": "sha256-V4lHr6hFQ3rK650dh64Xffxsf4kse9vUYWsM+ldjkco=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "c782f2a4f6fc94311ab5ef31df2f1149a1856181", + "rev": "3e3dad2808379c522138e2e8b0eb73500721a237", "type": "github" }, "original": { @@ -661,11 +661,11 @@ "snowfall-lib": "snowfall-lib" }, "locked": { - "lastModified": 1703104726, - "narHash": "sha256-9wD01mLe7tQCzTtLIRzUaAvOKzfPuWPfpCfYkeCsQD0=", + "lastModified": 1707338010, + "narHash": "sha256-UtLeZzDdk96sLTRcWsGrkWCslNUDytrGe0VmOTB/iig=", "owner": "vlinkz", "repo": "nixos-conf-editor", - "rev": "18dc1d25b2025dc437490c71653429a05f9e0bf2", + "rev": "27b5e92f580f794c690093503869aab242f075ab", "type": "github" }, "original": { @@ -723,11 +723,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1706371002, - "narHash": "sha256-dwuorKimqSYgyu8Cw6ncKhyQjUDOyuXoxDTVmAXq88s=", + "lastModified": 1707268954, + "narHash": "sha256-2en1kvde3cJVc3ZnTy8QeD2oKcseLFjYPLKhIGDanQ0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c002c6aa977ad22c60398daaa9be52f2203d0006", + "rev": "f8e2ebd66d097614d51a56a755450d4ae1632df1", "type": "github" }, "original": { @@ -755,11 +755,11 @@ "ranger-icons": { "flake": false, "locked": { - "lastModified": 1691165140, - "narHash": "sha256-6JEhyU08QEkGdRW2L00ynRaoaaR5PaiVUccEUbtTQuU=", + "lastModified": 1707118400, + "narHash": "sha256-HLeiV3c+8fl3kiht01s3H/HGPABPC2033rMB/uXKwLM=", "owner": "alexanderjeurissen", "repo": "ranger_devicons", - "rev": "de64ab26fb581c00a803381d522c6b3e48b79415", + "rev": "2c3c19dffb4238d01c74515c9eed5088066db243", "type": "github" }, "original": { From 58378e229633ea432a81927ac265e941f8510f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 9 Feb 2024 00:24:20 -0300 Subject: [PATCH 008/107] update renamed xkb config --- system/configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/configuration.nix b/system/configuration.nix index 76e64c0..189fa1c 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -40,9 +40,9 @@ # services.xserver.displayManager.autologin.user = "lelgenio"; # Configure keymap in X11 - services.xserver = { + services.xserver.xkb = { layout = "us"; - xkbVariant = "colemak"; + variant = "colemak"; }; console.keyMap = "colemak"; # Enable CUPS to print documents. From f6385e2cc21c1bd36d5117d18ce0d6094613992d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 10 Feb 2024 17:50:58 -0300 Subject: [PATCH 009/107] alacritty: update config --- user/alacritty.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"; From d038e59d3f603201d7f2e9cbb78a63e5394f7672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 16 Feb 2024 01:17:58 -0300 Subject: [PATCH 010/107] kak-lsp: update config to new format --- user/kakoune/kak-lsp.toml | 263 +++++++++----------------------------- 1 file changed, 57 insertions(+), 206 deletions(-) diff --git a/user/kakoune/kak-lsp.toml b/user/kakoune/kak-lsp.toml index 413de9e..ef96bc4 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.rnix-lsp] filetypes = ["nix"] command = "nil" roots = ["flake.nix", "shell.nix", ".git"] [language.nix.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"}, +] From c4def671a07a1e9d0f156cc1b2d3058e52cdc8cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 17 Feb 2024 20:06:09 -0300 Subject: [PATCH 011/107] update --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index e7be22f..01252a1 100644 --- a/flake.lock +++ b/flake.lock @@ -42,11 +42,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1703433843, - "narHash": "sha256-nmtA4KqFboWxxoOAA6Y1okHbZh+HsXaMPFkYHsoDRDw=", + "lastModified": 1707830867, + "narHash": "sha256-PAdwm5QqdlwIqGrfzzvzZubM+FXtilekQ/FA0cI49/o=", "owner": "ryantm", "repo": "agenix", - "rev": "417caa847f9383e111d1397039c9d4337d024bf0", + "rev": "8cb01a0e717311680e0cbca06a76cbceba6f3ed6", "type": "github" }, "original": { @@ -476,11 +476,11 @@ ] }, "locked": { - "lastModified": 1707175763, - "narHash": "sha256-0MKHC6tQ4KEuM5rui6DjKZ/VNiSANB4E+DJ/+wPS1PU=", + "lastModified": 1708031129, + "narHash": "sha256-EH20hJfNnc1/ODdDVat9B7aKm0B95L3YtkIRwKLvQG8=", "owner": "nix-community", "repo": "home-manager", - "rev": "f99eace7c167b8a6a0871849493b1c613d0f1b80", + "rev": "3d6791b3897b526c82920a2ab5f61d71985b3cf8", "type": "github" }, "original": { @@ -500,11 +500,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1707431350, - "narHash": "sha256-fCt2EOgBdpS4DslBsFJBhmQCvkV97tFxS6KWFaAd7SQ=", + "lastModified": 1708186866, + "narHash": "sha256-xkTtBVu9uJvTet0IRVD/FYosB1LrFQhL37qVM+P1Hq0=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "289d4241bea72ebd891e037996ec4ffd356aadc8", + "rev": "289d952a6ee02f6d54a0899870bbec52ff9a53df", "type": "github" }, "original": { @@ -622,11 +622,11 @@ ] }, "locked": { - "lastModified": 1707016097, - "narHash": "sha256-V4lHr6hFQ3rK650dh64Xffxsf4kse9vUYWsM+ldjkco=", + "lastModified": 1707620986, + "narHash": "sha256-XE0tCSkSVBeJDWhjFwusNInwAhrnp+TloUNUpvnTiLw=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "3e3dad2808379c522138e2e8b0eb73500721a237", + "rev": "0cb4345704123492e6d1f1068629069413c80de0", "type": "github" }, "original": { @@ -723,11 +723,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1707268954, - "narHash": "sha256-2en1kvde3cJVc3ZnTy8QeD2oKcseLFjYPLKhIGDanQ0=", + "lastModified": 1708118438, + "narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f8e2ebd66d097614d51a56a755450d4ae1632df1", + "rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80", "type": "github" }, "original": { @@ -1129,11 +1129,11 @@ ] }, "locked": { - "lastModified": 1706145785, - "narHash": "sha256-j9MP4fv2U/vdRKAXXc2gyMTmYwVnHP6kHx1/y6jprrU=", + "lastModified": 1706521509, + "narHash": "sha256-AInZ50acOJ3wzUwGzNr1TmxGTMx+8j6oSTzz4E7Vbp8=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "5a592647587cd20b9692a347df6939b6d371b3bb", + "rev": "c06fd88b3da492b8f9067be021b9184f7012b5a8", "type": "github" }, "original": { From 4030cf19e9c38a6985daff838d35b0863571db10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 28 Feb 2024 01:00:29 -0300 Subject: [PATCH 012/107] btop: enable gpu monitoring --- hosts/monolith.nix | 1 + user/home.nix | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hosts/monolith.nix b/hosts/monolith.nix index 451a6e7..0ab6229 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -43,6 +43,7 @@ in vaapiVdpau rocm-opencl-icd rocm-opencl-runtime + rocmPackages.rocm-smi ]; programs.corectrl.enable = true; 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 From be38647a3eba4ad6af4d1fba6df5883ea882e872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 15 Mar 2024 19:33:18 -0300 Subject: [PATCH 013/107] update --- flake.lock | 61 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index 01252a1..652a398 100644 --- a/flake.lock +++ b/flake.lock @@ -476,11 +476,11 @@ ] }, "locked": { - "lastModified": 1708031129, - "narHash": "sha256-EH20hJfNnc1/ODdDVat9B7aKm0B95L3YtkIRwKLvQG8=", + "lastModified": 1709764752, + "narHash": "sha256-+lM4J4JoJeiN8V+3WSWndPHj1pJ9Jc1UMikGbXLqCTk=", "owner": "nix-community", "repo": "home-manager", - "rev": "3d6791b3897b526c82920a2ab5f61d71985b3cf8", + "rev": "cf111d1a849ddfc38e9155be029519b0e2329615", "type": "github" }, "original": { @@ -492,6 +492,7 @@ "hyprland": { "inputs": { "hyprland-protocols": "hyprland-protocols", + "hyprlang": "hyprlang", "nixpkgs": [ "nixpkgs" ], @@ -500,11 +501,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1708186866, - "narHash": "sha256-xkTtBVu9uJvTet0IRVD/FYosB1LrFQhL37qVM+P1Hq0=", + "lastModified": 1709818078, + "narHash": "sha256-U/o8d5E+0GlTUFNkAzt56wHlUHfoIg3sZPer+GywDFQ=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "289d952a6ee02f6d54a0899870bbec52ff9a53df", + "rev": "6c4e2489a0a153ac2a92744ecb2985280c97fc89", "type": "github" }, "original": { @@ -542,16 +543,19 @@ "inputs": { "nixpkgs": [ "hyprland", - "xdph", "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" ] }, "locked": { - "lastModified": 1704287638, - "narHash": "sha256-TuRXJGwtK440AXQNl5eiqmQqY4LZ/9+z/R7xC0ie3iA=", + "lastModified": 1709775675, + "narHash": "sha256-G+gIMUQBtfbbrnsM/OPJzebdqKFP6typplNCE7X8Szw=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "6624f2bb66d4d27975766e81f77174adbe58ec97", + "rev": "f1db1a7e1faee2a5c67d03b6bd283da82eed3730", "type": "github" }, "original": { @@ -622,11 +626,11 @@ ] }, "locked": { - "lastModified": 1707620986, - "narHash": "sha256-XE0tCSkSVBeJDWhjFwusNInwAhrnp+TloUNUpvnTiLw=", + "lastModified": 1709708644, + "narHash": "sha256-XAFOkZ6yexsqeJrCXWoHxopq0i+7ZqbwATXomMnGmr4=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "0cb4345704123492e6d1f1068629069413c80de0", + "rev": "94a1e46434736a40f976a454f8bd3ea2144f349b", "type": "github" }, "original": { @@ -723,11 +727,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1708118438, - "narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=", + "lastModified": 1709703039, + "narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80", + "rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d", "type": "github" }, "original": { @@ -755,11 +759,11 @@ "ranger-icons": { "flake": false, "locked": { - "lastModified": 1707118400, - "narHash": "sha256-HLeiV3c+8fl3kiht01s3H/HGPABPC2033rMB/uXKwLM=", + "lastModified": 1709209315, + "narHash": "sha256-ETE13REDIVuoFIbvWqWvQLj/2fGST+1koowmmuBzGmo=", "owner": "alexanderjeurissen", "repo": "ranger_devicons", - "rev": "2c3c19dffb4238d01c74515c9eed5088066db243", + "rev": "ed718dd6a6d5d2c0f53cba8474c5ad96185057e9", "type": "github" }, "original": { @@ -1097,18 +1101,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1706359063, - "narHash": "sha256-5HUTG0p+nCJv3cn73AmFHRZdfRV5AD5N43g8xAePSKM=", + "lastModified": 1708558866, + "narHash": "sha256-Mz6hCtommq7RQfcPnxLINigO4RYSNt23HeJHC6mVmWI=", "owner": "wlroots", "repo": "wlroots", - "rev": "00b869c1a96f300a8f25da95d624524895e0ddf2", + "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "00b869c1a96f300a8f25da95d624524895e0ddf2", + "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", "type": "gitlab" } }, @@ -1118,7 +1122,10 @@ "hyprland", "hyprland-protocols" ], - "hyprlang": "hyprlang", + "hyprlang": [ + "hyprland", + "hyprlang" + ], "nixpkgs": [ "hyprland", "nixpkgs" @@ -1129,11 +1136,11 @@ ] }, "locked": { - "lastModified": 1706521509, - "narHash": "sha256-AInZ50acOJ3wzUwGzNr1TmxGTMx+8j6oSTzz4E7Vbp8=", + "lastModified": 1709299639, + "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "c06fd88b3da492b8f9067be021b9184f7012b5a8", + "rev": "2d2fb547178ec025da643db57d40a971507b82fe", "type": "github" }, "original": { From c6d034a8c87c486b165aba9c7ee7c2bc0f00a521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 15 Mar 2024 23:08:35 -0300 Subject: [PATCH 014/107] lsp: replace rnix-lsp with nil --- user/kakoune/kak-lsp.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/kakoune/kak-lsp.toml b/user/kakoune/kak-lsp.toml index ef96bc4..3a62a08 100644 --- a/user/kakoune/kak-lsp.toml +++ b/user/kakoune/kak-lsp.toml @@ -69,11 +69,11 @@ roots = ["package.json"] command = "vscode-json-languageserver" args = ["--stdio"] -[language_server.rnix-lsp] +[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_server.intelephense] From 19747a92f0fc40205ac33fbe7cc569f0fa901a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 15 Mar 2024 23:08:57 -0300 Subject: [PATCH 015/107] update --- flake.lock | 129 +++++++++++++++++++++++++++++++----------- user/fish/default.nix | 1 - 2 files changed, 97 insertions(+), 33 deletions(-) diff --git a/flake.lock b/flake.lock index 652a398..e551703 100644 --- a/flake.lock +++ b/flake.lock @@ -360,7 +360,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1681202837, @@ -378,7 +378,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_6" + "systems": "systems_7" }, "locked": { "lastModified": 1681202837, @@ -396,7 +396,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_8" + "systems": "systems_9" }, "locked": { "lastModified": 1694529238, @@ -414,7 +414,7 @@ }, "flake-utils_7": { "inputs": { - "systems": "systems_9" + "systems": "systems_10" }, "locked": { "lastModified": 1681202837, @@ -432,7 +432,7 @@ }, "flake-utils_8": { "inputs": { - "systems": "systems_10" + "systems": "systems_11" }, "locked": { "lastModified": 1681202837, @@ -476,11 +476,11 @@ ] }, "locked": { - "lastModified": 1709764752, - "narHash": "sha256-+lM4J4JoJeiN8V+3WSWndPHj1pJ9Jc1UMikGbXLqCTk=", + "lastModified": 1710532761, + "narHash": "sha256-SUXGZNrXX05YA9G6EmgupxhOr3swI1gcxLUeDMUhrEY=", "owner": "nix-community", "repo": "home-manager", - "rev": "cf111d1a849ddfc38e9155be029519b0e2329615", + "rev": "206f457fffdb9a73596a4cb2211a471bd305243d", "type": "github" }, "original": { @@ -489,23 +489,50 @@ "type": "github" } }, + "hyprcursor": { + "inputs": { + "hyprlang": "hyprlang", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1710257359, + "narHash": "sha256-43re5pzE/cswFAgw92/ugsB3+d5ufDaCcLtl9ztKfBo=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "1761f6cefd77f4fcd2039d930c88d6716ddc4974", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, "hyprland": { "inputs": { + "hyprcursor": "hyprcursor", "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang", + "hyprlang": "hyprlang_2", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_4", + "systems": "systems_5", "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1709818078, - "narHash": "sha256-U/o8d5E+0GlTUFNkAzt56wHlUHfoIg3sZPer+GywDFQ=", + "lastModified": 1710538160, + "narHash": "sha256-p5Wkl2rXjFftd+Nugiq71BgGAl4E9byYxKV0ahLTo+U=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "6c4e2489a0a153ac2a92744ecb2985280c97fc89", + "rev": "2a2da6082e5f1501731004b755d35a8dbb605fde", "type": "github" }, "original": { @@ -540,6 +567,29 @@ } }, "hyprlang": { + "inputs": { + "nixpkgs": [ + "hyprland", + "hyprcursor", + "nixpkgs" + ], + "systems": "systems_4" + }, + "locked": { + "lastModified": 1709914708, + "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlang_2": { "inputs": { "nixpkgs": [ "hyprland", @@ -551,11 +601,11 @@ ] }, "locked": { - "lastModified": 1709775675, - "narHash": "sha256-G+gIMUQBtfbbrnsM/OPJzebdqKFP6typplNCE7X8Szw=", + "lastModified": 1709914708, + "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "f1db1a7e1faee2a5c67d03b6bd283da82eed3730", + "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", "type": "github" }, "original": { @@ -626,11 +676,11 @@ ] }, "locked": { - "lastModified": 1709708644, - "narHash": "sha256-XAFOkZ6yexsqeJrCXWoHxopq0i+7ZqbwATXomMnGmr4=", + "lastModified": 1710120787, + "narHash": "sha256-tlLuB73OCOKtU2j83bQzSYFyzjJo3rjpITZE5MoofG8=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "94a1e46434736a40f976a454f8bd3ea2144f349b", + "rev": "e76ff2df6bfd2abe06abd8e7b9f217df941c1b07", "type": "github" }, "original": { @@ -727,11 +777,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1709703039, - "narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=", + "lastModified": 1710451336, + "narHash": "sha256-pP86Pcfu3BrAvRO7R64x7hs+GaQrjFes+mEPowCfkxY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d", + "rev": "d691274a972b3165335d261cc4671335f5c67de9", "type": "github" }, "original": { @@ -917,6 +967,21 @@ "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, @@ -964,16 +1029,16 @@ }, "systems_5": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -1060,7 +1125,7 @@ }, "utils": { "inputs": { - "systems": "systems_7" + "systems": "systems_8" }, "locked": { "lastModified": 1689068808, @@ -1101,18 +1166,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1708558866, - "narHash": "sha256-Mz6hCtommq7RQfcPnxLINigO4RYSNt23HeJHC6mVmWI=", + "lastModified": 1709983277, + "narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=", "owner": "wlroots", "repo": "wlroots", - "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", + "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", + "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", "type": "gitlab" } }, 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; }; From cfc7e5c9a293d55fdb83f56c472b8a5460111e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 15 Mar 2024 23:10:43 -0300 Subject: [PATCH 016/107] gpg: simplify config --- user/gpg.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/gpg.nix b/user/gpg.nix index a56529e..5dc20d0 100644 --- a/user/gpg.nix +++ b/user/gpg.nix @@ -4,7 +4,7 @@ enable = true; defaultCacheTtl = 604800; maxCacheTtl = 604800; - pinentryFlavor = "qt"; + pinentryPackage = pkgs.pinentry-curses; extraConfig = '' allow-preset-passphrase ''; From 7f1cf4f686e15153cf40e296430cf384b936ca8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 16 Mar 2024 00:23:11 -0300 Subject: [PATCH 017/107] mangohud: install patch to fix keybind crash --- overlays/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/overlays/default.nix b/overlays/default.nix index 6782ca4..b34ed17 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -52,6 +52,14 @@ 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="; + }) + ]; + }); }); variables = (final: prev: { From b8edfec3381228881ec0ea633a392208a3011a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 17 Mar 2024 00:07:13 -0300 Subject: [PATCH 018/107] syncthing: enable tray icon --- user/syncthing.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/user/syncthing.nix b/user/syncthing.nix index ff2d4db..7177ff7 100644 --- a/user/syncthing.nix +++ b/user/syncthing.nix @@ -1,8 +1,6 @@ -{ config, pkgs, lib, inputs, ... }: -let inherit (pkgs.uservars) key theme color accent font; -in { +{ ... }: { services.syncthing = { enable = true; - # tray.enable = true; + tray.enable = true; }; } From dbdf74176f76d464eacf81a7ed73f692da873ddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 17 Mar 2024 00:07:26 -0300 Subject: [PATCH 019/107] theme: improve qt theming --- user/sway/theme.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/user/sway/theme.nix b/user/sway/theme.nix index 74b6157..414a588 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 = "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 From d1a9c95cc392e95749d40e3d02d08906d55744e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 20 Mar 2024 16:11:45 -0300 Subject: [PATCH 020/107] kdenlive: fix theme --- system/media-packages.nix | 2 +- user/gnome.nix | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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/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"; }; From cc23875102527b93b37b3de9579f50a463f7815d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 24 Mar 2024 12:30:09 -0300 Subject: [PATCH 021/107] syncthing: way for tray --- user/syncthing.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/user/syncthing.nix b/user/syncthing.nix index 7177ff7..8f36eeb 100644 --- a/user/syncthing.nix +++ b/user/syncthing.nix @@ -1,6 +1,9 @@ { ... }: { services.syncthing = { enable = true; - tray.enable = true; + tray = { + enable = true; + command = "syncthingtray --wait"; + }; }; } From 8046dc5eedd1e97c472c31177d52b17ed03b8604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 27 Mar 2024 16:46:04 -0300 Subject: [PATCH 022/107] flake: update lockfile --- flake.lock | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/flake.lock b/flake.lock index e551703..9984cc7 100644 --- a/flake.lock +++ b/flake.lock @@ -55,6 +55,22 @@ "type": "github" } }, + "blobs": { + "flake": false, + "locked": { + "lastModified": 1604995301, + "narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=", + "owner": "simple-nixos-mailserver", + "repo": "blobs", + "rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265", + "type": "gitlab" + }, + "original": { + "owner": "simple-nixos-mailserver", + "repo": "blobs", + "type": "gitlab" + } + }, "crane": { "inputs": { "flake-compat": "flake-compat", @@ -289,6 +305,22 @@ "type": "github" } }, + "flake-compat_5": { + "flake": false, + "locked": { + "lastModified": 1668681692, + "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "009399224d5e398d03b22badca40a37ac85412a1", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -728,6 +760,32 @@ "type": "github" } }, + "nixos-mailserver": { + "inputs": { + "blobs": "blobs", + "flake-compat": "flake-compat_5", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-23_05": "nixpkgs-23_05", + "nixpkgs-23_11": "nixpkgs-23_11", + "utils": "utils_2" + }, + "locked": { + "lastModified": 1706219574, + "narHash": "sha256-qO+8UErk+bXCq2ybHU4GzXG4Ejk4Tk0rnnTPNyypW4g=", + "owner": "simple-nixos-mailserver", + "repo": "nixos-mailserver", + "rev": "e47f3719f1db3e0961a4358d4cb234a0acaa7baf", + "type": "gitlab" + }, + "original": { + "owner": "simple-nixos-mailserver", + "ref": "nixos-23.11", + "repo": "nixos-mailserver", + "type": "gitlab" + } + }, "nixpkgs": { "locked": { "lastModified": 1702539185, @@ -743,6 +801,36 @@ "type": "indirect" } }, + "nixpkgs-23_05": { + "locked": { + "lastModified": 1704290814, + "narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-23.05", + "type": "indirect" + } + }, + "nixpkgs-23_11": { + "locked": { + "lastModified": 1706098335, + "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a77ab169a83a4175169d78684ddd2e54486ac651", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-23.11", + "type": "indirect" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1692638711, @@ -836,6 +924,7 @@ "nix-index-database": "nix-index-database", "nix-software-center": "nix-software-center", "nixos-conf-editor": "nixos-conf-editor", + "nixos-mailserver": "nixos-mailserver", "nixpkgs": "nixpkgs_4", "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", @@ -1141,6 +1230,21 @@ "type": "github" } }, + "utils_2": { + "locked": { + "lastModified": 1605370193, + "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5021eac20303a61fafe17224c087f5519baed54d", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "wl-crosshair": { "inputs": { "flake-utils": "flake-utils_8", From 0daf989a4afbcf1fef7b0a4ca1a00c0c327b2c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 6 Apr 2024 20:45:03 -0300 Subject: [PATCH 023/107] sway: add more env vars to dbus activation --- overlays/sway.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ''; From ad99e0ce280dc668c19ec731e1d4d1d4057bd28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 6 Apr 2024 20:45:30 -0300 Subject: [PATCH 024/107] sshd: disable until xz is secure --- system/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/configuration.nix b/system/configuration.nix index 189fa1c..93d828c 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -59,7 +59,7 @@ security.rtkit.enable = true; services.openssh = { - enable = true; + enable = false; ports = [ 9022 ]; settings = { PermitRootLogin = "no"; From 89812dfabd76e4fe7f756591bd69ff3dc77ee6a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 6 Apr 2024 20:51:48 -0300 Subject: [PATCH 025/107] monolith: add forgejo runner --- flake.nix | 1 + secrets/monolith-forgejo-runner-token.age | Bin 0 -> 682 bytes secrets/secrets.nix | 1 + system/monolith-forgejo-runner.nix | 19 +++++++++++++++++++ system/secrets.nix | 2 ++ 5 files changed, 23 insertions(+) create mode 100644 secrets/monolith-forgejo-runner-token.age create mode 100644 system/monolith-forgejo-runner.nix diff --git a/flake.nix b/flake.nix index 3bff3c6..f3a4532 100644 --- a/flake.nix +++ b/flake.nix @@ -123,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/secrets/monolith-forgejo-runner-token.age b/secrets/monolith-forgejo-runner-token.age new file mode 100644 index 0000000000000000000000000000000000000000..aa3deb8968d525267e9c1267b5d556cc19a70f39 GIT binary patch literal 682 zcmYdHPt{G$OD?J`D9Oyv)5|YP*Do{V(zR14F3!*`Do#{zDlf0_Nasp73NNfOP6|n} zNDQ$EOUmv%k*^f4KoRG^b4+ZDy;Bz%k}pNPY(+;F%L_0O$*jfukgurHO{m! zEXpWy%lGv3_b*DzEA%(yN{vXW(l<3K&T%v}a82_sPp%3#4^1sg@y{_buWtZ+*8EG|uV^zt_j$}Dv8ObUnyEVaxC$_NSa$}_Y`EDkcUOicEg-r zSAW_6O^oT4 Date: Wed, 1 May 2024 15:53:07 -0300 Subject: [PATCH 026/107] monolith: enable all features of corectrl --- hosts/monolith.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hosts/monolith.nix b/hosts/monolith.nix index 0ab6229..c5dcece 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -46,7 +46,14 @@ in rocmPackages.rocm-smi ]; - programs.corectrl.enable = true; + programs.corectrl = { + enable = true; + gpuOverclock = { + enable = true; + ppfeaturemask = "0xffffffff"; + }; + }; + virtualisation.virtualbox.host.enable = true; fileSystems."/" = { From 002e6e1ef9c76766c7d47c5f9a6bf3c1d347de3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 10 May 2024 17:29:11 -0300 Subject: [PATCH 027/107] firefox: add substitoot extension --- user/firefox.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/user/firefox.nix b/user/firefox.nix index 9c29b25..49314e4 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -43,6 +43,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 { From d8e654ada8feea91dee63233e1927602dd8e671d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 10 May 2024 19:48:35 -0300 Subject: [PATCH 028/107] update --- flake.lock | 221 ++++++++++------------- overlays/default.nix | 4 - patches/webcord/fix-reading-config.patch | 14 -- system/configuration.nix | 2 +- user/sway/kanshi.nix | 50 ++--- user/sway/swaylock.nix | 2 +- user/sway/theme.nix | 2 +- user/variables.nix | 4 +- 8 files changed, 133 insertions(+), 166 deletions(-) delete mode 100644 patches/webcord/fix-reading-config.patch diff --git a/flake.lock b/flake.lock index 9984cc7..7dc918c 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,11 +491,11 @@ ] }, "locked": { - "lastModified": 1710532761, - "narHash": "sha256-SUXGZNrXX05YA9G6EmgupxhOr3swI1gcxLUeDMUhrEY=", + "lastModified": 1715359697, + "narHash": "sha256-FJYyXqulIbCdsUCTFBTu/bIH4aN+7jzjQAn52Qc6qPg=", "owner": "nix-community", "repo": "home-manager", - "rev": "206f457fffdb9a73596a4cb2211a471bd305243d", + "rev": "f2c5ba5e720fd584d83f2f97399dac0d26ae60b9", "type": "github" }, "original": { @@ -523,7 +506,10 @@ }, "hyprcursor": { "inputs": { - "hyprlang": "hyprlang", + "hyprlang": [ + "hyprland", + "hyprlang" + ], "nixpkgs": [ "hyprland", "nixpkgs" @@ -534,11 +520,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": { @@ -550,21 +536,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": 1710538160, - "narHash": "sha256-p5Wkl2rXjFftd+Nugiq71BgGAl4E9byYxKV0ahLTo+U=", + "lastModified": 1715342341, + "narHash": "sha256-jHCjAwaukNCI7yVsbB8oppl1dUujvFAfRiXaecqWGI0=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "2a2da6082e5f1501731004b755d35a8dbb605fde", + "rev": "38911d6df4977b6b00557cc887eb151d032e505b", "type": "github" }, "original": { @@ -577,10 +562,12 @@ "inputs": { "nixpkgs": [ "hyprland", + "xdph", "nixpkgs" ], "systems": [ "hyprland", + "xdph", "systems" ] }, @@ -602,17 +589,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": { @@ -621,7 +610,7 @@ "type": "github" } }, - "hyprlang_2": { + "hyprwayland-scanner": { "inputs": { "nixpkgs": [ "hyprland", @@ -633,16 +622,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" } }, @@ -708,11 +697,11 @@ ] }, "locked": { - "lastModified": 1710120787, - "narHash": "sha256-tlLuB73OCOKtU2j83bQzSYFyzjJo3rjpITZE5MoofG8=", + "lastModified": 1714878592, + "narHash": "sha256-E68C03sYRsYFsK7wiGHUIJm8IsyPRALOrFoTL0glXnI=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "e76ff2df6bfd2abe06abd8e7b9f217df941c1b07", + "rev": "a362555e9dbd4ecff3bb98969bbdb8f79fe87f10", "type": "github" }, "original": { @@ -723,15 +712,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": { @@ -740,6 +730,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", @@ -788,11 +804,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1702539185, - "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", + "lastModified": 1714562304, + "narHash": "sha256-Mr3U37Rh6tH0FbaDFu0aZDwk9mPAe7ASaqDOGgLqqLU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", + "rev": "bcd44e224fd68ce7d269b4f44d24c2220fd821e7", "type": "github" }, "original": { @@ -865,11 +881,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1710451336, - "narHash": "sha256-pP86Pcfu3BrAvRO7R64x7hs+GaQrjFes+mEPowCfkxY=", + "lastModified": 1715266358, + "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d691274a972b3165335d261cc4671335f5c67de9", + "rev": "f1010e0469db743d14519a1efd37e23f8513d714", "type": "github" }, "original": { @@ -897,11 +913,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": { @@ -1056,21 +1072,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, @@ -1118,16 +1119,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" } }, @@ -1214,7 +1215,7 @@ }, "utils": { "inputs": { - "systems": "systems_8" + "systems": "systems_7" }, "locked": { "lastModified": 1689068808, @@ -1253,11 +1254,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": { @@ -1266,31 +1267,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" @@ -1305,11 +1284,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/overlays/default.nix b/overlays/default.nix index b34ed17..c5d145d 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: { 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/system/configuration.nix b/system/configuration.nix index 93d828c..7c6bbb3 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -99,7 +99,7 @@ }; # Enable touchpad support (enabled default in most desktopManager). - services.xserver.libinput.enable = true; + services.libinput.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. users.mutableUsers = false; 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/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 414a588..2fc1fc1 100644 --- a/user/sway/theme.nix +++ b/user/sway/theme.nix @@ -35,7 +35,7 @@ lib.mkIf (desktop == "sway") ); qt = { enable = true; - platformTheme = "qtct"; + platformTheme.name = "qtct"; }; dconf.settings = { 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 = { From 27bab5a96ada611bf2b8a2ea7e38eb26d820e582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 11 May 2024 18:45:55 -0300 Subject: [PATCH 029/107] sway: make gaming windows floating by default --- user/sway/sway-assigns.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/user/sway/sway-assigns.nix b/user/sway/sway-assigns.nix index 3731222..1ec8cf5 100644 --- a/user/sway/sway-assigns.nix +++ b/user/sway/sway-assigns.nix @@ -59,6 +59,7 @@ in { app_id = "wdisplays"; } { app_id = "pavucontrol"; } { app_id = ".*[Hh]elvum.*"; } + { workspace = "9"; } ]; }; }; From 051eda928a2bd2014db50d62aaf398fcaa68e8a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 15 May 2024 12:46:38 -0300 Subject: [PATCH 030/107] ssh: update hostnames --- user/ssh.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }; }; From 683699c104ce2062c31d71b4d2b3fa95dd9dbeef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 15 May 2024 12:46:54 -0300 Subject: [PATCH 031/107] firefox: add i dont care about cookies --- user/firefox.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/user/firefox.nix b/user/firefox.nix index 49314e4..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"; From e3daa63cfd292c5459ec2483204f03f6dd950d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 16 May 2024 01:17:57 -0300 Subject: [PATCH 032/107] forgejo-runner: update runner token and url --- secrets/monolith-forgejo-runner-token.age | Bin 682 -> 688 bytes system/monolith-forgejo-runner.nix | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/secrets/monolith-forgejo-runner-token.age b/secrets/monolith-forgejo-runner-token.age index aa3deb8968d525267e9c1267b5d556cc19a70f39..fff63ca77be3834049d16ab0bbac97efd8e6b8a8 100644 GIT binary patch delta 660 zcmZ3*x`B0qMtz2xc0s6#dy-FRezu=wxMfQv6vulofrl(t;sk^D8 zcYtANfw!x3M3KHxd6ctziJxa$nxT1?d6i39S&>PSM}0*VS4nz?c|f5>R6w4SYoLXD zx@Tm1X-KGNsE4t)S#gejuCaD*rLmEruaT*FNI-hJYj|Erl8cvLRJfCezE?qIDVLK| zSaPL%ii@RhkatB{kZ-tCh*MZ%PD+7ma7u2ze{fl%XS%yzkg1njVPr^oMpQ;_S)ONr zcZO?~NqxSzlYt*sZgOHygi%JJS-xdyenh!@mT_*Go2g}{Pf@yis&}?=lu4wyVOmak zLAigirG9#Oo{O=Mak686aj;QXYPhx`m!n~%yT4_Xr>S;eKvbG(aGq19satt^Xi9NX zUXXK`qj9FCr$L^NQ+B3zPOf`qj#)@XWng5ac73^HMx?J-KmeDIU!_N2h?kjRaJZps zX0Ur|v0;EquB*0pW{7E$W0YHBKvHmWMWlITXlb^iUy_+$VTD-ge%- delta 654 zcmdnMx{7szMt!wLVu(dpQl7taXpnJAR#;Amg;&0JnL)NeL1d}7zkXn8 zu5o~`S6Qlyab}TQP?%?dQFv;$zbTh*T4lOhh_i=Vrl*^4m`RAEUvQ;UVTG?-uD?fk zdRU-|d03)rTCje4g-@=lai)b~QAUwlzNe?Ze^FXqVZFa0S87C3mAw_}L2k-58Nj)zB1k+;4}Rews^FsCG%JM`VRls%LR&x}%rBaZqNVi)T_mL}009Mo>mb zkXN3eMPhM~iDhb1P)SjxQMyHCsjpEnSCCVpkBM<^xwmI(R*-9kTX0pHNos{hQdV$g zNnl8Ma!#&Uj$=uFWqGEzrMrPyvSqfjc93JaNqw$%v5}>*PZ?K=hp&sJae-fUdSsM| zORzra9C!bt3gqrNoIPIpHEalQbB~DkymhtrKxdpuB(~1hqix4m1B}?a(F~(rM9D? zaeYv*rBP*;t8tdQJ{Om+uC9W6gkhpVVMJ=0ca(l9&ka2lLkYSojWT1(cQ+j?x zS$IZHsdiC_Q7G4Z4~Bks<9laI7f+tQ`pf=rVoa|r&-z~ZeL4Tyac>prm?W08WtkE3 pYaB(=vW#xCy*4Uq4%f?-TO!iavNcxy@lyH4>|zmav$ySR0RTA7-q!#C diff --git a/system/monolith-forgejo-runner.nix b/system/monolith-forgejo-runner.nix index 2fa82b4..ee07410 100644 --- a/system/monolith-forgejo-runner.nix +++ b/system/monolith-forgejo-runner.nix @@ -4,7 +4,7 @@ instances.default = { enable = true; name = "monolith"; - url = "https://git.lelgenio.xyz"; + url = "https://git.lelgenio.com"; tokenFile = config.age.secrets.monolith-forgejo-runner-token.path; labels = [ # provide a debian base with nodejs for actions From 20d324c6920653569c394e12d810b7191555773d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 19 May 2024 01:10:21 -0300 Subject: [PATCH 033/107] sway: enable adaptive sync --- user/sway/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/sway/default.nix b/user/sway/default.nix index 84e3b6e..72a34be 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -52,7 +52,7 @@ in }; output = { "*" = { - adaptive_sync = "off"; + adaptive_sync = "enabled"; bg = "${theme.background} fill"; mode = "1920x1080@144.000Hz"; }; From 51a5a94005046616571fd26d0d7640984e893f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 19 May 2024 01:10:31 -0300 Subject: [PATCH 034/107] monolith: add gpu crash work-around --- hosts/monolith.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/monolith.nix b/hosts/monolith.nix index c5dcece..39ba16f 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/ From c2eb7e090278a865d9471b6532e2033f3080937e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 19 May 2024 15:58:51 -0300 Subject: [PATCH 035/107] update: pass arguments to ./switch --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 "$@" From 27092cfd3a9f6711b9956890de0541f2cbdbf8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 01:03:51 -0300 Subject: [PATCH 036/107] git: enable lfs --- user/git.nix | 1 + 1 file changed, 1 insertion(+) 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; From f16af04aa20a341d095503495e59b344caa2d83a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 01:04:09 -0300 Subject: [PATCH 037/107] sway: autostart corectrl --- user/sway/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/user/sway/default.nix b/user/sway/default.nix index 72a34be..f832aaa 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -89,6 +89,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 = { From 913335f185505d5561d33804566a35812e09d35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 01:04:19 -0300 Subject: [PATCH 038/107] sway: set godot windows to floating --- user/sway/sway-assigns.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/user/sway/sway-assigns.nix b/user/sway/sway-assigns.nix index 1ec8cf5..ff46238 100644 --- a/user/sway/sway-assigns.nix +++ b/user/sway/sway-assigns.nix @@ -54,6 +54,7 @@ in }; floating = { criteria = [ + { class = "Godot"; } { class = "file_picker"; } { app_id = "file_picker"; } { app_id = "wdisplays"; } From 1babb141c22019f14247e98aff2bf12d96386555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 13:38:40 -0300 Subject: [PATCH 039/107] sway: don't require rebuilding sway dependencies --- overlays/default.nix | 10 ++++++---- system/greetd.nix | 1 + user/sway/default.nix | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/overlays/default.nix b/overlays/default.nix index c5d145d..060a0c0 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -44,10 +44,12 @@ --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 { diff --git a/system/greetd.nix b/system/greetd.nix index 72b82c1..8293c64 100644 --- a/system/greetd.nix +++ b/system/greetd.nix @@ -17,6 +17,7 @@ in # enable sway window manager programs.sway = { enable = true; + package = pkgs.mySway; wrapperFeatures.gtk = true; }; diff --git a/user/sway/default.nix b/user/sway/default.nix index f832aaa..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 = [ ]; @@ -105,7 +106,7 @@ in xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json; home.packages = with pkgs; [ - sway + mySway swaybg swaylock wdisplays From 4a2fb17db27a3a59c0585facc334d61ca18f72af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 18:58:28 -0300 Subject: [PATCH 040/107] Revert "sshd: disable until xz is secure" This reverts commit b0d1b2fbff9bc8392da8a5210ca06e3f5fc061fe. --- system/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/configuration.nix b/system/configuration.nix index 7c6bbb3..fbcd724 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -59,7 +59,7 @@ security.rtkit.enable = true; services.openssh = { - enable = false; + enable = true; ports = [ 9022 ]; settings = { PermitRootLogin = "no"; From 898893a072417bfa725bc80a99026ac7cbb692c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 19:43:34 -0300 Subject: [PATCH 041/107] flake: update to 24.05 --- flake.lock | 15 ++++++++------- flake.nix | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 7dc918c..76a2850 100644 --- a/flake.lock +++ b/flake.lock @@ -491,15 +491,16 @@ ] }, "locked": { - "lastModified": 1715359697, - "narHash": "sha256-FJYyXqulIbCdsUCTFBTu/bIH4aN+7jzjQAn52Qc6qPg=", + "lastModified": 1716563886, + "narHash": "sha256-MKSVKxP50gEbdP60G0M5LampyVSIGT8FGGB88nKPmi8=", "owner": "nix-community", "repo": "home-manager", - "rev": "f2c5ba5e720fd584d83f2f97399dac0d26ae60b9", + "rev": "00a86e4f7a6455ad58b7090a931f1c6097e4fcd7", "type": "github" }, "original": { "owner": "nix-community", + "ref": "release-24.05", "repo": "home-manager", "type": "github" } @@ -881,16 +882,16 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1715266358, - "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", + "lastModified": 1716408587, + "narHash": "sha256-el71IUaQdEmntmd51GBpkJs/Hqh6S4dmfmUGP8GQaME=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f1010e0469db743d14519a1efd37e23f8513d714", + "rev": "1a7abfa62e8a36f7f2dbe463722ed9ea31be5e43", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-unstable", + "ref": "nixos-24.05", "type": "indirect" } }, diff --git a/flake.nix b/flake.nix index f3a4532..7b042c9 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,8 @@ { description = "My system config"; inputs = { - nixpkgs.url = "nixpkgs/nixos-unstable"; - home-manager.url = "github:nix-community/home-manager"; + 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 = { From 8936fbb2818d78eb6c29d4024971fad354315493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 19:43:52 -0300 Subject: [PATCH 042/107] monolith: disable virtualbox while it's borked --- hosts/monolith.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/hosts/monolith.nix b/hosts/monolith.nix index 39ba16f..c447c45 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -55,8 +55,6 @@ in }; }; - virtualisation.virtualbox.host.enable = true; - fileSystems."/" = { device = "/dev/disk/by-label/BTRFS_ROOT"; fsType = "btrfs"; From b4c9dfd093eb1d269c4033c40a075d3b5052cc45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 19:44:10 -0300 Subject: [PATCH 043/107] qutebrowser: don't install if not the default browser --- user/qutebrowser/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = { From a0a594541cbbc09af3e263abd91ee15eacead542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 27 May 2024 00:10:11 -0300 Subject: [PATCH 044/107] scripts: add pass export script --- scripts/default.nix | 1 + scripts/pass-export | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100755 scripts/pass-export 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*)?' From c9035360d8096b9fdeb6fad1db9f962527f190e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 27 May 2024 09:44:01 -0300 Subject: [PATCH 045/107] gnome: update autologin config --- system/gnome.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/gnome.nix b/system/gnome.nix index 855f5d5..5af171c 100644 --- a/system/gnome.nix +++ b/system/gnome.nix @@ -8,7 +8,7 @@ services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome.enable = true; - services.xserver.displayManager.autoLogin = { + services.displayManager.autoLogin = { enable = true; user = "lelgenio"; }; From 8f8565e8fbf229b60f1817a984896a2e084e8713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 27 May 2024 11:52:17 -0300 Subject: [PATCH 046/107] kdeconect: update config --- system/configuration.nix | 1 - system/gnome.nix | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/system/configuration.nix b/system/configuration.nix index fbcd724..e72bcff 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -26,7 +26,6 @@ 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"; diff --git a/system/gnome.nix b/system/gnome.nix index 5af171c..cb8c106 100644 --- a/system/gnome.nix +++ b/system/gnome.nix @@ -13,13 +13,17 @@ 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 ]; } From a42a8fd582bc30bedfd79d4a7889d8f9cbfbf302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 27 May 2024 12:29:42 -0300 Subject: [PATCH 047/107] configuration: extract nixos config into more files --- system/bluetooth.nix | 14 +++++ system/configuration.nix | 120 +++------------------------------------ system/containers.nix | 11 ++++ system/fonts.nix | 9 +++ system/locale.nix | 12 ++++ system/network.nix | 24 ++++++++ system/sound.nix | 11 ++++ system/steam.nix | 3 + system/users.nix | 20 +++++++ 9 files changed, 111 insertions(+), 113 deletions(-) create mode 100644 system/bluetooth.nix create mode 100644 system/containers.nix create mode 100644 system/fonts.nix create mode 100644 system/locale.nix create mode 100644 system/network.nix create mode 100644 system/sound.nix create mode 100644 system/users.nix 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 e72bcff..130ca7d 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -9,6 +9,13 @@ ./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; @@ -18,108 +25,9 @@ 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; - - # 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.xkb = { - layout = "us"; - variant = "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.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; - packages.media-packages.enable = true; environment.systemPackages = with pkgs; [ pavucontrol @@ -130,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/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/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/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"; +} From 9ac0da0575db104c77230fe6542af7fa5d6dada2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 30 May 2024 16:53:51 -0300 Subject: [PATCH 048/107] monolith: add docker subvolume --- hosts/monolith.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hosts/monolith.nix b/hosts/monolith.nix index c447c45..22144c3 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -115,6 +115,12 @@ in fsType = "btrfs"; options = [ "subvol=@projects" "nofail" ] ++ btrfs_options ++ btrfs_ssd; }; + fileSystems."/var/lib/docker" = { + device = "/dev/disk/by-label/BTRFS_BIGBOY"; + fsType = "btrfs"; + options = [ "subvol=@docker" "nofail" ] ++ btrfs_options ++ btrfs_ssd; + }; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction From bf7af32bb3e130150dbc44b4e8bd05741c2aa0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 30 May 2024 16:54:06 -0300 Subject: [PATCH 049/107] nix: lower frequency of gc --- system/nix.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/nix.nix b/system/nix.nix index f9b0a82..38b2eb9 100644 --- a/system/nix.nix +++ b/system/nix.nix @@ -11,8 +11,8 @@ in nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; gc = { automatic = true; - dates = "daily"; - options = "--delete-older-than 3d"; + dates = "weekly"; + options = "--delete-older-than 7d"; }; optimise.automatic = true; settings = { From a7080cf823300701a80ed634cbfa384c47b4bf89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 30 May 2024 16:54:23 -0300 Subject: [PATCH 050/107] kakoune: use rfc-style nixfmt --- user/home.nix | 2 +- user/kakoune/filetypes.kak | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/user/home.nix b/user/home.nix index d7a00a3..39a9ba2 100644 --- a/user/home.nix +++ b/user/home.nix @@ -128,7 +128,7 @@ rust-analyzer # rust analyzer blade-formatter - nixpkgs-fmt + nixfmt-rfc-style ]; fonts.fontconfig.enable = true; diff --git a/user/kakoune/filetypes.kak b/user/kakoune/filetypes.kak index cd93b49..b384bfe 100644 --- a/user/kakoune/filetypes.kak +++ b/user/kakoune/filetypes.kak @@ -12,7 +12,7 @@ hook global WinSetOption filetype=c %{ } hook global WinSetOption filetype=nix %{ - set buffer formatcmd 'nixpkgs-fmt' + set buffer formatcmd 'nixfmt' } hook global BufCreate .*\.html %{ From 3c9e994fa82d845cf786372d55c4667f9252a06a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 30 May 2024 16:54:58 -0300 Subject: [PATCH 051/107] treewide: format using nixfmt-rfc-style --- flake.nix | 77 +++--- hosts/double-rainbow.nix | 35 ++- hosts/i15.nix | 36 ++- hosts/monolith.nix | 76 ++++-- hosts/phantom/default.nix | 16 +- hosts/phantom/email.nix | 13 +- hosts/phantom/forgejo.nix | 7 +- hosts/phantom/hardware-config.nix | 19 +- hosts/phantom/mastodon.nix | 8 +- hosts/phantom/nextcloud.nix | 10 +- hosts/phantom/nginx.nix | 42 ++- hosts/phantom/syncthing.nix | 17 +- hosts/phantom/users.nix | 22 +- hosts/phantom/vpsadminos.nix | 18 +- hosts/phantom/writefreely.nix | 9 +- hosts/pixie.nix | 24 +- hosts/rainbow.nix | 41 ++- overlays/default.nix | 138 +++++----- pkgs/blade-formatter/default.nix | 35 +-- pkgs/cargo-checkmate.nix | 21 +- pkgs/default.nix | 3 +- pkgs/emmet-cli.nix | 7 +- pkgs/lipsum.nix | 5 +- scripts/default.nix | 175 +++++++++---- secrets/secrets.nix | 8 +- system/bluetooth.nix | 7 +- system/boot.nix | 13 +- system/cachix.nix | 8 +- system/configuration.nix | 8 +- system/containers.nix | 3 +- system/fonts.nix | 3 +- system/gamemode.nix | 12 +- system/gitlab-runner.nix | 84 +++--- system/gnome.nix | 18 +- system/greetd.nix | 15 +- system/kde.nix | 3 +- system/locale.nix | 3 +- system/media-packages.nix | 13 +- system/monolith-forgejo-runner.nix | 3 +- system/monolith-gitlab-runner.nix | 10 +- system/network.nix | 3 +- system/nix-serve.nix | 8 +- system/nix.nix | 17 +- system/rainbow-gitlab-runner.nix | 10 +- system/secrets.nix | 21 +- system/sound.nix | 3 +- system/specialisation.nix | 9 +- system/steam.nix | 32 ++- system/thunar.nix | 30 ++- system/users.nix | 13 +- user/alacritty.nix | 73 ++++-- user/bmenu.nix | 15 +- user/chat.nix | 9 +- user/controller.nix | 9 +- user/desktop-entries.nix | 22 +- user/firefox.nix | 16 +- user/fish/default.nix | 56 ++-- user/fzf.nix | 30 ++- user/git.nix | 13 +- user/gnome.nix | 16 +- user/gpg.nix | 17 +- user/helix.nix | 37 ++- user/home.nix | 46 ++-- user/hyprland.nix | 13 +- user/kakoune/colors.nix | 17 +- user/kakoune/default.nix | 61 +++-- user/lf/default.nix | 9 +- user/man.nix | 19 +- user/mangohud.nix | 20 +- user/mimeapps.nix | 29 ++- user/mpd.nix | 8 +- user/mpv.nix | 6 +- user/pass.nix | 13 +- user/pipewire.nix | 8 +- user/pqiv.nix | 35 ++- user/qutebrowser/colors.nix | 80 ++++-- user/qutebrowser/dark-theme.nix | 105 ++++---- user/qutebrowser/default.nix | 17 +- user/qutebrowser/fonts.nix | 1 - user/ranger/default.nix | 9 +- user/rofi.nix | 24 +- user/ssh.nix | 13 +- user/sway/default.nix | 31 ++- user/sway/kanshi.nix | 26 +- user/sway/mako.nix | 18 +- user/sway/sway-assigns.nix | 26 +- user/sway/sway-binds.nix | 99 +++++--- user/sway/sway-modes.nix | 99 +++++--- user/sway/swayidle.nix | 14 +- user/sway/swaylock.nix | 14 +- user/sway/theme.nix | 65 +++-- user/syncthing.nix | 3 +- user/thunar.nix | 8 +- user/vdir.nix | 32 +-- user/vscode/default.nix | 3 +- user/waybar/default.nix | 396 ++++++++++++++++------------- user/xdg-dirs.nix | 8 +- user/zathura.nix | 15 +- 98 files changed, 1925 insertions(+), 989 deletions(-) diff --git a/flake.nix b/flake.nix index 7b042c9..daecf26 100644 --- a/flake.nix +++ b/flake.nix @@ -68,11 +68,14 @@ nixos-conf-editor.url = "github:vlinkz/nixos-conf-editor"; nix-software-center.url = "github:vlinkz/nix-software-center"; }; - outputs = inputs: + outputs = + inputs: let nixpkgsConfig = { inherit system; - config = { allowUnfree = true; }; + config = { + allowUnfree = true; + }; overlays = old_overlays.all; }; @@ -85,32 +88,37 @@ old_overlays = (import ./overlays { inherit packages inputs; }); - specialArgs = { inherit inputs; }; - common_modules = [ - { nixpkgs.pkgs = pkgs; } - ./system/configuration.nix - ./system/secrets.nix - ./system/specialisation.nix - ./system/greetd.nix - { login-manager.greetd.enable = desktop == "sway" || desktop == "hyprland"; } + specialArgs = { + inherit inputs; + }; + common_modules = + [ + { nixpkgs.pkgs = pkgs; } + ./system/configuration.nix + ./system/secrets.nix + ./system/specialisation.nix + ./system/greetd.nix + { login-manager.greetd.enable = desktop == "sway" || desktop == "hyprland"; } - inputs.agenix.nixosModules.default - inputs.hyprland.nixosModules.default - inputs.dzgui-nix.nixosModules.default - { programs.hyprland.enable = (desktop == "hyprland"); } - inputs.home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.lelgenio = import ./user/home.nix; - home-manager.backupFileExtension = "bkp"; - # Optionally, use home-manager.extraSpecialArgs to pass - # arguments to home.nix - home-manager.extraSpecialArgs = { inherit inputs; }; - } - ] - ++ lib.optional (desktop == "gnome") ./system/gnome.nix - ++ lib.optional (desktop == "kde") ./system/kde.nix; + inputs.agenix.nixosModules.default + inputs.hyprland.nixosModules.default + inputs.dzgui-nix.nixosModules.default + { programs.hyprland.enable = (desktop == "hyprland"); } + inputs.home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.lelgenio = import ./user/home.nix; + home-manager.backupFileExtension = "bkp"; + # Optionally, use home-manager.extraSpecialArgs to pass + # arguments to home.nix + home-manager.extraSpecialArgs = { + inherit inputs; + }; + } + ] + ++ lib.optional (desktop == "gnome") ./system/gnome.nix + ++ lib.optional (desktop == "kde") ./system/kde.nix; in { nixosConfigurations = { @@ -144,11 +152,16 @@ }; pixie = lib.nixosSystem { inherit system specialArgs; - modules = [ ./hosts/pixie.nix ] ++ common_modules ++ [{ - packages.media-packages.enable = lib.mkOverride 0 false; - programs.steam.enable = lib.mkOverride 0 false; - services.flatpak.enable = lib.mkOverride 0 false; - }]; + modules = + [ ./hosts/pixie.nix ] + ++ common_modules + ++ [ + { + packages.media-packages.enable = lib.mkOverride 0 false; + programs.steam.enable = lib.mkOverride 0 false; + services.flatpak.enable = lib.mkOverride 0 false; + } + ]; }; phantom = lib.nixosSystem { inherit system specialArgs; diff --git a/hosts/double-rainbow.nix b/hosts/double-rainbow.nix index 7725898..be5dd48 100644 --- a/hosts/double-rainbow.nix +++ b/hosts/double-rainbow.nix @@ -1,13 +1,32 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: let - btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ]; - btrfs_ssd = [ "ssd" "discard=async" ]; + btrfs_options = [ + "compress=zstd:3" + "noatime" + "x-systemd.device-timeout=0" + ]; + btrfs_ssd = [ + "ssd" + "discard=async" + ]; in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usb_storage" + "usbhid" + "sd_mod" + ]; boot.initrd.kernelModules = [ "i915" ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -18,8 +37,7 @@ in options = [ "subvol=@" ] ++ btrfs_options ++ btrfs_ssd; }; - boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device = - "/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964"; + boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device = "/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964"; fileSystems."/boot" = { device = "/dev/disk/by-uuid/97EB-7DB5"; @@ -37,8 +55,7 @@ in nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; networking.hostName = "double-rainbow"; # Define your hostname. } diff --git a/hosts/i15.nix b/hosts/i15.nix index e6f0e75..c318665 100644 --- a/hosts/i15.nix +++ b/hosts/i15.nix @@ -1,15 +1,30 @@ # 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, + ... +}: let - btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ]; + btrfs_options = [ + "compress=zstd:3" + "noatime" + "x-systemd.device-timeout=0" + ]; in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usb_storage" + "sd_mod" + "rtsx_usb_sdmmc" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -45,10 +60,12 @@ in options = [ "subvol=@swap" ] ++ btrfs_options; }; - swapDevices = [{ - device = "/swap/swapfile"; - size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB - }]; + swapDevices = [ + { + device = "/swap/swapfile"; + size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB + } + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -59,7 +76,6 @@ in # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; networking.hostName = "i15"; # Define your hostname. } diff --git a/hosts/monolith.nix b/hosts/monolith.nix index 22144c3..213765b 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -1,21 +1,38 @@ # 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, + ... +}: let - btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ]; - btrfs_ssd = [ "ssd" "discard=async" ]; + btrfs_options = [ + "compress=zstd:3" + "noatime" + "x-systemd.device-timeout=0" + ]; + btrfs_ssd = [ + "ssd" + "discard=async" + ]; in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; hardware.opentabletdriver.enable = true; - boot.extraModulePackages = with config.boot.kernelPackages; [ - zenpower - ]; + boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelModules = [ "kvm-amd" @@ -88,22 +105,34 @@ in fileSystems."/home/lelgenio/Games" = { device = "/dev/disk/by-label/BTRFS_DATA"; fsType = "btrfs"; - options = [ "subvol=@games" "nofail" ] ++ btrfs_options; + options = [ + "subvol=@games" + "nofail" + ] ++ btrfs_options; }; fileSystems."/home/lelgenio/Downloads/Torrents" = { device = "/dev/disk/by-label/BTRFS_DATA"; fsType = "btrfs"; - options = [ "subvol=@torrents" "nofail" ] ++ btrfs_options; + options = [ + "subvol=@torrents" + "nofail" + ] ++ btrfs_options; }; fileSystems."/home/lelgenio/Música" = { device = "/dev/disk/by-label/BTRFS_DATA"; fsType = "btrfs"; - options = [ "subvol=@music" "nofail" ] ++ btrfs_options; + options = [ + "subvol=@music" + "nofail" + ] ++ btrfs_options; }; fileSystems."/home/lelgenio/.local/mount/data" = { device = "/dev/disk/by-label/BTRFS_DATA"; fsType = "btrfs"; - options = [ "subvol=@data" "nofail" ] ++ btrfs_options; + options = [ + "subvol=@data" + "nofail" + ] ++ btrfs_options; }; fileSystems."/home/lelgenio/.local/mount/bigboy" = { device = "/dev/disk/by-label/BTRFS_BIGBOY"; @@ -113,12 +142,18 @@ in fileSystems."/home/lelgenio/projects" = { device = "/dev/disk/by-label/BTRFS_BIGBOY"; fsType = "btrfs"; - options = [ "subvol=@projects" "nofail" ] ++ btrfs_options ++ btrfs_ssd; + options = [ + "subvol=@projects" + "nofail" + ] ++ btrfs_options ++ btrfs_ssd; }; fileSystems."/var/lib/docker" = { device = "/dev/disk/by-label/BTRFS_BIGBOY"; fsType = "btrfs"; - options = [ "subvol=@docker" "nofail" ] ++ btrfs_options ++ btrfs_ssd; + options = [ + "subvol=@docker" + "nofail" + ] ++ btrfs_options ++ btrfs_ssd; }; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -128,8 +163,7 @@ in networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; powerManagement.cpuFreqGovernor = "ondemand"; - hardware.cpu.amd.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; networking.hostName = "monolith"; # Define your hostname. # Fix broken suspend with Logitech USB dongle @@ -146,8 +180,10 @@ in # with the exception of `"subvol=swap"`, the other options are repeated in my other `fileSystem` mounts options = [ "subvol=swap" ] ++ btrfs_options ++ btrfs_ssd; }; - swapDevices = [{ - device = "/swap/swapfile"; - size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB - }]; + swapDevices = [ + { + device = "/swap/swapfile"; + size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB + } + ]; } diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index 32d5544..462e070 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -1,4 +1,10 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ imports = [ ./vpsadminos.nix inputs.agenix.nixosModules.default @@ -49,7 +55,12 @@ enable = true; dates = "04:40"; operation = "switch"; - flags = [ "--update-input" "nixpkgs" "--no-write-lock-file" "-L" ]; + flags = [ + "--update-input" + "nixpkgs" + "--no-write-lock-file" + "-L" + ]; flake = "git+https://git.lelgenio.com/lelgenio/nixos-config#phantom"; }; @@ -57,4 +68,3 @@ system.stateVersion = "23.05"; # Never change this } - diff --git a/hosts/phantom/email.nix b/hosts/phantom/email.nix index e0a135e..23f18fc 100644 --- a/hosts/phantom/email.nix +++ b/hosts/phantom/email.nix @@ -1,10 +1,14 @@ -{ pkgs, inputs, config, ... }: { +{ + pkgs, + inputs, + config, + ... +}: +{ # It's important to let Digital Ocean set the hostname so we get rDNS to work networking.hostName = ""; - imports = [ - inputs.nixos-mailserver.nixosModules.mailserver - ]; + imports = [ inputs.nixos-mailserver.nixosModules.mailserver ]; mailserver = { enable = true; @@ -54,5 +58,4 @@ $config['plugins'] = [ "carddav", "archive" ]; ''; }; - } diff --git a/hosts/phantom/forgejo.nix b/hosts/phantom/forgejo.nix index 61f0a51..eefb003 100644 --- a/hosts/phantom/forgejo.nix +++ b/hosts/phantom/forgejo.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: let cfg = config.services.forgejo; srv = cfg.settings.server; diff --git a/hosts/phantom/hardware-config.nix b/hosts/phantom/hardware-config.nix index 1a89a15..683a684 100644 --- a/hosts/phantom/hardware-config.nix +++ b/hosts/phantom/hardware-config.nix @@ -1,7 +1,14 @@ -{ config, pkgs, inputs, ... }: { - swapDevices = [{ - device = "/swap/swapfile"; - size = (1024 * 2); # 2 GB - }]; +{ + config, + pkgs, + inputs, + ... +}: +{ + swapDevices = [ + { + device = "/swap/swapfile"; + size = (1024 * 2); # 2 GB + } + ]; } - diff --git a/hosts/phantom/mastodon.nix b/hosts/phantom/mastodon.nix index 9d15d6b..f984c65 100644 --- a/hosts/phantom/mastodon.nix +++ b/hosts/phantom/mastodon.nix @@ -1,4 +1,10 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ services.mastodon = { enable = true; configureNginx = true; diff --git a/hosts/phantom/nextcloud.nix b/hosts/phantom/nextcloud.nix index 20c7173..de1bd6d 100644 --- a/hosts/phantom/nextcloud.nix +++ b/hosts/phantom/nextcloud.nix @@ -1,4 +1,10 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ services.nextcloud = { enable = true; package = pkgs.nextcloud27; @@ -22,6 +28,4 @@ group = "nextcloud"; }; }; - } - diff --git a/hosts/phantom/nginx.nix b/hosts/phantom/nginx.nix index 8692134..0153fa6 100644 --- a/hosts/phantom/nginx.nix +++ b/hosts/phantom/nginx.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: +{ services.nginx = { enable = true; recommendedProxySettings = true; @@ -8,21 +14,33 @@ }; # Redirect *lelgenio.xyz -> *lelgenio.com - services.nginx.virtualHosts = lib.mapAttrs' - (key: value: lib.nameValuePair "${key}lelgenio.xyz" value) - ( - lib.genAttrs [ "" "social." "blog." "cloud." "mail." "git." "syncthing." ] (name: { - enableACME = true; - forceSSL = true; - locations."/".return = "301 $scheme://${name}lelgenio.com$request_uri"; - }) - ); + services.nginx.virtualHosts = + lib.mapAttrs' (key: value: lib.nameValuePair "${key}lelgenio.xyz" value) + ( + lib.genAttrs + [ + "" + "social." + "blog." + "cloud." + "mail." + "git." + "syncthing." + ] + (name: { + enableACME = true; + forceSSL = true; + locations."/".return = "301 $scheme://${name}lelgenio.com$request_uri"; + }) + ); security.acme = { acceptTerms = true; defaults.email = "lelgenio@disroot.org"; }; - networking.firewall.allowedTCPPorts = [ 80 443 ]; + networking.firewall.allowedTCPPorts = [ + 80 + 443 + ]; } - diff --git a/hosts/phantom/syncthing.nix b/hosts/phantom/syncthing.nix index 55e4cbc..abbda7d 100644 --- a/hosts/phantom/syncthing.nix +++ b/hosts/phantom/syncthing.nix @@ -1,4 +1,10 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ services.syncthing = { enable = true; @@ -14,11 +20,10 @@ proxyPass = "http://127.0.0.1:8384"; extraConfig = # required when the target is also TLS server with multiple hosts - "proxy_ssl_server_name on;" + - # required when the server wants to use HTTP Authentication - "proxy_pass_header Authorization;" - ; + "proxy_ssl_server_name on;" + + + # required when the server wants to use HTTP Authentication + "proxy_pass_header Authorization;"; }; }; } - diff --git a/hosts/phantom/users.nix b/hosts/phantom/users.nix index 75aee27..6291321 100644 --- a/hosts/phantom/users.nix +++ b/hosts/phantom/users.nix @@ -1,8 +1,12 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ security.rtkit.enable = true; services.openssh = { enable = true; - ports = [ 9022 22 ]; + ports = [ + 9022 + 22 + ]; settings = { PasswordAuthentication = false; KbdInteractiveAuthentication = false; @@ -15,7 +19,15 @@ isNormalUser = true; description = "Leonardo Eugênio"; hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A"; - extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ]; + 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" @@ -32,7 +44,5 @@ programs.fish.enable = true; - environment.systemPackages = with pkgs; [ - git - ]; + environment.systemPackages = with pkgs; [ git ]; } diff --git a/hosts/phantom/vpsadminos.nix b/hosts/phantom/vpsadminos.nix index 40401cd..8102fbb 100644 --- a/hosts/phantom/vpsadminos.nix +++ b/hosts/phantom/vpsadminos.nix @@ -6,7 +6,12 @@ # # https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: with lib; let nameservers = [ @@ -22,16 +27,19 @@ in systemd.services.systemd-sysctl.enable = false; systemd.services.systemd-oomd.enable = false; systemd.sockets."systemd-journald-audit".enable = false; - systemd.mounts = [{ where = "/sys/kernel/debug"; enable = false; }]; + systemd.mounts = [ + { + where = "/sys/kernel/debug"; + enable = false; + } + ]; systemd.services.rpc-gssd.enable = false; # Due to our restrictions in /sys, the default systemd-udev-trigger fails # on accessing PCI devices, etc. Override it to match only network devices. # In addition, boot.isContainer prevents systemd-udev-trigger.service from # being enabled at all, so add it explicitly. - systemd.additionalUpstreamSystemUnits = [ - "systemd-udev-trigger.service" - ]; + systemd.additionalUpstreamSystemUnits = [ "systemd-udev-trigger.service" ]; systemd.services.systemd-udev-trigger.serviceConfig.ExecStart = [ "" "-udevadm trigger --subsystem-match=net --action=add" diff --git a/hosts/phantom/writefreely.nix b/hosts/phantom/writefreely.nix index 3530e06..5608c0f 100644 --- a/hosts/phantom/writefreely.nix +++ b/hosts/phantom/writefreely.nix @@ -1,4 +1,10 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ services.writefreely = { enable = true; acme.enable = true; @@ -22,4 +28,3 @@ }; }; } - diff --git a/hosts/pixie.nix b/hosts/pixie.nix index 5f8ce66..9aa5a1e 100644 --- a/hosts/pixie.nix +++ b/hosts/pixie.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" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; @@ -18,8 +30,7 @@ options = [ "subvol=nixos" ]; }; - boot.initrd.luks.devices."pixie".device = - "/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928"; + boot.initrd.luks.devices."pixie".device = "/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928"; fileSystems."/home" = { device = "/dev/mapper/pixie"; @@ -46,8 +57,7 @@ # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; # networking.interfaces.veth74f3ffc.useDHCP = lib.mkDefault true; - hardware.cpu.amd.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; networking.hostName = "pixie"; # Define your hostname. } diff --git a/hosts/rainbow.nix b/hosts/rainbow.nix index 776ebec..b977ee6 100644 --- a/hosts/rainbow.nix +++ b/hosts/rainbow.nix @@ -1,16 +1,34 @@ # 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, + ... +}: let - btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ]; - btrfs_ssd = [ "ssd" "discard=async" ]; + btrfs_options = [ + "compress=zstd:3" + "noatime" + "x-systemd.device-timeout=0" + ]; + btrfs_ssd = [ + "ssd" + "discard=async" + ]; in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; boot.initrd.kernelModules = [ "i915" ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -46,10 +64,12 @@ in options = [ "subvol=@swap" ] ++ btrfs_ssd; }; - swapDevices = [{ - device = "/swap/swapfile"; - size = (1024 * 8); - }]; + swapDevices = [ + { + device = "/swap/swapfile"; + size = (1024 * 8); + } + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -59,8 +79,7 @@ in # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; networking.hostName = "rainbow"; # Define your hostname. } diff --git a/overlays/default.nix b/overlays/default.nix index 060a0c0..14257ba 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,4 +1,5 @@ -{ inputs, packages, ... }: rec { +{ inputs, packages, ... }: +rec { all = [ scripts sway @@ -13,68 +14,87 @@ sway = (import ./sway.nix); - themes = (final: prev: { - material-wifi-icons = final.stdenv.mkDerivation rec { - name = "material-wifi-icons"; - src = inputs.material-wifi-icons; - installPhase = '' - install -D material-wifi.ttf $out/share/fonts/${name} - ''; - }; - papirus_red = (final.papirus-icon-theme.override { color = "red"; }); - orchis_theme_compact = (final.orchis-theme.override { - border-radius = 0; - tweaks = [ "compact" "solid" ]; - }); - nerdfonts_fira_hack = (final.nerdfonts.override { fonts = [ "FiraCode" "Hack" ]; }); - }); + themes = ( + final: prev: { + material-wifi-icons = final.stdenv.mkDerivation rec { + name = "material-wifi-icons"; + src = inputs.material-wifi-icons; + installPhase = '' + install -D material-wifi.ttf $out/share/fonts/${name} + ''; + }; + papirus_red = (final.papirus-icon-theme.override { color = "red"; }); + orchis_theme_compact = ( + final.orchis-theme.override { + border-radius = 0; + tweaks = [ + "compact" + "solid" + ]; + } + ); + nerdfonts_fira_hack = ( + final.nerdfonts.override { + fonts = [ + "FiraCode" + "Hack" + ]; + } + ); + } + ); - new-packages = (final: prev: packages // { - dhist = inputs.dhist.packages.${prev.system}.dhist; - demoji = inputs.demoji.packages.${prev.system}.default; - 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; - }); + new-packages = ( + final: prev: + packages + // { + dhist = inputs.dhist.packages.${prev.system}.dhist; + demoji = inputs.demoji.packages.${prev.system}.default; + 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; + } + ); - patches = (final: prev: { - bemenu = prev.bemenu.overrideAttrs (o: { - postPatch = '' - substituteInPlace lib/renderers/wayland/window.c \ - --replace ZWLR_LAYER_SHELL_V1_LAYER_TOP ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY - ''; - }); - mySway = prev.sway.override { - sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: { - patches = old.patches - ++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ]; + patches = ( + final: prev: { + bemenu = prev.bemenu.overrideAttrs (o: { + postPatch = '' + substituteInPlace lib/renderers/wayland/window.c \ + --replace ZWLR_LAYER_SHELL_V1_LAYER_TOP ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY + ''; }); - }; - mangohud = prev.mangohud.overrideAttrs (o: { - patches = o.patches ++ [ - (prev.fetchpatch { - url = "https://github.com/flightlessmango/MangoHud/commit/95141de657e02577f1d3fab0ca12122bfb68bc56.patch"; - hash = "sha256-a2tESliGBkfF7uYQn8TDgeFt07A9FOioI4VcTT7DC7A="; - }) - ]; - }); - }); + 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="; + }) + ]; + }); + } + ); - variables = (final: prev: { - uservars = import ../user/variables.nix; - }); + variables = (final: prev: { uservars = import ../user/variables.nix; }); - lib_extended = (final: prev: { - lib = prev.lib // rec { - # Utility function - # Input: [{v1=1;} {v2=2;}] - # Output: {v1=1;v2=2;} - mergeAttrsSet = prev.lib.foldAttrs (n: _: n) { }; + lib_extended = ( + final: prev: { + lib = prev.lib // rec { + # Utility function + # Input: [{v1=1;} {v2=2;}] + # Output: {v1=1;v2=2;} + mergeAttrsSet = prev.lib.foldAttrs (n: _: n) { }; - # Easily translate imperative templating code - # Input: [ 1 2 ] (num: { "v${num}" = num; }) - # Output: {v1=1;v2=2;} - forEachMerge = list: func: mergeAttrsSet (prev.lib.forEach list func); - }; - }); + # Easily translate imperative templating code + # Input: [ 1 2 ] (num: { "v${num}" = num; }) + # Output: {v1=1;v2=2;} + forEachMerge = list: func: mergeAttrsSet (prev.lib.forEach list func); + }; + } + ); } diff --git a/pkgs/blade-formatter/default.nix b/pkgs/blade-formatter/default.nix index adf2d7f..f824066 100644 --- a/pkgs/blade-formatter/default.nix +++ b/pkgs/blade-formatter/default.nix @@ -1,11 +1,12 @@ -{ lib -, mkYarnPackage -, fetchFromGitHub -, fetchYarnDeps -, testers -, writeText -, runCommand -, blade-formatter +{ + lib, + mkYarnPackage, + fetchFromGitHub, + fetchYarnDeps, + testers, + writeText, + runCommand, + blade-formatter, }: mkYarnPackage rec { @@ -40,15 +41,17 @@ mkYarnPackage rec { Hello world! @endif ''; - actual = runCommand "actual" - { - nativeBuildInputs = [ blade-formatter ]; - base = writeText "base" '' - @if( true ) Hello world! @endif + actual = + runCommand "actual" + { + nativeBuildInputs = [ blade-formatter ]; + base = writeText "base" '' + @if( true ) Hello world! @endif + ''; + } + '' + blade-formatter $base > $out ''; - } '' - blade-formatter $base > $out - ''; }; }; diff --git a/pkgs/cargo-checkmate.nix b/pkgs/cargo-checkmate.nix index 0620667..a85ff80 100644 --- a/pkgs/cargo-checkmate.nix +++ b/pkgs/cargo-checkmate.nix @@ -1,11 +1,12 @@ -{ lib -, rustPlatform -, fetchFromGitHub -, pkg-config -, openssl -, zlib -, stdenv -, Security ? null +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + openssl, + zlib, + stdenv, + Security ? null, }: rustPlatform.buildRustPackage rec { @@ -22,9 +23,7 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-hOB84u55ishahIFSqBnqccqH3OlC9J8mCYzsd23jTyA="; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ - Security - ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; meta = with lib; { description = "Check all the things."; diff --git a/pkgs/default.nix b/pkgs/default.nix index 0fdc3eb..00600fc 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,7 +1,8 @@ # Custom packages, that can be defined similarly to ones from nixpkgs # You can build them using 'nix build .#example' or (legacy) 'nix-build -A example' -{ pkgs, inputs }: { +{ pkgs, inputs }: +{ blade-formatter = pkgs.callPackage ./blade-formatter { }; cargo-checkmate = pkgs.callPackage ./cargo-checkmate.nix { }; lipsum = pkgs.callPackage ./lipsum.nix { inherit inputs; }; diff --git a/pkgs/emmet-cli.nix b/pkgs/emmet-cli.nix index c7fce2e..043aff6 100644 --- a/pkgs/emmet-cli.nix +++ b/pkgs/emmet-cli.nix @@ -1,6 +1,7 @@ -{ lib -, buildNpmPackage -, fetchFromGitHub +{ + lib, + buildNpmPackage, + fetchFromGitHub, }: buildNpmPackage rec { diff --git a/pkgs/lipsum.nix b/pkgs/lipsum.nix index e1dabe5..427f04e 100644 --- a/pkgs/lipsum.nix +++ b/pkgs/lipsum.nix @@ -11,9 +11,7 @@ pkgs.stdenv.mkDerivation rec { wrapGAppsHook ]; - makeFlags = [ - "PRG=${pname}" - ]; + makeFlags = [ "PRG=${pname}" ]; installPhase = '' install -Dm 755 "$pname" "$out/bin/$pname" @@ -21,4 +19,3 @@ pkgs.stdenv.mkDerivation rec { glib-compile-schemas "$out/share/glib-2.0/schemas/" ''; } - diff --git a/scripts/default.nix b/scripts/default.nix index bc2ac3d..f509e37 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -1,59 +1,134 @@ -(final: prev: -with prev; -let - import_script = (_: path: import (path) { inherit pkgs lib; }); - create_script = (name: text: runtimeInputs: - let - script_body = pkgs.writeTextFile { - inherit name; - executable = true; - text = '' - ${builtins.readFile text} - ''; - }; - in - (pkgs.writeShellApplication { - inherit name runtimeInputs; - text = ''exec ${script_body} "$@"''; - checkPhase = ""; - })); - create_scripts = - lib.mapAttrs (name: deps: create_script name ./${name} deps); +( + final: prev: + with prev; + let + import_script = (_: path: import (path) { inherit pkgs lib; }); + create_script = ( + name: text: runtimeInputs: + let + script_body = pkgs.writeTextFile { + inherit name; + executable = true; + text = '' + ${builtins.readFile text} + ''; + }; + in + (pkgs.writeShellApplication { + inherit name runtimeInputs; + text = ''exec ${script_body} "$@"''; + checkPhase = ""; + }) + ); + create_scripts = lib.mapAttrs (name: deps: create_script name ./${name} deps); - pass = pkgs.pass.withExtensions (ex: with ex; [ - pass-otp - ]); -in -create_scripts - { + pass = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]); + in + create_scripts { br = [ ]; - bmenu = [ final.bemenu final.dhist fish j4-dmenu-desktop jq sway ]; - down_meme = [ wl-clipboard yt-dlp libnotify ]; - wl-copy-file = [ wl-clipboard fish ]; + bmenu = [ + final.bemenu + final.dhist + fish + j4-dmenu-desktop + jq + sway + ]; + down_meme = [ + wl-clipboard + yt-dlp + libnotify + ]; + wl-copy-file = [ + wl-clipboard + fish + ]; _diffr = [ diffr ]; _thunar-terminal = [ final.terminal ]; _sway_idle_toggle = [ final.swayidle ]; - kak-pager = [ fish final._diffr ]; + kak-pager = [ + fish + final._diffr + ]; kak-man-pager = [ final.kak-pager ]; - helix-pager = [ fish final._diffr ]; + helix-pager = [ + fish + final._diffr + ]; helix-man-pager = [ final.helix-pager ]; - musmenu = [ mpc-cli final.wdmenu trash-cli xdg-user-dirs libnotify sd wl-clipboard ]; - showkeys = - [ ]; # This will not work unless programs.wshowkeys is enabled systemwide + musmenu = [ + mpc-cli + final.wdmenu + trash-cli + xdg-user-dirs + libnotify + sd + wl-clipboard + ]; + showkeys = [ ]; # 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 ]; - volumesh = [ pulseaudio libnotify ]; - pulse_sink = [ pulseaudio pamixer final.wdmenu ]; - color_picker = [ grim slurp wl-clipboard libnotify imagemagick ]; - dzadd = [ procps libnotify final.wdmenu jq mpv pqiv python3Packages.deemix mpc-cli final.mpdDup ]; - mpdDup = [ mpc-cli perl ]; - readQrCode = [ grim zbar wl-clipboard ]; - } // lib.mapAttrs import_script { - wdmenu = ./wdmenu.nix; - wlauncher = ./wlauncher.nix; - _gpg-unlock = ./_gpg-unlock.nix; -}) + 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 + ]; + volumesh = [ + pulseaudio + libnotify + ]; + pulse_sink = [ + pulseaudio + pamixer + final.wdmenu + ]; + color_picker = [ + grim + slurp + wl-clipboard + libnotify + imagemagick + ]; + dzadd = [ + procps + libnotify + final.wdmenu + jq + mpv + pqiv + python3Packages.deemix + mpc-cli + final.mpdDup + ]; + mpdDup = [ + mpc-cli + perl + ]; + readQrCode = [ + grim + zbar + wl-clipboard + ]; + } + // lib.mapAttrs import_script { + wdmenu = ./wdmenu.nix; + wlauncher = ./wlauncher.nix; + _gpg-unlock = ./_gpg-unlock.nix; + } +) diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 90de405..368b837 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -2,8 +2,12 @@ let main_ssh_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"; 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 ]; + "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 ]; diff --git a/system/bluetooth.nix b/system/bluetooth.nix index 20eb72e..1bcea1f 100644 --- a/system/bluetooth.nix +++ b/system/bluetooth.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ services.blueman.enable = true; hardware.bluetooth = { enable = true; @@ -8,7 +9,9 @@ # Discoverable = true; AlwaysPairable = true; }; - Policy = { AutoEnable = true; }; + Policy = { + AutoEnable = true; + }; }; }; } diff --git a/system/boot.nix b/system/boot.nix index 25e9a11..81d838e 100644 --- a/system/boot.nix +++ b/system/boot.nix @@ -1,4 +1,11 @@ -{ config, pkgs, lib, inputs, ... }: { +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ console = { font = "${pkgs.terminus_font}/share/consolefonts/ter-120n.psf.gz"; packages = [ pkgs.terminus_font ]; @@ -38,9 +45,7 @@ enable = true; theme = lib.mkIf (pkgs.uservars.desktop == "sway") "red_loader"; themePackages = with pkgs; [ - (adi1090x-plymouth-themes.override { - selected_themes = [ "red_loader" ]; - }) + (adi1090x-plymouth-themes.override { selected_themes = [ "red_loader" ]; }) ]; }; }; diff --git a/system/cachix.nix b/system/cachix.nix index 07af177..7ff9b29 100644 --- a/system/cachix.nix +++ b/system/cachix.nix @@ -1,4 +1,10 @@ -{ pkgs, lib, config, ... }: { +{ + pkgs, + lib, + config, + ... +}: +{ services.cachix-watch-store = { enable = true; cacheName = "lelgenio"; diff --git a/system/configuration.nix b/system/configuration.nix index 130ca7d..8054fa9 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -1,7 +1,13 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ imports = [ ./gamemode.nix ./cachix.nix diff --git a/system/containers.nix b/system/containers.nix index c2c2941..377647d 100644 --- a/system/containers.nix +++ b/system/containers.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ services.flatpak.enable = true; virtualisation.docker.enable = true; virtualisation.docker.autoPrune.enable = true; diff --git a/system/fonts.nix b/system/fonts.nix index e6d4ccd..d8bff5a 100644 --- a/system/fonts.nix +++ b/system/fonts.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ fonts.enableDefaultPackages = true; fonts.packages = with pkgs; [ noto-fonts diff --git a/system/gamemode.nix b/system/gamemode.nix index d9445ea..92207cd 100644 --- a/system/gamemode.nix +++ b/system/gamemode.nix @@ -1,8 +1,16 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ programs.gamemode.enable = true; programs.gamemode.enableRenice = true; programs.gamemode.settings = { - general = { renice = 10; }; + general = { + renice = 10; + }; # Warning: GPU optimisations have the potential to damage hardware gpu = { diff --git a/system/gitlab-runner.nix b/system/gitlab-runner.nix index 1cc46a7..335bc5a 100644 --- a/system/gitlab-runner.nix +++ b/system/gitlab-runner.nix @@ -1,40 +1,52 @@ -{ pkgs, lib, ... }: { - mkNixRunner = registrationConfigFile: with lib; rec { - # File should contain at least these two variables: - # `CI_SERVER_URL` - # `REGISTRATION_TOKEN` - inherit registrationConfigFile; # 2 - dockerImage = "alpine:3.18.2"; - dockerAllowedImages = [ dockerImage ]; - dockerVolumes = [ - "/etc/nix/nix.conf:/etc/nix/nix.conf:ro" - "/nix/store:/nix/store:ro" - "/nix/var/nix/db:/nix/var/nix/db:ro" - "/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro" - ]; - dockerDisableCache = true; - preBuildScript = pkgs.writeScript "setup-container" '' - mkdir -p -m 0755 /nix/var/log/nix/drvs - mkdir -p -m 0755 /nix/var/nix/gcroots - mkdir -p -m 0755 /nix/var/nix/profiles - mkdir -p -m 0755 /nix/var/nix/temproots - mkdir -p -m 0755 /nix/var/nix/userpool - mkdir -p -m 1777 /nix/var/nix/gcroots/per-user - mkdir -p -m 1777 /nix/var/nix/profiles/per-user - mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root - mkdir -p -m 0700 "$HOME/.nix-defexpr" +{ pkgs, lib, ... }: +{ + mkNixRunner = + registrationConfigFile: with lib; rec { + # File should contain at least these two variables: + # `CI_SERVER_URL` + # `REGISTRATION_TOKEN` + inherit registrationConfigFile; # 2 + dockerImage = "alpine:3.18.2"; + dockerAllowedImages = [ dockerImage ]; + dockerVolumes = [ + "/etc/nix/nix.conf:/etc/nix/nix.conf:ro" + "/nix/store:/nix/store:ro" + "/nix/var/nix/db:/nix/var/nix/db:ro" + "/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro" + ]; + dockerDisableCache = true; + preBuildScript = pkgs.writeScript "setup-container" '' + mkdir -p -m 0755 /nix/var/log/nix/drvs + mkdir -p -m 0755 /nix/var/nix/gcroots + mkdir -p -m 0755 /nix/var/nix/profiles + mkdir -p -m 0755 /nix/var/nix/temproots + mkdir -p -m 0755 /nix/var/nix/userpool + mkdir -p -m 1777 /nix/var/nix/gcroots/per-user + mkdir -p -m 1777 /nix/var/nix/profiles/per-user + mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root + mkdir -p -m 0700 "$HOME/.nix-defexpr" - . ${pkgs.nix}/etc/profile.d/nix.sh + . ${pkgs.nix}/etc/profile.d/nix.sh - ${pkgs.nix}/bin/nix-env -i ${concatStringsSep " " (with pkgs; [ nix cacert git openssh ])} - ''; - environmentVariables = { - ENV = "/etc/profile"; - USER = "root"; - NIX_REMOTE = "daemon"; - PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin"; - NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"; + ${pkgs.nix}/bin/nix-env -i ${ + concatStringsSep " " ( + with pkgs; + [ + nix + cacert + git + openssh + ] + ) + } + ''; + environmentVariables = { + ENV = "/etc/profile"; + USER = "root"; + NIX_REMOTE = "daemon"; + PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin"; + NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"; + }; + tagList = [ "nix" ]; }; - tagList = [ "nix" ]; - }; } diff --git a/system/gnome.nix b/system/gnome.nix index cb8c106..72b98c5 100644 --- a/system/gnome.nix +++ b/system/gnome.nix @@ -1,7 +1,8 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, ... }: { +{ config, pkgs, ... }: +{ # Enable the X11 windowing system. services.xserver.enable = true; # Enable the GNOME Desktop Environment. @@ -19,11 +20,14 @@ }; # services.xserver.displayManager.autologin.user = "lelgenio"; - environment.systemPackages = with pkgs; with gnome; [ - gnome-tweaks - dconf-editor + environment.systemPackages = + with pkgs; + with gnome; + [ + gnome-tweaks + dconf-editor - chrome-gnome-shell - gnomeExtensions.quick-settings-audio-devices-hider - ]; + chrome-gnome-shell + gnomeExtensions.quick-settings-audio-devices-hider + ]; } diff --git a/system/greetd.nix b/system/greetd.nix index 8293c64..6bc6297 100644 --- a/system/greetd.nix +++ b/system/greetd.nix @@ -1,6 +1,17 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: let - inherit (pkgs.uservars) key accent font theme desktop; + inherit (pkgs.uservars) + key + accent + font + theme + desktop + ; cfg = config.login-manager.greetd; in diff --git a/system/kde.nix b/system/kde.nix index 66aa2a2..c5ef277 100644 --- a/system/kde.nix +++ b/system/kde.nix @@ -1,4 +1,5 @@ -{ config, pkgs, ... }: { +{ config, pkgs, ... }: +{ # Enable the X11 windowing system. services.xserver.enable = true; # Enable the KDE Desktop Environment. diff --git a/system/locale.nix b/system/locale.nix index bb344c7..07e7175 100644 --- a/system/locale.nix +++ b/system/locale.nix @@ -1,4 +1,5 @@ -{ pkgs, config, ... }: { +{ pkgs, config, ... }: +{ time.timeZone = "America/Sao_Paulo"; environment.variables.TZ = config.time.timeZone; i18n.defaultLocale = "pt_BR.utf8"; diff --git a/system/media-packages.nix b/system/media-packages.nix index e72ea0a..818b78b 100644 --- a/system/media-packages.nix +++ b/system/media-packages.nix @@ -1,6 +1,13 @@ -{ config, pkgs, lib, ... }: -let cfg = config.packages.media-packages; -in { +{ + config, + pkgs, + lib, + ... +}: +let + cfg = config.packages.media-packages; +in +{ options.packages.media-packages = { enable = lib.mkEnableOption "media packages"; }; diff --git a/system/monolith-forgejo-runner.nix b/system/monolith-forgejo-runner.nix index ee07410..fa2b3c6 100644 --- a/system/monolith-forgejo-runner.nix +++ b/system/monolith-forgejo-runner.nix @@ -1,4 +1,5 @@ -{ pkgs, config, ... }: { +{ pkgs, config, ... }: +{ services.gitea-actions-runner = { package = pkgs.forgejo-actions-runner; instances.default = { diff --git a/system/monolith-gitlab-runner.nix b/system/monolith-gitlab-runner.nix index 37b16dd..8e419d1 100644 --- a/system/monolith-gitlab-runner.nix +++ b/system/monolith-gitlab-runner.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner; in @@ -15,7 +20,8 @@ in # dockerPrivileged = true; # }; thoreb_builder = { - registrationConfigFile = config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; + registrationConfigFile = + config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; dockerImage = "debian"; dockerPrivileged = true; }; diff --git a/system/network.nix b/system/network.nix index c8ebdd9..aee7518 100644 --- a/system/network.nix +++ b/system/network.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; diff --git a/system/nix-serve.nix b/system/nix-serve.nix index 0bd49c2..6cc7161 100644 --- a/system/nix-serve.nix +++ b/system/nix-serve.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: +{ services.nix-serve = { enable = true; secretKeyFile = config.age.secrets.monolith-nix-serve-privkey.path; diff --git a/system/nix.nix b/system/nix.nix index 38b2eb9..18ac258 100644 --- a/system/nix.nix +++ b/system/nix.nix @@ -1,7 +1,13 @@ -{ lib, config, pkgs, inputs, ... }: +{ + lib, + config, + pkgs, + inputs, + ... +}: let - collectFlakeInputs = input: - [ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { })); + collectFlakeInputs = + input: [ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { })); in { system.extraDependencies = collectFlakeInputs inputs.self; @@ -17,7 +23,10 @@ in optimise.automatic = true; settings = { auto-optimise-store = true; - trusted-users = [ "root" "@wheel" ]; + trusted-users = [ + "root" + "@wheel" + ]; substituters = [ "https://cache.nixos.org" "https://nix-community.cachix.org" diff --git a/system/rainbow-gitlab-runner.nix b/system/rainbow-gitlab-runner.nix index 2cae621..aa177de 100644 --- a/system/rainbow-gitlab-runner.nix +++ b/system/rainbow-gitlab-runner.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner; in @@ -15,7 +20,8 @@ in # dockerPrivileged = true; # }; thoreb_builder = { - registrationConfigFile = config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; + registrationConfigFile = + config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; dockerImage = "debian"; dockerPrivileged = true; }; diff --git a/system/secrets.nix b/system/secrets.nix index c94581c..ca11fb4 100644 --- a/system/secrets.nix +++ b/system/secrets.nix @@ -1,18 +1,13 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ age = { identityPaths = [ "/root/.ssh/id_rsa" ]; secrets.lelgenio-cachix.file = ../secrets/lelgenio-cachix.age; - secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = - ../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 = - ../secrets/monolith-nix-serve-privkey.age; - secrets.phantom-forgejo-mailer-password.file = - ../secrets/phantom-forgejo-mailer-password.age; + secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../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 = ../secrets/monolith-nix-serve-privkey.age; + secrets.phantom-forgejo-mailer-password.file = ../secrets/phantom-forgejo-mailer-password.age; }; } diff --git a/system/sound.nix b/system/sound.nix index 3cdbf58..8ef55ab 100644 --- a/system/sound.nix +++ b/system/sound.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ sound.enable = true; hardware.pulseaudio.enable = false; services.pipewire = { diff --git a/system/specialisation.nix b/system/specialisation.nix index c0e1498..23b410f 100644 --- a/system/specialisation.nix +++ b/system/specialisation.nix @@ -1,10 +1,7 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ specialisation.dark-theme.configuration = { - nixpkgs.overlays = [ - (final: prev: { - uservars = prev.uservars; - }) - ]; + nixpkgs.overlays = [ (final: prev: { uservars = prev.uservars; }) ]; }; specialisation.light-theme.configuration = { nixpkgs.overlays = [ diff --git a/system/steam.nix b/system/steam.nix index ce94c3d..ddc33c8 100644 --- a/system/steam.nix +++ b/system/steam.nix @@ -1,17 +1,27 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ programs.steam.enable = true; programs.steam.package = pkgs.steam.override { - extraLibraries = pkgs: with config.hardware.opengl; - if pkgs.hostPlatform.is64bit - then [ package ] ++ extraPackages - else [ package32 ] ++ extraPackages32; + extraLibraries = + pkgs: + with config.hardware.opengl; + if pkgs.hostPlatform.is64bit then + [ package ] ++ extraPackages + else + [ package32 ] ++ extraPackages32; - extraPkgs = pkgs: with pkgs; [ - capitaine-cursors - bibata-cursors - mangohud - xdg-user-dirs - ]; + extraPkgs = + pkgs: with pkgs; [ + capitaine-cursors + bibata-cursors + mangohud + xdg-user-dirs + ]; }; environment.systemPackages = with pkgs; [ protontricks diff --git a/system/thunar.nix b/system/thunar.nix index 5a14448..fcb9e3b 100644 --- a/system/thunar.nix +++ b/system/thunar.nix @@ -1,4 +1,10 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ programs.thunar = { enable = true; plugins = with pkgs.xfce; [ @@ -12,17 +18,15 @@ services.tumbler.enable = true; environment.systemPackages = [ - ( - pkgs.writeTextFile { - name = "thumbs"; - text = '' - [Thumbnailer Entry] - TryExec=unzip - Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o" - MimeType=application/x-krita; - ''; - destination = "/share/thumbnailers/kra.thumbnailer"; - } - ) + (pkgs.writeTextFile { + name = "thumbs"; + text = '' + [Thumbnailer Entry] + TryExec=unzip + Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o" + MimeType=application/x-krita; + ''; + destination = "/share/thumbnailers/kra.thumbnailer"; + }) ]; } diff --git a/system/users.nix b/system/users.nix index 2334897..ead5528 100644 --- a/system/users.nix +++ b/system/users.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ security.sudo.wheelNeedsPassword = false; # services.getty.autologinUser = "lelgenio"; @@ -10,7 +11,15 @@ isNormalUser = true; description = "Leonardo Eugênio"; hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A"; - extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ]; + 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" diff --git a/user/alacritty.nix b/user/alacritty.nix index 8c7ec22..ae2e2fb 100644 --- a/user/alacritty.nix +++ b/user/alacritty.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key theme accent font; + inherit (pkgs.uservars) + key + theme + accent + font + ; inherit (theme) color; in { @@ -10,7 +20,9 @@ in settings = { font = { size = font.size.small; - normal = { family = font.mono; }; + normal = { + family = font.mono; + }; }; colors = { primary = { @@ -40,31 +52,34 @@ in hints = { alphabet = key.hints; - enabled = [{ - regex = - let - mimes = - "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)"; - # I fucking hate regex, look at this bullshit - delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^⟨⟩`''; - # Kakoune uses these characters to represent whitespace, - # but alacritty doesn't know about them - whitespace_characters = ''¬·→''; - in - "${mimes}[${delimiters}${whitespace_characters}]+"; - command = "xdg-open"; - post_processing = true; - mouse = { - enabled = true; - mods = "None"; - }; - binding = { - key = "U"; - mods = "Control|Shift"; - }; - }]; + enabled = [ + { + regex = + let + mimes = "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)"; + # I fucking hate regex, look at this bullshit + delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^⟨⟩`''; + # Kakoune uses these characters to represent whitespace, + # but alacritty doesn't know about them + whitespace_characters = ''¬·→''; + in + "${mimes}[${delimiters}${whitespace_characters}]+"; + command = "xdg-open"; + post_processing = true; + mouse = { + enabled = true; + mods = "None"; + }; + binding = { + key = "U"; + mods = "Control|Shift"; + }; + } + ]; + }; + mouse = { + hide_when_typing = true; }; - mouse = { hide_when_typing = true; }; keyboard.bindings = [ { key = lib.toUpper key.up; @@ -141,7 +156,9 @@ in }; }; - home.sessionVariables = { TERMINAL = "alacritty"; }; + home.sessionVariables = { + TERMINAL = "alacritty"; + }; # Look at this fucking bullshit: # https://gitlab.gnome.org/GNOME/glib/-/blob/20c4fcb2a7246a2b205649eae3ebda4296217afc/gio/gdesktopappinfo.c#L2702 diff --git a/user/bmenu.nix b/user/bmenu.nix index 047da54..38c36c6 100644 --- a/user/bmenu.nix +++ b/user/bmenu.nix @@ -1,6 +1,17 @@ -{ config, pkgs, lib, inputs, ... }: +{ + config, + pkgs, + lib, + inputs, + ... +}: let - inherit (pkgs.uservars) key theme accent font; + inherit (pkgs.uservars) + key + theme + accent + font + ; inherit (theme) color; in { diff --git a/user/chat.nix b/user/chat.nix index 34ddd84..f0987ed 100644 --- a/user/chat.nix +++ b/user/chat.nix @@ -1,4 +1,11 @@ -{ config, pkgs, lib, inputs, ... }: { +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ wayland.windowManager.sway = { extraConfig = '' exec thunderbird diff --git a/user/controller.nix b/user/controller.nix index 73ab483..6a756df 100644 --- a/user/controller.nix +++ b/user/controller.nix @@ -1,4 +1,11 @@ -{ config, pkgs, lib, inputs, ... }: { +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ xdg.desktopEntries = { connect-controller = { name = "Connect Controller"; diff --git a/user/desktop-entries.nix b/user/desktop-entries.nix index eaa4c93..1b809d3 100644 --- a/user/desktop-entries.nix +++ b/user/desktop-entries.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: +{ xdg.desktopEntries = { kak = { name = "Kakoune"; @@ -8,7 +14,10 @@ terminal = true; type = "Application"; icon = "kak.desktop"; - categories = [ "Utility" "TextEditor" ]; + categories = [ + "Utility" + "TextEditor" + ]; startupNotify = true; mimeType = [ "text/english" @@ -40,10 +49,15 @@ terminal = true; type = "Application"; icon = "mutt"; - categories = [ "Network" "Email" ]; + categories = [ + "Network" + "Email" + ]; startupNotify = false; mimeType = [ "x-scheme-handler/mailto" ]; - settings = { Keywords = "Mail;E-mail;"; }; + settings = { + Keywords = "Mail;E-mail;"; + }; }; down_meme = { name = "DownMeme"; diff --git a/user/firefox.nix b/user/firefox.nix index b60f808..4c442e3 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, font, ... }: -let inherit (pkgs.uservars) desktop browser; - bugfixedFirefox = pkgs.firefox-esr-unwrapped // { requireSigning = false; allowAddonSideload = true; }; +{ + config, + pkgs, + lib, + font, + ... +}: +let + inherit (pkgs.uservars) desktop browser; + bugfixedFirefox = pkgs.firefox-esr-unwrapped // { + requireSigning = false; + allowAddonSideload = true; + }; in { config = { diff --git a/user/fish/default.nix b/user/fish/default.nix index 913e514..07ba4c2 100644 --- a/user/fish/default.nix +++ b/user/fish/default.nix @@ -1,6 +1,21 @@ -{ config, pkgs, lib, ... }: -let inherit (pkgs.uservars) key theme color accent font editor desktop; -in { +{ + config, + pkgs, + lib, + ... +}: +let + inherit (pkgs.uservars) + key + theme + color + accent + font + editor + desktop + ; +in +{ config = { programs.fish = { enable = true; @@ -34,10 +49,12 @@ in { }; shellAbbrs = { off = "shutdown now"; - v = { - "helix" = "hx"; - "kakoune" = "kak"; - }.${editor}; + v = + { + "helix" = "hx"; + "kakoune" = "kak"; + } + .${editor}; ns = "nix develop --command $SHELL"; wcf = "wl-copy-file"; c = "cargo"; @@ -64,7 +81,9 @@ in { gr = "cd (git root)"; gri = "git rebase --interactive FETCH_HEAD"; }; - functions = { fish_greeting = ""; }; + functions = { + fish_greeting = ""; + }; }; programs = { zoxide.enable = true; @@ -85,13 +104,18 @@ in { }; # programs.command-not-found.enable = true; programs.nix-index.enable = true; - home.packages = (with pkgs; with fishPlugins;[ - trash-cli - wl-copy-file - foreign-env - ] ++ (lib.optionals (desktop == "sway") [ - async-prompt - done - ])); + home.packages = ( + with pkgs; + with fishPlugins; + [ + trash-cli + wl-copy-file + foreign-env + ] + ++ (lib.optionals (desktop == "sway") [ + async-prompt + done + ]) + ); }; } diff --git a/user/fzf.nix b/user/fzf.nix index fc7856a..a4113fa 100644 --- a/user/fzf.nix +++ b/user/fzf.nix @@ -1,6 +1,17 @@ -{ config, pkgs, lib, inputs, ... }: +{ + config, + pkgs, + lib, + inputs, + ... +}: let - inherit (pkgs.uservars) key theme accent font; + inherit (pkgs.uservars) + key + theme + accent + font + ; inherit (theme) color; colors = { @@ -15,22 +26,21 @@ let makeOptList = lib.mapAttrsToList makeKeyValue colors; makeColorValue = lib.strings.concatStringsSep "," makeOptList; color_opts = "--color=${makeColorValue}"; - preview_opts = - "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'"; - + preview_opts = "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'"; in { programs.fzf = { enable = true; fileWidgetCommand = "${pkgs.fd}/bin/fd --type f"; - fileWidgetOptions = - [ "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'" ]; + fileWidgetOptions = [ "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'" ]; changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d"; - changeDirWidgetOptions = - [ "--preview '${pkgs.eza}/bin/eza -T L3 | head -200'" ]; + changeDirWidgetOptions = [ "--preview '${pkgs.eza}/bin/eza -T L3 | head -200'" ]; - defaultOptions = [ color_opts preview_opts ]; + defaultOptions = [ + color_opts + preview_opts + ]; }; } diff --git a/user/git.nix b/user/git.nix index f5392df..f50a249 100644 --- a/user/git.nix +++ b/user/git.nix @@ -1,6 +1,13 @@ -{ config, pkgs, lib, ... }: -let inherit (pkgs.uservars) username mail; -in { +{ + config, + pkgs, + lib, + ... +}: +let + inherit (pkgs.uservars) username mail; +in +{ config = { programs.git = { enable = true; diff --git a/user/gnome.nix b/user/gnome.nix index 70438c3..d1f692d 100644 --- a/user/gnome.nix +++ b/user/gnome.nix @@ -1,4 +1,10 @@ -{ pkgs, lib, inputs, ... }: lib.mkIf (pkgs.uservars.desktop == "gnome") { +{ + pkgs, + lib, + inputs, + ... +}: +lib.mkIf (pkgs.uservars.desktop == "gnome") { home.pointerCursor = { name = "Adwaita"; @@ -14,9 +20,7 @@ cursor-theme = "Adwaita"; # color-scheme = "default"; }; - "org/gnome/desktop/wm/preferences" = lib.mkForce { - button-layout = "appmenu:close"; - }; + "org/gnome/desktop/wm/preferences" = lib.mkForce { button-layout = "appmenu:close"; }; "org/gnome/desktop/input-sources" = { xkb-options = [ "lv3:lsgt_switch" ]; }; @@ -40,7 +44,9 @@ qt6Packages.qtstyleplugin-kvantum ]; - home.sessionVariables = { QT_QPA_PLATFORMTHEME = "qt5ct"; }; + home.sessionVariables = { + QT_QPA_PLATFORMTHEME = "qt5ct"; + }; xdg.defaultApplications = { enable = true; diff --git a/user/gpg.nix b/user/gpg.nix index 5dc20d0..dc39066 100644 --- a/user/gpg.nix +++ b/user/gpg.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: +{ config = { services.gpg-agent = { enable = true; @@ -16,7 +22,9 @@ PartOf = [ "graphical-session.target" ]; After = [ "graphical-session.target" ]; }; - Service = { ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock"; }; + Service = { + ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock"; + }; }; }; systemd.user.timers = { @@ -31,9 +39,10 @@ OnUnitActiveSec = "300"; Unit = "gpg_unlock.service"; }; - Install = { WantedBy = [ "sway-session.target" ]; }; + Install = { + WantedBy = [ "sway-session.target" ]; + }; }; }; - }; } diff --git a/user/helix.nix b/user/helix.nix index 3e430fc..292cfb0 100644 --- a/user/helix.nix +++ b/user/helix.nix @@ -74,7 +74,9 @@ in g.n = "goto_line_start"; g.o = "goto_line_end"; }; - keys.insert = { "A-k" = "normal_mode"; }; + keys.insert = { + "A-k" = "normal_mode"; + }; }; languages.language = [ { @@ -96,14 +98,29 @@ in my-theme = { "inherits" = "gruvbox"; "ui.menu" = "none"; - "ui.background" = { bg = "none"; }; + "ui.background" = { + bg = "none"; + }; "ui.virtual.whitespace" = color.nontxt; - "ui.cursor.primary" = { fg = accent.fg; bg = accent.color; }; - "ui.cursorline.primary" = { bg = color.bg_dark; }; - "ui.cursorcolumn.primary" = { modifiers = [ "bold" ]; }; - "ui.cursorline" = { bg = "none"; }; - "ui.cursorcolumn" = { bg = "none"; }; - "ui.linenr.selected" = { fg = color.txt; }; + "ui.cursor.primary" = { + fg = accent.fg; + bg = accent.color; + }; + "ui.cursorline.primary" = { + bg = color.bg_dark; + }; + "ui.cursorcolumn.primary" = { + modifiers = [ "bold" ]; + }; + "ui.cursorline" = { + bg = "none"; + }; + "ui.cursorcolumn" = { + bg = "none"; + }; + "ui.linenr.selected" = { + fg = color.txt; + }; function = color.normal.orange; module = color.normal.brown; @@ -124,8 +141,6 @@ in }; }; }; - home.sessionVariables = lib.mkIf (editor == "helix") { - EDITOR = "hx"; - }; + home.sessionVariables = lib.mkIf (editor == "helix") { EDITOR = "hx"; }; }; } diff --git a/user/home.nix b/user/home.nix index 39a9ba2..7ec6061 100644 --- a/user/home.nix +++ b/user/home.nix @@ -1,4 +1,12 @@ -{ config, pkgs, lib, inputs, osConfig, ... }: { +{ + config, + pkgs, + lib, + inputs, + osConfig, + ... +}: +{ imports = [ ./controller.nix ./waybar @@ -70,9 +78,7 @@ comma # System monitors - (btop.override { - cudaSupport = true; - }) + (btop.override { cudaSupport = true; }) amdgpu_top inxi dmidecode @@ -140,10 +146,11 @@ }; }; home.sessionVariables = { - VOLUME_CHANGE_SOUND = - "${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga"; + VOLUME_CHANGE_SOUND = "${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga"; + }; + programs.bash = { + enable = true; }; - programs.bash = { enable = true; }; xdg.defaultApplications = { enable = true; @@ -154,7 +161,8 @@ { firefox = lib.mkDefault "firefox.desktop"; qutebrowser = lib.mkDefault "org.qutebrowser.qutebrowser.desktop"; - }.${pkgs.uservars.browser} + } + .${pkgs.uservars.browser} ); document-viewer = lib.mkDefault "org.pwmt.zathura.desktop"; file-manager = lib.mkDefault "thunar.desktop"; @@ -163,12 +171,14 @@ torrent-client = lib.mkDefault "torrent.desktop"; }; - wayland.windowManager.sway.extraConfig = lib.optionalString (osConfig.networking.hostName or "" == "monolith") '' - exec steam - exec obs --startreplaybuffer --disable-shutdown-check - exec deluge-gtk - exec nicotine - ''; + wayland.windowManager.sway.extraConfig = + lib.optionalString (osConfig.networking.hostName or "" == "monolith") + '' + exec steam + exec obs --startreplaybuffer --disable-shutdown-check + exec deluge-gtk + exec nicotine + ''; systemd.user.services.rm-target = { Unit = { @@ -182,12 +192,16 @@ }; }; systemd.user.timers.rm-target = { - Unit = { Description = "Remove directories named 'target'"; }; + Unit = { + Description = "Remove directories named 'target'"; + }; Timer = { OnCalendar = "weekly"; Unit = "rm-target.service"; }; - Install = { WantedBy = [ "timers.target" ]; }; + Install = { + WantedBy = [ "timers.target" ]; + }; }; # This value determines the Home Manager release that your diff --git a/user/hyprland.nix b/user/hyprland.nix index 992964a..e1a632b 100644 --- a/user/hyprland.nix +++ b/user/hyprland.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: +{ config = lib.mkIf (pkgs.uservars.desktop == "hyprland") { wayland.windowManager.hyprland = { enable = false; @@ -122,6 +128,9 @@ ''; }; home.file.".config/eww".source = ./eww; - home.packages = with pkgs; [ eww-wayland jq ]; + home.packages = with pkgs; [ + eww-wayland + jq + ]; }; } diff --git a/user/kakoune/colors.nix b/user/kakoune/colors.nix index dbac3e3..e9b9d07 100644 --- a/user/kakoune/colors.nix +++ b/user/kakoune/colors.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, color, accent }: +{ + pkgs, + lib, + color, + accent, +}: let colors = lib.mapAttrs (_: lib.replaceStrings [ "#" ] [ "rgb:" ]) { accent_fg = accent.fg; @@ -94,8 +99,9 @@ with colors; face global InlayHint ${bg_light}+buif # Lsp -'' + ( - lib.concatStringsSep "\n" (lib.mapAttrsToList +'' ++ (lib.concatStringsSep "\n" ( + lib.mapAttrsToList (name: color: '' face global HighlightDiagnostic${name} ${color},default+bu face global Diagnostic${name} ${color},default+bu @@ -106,6 +112,5 @@ with colors; Error = "red"; Warning = "yellow"; Hint = "blue"; - }) -) - + } +)) diff --git a/user/kakoune/default.nix b/user/kakoune/default.nix index c39b61b..091fe1b 100644 --- a/user/kakoune/default.nix +++ b/user/kakoune/default.nix @@ -1,6 +1,17 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key dmenu editor theme accent; + inherit (pkgs.uservars) + key + dmenu + editor + theme + accent + ; inherit (theme) color; inherit (pkgs) kakounePlugins; inherit (pkgs.kakouneUtils) buildKakounePlugin; @@ -74,26 +85,39 @@ in }) ]; extraConfig = - lib.concatStringsSep "\n" - (map (lib.readFile) ([ - ./filetypes.kak - ./hooks.kak - ./indent.kak - ./keys.kak - ./lsp-config.kak - ./usermode.kak - ./git-mode.kak - ] ++ lib.optional (dmenu == "rofi") ./rofi-commands.kak)) + '' + lib.concatStringsSep "\n" ( + map (lib.readFile) ( + [ + ./filetypes.kak + ./hooks.kak + ./indent.kak + ./keys.kak + ./lsp-config.kak + ./usermode.kak + ./git-mode.kak + ] + ++ lib.optional (dmenu == "rofi") ./rofi-commands.kak + ) + ) + + '' - set global scrolloff 10,20 - set global autoreload yes - set global startup_info_version 99999999 + set global scrolloff 10,20 + set global autoreload yes + set global startup_info_version 99999999 - '' + (import ./colors.nix { - inherit pkgs lib color accent; + '' + + (import ./colors.nix { + inherit + pkgs + lib + color + accent + ; }); }; - home.file = { ".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml; }; + home.file = { + ".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml; + }; home.packages = with pkgs; [ terminal ranger @@ -123,4 +147,3 @@ in }; }; } - diff --git a/user/lf/default.nix b/user/lf/default.nix index 5bc0759..8dc04a2 100644 --- a/user/lf/default.nix +++ b/user/lf/default.nix @@ -1,4 +1,11 @@ -{ config, pkgs, lib, inputs, ... }: { +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ programs.lf = { enable = true; keybindings = { diff --git a/user/man.nix b/user/man.nix index 5b80a4e..c77607e 100644 --- a/user/man.nix +++ b/user/man.nix @@ -1,5 +1,20 @@ -{ config, pkgs, lib, inputs, ... }: -let inherit (pkgs.uservars) key theme color accent font desktop editor; +{ + config, + pkgs, + lib, + inputs, + ... +}: +let + inherit (pkgs.uservars) + key + theme + color + accent + font + desktop + editor + ; pagers = rec { kak = kakoune; kakoune = { diff --git a/user/mangohud.nix b/user/mangohud.nix index 5e54f46..f43564f 100644 --- a/user/mangohud.nix +++ b/user/mangohud.nix @@ -1,6 +1,20 @@ -{ config, pkgs, lib, font, ... }: -let inherit (pkgs.uservars) key theme color accent font; -in { +{ + config, + pkgs, + lib, + font, + ... +}: +let + inherit (pkgs.uservars) + key + theme + color + accent + font + ; +in +{ config = { programs.mangohud = { enable = true; diff --git a/user/mimeapps.nix b/user/mimeapps.nix index 533b00f..ff39ea4 100644 --- a/user/mimeapps.nix +++ b/user/mimeapps.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, font, ... }: +{ + config, + pkgs, + lib, + font, + ... +}: let inherit (pkgs.uservars) browser; cfg = config.xdg.defaultApplications; @@ -26,20 +32,21 @@ in xdg.mimeApps = let - createMimeAssociation = (mime_prefix: application: mime_suffix: { - "${mime_prefix}/${mime_suffix}" = application; - }); + createMimeAssociation = ( + mime_prefix: application: mime_suffix: { "${mime_prefix}/${mime_suffix}" = application; } + ); - createMimeAssociations = (mime_prefix: application: mime_suffixes: - lib.foldAttrs (n: _: n) { } - (map (createMimeAssociation mime_prefix application) mime_suffixes)); + createMimeAssociations = ( + mime_prefix: application: mime_suffixes: + lib.foldAttrs (n: _: n) { } (map (createMimeAssociation mime_prefix application) mime_suffixes) + ); - mimes = simple + mimes = + simple // (createMimeAssociations "text" cfg.text-editor text_suffixes) // (createMimeAssociations "image" cfg.image-viewer image_suffixes) // (createMimeAssociations "video" cfg.video-player video_suffixes) - // (createMimeAssociations "application" cfg.archive-manager archive-suffixes) - ; + // (createMimeAssociations "application" cfg.archive-manager archive-suffixes); simple = { "inode/directory" = cfg.file-manager; @@ -421,7 +428,6 @@ in "x-theora+ogg" ]; - archive-suffixes = [ "bzip2" "gzip" @@ -487,6 +493,5 @@ in enable = true; defaultApplications = mimes; }; - }; } diff --git a/user/mpd.nix b/user/mpd.nix index c100000..8a4c155 100644 --- a/user/mpd.nix +++ b/user/mpd.nix @@ -1,4 +1,10 @@ -{ lib, pkgs, config, ... }: { +{ + lib, + pkgs, + config, + ... +}: +{ config = lib.mkIf (pkgs.uservars.desktop != "gnome") { services.mpd = { enable = true; diff --git a/user/mpv.nix b/user/mpv.nix index b66b2ca..851860f 100644 --- a/user/mpv.nix +++ b/user/mpv.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ config = { programs.mpv = { enable = true; @@ -6,8 +7,7 @@ # ytdl-format='best'; # ytdl_path = "yt-dlp"; ytdl-format = "bestvideo[height<=1080][vcodec!=vp9]+bestaudio/best"; - ytdl-raw-options = - "cookies=~/.cache/cookies-youtube-com.txt,mark-watched="; + ytdl-raw-options = "cookies=~/.cache/cookies-youtube-com.txt,mark-watched="; osd-fractions = true; save-position-on-quit = true; keep-open = true; diff --git a/user/pass.nix b/user/pass.nix index e17b62a..e1c5bb8 100644 --- a/user/pass.nix +++ b/user/pass.nix @@ -1,10 +1,15 @@ -{ config, pkgs, lib, inputs, ... }: { +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ config = { programs.password-store = { enable = true; - package = pkgs.pass.withExtensions (ex: with ex; [ - pass-otp - ]); + package = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]); }; services = { pass-secret-service.enable = true; diff --git a/user/pipewire.nix b/user/pipewire.nix index 8fd5188..5e87618 100644 --- a/user/pipewire.nix +++ b/user/pipewire.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: +{ # RNNoise is a noise supperssion neural network # Here we use it as a plugin for pipewire to create a virtual microphone config = { diff --git a/user/pqiv.nix b/user/pqiv.nix index dc5e8de..10e6c3d 100644 --- a/user/pqiv.nix +++ b/user/pqiv.nix @@ -1,8 +1,21 @@ -{ config, pkgs, lib, inputs, ... }: +{ + config, + pkgs, + lib, + inputs, + ... +}: let - inherit (pkgs.uservars) key theme color accent font; + inherit (pkgs.uservars) + key + theme + color + accent + font + ; - make_direction_binds = lib.imap0 (idx: direction: + make_direction_binds = lib.imap0 ( + idx: direction: let sign = if (idx < 2) then 1 else -1; axis = if ((lib.mod idx 2) != 0) then "y" else "x"; @@ -15,8 +28,8 @@ let montage_mode_shift_${axis}(${toString (sign * -1)}) } } - ''); - + '' + ); in { # My bemenu wrapper @@ -45,7 +58,12 @@ in { goto_file_relative(-1) } { goto_file_relative(1); } - ${lib.concatStrings (make_direction_binds [ "left" "up" "right" "down" ])} + ${lib.concatStrings (make_direction_binds [ + "left" + "up" + "right" + "down" + ])} ${key.tabL} { goto_file_relative(-1) } ${key.tabR} { goto_file_relative(1); } @@ -54,10 +72,7 @@ in d { send_keys(6) } y { send_keys(8) } - ${if (key.layout == "colemak") then - "\n t { toggle_scale_mode(0) }\n " - else - ""} + ${if (key.layout == "colemak") then "\n t { toggle_scale_mode(0) }\n " else ""} # vim: ft=ini ''; diff --git a/user/qutebrowser/colors.nix b/user/qutebrowser/colors.nix index 3a90888..999cc28 100644 --- a/user/qutebrowser/colors.nix +++ b/user/qutebrowser/colors.nix @@ -1,6 +1,18 @@ -{ config, pkgs, lib, font, ... }: +{ + config, + pkgs, + lib, + font, + ... +}: let - inherit (pkgs.uservars) key theme accent font browser; + inherit (pkgs.uservars) + key + theme + accent + font + browser + ; inherit (theme) color; in { @@ -38,9 +50,12 @@ in }; in { - bar = { bg = color.bg; }; + bar = { + bg = color.bg; + }; pinned = tabs_defaults; - } // tabs_defaults; + } + // tabs_defaults; ######################################################## # Completion for urls and commands @@ -48,10 +63,18 @@ in completion = { fg = color.txt; - even = { bg = color.bg; }; - odd = { bg = color.bg; }; - scrollbar = { bg = color.bg_dark; }; - match = { fg = accent.color; }; + even = { + bg = color.bg; + }; + odd = { + bg = color.bg; + }; + scrollbar = { + bg = color.bg_dark; + }; + match = { + fg = accent.color; + }; category = { fg = color.txt; bg = color.bg_dark; @@ -68,7 +91,9 @@ in top = color.bg_dark; bottom = color.bg_dark; }; - match = { fg = color.txt; }; + match = { + fg = color.txt; + }; }; }; }; @@ -102,10 +127,16 @@ in }; url = { success = { - https = { fg = color.txt; }; - http = { fg = color.normal.red; }; + https = { + fg = color.txt; + }; + http = { + fg = color.normal.red; + }; + }; + hover = { + fg = color.normal.cyan; }; - hover = { fg = color.normal.cyan; }; }; }; ######################################################## @@ -113,9 +144,15 @@ in ######################################################## downloads = { - start = { bg = color.normal.blue; }; - stop = { bg = color.normal.green; }; - bar = { bg = color.bg; }; + start = { + bg = color.normal.blue; + }; + stop = { + bg = color.normal.green; + }; + bar = { + bg = color.bg; + }; }; ######################################################## @@ -125,7 +162,9 @@ in hints = { fg = color.txt; bg = color.bg; - match = { fg = accent.color; }; + match = { + fg = accent.color; + }; }; ######################################################## @@ -135,7 +174,9 @@ in keyhint = { fg = color.txt; bg = color.bg; - suffix = { fg = accent.color; }; + suffix = { + fg = accent.color; + }; }; ######################################################## @@ -151,7 +192,9 @@ in fg = accent.fg; bg = accent.color; }; - disabled = { fg = color.bg_light; }; + disabled = { + fg = color.bg_light; + }; }; ######################################################## @@ -216,4 +259,3 @@ in ''; }; } - diff --git a/user/qutebrowser/dark-theme.nix b/user/qutebrowser/dark-theme.nix index a596251..6acd813 100644 --- a/user/qutebrowser/dark-theme.nix +++ b/user/qutebrowser/dark-theme.nix @@ -1,63 +1,71 @@ -{ config, pkgs, lib, font, ... }: +{ + config, + pkgs, + lib, + font, + ... +}: let inherit (pkgs.uservars) theme; inherit (theme) color; # ".config/qutebrowser/greasemonkey/darkreader.js".text = - darkThemeUserscript = enabled: pkgs.writeText "darkreader.js" '' - // ==UserScript== - // @name Dark Reader (Unofficial) - // @icon https://darkreader.org/images/darkreader-icon-256x256.png - // @namespace DarkReader - // @description Inverts the brightness of pages to reduce eye strain - // @version 4.7.15 - // @author https://github.com/darkreader/darkreader#contributors - // @homepageURL https://darkreader.org/ | https://github.com/darkreader/darkreader - // @run-at document-end - // @grant none - // @include http* - // @require https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js - // @noframes - // ==/UserScript== + darkThemeUserscript = + enabled: + pkgs.writeText "darkreader.js" '' + // ==UserScript== + // @name Dark Reader (Unofficial) + // @icon https://darkreader.org/images/darkreader-icon-256x256.png + // @namespace DarkReader + // @description Inverts the brightness of pages to reduce eye strain + // @version 4.7.15 + // @author https://github.com/darkreader/darkreader#contributors + // @homepageURL https://darkreader.org/ | https://github.com/darkreader/darkreader + // @run-at document-end + // @grant none + // @include http* + // @require https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js + // @noframes + // ==/UserScript== - DarkReader.setFetchMethod(window.fetch) + DarkReader.setFetchMethod(window.fetch) - if (${if enabled then "false" else "true"}) { - DarkReader.disable(); - return; - } + if (${if enabled then "false" else "true"}) { + DarkReader.disable(); + return; + } - const ignore_list = [ - "askubuntu.com", - "mathoverflow.com", - "mathoverflow.net", - "serverfault.com", - "stackapps.com", - "stackexchange.com", - "stackoverflow.com", - "superuser.com", - "hub.docker.com", - ]; + const ignore_list = [ + "askubuntu.com", + "mathoverflow.com", + "mathoverflow.net", + "serverfault.com", + "stackapps.com", + "stackexchange.com", + "stackoverflow.com", + "superuser.com", + "hub.docker.com", + ]; - for (let item of ignore_list) { - if (window.location.origin.indexOf(item) >= 0) { - console.log("URL matched dark-mode ignore list"); - return; - } - } + for (let item of ignore_list) { + if (window.location.origin.indexOf(item) >= 0) { + console.log("URL matched dark-mode ignore list"); + return; + } + } - DarkReader.enable({ - brightness: 100, - contrast: 100, - sepia: 0, + DarkReader.enable({ + brightness: 100, + contrast: 100, + sepia: 0, - darkSchemeBackgroundColor: "${color.bg}", - darkSchemeTextColor: "${color.txt}", + darkSchemeBackgroundColor: "${color.bg}", + darkSchemeTextColor: "${color.txt}", - lightSchemeBackgroundColor: "${color.bg}", - lightSchemeTextColor: "${color.txt}", - }); - ''; + lightSchemeBackgroundColor: "${color.bg}", + lightSchemeTextColor: "${color.txt}", + }); + ''; in { programs.qutebrowser.keyBindings = { @@ -87,4 +95,3 @@ in ''; }; } - diff --git a/user/qutebrowser/default.nix b/user/qutebrowser/default.nix index 0f2914a..c115cca 100644 --- a/user/qutebrowser/default.nix +++ b/user/qutebrowser/default.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, font, ... }: +{ + config, + pkgs, + lib, + font, + ... +}: let inherit (pkgs.uservars) key browser editor; in @@ -59,7 +65,6 @@ in "${key.insertMode}" = "mode-enter insert"; }; - }; settings = { tabs.tree_tabs = true; @@ -78,7 +83,8 @@ in { kakoune = "kak"; helix = "hx"; - }.${editor} + } + .${editor} "{file}" "+{line}" ]; @@ -112,7 +118,9 @@ in ExecStart = "${pkgs.qutebrowser}/bin/qutebrowser"; Restart = "on-failure"; }; - Install = { WantedBy = [ "sway-session.target" ]; }; + Install = { + WantedBy = [ "sway-session.target" ]; + }; }; }; home.file = { @@ -149,4 +157,3 @@ in }; }; } - diff --git a/user/qutebrowser/fonts.nix b/user/qutebrowser/fonts.nix index e6eee6b..6ab43de 100644 --- a/user/qutebrowser/fonts.nix +++ b/user/qutebrowser/fonts.nix @@ -33,4 +33,3 @@ in }; }; } - diff --git a/user/ranger/default.nix b/user/ranger/default.nix index ec09936..4b97170 100644 --- a/user/ranger/default.nix +++ b/user/ranger/default.nix @@ -1,4 +1,11 @@ -{ config, pkgs, lib, inputs, ... }: { +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ xdg.configFile = { "ranger/rc.conf".source = ./rc.conf; "ranger/rifle.conf".source = ./rifle.conf; diff --git a/user/rofi.nix b/user/rofi.nix index d9026d2..79307eb 100644 --- a/user/rofi.nix +++ b/user/rofi.nix @@ -1,6 +1,17 @@ -{ config, pkgs, lib, font, ... }: +{ + config, + pkgs, + lib, + font, + ... +}: let - inherit (pkgs.uservars) key theme accent font; + inherit (pkgs.uservars) + key + theme + accent + font + ; inherit (theme) color; in { @@ -42,14 +53,15 @@ in }; "#window" = { - background-color = mkLiteral - "${color.bg}${lib.toHexString (theme.opacity * 255 / 100)}"; + background-color = mkLiteral "${color.bg}${lib.toHexString (theme.opacity * 255 / 100)}"; # children = map mkLiteral [ "prompt" "entry" ]; border = mkLiteral "2px solid"; border-color = mkLiteral accent.color; padding = 0; }; - "#inputbar" = { margin = mkLiteral "10px"; }; + "#inputbar" = { + margin = mkLiteral "10px"; + }; "#listview" = { # fixed-height=0; border = mkLiteral "2px solid 0px 0px"; @@ -78,9 +90,7 @@ in margin-right = mkLiteral "20px"; size = 24; }; - }; - }; }; } diff --git a/user/ssh.nix b/user/ssh.nix index 8230dc1..3193876 100644 --- a/user/ssh.nix +++ b/user/ssh.nix @@ -1,6 +1,13 @@ -{ config, pkgs, lib, ... }: -let inherit (pkgs.uservars) username mail; -in { +{ + config, + pkgs, + lib, + ... +}: +let + inherit (pkgs.uservars) username mail; +in +{ config = { programs.ssh.enable = true; programs.ssh.matchBlocks = { diff --git a/user/sway/default.nix b/user/sway/default.nix index 7719370..d7afafd 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; in { @@ -42,7 +52,13 @@ in bg_color = color.bg_dark; alert = "#000000"; client = border: background: text: indicator: childBorder: { - inherit border background text indicator childBorder; + inherit + border + background + text + indicator + childBorder + ; }; in { @@ -79,9 +95,7 @@ in }; # setup cursor based on home.pointerCursor seat."*" = { - xcursor_theme = "${config.home.pointerCursor.name} ${ - toString config.home.pointerCursor.size - }"; + xcursor_theme = "${config.home.pointerCursor.name} ${toString config.home.pointerCursor.size}"; hide_cursor = "when-typing enable"; }; }; @@ -132,7 +146,10 @@ in grim swappy (tesseract5.override { - enableLanguages = [ "eng" "por" ]; + enableLanguages = [ + "eng" + "por" + ]; }) ]; }; diff --git a/user/sway/kanshi.nix b/user/sway/kanshi.nix index 22d9550..f35fd4f 100644 --- a/user/sway/kanshi.nix +++ b/user/sway/kanshi.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; in { @@ -26,11 +36,13 @@ in { profile = { name = "nomad"; - outputs = [{ - criteria = "eDP-1"; - status = "enable"; - position = "1920,312"; - }]; + outputs = [ + { + criteria = "eDP-1"; + status = "enable"; + position = "1920,312"; + } + ]; exec = [ "xrdb .Xresources" ]; }; } diff --git a/user/sway/mako.nix b/user/sway/mako.nix index 637a2d5..c8575ab 100644 --- a/user/sway/mako.nix +++ b/user/sway/mako.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; in { @@ -48,6 +58,8 @@ in ExecStart = "${pkgs.mako}/bin/mako"; Restart = "on-failure"; }; - Install = { WantedBy = [ "sway-session.target" ]; }; + Install = { + WantedBy = [ "sway-session.target" ]; + }; }; } diff --git a/user/sway/sway-assigns.nix b/user/sway/sway-assigns.nix index ff46238..0d1eefd 100644 --- a/user/sway/sway-assigns.nix +++ b/user/sway/sway-assigns.nix @@ -1,20 +1,18 @@ { config, pkgs, ... }: let - # inherit (pkgs.uservars) key accent font theme; - # inherit (theme) color; - # inherit (pkgs) lib; - - # mod = "Mod4"; - # menu = "wlauncher"; - # terminal = "alacritty"; - - # locked_binds = - # lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v); - # code_binds = - # lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v); - # return_mode = lib.mapAttrs (k: v: "${v}; mode default"); - # playerctl = "exec ${pkgs.playerctl}/bin/playerctl"; in +# inherit (pkgs.uservars) key accent font theme; +# inherit (theme) color; +# inherit (pkgs) lib; +# mod = "Mod4"; +# menu = "wlauncher"; +# terminal = "alacritty"; +# locked_binds = +# lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v); +# code_binds = +# lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v); +# return_mode = lib.mapAttrs (k: v: "${v}; mode default"); +# playerctl = "exec ${pkgs.playerctl}/bin/playerctl"; { wayland.windowManager.sway.config = { assigns = { diff --git a/user/sway/sway-binds.nix b/user/sway/sway-binds.nix index 360ccdc..fe22594 100644 --- a/user/sway/sway-binds.nix +++ b/user/sway/sway-binds.nix @@ -1,6 +1,11 @@ { config, pkgs, ... }: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; inherit (pkgs) lib; @@ -21,29 +26,27 @@ let # mod+1 to swich to workspace 1 # mod+shift+1 to move to workspace 1 - workspace_binds = lib.forEachMerge (lib.range 1 10) (i: + workspace_binds = lib.forEachMerge (lib.range 1 10) ( + i: let key = toString (lib.mod i 10); workspaceNumber = toString i; in { "${mod}+${key}" = "workspace number ${workspaceNumber}"; - "${mod}+Shift+${key}" = - "move container to workspace number ${workspaceNumber}"; - }); + "${mod}+Shift+${key}" = "move container to workspace number ${workspaceNumber}"; + } + ); prev_next_binds = let - maybe_window = key: - if (lib.strings.hasInfix "button" key) then - "--whole-window" - else - ""; - makePrevNextBindFunction = (prev_or_next: + maybe_window = key: if (lib.strings.hasInfix "button" key) then "--whole-window" else ""; + makePrevNextBindFunction = ( + prev_or_next: map (key: { - "${maybe_window key} ${mod}+${key}" = - "workspace ${prev_or_next}_on_output"; - })); + "${maybe_window key} ${mod}+${key}" = "workspace ${prev_or_next}_on_output"; + }) + ); prev_binds = makePrevNextBindFunction "prev" [ key.tabL "bracketleft" @@ -67,36 +70,51 @@ let # for every direction with both arrow keys and vim keys movement_binds = let - directions = [ "Left" "Up" "Right" "Down" ]; + directions = [ + "Left" + "Up" + "Right" + "Down" + ]; makeVimKeys = (k: key.${lib.toLower k}); makeArrowKeys = (k: k); - makeResizeCommand = direction: + makeResizeCommand = + direction: { Left = "shrink width 20px"; Up = "shrink height 20px"; Right = "grow width 20px"; Down = "grow height 20px"; - }.${direction}; + } + .${direction}; in - lib.forEachMerge [ makeVimKeys makeArrowKeys ] (prefixFun: - lib.forEachMerge directions (direction: - let - resize_cmd = makeResizeCommand direction; - keyBind = prefixFun direction; - in - { - # Move focus - "${mod}+${keyBind}" = "focus ${direction}"; - # Move window - "${mod}+Shift+${keyBind}" = "move ${direction}"; - # Resize window - "${mod}+Control+${keyBind}" = "resize ${resize_cmd}"; - # focus output - "${mod}+mod1+${keyBind}" = "focus output ${direction}"; - # Move workspace to output - "${mod}+mod1+Shift+${keyBind}" = - "move workspace output ${direction}"; - })); + lib.forEachMerge + [ + makeVimKeys + makeArrowKeys + ] + ( + prefixFun: + lib.forEachMerge directions ( + direction: + let + resize_cmd = makeResizeCommand direction; + keyBind = prefixFun direction; + in + { + # Move focus + "${mod}+${keyBind}" = "focus ${direction}"; + # Move window + "${mod}+Shift+${keyBind}" = "move ${direction}"; + # Resize window + "${mod}+Control+${keyBind}" = "resize ${resize_cmd}"; + # focus output + "${mod}+mod1+${keyBind}" = "focus output ${direction}"; + # Move workspace to output + "${mod}+mod1+Shift+${keyBind}" = "move workspace output ${direction}"; + } + ) + ); parenting_binds = { "${mod}+equal" = "focus parent"; @@ -116,8 +134,7 @@ let XF86AudioRaiseVolume = "exec volumesh -i 10"; XF86AudioLowerVolume = "exec volumesh -d 10"; XF86AudioMute = "exec volumesh -t"; - XF86AudioMicMute = - "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle"; + XF86AudioMicMute = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle"; # Control media XF86AudioPlay = "exec playerctl play-pause"; XF86AudioPause = "exec playerctl play-pause"; @@ -136,8 +153,7 @@ let # Screen area to file "Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area"; # Screen area to clipboard - "Control+Shift+Print" = - "exec ${pkgs.screenshotsh}/bin/screenshotsh area-clip"; + "Control+Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area-clip"; # Focused monitor to clipboard "Control+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh clip"; }; @@ -155,8 +171,7 @@ let "${mod}+Alt+x" = "exec pkill wl-crosshair || exec wl-crosshair"; "${mod}+x" = "kill"; "${mod}+m" = "mode audio"; - "${mod}+escape" = - "mode passthrough;exec notify-send 'Passthrough on'"; + "${mod}+escape" = "mode passthrough;exec notify-send 'Passthrough on'"; "${mod}+ctrl+k" = "exec swaymsg input type:pointer events disabled"; "${mod}+ctrl+shift+k" = "exec swaymsg input type:pointer events enabled"; "${mod}+f" = "fullscreen toggle"; diff --git a/user/sway/sway-modes.nix b/user/sway/sway-modes.nix index 7cb82bd..ea75ca8 100644 --- a/user/sway/sway-modes.nix +++ b/user/sway/sway-modes.nix @@ -1,6 +1,11 @@ { config, pkgs, ... }: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; inherit (pkgs) lib; @@ -8,10 +13,8 @@ let menu = "wlauncher"; terminal = "alacritty"; - locked = - lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v); - to-code = - lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v); + locked = lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v); + to-code = lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v); quit-mode = lib.mapAttrs (k: v: "${v}; mode default"); playerctl = "exec ${pkgs.playerctl}/bin/playerctl"; @@ -20,20 +23,32 @@ in { wayland.windowManager.sway.config.modes = { audio = - (bind_group [ to-code locked ] { - ${key.tabR} = "exec volumesh -i 10"; - ${key.tabL} = "exec volumesh -d 10"; - ${key.right} = "exec mpc next"; - ${key.left} = "exec mpc prev"; - ${key.up} = "exec volumesh --mpd -i 10"; - ${key.down} = "exec volumesh --mpd -d 10"; - }) // - (bind_group [ locked quit-mode ] { - "space" = "exec mpc toggle"; - "escape" = ""; - "q" = ""; - }) // - (bind_group [ quit-mode ] { + (bind_group + [ + to-code + locked + ] + { + ${key.tabR} = "exec volumesh -i 10"; + ${key.tabL} = "exec volumesh -d 10"; + ${key.right} = "exec mpc next"; + ${key.left} = "exec mpc prev"; + ${key.up} = "exec volumesh --mpd -i 10"; + ${key.down} = "exec volumesh --mpd -d 10"; + } + ) + // (bind_group + [ + locked + quit-mode + ] + { + "space" = "exec mpc toggle"; + "escape" = ""; + "q" = ""; + } + ) + // (bind_group [ quit-mode ] { "m" = "exec volumesh -t"; "s" = "exec ${pkgs.pulse_sink}/bin/pulse_sink"; @@ -47,28 +62,38 @@ in "Ctrl+s" = "exec ${pkgs.musmenu}/bin/musmenu psave"; "Ctrl+o" = "exec ${pkgs.musmenu}/bin/musmenu pload"; "Ctrl+d" = "exec ${pkgs.musmenu}/bin/musmenu pdelete"; - }) // - { + }) + // { "p" = "mode playerctl"; "Ctrl+c" = "exec musmenu pclear"; - } - ; + }; playerctl = - (bind_group [ to-code locked ] { - ${key.left} = "${playerctl} previous"; - ${key.right} = "${playerctl} next"; - ${key.up} = "${playerctl} volume 10+"; - ${key.down} = "${playerctl} volume 10-"; - ${key.tabR} = "${playerctl} volume 10+"; - ${key.tabL} = "${playerctl} volume 10-"; - }) // - (bind_group [ to-code quit-mode ] { - "space" = "${playerctl} play-pause"; - "escape" = ""; - "q" = ""; - }) - ; + (bind_group + [ + to-code + locked + ] + { + ${key.left} = "${playerctl} previous"; + ${key.right} = "${playerctl} next"; + ${key.up} = "${playerctl} volume 10+"; + ${key.down} = "${playerctl} volume 10-"; + ${key.tabR} = "${playerctl} volume 10+"; + ${key.tabL} = "${playerctl} volume 10-"; + } + ) + // (bind_group + [ + to-code + quit-mode + ] + { + "space" = "${playerctl} play-pause"; + "escape" = ""; + "q" = ""; + } + ); passthrough = { "${mod}+escape" = "mode default;exec notify-send 'Passthrough off'"; diff --git a/user/sway/swayidle.nix b/user/sway/swayidle.nix index 7b659ed..b0bd455 100644 --- a/user/sway/swayidle.nix +++ b/user/sway/swayidle.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; asScript = filename: text: toString (pkgs.writeShellScript filename text); diff --git a/user/sway/swaylock.nix b/user/sway/swaylock.nix index f9f06eb..eb6104e 100644 --- a/user/sway/swaylock.nix +++ b/user/sway/swaylock.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; in { diff --git a/user/sway/theme.nix b/user/sway/theme.nix index 2fc1fc1..202eaff 100644 --- a/user/sway/theme.nix +++ b/user/sway/theme.nix @@ -1,38 +1,53 @@ -{ config, pkgs, lib, inputs, ... }: +{ + config, + pkgs, + lib, + inputs, + ... +}: let inherit (pkgs.uservars) theme font desktop; - inherit (theme) color gtk_theme icon_theme cursor_theme; + inherit (theme) + color + gtk_theme + icon_theme + cursor_theme + ; in -lib.mkIf (desktop == "sway") -{ +lib.mkIf (desktop == "sway") { home.pointerCursor = { name = cursor_theme; size = 24; package = pkgs.bibata-cursors; gtk.enable = true; }; - gtk = { - enable = true; - font = { - name = font.interface; - size = font.size.small; - }; - theme = { - name = gtk_theme; - package = pkgs.orchis_theme_compact; - }; - iconTheme = { - name = icon_theme; - package = pkgs.papirus_red; - }; - } // ( - let - shared.extraConfig = { - gtk-decoration-layout = "menu:"; + gtk = + { + enable = true; + font = { + name = font.interface; + size = font.size.small; }; - in - { gtk4 = shared; gtk3 = shared; } - ); + theme = { + name = gtk_theme; + package = pkgs.orchis_theme_compact; + }; + iconTheme = { + name = icon_theme; + package = pkgs.papirus_red; + }; + } + // ( + let + shared.extraConfig = { + gtk-decoration-layout = "menu:"; + }; + in + { + gtk4 = shared; + gtk3 = shared; + } + ); qt = { enable = true; platformTheme.name = "qtct"; diff --git a/user/syncthing.nix b/user/syncthing.nix index 8f36eeb..76e3584 100644 --- a/user/syncthing.nix +++ b/user/syncthing.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ services.syncthing = { enable = true; tray = { diff --git a/user/thunar.nix b/user/thunar.nix index 3921eb5..2a9fe5b 100644 --- a/user/thunar.nix +++ b/user/thunar.nix @@ -1,8 +1,12 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = with pkgs; [ _thunar-terminal (xfce.thunar.override { - thunarPlugins = with pkgs.xfce; [ thunar-volman thunar-archive-plugin ]; + thunarPlugins = with pkgs.xfce; [ + thunar-volman + thunar-archive-plugin + ]; }) ]; diff --git a/user/vdir.nix b/user/vdir.nix index 61170df..80e6145 100644 --- a/user/vdir.nix +++ b/user/vdir.nix @@ -1,19 +1,23 @@ { pkgs, lib, ... }: let inherit (pkgs.uservars) nextcloud; - pass_cmd = (pkgs.writeShellScript "get_pass" '' - pass "${nextcloud.pass}" | head -n1 - ''); + pass_cmd = ( + pkgs.writeShellScript "get_pass" '' + pass "${nextcloud.pass}" | head -n1 + '' + ); in { systemd.user.services.vdirsyncer = { Unit.Description = "vdirsyncer calendar and contacts synchronization"; Service = { Type = "oneshot"; - ExecStart = toString (pkgs.writeShellScript "run-vdirsyncer" '' - ${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer discover - ${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer sync - ''); + ExecStart = toString ( + pkgs.writeShellScript "run-vdirsyncer" '' + ${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer discover + ${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer sync + '' + ); }; }; systemd.user.timers.vdirsyncer = { @@ -45,9 +49,9 @@ in [storage contacts_remote] type = "carddav" - url = "https://${ nextcloud.host }/remote.php/dav/addressbooks/users/${ nextcloud.user }/" - username = "${ nextcloud.user }" - password.fetch = [ "command", "${ pass_cmd }" ] + url = "https://${nextcloud.host}/remote.php/dav/addressbooks/users/${nextcloud.user}/" + username = "${nextcloud.user}" + password.fetch = [ "command", "${pass_cmd}" ] [pair calendar] a = "calendar_local" @@ -63,9 +67,9 @@ in [storage calendar_remote] type = "caldav" - url = "https://${ nextcloud.host }/remote.php/dav/calendars/${ nextcloud.user }/" - username = "${ nextcloud.user }" - password.fetch = [ "command", "${ pass_cmd }" ] + url = "https://${nextcloud.host}/remote.php/dav/calendars/${nextcloud.user}/" + username = "${nextcloud.user}" + password.fetch = [ "command", "${pass_cmd}" ] ''; "todoman/config.py".text = '' path = "~/.local/share/calendars/*" @@ -76,10 +80,8 @@ in ''; }; - home.packages = with pkgs; [ vdirsyncer todoman ]; - } diff --git a/user/vscode/default.nix b/user/vscode/default.nix index 48851a0..35d972b 100644 --- a/user/vscode/default.nix +++ b/user/vscode/default.nix @@ -1,4 +1,5 @@ -{ pkgs, config, ... }: { +{ pkgs, config, ... }: +{ programs.vscode = { enable = true; diff --git a/user/waybar/default.nix b/user/waybar/default.nix index 5e4f329..95615fa 100644 --- a/user/waybar/default.nix +++ b/user/waybar/default.nix @@ -1,6 +1,18 @@ -{ config, osConfig, pkgs, lib, font, ... }: +{ + config, + osConfig, + pkgs, + lib, + font, + ... +}: let - inherit (pkgs.uservars) key theme accent font; + inherit (pkgs.uservars) + key + theme + accent + font + ; inherit (theme) color; in { @@ -9,184 +21,226 @@ in enable = true; systemd.enable = true; systemd.target = "sway-session.target"; - settings = [{ - layer = "top"; - modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ]; - modules-center = [ "clock" ]; - modules-right = lib.flatten [ - "sway/language" - "mpd" - "custom/playerctl" - "tray" - "custom/caffeine" - "pulseaudio" - (lib.optional (osConfig.services.vpn.enable or false) "custom/vpn") - "network" - "battery" - ]; - battery = { - tooltip = true; - states = { - full = 100; - good = 95; - warning = 25; - }; - format = "{icon} "; - format-charging = ""; - format-plugged = ""; - format-full = ""; - format-warning = "{icon} {time}"; - format-icons = [ "" "" "" "" "" "" ]; - }; - network = { - interval = 5; - tooltip = false; - on-click = "terminal -e iwd"; - format-wifi = "{icon}"; - format-icons = [ "" "" "" "" "" ]; - format-ethernet = "󰈀"; - format-linked = "󰈀"; - format-disconnected = ""; - }; - "sway/workspaces" = { - enable-bar-scroll = true; - format = "{icon}"; - format-icons = { - "1" = ""; - "2" = ""; - "3" = "󰅩"; - "4" = ""; - "5" = ""; - "6" = ""; - "7" = "󰇮"; - "8" = ""; - "9" = ""; - "10" = ""; - urgent = ""; - # focused = ""; - default = ""; - }; - }; - "sway/window" = { max-length = 40; }; - "tray" = { - "spacing" = 7; - "icon-size" = 19; - }; - clock = { - interval = 60; - format = "{:%H:%M %a %d/%m}"; - tooltip-format = "{calendar}"; - calendar = { - mode = "year"; - mode-mon-col = 3; - weeks-pos = "right"; - on-scroll = 1; - on-click-right = "mode"; - format = { - months = "{}"; - days = "{}"; - weeks = "W{}"; - weekdays = "{}"; - today = "{}"; + settings = [ + { + layer = "top"; + modules-left = [ + "sway/workspaces" + "sway/mode" + "sway/window" + ]; + modules-center = [ "clock" ]; + modules-right = lib.flatten [ + "sway/language" + "mpd" + "custom/playerctl" + "tray" + "custom/caffeine" + "pulseaudio" + (lib.optional (osConfig.services.vpn.enable or false) "custom/vpn") + "network" + "battery" + ]; + battery = { + tooltip = true; + states = { + full = 100; + good = 95; + warning = 25; }; + format = "{icon} "; + format-charging = ""; + format-plugged = ""; + format-full = ""; + format-warning = "{icon} {time}"; + format-icons = [ + "" + "" + "" + "" + "" + "" + ]; }; - actions = { - on-click-right = "mode"; - on-click-forward = "tz_up"; - on-click-backward = "tz_down"; - on-scroll-up = "shift_up"; - on-scroll-down = "shift_down"; - }; - }; - mpd = - let - mpc = "${pkgs.mpc-cli}/bin/mpc"; - in - { - format = "{stateIcon} {title} - {artist}"; - format-paused = "{stateIcon}"; - format-stopped = ""; - state-icons = { - stopped = ""; - paused = ""; - playing = ""; - }; + network = { + interval = 5; tooltip = false; - on-click = "${mpc} toggle"; - on-scroll-up = "${mpc} vol +10"; - on-scroll-down = "${mpc} vol -10"; + on-click = "terminal -e iwd"; + format-wifi = "{icon}"; + format-icons = [ + "" + "" + "" + "" + "" + ]; + format-ethernet = "󰈀"; + format-linked = "󰈀"; + format-disconnected = ""; }; - "custom/playerctl" = { - format = "{} "; - exec = "${pkgs.playerctl-status}/bin/playerctl-status"; - on-click = "${pkgs.playerctl}/bin/playerctl --ignore-player=mpd play-pause"; - interval = 1; - tooltip = false; - }; - "sway/language" = { format = "{short} {variant}"; }; - "custom/caffeine" = { - format = "{}"; - exec = "systemctl --user status swayidle > /dev/null && echo 󰒲 || echo 󰒳"; - on-click = "${pkgs._sway_idle_toggle}/bin/_sway_idle_toggle"; - interval = 1; - tooltip = false; - }; - "custom/vpn" = lib.mkIf (osConfig.services.vpn.enable or false) { - format = "{}"; - exec = '' - ${pkgs.mullvad}/bin/mullvad status | ${pkgs.gnugrep}/bin/grep "^Connected" > /dev/null \ - && echo "" \ - || echo "" - ''; - on-click = "mullvad connect"; - on-click-right = "mullvad disconnect"; - interval = 1; - tooltip = false; - }; - pulseaudio = { - interval = 5; - tooltip = false; - scroll-step = 10; - format = "{icon}"; - format-bluetooth = ""; - format-bluetooth-muted = "󰝟"; - format-muted = "󰝟"; - format-icons = { - "rtp-sink" = - [ "󰕿" "󰖀" "󰕾" ]; - "alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo" = - [ " 󰕿" " 󰖀" " 󰕾" ]; - "alsa_output.pci-0000_09_00.4.analog-stereo" = - [ " 󰕿" " 󰖀" " 󰕾" ]; - headphone = [ " 󰕿" " 󰖀" " 󰕾" ]; - handsfree = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = [ "󰕿" "󰖀" "󰕾" ]; + "sway/workspaces" = { + enable-bar-scroll = true; + format = "{icon}"; + format-icons = { + "1" = ""; + "2" = ""; + "3" = "󰅩"; + "4" = ""; + "5" = ""; + "6" = ""; + "7" = "󰇮"; + "8" = ""; + "9" = ""; + "10" = ""; + urgent = ""; + # focused = ""; + default = ""; + }; }; - on-click = "pavucontrol"; - on-click-right = "${pkgs.pulse_sink}/bin/pulse_sink"; - on-scroll-up = "${pkgs.volumesh}/bin/volumesh -i 10"; - on-scroll-down = "${pkgs.volumesh}/bin/volumesh -d 10"; - }; - }]; - style = builtins.readFile (pkgs.substituteAll { - src = ./style.css; + "sway/window" = { + max-length = 40; + }; + "tray" = { + "spacing" = 7; + "icon-size" = 19; + }; + clock = { + interval = 60; + format = "{:%H:%M %a %d/%m}"; + tooltip-format = "{calendar}"; + calendar = { + mode = "year"; + mode-mon-col = 3; + weeks-pos = "right"; + on-scroll = 1; + on-click-right = "mode"; + format = { + months = "{}"; + days = "{}"; + weeks = "W{}"; + weekdays = "{}"; + today = "{}"; + }; + }; + actions = { + on-click-right = "mode"; + on-click-forward = "tz_up"; + on-click-backward = "tz_down"; + on-scroll-up = "shift_up"; + on-scroll-down = "shift_down"; + }; + }; + mpd = + let + mpc = "${pkgs.mpc-cli}/bin/mpc"; + in + { + format = "{stateIcon} {title} - {artist}"; + format-paused = "{stateIcon}"; + format-stopped = ""; + state-icons = { + stopped = ""; + paused = ""; + playing = ""; + }; + tooltip = false; + on-click = "${mpc} toggle"; + on-scroll-up = "${mpc} vol +10"; + on-scroll-down = "${mpc} vol -10"; + }; + "custom/playerctl" = { + format = "{} "; + exec = "${pkgs.playerctl-status}/bin/playerctl-status"; + on-click = "${pkgs.playerctl}/bin/playerctl --ignore-player=mpd play-pause"; + interval = 1; + tooltip = false; + }; + "sway/language" = { + format = "{short} {variant}"; + }; + "custom/caffeine" = { + format = "{}"; + exec = "systemctl --user status swayidle > /dev/null && echo 󰒲 || echo 󰒳"; + on-click = "${pkgs._sway_idle_toggle}/bin/_sway_idle_toggle"; + interval = 1; + tooltip = false; + }; + "custom/vpn" = lib.mkIf (osConfig.services.vpn.enable or false) { + format = "{}"; + exec = '' + ${pkgs.mullvad}/bin/mullvad status | ${pkgs.gnugrep}/bin/grep "^Connected" > /dev/null \ + && echo "" \ + || echo "" + ''; + on-click = "mullvad connect"; + on-click-right = "mullvad disconnect"; + interval = 1; + tooltip = false; + }; + pulseaudio = { + interval = 5; + tooltip = false; + scroll-step = 10; + format = "{icon}"; + format-bluetooth = ""; + format-bluetooth-muted = "󰝟"; + format-muted = "󰝟"; + format-icons = { + "rtp-sink" = [ + "󰕿" + "󰖀" + "󰕾" + ]; + "alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo" = [ + " 󰕿" + " 󰖀" + " 󰕾" + ]; + "alsa_output.pci-0000_09_00.4.analog-stereo" = [ + " 󰕿" + " 󰖀" + " 󰕾" + ]; + headphone = [ + " 󰕿" + " 󰖀" + " 󰕾" + ]; + handsfree = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ + "󰕿" + "󰖀" + "󰕾" + ]; + }; + on-click = "pavucontrol"; + on-click-right = "${pkgs.pulse_sink}/bin/pulse_sink"; + on-scroll-up = "${pkgs.volumesh}/bin/volumesh -i 10"; + on-scroll-down = "${pkgs.volumesh}/bin/volumesh -d 10"; + }; + } + ]; + style = builtins.readFile ( + pkgs.substituteAll { + src = ./style.css; - accent_color = accent.color; + accent_color = accent.color; - color_bg = color.bg; - color_bg_dark = color.bg_dark; - color_bg_light = color.bg_light; - color_txt = color.txt; + color_bg = color.bg; + color_bg_dark = color.bg_dark; + color_bg_light = color.bg_light; + color_txt = color.txt; - font_interface = font.interface; + font_interface = font.interface; - font_size_big = "${toString font.size.big}px"; - font_size_medium = "${toString font.size.medium}px"; - }); + font_size_big = "${toString font.size.big}px"; + font_size_medium = "${toString font.size.medium}px"; + } + ); }; home.packages = with pkgs; [ waybar ]; }; diff --git a/user/xdg-dirs.nix b/user/xdg-dirs.nix index d95d6de..a9e1c9b 100644 --- a/user/xdg-dirs.nix +++ b/user/xdg-dirs.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, inputs, ... }: +{ + config, + pkgs, + lib, + inputs, + ... +}: let HOME = config.home.homeDirectory; in diff --git a/user/zathura.nix b/user/zathura.nix index d3c9f5e..ccb4c42 100644 --- a/user/zathura.nix +++ b/user/zathura.nix @@ -1,6 +1,17 @@ -{ config, pkgs, lib, font, ... }: +{ + config, + pkgs, + lib, + font, + ... +}: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; in { From 81e474d726bda0a5b1126d12a87368171e93b153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 30 May 2024 16:55:40 -0300 Subject: [PATCH 052/107] flake: set formatter to nixfmt-rfc-style --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index daecf26..8f847b0 100644 --- a/flake.nix +++ b/flake.nix @@ -182,6 +182,6 @@ packages.${system} = pkgs // packages; - formatter.${system} = pkgs.nixpkgs-fmt; + formatter.${system} = pkgs.nixfmt-rfc-style; }; } From fae2c2e6560a64771534f929adf194093043f28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 30 May 2024 21:48:43 -0300 Subject: [PATCH 053/107] controller: add auto-connect service --- scripts/auto_connect_gamepad | 26 ++++++++++++++++++++++++++ scripts/default.nix | 1 + user/controller.nix | 29 +++++++++++++++++------------ 3 files changed, 44 insertions(+), 12 deletions(-) create mode 100755 scripts/auto_connect_gamepad diff --git a/scripts/auto_connect_gamepad b/scripts/auto_connect_gamepad new file mode 100755 index 0000000..9753966 --- /dev/null +++ b/scripts/auto_connect_gamepad @@ -0,0 +1,26 @@ +#!/bin/sh + +list_paired_controllers() { + bluetoothctl devices Paired | grep -i 'controller' | cut -d' ' -f2 +} + +count_connected_controllers() { + bluetoothctl devices Connected | grep -i 'controller' | wc -l +} + +try_to_connect_to_all_controllers() { + list_paired_controllers | while read paired_controller; do + echo "Trying to connect to controller $paired_controller" + bluetoothctl connect "$paired_controller" + done +} + +while true; do + echo "looping" + if test "$(count_connected_controllers)" -ne 0 ; then + echo "there is a controller connected, not attempting to connect to any other" + sleep 10s + continue + fi + try_to_connect_to_all_controllers +done diff --git a/scripts/default.nix b/scripts/default.nix index f509e37..12d38d3 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -125,6 +125,7 @@ zbar wl-clipboard ]; + auto_connect_gamepad = [ bluez ]; } // lib.mapAttrs import_script { wdmenu = ./wdmenu.nix; diff --git a/user/controller.nix b/user/controller.nix index 6a756df..fe08a98 100644 --- a/user/controller.nix +++ b/user/controller.nix @@ -1,17 +1,22 @@ +{ pkgs, lib, ... }: { - config, - pkgs, - lib, - inputs, - ... -}: -{ - xdg.desktopEntries = { - connect-controller = { - name = "Connect Controller"; - exec = "bluetoothctl connect 84:30:95:97:1A:79"; - terminal = false; + systemd.user.services = { + autoconnect-gamepad = { + Unit = { + Description = "Attempt to connect to game controllers"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + Service = { + ExecStart = lib.getExe pkgs.auto_connect_gamepad; + }; + Install = { + WantedBy = [ "sway-session.target" ]; + }; }; + }; + + xdg.desktopEntries = { disconnect-controller = { name = "Disconnect Controller"; exec = "bluetoothctl disconnect 84:30:95:97:1A:79"; From da736e199c6a1b0ae05e9e6901289c09c4abfc71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 31 May 2024 11:40:43 -0300 Subject: [PATCH 054/107] email: add aliases --- hosts/phantom/email.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hosts/phantom/email.nix b/hosts/phantom/email.nix index e0a135e..a34780a 100644 --- a/hosts/phantom/email.nix +++ b/hosts/phantom/email.nix @@ -22,11 +22,7 @@ loginAccounts = { "lelgenio@lelgenio.com" = { hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS"; - aliases = [ "postmaster@lelgenio.com" ]; - }; - "lelgenio@lelgenio.xyz" = { - hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS"; - aliases = [ "postmaster@lelgenio.xyz" ]; + aliases = [ "postmaster@lelgenio.com" "lelgenio@lelgenio.xyz" "lelgenio@lelgenio.xyz" ]; }; "noreply@git.lelgenio.com" = { hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0."; From 6c6e82aae8adf539f05c69853a6d949b5191e800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 9 Dec 2023 12:10:14 -0300 Subject: [PATCH 055/107] switch to nixpkgs unstable --- flake.lock | 387 ++++-------------- flake.nix | 4 +- ...m-generation-after-generation-switch.patch | 27 -- system/configuration.nix | 2 + 4 files changed, 83 insertions(+), 337 deletions(-) delete mode 100644 patches/nixpkgs/fix-steam-generation-after-generation-switch.patch diff --git a/flake.lock b/flake.lock index f25a618..ca0d863 100644 --- a/flake.lock +++ b/flake.lock @@ -38,15 +38,14 @@ "home-manager": "home-manager", "nixpkgs": [ "nixpkgs" - ], - "systems": "systems" + ] }, "locked": { - "lastModified": 1707830867, - "narHash": "sha256-PAdwm5QqdlwIqGrfzzvzZubM+FXtilekQ/FA0cI49/o=", + "lastModified": 1701216516, + "narHash": "sha256-jKSeJn+7hZ1dZdiH1L+NWUGT2i/BGomKAJ54B9kT06Q=", "owner": "ryantm", "repo": "agenix", - "rev": "8cb01a0e717311680e0cbca06a76cbceba6f3ed6", + "rev": "13ac9ac6d68b9a0896e3d43a082947233189e247", "type": "github" }, "original": { @@ -55,22 +54,6 @@ "type": "github" } }, - "blobs": { - "flake": false, - "locked": { - "lastModified": 1604995301, - "narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=", - "owner": "simple-nixos-mailserver", - "repo": "blobs", - "rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265", - "type": "gitlab" - }, - "original": { - "owner": "simple-nixos-mailserver", - "repo": "blobs", - "type": "gitlab" - } - }, "crane": { "inputs": { "flake-compat": "flake-compat", @@ -127,11 +110,11 @@ ] }, "locked": { - "lastModified": 1700795494, - "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", + "lastModified": 1673295039, + "narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", + "rev": "87b9d090ad39b25b2400029c64825fc2a8868943", "type": "github" }, "original": { @@ -205,7 +188,9 @@ "dzgui-nix": { "inputs": { "dzgui": "dzgui", - "nixpkgs": "nixpkgs" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { "lastModified": 1702850463, @@ -305,25 +290,9 @@ "type": "github" } }, - "flake-compat_5": { - "flake": false, - "locked": { - "lastModified": 1668681692, - "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "009399224d5e398d03b22badca40a37ac85412a1", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "inputs": { - "systems": "systems_2" + "systems": "systems" }, "locked": { "lastModified": 1681202837, @@ -359,7 +328,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1681202837, @@ -392,7 +361,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_6" + "systems": "systems_4" }, "locked": { "lastModified": 1681202837, @@ -410,7 +379,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_7" + "systems": "systems_5" }, "locked": { "lastModified": 1681202837, @@ -428,7 +397,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_9" + "systems": "systems_7" }, "locked": { "lastModified": 1694529238, @@ -446,7 +415,7 @@ }, "flake-utils_7": { "inputs": { - "systems": "systems_10" + "systems": "systems_8" }, "locked": { "lastModified": 1681202837, @@ -464,7 +433,7 @@ }, "flake-utils_8": { "inputs": { - "systems": "systems_11" + "systems": "systems_9" }, "locked": { "lastModified": 1681202837, @@ -488,11 +457,11 @@ ] }, "locked": { - "lastModified": 1703113217, - "narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", + "lastModified": 1682203081, + "narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=", "owner": "nix-community", "repo": "home-manager", - "rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", + "rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1", "type": "github" }, "original": { @@ -508,64 +477,35 @@ ] }, "locked": { - "lastModified": 1706981411, - "narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=", + "lastModified": 1703026685, + "narHash": "sha256-AkualfMbc40HkDR2AZc6u71pcap50wDQOXFCY1ULDUA=", "owner": "nix-community", "repo": "home-manager", - "rev": "652fda4ca6dafeb090943422c34ae9145787af37", + "rev": "efc177c15f2a8bb063aeb250fe3c7c21e1de265e", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-23.11", "repo": "home-manager", "type": "github" } }, - "hyprcursor": { - "inputs": { - "hyprlang": "hyprlang", - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1710257359, - "narHash": "sha256-43re5pzE/cswFAgw92/ugsB3+d5ufDaCcLtl9ztKfBo=", - "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "1761f6cefd77f4fcd2039d930c88d6716ddc4974", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprcursor", - "type": "github" - } - }, "hyprland": { "inputs": { - "hyprcursor": "hyprcursor", "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang_2", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_5", + "systems": "systems_3", "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1710864211, - "narHash": "sha256-Uve1/UBnwD4M/9xD0E3XATnLrF8B5vL6MTBhX6Is+TE=", + "lastModified": 1702986956, + "narHash": "sha256-HSXyJxXKqDqaAVoJhvbA+u8iDLS/TuCD6+w4eDqMIeI=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "bcba3951f45f11245d424274130eb3a0ac790d93", + "rev": "d9b74ff96b3e3f0341a386451b9a3375b6f05503", "type": "github" }, "original": { @@ -599,54 +539,6 @@ "type": "github" } }, - "hyprlang": { - "inputs": { - "nixpkgs": [ - "hyprland", - "hyprcursor", - "nixpkgs" - ], - "systems": "systems_4" - }, - "locked": { - "lastModified": 1709914708, - "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprlang_2": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1709914708, - "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, "lipsum": { "flake": false, "locked": { @@ -689,11 +581,11 @@ "material-wifi-icons": { "flake": false, "locked": { - "lastModified": 1703850449, - "narHash": "sha256-KykU5J7SdpBDG+6rkD//XeHd+6pK3qabe+88RduhwKc=", + "lastModified": 1537083724, + "narHash": "sha256-neh+keoYyKum2K1lutE4HKVscA+TeWccikB85osbX/8=", "owner": "dcousens", "repo": "material-wifi-icons", - "rev": "2daf6b3d96d65beb2a3e37a9a53556aab3826d97", + "rev": "d56927c95ca17aa3e0dda15b23840ba3ad3f44cb", "type": "github" }, "original": { @@ -709,11 +601,11 @@ ] }, "locked": { - "lastModified": 1710644923, - "narHash": "sha256-0fjbN5GYYDKPyPay0l8gYoH+tFfNqPPwP5sxxBreeA4=", + "lastModified": 1702864432, + "narHash": "sha256-xR5Igg2hnm979W3YgMDrSjErHFhHo4rbMboF6DC0mbc=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "e25efda85e39fcdc845e371971ac4384989c4295", + "rev": "4605ccd764fac78b9e4b5b058698cb9f04430b91", "type": "github" }, "original": { @@ -724,15 +616,15 @@ }, "nix-software-center": { "inputs": { - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "utils": "utils" }, "locked": { - "lastModified": 1703105285, - "narHash": "sha256-BHoW1RQMc2Auz8paBvTBriKv0F6FI99+3nnz/ELLawg=", + "lastModified": 1693158194, + "narHash": "sha256-jDTKAmei9UgwoVHAskalRilTunWYlWOESNGY4BKscuU=", "owner": "vlinkz", "repo": "nix-software-center", - "rev": "68e87fb6e24fb3e6fe65449918d0cbda96622b65", + "rev": "8faa762f9b710520f8b7f81f4892a6e0aba749dc", "type": "github" }, "original": { @@ -744,15 +636,15 @@ "nixos-conf-editor": { "inputs": { "flake-compat": "flake-compat_3", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "snowfall-lib": "snowfall-lib" }, "locked": { - "lastModified": 1707338010, - "narHash": "sha256-UtLeZzDdk96sLTRcWsGrkWCslNUDytrGe0VmOTB/iig=", + "lastModified": 1698685411, + "narHash": "sha256-N93S17LLkckv25qB/aMdFyfV+sNvhiGyHfFVMczoBs8=", "owner": "vlinkz", "repo": "nixos-conf-editor", - "rev": "27b5e92f580f794c690093503869aab242f075ab", + "rev": "f79009587708571f79b3299898723c131473e2b4", "type": "github" }, "original": { @@ -761,78 +653,7 @@ "type": "github" } }, - "nixos-mailserver": { - "inputs": { - "blobs": "blobs", - "flake-compat": "flake-compat_5", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-23_05": "nixpkgs-23_05", - "nixpkgs-23_11": "nixpkgs-23_11", - "utils": "utils_2" - }, - "locked": { - "lastModified": 1706219574, - "narHash": "sha256-qO+8UErk+bXCq2ybHU4GzXG4Ejk4Tk0rnnTPNyypW4g=", - "owner": "simple-nixos-mailserver", - "repo": "nixos-mailserver", - "rev": "e47f3719f1db3e0961a4358d4cb234a0acaa7baf", - "type": "gitlab" - }, - "original": { - "owner": "simple-nixos-mailserver", - "ref": "nixos-23.11", - "repo": "nixos-mailserver", - "type": "gitlab" - } - }, "nixpkgs": { - "locked": { - "lastModified": 1702539185, - "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixpkgs-unstable", - "type": "indirect" - } - }, - "nixpkgs-23_05": { - "locked": { - "lastModified": 1704290814, - "narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-23.05", - "type": "indirect" - } - }, - "nixpkgs-23_11": { - "locked": { - "lastModified": 1706098335, - "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a77ab169a83a4175169d78684ddd2e54486ac651", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-23.11", - "type": "indirect" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1692638711, "narHash": "sha256-J0LgSFgJVGCC1+j5R2QndadWI1oumusg6hCtYAzLID4=", @@ -848,7 +669,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_2": { "locked": { "lastModified": 1698318101, "narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", @@ -864,18 +685,18 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { - "lastModified": 1710695816, - "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "lastModified": 1702830618, + "narHash": "sha256-lvhwIvRwhOLgzbRuYkqHy4M5cQHYs4ktL6/hyuBS6II=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "rev": "91a00709aebb3602f172a0bf47ba1ef013e34835", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-23.11", + "ref": "nixos-unstable", "type": "indirect" } }, @@ -898,11 +719,11 @@ "ranger-icons": { "flake": false, "locked": { - "lastModified": 1709209315, - "narHash": "sha256-ETE13REDIVuoFIbvWqWvQLj/2fGST+1koowmmuBzGmo=", + "lastModified": 1691165140, + "narHash": "sha256-6JEhyU08QEkGdRW2L00ynRaoaaR5PaiVUccEUbtTQuU=", "owner": "alexanderjeurissen", "repo": "ranger_devicons", - "rev": "ed718dd6a6d5d2c0f53cba8474c5ad96185057e9", + "rev": "de64ab26fb581c00a803381d522c6b3e48b79415", "type": "github" }, "original": { @@ -925,8 +746,7 @@ "nix-index-database": "nix-index-database", "nix-software-center": "nix-software-center", "nixos-conf-editor": "nixos-conf-editor", - "nixos-mailserver": "nixos-mailserver", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", "tlauncher": "tlauncher", @@ -1042,36 +862,6 @@ "type": "github" } }, - "systems_10": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "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, @@ -1088,6 +878,21 @@ } }, "systems_3": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1102,33 +907,18 @@ "type": "github" } }, - "systems_4": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, "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 +1005,7 @@ }, "utils": { "inputs": { - "systems": "systems_8" + "systems": "systems_6" }, "locked": { "lastModified": 1689068808, @@ -1231,21 +1021,6 @@ "type": "github" } }, - "utils_2": { - "locked": { - "lastModified": 1605370193, - "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5021eac20303a61fafe17224c087f5519baed54d", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "wl-crosshair": { "inputs": { "flake-utils": "flake-utils_8", @@ -1271,18 +1046,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1709983277, - "narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=", + "lastModified": 1701368958, + "narHash": "sha256-7kvyoA91etzVEl9mkA/EJfB6z/PltxX7Xc4gcr7/xlo=", "owner": "wlroots", "repo": "wlroots", - "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", + "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", + "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350", "type": "gitlab" } }, @@ -1292,10 +1067,6 @@ "hyprland", "hyprland-protocols" ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], "nixpkgs": [ "hyprland", "nixpkgs" @@ -1306,11 +1077,11 @@ ] }, "locked": { - "lastModified": 1709299639, - "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=", + "lastModified": 1702334919, + "narHash": "sha256-ibOZ3TLjqndGMcj2f+07NFwDWoum4IbzF58byZuJJNg=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "2d2fb547178ec025da643db57d40a971507b82fe", + "rev": "f5c3576c3b6cb1c31a8dfa3e4113f59bfe40cd71", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 2b64fb4..06e915f 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-unstable"; + home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; nix-index-database = { 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/system/configuration.nix b/system/configuration.nix index 3c146b1..76e64c0 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -11,6 +11,8 @@ ./nix.nix ]; + boot.kernelPackages = pkgs.linuxPackages_latest; + zramSwap.enable = true; programs.adb.enable = true; From 1201faf5fe0f42cc512ffe03ec363d34e6feec43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 22 Dec 2023 22:46:34 -0300 Subject: [PATCH 056/107] update --- flake.lock | 36 ++++++++++++++++++------------------ flake.nix | 10 +--------- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index ca0d863..63013d3 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ ] }, "locked": { - "lastModified": 1701216516, - "narHash": "sha256-jKSeJn+7hZ1dZdiH1L+NWUGT2i/BGomKAJ54B9kT06Q=", + "lastModified": 1703260116, + "narHash": "sha256-ipqShkBmHKC9ft1ZAsA6aeKps32k7+XZSPwfxeHLsAU=", "owner": "ryantm", "repo": "agenix", - "rev": "13ac9ac6d68b9a0896e3d43a082947233189e247", + "rev": "d0d4ad5be611da43da04321f49684ad72d705c7e", "type": "github" }, "original": { @@ -477,11 +477,11 @@ ] }, "locked": { - "lastModified": 1703026685, - "narHash": "sha256-AkualfMbc40HkDR2AZc6u71pcap50wDQOXFCY1ULDUA=", + "lastModified": 1703265279, + "narHash": "sha256-5jVtOwyMH1FzclxHrsFWzBdB+VyjUUSu1wyZhZlR6WU=", "owner": "nix-community", "repo": "home-manager", - "rev": "efc177c15f2a8bb063aeb250fe3c7c21e1de265e", + "rev": "07c322a7cff03267fd881adae1afe63367c5d608", "type": "github" }, "original": { @@ -501,11 +501,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1702986956, - "narHash": "sha256-HSXyJxXKqDqaAVoJhvbA+u8iDLS/TuCD6+w4eDqMIeI=", + "lastModified": 1703271271, + "narHash": "sha256-q6bb5S6l/fEIpO4QRmxACgNfVdTvWktEvKVKWtygzx8=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "d9b74ff96b3e3f0341a386451b9a3375b6f05503", + "rev": "c416880cf96aee783b6a00f356512e5d758e6056", "type": "github" }, "original": { @@ -620,11 +620,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1693158194, - "narHash": "sha256-jDTKAmei9UgwoVHAskalRilTunWYlWOESNGY4BKscuU=", + "lastModified": 1703105285, + "narHash": "sha256-BHoW1RQMc2Auz8paBvTBriKv0F6FI99+3nnz/ELLawg=", "owner": "vlinkz", "repo": "nix-software-center", - "rev": "8faa762f9b710520f8b7f81f4892a6e0aba749dc", + "rev": "68e87fb6e24fb3e6fe65449918d0cbda96622b65", "type": "github" }, "original": { @@ -640,11 +640,11 @@ "snowfall-lib": "snowfall-lib" }, "locked": { - "lastModified": 1698685411, - "narHash": "sha256-N93S17LLkckv25qB/aMdFyfV+sNvhiGyHfFVMczoBs8=", + "lastModified": 1703104726, + "narHash": "sha256-9wD01mLe7tQCzTtLIRzUaAvOKzfPuWPfpCfYkeCsQD0=", "owner": "vlinkz", "repo": "nixos-conf-editor", - "rev": "f79009587708571f79b3299898723c131473e2b4", + "rev": "18dc1d25b2025dc437490c71653429a05f9e0bf2", "type": "github" }, "original": { @@ -687,11 +687,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1702830618, - "narHash": "sha256-lvhwIvRwhOLgzbRuYkqHy4M5cQHYs4ktL6/hyuBS6II=", + "lastModified": 1703013332, + "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "91a00709aebb3602f172a0bf47ba1ef013e34835", + "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 06e915f..3bff3c6 100644 --- a/flake.nix +++ b/flake.nix @@ -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; }; From c713e32440cbc80e3065d5a2f07a4c7c16d1c523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 26 Dec 2023 02:41:54 -0300 Subject: [PATCH 057/107] update --- flake.lock | 114 +++++++++++++++++++++++++++++---------------------- user/gpg.nix | 2 +- 2 files changed, 66 insertions(+), 50 deletions(-) diff --git a/flake.lock b/flake.lock index 63013d3..fa629df 100644 --- a/flake.lock +++ b/flake.lock @@ -38,14 +38,15 @@ "home-manager": "home-manager", "nixpkgs": [ "nixpkgs" - ] + ], + "systems": "systems" }, "locked": { - "lastModified": 1703260116, - "narHash": "sha256-ipqShkBmHKC9ft1ZAsA6aeKps32k7+XZSPwfxeHLsAU=", + "lastModified": 1703433843, + "narHash": "sha256-nmtA4KqFboWxxoOAA6Y1okHbZh+HsXaMPFkYHsoDRDw=", "owner": "ryantm", "repo": "agenix", - "rev": "d0d4ad5be611da43da04321f49684ad72d705c7e", + "rev": "417caa847f9383e111d1397039c9d4337d024bf0", "type": "github" }, "original": { @@ -110,11 +111,11 @@ ] }, "locked": { - "lastModified": 1673295039, - "narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=", + "lastModified": 1700795494, + "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "87b9d090ad39b25b2400029c64825fc2a8868943", + "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", "type": "github" }, "original": { @@ -292,7 +293,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1681202837, @@ -328,7 +329,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1681202837, @@ -361,7 +362,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1681202837, @@ -379,7 +380,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1681202837, @@ -397,7 +398,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_7" + "systems": "systems_8" }, "locked": { "lastModified": 1694529238, @@ -415,7 +416,7 @@ }, "flake-utils_7": { "inputs": { - "systems": "systems_8" + "systems": "systems_9" }, "locked": { "lastModified": 1681202837, @@ -433,7 +434,7 @@ }, "flake-utils_8": { "inputs": { - "systems": "systems_9" + "systems": "systems_10" }, "locked": { "lastModified": 1681202837, @@ -457,11 +458,11 @@ ] }, "locked": { - "lastModified": 1682203081, - "narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=", + "lastModified": 1703113217, + "narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", "owner": "nix-community", "repo": "home-manager", - "rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1", + "rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", "type": "github" }, "original": { @@ -477,11 +478,11 @@ ] }, "locked": { - "lastModified": 1703265279, - "narHash": "sha256-5jVtOwyMH1FzclxHrsFWzBdB+VyjUUSu1wyZhZlR6WU=", + "lastModified": 1703527373, + "narHash": "sha256-AjypRssRtS6F3xkf7rE3/bXkIF2WJOZLbTIspjcE1zM=", "owner": "nix-community", "repo": "home-manager", - "rev": "07c322a7cff03267fd881adae1afe63367c5d608", + "rev": "80679ea5074ab7190c4cce478c600057cfb5edae", "type": "github" }, "original": { @@ -496,16 +497,16 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_3", + "systems": "systems_4", "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1703271271, - "narHash": "sha256-q6bb5S6l/fEIpO4QRmxACgNfVdTvWktEvKVKWtygzx8=", + "lastModified": 1703525245, + "narHash": "sha256-uDkNQgMmmVtTDKvRjO2TmUwlKSV4gwMLGj5pGr3xDIM=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "c416880cf96aee783b6a00f356512e5d758e6056", + "rev": "4f99e805b900b72f5e2bed54a1a44d10c8d54771", "type": "github" }, "original": { @@ -601,11 +602,11 @@ ] }, "locked": { - "lastModified": 1702864432, - "narHash": "sha256-xR5Igg2hnm979W3YgMDrSjErHFhHo4rbMboF6DC0mbc=", + "lastModified": 1703387252, + "narHash": "sha256-XKJqGj0BaEn/zyctEnkgVIh6Ba1rgTRc+UBi9EU8Y54=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "4605ccd764fac78b9e4b5b058698cb9f04430b91", + "rev": "f4340c1a42c38d79293ba69bfd839fbd6268a538", "type": "github" }, "original": { @@ -687,11 +688,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", + "lastModified": 1703255338, + "narHash": "sha256-Z6wfYJQKmDN9xciTwU3cOiOk+NElxdZwy/FiHctCzjU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", + "rev": "6df37dc6a77654682fe9f071c62b4242b5342e04", "type": "github" }, "original": { @@ -862,6 +863,21 @@ "type": "github" } }, + "systems_10": { + "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, @@ -878,21 +894,6 @@ } }, "systems_3": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -907,6 +908,21 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, "systems_5": { "locked": { "lastModified": 1681028828, @@ -1005,7 +1021,7 @@ }, "utils": { "inputs": { - "systems": "systems_6" + "systems": "systems_7" }, "locked": { "lastModified": 1689068808, @@ -1077,11 +1093,11 @@ ] }, "locked": { - "lastModified": 1702334919, - "narHash": "sha256-ibOZ3TLjqndGMcj2f+07NFwDWoum4IbzF58byZuJJNg=", + "lastModified": 1703514399, + "narHash": "sha256-VRr5Xc4S/VPr/gU3fiOD3vSIL2+GJ+LUrmFTWTwnTz4=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "f5c3576c3b6cb1c31a8dfa3e4113f59bfe40cd71", + "rev": "0a318a7a217a6402b0b705837cd5b50b0e94b31b", "type": "github" }, "original": { diff --git a/user/gpg.nix b/user/gpg.nix index e215440..a56529e 100644 --- a/user/gpg.nix +++ b/user/gpg.nix @@ -4,7 +4,7 @@ enable = true; defaultCacheTtl = 604800; maxCacheTtl = 604800; - pinentryFlavor = "gtk2"; + pinentryFlavor = "qt"; extraConfig = '' allow-preset-passphrase ''; From 2deca2fc3d88a471245a740ef5e969d3565a2b48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 26 Dec 2023 21:10:32 -0300 Subject: [PATCH 058/107] sway: disable adaptive sync --- user/sway/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/sway/default.nix b/user/sway/default.nix index 96790be..84e3b6e 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -52,7 +52,7 @@ in }; output = { "*" = { - adaptive_sync = "on"; + adaptive_sync = "off"; bg = "${theme.background} fill"; mode = "1920x1080@144.000Hz"; }; From 33063a8b998e7099457cb4679ef6910614672286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 7 Jan 2024 18:40:39 -0300 Subject: [PATCH 059/107] update --- flake.lock | 108 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 78 insertions(+), 30 deletions(-) diff --git a/flake.lock b/flake.lock index fa629df..d1af186 100644 --- a/flake.lock +++ b/flake.lock @@ -189,9 +189,7 @@ "dzgui-nix": { "inputs": { "dzgui": "dzgui", - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1702850463, @@ -478,11 +476,11 @@ ] }, "locked": { - "lastModified": 1703527373, - "narHash": "sha256-AjypRssRtS6F3xkf7rE3/bXkIF2WJOZLbTIspjcE1zM=", + "lastModified": 1704498488, + "narHash": "sha256-yINKdShHrtjdiJhov+q0s3Y3B830ujRoSbHduUNyKag=", "owner": "nix-community", "repo": "home-manager", - "rev": "80679ea5074ab7190c4cce478c600057cfb5edae", + "rev": "51e44a13acea71b36245e8bd8c7db53e0a3e61ee", "type": "github" }, "original": { @@ -502,11 +500,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1703525245, - "narHash": "sha256-uDkNQgMmmVtTDKvRjO2TmUwlKSV4gwMLGj5pGr3xDIM=", + "lastModified": 1704632672, + "narHash": "sha256-roOtCL13u9/UBMyA3DJtSfRD7bn89iKoqPWrZzXQxWM=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "4f99e805b900b72f5e2bed54a1a44d10c8d54771", + "rev": "7904188de9ca631436484cde733ef871f518d962", "type": "github" }, "original": { @@ -540,6 +538,24 @@ "type": "github" } }, + "hyprlang": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1704287638, + "narHash": "sha256-TuRXJGwtK440AXQNl5eiqmQqY4LZ/9+z/R7xC0ie3iA=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "6624f2bb66d4d27975766e81f77174adbe58ec97", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, "lipsum": { "flake": false, "locked": { @@ -582,11 +598,11 @@ "material-wifi-icons": { "flake": false, "locked": { - "lastModified": 1537083724, - "narHash": "sha256-neh+keoYyKum2K1lutE4HKVscA+TeWccikB85osbX/8=", + "lastModified": 1703850449, + "narHash": "sha256-KykU5J7SdpBDG+6rkD//XeHd+6pK3qabe+88RduhwKc=", "owner": "dcousens", "repo": "material-wifi-icons", - "rev": "d56927c95ca17aa3e0dda15b23840ba3ad3f44cb", + "rev": "2daf6b3d96d65beb2a3e37a9a53556aab3826d97", "type": "github" }, "original": { @@ -602,11 +618,11 @@ ] }, "locked": { - "lastModified": 1703387252, - "narHash": "sha256-XKJqGj0BaEn/zyctEnkgVIh6Ba1rgTRc+UBi9EU8Y54=", + "lastModified": 1704596958, + "narHash": "sha256-BK3Ohsz7m8X6qVKFxDtr8KVcHipfr5hYE9PDIJevHbQ=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "f4340c1a42c38d79293ba69bfd839fbd6268a538", + "rev": "f46800ac5a6e9f892fe36e50821c5d85794ecc62", "type": "github" }, "original": { @@ -617,7 +633,7 @@ }, "nix-software-center": { "inputs": { - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_3", "utils": "utils" }, "locked": { @@ -637,7 +653,7 @@ "nixos-conf-editor": { "inputs": { "flake-compat": "flake-compat_3", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_4", "snowfall-lib": "snowfall-lib" }, "locked": { @@ -655,6 +671,37 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1702539185, + "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixpkgs-unstable", + "type": "indirect" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1702645756, + "narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1692638711, "narHash": "sha256-J0LgSFgJVGCC1+j5R2QndadWI1oumusg6hCtYAzLID4=", @@ -670,7 +717,7 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_4": { "locked": { "lastModified": 1698318101, "narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", @@ -686,13 +733,13 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_5": { "locked": { - "lastModified": 1703255338, - "narHash": "sha256-Z6wfYJQKmDN9xciTwU3cOiOk+NElxdZwy/FiHctCzjU=", + "lastModified": 1704194953, + "narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6df37dc6a77654682fe9f071c62b4242b5342e04", + "rev": "bd645e8668ec6612439a9ee7e71f7eac4099d4f6", "type": "github" }, "original": { @@ -747,7 +794,7 @@ "nix-index-database": "nix-index-database", "nix-software-center": "nix-software-center", "nixos-conf-editor": "nixos-conf-editor", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_5", "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", "tlauncher": "tlauncher", @@ -1062,18 +1109,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1701368958, - "narHash": "sha256-7kvyoA91etzVEl9mkA/EJfB6z/PltxX7Xc4gcr7/xlo=", + "lastModified": 1703963193, + "narHash": "sha256-ke8drv6PTrdQDruWbajrRJffP9A9PU6FRyjJGNZRTs4=", "owner": "wlroots", "repo": "wlroots", - "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350", + "rev": "f81c3d93cd6f61b20ae784297679283438def8df", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350", + "rev": "f81c3d93cd6f61b20ae784297679283438def8df", "type": "gitlab" } }, @@ -1083,6 +1130,7 @@ "hyprland", "hyprland-protocols" ], + "hyprlang": "hyprlang", "nixpkgs": [ "hyprland", "nixpkgs" @@ -1093,11 +1141,11 @@ ] }, "locked": { - "lastModified": 1703514399, - "narHash": "sha256-VRr5Xc4S/VPr/gU3fiOD3vSIL2+GJ+LUrmFTWTwnTz4=", + "lastModified": 1704400467, + "narHash": "sha256-IsEAKBCorRlN53FwFAMbyGLRsPVu/ZrWEJtCwykPds8=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "0a318a7a217a6402b0b705837cd5b50b0e94b31b", + "rev": "1c802128f6cc3db29a8ef01552b1a22f894eeefd", "type": "github" }, "original": { From 916132cf9c6d47fa91c92106ff85a13c162ee862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 31 Jan 2024 17:35:26 -0300 Subject: [PATCH 060/107] update --- flake.lock | 70 ++++++++++++++++++++++-------------------------------- 1 file changed, 29 insertions(+), 41 deletions(-) diff --git a/flake.lock b/flake.lock index d1af186..be15b30 100644 --- a/flake.lock +++ b/flake.lock @@ -476,11 +476,11 @@ ] }, "locked": { - "lastModified": 1704498488, - "narHash": "sha256-yINKdShHrtjdiJhov+q0s3Y3B830ujRoSbHduUNyKag=", + "lastModified": 1706473109, + "narHash": "sha256-iyuAvpKTsq2u23Cr07RcV5XlfKExrG8gRpF75hf1uVc=", "owner": "nix-community", "repo": "home-manager", - "rev": "51e44a13acea71b36245e8bd8c7db53e0a3e61ee", + "rev": "d634c3abafa454551f2083b054cd95c3f287be61", "type": "github" }, "original": { @@ -500,11 +500,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1704632672, - "narHash": "sha256-roOtCL13u9/UBMyA3DJtSfRD7bn89iKoqPWrZzXQxWM=", + "lastModified": 1706571425, + "narHash": "sha256-VwVUPb5vuy4GGUx1XMhDMaKk9n8Gs5xUTG9CItoHL04=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "7904188de9ca631436484cde733ef871f518d962", + "rev": "3ff59e7e1d859daa503b88ef125d087bc100abfe", "type": "github" }, "original": { @@ -540,7 +540,11 @@ }, "hyprlang": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": [ + "hyprland", + "xdph", + "nixpkgs" + ] }, "locked": { "lastModified": 1704287638, @@ -618,11 +622,11 @@ ] }, "locked": { - "lastModified": 1704596958, - "narHash": "sha256-BK3Ohsz7m8X6qVKFxDtr8KVcHipfr5hYE9PDIJevHbQ=", + "lastModified": 1706411424, + "narHash": "sha256-BzziJYucEZvdCE985vjPoo3ztWcmUiSQ1wJ2CoT6jCc=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "f46800ac5a6e9f892fe36e50821c5d85794ecc62", + "rev": "c782f2a4f6fc94311ab5ef31df2f1149a1856181", "type": "github" }, "original": { @@ -633,7 +637,7 @@ }, "nix-software-center": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "utils": "utils" }, "locked": { @@ -653,7 +657,7 @@ "nixos-conf-editor": { "inputs": { "flake-compat": "flake-compat_3", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "snowfall-lib": "snowfall-lib" }, "locked": { @@ -686,22 +690,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1702645756, - "narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1692638711, "narHash": "sha256-J0LgSFgJVGCC1+j5R2QndadWI1oumusg6hCtYAzLID4=", @@ -717,7 +705,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1698318101, "narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", @@ -733,13 +721,13 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { - "lastModified": 1704194953, - "narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=", + "lastModified": 1706371002, + "narHash": "sha256-dwuorKimqSYgyu8Cw6ncKhyQjUDOyuXoxDTVmAXq88s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bd645e8668ec6612439a9ee7e71f7eac4099d4f6", + "rev": "c002c6aa977ad22c60398daaa9be52f2203d0006", "type": "github" }, "original": { @@ -794,7 +782,7 @@ "nix-index-database": "nix-index-database", "nix-software-center": "nix-software-center", "nixos-conf-editor": "nixos-conf-editor", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", "tlauncher": "tlauncher", @@ -1109,18 +1097,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1703963193, - "narHash": "sha256-ke8drv6PTrdQDruWbajrRJffP9A9PU6FRyjJGNZRTs4=", + "lastModified": 1706359063, + "narHash": "sha256-5HUTG0p+nCJv3cn73AmFHRZdfRV5AD5N43g8xAePSKM=", "owner": "wlroots", "repo": "wlroots", - "rev": "f81c3d93cd6f61b20ae784297679283438def8df", + "rev": "00b869c1a96f300a8f25da95d624524895e0ddf2", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "f81c3d93cd6f61b20ae784297679283438def8df", + "rev": "00b869c1a96f300a8f25da95d624524895e0ddf2", "type": "gitlab" } }, @@ -1141,11 +1129,11 @@ ] }, "locked": { - "lastModified": 1704400467, - "narHash": "sha256-IsEAKBCorRlN53FwFAMbyGLRsPVu/ZrWEJtCwykPds8=", + "lastModified": 1706145785, + "narHash": "sha256-j9MP4fv2U/vdRKAXXc2gyMTmYwVnHP6kHx1/y6jprrU=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "1c802128f6cc3db29a8ef01552b1a22f894eeefd", + "rev": "5a592647587cd20b9692a347df6939b6d371b3bb", "type": "github" }, "original": { From 78d61202810dc514fe95d720f2952a6fce9f1c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 8 Feb 2024 23:54:47 -0300 Subject: [PATCH 061/107] update --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index be15b30..e7be22f 100644 --- a/flake.lock +++ b/flake.lock @@ -476,11 +476,11 @@ ] }, "locked": { - "lastModified": 1706473109, - "narHash": "sha256-iyuAvpKTsq2u23Cr07RcV5XlfKExrG8gRpF75hf1uVc=", + "lastModified": 1707175763, + "narHash": "sha256-0MKHC6tQ4KEuM5rui6DjKZ/VNiSANB4E+DJ/+wPS1PU=", "owner": "nix-community", "repo": "home-manager", - "rev": "d634c3abafa454551f2083b054cd95c3f287be61", + "rev": "f99eace7c167b8a6a0871849493b1c613d0f1b80", "type": "github" }, "original": { @@ -500,11 +500,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1706571425, - "narHash": "sha256-VwVUPb5vuy4GGUx1XMhDMaKk9n8Gs5xUTG9CItoHL04=", + "lastModified": 1707431350, + "narHash": "sha256-fCt2EOgBdpS4DslBsFJBhmQCvkV97tFxS6KWFaAd7SQ=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "3ff59e7e1d859daa503b88ef125d087bc100abfe", + "rev": "289d4241bea72ebd891e037996ec4ffd356aadc8", "type": "github" }, "original": { @@ -622,11 +622,11 @@ ] }, "locked": { - "lastModified": 1706411424, - "narHash": "sha256-BzziJYucEZvdCE985vjPoo3ztWcmUiSQ1wJ2CoT6jCc=", + "lastModified": 1707016097, + "narHash": "sha256-V4lHr6hFQ3rK650dh64Xffxsf4kse9vUYWsM+ldjkco=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "c782f2a4f6fc94311ab5ef31df2f1149a1856181", + "rev": "3e3dad2808379c522138e2e8b0eb73500721a237", "type": "github" }, "original": { @@ -661,11 +661,11 @@ "snowfall-lib": "snowfall-lib" }, "locked": { - "lastModified": 1703104726, - "narHash": "sha256-9wD01mLe7tQCzTtLIRzUaAvOKzfPuWPfpCfYkeCsQD0=", + "lastModified": 1707338010, + "narHash": "sha256-UtLeZzDdk96sLTRcWsGrkWCslNUDytrGe0VmOTB/iig=", "owner": "vlinkz", "repo": "nixos-conf-editor", - "rev": "18dc1d25b2025dc437490c71653429a05f9e0bf2", + "rev": "27b5e92f580f794c690093503869aab242f075ab", "type": "github" }, "original": { @@ -723,11 +723,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1706371002, - "narHash": "sha256-dwuorKimqSYgyu8Cw6ncKhyQjUDOyuXoxDTVmAXq88s=", + "lastModified": 1707268954, + "narHash": "sha256-2en1kvde3cJVc3ZnTy8QeD2oKcseLFjYPLKhIGDanQ0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c002c6aa977ad22c60398daaa9be52f2203d0006", + "rev": "f8e2ebd66d097614d51a56a755450d4ae1632df1", "type": "github" }, "original": { @@ -755,11 +755,11 @@ "ranger-icons": { "flake": false, "locked": { - "lastModified": 1691165140, - "narHash": "sha256-6JEhyU08QEkGdRW2L00ynRaoaaR5PaiVUccEUbtTQuU=", + "lastModified": 1707118400, + "narHash": "sha256-HLeiV3c+8fl3kiht01s3H/HGPABPC2033rMB/uXKwLM=", "owner": "alexanderjeurissen", "repo": "ranger_devicons", - "rev": "de64ab26fb581c00a803381d522c6b3e48b79415", + "rev": "2c3c19dffb4238d01c74515c9eed5088066db243", "type": "github" }, "original": { From c7999c3fbe1662519e6db5c65e7c3b6457acb8d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 9 Feb 2024 00:24:20 -0300 Subject: [PATCH 062/107] update renamed xkb config --- system/configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/configuration.nix b/system/configuration.nix index 76e64c0..189fa1c 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -40,9 +40,9 @@ # services.xserver.displayManager.autologin.user = "lelgenio"; # Configure keymap in X11 - services.xserver = { + services.xserver.xkb = { layout = "us"; - xkbVariant = "colemak"; + variant = "colemak"; }; console.keyMap = "colemak"; # Enable CUPS to print documents. From b60fc8900abd1b127bb564b083881aa1a1cd4e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 10 Feb 2024 17:50:58 -0300 Subject: [PATCH 063/107] alacritty: update config --- user/alacritty.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"; From f9d95745ef4e511bea097614d03afb89e01e84bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 16 Feb 2024 01:17:58 -0300 Subject: [PATCH 064/107] kak-lsp: update config to new format --- user/kakoune/kak-lsp.toml | 263 +++++++++----------------------------- 1 file changed, 57 insertions(+), 206 deletions(-) diff --git a/user/kakoune/kak-lsp.toml b/user/kakoune/kak-lsp.toml index 413de9e..ef96bc4 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.rnix-lsp] filetypes = ["nix"] command = "nil" roots = ["flake.nix", "shell.nix", ".git"] [language.nix.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"}, +] From f6c2f4905bc6fb67db90489d28984d81ea46050a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 17 Feb 2024 20:06:09 -0300 Subject: [PATCH 065/107] update --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index e7be22f..01252a1 100644 --- a/flake.lock +++ b/flake.lock @@ -42,11 +42,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1703433843, - "narHash": "sha256-nmtA4KqFboWxxoOAA6Y1okHbZh+HsXaMPFkYHsoDRDw=", + "lastModified": 1707830867, + "narHash": "sha256-PAdwm5QqdlwIqGrfzzvzZubM+FXtilekQ/FA0cI49/o=", "owner": "ryantm", "repo": "agenix", - "rev": "417caa847f9383e111d1397039c9d4337d024bf0", + "rev": "8cb01a0e717311680e0cbca06a76cbceba6f3ed6", "type": "github" }, "original": { @@ -476,11 +476,11 @@ ] }, "locked": { - "lastModified": 1707175763, - "narHash": "sha256-0MKHC6tQ4KEuM5rui6DjKZ/VNiSANB4E+DJ/+wPS1PU=", + "lastModified": 1708031129, + "narHash": "sha256-EH20hJfNnc1/ODdDVat9B7aKm0B95L3YtkIRwKLvQG8=", "owner": "nix-community", "repo": "home-manager", - "rev": "f99eace7c167b8a6a0871849493b1c613d0f1b80", + "rev": "3d6791b3897b526c82920a2ab5f61d71985b3cf8", "type": "github" }, "original": { @@ -500,11 +500,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1707431350, - "narHash": "sha256-fCt2EOgBdpS4DslBsFJBhmQCvkV97tFxS6KWFaAd7SQ=", + "lastModified": 1708186866, + "narHash": "sha256-xkTtBVu9uJvTet0IRVD/FYosB1LrFQhL37qVM+P1Hq0=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "289d4241bea72ebd891e037996ec4ffd356aadc8", + "rev": "289d952a6ee02f6d54a0899870bbec52ff9a53df", "type": "github" }, "original": { @@ -622,11 +622,11 @@ ] }, "locked": { - "lastModified": 1707016097, - "narHash": "sha256-V4lHr6hFQ3rK650dh64Xffxsf4kse9vUYWsM+ldjkco=", + "lastModified": 1707620986, + "narHash": "sha256-XE0tCSkSVBeJDWhjFwusNInwAhrnp+TloUNUpvnTiLw=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "3e3dad2808379c522138e2e8b0eb73500721a237", + "rev": "0cb4345704123492e6d1f1068629069413c80de0", "type": "github" }, "original": { @@ -723,11 +723,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1707268954, - "narHash": "sha256-2en1kvde3cJVc3ZnTy8QeD2oKcseLFjYPLKhIGDanQ0=", + "lastModified": 1708118438, + "narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f8e2ebd66d097614d51a56a755450d4ae1632df1", + "rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80", "type": "github" }, "original": { @@ -1129,11 +1129,11 @@ ] }, "locked": { - "lastModified": 1706145785, - "narHash": "sha256-j9MP4fv2U/vdRKAXXc2gyMTmYwVnHP6kHx1/y6jprrU=", + "lastModified": 1706521509, + "narHash": "sha256-AInZ50acOJ3wzUwGzNr1TmxGTMx+8j6oSTzz4E7Vbp8=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "5a592647587cd20b9692a347df6939b6d371b3bb", + "rev": "c06fd88b3da492b8f9067be021b9184f7012b5a8", "type": "github" }, "original": { From 061df3f2c426df68f5cef3de3606bb600b5d9c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 28 Feb 2024 01:00:29 -0300 Subject: [PATCH 066/107] btop: enable gpu monitoring --- hosts/monolith.nix | 1 + user/home.nix | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hosts/monolith.nix b/hosts/monolith.nix index 451a6e7..0ab6229 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -43,6 +43,7 @@ in vaapiVdpau rocm-opencl-icd rocm-opencl-runtime + rocmPackages.rocm-smi ]; programs.corectrl.enable = true; 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 From 5cbc3b799fee41d234875a05c6989feb51540fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 15 Mar 2024 19:33:18 -0300 Subject: [PATCH 067/107] update --- flake.lock | 61 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index 01252a1..652a398 100644 --- a/flake.lock +++ b/flake.lock @@ -476,11 +476,11 @@ ] }, "locked": { - "lastModified": 1708031129, - "narHash": "sha256-EH20hJfNnc1/ODdDVat9B7aKm0B95L3YtkIRwKLvQG8=", + "lastModified": 1709764752, + "narHash": "sha256-+lM4J4JoJeiN8V+3WSWndPHj1pJ9Jc1UMikGbXLqCTk=", "owner": "nix-community", "repo": "home-manager", - "rev": "3d6791b3897b526c82920a2ab5f61d71985b3cf8", + "rev": "cf111d1a849ddfc38e9155be029519b0e2329615", "type": "github" }, "original": { @@ -492,6 +492,7 @@ "hyprland": { "inputs": { "hyprland-protocols": "hyprland-protocols", + "hyprlang": "hyprlang", "nixpkgs": [ "nixpkgs" ], @@ -500,11 +501,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1708186866, - "narHash": "sha256-xkTtBVu9uJvTet0IRVD/FYosB1LrFQhL37qVM+P1Hq0=", + "lastModified": 1709818078, + "narHash": "sha256-U/o8d5E+0GlTUFNkAzt56wHlUHfoIg3sZPer+GywDFQ=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "289d952a6ee02f6d54a0899870bbec52ff9a53df", + "rev": "6c4e2489a0a153ac2a92744ecb2985280c97fc89", "type": "github" }, "original": { @@ -542,16 +543,19 @@ "inputs": { "nixpkgs": [ "hyprland", - "xdph", "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" ] }, "locked": { - "lastModified": 1704287638, - "narHash": "sha256-TuRXJGwtK440AXQNl5eiqmQqY4LZ/9+z/R7xC0ie3iA=", + "lastModified": 1709775675, + "narHash": "sha256-G+gIMUQBtfbbrnsM/OPJzebdqKFP6typplNCE7X8Szw=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "6624f2bb66d4d27975766e81f77174adbe58ec97", + "rev": "f1db1a7e1faee2a5c67d03b6bd283da82eed3730", "type": "github" }, "original": { @@ -622,11 +626,11 @@ ] }, "locked": { - "lastModified": 1707620986, - "narHash": "sha256-XE0tCSkSVBeJDWhjFwusNInwAhrnp+TloUNUpvnTiLw=", + "lastModified": 1709708644, + "narHash": "sha256-XAFOkZ6yexsqeJrCXWoHxopq0i+7ZqbwATXomMnGmr4=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "0cb4345704123492e6d1f1068629069413c80de0", + "rev": "94a1e46434736a40f976a454f8bd3ea2144f349b", "type": "github" }, "original": { @@ -723,11 +727,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1708118438, - "narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=", + "lastModified": 1709703039, + "narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80", + "rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d", "type": "github" }, "original": { @@ -755,11 +759,11 @@ "ranger-icons": { "flake": false, "locked": { - "lastModified": 1707118400, - "narHash": "sha256-HLeiV3c+8fl3kiht01s3H/HGPABPC2033rMB/uXKwLM=", + "lastModified": 1709209315, + "narHash": "sha256-ETE13REDIVuoFIbvWqWvQLj/2fGST+1koowmmuBzGmo=", "owner": "alexanderjeurissen", "repo": "ranger_devicons", - "rev": "2c3c19dffb4238d01c74515c9eed5088066db243", + "rev": "ed718dd6a6d5d2c0f53cba8474c5ad96185057e9", "type": "github" }, "original": { @@ -1097,18 +1101,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1706359063, - "narHash": "sha256-5HUTG0p+nCJv3cn73AmFHRZdfRV5AD5N43g8xAePSKM=", + "lastModified": 1708558866, + "narHash": "sha256-Mz6hCtommq7RQfcPnxLINigO4RYSNt23HeJHC6mVmWI=", "owner": "wlroots", "repo": "wlroots", - "rev": "00b869c1a96f300a8f25da95d624524895e0ddf2", + "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "00b869c1a96f300a8f25da95d624524895e0ddf2", + "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", "type": "gitlab" } }, @@ -1118,7 +1122,10 @@ "hyprland", "hyprland-protocols" ], - "hyprlang": "hyprlang", + "hyprlang": [ + "hyprland", + "hyprlang" + ], "nixpkgs": [ "hyprland", "nixpkgs" @@ -1129,11 +1136,11 @@ ] }, "locked": { - "lastModified": 1706521509, - "narHash": "sha256-AInZ50acOJ3wzUwGzNr1TmxGTMx+8j6oSTzz4E7Vbp8=", + "lastModified": 1709299639, + "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "c06fd88b3da492b8f9067be021b9184f7012b5a8", + "rev": "2d2fb547178ec025da643db57d40a971507b82fe", "type": "github" }, "original": { From 5571ebd26a74e820fae085d5033a7b0ba8a50d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 15 Mar 2024 23:08:35 -0300 Subject: [PATCH 068/107] lsp: replace rnix-lsp with nil --- user/kakoune/kak-lsp.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/kakoune/kak-lsp.toml b/user/kakoune/kak-lsp.toml index ef96bc4..3a62a08 100644 --- a/user/kakoune/kak-lsp.toml +++ b/user/kakoune/kak-lsp.toml @@ -69,11 +69,11 @@ roots = ["package.json"] command = "vscode-json-languageserver" args = ["--stdio"] -[language_server.rnix-lsp] +[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_server.intelephense] From 5fa213ab597863bf21be62ba50db4702ce7ab064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 15 Mar 2024 23:08:57 -0300 Subject: [PATCH 069/107] update --- flake.lock | 129 +++++++++++++++++++++++++++++++----------- user/fish/default.nix | 1 - 2 files changed, 97 insertions(+), 33 deletions(-) diff --git a/flake.lock b/flake.lock index 652a398..e551703 100644 --- a/flake.lock +++ b/flake.lock @@ -360,7 +360,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1681202837, @@ -378,7 +378,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_6" + "systems": "systems_7" }, "locked": { "lastModified": 1681202837, @@ -396,7 +396,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_8" + "systems": "systems_9" }, "locked": { "lastModified": 1694529238, @@ -414,7 +414,7 @@ }, "flake-utils_7": { "inputs": { - "systems": "systems_9" + "systems": "systems_10" }, "locked": { "lastModified": 1681202837, @@ -432,7 +432,7 @@ }, "flake-utils_8": { "inputs": { - "systems": "systems_10" + "systems": "systems_11" }, "locked": { "lastModified": 1681202837, @@ -476,11 +476,11 @@ ] }, "locked": { - "lastModified": 1709764752, - "narHash": "sha256-+lM4J4JoJeiN8V+3WSWndPHj1pJ9Jc1UMikGbXLqCTk=", + "lastModified": 1710532761, + "narHash": "sha256-SUXGZNrXX05YA9G6EmgupxhOr3swI1gcxLUeDMUhrEY=", "owner": "nix-community", "repo": "home-manager", - "rev": "cf111d1a849ddfc38e9155be029519b0e2329615", + "rev": "206f457fffdb9a73596a4cb2211a471bd305243d", "type": "github" }, "original": { @@ -489,23 +489,50 @@ "type": "github" } }, + "hyprcursor": { + "inputs": { + "hyprlang": "hyprlang", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1710257359, + "narHash": "sha256-43re5pzE/cswFAgw92/ugsB3+d5ufDaCcLtl9ztKfBo=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "1761f6cefd77f4fcd2039d930c88d6716ddc4974", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, "hyprland": { "inputs": { + "hyprcursor": "hyprcursor", "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang", + "hyprlang": "hyprlang_2", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_4", + "systems": "systems_5", "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1709818078, - "narHash": "sha256-U/o8d5E+0GlTUFNkAzt56wHlUHfoIg3sZPer+GywDFQ=", + "lastModified": 1710538160, + "narHash": "sha256-p5Wkl2rXjFftd+Nugiq71BgGAl4E9byYxKV0ahLTo+U=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "6c4e2489a0a153ac2a92744ecb2985280c97fc89", + "rev": "2a2da6082e5f1501731004b755d35a8dbb605fde", "type": "github" }, "original": { @@ -540,6 +567,29 @@ } }, "hyprlang": { + "inputs": { + "nixpkgs": [ + "hyprland", + "hyprcursor", + "nixpkgs" + ], + "systems": "systems_4" + }, + "locked": { + "lastModified": 1709914708, + "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlang_2": { "inputs": { "nixpkgs": [ "hyprland", @@ -551,11 +601,11 @@ ] }, "locked": { - "lastModified": 1709775675, - "narHash": "sha256-G+gIMUQBtfbbrnsM/OPJzebdqKFP6typplNCE7X8Szw=", + "lastModified": 1709914708, + "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "f1db1a7e1faee2a5c67d03b6bd283da82eed3730", + "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", "type": "github" }, "original": { @@ -626,11 +676,11 @@ ] }, "locked": { - "lastModified": 1709708644, - "narHash": "sha256-XAFOkZ6yexsqeJrCXWoHxopq0i+7ZqbwATXomMnGmr4=", + "lastModified": 1710120787, + "narHash": "sha256-tlLuB73OCOKtU2j83bQzSYFyzjJo3rjpITZE5MoofG8=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "94a1e46434736a40f976a454f8bd3ea2144f349b", + "rev": "e76ff2df6bfd2abe06abd8e7b9f217df941c1b07", "type": "github" }, "original": { @@ -727,11 +777,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1709703039, - "narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=", + "lastModified": 1710451336, + "narHash": "sha256-pP86Pcfu3BrAvRO7R64x7hs+GaQrjFes+mEPowCfkxY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d", + "rev": "d691274a972b3165335d261cc4671335f5c67de9", "type": "github" }, "original": { @@ -917,6 +967,21 @@ "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, @@ -964,16 +1029,16 @@ }, "systems_5": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -1060,7 +1125,7 @@ }, "utils": { "inputs": { - "systems": "systems_7" + "systems": "systems_8" }, "locked": { "lastModified": 1689068808, @@ -1101,18 +1166,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1708558866, - "narHash": "sha256-Mz6hCtommq7RQfcPnxLINigO4RYSNt23HeJHC6mVmWI=", + "lastModified": 1709983277, + "narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=", "owner": "wlroots", "repo": "wlroots", - "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", + "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5", + "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", "type": "gitlab" } }, 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; }; From b4538b5db50d05f719c19cfdb87a0515c2495163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 15 Mar 2024 23:10:43 -0300 Subject: [PATCH 070/107] gpg: simplify config --- user/gpg.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/gpg.nix b/user/gpg.nix index a56529e..5dc20d0 100644 --- a/user/gpg.nix +++ b/user/gpg.nix @@ -4,7 +4,7 @@ enable = true; defaultCacheTtl = 604800; maxCacheTtl = 604800; - pinentryFlavor = "qt"; + pinentryPackage = pkgs.pinentry-curses; extraConfig = '' allow-preset-passphrase ''; From 5161c3a5d866d1e090aeb3f7263320f304fe4e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 16 Mar 2024 00:23:11 -0300 Subject: [PATCH 071/107] mangohud: install patch to fix keybind crash --- overlays/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/overlays/default.nix b/overlays/default.nix index 6782ca4..b34ed17 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -52,6 +52,14 @@ 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="; + }) + ]; + }); }); variables = (final: prev: { From 34c35fb4ebb52b7dd201e26b7485ec3c86d788a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 17 Mar 2024 00:07:13 -0300 Subject: [PATCH 072/107] syncthing: enable tray icon --- user/syncthing.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/user/syncthing.nix b/user/syncthing.nix index ff2d4db..7177ff7 100644 --- a/user/syncthing.nix +++ b/user/syncthing.nix @@ -1,8 +1,6 @@ -{ config, pkgs, lib, inputs, ... }: -let inherit (pkgs.uservars) key theme color accent font; -in { +{ ... }: { services.syncthing = { enable = true; - # tray.enable = true; + tray.enable = true; }; } From 577328395de4808cd7d8545d523eb6f78545c4bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 17 Mar 2024 00:07:26 -0300 Subject: [PATCH 073/107] theme: improve qt theming --- user/sway/theme.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/user/sway/theme.nix b/user/sway/theme.nix index 74b6157..414a588 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 = "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 From 5f588d7e1ad0399c63e342233119e3d9cd48068e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 20 Mar 2024 16:11:45 -0300 Subject: [PATCH 074/107] kdenlive: fix theme --- system/media-packages.nix | 2 +- user/gnome.nix | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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/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"; }; From 36d2bedd34384f98c7a86c2d5aed9a6d79b2c06b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 24 Mar 2024 12:30:09 -0300 Subject: [PATCH 075/107] syncthing: way for tray --- user/syncthing.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/user/syncthing.nix b/user/syncthing.nix index 7177ff7..8f36eeb 100644 --- a/user/syncthing.nix +++ b/user/syncthing.nix @@ -1,6 +1,9 @@ { ... }: { services.syncthing = { enable = true; - tray.enable = true; + tray = { + enable = true; + command = "syncthingtray --wait"; + }; }; } From 9f10425c04c628e1e3a811f88aa5fd2c050cad12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 27 Mar 2024 16:46:04 -0300 Subject: [PATCH 076/107] flake: update lockfile --- flake.lock | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/flake.lock b/flake.lock index e551703..9984cc7 100644 --- a/flake.lock +++ b/flake.lock @@ -55,6 +55,22 @@ "type": "github" } }, + "blobs": { + "flake": false, + "locked": { + "lastModified": 1604995301, + "narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=", + "owner": "simple-nixos-mailserver", + "repo": "blobs", + "rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265", + "type": "gitlab" + }, + "original": { + "owner": "simple-nixos-mailserver", + "repo": "blobs", + "type": "gitlab" + } + }, "crane": { "inputs": { "flake-compat": "flake-compat", @@ -289,6 +305,22 @@ "type": "github" } }, + "flake-compat_5": { + "flake": false, + "locked": { + "lastModified": 1668681692, + "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "009399224d5e398d03b22badca40a37ac85412a1", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -728,6 +760,32 @@ "type": "github" } }, + "nixos-mailserver": { + "inputs": { + "blobs": "blobs", + "flake-compat": "flake-compat_5", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-23_05": "nixpkgs-23_05", + "nixpkgs-23_11": "nixpkgs-23_11", + "utils": "utils_2" + }, + "locked": { + "lastModified": 1706219574, + "narHash": "sha256-qO+8UErk+bXCq2ybHU4GzXG4Ejk4Tk0rnnTPNyypW4g=", + "owner": "simple-nixos-mailserver", + "repo": "nixos-mailserver", + "rev": "e47f3719f1db3e0961a4358d4cb234a0acaa7baf", + "type": "gitlab" + }, + "original": { + "owner": "simple-nixos-mailserver", + "ref": "nixos-23.11", + "repo": "nixos-mailserver", + "type": "gitlab" + } + }, "nixpkgs": { "locked": { "lastModified": 1702539185, @@ -743,6 +801,36 @@ "type": "indirect" } }, + "nixpkgs-23_05": { + "locked": { + "lastModified": 1704290814, + "narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-23.05", + "type": "indirect" + } + }, + "nixpkgs-23_11": { + "locked": { + "lastModified": 1706098335, + "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a77ab169a83a4175169d78684ddd2e54486ac651", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-23.11", + "type": "indirect" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1692638711, @@ -836,6 +924,7 @@ "nix-index-database": "nix-index-database", "nix-software-center": "nix-software-center", "nixos-conf-editor": "nixos-conf-editor", + "nixos-mailserver": "nixos-mailserver", "nixpkgs": "nixpkgs_4", "plymouth-themes": "plymouth-themes", "ranger-icons": "ranger-icons", @@ -1141,6 +1230,21 @@ "type": "github" } }, + "utils_2": { + "locked": { + "lastModified": 1605370193, + "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5021eac20303a61fafe17224c087f5519baed54d", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "wl-crosshair": { "inputs": { "flake-utils": "flake-utils_8", From 850be61bf3910f54c1de479f90bbeed2aaa5bc69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 6 Apr 2024 20:45:03 -0300 Subject: [PATCH 077/107] sway: add more env vars to dbus activation --- overlays/sway.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ''; From e4b9bcca7ec5d3ada5ef73cb9d20bb74935e9165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 6 Apr 2024 20:45:30 -0300 Subject: [PATCH 078/107] sshd: disable until xz is secure --- system/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/configuration.nix b/system/configuration.nix index 189fa1c..93d828c 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -59,7 +59,7 @@ security.rtkit.enable = true; services.openssh = { - enable = true; + enable = false; ports = [ 9022 ]; settings = { PermitRootLogin = "no"; From d86b7db36ea5966d6abd965795210d4fe962ede9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 6 Apr 2024 20:51:48 -0300 Subject: [PATCH 079/107] monolith: add forgejo runner --- flake.nix | 1 + secrets/monolith-forgejo-runner-token.age | Bin 0 -> 682 bytes secrets/secrets.nix | 1 + system/monolith-forgejo-runner.nix | 19 +++++++++++++++++++ system/secrets.nix | 2 ++ 5 files changed, 23 insertions(+) create mode 100644 secrets/monolith-forgejo-runner-token.age create mode 100644 system/monolith-forgejo-runner.nix diff --git a/flake.nix b/flake.nix index 3bff3c6..f3a4532 100644 --- a/flake.nix +++ b/flake.nix @@ -123,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/secrets/monolith-forgejo-runner-token.age b/secrets/monolith-forgejo-runner-token.age new file mode 100644 index 0000000000000000000000000000000000000000..aa3deb8968d525267e9c1267b5d556cc19a70f39 GIT binary patch literal 682 zcmYdHPt{G$OD?J`D9Oyv)5|YP*Do{V(zR14F3!*`Do#{zDlf0_Nasp73NNfOP6|n} zNDQ$EOUmv%k*^f4KoRG^b4+ZDy;Bz%k}pNPY(+;F%L_0O$*jfukgurHO{m! zEXpWy%lGv3_b*DzEA%(yN{vXW(l<3K&T%v}a82_sPp%3#4^1sg@y{_buWtZ+*8EG|uV^zt_j$}Dv8ObUnyEVaxC$_NSa$}_Y`EDkcUOicEg-r zSAW_6O^oT4 Date: Wed, 1 May 2024 15:53:07 -0300 Subject: [PATCH 080/107] monolith: enable all features of corectrl --- hosts/monolith.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hosts/monolith.nix b/hosts/monolith.nix index 0ab6229..c5dcece 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -46,7 +46,14 @@ in rocmPackages.rocm-smi ]; - programs.corectrl.enable = true; + programs.corectrl = { + enable = true; + gpuOverclock = { + enable = true; + ppfeaturemask = "0xffffffff"; + }; + }; + virtualisation.virtualbox.host.enable = true; fileSystems."/" = { From 45383a0d8ba5ca7f3dcf6790bfbdf1492e25ccfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 10 May 2024 17:29:11 -0300 Subject: [PATCH 081/107] firefox: add substitoot extension --- user/firefox.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/user/firefox.nix b/user/firefox.nix index 9c29b25..49314e4 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -43,6 +43,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 { From e925f586a15a95cf68920dff77379120b043fcbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 10 May 2024 19:48:35 -0300 Subject: [PATCH 082/107] update --- flake.lock | 221 ++++++++++------------- overlays/default.nix | 4 - patches/webcord/fix-reading-config.patch | 14 -- system/configuration.nix | 2 +- user/sway/kanshi.nix | 50 ++--- user/sway/swaylock.nix | 2 +- user/sway/theme.nix | 2 +- user/variables.nix | 4 +- 8 files changed, 133 insertions(+), 166 deletions(-) delete mode 100644 patches/webcord/fix-reading-config.patch diff --git a/flake.lock b/flake.lock index 9984cc7..7dc918c 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,11 +491,11 @@ ] }, "locked": { - "lastModified": 1710532761, - "narHash": "sha256-SUXGZNrXX05YA9G6EmgupxhOr3swI1gcxLUeDMUhrEY=", + "lastModified": 1715359697, + "narHash": "sha256-FJYyXqulIbCdsUCTFBTu/bIH4aN+7jzjQAn52Qc6qPg=", "owner": "nix-community", "repo": "home-manager", - "rev": "206f457fffdb9a73596a4cb2211a471bd305243d", + "rev": "f2c5ba5e720fd584d83f2f97399dac0d26ae60b9", "type": "github" }, "original": { @@ -523,7 +506,10 @@ }, "hyprcursor": { "inputs": { - "hyprlang": "hyprlang", + "hyprlang": [ + "hyprland", + "hyprlang" + ], "nixpkgs": [ "hyprland", "nixpkgs" @@ -534,11 +520,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": { @@ -550,21 +536,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": 1710538160, - "narHash": "sha256-p5Wkl2rXjFftd+Nugiq71BgGAl4E9byYxKV0ahLTo+U=", + "lastModified": 1715342341, + "narHash": "sha256-jHCjAwaukNCI7yVsbB8oppl1dUujvFAfRiXaecqWGI0=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "2a2da6082e5f1501731004b755d35a8dbb605fde", + "rev": "38911d6df4977b6b00557cc887eb151d032e505b", "type": "github" }, "original": { @@ -577,10 +562,12 @@ "inputs": { "nixpkgs": [ "hyprland", + "xdph", "nixpkgs" ], "systems": [ "hyprland", + "xdph", "systems" ] }, @@ -602,17 +589,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": { @@ -621,7 +610,7 @@ "type": "github" } }, - "hyprlang_2": { + "hyprwayland-scanner": { "inputs": { "nixpkgs": [ "hyprland", @@ -633,16 +622,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" } }, @@ -708,11 +697,11 @@ ] }, "locked": { - "lastModified": 1710120787, - "narHash": "sha256-tlLuB73OCOKtU2j83bQzSYFyzjJo3rjpITZE5MoofG8=", + "lastModified": 1714878592, + "narHash": "sha256-E68C03sYRsYFsK7wiGHUIJm8IsyPRALOrFoTL0glXnI=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "e76ff2df6bfd2abe06abd8e7b9f217df941c1b07", + "rev": "a362555e9dbd4ecff3bb98969bbdb8f79fe87f10", "type": "github" }, "original": { @@ -723,15 +712,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": { @@ -740,6 +730,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", @@ -788,11 +804,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1702539185, - "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", + "lastModified": 1714562304, + "narHash": "sha256-Mr3U37Rh6tH0FbaDFu0aZDwk9mPAe7ASaqDOGgLqqLU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", + "rev": "bcd44e224fd68ce7d269b4f44d24c2220fd821e7", "type": "github" }, "original": { @@ -865,11 +881,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1710451336, - "narHash": "sha256-pP86Pcfu3BrAvRO7R64x7hs+GaQrjFes+mEPowCfkxY=", + "lastModified": 1715266358, + "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d691274a972b3165335d261cc4671335f5c67de9", + "rev": "f1010e0469db743d14519a1efd37e23f8513d714", "type": "github" }, "original": { @@ -897,11 +913,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": { @@ -1056,21 +1072,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, @@ -1118,16 +1119,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" } }, @@ -1214,7 +1215,7 @@ }, "utils": { "inputs": { - "systems": "systems_8" + "systems": "systems_7" }, "locked": { "lastModified": 1689068808, @@ -1253,11 +1254,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": { @@ -1266,31 +1267,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" @@ -1305,11 +1284,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/overlays/default.nix b/overlays/default.nix index b34ed17..c5d145d 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: { 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/system/configuration.nix b/system/configuration.nix index 93d828c..7c6bbb3 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -99,7 +99,7 @@ }; # Enable touchpad support (enabled default in most desktopManager). - services.xserver.libinput.enable = true; + services.libinput.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. users.mutableUsers = false; 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/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 414a588..2fc1fc1 100644 --- a/user/sway/theme.nix +++ b/user/sway/theme.nix @@ -35,7 +35,7 @@ lib.mkIf (desktop == "sway") ); qt = { enable = true; - platformTheme = "qtct"; + platformTheme.name = "qtct"; }; dconf.settings = { 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 = { From b489452aba39080c54eb6b68eafd11c29e6656a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 11 May 2024 18:45:55 -0300 Subject: [PATCH 083/107] sway: make gaming windows floating by default --- user/sway/sway-assigns.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/user/sway/sway-assigns.nix b/user/sway/sway-assigns.nix index 3731222..1ec8cf5 100644 --- a/user/sway/sway-assigns.nix +++ b/user/sway/sway-assigns.nix @@ -59,6 +59,7 @@ in { app_id = "wdisplays"; } { app_id = "pavucontrol"; } { app_id = ".*[Hh]elvum.*"; } + { workspace = "9"; } ]; }; }; From be28de858dc8d448e0fd9b1cfa9a1bd1098a03cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 15 May 2024 12:46:38 -0300 Subject: [PATCH 084/107] ssh: update hostnames --- user/ssh.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }; }; From dc4ca50622142ca26b6c6f0d0780e8ce88b7df4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 15 May 2024 12:46:54 -0300 Subject: [PATCH 085/107] firefox: add i dont care about cookies --- user/firefox.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/user/firefox.nix b/user/firefox.nix index 49314e4..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"; From ba3ab547b7d39e54a6b077d83f19d2b18d9fde6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 16 May 2024 01:17:57 -0300 Subject: [PATCH 086/107] forgejo-runner: update runner token and url --- secrets/monolith-forgejo-runner-token.age | Bin 682 -> 688 bytes system/monolith-forgejo-runner.nix | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/secrets/monolith-forgejo-runner-token.age b/secrets/monolith-forgejo-runner-token.age index aa3deb8968d525267e9c1267b5d556cc19a70f39..fff63ca77be3834049d16ab0bbac97efd8e6b8a8 100644 GIT binary patch delta 660 zcmZ3*x`B0qMtz2xc0s6#dy-FRezu=wxMfQv6vulofrl(t;sk^D8 zcYtANfw!x3M3KHxd6ctziJxa$nxT1?d6i39S&>PSM}0*VS4nz?c|f5>R6w4SYoLXD zx@Tm1X-KGNsE4t)S#gejuCaD*rLmEruaT*FNI-hJYj|Erl8cvLRJfCezE?qIDVLK| zSaPL%ii@RhkatB{kZ-tCh*MZ%PD+7ma7u2ze{fl%XS%yzkg1njVPr^oMpQ;_S)ONr zcZO?~NqxSzlYt*sZgOHygi%JJS-xdyenh!@mT_*Go2g}{Pf@yis&}?=lu4wyVOmak zLAigirG9#Oo{O=Mak686aj;QXYPhx`m!n~%yT4_Xr>S;eKvbG(aGq19satt^Xi9NX zUXXK`qj9FCr$L^NQ+B3zPOf`qj#)@XWng5ac73^HMx?J-KmeDIU!_N2h?kjRaJZps zX0Ur|v0;EquB*0pW{7E$W0YHBKvHmWMWlITXlb^iUy_+$VTD-ge%- delta 654 zcmdnMx{7szMt!wLVu(dpQl7taXpnJAR#;Amg;&0JnL)NeL1d}7zkXn8 zu5o~`S6Qlyab}TQP?%?dQFv;$zbTh*T4lOhh_i=Vrl*^4m`RAEUvQ;UVTG?-uD?fk zdRU-|d03)rTCje4g-@=lai)b~QAUwlzNe?Ze^FXqVZFa0S87C3mAw_}L2k-58Nj)zB1k+;4}Rews^FsCG%JM`VRls%LR&x}%rBaZqNVi)T_mL}009Mo>mb zkXN3eMPhM~iDhb1P)SjxQMyHCsjpEnSCCVpkBM<^xwmI(R*-9kTX0pHNos{hQdV$g zNnl8Ma!#&Uj$=uFWqGEzrMrPyvSqfjc93JaNqw$%v5}>*PZ?K=hp&sJae-fUdSsM| zORzra9C!bt3gqrNoIPIpHEalQbB~DkymhtrKxdpuB(~1hqix4m1B}?a(F~(rM9D? zaeYv*rBP*;t8tdQJ{Om+uC9W6gkhpVVMJ=0ca(l9&ka2lLkYSojWT1(cQ+j?x zS$IZHsdiC_Q7G4Z4~Bks<9laI7f+tQ`pf=rVoa|r&-z~ZeL4Tyac>prm?W08WtkE3 pYaB(=vW#xCy*4Uq4%f?-TO!iavNcxy@lyH4>|zmav$ySR0RTA7-q!#C diff --git a/system/monolith-forgejo-runner.nix b/system/monolith-forgejo-runner.nix index 2fa82b4..ee07410 100644 --- a/system/monolith-forgejo-runner.nix +++ b/system/monolith-forgejo-runner.nix @@ -4,7 +4,7 @@ instances.default = { enable = true; name = "monolith"; - url = "https://git.lelgenio.xyz"; + url = "https://git.lelgenio.com"; tokenFile = config.age.secrets.monolith-forgejo-runner-token.path; labels = [ # provide a debian base with nodejs for actions From 2ce18fc7a042c46462e2a3d7710040151906a128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 19 May 2024 01:10:21 -0300 Subject: [PATCH 087/107] sway: enable adaptive sync --- user/sway/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/sway/default.nix b/user/sway/default.nix index 84e3b6e..72a34be 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -52,7 +52,7 @@ in }; output = { "*" = { - adaptive_sync = "off"; + adaptive_sync = "enabled"; bg = "${theme.background} fill"; mode = "1920x1080@144.000Hz"; }; From 8f0160ef732afc11ec3ac6529f9bc5df9d36983b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 19 May 2024 01:10:31 -0300 Subject: [PATCH 088/107] monolith: add gpu crash work-around --- hosts/monolith.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/monolith.nix b/hosts/monolith.nix index c5dcece..39ba16f 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/ From f54f98ea4edd8fde8550122b84d8e6e61a41e420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 19 May 2024 15:58:51 -0300 Subject: [PATCH 089/107] update: pass arguments to ./switch --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 "$@" From faca1d3c811c8ed34cddcc8f33b43133428426db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 01:03:51 -0300 Subject: [PATCH 090/107] git: enable lfs --- user/git.nix | 1 + 1 file changed, 1 insertion(+) 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; From 5cc4532b24d81655d4f2f16de731fa58d75c21f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 01:04:09 -0300 Subject: [PATCH 091/107] sway: autostart corectrl --- user/sway/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/user/sway/default.nix b/user/sway/default.nix index 72a34be..f832aaa 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -89,6 +89,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 = { From 7bb5a7c5a07014e647af8b667b14113d221fb196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 01:04:19 -0300 Subject: [PATCH 092/107] sway: set godot windows to floating --- user/sway/sway-assigns.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/user/sway/sway-assigns.nix b/user/sway/sway-assigns.nix index 1ec8cf5..ff46238 100644 --- a/user/sway/sway-assigns.nix +++ b/user/sway/sway-assigns.nix @@ -54,6 +54,7 @@ in }; floating = { criteria = [ + { class = "Godot"; } { class = "file_picker"; } { app_id = "file_picker"; } { app_id = "wdisplays"; } From 0d5a1c1fd51b1867260e97cc9dd198a92168a445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 13:38:40 -0300 Subject: [PATCH 093/107] sway: don't require rebuilding sway dependencies --- overlays/default.nix | 10 ++++++---- system/greetd.nix | 1 + user/sway/default.nix | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/overlays/default.nix b/overlays/default.nix index c5d145d..060a0c0 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -44,10 +44,12 @@ --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 { diff --git a/system/greetd.nix b/system/greetd.nix index 72b82c1..8293c64 100644 --- a/system/greetd.nix +++ b/system/greetd.nix @@ -17,6 +17,7 @@ in # enable sway window manager programs.sway = { enable = true; + package = pkgs.mySway; wrapperFeatures.gtk = true; }; diff --git a/user/sway/default.nix b/user/sway/default.nix index f832aaa..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 = [ ]; @@ -105,7 +106,7 @@ in xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json; home.packages = with pkgs; [ - sway + mySway swaybg swaylock wdisplays From 4c356d68220c5bbae9a4df8fa5b348079c8f607f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 18:58:28 -0300 Subject: [PATCH 094/107] Revert "sshd: disable until xz is secure" This reverts commit b0d1b2fbff9bc8392da8a5210ca06e3f5fc061fe. --- system/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/configuration.nix b/system/configuration.nix index 7c6bbb3..fbcd724 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -59,7 +59,7 @@ security.rtkit.enable = true; services.openssh = { - enable = false; + enable = true; ports = [ 9022 ]; settings = { PermitRootLogin = "no"; From 5e0c4ff27d65cbf6f865e22fe66b477f6728f399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 19:43:34 -0300 Subject: [PATCH 095/107] flake: update to 24.05 --- flake.lock | 15 ++++++++------- flake.nix | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 7dc918c..76a2850 100644 --- a/flake.lock +++ b/flake.lock @@ -491,15 +491,16 @@ ] }, "locked": { - "lastModified": 1715359697, - "narHash": "sha256-FJYyXqulIbCdsUCTFBTu/bIH4aN+7jzjQAn52Qc6qPg=", + "lastModified": 1716563886, + "narHash": "sha256-MKSVKxP50gEbdP60G0M5LampyVSIGT8FGGB88nKPmi8=", "owner": "nix-community", "repo": "home-manager", - "rev": "f2c5ba5e720fd584d83f2f97399dac0d26ae60b9", + "rev": "00a86e4f7a6455ad58b7090a931f1c6097e4fcd7", "type": "github" }, "original": { "owner": "nix-community", + "ref": "release-24.05", "repo": "home-manager", "type": "github" } @@ -881,16 +882,16 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1715266358, - "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", + "lastModified": 1716408587, + "narHash": "sha256-el71IUaQdEmntmd51GBpkJs/Hqh6S4dmfmUGP8GQaME=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f1010e0469db743d14519a1efd37e23f8513d714", + "rev": "1a7abfa62e8a36f7f2dbe463722ed9ea31be5e43", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-unstable", + "ref": "nixos-24.05", "type": "indirect" } }, diff --git a/flake.nix b/flake.nix index f3a4532..7b042c9 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,8 @@ { description = "My system config"; inputs = { - nixpkgs.url = "nixpkgs/nixos-unstable"; - home-manager.url = "github:nix-community/home-manager"; + 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 = { From 52bd0f67ed4dee801a6f906293a7592e707f51ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 19:43:52 -0300 Subject: [PATCH 096/107] monolith: disable virtualbox while it's borked --- hosts/monolith.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/hosts/monolith.nix b/hosts/monolith.nix index 39ba16f..c447c45 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -55,8 +55,6 @@ in }; }; - virtualisation.virtualbox.host.enable = true; - fileSystems."/" = { device = "/dev/disk/by-label/BTRFS_ROOT"; fsType = "btrfs"; From f2ffa579f2be948160ba901ee38f9a5154efdb53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 25 May 2024 19:44:10 -0300 Subject: [PATCH 097/107] qutebrowser: don't install if not the default browser --- user/qutebrowser/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = { From d29b92d8b4c6690185fd0e2f0e6f78ca3f261a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 27 May 2024 00:10:11 -0300 Subject: [PATCH 098/107] scripts: add pass export script --- scripts/default.nix | 1 + scripts/pass-export | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100755 scripts/pass-export 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*)?' From 314d95f9dd6b95228ec944ba7921b79bbc66c4f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 27 May 2024 09:44:01 -0300 Subject: [PATCH 099/107] gnome: update autologin config --- system/gnome.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/gnome.nix b/system/gnome.nix index 855f5d5..5af171c 100644 --- a/system/gnome.nix +++ b/system/gnome.nix @@ -8,7 +8,7 @@ services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome.enable = true; - services.xserver.displayManager.autoLogin = { + services.displayManager.autoLogin = { enable = true; user = "lelgenio"; }; From 4494f23f22e37439918902335fec1a409bc2e718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 27 May 2024 11:52:17 -0300 Subject: [PATCH 100/107] kdeconect: update config --- system/configuration.nix | 1 - system/gnome.nix | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/system/configuration.nix b/system/configuration.nix index fbcd724..e72bcff 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -26,7 +26,6 @@ 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"; diff --git a/system/gnome.nix b/system/gnome.nix index 5af171c..cb8c106 100644 --- a/system/gnome.nix +++ b/system/gnome.nix @@ -13,13 +13,17 @@ 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 ]; } From 49ea5944967b596a0adaa6a7c793630308b988c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 27 May 2024 12:29:42 -0300 Subject: [PATCH 101/107] configuration: extract nixos config into more files --- system/bluetooth.nix | 14 +++++ system/configuration.nix | 120 +++------------------------------------ system/containers.nix | 11 ++++ system/fonts.nix | 9 +++ system/locale.nix | 12 ++++ system/network.nix | 24 ++++++++ system/sound.nix | 11 ++++ system/steam.nix | 3 + system/users.nix | 20 +++++++ 9 files changed, 111 insertions(+), 113 deletions(-) create mode 100644 system/bluetooth.nix create mode 100644 system/containers.nix create mode 100644 system/fonts.nix create mode 100644 system/locale.nix create mode 100644 system/network.nix create mode 100644 system/sound.nix create mode 100644 system/users.nix 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 e72bcff..130ca7d 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -9,6 +9,13 @@ ./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; @@ -18,108 +25,9 @@ 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; - - # 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.xkb = { - layout = "us"; - variant = "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.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; - packages.media-packages.enable = true; environment.systemPackages = with pkgs; [ pavucontrol @@ -130,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/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/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/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"; +} From 7808c205021eee00be0e693c628eb995b47c68fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 30 May 2024 16:53:51 -0300 Subject: [PATCH 102/107] monolith: add docker subvolume --- hosts/monolith.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hosts/monolith.nix b/hosts/monolith.nix index c447c45..22144c3 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -115,6 +115,12 @@ in fsType = "btrfs"; options = [ "subvol=@projects" "nofail" ] ++ btrfs_options ++ btrfs_ssd; }; + fileSystems."/var/lib/docker" = { + device = "/dev/disk/by-label/BTRFS_BIGBOY"; + fsType = "btrfs"; + options = [ "subvol=@docker" "nofail" ] ++ btrfs_options ++ btrfs_ssd; + }; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction From 4fdbf6f821fd9e16718fe87a652fc4a178b72662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 30 May 2024 16:54:06 -0300 Subject: [PATCH 103/107] nix: lower frequency of gc --- system/nix.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/nix.nix b/system/nix.nix index f9b0a82..38b2eb9 100644 --- a/system/nix.nix +++ b/system/nix.nix @@ -11,8 +11,8 @@ in nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; gc = { automatic = true; - dates = "daily"; - options = "--delete-older-than 3d"; + dates = "weekly"; + options = "--delete-older-than 7d"; }; optimise.automatic = true; settings = { From 8376baaf3408f4f4583906f32323fb630f2ec614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 30 May 2024 16:54:23 -0300 Subject: [PATCH 104/107] kakoune: use rfc-style nixfmt --- user/home.nix | 2 +- user/kakoune/filetypes.kak | 2 +- user/kakoune/kak-lsp.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/user/home.nix b/user/home.nix index d7a00a3..39a9ba2 100644 --- a/user/home.nix +++ b/user/home.nix @@ -128,7 +128,7 @@ rust-analyzer # rust analyzer blade-formatter - nixpkgs-fmt + nixfmt-rfc-style ]; fonts.fontconfig.enable = true; diff --git a/user/kakoune/filetypes.kak b/user/kakoune/filetypes.kak index cd93b49..b384bfe 100644 --- a/user/kakoune/filetypes.kak +++ b/user/kakoune/filetypes.kak @@ -12,7 +12,7 @@ hook global WinSetOption filetype=c %{ } hook global WinSetOption filetype=nix %{ - set buffer formatcmd 'nixpkgs-fmt' + set buffer formatcmd 'nixfmt' } hook global BufCreate .*\.html %{ diff --git a/user/kakoune/kak-lsp.toml b/user/kakoune/kak-lsp.toml index 3a62a08..b3a6c8e 100644 --- a/user/kakoune/kak-lsp.toml +++ b/user/kakoune/kak-lsp.toml @@ -74,7 +74,7 @@ filetypes = ["nix"] command = "nil" roots = ["flake.nix", "shell.nix", ".git"] [language_server.nil.settings.nil] -formatting.command = [ "nixpkgs-fmt" ] +formatting.command = [ "nixfmt" ] [language_server.intelephense] filetypes = ["php"] From fbcf9bd14ed502020aa8e3635c6334f28f7b317d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 30 May 2024 16:54:58 -0300 Subject: [PATCH 105/107] treewide: format using nixfmt-rfc-style --- flake.nix | 77 +++--- hosts/double-rainbow.nix | 35 ++- hosts/i15.nix | 36 ++- hosts/monolith.nix | 76 ++++-- hosts/phantom/default.nix | 16 +- hosts/phantom/email.nix | 13 +- hosts/phantom/forgejo.nix | 7 +- hosts/phantom/hardware-config.nix | 19 +- hosts/phantom/mastodon.nix | 8 +- hosts/phantom/nextcloud.nix | 10 +- hosts/phantom/nginx.nix | 42 ++- hosts/phantom/syncthing.nix | 17 +- hosts/phantom/users.nix | 22 +- hosts/phantom/vpsadminos.nix | 18 +- hosts/phantom/writefreely.nix | 9 +- hosts/pixie.nix | 24 +- hosts/rainbow.nix | 41 ++- overlays/default.nix | 138 +++++----- pkgs/blade-formatter/default.nix | 35 +-- pkgs/cargo-checkmate.nix | 21 +- pkgs/default.nix | 3 +- pkgs/emmet-cli.nix | 7 +- pkgs/lipsum.nix | 5 +- scripts/default.nix | 175 +++++++++---- secrets/secrets.nix | 8 +- system/bluetooth.nix | 7 +- system/boot.nix | 13 +- system/cachix.nix | 8 +- system/configuration.nix | 8 +- system/containers.nix | 3 +- system/fonts.nix | 3 +- system/gamemode.nix | 12 +- system/gitlab-runner.nix | 84 +++--- system/gnome.nix | 18 +- system/greetd.nix | 15 +- system/kde.nix | 3 +- system/locale.nix | 3 +- system/media-packages.nix | 13 +- system/monolith-forgejo-runner.nix | 3 +- system/monolith-gitlab-runner.nix | 10 +- system/network.nix | 3 +- system/nix-serve.nix | 8 +- system/nix.nix | 17 +- system/rainbow-gitlab-runner.nix | 10 +- system/secrets.nix | 21 +- system/sound.nix | 3 +- system/specialisation.nix | 9 +- system/steam.nix | 32 ++- system/thunar.nix | 30 ++- system/users.nix | 13 +- user/alacritty.nix | 73 ++++-- user/bmenu.nix | 15 +- user/chat.nix | 9 +- user/controller.nix | 9 +- user/desktop-entries.nix | 22 +- user/firefox.nix | 16 +- user/fish/default.nix | 56 ++-- user/fzf.nix | 30 ++- user/git.nix | 13 +- user/gnome.nix | 16 +- user/gpg.nix | 17 +- user/helix.nix | 37 ++- user/home.nix | 46 ++-- user/hyprland.nix | 13 +- user/kakoune/colors.nix | 17 +- user/kakoune/default.nix | 61 +++-- user/lf/default.nix | 9 +- user/man.nix | 19 +- user/mangohud.nix | 20 +- user/mimeapps.nix | 29 ++- user/mpd.nix | 8 +- user/mpv.nix | 6 +- user/pass.nix | 13 +- user/pipewire.nix | 8 +- user/pqiv.nix | 35 ++- user/qutebrowser/colors.nix | 80 ++++-- user/qutebrowser/dark-theme.nix | 105 ++++---- user/qutebrowser/default.nix | 17 +- user/qutebrowser/fonts.nix | 1 - user/ranger/default.nix | 9 +- user/rofi.nix | 24 +- user/ssh.nix | 13 +- user/sway/default.nix | 31 ++- user/sway/kanshi.nix | 26 +- user/sway/mako.nix | 18 +- user/sway/sway-assigns.nix | 26 +- user/sway/sway-binds.nix | 99 +++++--- user/sway/sway-modes.nix | 99 +++++--- user/sway/swayidle.nix | 14 +- user/sway/swaylock.nix | 14 +- user/sway/theme.nix | 65 +++-- user/syncthing.nix | 3 +- user/thunar.nix | 8 +- user/vdir.nix | 32 +-- user/vscode/default.nix | 3 +- user/waybar/default.nix | 396 ++++++++++++++++------------- user/xdg-dirs.nix | 8 +- user/zathura.nix | 15 +- 98 files changed, 1925 insertions(+), 989 deletions(-) diff --git a/flake.nix b/flake.nix index 7b042c9..daecf26 100644 --- a/flake.nix +++ b/flake.nix @@ -68,11 +68,14 @@ nixos-conf-editor.url = "github:vlinkz/nixos-conf-editor"; nix-software-center.url = "github:vlinkz/nix-software-center"; }; - outputs = inputs: + outputs = + inputs: let nixpkgsConfig = { inherit system; - config = { allowUnfree = true; }; + config = { + allowUnfree = true; + }; overlays = old_overlays.all; }; @@ -85,32 +88,37 @@ old_overlays = (import ./overlays { inherit packages inputs; }); - specialArgs = { inherit inputs; }; - common_modules = [ - { nixpkgs.pkgs = pkgs; } - ./system/configuration.nix - ./system/secrets.nix - ./system/specialisation.nix - ./system/greetd.nix - { login-manager.greetd.enable = desktop == "sway" || desktop == "hyprland"; } + specialArgs = { + inherit inputs; + }; + common_modules = + [ + { nixpkgs.pkgs = pkgs; } + ./system/configuration.nix + ./system/secrets.nix + ./system/specialisation.nix + ./system/greetd.nix + { login-manager.greetd.enable = desktop == "sway" || desktop == "hyprland"; } - inputs.agenix.nixosModules.default - inputs.hyprland.nixosModules.default - inputs.dzgui-nix.nixosModules.default - { programs.hyprland.enable = (desktop == "hyprland"); } - inputs.home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.lelgenio = import ./user/home.nix; - home-manager.backupFileExtension = "bkp"; - # Optionally, use home-manager.extraSpecialArgs to pass - # arguments to home.nix - home-manager.extraSpecialArgs = { inherit inputs; }; - } - ] - ++ lib.optional (desktop == "gnome") ./system/gnome.nix - ++ lib.optional (desktop == "kde") ./system/kde.nix; + inputs.agenix.nixosModules.default + inputs.hyprland.nixosModules.default + inputs.dzgui-nix.nixosModules.default + { programs.hyprland.enable = (desktop == "hyprland"); } + inputs.home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.lelgenio = import ./user/home.nix; + home-manager.backupFileExtension = "bkp"; + # Optionally, use home-manager.extraSpecialArgs to pass + # arguments to home.nix + home-manager.extraSpecialArgs = { + inherit inputs; + }; + } + ] + ++ lib.optional (desktop == "gnome") ./system/gnome.nix + ++ lib.optional (desktop == "kde") ./system/kde.nix; in { nixosConfigurations = { @@ -144,11 +152,16 @@ }; pixie = lib.nixosSystem { inherit system specialArgs; - modules = [ ./hosts/pixie.nix ] ++ common_modules ++ [{ - packages.media-packages.enable = lib.mkOverride 0 false; - programs.steam.enable = lib.mkOverride 0 false; - services.flatpak.enable = lib.mkOverride 0 false; - }]; + modules = + [ ./hosts/pixie.nix ] + ++ common_modules + ++ [ + { + packages.media-packages.enable = lib.mkOverride 0 false; + programs.steam.enable = lib.mkOverride 0 false; + services.flatpak.enable = lib.mkOverride 0 false; + } + ]; }; phantom = lib.nixosSystem { inherit system specialArgs; diff --git a/hosts/double-rainbow.nix b/hosts/double-rainbow.nix index 7725898..be5dd48 100644 --- a/hosts/double-rainbow.nix +++ b/hosts/double-rainbow.nix @@ -1,13 +1,32 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: let - btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ]; - btrfs_ssd = [ "ssd" "discard=async" ]; + btrfs_options = [ + "compress=zstd:3" + "noatime" + "x-systemd.device-timeout=0" + ]; + btrfs_ssd = [ + "ssd" + "discard=async" + ]; in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usb_storage" + "usbhid" + "sd_mod" + ]; boot.initrd.kernelModules = [ "i915" ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -18,8 +37,7 @@ in options = [ "subvol=@" ] ++ btrfs_options ++ btrfs_ssd; }; - boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device = - "/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964"; + boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device = "/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964"; fileSystems."/boot" = { device = "/dev/disk/by-uuid/97EB-7DB5"; @@ -37,8 +55,7 @@ in nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; networking.hostName = "double-rainbow"; # Define your hostname. } diff --git a/hosts/i15.nix b/hosts/i15.nix index e6f0e75..c318665 100644 --- a/hosts/i15.nix +++ b/hosts/i15.nix @@ -1,15 +1,30 @@ # 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, + ... +}: let - btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ]; + btrfs_options = [ + "compress=zstd:3" + "noatime" + "x-systemd.device-timeout=0" + ]; in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usb_storage" + "sd_mod" + "rtsx_usb_sdmmc" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -45,10 +60,12 @@ in options = [ "subvol=@swap" ] ++ btrfs_options; }; - swapDevices = [{ - device = "/swap/swapfile"; - size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB - }]; + swapDevices = [ + { + device = "/swap/swapfile"; + size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB + } + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -59,7 +76,6 @@ in # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; networking.hostName = "i15"; # Define your hostname. } diff --git a/hosts/monolith.nix b/hosts/monolith.nix index 22144c3..213765b 100644 --- a/hosts/monolith.nix +++ b/hosts/monolith.nix @@ -1,21 +1,38 @@ # 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, + ... +}: let - btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ]; - btrfs_ssd = [ "ssd" "discard=async" ]; + btrfs_options = [ + "compress=zstd:3" + "noatime" + "x-systemd.device-timeout=0" + ]; + btrfs_ssd = [ + "ssd" + "discard=async" + ]; in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; hardware.opentabletdriver.enable = true; - boot.extraModulePackages = with config.boot.kernelPackages; [ - zenpower - ]; + boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelModules = [ "kvm-amd" @@ -88,22 +105,34 @@ in fileSystems."/home/lelgenio/Games" = { device = "/dev/disk/by-label/BTRFS_DATA"; fsType = "btrfs"; - options = [ "subvol=@games" "nofail" ] ++ btrfs_options; + options = [ + "subvol=@games" + "nofail" + ] ++ btrfs_options; }; fileSystems."/home/lelgenio/Downloads/Torrents" = { device = "/dev/disk/by-label/BTRFS_DATA"; fsType = "btrfs"; - options = [ "subvol=@torrents" "nofail" ] ++ btrfs_options; + options = [ + "subvol=@torrents" + "nofail" + ] ++ btrfs_options; }; fileSystems."/home/lelgenio/Música" = { device = "/dev/disk/by-label/BTRFS_DATA"; fsType = "btrfs"; - options = [ "subvol=@music" "nofail" ] ++ btrfs_options; + options = [ + "subvol=@music" + "nofail" + ] ++ btrfs_options; }; fileSystems."/home/lelgenio/.local/mount/data" = { device = "/dev/disk/by-label/BTRFS_DATA"; fsType = "btrfs"; - options = [ "subvol=@data" "nofail" ] ++ btrfs_options; + options = [ + "subvol=@data" + "nofail" + ] ++ btrfs_options; }; fileSystems."/home/lelgenio/.local/mount/bigboy" = { device = "/dev/disk/by-label/BTRFS_BIGBOY"; @@ -113,12 +142,18 @@ in fileSystems."/home/lelgenio/projects" = { device = "/dev/disk/by-label/BTRFS_BIGBOY"; fsType = "btrfs"; - options = [ "subvol=@projects" "nofail" ] ++ btrfs_options ++ btrfs_ssd; + options = [ + "subvol=@projects" + "nofail" + ] ++ btrfs_options ++ btrfs_ssd; }; fileSystems."/var/lib/docker" = { device = "/dev/disk/by-label/BTRFS_BIGBOY"; fsType = "btrfs"; - options = [ "subvol=@docker" "nofail" ] ++ btrfs_options ++ btrfs_ssd; + options = [ + "subvol=@docker" + "nofail" + ] ++ btrfs_options ++ btrfs_ssd; }; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -128,8 +163,7 @@ in networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; powerManagement.cpuFreqGovernor = "ondemand"; - hardware.cpu.amd.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; networking.hostName = "monolith"; # Define your hostname. # Fix broken suspend with Logitech USB dongle @@ -146,8 +180,10 @@ in # with the exception of `"subvol=swap"`, the other options are repeated in my other `fileSystem` mounts options = [ "subvol=swap" ] ++ btrfs_options ++ btrfs_ssd; }; - swapDevices = [{ - device = "/swap/swapfile"; - size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB - }]; + swapDevices = [ + { + device = "/swap/swapfile"; + size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB + } + ]; } diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index 32d5544..462e070 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -1,4 +1,10 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ imports = [ ./vpsadminos.nix inputs.agenix.nixosModules.default @@ -49,7 +55,12 @@ enable = true; dates = "04:40"; operation = "switch"; - flags = [ "--update-input" "nixpkgs" "--no-write-lock-file" "-L" ]; + flags = [ + "--update-input" + "nixpkgs" + "--no-write-lock-file" + "-L" + ]; flake = "git+https://git.lelgenio.com/lelgenio/nixos-config#phantom"; }; @@ -57,4 +68,3 @@ system.stateVersion = "23.05"; # Never change this } - diff --git a/hosts/phantom/email.nix b/hosts/phantom/email.nix index a34780a..6d85d95 100644 --- a/hosts/phantom/email.nix +++ b/hosts/phantom/email.nix @@ -1,10 +1,14 @@ -{ pkgs, inputs, config, ... }: { +{ + pkgs, + inputs, + config, + ... +}: +{ # It's important to let Digital Ocean set the hostname so we get rDNS to work networking.hostName = ""; - imports = [ - inputs.nixos-mailserver.nixosModules.mailserver - ]; + imports = [ inputs.nixos-mailserver.nixosModules.mailserver ]; mailserver = { enable = true; @@ -50,5 +54,4 @@ $config['plugins'] = [ "carddav", "archive" ]; ''; }; - } diff --git a/hosts/phantom/forgejo.nix b/hosts/phantom/forgejo.nix index 61f0a51..eefb003 100644 --- a/hosts/phantom/forgejo.nix +++ b/hosts/phantom/forgejo.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: let cfg = config.services.forgejo; srv = cfg.settings.server; diff --git a/hosts/phantom/hardware-config.nix b/hosts/phantom/hardware-config.nix index 1a89a15..683a684 100644 --- a/hosts/phantom/hardware-config.nix +++ b/hosts/phantom/hardware-config.nix @@ -1,7 +1,14 @@ -{ config, pkgs, inputs, ... }: { - swapDevices = [{ - device = "/swap/swapfile"; - size = (1024 * 2); # 2 GB - }]; +{ + config, + pkgs, + inputs, + ... +}: +{ + swapDevices = [ + { + device = "/swap/swapfile"; + size = (1024 * 2); # 2 GB + } + ]; } - diff --git a/hosts/phantom/mastodon.nix b/hosts/phantom/mastodon.nix index 9d15d6b..f984c65 100644 --- a/hosts/phantom/mastodon.nix +++ b/hosts/phantom/mastodon.nix @@ -1,4 +1,10 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ services.mastodon = { enable = true; configureNginx = true; diff --git a/hosts/phantom/nextcloud.nix b/hosts/phantom/nextcloud.nix index 20c7173..de1bd6d 100644 --- a/hosts/phantom/nextcloud.nix +++ b/hosts/phantom/nextcloud.nix @@ -1,4 +1,10 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ services.nextcloud = { enable = true; package = pkgs.nextcloud27; @@ -22,6 +28,4 @@ group = "nextcloud"; }; }; - } - diff --git a/hosts/phantom/nginx.nix b/hosts/phantom/nginx.nix index 8692134..0153fa6 100644 --- a/hosts/phantom/nginx.nix +++ b/hosts/phantom/nginx.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: +{ services.nginx = { enable = true; recommendedProxySettings = true; @@ -8,21 +14,33 @@ }; # Redirect *lelgenio.xyz -> *lelgenio.com - services.nginx.virtualHosts = lib.mapAttrs' - (key: value: lib.nameValuePair "${key}lelgenio.xyz" value) - ( - lib.genAttrs [ "" "social." "blog." "cloud." "mail." "git." "syncthing." ] (name: { - enableACME = true; - forceSSL = true; - locations."/".return = "301 $scheme://${name}lelgenio.com$request_uri"; - }) - ); + services.nginx.virtualHosts = + lib.mapAttrs' (key: value: lib.nameValuePair "${key}lelgenio.xyz" value) + ( + lib.genAttrs + [ + "" + "social." + "blog." + "cloud." + "mail." + "git." + "syncthing." + ] + (name: { + enableACME = true; + forceSSL = true; + locations."/".return = "301 $scheme://${name}lelgenio.com$request_uri"; + }) + ); security.acme = { acceptTerms = true; defaults.email = "lelgenio@disroot.org"; }; - networking.firewall.allowedTCPPorts = [ 80 443 ]; + networking.firewall.allowedTCPPorts = [ + 80 + 443 + ]; } - diff --git a/hosts/phantom/syncthing.nix b/hosts/phantom/syncthing.nix index 55e4cbc..abbda7d 100644 --- a/hosts/phantom/syncthing.nix +++ b/hosts/phantom/syncthing.nix @@ -1,4 +1,10 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ services.syncthing = { enable = true; @@ -14,11 +20,10 @@ proxyPass = "http://127.0.0.1:8384"; extraConfig = # required when the target is also TLS server with multiple hosts - "proxy_ssl_server_name on;" + - # required when the server wants to use HTTP Authentication - "proxy_pass_header Authorization;" - ; + "proxy_ssl_server_name on;" + + + # required when the server wants to use HTTP Authentication + "proxy_pass_header Authorization;"; }; }; } - diff --git a/hosts/phantom/users.nix b/hosts/phantom/users.nix index 75aee27..6291321 100644 --- a/hosts/phantom/users.nix +++ b/hosts/phantom/users.nix @@ -1,8 +1,12 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ security.rtkit.enable = true; services.openssh = { enable = true; - ports = [ 9022 22 ]; + ports = [ + 9022 + 22 + ]; settings = { PasswordAuthentication = false; KbdInteractiveAuthentication = false; @@ -15,7 +19,15 @@ isNormalUser = true; description = "Leonardo Eugênio"; hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A"; - extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ]; + 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" @@ -32,7 +44,5 @@ programs.fish.enable = true; - environment.systemPackages = with pkgs; [ - git - ]; + environment.systemPackages = with pkgs; [ git ]; } diff --git a/hosts/phantom/vpsadminos.nix b/hosts/phantom/vpsadminos.nix index 40401cd..8102fbb 100644 --- a/hosts/phantom/vpsadminos.nix +++ b/hosts/phantom/vpsadminos.nix @@ -6,7 +6,12 @@ # # https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: with lib; let nameservers = [ @@ -22,16 +27,19 @@ in systemd.services.systemd-sysctl.enable = false; systemd.services.systemd-oomd.enable = false; systemd.sockets."systemd-journald-audit".enable = false; - systemd.mounts = [{ where = "/sys/kernel/debug"; enable = false; }]; + systemd.mounts = [ + { + where = "/sys/kernel/debug"; + enable = false; + } + ]; systemd.services.rpc-gssd.enable = false; # Due to our restrictions in /sys, the default systemd-udev-trigger fails # on accessing PCI devices, etc. Override it to match only network devices. # In addition, boot.isContainer prevents systemd-udev-trigger.service from # being enabled at all, so add it explicitly. - systemd.additionalUpstreamSystemUnits = [ - "systemd-udev-trigger.service" - ]; + systemd.additionalUpstreamSystemUnits = [ "systemd-udev-trigger.service" ]; systemd.services.systemd-udev-trigger.serviceConfig.ExecStart = [ "" "-udevadm trigger --subsystem-match=net --action=add" diff --git a/hosts/phantom/writefreely.nix b/hosts/phantom/writefreely.nix index 3530e06..5608c0f 100644 --- a/hosts/phantom/writefreely.nix +++ b/hosts/phantom/writefreely.nix @@ -1,4 +1,10 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ services.writefreely = { enable = true; acme.enable = true; @@ -22,4 +28,3 @@ }; }; } - diff --git a/hosts/pixie.nix b/hosts/pixie.nix index 5f8ce66..9aa5a1e 100644 --- a/hosts/pixie.nix +++ b/hosts/pixie.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" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; @@ -18,8 +30,7 @@ options = [ "subvol=nixos" ]; }; - boot.initrd.luks.devices."pixie".device = - "/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928"; + boot.initrd.luks.devices."pixie".device = "/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928"; fileSystems."/home" = { device = "/dev/mapper/pixie"; @@ -46,8 +57,7 @@ # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; # networking.interfaces.veth74f3ffc.useDHCP = lib.mkDefault true; - hardware.cpu.amd.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; networking.hostName = "pixie"; # Define your hostname. } diff --git a/hosts/rainbow.nix b/hosts/rainbow.nix index 776ebec..b977ee6 100644 --- a/hosts/rainbow.nix +++ b/hosts/rainbow.nix @@ -1,16 +1,34 @@ # 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, + ... +}: let - btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ]; - btrfs_ssd = [ "ssd" "discard=async" ]; + btrfs_options = [ + "compress=zstd:3" + "noatime" + "x-systemd.device-timeout=0" + ]; + btrfs_ssd = [ + "ssd" + "discard=async" + ]; in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; boot.initrd.kernelModules = [ "i915" ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -46,10 +64,12 @@ in options = [ "subvol=@swap" ] ++ btrfs_ssd; }; - swapDevices = [{ - device = "/swap/swapfile"; - size = (1024 * 8); - }]; + swapDevices = [ + { + device = "/swap/swapfile"; + size = (1024 * 8); + } + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -59,8 +79,7 @@ in # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; networking.hostName = "rainbow"; # Define your hostname. } diff --git a/overlays/default.nix b/overlays/default.nix index 060a0c0..14257ba 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,4 +1,5 @@ -{ inputs, packages, ... }: rec { +{ inputs, packages, ... }: +rec { all = [ scripts sway @@ -13,68 +14,87 @@ sway = (import ./sway.nix); - themes = (final: prev: { - material-wifi-icons = final.stdenv.mkDerivation rec { - name = "material-wifi-icons"; - src = inputs.material-wifi-icons; - installPhase = '' - install -D material-wifi.ttf $out/share/fonts/${name} - ''; - }; - papirus_red = (final.papirus-icon-theme.override { color = "red"; }); - orchis_theme_compact = (final.orchis-theme.override { - border-radius = 0; - tweaks = [ "compact" "solid" ]; - }); - nerdfonts_fira_hack = (final.nerdfonts.override { fonts = [ "FiraCode" "Hack" ]; }); - }); + themes = ( + final: prev: { + material-wifi-icons = final.stdenv.mkDerivation rec { + name = "material-wifi-icons"; + src = inputs.material-wifi-icons; + installPhase = '' + install -D material-wifi.ttf $out/share/fonts/${name} + ''; + }; + papirus_red = (final.papirus-icon-theme.override { color = "red"; }); + orchis_theme_compact = ( + final.orchis-theme.override { + border-radius = 0; + tweaks = [ + "compact" + "solid" + ]; + } + ); + nerdfonts_fira_hack = ( + final.nerdfonts.override { + fonts = [ + "FiraCode" + "Hack" + ]; + } + ); + } + ); - new-packages = (final: prev: packages // { - dhist = inputs.dhist.packages.${prev.system}.dhist; - demoji = inputs.demoji.packages.${prev.system}.default; - 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; - }); + new-packages = ( + final: prev: + packages + // { + dhist = inputs.dhist.packages.${prev.system}.dhist; + demoji = inputs.demoji.packages.${prev.system}.default; + 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; + } + ); - patches = (final: prev: { - bemenu = prev.bemenu.overrideAttrs (o: { - postPatch = '' - substituteInPlace lib/renderers/wayland/window.c \ - --replace ZWLR_LAYER_SHELL_V1_LAYER_TOP ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY - ''; - }); - mySway = prev.sway.override { - sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: { - patches = old.patches - ++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ]; + patches = ( + final: prev: { + bemenu = prev.bemenu.overrideAttrs (o: { + postPatch = '' + substituteInPlace lib/renderers/wayland/window.c \ + --replace ZWLR_LAYER_SHELL_V1_LAYER_TOP ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY + ''; }); - }; - mangohud = prev.mangohud.overrideAttrs (o: { - patches = o.patches ++ [ - (prev.fetchpatch { - url = "https://github.com/flightlessmango/MangoHud/commit/95141de657e02577f1d3fab0ca12122bfb68bc56.patch"; - hash = "sha256-a2tESliGBkfF7uYQn8TDgeFt07A9FOioI4VcTT7DC7A="; - }) - ]; - }); - }); + 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="; + }) + ]; + }); + } + ); - variables = (final: prev: { - uservars = import ../user/variables.nix; - }); + variables = (final: prev: { uservars = import ../user/variables.nix; }); - lib_extended = (final: prev: { - lib = prev.lib // rec { - # Utility function - # Input: [{v1=1;} {v2=2;}] - # Output: {v1=1;v2=2;} - mergeAttrsSet = prev.lib.foldAttrs (n: _: n) { }; + lib_extended = ( + final: prev: { + lib = prev.lib // rec { + # Utility function + # Input: [{v1=1;} {v2=2;}] + # Output: {v1=1;v2=2;} + mergeAttrsSet = prev.lib.foldAttrs (n: _: n) { }; - # Easily translate imperative templating code - # Input: [ 1 2 ] (num: { "v${num}" = num; }) - # Output: {v1=1;v2=2;} - forEachMerge = list: func: mergeAttrsSet (prev.lib.forEach list func); - }; - }); + # Easily translate imperative templating code + # Input: [ 1 2 ] (num: { "v${num}" = num; }) + # Output: {v1=1;v2=2;} + forEachMerge = list: func: mergeAttrsSet (prev.lib.forEach list func); + }; + } + ); } diff --git a/pkgs/blade-formatter/default.nix b/pkgs/blade-formatter/default.nix index adf2d7f..f824066 100644 --- a/pkgs/blade-formatter/default.nix +++ b/pkgs/blade-formatter/default.nix @@ -1,11 +1,12 @@ -{ lib -, mkYarnPackage -, fetchFromGitHub -, fetchYarnDeps -, testers -, writeText -, runCommand -, blade-formatter +{ + lib, + mkYarnPackage, + fetchFromGitHub, + fetchYarnDeps, + testers, + writeText, + runCommand, + blade-formatter, }: mkYarnPackage rec { @@ -40,15 +41,17 @@ mkYarnPackage rec { Hello world! @endif ''; - actual = runCommand "actual" - { - nativeBuildInputs = [ blade-formatter ]; - base = writeText "base" '' - @if( true ) Hello world! @endif + actual = + runCommand "actual" + { + nativeBuildInputs = [ blade-formatter ]; + base = writeText "base" '' + @if( true ) Hello world! @endif + ''; + } + '' + blade-formatter $base > $out ''; - } '' - blade-formatter $base > $out - ''; }; }; diff --git a/pkgs/cargo-checkmate.nix b/pkgs/cargo-checkmate.nix index 0620667..a85ff80 100644 --- a/pkgs/cargo-checkmate.nix +++ b/pkgs/cargo-checkmate.nix @@ -1,11 +1,12 @@ -{ lib -, rustPlatform -, fetchFromGitHub -, pkg-config -, openssl -, zlib -, stdenv -, Security ? null +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + openssl, + zlib, + stdenv, + Security ? null, }: rustPlatform.buildRustPackage rec { @@ -22,9 +23,7 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-hOB84u55ishahIFSqBnqccqH3OlC9J8mCYzsd23jTyA="; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ - Security - ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; meta = with lib; { description = "Check all the things."; diff --git a/pkgs/default.nix b/pkgs/default.nix index 0fdc3eb..00600fc 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,7 +1,8 @@ # Custom packages, that can be defined similarly to ones from nixpkgs # You can build them using 'nix build .#example' or (legacy) 'nix-build -A example' -{ pkgs, inputs }: { +{ pkgs, inputs }: +{ blade-formatter = pkgs.callPackage ./blade-formatter { }; cargo-checkmate = pkgs.callPackage ./cargo-checkmate.nix { }; lipsum = pkgs.callPackage ./lipsum.nix { inherit inputs; }; diff --git a/pkgs/emmet-cli.nix b/pkgs/emmet-cli.nix index c7fce2e..043aff6 100644 --- a/pkgs/emmet-cli.nix +++ b/pkgs/emmet-cli.nix @@ -1,6 +1,7 @@ -{ lib -, buildNpmPackage -, fetchFromGitHub +{ + lib, + buildNpmPackage, + fetchFromGitHub, }: buildNpmPackage rec { diff --git a/pkgs/lipsum.nix b/pkgs/lipsum.nix index e1dabe5..427f04e 100644 --- a/pkgs/lipsum.nix +++ b/pkgs/lipsum.nix @@ -11,9 +11,7 @@ pkgs.stdenv.mkDerivation rec { wrapGAppsHook ]; - makeFlags = [ - "PRG=${pname}" - ]; + makeFlags = [ "PRG=${pname}" ]; installPhase = '' install -Dm 755 "$pname" "$out/bin/$pname" @@ -21,4 +19,3 @@ pkgs.stdenv.mkDerivation rec { glib-compile-schemas "$out/share/glib-2.0/schemas/" ''; } - diff --git a/scripts/default.nix b/scripts/default.nix index bc2ac3d..f509e37 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -1,59 +1,134 @@ -(final: prev: -with prev; -let - import_script = (_: path: import (path) { inherit pkgs lib; }); - create_script = (name: text: runtimeInputs: - let - script_body = pkgs.writeTextFile { - inherit name; - executable = true; - text = '' - ${builtins.readFile text} - ''; - }; - in - (pkgs.writeShellApplication { - inherit name runtimeInputs; - text = ''exec ${script_body} "$@"''; - checkPhase = ""; - })); - create_scripts = - lib.mapAttrs (name: deps: create_script name ./${name} deps); +( + final: prev: + with prev; + let + import_script = (_: path: import (path) { inherit pkgs lib; }); + create_script = ( + name: text: runtimeInputs: + let + script_body = pkgs.writeTextFile { + inherit name; + executable = true; + text = '' + ${builtins.readFile text} + ''; + }; + in + (pkgs.writeShellApplication { + inherit name runtimeInputs; + text = ''exec ${script_body} "$@"''; + checkPhase = ""; + }) + ); + create_scripts = lib.mapAttrs (name: deps: create_script name ./${name} deps); - pass = pkgs.pass.withExtensions (ex: with ex; [ - pass-otp - ]); -in -create_scripts - { + pass = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]); + in + create_scripts { br = [ ]; - bmenu = [ final.bemenu final.dhist fish j4-dmenu-desktop jq sway ]; - down_meme = [ wl-clipboard yt-dlp libnotify ]; - wl-copy-file = [ wl-clipboard fish ]; + bmenu = [ + final.bemenu + final.dhist + fish + j4-dmenu-desktop + jq + sway + ]; + down_meme = [ + wl-clipboard + yt-dlp + libnotify + ]; + wl-copy-file = [ + wl-clipboard + fish + ]; _diffr = [ diffr ]; _thunar-terminal = [ final.terminal ]; _sway_idle_toggle = [ final.swayidle ]; - kak-pager = [ fish final._diffr ]; + kak-pager = [ + fish + final._diffr + ]; kak-man-pager = [ final.kak-pager ]; - helix-pager = [ fish final._diffr ]; + helix-pager = [ + fish + final._diffr + ]; helix-man-pager = [ final.helix-pager ]; - musmenu = [ mpc-cli final.wdmenu trash-cli xdg-user-dirs libnotify sd wl-clipboard ]; - showkeys = - [ ]; # This will not work unless programs.wshowkeys is enabled systemwide + musmenu = [ + mpc-cli + final.wdmenu + trash-cli + xdg-user-dirs + libnotify + sd + wl-clipboard + ]; + showkeys = [ ]; # 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 ]; - volumesh = [ pulseaudio libnotify ]; - pulse_sink = [ pulseaudio pamixer final.wdmenu ]; - color_picker = [ grim slurp wl-clipboard libnotify imagemagick ]; - dzadd = [ procps libnotify final.wdmenu jq mpv pqiv python3Packages.deemix mpc-cli final.mpdDup ]; - mpdDup = [ mpc-cli perl ]; - readQrCode = [ grim zbar wl-clipboard ]; - } // lib.mapAttrs import_script { - wdmenu = ./wdmenu.nix; - wlauncher = ./wlauncher.nix; - _gpg-unlock = ./_gpg-unlock.nix; -}) + 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 + ]; + volumesh = [ + pulseaudio + libnotify + ]; + pulse_sink = [ + pulseaudio + pamixer + final.wdmenu + ]; + color_picker = [ + grim + slurp + wl-clipboard + libnotify + imagemagick + ]; + dzadd = [ + procps + libnotify + final.wdmenu + jq + mpv + pqiv + python3Packages.deemix + mpc-cli + final.mpdDup + ]; + mpdDup = [ + mpc-cli + perl + ]; + readQrCode = [ + grim + zbar + wl-clipboard + ]; + } + // lib.mapAttrs import_script { + wdmenu = ./wdmenu.nix; + wlauncher = ./wlauncher.nix; + _gpg-unlock = ./_gpg-unlock.nix; + } +) diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 90de405..368b837 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -2,8 +2,12 @@ let main_ssh_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"; 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 ]; + "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 ]; diff --git a/system/bluetooth.nix b/system/bluetooth.nix index 20eb72e..1bcea1f 100644 --- a/system/bluetooth.nix +++ b/system/bluetooth.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ services.blueman.enable = true; hardware.bluetooth = { enable = true; @@ -8,7 +9,9 @@ # Discoverable = true; AlwaysPairable = true; }; - Policy = { AutoEnable = true; }; + Policy = { + AutoEnable = true; + }; }; }; } diff --git a/system/boot.nix b/system/boot.nix index 25e9a11..81d838e 100644 --- a/system/boot.nix +++ b/system/boot.nix @@ -1,4 +1,11 @@ -{ config, pkgs, lib, inputs, ... }: { +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ console = { font = "${pkgs.terminus_font}/share/consolefonts/ter-120n.psf.gz"; packages = [ pkgs.terminus_font ]; @@ -38,9 +45,7 @@ enable = true; theme = lib.mkIf (pkgs.uservars.desktop == "sway") "red_loader"; themePackages = with pkgs; [ - (adi1090x-plymouth-themes.override { - selected_themes = [ "red_loader" ]; - }) + (adi1090x-plymouth-themes.override { selected_themes = [ "red_loader" ]; }) ]; }; }; diff --git a/system/cachix.nix b/system/cachix.nix index 07af177..7ff9b29 100644 --- a/system/cachix.nix +++ b/system/cachix.nix @@ -1,4 +1,10 @@ -{ pkgs, lib, config, ... }: { +{ + pkgs, + lib, + config, + ... +}: +{ services.cachix-watch-store = { enable = true; cacheName = "lelgenio"; diff --git a/system/configuration.nix b/system/configuration.nix index 130ca7d..8054fa9 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -1,7 +1,13 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ imports = [ ./gamemode.nix ./cachix.nix diff --git a/system/containers.nix b/system/containers.nix index c2c2941..377647d 100644 --- a/system/containers.nix +++ b/system/containers.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ services.flatpak.enable = true; virtualisation.docker.enable = true; virtualisation.docker.autoPrune.enable = true; diff --git a/system/fonts.nix b/system/fonts.nix index e6d4ccd..d8bff5a 100644 --- a/system/fonts.nix +++ b/system/fonts.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ fonts.enableDefaultPackages = true; fonts.packages = with pkgs; [ noto-fonts diff --git a/system/gamemode.nix b/system/gamemode.nix index d9445ea..92207cd 100644 --- a/system/gamemode.nix +++ b/system/gamemode.nix @@ -1,8 +1,16 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ programs.gamemode.enable = true; programs.gamemode.enableRenice = true; programs.gamemode.settings = { - general = { renice = 10; }; + general = { + renice = 10; + }; # Warning: GPU optimisations have the potential to damage hardware gpu = { diff --git a/system/gitlab-runner.nix b/system/gitlab-runner.nix index 1cc46a7..335bc5a 100644 --- a/system/gitlab-runner.nix +++ b/system/gitlab-runner.nix @@ -1,40 +1,52 @@ -{ pkgs, lib, ... }: { - mkNixRunner = registrationConfigFile: with lib; rec { - # File should contain at least these two variables: - # `CI_SERVER_URL` - # `REGISTRATION_TOKEN` - inherit registrationConfigFile; # 2 - dockerImage = "alpine:3.18.2"; - dockerAllowedImages = [ dockerImage ]; - dockerVolumes = [ - "/etc/nix/nix.conf:/etc/nix/nix.conf:ro" - "/nix/store:/nix/store:ro" - "/nix/var/nix/db:/nix/var/nix/db:ro" - "/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro" - ]; - dockerDisableCache = true; - preBuildScript = pkgs.writeScript "setup-container" '' - mkdir -p -m 0755 /nix/var/log/nix/drvs - mkdir -p -m 0755 /nix/var/nix/gcroots - mkdir -p -m 0755 /nix/var/nix/profiles - mkdir -p -m 0755 /nix/var/nix/temproots - mkdir -p -m 0755 /nix/var/nix/userpool - mkdir -p -m 1777 /nix/var/nix/gcroots/per-user - mkdir -p -m 1777 /nix/var/nix/profiles/per-user - mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root - mkdir -p -m 0700 "$HOME/.nix-defexpr" +{ pkgs, lib, ... }: +{ + mkNixRunner = + registrationConfigFile: with lib; rec { + # File should contain at least these two variables: + # `CI_SERVER_URL` + # `REGISTRATION_TOKEN` + inherit registrationConfigFile; # 2 + dockerImage = "alpine:3.18.2"; + dockerAllowedImages = [ dockerImage ]; + dockerVolumes = [ + "/etc/nix/nix.conf:/etc/nix/nix.conf:ro" + "/nix/store:/nix/store:ro" + "/nix/var/nix/db:/nix/var/nix/db:ro" + "/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro" + ]; + dockerDisableCache = true; + preBuildScript = pkgs.writeScript "setup-container" '' + mkdir -p -m 0755 /nix/var/log/nix/drvs + mkdir -p -m 0755 /nix/var/nix/gcroots + mkdir -p -m 0755 /nix/var/nix/profiles + mkdir -p -m 0755 /nix/var/nix/temproots + mkdir -p -m 0755 /nix/var/nix/userpool + mkdir -p -m 1777 /nix/var/nix/gcroots/per-user + mkdir -p -m 1777 /nix/var/nix/profiles/per-user + mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root + mkdir -p -m 0700 "$HOME/.nix-defexpr" - . ${pkgs.nix}/etc/profile.d/nix.sh + . ${pkgs.nix}/etc/profile.d/nix.sh - ${pkgs.nix}/bin/nix-env -i ${concatStringsSep " " (with pkgs; [ nix cacert git openssh ])} - ''; - environmentVariables = { - ENV = "/etc/profile"; - USER = "root"; - NIX_REMOTE = "daemon"; - PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin"; - NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"; + ${pkgs.nix}/bin/nix-env -i ${ + concatStringsSep " " ( + with pkgs; + [ + nix + cacert + git + openssh + ] + ) + } + ''; + environmentVariables = { + ENV = "/etc/profile"; + USER = "root"; + NIX_REMOTE = "daemon"; + PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin"; + NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"; + }; + tagList = [ "nix" ]; }; - tagList = [ "nix" ]; - }; } diff --git a/system/gnome.nix b/system/gnome.nix index cb8c106..72b98c5 100644 --- a/system/gnome.nix +++ b/system/gnome.nix @@ -1,7 +1,8 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, ... }: { +{ config, pkgs, ... }: +{ # Enable the X11 windowing system. services.xserver.enable = true; # Enable the GNOME Desktop Environment. @@ -19,11 +20,14 @@ }; # services.xserver.displayManager.autologin.user = "lelgenio"; - environment.systemPackages = with pkgs; with gnome; [ - gnome-tweaks - dconf-editor + environment.systemPackages = + with pkgs; + with gnome; + [ + gnome-tweaks + dconf-editor - chrome-gnome-shell - gnomeExtensions.quick-settings-audio-devices-hider - ]; + chrome-gnome-shell + gnomeExtensions.quick-settings-audio-devices-hider + ]; } diff --git a/system/greetd.nix b/system/greetd.nix index 8293c64..6bc6297 100644 --- a/system/greetd.nix +++ b/system/greetd.nix @@ -1,6 +1,17 @@ -{ lib, pkgs, config, ... }: +{ + lib, + pkgs, + config, + ... +}: let - inherit (pkgs.uservars) key accent font theme desktop; + inherit (pkgs.uservars) + key + accent + font + theme + desktop + ; cfg = config.login-manager.greetd; in diff --git a/system/kde.nix b/system/kde.nix index 66aa2a2..c5ef277 100644 --- a/system/kde.nix +++ b/system/kde.nix @@ -1,4 +1,5 @@ -{ config, pkgs, ... }: { +{ config, pkgs, ... }: +{ # Enable the X11 windowing system. services.xserver.enable = true; # Enable the KDE Desktop Environment. diff --git a/system/locale.nix b/system/locale.nix index bb344c7..07e7175 100644 --- a/system/locale.nix +++ b/system/locale.nix @@ -1,4 +1,5 @@ -{ pkgs, config, ... }: { +{ pkgs, config, ... }: +{ time.timeZone = "America/Sao_Paulo"; environment.variables.TZ = config.time.timeZone; i18n.defaultLocale = "pt_BR.utf8"; diff --git a/system/media-packages.nix b/system/media-packages.nix index e72ea0a..818b78b 100644 --- a/system/media-packages.nix +++ b/system/media-packages.nix @@ -1,6 +1,13 @@ -{ config, pkgs, lib, ... }: -let cfg = config.packages.media-packages; -in { +{ + config, + pkgs, + lib, + ... +}: +let + cfg = config.packages.media-packages; +in +{ options.packages.media-packages = { enable = lib.mkEnableOption "media packages"; }; diff --git a/system/monolith-forgejo-runner.nix b/system/monolith-forgejo-runner.nix index ee07410..fa2b3c6 100644 --- a/system/monolith-forgejo-runner.nix +++ b/system/monolith-forgejo-runner.nix @@ -1,4 +1,5 @@ -{ pkgs, config, ... }: { +{ pkgs, config, ... }: +{ services.gitea-actions-runner = { package = pkgs.forgejo-actions-runner; instances.default = { diff --git a/system/monolith-gitlab-runner.nix b/system/monolith-gitlab-runner.nix index 37b16dd..8e419d1 100644 --- a/system/monolith-gitlab-runner.nix +++ b/system/monolith-gitlab-runner.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner; in @@ -15,7 +20,8 @@ in # dockerPrivileged = true; # }; thoreb_builder = { - registrationConfigFile = config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; + registrationConfigFile = + config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; dockerImage = "debian"; dockerPrivileged = true; }; diff --git a/system/network.nix b/system/network.nix index c8ebdd9..aee7518 100644 --- a/system/network.nix +++ b/system/network.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; diff --git a/system/nix-serve.nix b/system/nix-serve.nix index 0bd49c2..6cc7161 100644 --- a/system/nix-serve.nix +++ b/system/nix-serve.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: +{ services.nix-serve = { enable = true; secretKeyFile = config.age.secrets.monolith-nix-serve-privkey.path; diff --git a/system/nix.nix b/system/nix.nix index 38b2eb9..18ac258 100644 --- a/system/nix.nix +++ b/system/nix.nix @@ -1,7 +1,13 @@ -{ lib, config, pkgs, inputs, ... }: +{ + lib, + config, + pkgs, + inputs, + ... +}: let - collectFlakeInputs = input: - [ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { })); + collectFlakeInputs = + input: [ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { })); in { system.extraDependencies = collectFlakeInputs inputs.self; @@ -17,7 +23,10 @@ in optimise.automatic = true; settings = { auto-optimise-store = true; - trusted-users = [ "root" "@wheel" ]; + trusted-users = [ + "root" + "@wheel" + ]; substituters = [ "https://cache.nixos.org" "https://nix-community.cachix.org" diff --git a/system/rainbow-gitlab-runner.nix b/system/rainbow-gitlab-runner.nix index 2cae621..aa177de 100644 --- a/system/rainbow-gitlab-runner.nix +++ b/system/rainbow-gitlab-runner.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner; in @@ -15,7 +20,8 @@ in # dockerPrivileged = true; # }; thoreb_builder = { - registrationConfigFile = config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; + registrationConfigFile = + config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; dockerImage = "debian"; dockerPrivileged = true; }; diff --git a/system/secrets.nix b/system/secrets.nix index c94581c..ca11fb4 100644 --- a/system/secrets.nix +++ b/system/secrets.nix @@ -1,18 +1,13 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ age = { identityPaths = [ "/root/.ssh/id_rsa" ]; secrets.lelgenio-cachix.file = ../secrets/lelgenio-cachix.age; - secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = - ../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 = - ../secrets/monolith-nix-serve-privkey.age; - secrets.phantom-forgejo-mailer-password.file = - ../secrets/phantom-forgejo-mailer-password.age; + secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../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 = ../secrets/monolith-nix-serve-privkey.age; + secrets.phantom-forgejo-mailer-password.file = ../secrets/phantom-forgejo-mailer-password.age; }; } diff --git a/system/sound.nix b/system/sound.nix index 3cdbf58..8ef55ab 100644 --- a/system/sound.nix +++ b/system/sound.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ sound.enable = true; hardware.pulseaudio.enable = false; services.pipewire = { diff --git a/system/specialisation.nix b/system/specialisation.nix index c0e1498..23b410f 100644 --- a/system/specialisation.nix +++ b/system/specialisation.nix @@ -1,10 +1,7 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ specialisation.dark-theme.configuration = { - nixpkgs.overlays = [ - (final: prev: { - uservars = prev.uservars; - }) - ]; + nixpkgs.overlays = [ (final: prev: { uservars = prev.uservars; }) ]; }; specialisation.light-theme.configuration = { nixpkgs.overlays = [ diff --git a/system/steam.nix b/system/steam.nix index ce94c3d..ddc33c8 100644 --- a/system/steam.nix +++ b/system/steam.nix @@ -1,17 +1,27 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ programs.steam.enable = true; programs.steam.package = pkgs.steam.override { - extraLibraries = pkgs: with config.hardware.opengl; - if pkgs.hostPlatform.is64bit - then [ package ] ++ extraPackages - else [ package32 ] ++ extraPackages32; + extraLibraries = + pkgs: + with config.hardware.opengl; + if pkgs.hostPlatform.is64bit then + [ package ] ++ extraPackages + else + [ package32 ] ++ extraPackages32; - extraPkgs = pkgs: with pkgs; [ - capitaine-cursors - bibata-cursors - mangohud - xdg-user-dirs - ]; + extraPkgs = + pkgs: with pkgs; [ + capitaine-cursors + bibata-cursors + mangohud + xdg-user-dirs + ]; }; environment.systemPackages = with pkgs; [ protontricks diff --git a/system/thunar.nix b/system/thunar.nix index 5a14448..fcb9e3b 100644 --- a/system/thunar.nix +++ b/system/thunar.nix @@ -1,4 +1,10 @@ -{ config, pkgs, inputs, ... }: { +{ + config, + pkgs, + inputs, + ... +}: +{ programs.thunar = { enable = true; plugins = with pkgs.xfce; [ @@ -12,17 +18,15 @@ services.tumbler.enable = true; environment.systemPackages = [ - ( - pkgs.writeTextFile { - name = "thumbs"; - text = '' - [Thumbnailer Entry] - TryExec=unzip - Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o" - MimeType=application/x-krita; - ''; - destination = "/share/thumbnailers/kra.thumbnailer"; - } - ) + (pkgs.writeTextFile { + name = "thumbs"; + text = '' + [Thumbnailer Entry] + TryExec=unzip + Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o" + MimeType=application/x-krita; + ''; + destination = "/share/thumbnailers/kra.thumbnailer"; + }) ]; } diff --git a/system/users.nix b/system/users.nix index 2334897..ead5528 100644 --- a/system/users.nix +++ b/system/users.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ security.sudo.wheelNeedsPassword = false; # services.getty.autologinUser = "lelgenio"; @@ -10,7 +11,15 @@ isNormalUser = true; description = "Leonardo Eugênio"; hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A"; - extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ]; + 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" diff --git a/user/alacritty.nix b/user/alacritty.nix index 8c7ec22..ae2e2fb 100644 --- a/user/alacritty.nix +++ b/user/alacritty.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key theme accent font; + inherit (pkgs.uservars) + key + theme + accent + font + ; inherit (theme) color; in { @@ -10,7 +20,9 @@ in settings = { font = { size = font.size.small; - normal = { family = font.mono; }; + normal = { + family = font.mono; + }; }; colors = { primary = { @@ -40,31 +52,34 @@ in hints = { alphabet = key.hints; - enabled = [{ - regex = - let - mimes = - "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)"; - # I fucking hate regex, look at this bullshit - delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^⟨⟩`''; - # Kakoune uses these characters to represent whitespace, - # but alacritty doesn't know about them - whitespace_characters = ''¬·→''; - in - "${mimes}[${delimiters}${whitespace_characters}]+"; - command = "xdg-open"; - post_processing = true; - mouse = { - enabled = true; - mods = "None"; - }; - binding = { - key = "U"; - mods = "Control|Shift"; - }; - }]; + enabled = [ + { + regex = + let + mimes = "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)"; + # I fucking hate regex, look at this bullshit + delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^⟨⟩`''; + # Kakoune uses these characters to represent whitespace, + # but alacritty doesn't know about them + whitespace_characters = ''¬·→''; + in + "${mimes}[${delimiters}${whitespace_characters}]+"; + command = "xdg-open"; + post_processing = true; + mouse = { + enabled = true; + mods = "None"; + }; + binding = { + key = "U"; + mods = "Control|Shift"; + }; + } + ]; + }; + mouse = { + hide_when_typing = true; }; - mouse = { hide_when_typing = true; }; keyboard.bindings = [ { key = lib.toUpper key.up; @@ -141,7 +156,9 @@ in }; }; - home.sessionVariables = { TERMINAL = "alacritty"; }; + home.sessionVariables = { + TERMINAL = "alacritty"; + }; # Look at this fucking bullshit: # https://gitlab.gnome.org/GNOME/glib/-/blob/20c4fcb2a7246a2b205649eae3ebda4296217afc/gio/gdesktopappinfo.c#L2702 diff --git a/user/bmenu.nix b/user/bmenu.nix index 047da54..38c36c6 100644 --- a/user/bmenu.nix +++ b/user/bmenu.nix @@ -1,6 +1,17 @@ -{ config, pkgs, lib, inputs, ... }: +{ + config, + pkgs, + lib, + inputs, + ... +}: let - inherit (pkgs.uservars) key theme accent font; + inherit (pkgs.uservars) + key + theme + accent + font + ; inherit (theme) color; in { diff --git a/user/chat.nix b/user/chat.nix index 34ddd84..f0987ed 100644 --- a/user/chat.nix +++ b/user/chat.nix @@ -1,4 +1,11 @@ -{ config, pkgs, lib, inputs, ... }: { +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ wayland.windowManager.sway = { extraConfig = '' exec thunderbird diff --git a/user/controller.nix b/user/controller.nix index 73ab483..6a756df 100644 --- a/user/controller.nix +++ b/user/controller.nix @@ -1,4 +1,11 @@ -{ config, pkgs, lib, inputs, ... }: { +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ xdg.desktopEntries = { connect-controller = { name = "Connect Controller"; diff --git a/user/desktop-entries.nix b/user/desktop-entries.nix index eaa4c93..1b809d3 100644 --- a/user/desktop-entries.nix +++ b/user/desktop-entries.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: +{ xdg.desktopEntries = { kak = { name = "Kakoune"; @@ -8,7 +14,10 @@ terminal = true; type = "Application"; icon = "kak.desktop"; - categories = [ "Utility" "TextEditor" ]; + categories = [ + "Utility" + "TextEditor" + ]; startupNotify = true; mimeType = [ "text/english" @@ -40,10 +49,15 @@ terminal = true; type = "Application"; icon = "mutt"; - categories = [ "Network" "Email" ]; + categories = [ + "Network" + "Email" + ]; startupNotify = false; mimeType = [ "x-scheme-handler/mailto" ]; - settings = { Keywords = "Mail;E-mail;"; }; + settings = { + Keywords = "Mail;E-mail;"; + }; }; down_meme = { name = "DownMeme"; diff --git a/user/firefox.nix b/user/firefox.nix index b60f808..4c442e3 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, font, ... }: -let inherit (pkgs.uservars) desktop browser; - bugfixedFirefox = pkgs.firefox-esr-unwrapped // { requireSigning = false; allowAddonSideload = true; }; +{ + config, + pkgs, + lib, + font, + ... +}: +let + inherit (pkgs.uservars) desktop browser; + bugfixedFirefox = pkgs.firefox-esr-unwrapped // { + requireSigning = false; + allowAddonSideload = true; + }; in { config = { diff --git a/user/fish/default.nix b/user/fish/default.nix index 913e514..07ba4c2 100644 --- a/user/fish/default.nix +++ b/user/fish/default.nix @@ -1,6 +1,21 @@ -{ config, pkgs, lib, ... }: -let inherit (pkgs.uservars) key theme color accent font editor desktop; -in { +{ + config, + pkgs, + lib, + ... +}: +let + inherit (pkgs.uservars) + key + theme + color + accent + font + editor + desktop + ; +in +{ config = { programs.fish = { enable = true; @@ -34,10 +49,12 @@ in { }; shellAbbrs = { off = "shutdown now"; - v = { - "helix" = "hx"; - "kakoune" = "kak"; - }.${editor}; + v = + { + "helix" = "hx"; + "kakoune" = "kak"; + } + .${editor}; ns = "nix develop --command $SHELL"; wcf = "wl-copy-file"; c = "cargo"; @@ -64,7 +81,9 @@ in { gr = "cd (git root)"; gri = "git rebase --interactive FETCH_HEAD"; }; - functions = { fish_greeting = ""; }; + functions = { + fish_greeting = ""; + }; }; programs = { zoxide.enable = true; @@ -85,13 +104,18 @@ in { }; # programs.command-not-found.enable = true; programs.nix-index.enable = true; - home.packages = (with pkgs; with fishPlugins;[ - trash-cli - wl-copy-file - foreign-env - ] ++ (lib.optionals (desktop == "sway") [ - async-prompt - done - ])); + home.packages = ( + with pkgs; + with fishPlugins; + [ + trash-cli + wl-copy-file + foreign-env + ] + ++ (lib.optionals (desktop == "sway") [ + async-prompt + done + ]) + ); }; } diff --git a/user/fzf.nix b/user/fzf.nix index fc7856a..a4113fa 100644 --- a/user/fzf.nix +++ b/user/fzf.nix @@ -1,6 +1,17 @@ -{ config, pkgs, lib, inputs, ... }: +{ + config, + pkgs, + lib, + inputs, + ... +}: let - inherit (pkgs.uservars) key theme accent font; + inherit (pkgs.uservars) + key + theme + accent + font + ; inherit (theme) color; colors = { @@ -15,22 +26,21 @@ let makeOptList = lib.mapAttrsToList makeKeyValue colors; makeColorValue = lib.strings.concatStringsSep "," makeOptList; color_opts = "--color=${makeColorValue}"; - preview_opts = - "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'"; - + preview_opts = "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'"; in { programs.fzf = { enable = true; fileWidgetCommand = "${pkgs.fd}/bin/fd --type f"; - fileWidgetOptions = - [ "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'" ]; + fileWidgetOptions = [ "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'" ]; changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d"; - changeDirWidgetOptions = - [ "--preview '${pkgs.eza}/bin/eza -T L3 | head -200'" ]; + changeDirWidgetOptions = [ "--preview '${pkgs.eza}/bin/eza -T L3 | head -200'" ]; - defaultOptions = [ color_opts preview_opts ]; + defaultOptions = [ + color_opts + preview_opts + ]; }; } diff --git a/user/git.nix b/user/git.nix index f5392df..f50a249 100644 --- a/user/git.nix +++ b/user/git.nix @@ -1,6 +1,13 @@ -{ config, pkgs, lib, ... }: -let inherit (pkgs.uservars) username mail; -in { +{ + config, + pkgs, + lib, + ... +}: +let + inherit (pkgs.uservars) username mail; +in +{ config = { programs.git = { enable = true; diff --git a/user/gnome.nix b/user/gnome.nix index 70438c3..d1f692d 100644 --- a/user/gnome.nix +++ b/user/gnome.nix @@ -1,4 +1,10 @@ -{ pkgs, lib, inputs, ... }: lib.mkIf (pkgs.uservars.desktop == "gnome") { +{ + pkgs, + lib, + inputs, + ... +}: +lib.mkIf (pkgs.uservars.desktop == "gnome") { home.pointerCursor = { name = "Adwaita"; @@ -14,9 +20,7 @@ cursor-theme = "Adwaita"; # color-scheme = "default"; }; - "org/gnome/desktop/wm/preferences" = lib.mkForce { - button-layout = "appmenu:close"; - }; + "org/gnome/desktop/wm/preferences" = lib.mkForce { button-layout = "appmenu:close"; }; "org/gnome/desktop/input-sources" = { xkb-options = [ "lv3:lsgt_switch" ]; }; @@ -40,7 +44,9 @@ qt6Packages.qtstyleplugin-kvantum ]; - home.sessionVariables = { QT_QPA_PLATFORMTHEME = "qt5ct"; }; + home.sessionVariables = { + QT_QPA_PLATFORMTHEME = "qt5ct"; + }; xdg.defaultApplications = { enable = true; diff --git a/user/gpg.nix b/user/gpg.nix index 5dc20d0..dc39066 100644 --- a/user/gpg.nix +++ b/user/gpg.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: +{ config = { services.gpg-agent = { enable = true; @@ -16,7 +22,9 @@ PartOf = [ "graphical-session.target" ]; After = [ "graphical-session.target" ]; }; - Service = { ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock"; }; + Service = { + ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock"; + }; }; }; systemd.user.timers = { @@ -31,9 +39,10 @@ OnUnitActiveSec = "300"; Unit = "gpg_unlock.service"; }; - Install = { WantedBy = [ "sway-session.target" ]; }; + Install = { + WantedBy = [ "sway-session.target" ]; + }; }; }; - }; } diff --git a/user/helix.nix b/user/helix.nix index 3e430fc..292cfb0 100644 --- a/user/helix.nix +++ b/user/helix.nix @@ -74,7 +74,9 @@ in g.n = "goto_line_start"; g.o = "goto_line_end"; }; - keys.insert = { "A-k" = "normal_mode"; }; + keys.insert = { + "A-k" = "normal_mode"; + }; }; languages.language = [ { @@ -96,14 +98,29 @@ in my-theme = { "inherits" = "gruvbox"; "ui.menu" = "none"; - "ui.background" = { bg = "none"; }; + "ui.background" = { + bg = "none"; + }; "ui.virtual.whitespace" = color.nontxt; - "ui.cursor.primary" = { fg = accent.fg; bg = accent.color; }; - "ui.cursorline.primary" = { bg = color.bg_dark; }; - "ui.cursorcolumn.primary" = { modifiers = [ "bold" ]; }; - "ui.cursorline" = { bg = "none"; }; - "ui.cursorcolumn" = { bg = "none"; }; - "ui.linenr.selected" = { fg = color.txt; }; + "ui.cursor.primary" = { + fg = accent.fg; + bg = accent.color; + }; + "ui.cursorline.primary" = { + bg = color.bg_dark; + }; + "ui.cursorcolumn.primary" = { + modifiers = [ "bold" ]; + }; + "ui.cursorline" = { + bg = "none"; + }; + "ui.cursorcolumn" = { + bg = "none"; + }; + "ui.linenr.selected" = { + fg = color.txt; + }; function = color.normal.orange; module = color.normal.brown; @@ -124,8 +141,6 @@ in }; }; }; - home.sessionVariables = lib.mkIf (editor == "helix") { - EDITOR = "hx"; - }; + home.sessionVariables = lib.mkIf (editor == "helix") { EDITOR = "hx"; }; }; } diff --git a/user/home.nix b/user/home.nix index 39a9ba2..7ec6061 100644 --- a/user/home.nix +++ b/user/home.nix @@ -1,4 +1,12 @@ -{ config, pkgs, lib, inputs, osConfig, ... }: { +{ + config, + pkgs, + lib, + inputs, + osConfig, + ... +}: +{ imports = [ ./controller.nix ./waybar @@ -70,9 +78,7 @@ comma # System monitors - (btop.override { - cudaSupport = true; - }) + (btop.override { cudaSupport = true; }) amdgpu_top inxi dmidecode @@ -140,10 +146,11 @@ }; }; home.sessionVariables = { - VOLUME_CHANGE_SOUND = - "${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga"; + VOLUME_CHANGE_SOUND = "${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga"; + }; + programs.bash = { + enable = true; }; - programs.bash = { enable = true; }; xdg.defaultApplications = { enable = true; @@ -154,7 +161,8 @@ { firefox = lib.mkDefault "firefox.desktop"; qutebrowser = lib.mkDefault "org.qutebrowser.qutebrowser.desktop"; - }.${pkgs.uservars.browser} + } + .${pkgs.uservars.browser} ); document-viewer = lib.mkDefault "org.pwmt.zathura.desktop"; file-manager = lib.mkDefault "thunar.desktop"; @@ -163,12 +171,14 @@ torrent-client = lib.mkDefault "torrent.desktop"; }; - wayland.windowManager.sway.extraConfig = lib.optionalString (osConfig.networking.hostName or "" == "monolith") '' - exec steam - exec obs --startreplaybuffer --disable-shutdown-check - exec deluge-gtk - exec nicotine - ''; + wayland.windowManager.sway.extraConfig = + lib.optionalString (osConfig.networking.hostName or "" == "monolith") + '' + exec steam + exec obs --startreplaybuffer --disable-shutdown-check + exec deluge-gtk + exec nicotine + ''; systemd.user.services.rm-target = { Unit = { @@ -182,12 +192,16 @@ }; }; systemd.user.timers.rm-target = { - Unit = { Description = "Remove directories named 'target'"; }; + Unit = { + Description = "Remove directories named 'target'"; + }; Timer = { OnCalendar = "weekly"; Unit = "rm-target.service"; }; - Install = { WantedBy = [ "timers.target" ]; }; + Install = { + WantedBy = [ "timers.target" ]; + }; }; # This value determines the Home Manager release that your diff --git a/user/hyprland.nix b/user/hyprland.nix index 992964a..e1a632b 100644 --- a/user/hyprland.nix +++ b/user/hyprland.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: +{ config = lib.mkIf (pkgs.uservars.desktop == "hyprland") { wayland.windowManager.hyprland = { enable = false; @@ -122,6 +128,9 @@ ''; }; home.file.".config/eww".source = ./eww; - home.packages = with pkgs; [ eww-wayland jq ]; + home.packages = with pkgs; [ + eww-wayland + jq + ]; }; } diff --git a/user/kakoune/colors.nix b/user/kakoune/colors.nix index dbac3e3..e9b9d07 100644 --- a/user/kakoune/colors.nix +++ b/user/kakoune/colors.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, color, accent }: +{ + pkgs, + lib, + color, + accent, +}: let colors = lib.mapAttrs (_: lib.replaceStrings [ "#" ] [ "rgb:" ]) { accent_fg = accent.fg; @@ -94,8 +99,9 @@ with colors; face global InlayHint ${bg_light}+buif # Lsp -'' + ( - lib.concatStringsSep "\n" (lib.mapAttrsToList +'' ++ (lib.concatStringsSep "\n" ( + lib.mapAttrsToList (name: color: '' face global HighlightDiagnostic${name} ${color},default+bu face global Diagnostic${name} ${color},default+bu @@ -106,6 +112,5 @@ with colors; Error = "red"; Warning = "yellow"; Hint = "blue"; - }) -) - + } +)) diff --git a/user/kakoune/default.nix b/user/kakoune/default.nix index c39b61b..091fe1b 100644 --- a/user/kakoune/default.nix +++ b/user/kakoune/default.nix @@ -1,6 +1,17 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key dmenu editor theme accent; + inherit (pkgs.uservars) + key + dmenu + editor + theme + accent + ; inherit (theme) color; inherit (pkgs) kakounePlugins; inherit (pkgs.kakouneUtils) buildKakounePlugin; @@ -74,26 +85,39 @@ in }) ]; extraConfig = - lib.concatStringsSep "\n" - (map (lib.readFile) ([ - ./filetypes.kak - ./hooks.kak - ./indent.kak - ./keys.kak - ./lsp-config.kak - ./usermode.kak - ./git-mode.kak - ] ++ lib.optional (dmenu == "rofi") ./rofi-commands.kak)) + '' + lib.concatStringsSep "\n" ( + map (lib.readFile) ( + [ + ./filetypes.kak + ./hooks.kak + ./indent.kak + ./keys.kak + ./lsp-config.kak + ./usermode.kak + ./git-mode.kak + ] + ++ lib.optional (dmenu == "rofi") ./rofi-commands.kak + ) + ) + + '' - set global scrolloff 10,20 - set global autoreload yes - set global startup_info_version 99999999 + set global scrolloff 10,20 + set global autoreload yes + set global startup_info_version 99999999 - '' + (import ./colors.nix { - inherit pkgs lib color accent; + '' + + (import ./colors.nix { + inherit + pkgs + lib + color + accent + ; }); }; - home.file = { ".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml; }; + home.file = { + ".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml; + }; home.packages = with pkgs; [ terminal ranger @@ -123,4 +147,3 @@ in }; }; } - diff --git a/user/lf/default.nix b/user/lf/default.nix index 5bc0759..8dc04a2 100644 --- a/user/lf/default.nix +++ b/user/lf/default.nix @@ -1,4 +1,11 @@ -{ config, pkgs, lib, inputs, ... }: { +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ programs.lf = { enable = true; keybindings = { diff --git a/user/man.nix b/user/man.nix index 5b80a4e..c77607e 100644 --- a/user/man.nix +++ b/user/man.nix @@ -1,5 +1,20 @@ -{ config, pkgs, lib, inputs, ... }: -let inherit (pkgs.uservars) key theme color accent font desktop editor; +{ + config, + pkgs, + lib, + inputs, + ... +}: +let + inherit (pkgs.uservars) + key + theme + color + accent + font + desktop + editor + ; pagers = rec { kak = kakoune; kakoune = { diff --git a/user/mangohud.nix b/user/mangohud.nix index 5e54f46..f43564f 100644 --- a/user/mangohud.nix +++ b/user/mangohud.nix @@ -1,6 +1,20 @@ -{ config, pkgs, lib, font, ... }: -let inherit (pkgs.uservars) key theme color accent font; -in { +{ + config, + pkgs, + lib, + font, + ... +}: +let + inherit (pkgs.uservars) + key + theme + color + accent + font + ; +in +{ config = { programs.mangohud = { enable = true; diff --git a/user/mimeapps.nix b/user/mimeapps.nix index 533b00f..ff39ea4 100644 --- a/user/mimeapps.nix +++ b/user/mimeapps.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, font, ... }: +{ + config, + pkgs, + lib, + font, + ... +}: let inherit (pkgs.uservars) browser; cfg = config.xdg.defaultApplications; @@ -26,20 +32,21 @@ in xdg.mimeApps = let - createMimeAssociation = (mime_prefix: application: mime_suffix: { - "${mime_prefix}/${mime_suffix}" = application; - }); + createMimeAssociation = ( + mime_prefix: application: mime_suffix: { "${mime_prefix}/${mime_suffix}" = application; } + ); - createMimeAssociations = (mime_prefix: application: mime_suffixes: - lib.foldAttrs (n: _: n) { } - (map (createMimeAssociation mime_prefix application) mime_suffixes)); + createMimeAssociations = ( + mime_prefix: application: mime_suffixes: + lib.foldAttrs (n: _: n) { } (map (createMimeAssociation mime_prefix application) mime_suffixes) + ); - mimes = simple + mimes = + simple // (createMimeAssociations "text" cfg.text-editor text_suffixes) // (createMimeAssociations "image" cfg.image-viewer image_suffixes) // (createMimeAssociations "video" cfg.video-player video_suffixes) - // (createMimeAssociations "application" cfg.archive-manager archive-suffixes) - ; + // (createMimeAssociations "application" cfg.archive-manager archive-suffixes); simple = { "inode/directory" = cfg.file-manager; @@ -421,7 +428,6 @@ in "x-theora+ogg" ]; - archive-suffixes = [ "bzip2" "gzip" @@ -487,6 +493,5 @@ in enable = true; defaultApplications = mimes; }; - }; } diff --git a/user/mpd.nix b/user/mpd.nix index c100000..8a4c155 100644 --- a/user/mpd.nix +++ b/user/mpd.nix @@ -1,4 +1,10 @@ -{ lib, pkgs, config, ... }: { +{ + lib, + pkgs, + config, + ... +}: +{ config = lib.mkIf (pkgs.uservars.desktop != "gnome") { services.mpd = { enable = true; diff --git a/user/mpv.nix b/user/mpv.nix index b66b2ca..851860f 100644 --- a/user/mpv.nix +++ b/user/mpv.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ config = { programs.mpv = { enable = true; @@ -6,8 +7,7 @@ # ytdl-format='best'; # ytdl_path = "yt-dlp"; ytdl-format = "bestvideo[height<=1080][vcodec!=vp9]+bestaudio/best"; - ytdl-raw-options = - "cookies=~/.cache/cookies-youtube-com.txt,mark-watched="; + ytdl-raw-options = "cookies=~/.cache/cookies-youtube-com.txt,mark-watched="; osd-fractions = true; save-position-on-quit = true; keep-open = true; diff --git a/user/pass.nix b/user/pass.nix index e17b62a..e1c5bb8 100644 --- a/user/pass.nix +++ b/user/pass.nix @@ -1,10 +1,15 @@ -{ config, pkgs, lib, inputs, ... }: { +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ config = { programs.password-store = { enable = true; - package = pkgs.pass.withExtensions (ex: with ex; [ - pass-otp - ]); + package = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]); }; services = { pass-secret-service.enable = true; diff --git a/user/pipewire.nix b/user/pipewire.nix index 8fd5188..5e87618 100644 --- a/user/pipewire.nix +++ b/user/pipewire.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, ... }: { +{ + config, + pkgs, + lib, + ... +}: +{ # RNNoise is a noise supperssion neural network # Here we use it as a plugin for pipewire to create a virtual microphone config = { diff --git a/user/pqiv.nix b/user/pqiv.nix index dc5e8de..10e6c3d 100644 --- a/user/pqiv.nix +++ b/user/pqiv.nix @@ -1,8 +1,21 @@ -{ config, pkgs, lib, inputs, ... }: +{ + config, + pkgs, + lib, + inputs, + ... +}: let - inherit (pkgs.uservars) key theme color accent font; + inherit (pkgs.uservars) + key + theme + color + accent + font + ; - make_direction_binds = lib.imap0 (idx: direction: + make_direction_binds = lib.imap0 ( + idx: direction: let sign = if (idx < 2) then 1 else -1; axis = if ((lib.mod idx 2) != 0) then "y" else "x"; @@ -15,8 +28,8 @@ let montage_mode_shift_${axis}(${toString (sign * -1)}) } } - ''); - + '' + ); in { # My bemenu wrapper @@ -45,7 +58,12 @@ in { goto_file_relative(-1) } { goto_file_relative(1); } - ${lib.concatStrings (make_direction_binds [ "left" "up" "right" "down" ])} + ${lib.concatStrings (make_direction_binds [ + "left" + "up" + "right" + "down" + ])} ${key.tabL} { goto_file_relative(-1) } ${key.tabR} { goto_file_relative(1); } @@ -54,10 +72,7 @@ in d { send_keys(6) } y { send_keys(8) } - ${if (key.layout == "colemak") then - "\n t { toggle_scale_mode(0) }\n " - else - ""} + ${if (key.layout == "colemak") then "\n t { toggle_scale_mode(0) }\n " else ""} # vim: ft=ini ''; diff --git a/user/qutebrowser/colors.nix b/user/qutebrowser/colors.nix index 3a90888..999cc28 100644 --- a/user/qutebrowser/colors.nix +++ b/user/qutebrowser/colors.nix @@ -1,6 +1,18 @@ -{ config, pkgs, lib, font, ... }: +{ + config, + pkgs, + lib, + font, + ... +}: let - inherit (pkgs.uservars) key theme accent font browser; + inherit (pkgs.uservars) + key + theme + accent + font + browser + ; inherit (theme) color; in { @@ -38,9 +50,12 @@ in }; in { - bar = { bg = color.bg; }; + bar = { + bg = color.bg; + }; pinned = tabs_defaults; - } // tabs_defaults; + } + // tabs_defaults; ######################################################## # Completion for urls and commands @@ -48,10 +63,18 @@ in completion = { fg = color.txt; - even = { bg = color.bg; }; - odd = { bg = color.bg; }; - scrollbar = { bg = color.bg_dark; }; - match = { fg = accent.color; }; + even = { + bg = color.bg; + }; + odd = { + bg = color.bg; + }; + scrollbar = { + bg = color.bg_dark; + }; + match = { + fg = accent.color; + }; category = { fg = color.txt; bg = color.bg_dark; @@ -68,7 +91,9 @@ in top = color.bg_dark; bottom = color.bg_dark; }; - match = { fg = color.txt; }; + match = { + fg = color.txt; + }; }; }; }; @@ -102,10 +127,16 @@ in }; url = { success = { - https = { fg = color.txt; }; - http = { fg = color.normal.red; }; + https = { + fg = color.txt; + }; + http = { + fg = color.normal.red; + }; + }; + hover = { + fg = color.normal.cyan; }; - hover = { fg = color.normal.cyan; }; }; }; ######################################################## @@ -113,9 +144,15 @@ in ######################################################## downloads = { - start = { bg = color.normal.blue; }; - stop = { bg = color.normal.green; }; - bar = { bg = color.bg; }; + start = { + bg = color.normal.blue; + }; + stop = { + bg = color.normal.green; + }; + bar = { + bg = color.bg; + }; }; ######################################################## @@ -125,7 +162,9 @@ in hints = { fg = color.txt; bg = color.bg; - match = { fg = accent.color; }; + match = { + fg = accent.color; + }; }; ######################################################## @@ -135,7 +174,9 @@ in keyhint = { fg = color.txt; bg = color.bg; - suffix = { fg = accent.color; }; + suffix = { + fg = accent.color; + }; }; ######################################################## @@ -151,7 +192,9 @@ in fg = accent.fg; bg = accent.color; }; - disabled = { fg = color.bg_light; }; + disabled = { + fg = color.bg_light; + }; }; ######################################################## @@ -216,4 +259,3 @@ in ''; }; } - diff --git a/user/qutebrowser/dark-theme.nix b/user/qutebrowser/dark-theme.nix index a596251..6acd813 100644 --- a/user/qutebrowser/dark-theme.nix +++ b/user/qutebrowser/dark-theme.nix @@ -1,63 +1,71 @@ -{ config, pkgs, lib, font, ... }: +{ + config, + pkgs, + lib, + font, + ... +}: let inherit (pkgs.uservars) theme; inherit (theme) color; # ".config/qutebrowser/greasemonkey/darkreader.js".text = - darkThemeUserscript = enabled: pkgs.writeText "darkreader.js" '' - // ==UserScript== - // @name Dark Reader (Unofficial) - // @icon https://darkreader.org/images/darkreader-icon-256x256.png - // @namespace DarkReader - // @description Inverts the brightness of pages to reduce eye strain - // @version 4.7.15 - // @author https://github.com/darkreader/darkreader#contributors - // @homepageURL https://darkreader.org/ | https://github.com/darkreader/darkreader - // @run-at document-end - // @grant none - // @include http* - // @require https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js - // @noframes - // ==/UserScript== + darkThemeUserscript = + enabled: + pkgs.writeText "darkreader.js" '' + // ==UserScript== + // @name Dark Reader (Unofficial) + // @icon https://darkreader.org/images/darkreader-icon-256x256.png + // @namespace DarkReader + // @description Inverts the brightness of pages to reduce eye strain + // @version 4.7.15 + // @author https://github.com/darkreader/darkreader#contributors + // @homepageURL https://darkreader.org/ | https://github.com/darkreader/darkreader + // @run-at document-end + // @grant none + // @include http* + // @require https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js + // @noframes + // ==/UserScript== - DarkReader.setFetchMethod(window.fetch) + DarkReader.setFetchMethod(window.fetch) - if (${if enabled then "false" else "true"}) { - DarkReader.disable(); - return; - } + if (${if enabled then "false" else "true"}) { + DarkReader.disable(); + return; + } - const ignore_list = [ - "askubuntu.com", - "mathoverflow.com", - "mathoverflow.net", - "serverfault.com", - "stackapps.com", - "stackexchange.com", - "stackoverflow.com", - "superuser.com", - "hub.docker.com", - ]; + const ignore_list = [ + "askubuntu.com", + "mathoverflow.com", + "mathoverflow.net", + "serverfault.com", + "stackapps.com", + "stackexchange.com", + "stackoverflow.com", + "superuser.com", + "hub.docker.com", + ]; - for (let item of ignore_list) { - if (window.location.origin.indexOf(item) >= 0) { - console.log("URL matched dark-mode ignore list"); - return; - } - } + for (let item of ignore_list) { + if (window.location.origin.indexOf(item) >= 0) { + console.log("URL matched dark-mode ignore list"); + return; + } + } - DarkReader.enable({ - brightness: 100, - contrast: 100, - sepia: 0, + DarkReader.enable({ + brightness: 100, + contrast: 100, + sepia: 0, - darkSchemeBackgroundColor: "${color.bg}", - darkSchemeTextColor: "${color.txt}", + darkSchemeBackgroundColor: "${color.bg}", + darkSchemeTextColor: "${color.txt}", - lightSchemeBackgroundColor: "${color.bg}", - lightSchemeTextColor: "${color.txt}", - }); - ''; + lightSchemeBackgroundColor: "${color.bg}", + lightSchemeTextColor: "${color.txt}", + }); + ''; in { programs.qutebrowser.keyBindings = { @@ -87,4 +95,3 @@ in ''; }; } - diff --git a/user/qutebrowser/default.nix b/user/qutebrowser/default.nix index 0f2914a..c115cca 100644 --- a/user/qutebrowser/default.nix +++ b/user/qutebrowser/default.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, font, ... }: +{ + config, + pkgs, + lib, + font, + ... +}: let inherit (pkgs.uservars) key browser editor; in @@ -59,7 +65,6 @@ in "${key.insertMode}" = "mode-enter insert"; }; - }; settings = { tabs.tree_tabs = true; @@ -78,7 +83,8 @@ in { kakoune = "kak"; helix = "hx"; - }.${editor} + } + .${editor} "{file}" "+{line}" ]; @@ -112,7 +118,9 @@ in ExecStart = "${pkgs.qutebrowser}/bin/qutebrowser"; Restart = "on-failure"; }; - Install = { WantedBy = [ "sway-session.target" ]; }; + Install = { + WantedBy = [ "sway-session.target" ]; + }; }; }; home.file = { @@ -149,4 +157,3 @@ in }; }; } - diff --git a/user/qutebrowser/fonts.nix b/user/qutebrowser/fonts.nix index e6eee6b..6ab43de 100644 --- a/user/qutebrowser/fonts.nix +++ b/user/qutebrowser/fonts.nix @@ -33,4 +33,3 @@ in }; }; } - diff --git a/user/ranger/default.nix b/user/ranger/default.nix index ec09936..4b97170 100644 --- a/user/ranger/default.nix +++ b/user/ranger/default.nix @@ -1,4 +1,11 @@ -{ config, pkgs, lib, inputs, ... }: { +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ xdg.configFile = { "ranger/rc.conf".source = ./rc.conf; "ranger/rifle.conf".source = ./rifle.conf; diff --git a/user/rofi.nix b/user/rofi.nix index d9026d2..79307eb 100644 --- a/user/rofi.nix +++ b/user/rofi.nix @@ -1,6 +1,17 @@ -{ config, pkgs, lib, font, ... }: +{ + config, + pkgs, + lib, + font, + ... +}: let - inherit (pkgs.uservars) key theme accent font; + inherit (pkgs.uservars) + key + theme + accent + font + ; inherit (theme) color; in { @@ -42,14 +53,15 @@ in }; "#window" = { - background-color = mkLiteral - "${color.bg}${lib.toHexString (theme.opacity * 255 / 100)}"; + background-color = mkLiteral "${color.bg}${lib.toHexString (theme.opacity * 255 / 100)}"; # children = map mkLiteral [ "prompt" "entry" ]; border = mkLiteral "2px solid"; border-color = mkLiteral accent.color; padding = 0; }; - "#inputbar" = { margin = mkLiteral "10px"; }; + "#inputbar" = { + margin = mkLiteral "10px"; + }; "#listview" = { # fixed-height=0; border = mkLiteral "2px solid 0px 0px"; @@ -78,9 +90,7 @@ in margin-right = mkLiteral "20px"; size = 24; }; - }; - }; }; } diff --git a/user/ssh.nix b/user/ssh.nix index 8230dc1..3193876 100644 --- a/user/ssh.nix +++ b/user/ssh.nix @@ -1,6 +1,13 @@ -{ config, pkgs, lib, ... }: -let inherit (pkgs.uservars) username mail; -in { +{ + config, + pkgs, + lib, + ... +}: +let + inherit (pkgs.uservars) username mail; +in +{ config = { programs.ssh.enable = true; programs.ssh.matchBlocks = { diff --git a/user/sway/default.nix b/user/sway/default.nix index 7719370..d7afafd 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; in { @@ -42,7 +52,13 @@ in bg_color = color.bg_dark; alert = "#000000"; client = border: background: text: indicator: childBorder: { - inherit border background text indicator childBorder; + inherit + border + background + text + indicator + childBorder + ; }; in { @@ -79,9 +95,7 @@ in }; # setup cursor based on home.pointerCursor seat."*" = { - xcursor_theme = "${config.home.pointerCursor.name} ${ - toString config.home.pointerCursor.size - }"; + xcursor_theme = "${config.home.pointerCursor.name} ${toString config.home.pointerCursor.size}"; hide_cursor = "when-typing enable"; }; }; @@ -132,7 +146,10 @@ in grim swappy (tesseract5.override { - enableLanguages = [ "eng" "por" ]; + enableLanguages = [ + "eng" + "por" + ]; }) ]; }; diff --git a/user/sway/kanshi.nix b/user/sway/kanshi.nix index 22d9550..f35fd4f 100644 --- a/user/sway/kanshi.nix +++ b/user/sway/kanshi.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; in { @@ -26,11 +36,13 @@ in { profile = { name = "nomad"; - outputs = [{ - criteria = "eDP-1"; - status = "enable"; - position = "1920,312"; - }]; + outputs = [ + { + criteria = "eDP-1"; + status = "enable"; + position = "1920,312"; + } + ]; exec = [ "xrdb .Xresources" ]; }; } diff --git a/user/sway/mako.nix b/user/sway/mako.nix index 637a2d5..c8575ab 100644 --- a/user/sway/mako.nix +++ b/user/sway/mako.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; in { @@ -48,6 +58,8 @@ in ExecStart = "${pkgs.mako}/bin/mako"; Restart = "on-failure"; }; - Install = { WantedBy = [ "sway-session.target" ]; }; + Install = { + WantedBy = [ "sway-session.target" ]; + }; }; } diff --git a/user/sway/sway-assigns.nix b/user/sway/sway-assigns.nix index ff46238..0d1eefd 100644 --- a/user/sway/sway-assigns.nix +++ b/user/sway/sway-assigns.nix @@ -1,20 +1,18 @@ { config, pkgs, ... }: let - # inherit (pkgs.uservars) key accent font theme; - # inherit (theme) color; - # inherit (pkgs) lib; - - # mod = "Mod4"; - # menu = "wlauncher"; - # terminal = "alacritty"; - - # locked_binds = - # lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v); - # code_binds = - # lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v); - # return_mode = lib.mapAttrs (k: v: "${v}; mode default"); - # playerctl = "exec ${pkgs.playerctl}/bin/playerctl"; in +# inherit (pkgs.uservars) key accent font theme; +# inherit (theme) color; +# inherit (pkgs) lib; +# mod = "Mod4"; +# menu = "wlauncher"; +# terminal = "alacritty"; +# locked_binds = +# lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v); +# code_binds = +# lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v); +# return_mode = lib.mapAttrs (k: v: "${v}; mode default"); +# playerctl = "exec ${pkgs.playerctl}/bin/playerctl"; { wayland.windowManager.sway.config = { assigns = { diff --git a/user/sway/sway-binds.nix b/user/sway/sway-binds.nix index 360ccdc..fe22594 100644 --- a/user/sway/sway-binds.nix +++ b/user/sway/sway-binds.nix @@ -1,6 +1,11 @@ { config, pkgs, ... }: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; inherit (pkgs) lib; @@ -21,29 +26,27 @@ let # mod+1 to swich to workspace 1 # mod+shift+1 to move to workspace 1 - workspace_binds = lib.forEachMerge (lib.range 1 10) (i: + workspace_binds = lib.forEachMerge (lib.range 1 10) ( + i: let key = toString (lib.mod i 10); workspaceNumber = toString i; in { "${mod}+${key}" = "workspace number ${workspaceNumber}"; - "${mod}+Shift+${key}" = - "move container to workspace number ${workspaceNumber}"; - }); + "${mod}+Shift+${key}" = "move container to workspace number ${workspaceNumber}"; + } + ); prev_next_binds = let - maybe_window = key: - if (lib.strings.hasInfix "button" key) then - "--whole-window" - else - ""; - makePrevNextBindFunction = (prev_or_next: + maybe_window = key: if (lib.strings.hasInfix "button" key) then "--whole-window" else ""; + makePrevNextBindFunction = ( + prev_or_next: map (key: { - "${maybe_window key} ${mod}+${key}" = - "workspace ${prev_or_next}_on_output"; - })); + "${maybe_window key} ${mod}+${key}" = "workspace ${prev_or_next}_on_output"; + }) + ); prev_binds = makePrevNextBindFunction "prev" [ key.tabL "bracketleft" @@ -67,36 +70,51 @@ let # for every direction with both arrow keys and vim keys movement_binds = let - directions = [ "Left" "Up" "Right" "Down" ]; + directions = [ + "Left" + "Up" + "Right" + "Down" + ]; makeVimKeys = (k: key.${lib.toLower k}); makeArrowKeys = (k: k); - makeResizeCommand = direction: + makeResizeCommand = + direction: { Left = "shrink width 20px"; Up = "shrink height 20px"; Right = "grow width 20px"; Down = "grow height 20px"; - }.${direction}; + } + .${direction}; in - lib.forEachMerge [ makeVimKeys makeArrowKeys ] (prefixFun: - lib.forEachMerge directions (direction: - let - resize_cmd = makeResizeCommand direction; - keyBind = prefixFun direction; - in - { - # Move focus - "${mod}+${keyBind}" = "focus ${direction}"; - # Move window - "${mod}+Shift+${keyBind}" = "move ${direction}"; - # Resize window - "${mod}+Control+${keyBind}" = "resize ${resize_cmd}"; - # focus output - "${mod}+mod1+${keyBind}" = "focus output ${direction}"; - # Move workspace to output - "${mod}+mod1+Shift+${keyBind}" = - "move workspace output ${direction}"; - })); + lib.forEachMerge + [ + makeVimKeys + makeArrowKeys + ] + ( + prefixFun: + lib.forEachMerge directions ( + direction: + let + resize_cmd = makeResizeCommand direction; + keyBind = prefixFun direction; + in + { + # Move focus + "${mod}+${keyBind}" = "focus ${direction}"; + # Move window + "${mod}+Shift+${keyBind}" = "move ${direction}"; + # Resize window + "${mod}+Control+${keyBind}" = "resize ${resize_cmd}"; + # focus output + "${mod}+mod1+${keyBind}" = "focus output ${direction}"; + # Move workspace to output + "${mod}+mod1+Shift+${keyBind}" = "move workspace output ${direction}"; + } + ) + ); parenting_binds = { "${mod}+equal" = "focus parent"; @@ -116,8 +134,7 @@ let XF86AudioRaiseVolume = "exec volumesh -i 10"; XF86AudioLowerVolume = "exec volumesh -d 10"; XF86AudioMute = "exec volumesh -t"; - XF86AudioMicMute = - "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle"; + XF86AudioMicMute = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle"; # Control media XF86AudioPlay = "exec playerctl play-pause"; XF86AudioPause = "exec playerctl play-pause"; @@ -136,8 +153,7 @@ let # Screen area to file "Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area"; # Screen area to clipboard - "Control+Shift+Print" = - "exec ${pkgs.screenshotsh}/bin/screenshotsh area-clip"; + "Control+Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area-clip"; # Focused monitor to clipboard "Control+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh clip"; }; @@ -155,8 +171,7 @@ let "${mod}+Alt+x" = "exec pkill wl-crosshair || exec wl-crosshair"; "${mod}+x" = "kill"; "${mod}+m" = "mode audio"; - "${mod}+escape" = - "mode passthrough;exec notify-send 'Passthrough on'"; + "${mod}+escape" = "mode passthrough;exec notify-send 'Passthrough on'"; "${mod}+ctrl+k" = "exec swaymsg input type:pointer events disabled"; "${mod}+ctrl+shift+k" = "exec swaymsg input type:pointer events enabled"; "${mod}+f" = "fullscreen toggle"; diff --git a/user/sway/sway-modes.nix b/user/sway/sway-modes.nix index 7cb82bd..ea75ca8 100644 --- a/user/sway/sway-modes.nix +++ b/user/sway/sway-modes.nix @@ -1,6 +1,11 @@ { config, pkgs, ... }: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; inherit (pkgs) lib; @@ -8,10 +13,8 @@ let menu = "wlauncher"; terminal = "alacritty"; - locked = - lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v); - to-code = - lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v); + locked = lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v); + to-code = lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v); quit-mode = lib.mapAttrs (k: v: "${v}; mode default"); playerctl = "exec ${pkgs.playerctl}/bin/playerctl"; @@ -20,20 +23,32 @@ in { wayland.windowManager.sway.config.modes = { audio = - (bind_group [ to-code locked ] { - ${key.tabR} = "exec volumesh -i 10"; - ${key.tabL} = "exec volumesh -d 10"; - ${key.right} = "exec mpc next"; - ${key.left} = "exec mpc prev"; - ${key.up} = "exec volumesh --mpd -i 10"; - ${key.down} = "exec volumesh --mpd -d 10"; - }) // - (bind_group [ locked quit-mode ] { - "space" = "exec mpc toggle"; - "escape" = ""; - "q" = ""; - }) // - (bind_group [ quit-mode ] { + (bind_group + [ + to-code + locked + ] + { + ${key.tabR} = "exec volumesh -i 10"; + ${key.tabL} = "exec volumesh -d 10"; + ${key.right} = "exec mpc next"; + ${key.left} = "exec mpc prev"; + ${key.up} = "exec volumesh --mpd -i 10"; + ${key.down} = "exec volumesh --mpd -d 10"; + } + ) + // (bind_group + [ + locked + quit-mode + ] + { + "space" = "exec mpc toggle"; + "escape" = ""; + "q" = ""; + } + ) + // (bind_group [ quit-mode ] { "m" = "exec volumesh -t"; "s" = "exec ${pkgs.pulse_sink}/bin/pulse_sink"; @@ -47,28 +62,38 @@ in "Ctrl+s" = "exec ${pkgs.musmenu}/bin/musmenu psave"; "Ctrl+o" = "exec ${pkgs.musmenu}/bin/musmenu pload"; "Ctrl+d" = "exec ${pkgs.musmenu}/bin/musmenu pdelete"; - }) // - { + }) + // { "p" = "mode playerctl"; "Ctrl+c" = "exec musmenu pclear"; - } - ; + }; playerctl = - (bind_group [ to-code locked ] { - ${key.left} = "${playerctl} previous"; - ${key.right} = "${playerctl} next"; - ${key.up} = "${playerctl} volume 10+"; - ${key.down} = "${playerctl} volume 10-"; - ${key.tabR} = "${playerctl} volume 10+"; - ${key.tabL} = "${playerctl} volume 10-"; - }) // - (bind_group [ to-code quit-mode ] { - "space" = "${playerctl} play-pause"; - "escape" = ""; - "q" = ""; - }) - ; + (bind_group + [ + to-code + locked + ] + { + ${key.left} = "${playerctl} previous"; + ${key.right} = "${playerctl} next"; + ${key.up} = "${playerctl} volume 10+"; + ${key.down} = "${playerctl} volume 10-"; + ${key.tabR} = "${playerctl} volume 10+"; + ${key.tabL} = "${playerctl} volume 10-"; + } + ) + // (bind_group + [ + to-code + quit-mode + ] + { + "space" = "${playerctl} play-pause"; + "escape" = ""; + "q" = ""; + } + ); passthrough = { "${mod}+escape" = "mode default;exec notify-send 'Passthrough off'"; diff --git a/user/sway/swayidle.nix b/user/sway/swayidle.nix index 7b659ed..b0bd455 100644 --- a/user/sway/swayidle.nix +++ b/user/sway/swayidle.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; asScript = filename: text: toString (pkgs.writeShellScript filename text); diff --git a/user/sway/swaylock.nix b/user/sway/swaylock.nix index f9f06eb..eb6104e 100644 --- a/user/sway/swaylock.nix +++ b/user/sway/swaylock.nix @@ -1,6 +1,16 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; in { diff --git a/user/sway/theme.nix b/user/sway/theme.nix index 2fc1fc1..202eaff 100644 --- a/user/sway/theme.nix +++ b/user/sway/theme.nix @@ -1,38 +1,53 @@ -{ config, pkgs, lib, inputs, ... }: +{ + config, + pkgs, + lib, + inputs, + ... +}: let inherit (pkgs.uservars) theme font desktop; - inherit (theme) color gtk_theme icon_theme cursor_theme; + inherit (theme) + color + gtk_theme + icon_theme + cursor_theme + ; in -lib.mkIf (desktop == "sway") -{ +lib.mkIf (desktop == "sway") { home.pointerCursor = { name = cursor_theme; size = 24; package = pkgs.bibata-cursors; gtk.enable = true; }; - gtk = { - enable = true; - font = { - name = font.interface; - size = font.size.small; - }; - theme = { - name = gtk_theme; - package = pkgs.orchis_theme_compact; - }; - iconTheme = { - name = icon_theme; - package = pkgs.papirus_red; - }; - } // ( - let - shared.extraConfig = { - gtk-decoration-layout = "menu:"; + gtk = + { + enable = true; + font = { + name = font.interface; + size = font.size.small; }; - in - { gtk4 = shared; gtk3 = shared; } - ); + theme = { + name = gtk_theme; + package = pkgs.orchis_theme_compact; + }; + iconTheme = { + name = icon_theme; + package = pkgs.papirus_red; + }; + } + // ( + let + shared.extraConfig = { + gtk-decoration-layout = "menu:"; + }; + in + { + gtk4 = shared; + gtk3 = shared; + } + ); qt = { enable = true; platformTheme.name = "qtct"; diff --git a/user/syncthing.nix b/user/syncthing.nix index 8f36eeb..76e3584 100644 --- a/user/syncthing.nix +++ b/user/syncthing.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ services.syncthing = { enable = true; tray = { diff --git a/user/thunar.nix b/user/thunar.nix index 3921eb5..2a9fe5b 100644 --- a/user/thunar.nix +++ b/user/thunar.nix @@ -1,8 +1,12 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = with pkgs; [ _thunar-terminal (xfce.thunar.override { - thunarPlugins = with pkgs.xfce; [ thunar-volman thunar-archive-plugin ]; + thunarPlugins = with pkgs.xfce; [ + thunar-volman + thunar-archive-plugin + ]; }) ]; diff --git a/user/vdir.nix b/user/vdir.nix index 61170df..80e6145 100644 --- a/user/vdir.nix +++ b/user/vdir.nix @@ -1,19 +1,23 @@ { pkgs, lib, ... }: let inherit (pkgs.uservars) nextcloud; - pass_cmd = (pkgs.writeShellScript "get_pass" '' - pass "${nextcloud.pass}" | head -n1 - ''); + pass_cmd = ( + pkgs.writeShellScript "get_pass" '' + pass "${nextcloud.pass}" | head -n1 + '' + ); in { systemd.user.services.vdirsyncer = { Unit.Description = "vdirsyncer calendar and contacts synchronization"; Service = { Type = "oneshot"; - ExecStart = toString (pkgs.writeShellScript "run-vdirsyncer" '' - ${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer discover - ${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer sync - ''); + ExecStart = toString ( + pkgs.writeShellScript "run-vdirsyncer" '' + ${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer discover + ${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer sync + '' + ); }; }; systemd.user.timers.vdirsyncer = { @@ -45,9 +49,9 @@ in [storage contacts_remote] type = "carddav" - url = "https://${ nextcloud.host }/remote.php/dav/addressbooks/users/${ nextcloud.user }/" - username = "${ nextcloud.user }" - password.fetch = [ "command", "${ pass_cmd }" ] + url = "https://${nextcloud.host}/remote.php/dav/addressbooks/users/${nextcloud.user}/" + username = "${nextcloud.user}" + password.fetch = [ "command", "${pass_cmd}" ] [pair calendar] a = "calendar_local" @@ -63,9 +67,9 @@ in [storage calendar_remote] type = "caldav" - url = "https://${ nextcloud.host }/remote.php/dav/calendars/${ nextcloud.user }/" - username = "${ nextcloud.user }" - password.fetch = [ "command", "${ pass_cmd }" ] + url = "https://${nextcloud.host}/remote.php/dav/calendars/${nextcloud.user}/" + username = "${nextcloud.user}" + password.fetch = [ "command", "${pass_cmd}" ] ''; "todoman/config.py".text = '' path = "~/.local/share/calendars/*" @@ -76,10 +80,8 @@ in ''; }; - home.packages = with pkgs; [ vdirsyncer todoman ]; - } diff --git a/user/vscode/default.nix b/user/vscode/default.nix index 48851a0..35d972b 100644 --- a/user/vscode/default.nix +++ b/user/vscode/default.nix @@ -1,4 +1,5 @@ -{ pkgs, config, ... }: { +{ pkgs, config, ... }: +{ programs.vscode = { enable = true; diff --git a/user/waybar/default.nix b/user/waybar/default.nix index 5e4f329..95615fa 100644 --- a/user/waybar/default.nix +++ b/user/waybar/default.nix @@ -1,6 +1,18 @@ -{ config, osConfig, pkgs, lib, font, ... }: +{ + config, + osConfig, + pkgs, + lib, + font, + ... +}: let - inherit (pkgs.uservars) key theme accent font; + inherit (pkgs.uservars) + key + theme + accent + font + ; inherit (theme) color; in { @@ -9,184 +21,226 @@ in enable = true; systemd.enable = true; systemd.target = "sway-session.target"; - settings = [{ - layer = "top"; - modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ]; - modules-center = [ "clock" ]; - modules-right = lib.flatten [ - "sway/language" - "mpd" - "custom/playerctl" - "tray" - "custom/caffeine" - "pulseaudio" - (lib.optional (osConfig.services.vpn.enable or false) "custom/vpn") - "network" - "battery" - ]; - battery = { - tooltip = true; - states = { - full = 100; - good = 95; - warning = 25; - }; - format = "{icon} "; - format-charging = ""; - format-plugged = ""; - format-full = ""; - format-warning = "{icon} {time}"; - format-icons = [ "" "" "" "" "" "" ]; - }; - network = { - interval = 5; - tooltip = false; - on-click = "terminal -e iwd"; - format-wifi = "{icon}"; - format-icons = [ "" "" "" "" "" ]; - format-ethernet = "󰈀"; - format-linked = "󰈀"; - format-disconnected = ""; - }; - "sway/workspaces" = { - enable-bar-scroll = true; - format = "{icon}"; - format-icons = { - "1" = ""; - "2" = ""; - "3" = "󰅩"; - "4" = ""; - "5" = ""; - "6" = ""; - "7" = "󰇮"; - "8" = ""; - "9" = ""; - "10" = ""; - urgent = ""; - # focused = ""; - default = ""; - }; - }; - "sway/window" = { max-length = 40; }; - "tray" = { - "spacing" = 7; - "icon-size" = 19; - }; - clock = { - interval = 60; - format = "{:%H:%M %a %d/%m}"; - tooltip-format = "{calendar}"; - calendar = { - mode = "year"; - mode-mon-col = 3; - weeks-pos = "right"; - on-scroll = 1; - on-click-right = "mode"; - format = { - months = "{}"; - days = "{}"; - weeks = "W{}"; - weekdays = "{}"; - today = "{}"; + settings = [ + { + layer = "top"; + modules-left = [ + "sway/workspaces" + "sway/mode" + "sway/window" + ]; + modules-center = [ "clock" ]; + modules-right = lib.flatten [ + "sway/language" + "mpd" + "custom/playerctl" + "tray" + "custom/caffeine" + "pulseaudio" + (lib.optional (osConfig.services.vpn.enable or false) "custom/vpn") + "network" + "battery" + ]; + battery = { + tooltip = true; + states = { + full = 100; + good = 95; + warning = 25; }; + format = "{icon} "; + format-charging = ""; + format-plugged = ""; + format-full = ""; + format-warning = "{icon} {time}"; + format-icons = [ + "" + "" + "" + "" + "" + "" + ]; }; - actions = { - on-click-right = "mode"; - on-click-forward = "tz_up"; - on-click-backward = "tz_down"; - on-scroll-up = "shift_up"; - on-scroll-down = "shift_down"; - }; - }; - mpd = - let - mpc = "${pkgs.mpc-cli}/bin/mpc"; - in - { - format = "{stateIcon} {title} - {artist}"; - format-paused = "{stateIcon}"; - format-stopped = ""; - state-icons = { - stopped = ""; - paused = ""; - playing = ""; - }; + network = { + interval = 5; tooltip = false; - on-click = "${mpc} toggle"; - on-scroll-up = "${mpc} vol +10"; - on-scroll-down = "${mpc} vol -10"; + on-click = "terminal -e iwd"; + format-wifi = "{icon}"; + format-icons = [ + "" + "" + "" + "" + "" + ]; + format-ethernet = "󰈀"; + format-linked = "󰈀"; + format-disconnected = ""; }; - "custom/playerctl" = { - format = "{} "; - exec = "${pkgs.playerctl-status}/bin/playerctl-status"; - on-click = "${pkgs.playerctl}/bin/playerctl --ignore-player=mpd play-pause"; - interval = 1; - tooltip = false; - }; - "sway/language" = { format = "{short} {variant}"; }; - "custom/caffeine" = { - format = "{}"; - exec = "systemctl --user status swayidle > /dev/null && echo 󰒲 || echo 󰒳"; - on-click = "${pkgs._sway_idle_toggle}/bin/_sway_idle_toggle"; - interval = 1; - tooltip = false; - }; - "custom/vpn" = lib.mkIf (osConfig.services.vpn.enable or false) { - format = "{}"; - exec = '' - ${pkgs.mullvad}/bin/mullvad status | ${pkgs.gnugrep}/bin/grep "^Connected" > /dev/null \ - && echo "" \ - || echo "" - ''; - on-click = "mullvad connect"; - on-click-right = "mullvad disconnect"; - interval = 1; - tooltip = false; - }; - pulseaudio = { - interval = 5; - tooltip = false; - scroll-step = 10; - format = "{icon}"; - format-bluetooth = ""; - format-bluetooth-muted = "󰝟"; - format-muted = "󰝟"; - format-icons = { - "rtp-sink" = - [ "󰕿" "󰖀" "󰕾" ]; - "alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo" = - [ " 󰕿" " 󰖀" " 󰕾" ]; - "alsa_output.pci-0000_09_00.4.analog-stereo" = - [ " 󰕿" " 󰖀" " 󰕾" ]; - headphone = [ " 󰕿" " 󰖀" " 󰕾" ]; - handsfree = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = [ "󰕿" "󰖀" "󰕾" ]; + "sway/workspaces" = { + enable-bar-scroll = true; + format = "{icon}"; + format-icons = { + "1" = ""; + "2" = ""; + "3" = "󰅩"; + "4" = ""; + "5" = ""; + "6" = ""; + "7" = "󰇮"; + "8" = ""; + "9" = ""; + "10" = ""; + urgent = ""; + # focused = ""; + default = ""; + }; }; - on-click = "pavucontrol"; - on-click-right = "${pkgs.pulse_sink}/bin/pulse_sink"; - on-scroll-up = "${pkgs.volumesh}/bin/volumesh -i 10"; - on-scroll-down = "${pkgs.volumesh}/bin/volumesh -d 10"; - }; - }]; - style = builtins.readFile (pkgs.substituteAll { - src = ./style.css; + "sway/window" = { + max-length = 40; + }; + "tray" = { + "spacing" = 7; + "icon-size" = 19; + }; + clock = { + interval = 60; + format = "{:%H:%M %a %d/%m}"; + tooltip-format = "{calendar}"; + calendar = { + mode = "year"; + mode-mon-col = 3; + weeks-pos = "right"; + on-scroll = 1; + on-click-right = "mode"; + format = { + months = "{}"; + days = "{}"; + weeks = "W{}"; + weekdays = "{}"; + today = "{}"; + }; + }; + actions = { + on-click-right = "mode"; + on-click-forward = "tz_up"; + on-click-backward = "tz_down"; + on-scroll-up = "shift_up"; + on-scroll-down = "shift_down"; + }; + }; + mpd = + let + mpc = "${pkgs.mpc-cli}/bin/mpc"; + in + { + format = "{stateIcon} {title} - {artist}"; + format-paused = "{stateIcon}"; + format-stopped = ""; + state-icons = { + stopped = ""; + paused = ""; + playing = ""; + }; + tooltip = false; + on-click = "${mpc} toggle"; + on-scroll-up = "${mpc} vol +10"; + on-scroll-down = "${mpc} vol -10"; + }; + "custom/playerctl" = { + format = "{} "; + exec = "${pkgs.playerctl-status}/bin/playerctl-status"; + on-click = "${pkgs.playerctl}/bin/playerctl --ignore-player=mpd play-pause"; + interval = 1; + tooltip = false; + }; + "sway/language" = { + format = "{short} {variant}"; + }; + "custom/caffeine" = { + format = "{}"; + exec = "systemctl --user status swayidle > /dev/null && echo 󰒲 || echo 󰒳"; + on-click = "${pkgs._sway_idle_toggle}/bin/_sway_idle_toggle"; + interval = 1; + tooltip = false; + }; + "custom/vpn" = lib.mkIf (osConfig.services.vpn.enable or false) { + format = "{}"; + exec = '' + ${pkgs.mullvad}/bin/mullvad status | ${pkgs.gnugrep}/bin/grep "^Connected" > /dev/null \ + && echo "" \ + || echo "" + ''; + on-click = "mullvad connect"; + on-click-right = "mullvad disconnect"; + interval = 1; + tooltip = false; + }; + pulseaudio = { + interval = 5; + tooltip = false; + scroll-step = 10; + format = "{icon}"; + format-bluetooth = ""; + format-bluetooth-muted = "󰝟"; + format-muted = "󰝟"; + format-icons = { + "rtp-sink" = [ + "󰕿" + "󰖀" + "󰕾" + ]; + "alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo" = [ + " 󰕿" + " 󰖀" + " 󰕾" + ]; + "alsa_output.pci-0000_09_00.4.analog-stereo" = [ + " 󰕿" + " 󰖀" + " 󰕾" + ]; + headphone = [ + " 󰕿" + " 󰖀" + " 󰕾" + ]; + handsfree = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ + "󰕿" + "󰖀" + "󰕾" + ]; + }; + on-click = "pavucontrol"; + on-click-right = "${pkgs.pulse_sink}/bin/pulse_sink"; + on-scroll-up = "${pkgs.volumesh}/bin/volumesh -i 10"; + on-scroll-down = "${pkgs.volumesh}/bin/volumesh -d 10"; + }; + } + ]; + style = builtins.readFile ( + pkgs.substituteAll { + src = ./style.css; - accent_color = accent.color; + accent_color = accent.color; - color_bg = color.bg; - color_bg_dark = color.bg_dark; - color_bg_light = color.bg_light; - color_txt = color.txt; + color_bg = color.bg; + color_bg_dark = color.bg_dark; + color_bg_light = color.bg_light; + color_txt = color.txt; - font_interface = font.interface; + font_interface = font.interface; - font_size_big = "${toString font.size.big}px"; - font_size_medium = "${toString font.size.medium}px"; - }); + font_size_big = "${toString font.size.big}px"; + font_size_medium = "${toString font.size.medium}px"; + } + ); }; home.packages = with pkgs; [ waybar ]; }; diff --git a/user/xdg-dirs.nix b/user/xdg-dirs.nix index d95d6de..a9e1c9b 100644 --- a/user/xdg-dirs.nix +++ b/user/xdg-dirs.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, inputs, ... }: +{ + config, + pkgs, + lib, + inputs, + ... +}: let HOME = config.home.homeDirectory; in diff --git a/user/zathura.nix b/user/zathura.nix index d3c9f5e..ccb4c42 100644 --- a/user/zathura.nix +++ b/user/zathura.nix @@ -1,6 +1,17 @@ -{ config, pkgs, lib, font, ... }: +{ + config, + pkgs, + lib, + font, + ... +}: let - inherit (pkgs.uservars) key accent font theme; + inherit (pkgs.uservars) + key + accent + font + theme + ; inherit (theme) color; in { From 0093ab70072ab64c56af2a418a06249cc8bc872a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 30 May 2024 16:55:40 -0300 Subject: [PATCH 106/107] flake: set formatter to nixfmt-rfc-style --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index daecf26..8f847b0 100644 --- a/flake.nix +++ b/flake.nix @@ -182,6 +182,6 @@ packages.${system} = pkgs // packages; - formatter.${system} = pkgs.nixpkgs-fmt; + formatter.${system} = pkgs.nixfmt-rfc-style; }; } From c20343c129820a778c58e83dd6948f6e3597be83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Thu, 30 May 2024 21:48:43 -0300 Subject: [PATCH 107/107] controller: add auto-connect service --- scripts/auto_connect_gamepad | 26 ++++++++++++++++++++++++++ scripts/default.nix | 1 + user/controller.nix | 29 +++++++++++++++++------------ 3 files changed, 44 insertions(+), 12 deletions(-) create mode 100755 scripts/auto_connect_gamepad diff --git a/scripts/auto_connect_gamepad b/scripts/auto_connect_gamepad new file mode 100755 index 0000000..9753966 --- /dev/null +++ b/scripts/auto_connect_gamepad @@ -0,0 +1,26 @@ +#!/bin/sh + +list_paired_controllers() { + bluetoothctl devices Paired | grep -i 'controller' | cut -d' ' -f2 +} + +count_connected_controllers() { + bluetoothctl devices Connected | grep -i 'controller' | wc -l +} + +try_to_connect_to_all_controllers() { + list_paired_controllers | while read paired_controller; do + echo "Trying to connect to controller $paired_controller" + bluetoothctl connect "$paired_controller" + done +} + +while true; do + echo "looping" + if test "$(count_connected_controllers)" -ne 0 ; then + echo "there is a controller connected, not attempting to connect to any other" + sleep 10s + continue + fi + try_to_connect_to_all_controllers +done diff --git a/scripts/default.nix b/scripts/default.nix index f509e37..12d38d3 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -125,6 +125,7 @@ zbar wl-clipboard ]; + auto_connect_gamepad = [ bluez ]; } // lib.mapAttrs import_script { wdmenu = ./wdmenu.nix; diff --git a/user/controller.nix b/user/controller.nix index 6a756df..fe08a98 100644 --- a/user/controller.nix +++ b/user/controller.nix @@ -1,17 +1,22 @@ +{ pkgs, lib, ... }: { - config, - pkgs, - lib, - inputs, - ... -}: -{ - xdg.desktopEntries = { - connect-controller = { - name = "Connect Controller"; - exec = "bluetoothctl connect 84:30:95:97:1A:79"; - terminal = false; + systemd.user.services = { + autoconnect-gamepad = { + Unit = { + Description = "Attempt to connect to game controllers"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + Service = { + ExecStart = lib.getExe pkgs.auto_connect_gamepad; + }; + Install = { + WantedBy = [ "sway-session.target" ]; + }; }; + }; + + xdg.desktopEntries = { disconnect-controller = { name = "Disconnect Controller"; exec = "bluetoothctl disconnect 84:30:95:97:1A:79";