commit bdf553079b23bc26a7e9a2c4b247478e07660ae3 Author: zastian@mrthoddata.com Date: Wed May 7 15:45:08 2025 +0100 new and impruved diff --git a/assets/Wallpapers/001.jpg b/assets/Wallpapers/001.jpg new file mode 100755 index 0000000..682256c Binary files /dev/null and b/assets/Wallpapers/001.jpg differ diff --git a/assets/Wallpapers/002.jpg b/assets/Wallpapers/002.jpg new file mode 100755 index 0000000..7729c5a Binary files /dev/null and b/assets/Wallpapers/002.jpg differ diff --git a/assets/Wallpapers/003.jpg b/assets/Wallpapers/003.jpg new file mode 100755 index 0000000..b76b915 Binary files /dev/null and b/assets/Wallpapers/003.jpg differ diff --git a/assets/Wallpapers/004.jpg b/assets/Wallpapers/004.jpg new file mode 100755 index 0000000..35cc7a3 Binary files /dev/null and b/assets/Wallpapers/004.jpg differ diff --git a/assets/Wallpapers/005.jpg b/assets/Wallpapers/005.jpg new file mode 100755 index 0000000..ea5db64 Binary files /dev/null and b/assets/Wallpapers/005.jpg differ diff --git a/assets/Wallpapers/006.jpg b/assets/Wallpapers/006.jpg new file mode 100755 index 0000000..bf3f233 Binary files /dev/null and b/assets/Wallpapers/006.jpg differ diff --git a/assets/Wallpapers/007.jpg b/assets/Wallpapers/007.jpg new file mode 100755 index 0000000..dbf037b Binary files /dev/null and b/assets/Wallpapers/007.jpg differ diff --git a/assets/Wallpapers/008.jpg b/assets/Wallpapers/008.jpg new file mode 100755 index 0000000..ebc45c5 Binary files /dev/null and b/assets/Wallpapers/008.jpg differ diff --git a/assets/Wallpapers/009.jpg b/assets/Wallpapers/009.jpg new file mode 100755 index 0000000..bcbaa1b Binary files /dev/null and b/assets/Wallpapers/009.jpg differ diff --git a/assets/Wallpapers/010.jpg b/assets/Wallpapers/010.jpg new file mode 100755 index 0000000..9cb1822 Binary files /dev/null and b/assets/Wallpapers/010.jpg differ diff --git a/assets/Wallpapers/011.jpg b/assets/Wallpapers/011.jpg new file mode 100755 index 0000000..48fd2df Binary files /dev/null and b/assets/Wallpapers/011.jpg differ diff --git a/assets/Wallpapers/012.jpg b/assets/Wallpapers/012.jpg new file mode 100755 index 0000000..494e47f Binary files /dev/null and b/assets/Wallpapers/012.jpg differ diff --git a/assets/Wallpapers/013.jpg b/assets/Wallpapers/013.jpg new file mode 100755 index 0000000..fd45a67 Binary files /dev/null and b/assets/Wallpapers/013.jpg differ diff --git a/assets/Wallpapers/014.jpg b/assets/Wallpapers/014.jpg new file mode 100755 index 0000000..cdb607b Binary files /dev/null and b/assets/Wallpapers/014.jpg differ diff --git a/assets/Wallpapers/015.jpg b/assets/Wallpapers/015.jpg new file mode 100755 index 0000000..54a4da2 Binary files /dev/null and b/assets/Wallpapers/015.jpg differ diff --git a/assets/Wallpapers/016.jpg b/assets/Wallpapers/016.jpg new file mode 100755 index 0000000..6a822db Binary files /dev/null and b/assets/Wallpapers/016.jpg differ diff --git a/assets/Wallpapers/017.jpg b/assets/Wallpapers/017.jpg new file mode 100755 index 0000000..c76c413 Binary files /dev/null and b/assets/Wallpapers/017.jpg differ diff --git a/assets/Wallpapers/018.jpg b/assets/Wallpapers/018.jpg new file mode 100755 index 0000000..2f15b21 Binary files /dev/null and b/assets/Wallpapers/018.jpg differ diff --git a/assets/Wallpapers/019.jpg b/assets/Wallpapers/019.jpg new file mode 100755 index 0000000..328315b Binary files /dev/null and b/assets/Wallpapers/019.jpg differ diff --git a/assets/Wallpapers/020.jpg b/assets/Wallpapers/020.jpg new file mode 100755 index 0000000..e67c630 Binary files /dev/null and b/assets/Wallpapers/020.jpg differ diff --git a/assets/Wallpapers/021.jpg b/assets/Wallpapers/021.jpg new file mode 100755 index 0000000..4368140 Binary files /dev/null and b/assets/Wallpapers/021.jpg differ diff --git a/assets/Wallpapers/022.jpg b/assets/Wallpapers/022.jpg new file mode 100755 index 0000000..5d0d668 Binary files /dev/null and b/assets/Wallpapers/022.jpg differ diff --git a/assets/Wallpapers/023.jpg b/assets/Wallpapers/023.jpg new file mode 100755 index 0000000..54a4da2 Binary files /dev/null and b/assets/Wallpapers/023.jpg differ diff --git a/assets/Wallpapers/024.jpg b/assets/Wallpapers/024.jpg new file mode 100755 index 0000000..b9b99c3 Binary files /dev/null and b/assets/Wallpapers/024.jpg differ diff --git a/assets/Wallpapers/025.jpg b/assets/Wallpapers/025.jpg new file mode 100755 index 0000000..7ad9869 Binary files /dev/null and b/assets/Wallpapers/025.jpg differ diff --git a/assets/Wallpapers/026.jpg b/assets/Wallpapers/026.jpg new file mode 100755 index 0000000..c2dc335 Binary files /dev/null and b/assets/Wallpapers/026.jpg differ diff --git a/assets/Wallpapers/027.jpg b/assets/Wallpapers/027.jpg new file mode 100755 index 0000000..79011a0 Binary files /dev/null and b/assets/Wallpapers/027.jpg differ diff --git a/assets/Wallpapers/028.jpg b/assets/Wallpapers/028.jpg new file mode 100755 index 0000000..36666d2 Binary files /dev/null and b/assets/Wallpapers/028.jpg differ diff --git a/assets/Wallpapers/029.jpg b/assets/Wallpapers/029.jpg new file mode 100755 index 0000000..121e044 Binary files /dev/null and b/assets/Wallpapers/029.jpg differ diff --git a/assets/Wallpapers/030.jpg b/assets/Wallpapers/030.jpg new file mode 100755 index 0000000..b8df6a9 Binary files /dev/null and b/assets/Wallpapers/030.jpg differ diff --git a/assets/Wallpapers/031.jpg b/assets/Wallpapers/031.jpg new file mode 100755 index 0000000..b7bdb62 Binary files /dev/null and b/assets/Wallpapers/031.jpg differ diff --git a/assets/Wallpapers/032.jpg b/assets/Wallpapers/032.jpg new file mode 100755 index 0000000..3acdd6e Binary files /dev/null and b/assets/Wallpapers/032.jpg differ diff --git a/assets/Wallpapers/033.jpg b/assets/Wallpapers/033.jpg new file mode 100755 index 0000000..6da7948 Binary files /dev/null and b/assets/Wallpapers/033.jpg differ diff --git a/assets/Wallpapers/034.jpg b/assets/Wallpapers/034.jpg new file mode 100755 index 0000000..a02a0d6 Binary files /dev/null and b/assets/Wallpapers/034.jpg differ diff --git a/assets/Wallpapers/035.jpg b/assets/Wallpapers/035.jpg new file mode 100755 index 0000000..0bca760 Binary files /dev/null and b/assets/Wallpapers/035.jpg differ diff --git a/assets/Wallpapers/036.jpg b/assets/Wallpapers/036.jpg new file mode 100755 index 0000000..74812ef Binary files /dev/null and b/assets/Wallpapers/036.jpg differ diff --git a/assets/Wallpapers/037.jpg b/assets/Wallpapers/037.jpg new file mode 100755 index 0000000..d1897f4 Binary files /dev/null and b/assets/Wallpapers/037.jpg differ diff --git a/assets/Wallpapers/038.jpg b/assets/Wallpapers/038.jpg new file mode 100755 index 0000000..384252e Binary files /dev/null and b/assets/Wallpapers/038.jpg differ diff --git a/assets/Wallpapers/039.jpg b/assets/Wallpapers/039.jpg new file mode 100755 index 0000000..d8f7518 Binary files /dev/null and b/assets/Wallpapers/039.jpg differ diff --git a/assets/Wallpapers/040.jpg b/assets/Wallpapers/040.jpg new file mode 100755 index 0000000..5e146e8 Binary files /dev/null and b/assets/Wallpapers/040.jpg differ diff --git a/assets/Wallpapers/041.jpg b/assets/Wallpapers/041.jpg new file mode 100755 index 0000000..59858d6 Binary files /dev/null and b/assets/Wallpapers/041.jpg differ diff --git a/assets/Wallpapers/042.jpg b/assets/Wallpapers/042.jpg new file mode 100755 index 0000000..6bae7fa Binary files /dev/null and b/assets/Wallpapers/042.jpg differ diff --git a/assets/Wallpapers/043.jpg b/assets/Wallpapers/043.jpg new file mode 100755 index 0000000..5ab840b Binary files /dev/null and b/assets/Wallpapers/043.jpg differ diff --git a/assets/Wallpapers/044.jpg b/assets/Wallpapers/044.jpg new file mode 100755 index 0000000..20ded0f Binary files /dev/null and b/assets/Wallpapers/044.jpg differ diff --git a/assets/Wallpapers/045.jpg b/assets/Wallpapers/045.jpg new file mode 100755 index 0000000..7507a76 Binary files /dev/null and b/assets/Wallpapers/045.jpg differ diff --git a/assets/Wallpapers/046.jpg b/assets/Wallpapers/046.jpg new file mode 100755 index 0000000..cf4b637 Binary files /dev/null and b/assets/Wallpapers/046.jpg differ diff --git a/assets/Wallpapers/047.jpg b/assets/Wallpapers/047.jpg new file mode 100755 index 0000000..1d1b9ac Binary files /dev/null and b/assets/Wallpapers/047.jpg differ diff --git a/assets/Wallpapers/048.jpg b/assets/Wallpapers/048.jpg new file mode 100755 index 0000000..cbeccca Binary files /dev/null and b/assets/Wallpapers/048.jpg differ diff --git a/assets/Wallpapers/049.jpg b/assets/Wallpapers/049.jpg new file mode 100755 index 0000000..be3d920 Binary files /dev/null and b/assets/Wallpapers/049.jpg differ diff --git a/assets/Wallpapers/050.jpg b/assets/Wallpapers/050.jpg new file mode 100755 index 0000000..77d15bb Binary files /dev/null and b/assets/Wallpapers/050.jpg differ diff --git a/assets/Wallpapers/051.jpg b/assets/Wallpapers/051.jpg new file mode 100755 index 0000000..d2c17ad Binary files /dev/null and b/assets/Wallpapers/051.jpg differ diff --git a/assets/Wallpapers/052.jpg b/assets/Wallpapers/052.jpg new file mode 100755 index 0000000..ae574ac Binary files /dev/null and b/assets/Wallpapers/052.jpg differ diff --git a/assets/Wallpapers/053.jpg b/assets/Wallpapers/053.jpg new file mode 100755 index 0000000..d05eb27 Binary files /dev/null and b/assets/Wallpapers/053.jpg differ diff --git a/assets/Wallpapers/054.jpg b/assets/Wallpapers/054.jpg new file mode 100755 index 0000000..83bb974 Binary files /dev/null and b/assets/Wallpapers/054.jpg differ diff --git a/assets/Wallpapers/055.jpg b/assets/Wallpapers/055.jpg new file mode 100755 index 0000000..8791728 Binary files /dev/null and b/assets/Wallpapers/055.jpg differ diff --git a/assets/Wallpapers/056.jpg b/assets/Wallpapers/056.jpg new file mode 100755 index 0000000..f16215d Binary files /dev/null and b/assets/Wallpapers/056.jpg differ diff --git a/assets/Wallpapers/057.jpg b/assets/Wallpapers/057.jpg new file mode 100755 index 0000000..76574fc Binary files /dev/null and b/assets/Wallpapers/057.jpg differ diff --git a/assets/Wallpapers/058.jpg b/assets/Wallpapers/058.jpg new file mode 100755 index 0000000..07576b3 Binary files /dev/null and b/assets/Wallpapers/058.jpg differ diff --git a/assets/Wallpapers/059.jpg b/assets/Wallpapers/059.jpg new file mode 100755 index 0000000..fa3fcb2 Binary files /dev/null and b/assets/Wallpapers/059.jpg differ diff --git a/assets/Wallpapers/060.jpg b/assets/Wallpapers/060.jpg new file mode 100755 index 0000000..1202518 Binary files /dev/null and b/assets/Wallpapers/060.jpg differ diff --git a/assets/Wallpapers/061.jpg b/assets/Wallpapers/061.jpg new file mode 100755 index 0000000..7c43a59 Binary files /dev/null and b/assets/Wallpapers/061.jpg differ diff --git a/assets/Wallpapers/062.jpg b/assets/Wallpapers/062.jpg new file mode 100755 index 0000000..3b4e333 Binary files /dev/null and b/assets/Wallpapers/062.jpg differ diff --git a/assets/Wallpapers/063.jpg b/assets/Wallpapers/063.jpg new file mode 100755 index 0000000..f134f57 Binary files /dev/null and b/assets/Wallpapers/063.jpg differ diff --git a/assets/Wallpapers/064.jpg b/assets/Wallpapers/064.jpg new file mode 100755 index 0000000..e00a4b3 Binary files /dev/null and b/assets/Wallpapers/064.jpg differ diff --git a/assets/Wallpapers/065.jpg b/assets/Wallpapers/065.jpg new file mode 100755 index 0000000..c7b4d2e Binary files /dev/null and b/assets/Wallpapers/065.jpg differ diff --git a/assets/Wallpapers/066.jpg b/assets/Wallpapers/066.jpg new file mode 100755 index 0000000..afbd111 Binary files /dev/null and b/assets/Wallpapers/066.jpg differ diff --git a/assets/Wallpapers/067.jpg b/assets/Wallpapers/067.jpg new file mode 100755 index 0000000..9c7c3d3 Binary files /dev/null and b/assets/Wallpapers/067.jpg differ diff --git a/assets/Wallpapers/068.jpg b/assets/Wallpapers/068.jpg new file mode 100755 index 0000000..9b24bc1 Binary files /dev/null and b/assets/Wallpapers/068.jpg differ diff --git a/assets/Wallpapers/069.jpg b/assets/Wallpapers/069.jpg new file mode 100755 index 0000000..d91b2c2 Binary files /dev/null and b/assets/Wallpapers/069.jpg differ diff --git a/assets/Wallpapers/070.jpg b/assets/Wallpapers/070.jpg new file mode 100755 index 0000000..52d43e0 Binary files /dev/null and b/assets/Wallpapers/070.jpg differ diff --git a/assets/Wallpapers/071.jpg b/assets/Wallpapers/071.jpg new file mode 100755 index 0000000..997f568 Binary files /dev/null and b/assets/Wallpapers/071.jpg differ diff --git a/assets/Wallpapers/072.jpg b/assets/Wallpapers/072.jpg new file mode 100755 index 0000000..27fbb32 Binary files /dev/null and b/assets/Wallpapers/072.jpg differ diff --git a/assets/Wallpapers/073.jpg b/assets/Wallpapers/073.jpg new file mode 100755 index 0000000..0832941 Binary files /dev/null and b/assets/Wallpapers/073.jpg differ diff --git a/assets/Wallpapers/074.jpg b/assets/Wallpapers/074.jpg new file mode 100755 index 0000000..fdbf962 Binary files /dev/null and b/assets/Wallpapers/074.jpg differ diff --git a/assets/Wallpapers/075.jpg b/assets/Wallpapers/075.jpg new file mode 100755 index 0000000..269efaa Binary files /dev/null and b/assets/Wallpapers/075.jpg differ diff --git a/assets/Wallpapers/076.jpg b/assets/Wallpapers/076.jpg new file mode 100755 index 0000000..7cb8e1d Binary files /dev/null and b/assets/Wallpapers/076.jpg differ diff --git a/assets/Wallpapers/077.jpg b/assets/Wallpapers/077.jpg new file mode 100755 index 0000000..58f38e5 Binary files /dev/null and b/assets/Wallpapers/077.jpg differ diff --git a/assets/Wallpapers/078.jpg b/assets/Wallpapers/078.jpg new file mode 100755 index 0000000..e6fc9f6 Binary files /dev/null and b/assets/Wallpapers/078.jpg differ diff --git a/assets/Wallpapers/078.png b/assets/Wallpapers/078.png new file mode 100755 index 0000000..00cfdae Binary files /dev/null and b/assets/Wallpapers/078.png differ diff --git a/assets/Wallpapers/079.png b/assets/Wallpapers/079.png new file mode 100755 index 0000000..c339f03 Binary files /dev/null and b/assets/Wallpapers/079.png differ diff --git a/assets/Wallpapers/080.jpeg b/assets/Wallpapers/080.jpeg new file mode 100755 index 0000000..cbd8f33 Binary files /dev/null and b/assets/Wallpapers/080.jpeg differ diff --git a/assets/Wallpapers/081.jpg b/assets/Wallpapers/081.jpg new file mode 100755 index 0000000..5c96b5c Binary files /dev/null and b/assets/Wallpapers/081.jpg differ diff --git a/assets/Wallpapers/082.jpg b/assets/Wallpapers/082.jpg new file mode 100755 index 0000000..e8c0229 Binary files /dev/null and b/assets/Wallpapers/082.jpg differ diff --git a/assets/Wallpapers/083.png b/assets/Wallpapers/083.png new file mode 100755 index 0000000..8370a03 Binary files /dev/null and b/assets/Wallpapers/083.png differ diff --git a/assets/Wallpapers/084.jpg b/assets/Wallpapers/084.jpg new file mode 100755 index 0000000..cdcab2b Binary files /dev/null and b/assets/Wallpapers/084.jpg differ diff --git a/assets/Wallpapers/085.jpg b/assets/Wallpapers/085.jpg new file mode 100755 index 0000000..dc4b88e Binary files /dev/null and b/assets/Wallpapers/085.jpg differ diff --git a/assets/Wallpapers/086.jpg b/assets/Wallpapers/086.jpg new file mode 100755 index 0000000..81da290 Binary files /dev/null and b/assets/Wallpapers/086.jpg differ diff --git a/assets/Wallpapers/087.jpg b/assets/Wallpapers/087.jpg new file mode 100755 index 0000000..bbd468d Binary files /dev/null and b/assets/Wallpapers/087.jpg differ diff --git a/assets/Wallpapers/088.jpg b/assets/Wallpapers/088.jpg new file mode 100755 index 0000000..88a1c19 Binary files /dev/null and b/assets/Wallpapers/088.jpg differ diff --git a/assets/Wallpapers/089.jpg b/assets/Wallpapers/089.jpg new file mode 100755 index 0000000..9635d68 Binary files /dev/null and b/assets/Wallpapers/089.jpg differ diff --git a/assets/Wallpapers/090.jpg b/assets/Wallpapers/090.jpg new file mode 100755 index 0000000..433d9b7 Binary files /dev/null and b/assets/Wallpapers/090.jpg differ diff --git a/assets/Wallpapers/091.jpg b/assets/Wallpapers/091.jpg new file mode 100755 index 0000000..c17c0e0 Binary files /dev/null and b/assets/Wallpapers/091.jpg differ diff --git a/assets/Wallpapers/092.jpg b/assets/Wallpapers/092.jpg new file mode 100755 index 0000000..6428346 Binary files /dev/null and b/assets/Wallpapers/092.jpg differ diff --git a/assets/Wallpapers/093.jpg b/assets/Wallpapers/093.jpg new file mode 100755 index 0000000..f917f2c Binary files /dev/null and b/assets/Wallpapers/093.jpg differ diff --git a/assets/Wallpapers/094.jpg b/assets/Wallpapers/094.jpg new file mode 100755 index 0000000..1cad27f Binary files /dev/null and b/assets/Wallpapers/094.jpg differ diff --git a/assets/Wallpapers/095.jpg b/assets/Wallpapers/095.jpg new file mode 100755 index 0000000..cfcfd2b Binary files /dev/null and b/assets/Wallpapers/095.jpg differ diff --git a/assets/Wallpapers/096.jpg b/assets/Wallpapers/096.jpg new file mode 100755 index 0000000..2a0dbb9 Binary files /dev/null and b/assets/Wallpapers/096.jpg differ diff --git a/assets/Wallpapers/097.jpg b/assets/Wallpapers/097.jpg new file mode 100755 index 0000000..b51e3be Binary files /dev/null and b/assets/Wallpapers/097.jpg differ diff --git a/assets/Wallpapers/098.jpg b/assets/Wallpapers/098.jpg new file mode 100755 index 0000000..24147e5 Binary files /dev/null and b/assets/Wallpapers/098.jpg differ diff --git a/assets/Wallpapers/099.jpg b/assets/Wallpapers/099.jpg new file mode 100755 index 0000000..a82f4c7 Binary files /dev/null and b/assets/Wallpapers/099.jpg differ diff --git a/assets/Wallpapers/100.jpg b/assets/Wallpapers/100.jpg new file mode 100755 index 0000000..dff70eb Binary files /dev/null and b/assets/Wallpapers/100.jpg differ diff --git a/assets/Wallpapers/101.jpg b/assets/Wallpapers/101.jpg new file mode 100755 index 0000000..77daf3c Binary files /dev/null and b/assets/Wallpapers/101.jpg differ diff --git a/assets/Wallpapers/102.jpg b/assets/Wallpapers/102.jpg new file mode 100755 index 0000000..5dd3fc8 Binary files /dev/null and b/assets/Wallpapers/102.jpg differ diff --git a/assets/Wallpapers/103.jpg b/assets/Wallpapers/103.jpg new file mode 100755 index 0000000..eb8a243 Binary files /dev/null and b/assets/Wallpapers/103.jpg differ diff --git a/assets/Wallpapers/104.jpg b/assets/Wallpapers/104.jpg new file mode 100755 index 0000000..5238433 Binary files /dev/null and b/assets/Wallpapers/104.jpg differ diff --git a/assets/Wallpapers/105.jpg b/assets/Wallpapers/105.jpg new file mode 100755 index 0000000..9f5051e Binary files /dev/null and b/assets/Wallpapers/105.jpg differ diff --git a/assets/Wallpapers/106.jpg b/assets/Wallpapers/106.jpg new file mode 100755 index 0000000..fa3236f Binary files /dev/null and b/assets/Wallpapers/106.jpg differ diff --git a/assets/Wallpapers/107.jpg b/assets/Wallpapers/107.jpg new file mode 100755 index 0000000..ea25e4b Binary files /dev/null and b/assets/Wallpapers/107.jpg differ diff --git a/assets/Wallpapers/108.jpg b/assets/Wallpapers/108.jpg new file mode 100755 index 0000000..735b517 Binary files /dev/null and b/assets/Wallpapers/108.jpg differ diff --git a/assets/Wallpapers/109.jpg b/assets/Wallpapers/109.jpg new file mode 100755 index 0000000..8557e41 Binary files /dev/null and b/assets/Wallpapers/109.jpg differ diff --git a/assets/Wallpapers/110.jpg b/assets/Wallpapers/110.jpg new file mode 100755 index 0000000..7af5b0c Binary files /dev/null and b/assets/Wallpapers/110.jpg differ diff --git a/assets/Wallpapers/111.jpg b/assets/Wallpapers/111.jpg new file mode 100755 index 0000000..b4aaddc Binary files /dev/null and b/assets/Wallpapers/111.jpg differ diff --git a/assets/Wallpapers/112.jpg b/assets/Wallpapers/112.jpg new file mode 100755 index 0000000..c672be7 Binary files /dev/null and b/assets/Wallpapers/112.jpg differ diff --git a/assets/Wallpapers/113.jpg b/assets/Wallpapers/113.jpg new file mode 100755 index 0000000..56cf413 Binary files /dev/null and b/assets/Wallpapers/113.jpg differ diff --git a/assets/Wallpapers/114.jpg b/assets/Wallpapers/114.jpg new file mode 100755 index 0000000..ebe800b Binary files /dev/null and b/assets/Wallpapers/114.jpg differ diff --git a/assets/Wallpapers/115.jpg b/assets/Wallpapers/115.jpg new file mode 100755 index 0000000..59c1c08 Binary files /dev/null and b/assets/Wallpapers/115.jpg differ diff --git a/assets/Wallpapers/116.jpg b/assets/Wallpapers/116.jpg new file mode 100755 index 0000000..3fa6eaf Binary files /dev/null and b/assets/Wallpapers/116.jpg differ diff --git a/assets/Wallpapers/117.jpg b/assets/Wallpapers/117.jpg new file mode 100755 index 0000000..436c32e Binary files /dev/null and b/assets/Wallpapers/117.jpg differ diff --git a/assets/Wallpapers/118.jpg b/assets/Wallpapers/118.jpg new file mode 100755 index 0000000..a77df84 Binary files /dev/null and b/assets/Wallpapers/118.jpg differ diff --git a/assets/Wallpapers/119.jpg b/assets/Wallpapers/119.jpg new file mode 100755 index 0000000..17bd0a5 Binary files /dev/null and b/assets/Wallpapers/119.jpg differ diff --git a/assets/Wallpapers/120.jpg b/assets/Wallpapers/120.jpg new file mode 100755 index 0000000..75a7053 Binary files /dev/null and b/assets/Wallpapers/120.jpg differ diff --git a/assets/Wallpapers/121.jpg b/assets/Wallpapers/121.jpg new file mode 100755 index 0000000..ba92d43 Binary files /dev/null and b/assets/Wallpapers/121.jpg differ diff --git a/assets/Wallpapers/122.jpg b/assets/Wallpapers/122.jpg new file mode 100755 index 0000000..207780e Binary files /dev/null and b/assets/Wallpapers/122.jpg differ diff --git a/assets/Wallpapers/123.jpg b/assets/Wallpapers/123.jpg new file mode 100755 index 0000000..b4700b6 Binary files /dev/null and b/assets/Wallpapers/123.jpg differ diff --git a/assets/Wallpapers/124.jpg b/assets/Wallpapers/124.jpg new file mode 100755 index 0000000..d47843a Binary files /dev/null and b/assets/Wallpapers/124.jpg differ diff --git a/assets/Wallpapers/125.jpg b/assets/Wallpapers/125.jpg new file mode 100755 index 0000000..2f07a9e Binary files /dev/null and b/assets/Wallpapers/125.jpg differ diff --git a/assets/Wallpapers/126.jpg b/assets/Wallpapers/126.jpg new file mode 100755 index 0000000..9eba003 Binary files /dev/null and b/assets/Wallpapers/126.jpg differ diff --git a/assets/Wallpapers/127.jpg b/assets/Wallpapers/127.jpg new file mode 100755 index 0000000..ee21cab Binary files /dev/null and b/assets/Wallpapers/127.jpg differ diff --git a/assets/Wallpapers/128.png b/assets/Wallpapers/128.png new file mode 100755 index 0000000..6788ec8 Binary files /dev/null and b/assets/Wallpapers/128.png differ diff --git a/assets/Wallpapers/129.jpg b/assets/Wallpapers/129.jpg new file mode 100755 index 0000000..ffbeeca Binary files /dev/null and b/assets/Wallpapers/129.jpg differ diff --git a/assets/Wallpapers/130.jpg b/assets/Wallpapers/130.jpg new file mode 100755 index 0000000..d4f52c3 Binary files /dev/null and b/assets/Wallpapers/130.jpg differ diff --git a/assets/Wallpapers/131.jpg b/assets/Wallpapers/131.jpg new file mode 100755 index 0000000..71948a1 Binary files /dev/null and b/assets/Wallpapers/131.jpg differ diff --git a/assets/Wallpapers/132.jpg b/assets/Wallpapers/132.jpg new file mode 100755 index 0000000..cb68bdc Binary files /dev/null and b/assets/Wallpapers/132.jpg differ diff --git a/assets/Wallpapers/133.jpg b/assets/Wallpapers/133.jpg new file mode 100755 index 0000000..bf84aee Binary files /dev/null and b/assets/Wallpapers/133.jpg differ diff --git a/assets/Wallpapers/133.png b/assets/Wallpapers/133.png new file mode 100755 index 0000000..3ac3d70 Binary files /dev/null and b/assets/Wallpapers/133.png differ diff --git a/assets/Wallpapers/134.png b/assets/Wallpapers/134.png new file mode 100755 index 0000000..13fa7c4 Binary files /dev/null and b/assets/Wallpapers/134.png differ diff --git a/assets/Wallpapers/135.png b/assets/Wallpapers/135.png new file mode 100755 index 0000000..bf8f5a2 Binary files /dev/null and b/assets/Wallpapers/135.png differ diff --git a/assets/Wallpapers/136.png b/assets/Wallpapers/136.png new file mode 100755 index 0000000..4eeafc0 Binary files /dev/null and b/assets/Wallpapers/136.png differ diff --git a/assets/Wallpapers/137.png b/assets/Wallpapers/137.png new file mode 100755 index 0000000..a601b28 Binary files /dev/null and b/assets/Wallpapers/137.png differ diff --git a/assets/Wallpapers/138.png b/assets/Wallpapers/138.png new file mode 100755 index 0000000..86cfdfd Binary files /dev/null and b/assets/Wallpapers/138.png differ diff --git a/assets/Wallpapers/139.png b/assets/Wallpapers/139.png new file mode 100755 index 0000000..a77c10e Binary files /dev/null and b/assets/Wallpapers/139.png differ diff --git a/assets/Wallpapers/140.png b/assets/Wallpapers/140.png new file mode 100755 index 0000000..12e5c5c Binary files /dev/null and b/assets/Wallpapers/140.png differ diff --git a/assets/Wallpapers/141.png b/assets/Wallpapers/141.png new file mode 100755 index 0000000..7ae2469 Binary files /dev/null and b/assets/Wallpapers/141.png differ diff --git a/assets/Wallpapers/README.md b/assets/Wallpapers/README.md new file mode 100755 index 0000000..548ba53 --- /dev/null +++ b/assets/Wallpapers/README.md @@ -0,0 +1,3 @@ +# Wallpapers + +All my wallpapers \ No newline at end of file diff --git a/configuration.nix b/configuration.nix new file mode 100755 index 0000000..7a092ce --- /dev/null +++ b/configuration.nix @@ -0,0 +1,189 @@ +# 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, + lib, + inputs, + window_manager, + systemName, + ... +}: + +let + oreo = pkgs.callPackage ./personalPKGS/oreo.nix { }; +in + +{ + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ./system/hardware.nix + ./system/boot.nix + ./system/network.nix + ./system/inputMethods.nix + ./system/services.nix + ./system/fonts.nix + ./system/nixOSPkgs.nix + inputs.home-manager.nixosModules.home-manager + inputs.niri.nixosModules.niri + ]; + # niri settings + nix = { + settings = { + experimental-features = [ + "nix-command" + "flakes" + ]; + build-dir = "/var/tmp"; + auto-optimise-store = true; + }; + }; + + # Set your time zone. + time.timeZone = "Europe/Dublin"; + #programs.river.enable = true; + #programs.niri.enable = true; + #programs.niri.package = pkgs.niri-stable; + #nixpkgs.overlays = [ inputs.niri.overlays.niri ]; + #programs.hyprland.enable = true; + programs.river.enable = window_manager == "river" || window_manager == "all"; + + nixpkgs.overlays = [ inputs.niri.overlays.niri ]; + programs.niri = { + enable = window_manager == "niri" || window_manager == "all"; + package = pkgs.niri-stable; # Only needed if not provided by the overlay + }; + + programs.hyprland.enable = window_manager == "hyprland" || window_manager == "all"; + # Configure keymap in X11 + services.xserver = { + xkb = { + layout = "ie"; + variant = ""; + }; + enable = true; + displayManager.lightdm = { + enable = true; + greeters.gtk = { + enable = true; + theme.package = pkgs.amarena-theme; + theme.name = "amarena"; + cursorTheme.package = oreo.override { colors = [ "oreo_spark_pink_cursors" ]; }; + cursorTheme.name = "oreo_spark_pink_cursors"; + extraConfig = "background=${./assets/Wallpapers/138.png}"; + }; + }; + }; + + security.rtkit.enable = true; + environment.sessionVariables = { + ZDOTDIR = "$HOME/.config/zsh"; + }; + environment.pathsToLink = [ "/share/zsh" ]; + environment.variables = { + # VAAPI and VDPAU config for accelerated video. + # See https://wiki.archlinux.org/index.php/Hardware_video_acceleration + VDPAU_DRIVER = "radeonsi"; + LIBVA_DRIVER_NAME = "radeonsi"; + #XDG_CURRENT_DESKTOP = "hyprland"; + #QT_QPA_PLATFORMTHEME = "qt6ct"; + }; + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.mrfluffy = { + isNormalUser = true; + shell = pkgs.zsh; + createHome = true; + extraGroups = [ + "wheel" + "networkmanager" + "video" + "render" + "docker" + "libvirt" + ]; # Enable ‘sudo’ for the user. + packages = with pkgs; [ + + ]; + }; + users.users.work = { + isNormalUser = true; + shell = pkgs.zsh; + createHome = true; + extraGroups = [ + "wheel" + "networkmanager" + "video" + "render" + "docker" + "libvirt" + ]; # Enable ‘sudo’ for the user. + packages = with pkgs; [ + + ]; + }; + users.groups.libvirtd.members = [ + "mrfluffy" + "work" + ]; + + home-manager = { + # also pass inputs to home-manager modules + extraSpecialArgs = { + inherit inputs window_manager systemName; + }; + users = { + "mrfluffy" = import ./home/mrfluffy.nix; + + "work" = import ./home/work.nix; + }; + }; + + virtualisation.docker = { + enable = true; + storageDriver = lib.mkIf (systemName == "pc") "btrfs"; + }; + virtualisation.libvirtd.enable = true; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + security.pam.services.swaylock = { }; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + wget + neovim + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + #services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "24.11"; # Did you read the comment? + +} diff --git a/dots/doom/.back.modules/completion/corfu/README.org b/dots/doom/.back.modules/completion/corfu/README.org new file mode 100755 index 0000000..60cb7ec --- /dev/null +++ b/dots/doom/.back.modules/completion/corfu/README.org @@ -0,0 +1,153 @@ +#+title: :completion corfu +#+subtitle: Complete with cap(f), cape and a flying feather +#+created: September 9, 2022 +#+since: 3.0.0 (#7002) + +* Description :unfold: +This module provides code completion, powered by [[https://github.com/minad/corfu][corfu]]. + +It is recommended to enable either this or [[doom-module:][:completion company]], in case you +desire pre-configured auto-completion. Corfu is much lighter weight and focused, +plus it's built on native Emacs functionality, whereas company is heavy and +highly non-native, but has some extra features and more maturity. + +** Maintainers +- [[doom-user:][@LuigiPiucco]] + +[[doom-contrib-maintainer:][Become a maintainer?]] + +** Module flags +- +icons :: + Display icons beside completion suggestions. +- +tng :: + Invoke completion on [[kbd:][TAB]]. When corfu is active, [[kbd:][TAB]] and [[kbd:][S-TAB]] will navigate + the completion candidates. Arrow keys and evil-style movement are still + supported. + +** Packages +- [[doom-package:][corfu]] +- [[doom-package:][cape]] +- [[doom-package:][kind-icon]] if [[doom-module:][:completion corfu +icons]] +- [[doom-package:][corfu-terminal]] if [[doom-module:][:os tty]] + +** Hacks +/No hacks documented for this module./ + +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ + +* Installation +Enable this module in your ~doom!~ block. + +This module has no direct requirements, but some languages may have their own +requirements to fulfill before you get code completion in them (and some +languages may lack code completion support altogether). Run ~$ doom doctor~ to +find out if you're missing any dependencies. Note that corfu may have support +for completions in languages that have no development intelligence, since it +supports generic, context insensitive candidates such as file names or recurring +words. + +* TODO Usage +#+begin_quote + 🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote + +** Code completion +By default, completion gets triggered after typing 2 non-space consecutive +characters, or by means of the [[kbd:][C-SPC]] keybinding at any moment. While the popup +is visible, the following relevant keys are available: + +| Keybind | Description | +|----------+------------------------------------------------------| +| [[kbd:][]] | Go to next candidate | +| [[kbd:][]] | Go to previous candidate | +| [[kbd:][C-n]] | Go to next candidate | +| [[kbd:][C-p]] | Go to previous candidate | +| [[kbd:][C-j]] | (evil) Go to next candidate | +| [[kbd:][C-k]] | (evil) Go to previous candidate | +| [[kbd:][C-]] | Go to next doc line | +| [[kbd:][C-]] | Go to previous doc line | +| [[kbd:][C-S-n]] | Go to next doc line | +| [[kbd:][C-S-p]] | Go to previous doc line | +| [[kbd:][C-S-j]] | (evil) Go to next doc line | +| [[kbd:][C-S-k]] | (evil) Go to previous doc line | +| [[kbd:][C-h]] | Toggle documentation (if available) | +| [[kbd:][s-]] | Export to minibuffer (if [[doom-module:][:completion vertico]]) | +| [[kbd:][s-j]] | (evil) Export to minibuffer (if [[doom-module:][:completion vertico]]) | +| [[kbd:][RET]] | Insert candidate | +| [[kbd:][C-SPC]] | (when completing) Insert separator (see below) | +| [[kbd:][C-SPC]] | Complete (unless [[doom-module:][:completion corfu +tng]]) | + +If you prefer a [[kbd:][TAB]]-centric completion style, enable the [[doom-module:][:completion corfu +tng]] +flag so that, instead, you trigger completion with [[kbd:][TAB]], getting the following +additional binds: + +| Keybind | Description | +|---------+--------------------------------------------| +| [[kbd:][TAB]] | Complete | +| [[kbd:][TAB]] | (when completing) Go to next candidate | +| [[kbd:][S-TAB]] | (when completing) Go to previous candidate | + +** Searching with multiple keywords +If the [[doom-module:][:completion vertico]] module is enabled, users can perform code completion +with multiple search keywords by use of space as separator. More information can +be found [[https://github.com/oantolin/orderless#company][here]]. Pressing [[kdb:][C-SPC]] again while completing inserts a space as +separator. This allows searching with space-separated terms; each piece will +match individually and in any order, with smart casing. Pressing just [[kbd:][SPC]] acts +as normal and restarts completion, so that when typing sentences it doesn't try +to complete the whole sentence instead of just the word. + +Without [[doom-module:][:completion vertico]], it still works, just not as intelligently, due to +the lack of orderless. + +** Exporting to the minibuffer (requires [[doom-module:][:completion vertico]]) +When using the [[doom-module:][:completion vertico]] module, which pulls in the [[doom-package:][consult]] package, +the entries shown in the completion popup can be exported to a consult +minibuffer, giving access to all the manipulations the vertico suite allows. For +instance, one could use this to export with [[doom-package:][embark]] via [[kbd:][C-c C-l]] and get a buffer +with all candidates. + +** Ispell completion +Ispell completion is supported, so long as you point to the right ~.dic~ file in +~ispell-alternate-dictionary~. For selected text modes (see the configuration +section) it completes everywhere, for programming modes it can complete in +comments and strings. + +* Configuration +A few variables may be set to change behavior of this module: + +- +corfu-auto-delay :: + Number of seconds till completion occurs automatically. Defaults to 0.1. +- +corfu-auto-prefix :: + Number of characters till auto-completion starts to happen. Defaults to 2. +- +corfu-want-multi-component :: + Sets whether orderless-style matching should be supported with space as a + separator. +- +corfu-ispell-completion-modes :: + Lists modes in which to add ~cape-ispell~ as a capf. These show be majorly + text modes, else you will get lots of bad suggestions, since when this matches + it interrupts the flow of candidate selection. +- +corfu-ispell-in-comments-and-strings :: + Whether we should complete when point is inside a string or comment. If + non-nil, works as in a text mode, else gives programming completions just like + in the rest of the buffer. + +Additionally, if you prefer to never stop completion on [[kbd:][SPC]], add the following +to your ~config.el~: + +#+begin_src emacs-lisp +(map! :map corfu-map + :desc "insert separator" "C-SPC" #'corfu-insert-separator) +#+end_src + +* Troubleshooting +[[doom-report:][Report an issue?]] + +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] + +* TODO Appendix +#+begin_quote + 🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote diff --git a/dots/doom/.back.modules/completion/corfu/config.el b/dots/doom/.back.modules/completion/corfu/config.el new file mode 100755 index 0000000..e39a1bd --- /dev/null +++ b/dots/doom/.back.modules/completion/corfu/config.el @@ -0,0 +1,188 @@ +;;; completion/corfu/config.el -*- lexical-binding: t; -*- + +(defvar +corfu-auto-delay 0.1 + "How long after point stands still will completion be called automatically, +in seconds. + +Setting `corfu-auto-delay' directly may not work, as it needs to be set *before* +enabling `corfu-mode'.") +(defvar +corfu-auto-prefix 2 + "How many characters should be typed before auto-complete starts to kick in. + +Setting `corfu-auto-prefix' directly may not work, as it needs to be set +*before* enabling `corfu-mode'.") +(defvar +corfu-want-multi-component t + "Enables multiple component search, with pieces separated by spaces. + +This allows search of non-contiguous unordered bits, for instance by typing +\"tear rip\" to match \"rip-and-tear\". Notice the space, it does not break +completion in this case.") +(defvar +corfu-icon-height 0.9 + "The height applied to the icons (it is passed to both svg-lib and kind-icon). + +It may need tweaking for the completions to not become cropped at the end. +Note that changes are applied only after a cache reset, via +`kind-icon-reset-cache'.") + +(defvar +corfu-ispell-completion-modes '(org-mode markdown-mode text-mode) + "Modes to enable ispell completion in. + +For completion in comments, see `+corfu-ispell-in-comments-and-strings'.") +(defvar +corfu-ispell-in-comments-and-strings t + "Enable completion with ispell inside comments when in a `prog-mode' +derivative.") + +;; +;;; Packages +(use-package! corfu + :hook (doom-first-buffer . global-corfu-mode) + :init + ;; Auto-completion settings, must be set before calling `global-corfu-mode'. + (setq corfu-auto t + corfu-auto-delay +corfu-auto-delay + corfu-auto-prefix +corfu-auto-prefix + corfu-excluded-modes '(erc-mode + circe-mode + help-mode + gud-mode + vterm-mode)) + + :config + (when (and (modulep! :tools lsp) (not (modulep! :tools lsp +eglot))) + (add-hook 'lsp-mode-hook (defun doom--add-lsp-capf () + (add-to-list 'completion-at-point-functions (cape-capf-buster #'lsp-completion-at-point))) + ;; Below is so that context specific completions in cape come first. + :depth 1)) + (add-to-list 'completion-styles 'partial-completion t) + (add-to-list 'completion-styles 'initials t) + (setq corfu-cycle t + corfu-separator (when +corfu-want-multi-component ?\s) + corfu-preselect t + corfu-count 16 + corfu-max-width 120 + corfu-preview-current 'insert + corfu-quit-at-boundary (if +corfu-want-multi-component 'separator t) + corfu-quit-no-match (if +corfu-want-multi-component 'separator t) + ;; In the case of +tng, TAB should be smart regarding completion; + ;; However, it should otherwise behave like normal, whatever normal was. + tab-always-indent (if (modulep! +tng) 'complete tab-always-indent)) + ;; Only done with :tools vertico active due to orderless. Alternatively, we + ;; could set it up here if it's not there. + (when (and +corfu-want-multi-component (modulep! :completion vertico)) + (cond ((modulep! :tools lsp +eglot) (add-to-list 'completion-category-overrides '(eglot (styles orderless)))) + ((modulep! :tools lsp) (add-hook 'lsp-completion-mode-hook + (defun doom--use-orderless-lsp-capf () + (setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults)) + '(orderless))))))) + (map! (:unless (modulep! +tng) + :desc "complete" "C-SPC" #'completion-at-point) + (:map 'corfu-map + (:when +corfu-want-multi-component + :desc "insert separator" "C-SPC" #'corfu-insert-separator) + (:when (modulep! :completion vertico) + :desc "move to minibuffer" "s-" #'corfu-move-to-minibuffer + (:when (modulep! :editor evil) + :desc "move to minibuffer" "s-j" #'corfu-move-to-minibuffer)) + (:when (modulep! +tng) + :desc "next" [tab] #'corfu-next + :desc "previous" [backtab] #'corfu-previous + :desc "next" "TAB" #'corfu-next + :desc "previous" "S-TAB" #'corfu-previous)))) + +;; Taken from corfu's README. +;; TODO: extend this to other completion front-ends, mainly helm and ido, since +;; ivy is being considered for removal. +(when (modulep! :completion vertico) + (defun corfu-move-to-minibuffer () + (interactive) + (let ((completion-extra-properties corfu--extra) + completion-cycle-threshold completion-cycling) + (apply #'consult-completion-in-region completion-in-region--data)))) + +(use-package! cape + :after corfu + :commands (cape-dabbrev + cape-file + cape-history + cape-keyword + cape-tex + cape-sgml + cape-rfc1345 + cape-abbrev + cape-ispell + cape-dict + cape-symbol + cape-line) + :init + (add-to-list 'completion-at-point-functions #'cape-file) + (when +corfu-ispell-in-comments-and-strings + (defalias 'corfu--ispell-in-comments-and-strings + (cape-super-capf (cape-capf-inside-comment #'cape-ispell) + (cape-capf-inside-string #'cape-ispell))) + (add-hook 'prog-mode-hook + (lambda () + (add-to-list 'completion-at-point-functions #'corfu--ispell-in-comments-and-strings)))) + (dolist (sym +corfu-ispell-completion-modes) + (add-hook (intern (concat (symbol-name sym) "-hook")) + (lambda () + (add-to-list 'completion-at-point-functions #'cape-ispell)))) + (add-hook! '(TeX-mode-hook LaTeX-mode-hook org-mode-hook) + (lambda () + (add-to-list 'completion-at-point-functions #'cape-tex t)) + :depth 2) + (add-hook! '(html-mode-hook +web-react-mode-hook typescript-tsx-mode-hook org-mode-hook markdown-mode-hook) + (lambda () + (add-to-list 'completion-at-point-functions #'cape-sgml t)) + :depth 2) + (add-to-list 'completion-at-point-functions #'cape-dabbrev) + (add-to-list 'completion-at-point-functions #'cape-keyword) + :config + ;; Enhances speed on large projects, for which many buffers may be open. + (setq cape-dabbrev-check-other-buffers nil)) + +(use-package! kind-icon + :when (modulep! +icons) + :commands kind-icon-margin-formatter + :init + (add-hook 'corfu-margin-formatters #'kind-icon-margin-formatter) + :config + (setq kind-icon-default-face 'corfu-default + kind-icon-blend-background t + kind-icon-blend-frac 0.2) + (plist-put kind-icon-default-style :height +corfu-icon-height) + (plist-put svg-lib-style-default :height +corfu-icon-height)) + +(use-package! corfu-terminal + :when (and (modulep! :os tty) (not (display-graphic-p))) + :hook (corfu-mode . corfu-terminal-mode)) + +(use-package! dabbrev + :config + (setq dabbrev-ignored-buffer-regexps '("\\.\\(?:pdf\\|jpe?g\\|png\\)\\'"))) + +(setq read-extended-command-predicate + #'command-completion-default-include-p) + +;; +;;; Extensions +(use-package! corfu-history + :after savehist + :hook (corfu-mode . corfu-history-mode) + :config + (add-to-list 'savehist-additional-variables 'corfu-history)) +(use-package! corfu-popupinfo + :hook (corfu-mode . corfu-popupinfo-mode) + :config + (setq corfu-popupinfo-delay '(0.5 . 1.0)) + (map! (:map 'corfu-map + :desc "scroll info up" "C-" #'corfu-popupinfo-scroll-down + :desc "scroll info down" "C-" #'corfu-popupinfo-scroll-up + :desc "scroll info up" "C-S-p" #'corfu-popupinfo-scroll-down + :desc "scroll info down" "C-S-n" #'corfu-popupinfo-scroll-up + :desc "toggle info" "C-h" #'corfu-popupinfo-toggle) + (:map 'corfu-popupinfo-map + :when (modulep! :editor evil) + ;; Reversed because popupinfo assumes opposite of what feels intuitive + ;; with evil. + :desc "scroll info up" "C-S-k" #'corfu-popupinfo-scroll-down + :desc "scroll info down" "C-S-j" #'corfu-popupinfo-scroll-up))) diff --git a/dots/doom/.back.modules/completion/corfu/packages.el b/dots/doom/.back.modules/completion/corfu/packages.el new file mode 100755 index 0000000..3033340 --- /dev/null +++ b/dots/doom/.back.modules/completion/corfu/packages.el @@ -0,0 +1,10 @@ +;; -*- no-byte-compile: t; -*- +;;; completion/corfu/packages.el + +(package! corfu :recipe (:files ("*.el" "extensions/*.el"))) +(package! cape) +(package! dabbrev) +(when (modulep! +icons) + (package! kind-icon)) +(when (modulep! :os tty) + (package! corfu-terminal)) diff --git a/dots/doom/.back.modules/tools/lsp2/+eglot.el b/dots/doom/.back.modules/tools/lsp2/+eglot.el new file mode 100755 index 0000000..48dc8c5 --- /dev/null +++ b/dots/doom/.back.modules/tools/lsp2/+eglot.el @@ -0,0 +1,57 @@ +;;; tools/lsp/+eglot.el -*- lexical-binding: t; -*- + +(use-package! eglot + :commands eglot eglot-ensure + :hook (eglot-managed-mode . +lsp-optimization-mode) + :init + (setq eglot-sync-connect 1 + eglot-connect-timeout 10 + eglot-autoshutdown t + eglot-send-changes-idle-time 0.5 + ;; NOTE We disable eglot-auto-display-help-buffer because :select t in + ;; its popup rule causes eglot to steal focus too often. + eglot-auto-display-help-buffer nil) + (when (modulep! :checkers syntax) + (setq eglot-stay-out-of '(flymake))) + + :config + (set-popup-rule! "^\\*eglot-help" :size 0.15 :quit t :select t) + (set-lookup-handlers! 'eglot--managed-mode + :definition #'xref-find-definitions + :references #'xref-find-references + :implementations #'eglot-find-implementation + :type-definition #'eglot-find-typeDefinition + :documentation #'+eglot-lookup-documentation) + + (add-to-list 'doom-debug-variables '(eglot-events-buffer-size . 0)) + + (when (modulep! :checkers syntax) + (after! flycheck + (load! "autoload/flycheck-eglot"))) + + (defadvice! +lsp--defer-server-shutdown-a (fn &optional server) + "Defer server shutdown for a few seconds. +This gives the user a chance to open other project files before the server is +auto-killed (which is a potentially expensive process). It also prevents the +server getting expensively restarted when reverting buffers." + :around #'eglot--managed-mode + (letf! (defun eglot-shutdown (server) + (if (or (null +lsp-defer-shutdown) + (eq +lsp-defer-shutdown 0)) + (prog1 (funcall eglot-shutdown server) + (+lsp-optimization-mode -1)) + (run-at-time + (if (numberp +lsp-defer-shutdown) +lsp-defer-shutdown 3) + nil (lambda (server) + (unless (eglot--managed-buffers server) + (prog1 (funcall eglot-shutdown server) + (+lsp-optimization-mode -1)))) + server))) + (funcall fn server)))) + + +(use-package! consult-eglot + :defer t + :when (modulep! :completion vertico) + :init + (map! :map eglot-mode-map [remap xref-find-apropos] #'consult-eglot-symbols)) diff --git a/dots/doom/.back.modules/tools/lsp2/+lsp.el b/dots/doom/.back.modules/tools/lsp2/+lsp.el new file mode 100755 index 0000000..c737399 --- /dev/null +++ b/dots/doom/.back.modules/tools/lsp2/+lsp.el @@ -0,0 +1,193 @@ +;;; tools/lsp/+lsp.el -*- lexical-binding: t; -*- + +(defvar +lsp-company-backends + (if (modulep! :editor snippets) + '(:separate company-capf company-yasnippet) + 'company-capf) + "The backends to prepend to `company-backends' in `lsp-mode' buffers. +Can be a list of backends; accepts any value `company-backends' accepts.") + + +;; +;;; Packages + +(use-package! lsp-mode + :commands lsp-install-server + :init + ;; Don't touch ~/.emacs.d, which could be purged without warning + (setq lsp-session-file (concat doom-cache-dir "lsp-session") + lsp-server-install-dir (concat doom-data-dir "lsp")) + ;; Don't auto-kill LSP server after last workspace buffer is killed, because I + ;; will do it for you, after `+lsp-defer-shutdown' seconds. + (setq lsp-keep-workspace-alive nil) + + ;; NOTE I tweak LSP's defaults in order to make its more expensive or imposing + ;; features opt-in. Some servers implement these poorly and, in most + ;; cases, it's safer to rely on Emacs' native mechanisms (eldoc vs + ;; lsp-ui-doc, open in popup vs sideline, etc). + + ;; Disable features that have great potential to be slow. + (setq lsp-enable-folding nil + lsp-enable-text-document-color nil) + ;; Reduce unexpected modifications to code + (setq lsp-enable-on-type-formatting nil) + ;; Make breadcrumbs opt-in; they're redundant with the modeline and imenu + (setq lsp-headerline-breadcrumb-enable nil) + + ;; Let doom bind the lsp keymap. + (when (modulep! :config default +bindings) + (setq lsp-keymap-prefix nil)) + + :config + (add-to-list 'doom-debug-variables 'lsp-log-io) + + (setq lsp-intelephense-storage-path (concat doom-data-dir "lsp-intelephense/") + lsp-vetur-global-snippets-dir + (expand-file-name + "vetur" (or (bound-and-true-p +snippets-dir) + (concat doom-user-dir "snippets/"))) + lsp-xml-jar-file (expand-file-name "org.eclipse.lsp4xml-0.3.0-uber.jar" lsp-server-install-dir) + lsp-groovy-server-file (expand-file-name "groovy-language-server-all.jar" lsp-server-install-dir)) + + ;; REVIEW Remove this once this is fixed upstream. + (add-to-list 'lsp-client-packages 'lsp-racket) + + (add-hook! 'doom-escape-hook + (defun +lsp-signature-stop-maybe-h () + "Close the displayed `lsp-signature'." + (when lsp-signature-mode + (lsp-signature-stop) + t))) + + (set-popup-rule! "^\\*lsp-\\(help\\|install\\)" :size 0.35 :quit t :select t) + (set-lookup-handlers! 'lsp-mode + :definition #'+lsp-lookup-definition-handler + :references #'+lsp-lookup-references-handler + :documentation '(lsp-describe-thing-at-point :async t) + :implementations '(lsp-find-implementation :async t) + :type-definition #'lsp-find-type-definition) + + (defadvice! +lsp--respect-user-defined-checkers-a (fn &rest args) + "Ensure user-defined `flycheck-checker' isn't overwritten by `lsp'." + :around #'lsp-diagnostics-flycheck-enable + (if flycheck-checker + (let ((old-checker flycheck-checker)) + (apply fn args) + (setq-local flycheck-checker old-checker)) + (apply fn args))) + + (add-hook! 'lsp-mode-hook #'+lsp-optimization-mode) + + (when (modulep! :completion company) + (add-hook! 'lsp-completion-mode-hook + (defun +lsp-init-company-backends-h () + (when lsp-completion-mode + (set (make-local-variable 'company-backends) + (cons +lsp-company-backends + (remove +lsp-company-backends + (remq 'company-capf company-backends)))))))) + + (defvar +lsp--deferred-shutdown-timer nil) + (defadvice! +lsp-defer-server-shutdown-a (fn &optional restart) + "Defer server shutdown for a few seconds. +This gives the user a chance to open other project files before the server is +auto-killed (which is a potentially expensive process). It also prevents the +server getting expensively restarted when reverting buffers." + :around #'lsp--shutdown-workspace + (if (or lsp-keep-workspace-alive + restart + (null +lsp-defer-shutdown) + (= +lsp-defer-shutdown 0)) + (prog1 (funcall fn restart) + (+lsp-optimization-mode -1)) + (when (timerp +lsp--deferred-shutdown-timer) + (cancel-timer +lsp--deferred-shutdown-timer)) + (setq +lsp--deferred-shutdown-timer + (run-at-time + (if (numberp +lsp-defer-shutdown) +lsp-defer-shutdown 3) + nil (lambda (workspace) + (with-lsp-workspace workspace + (unless (lsp--workspace-buffers workspace) + (let ((lsp-restart 'ignore)) + (funcall fn)) + (+lsp-optimization-mode -1)))) + lsp--cur-workspace)))) + + (when (modulep! :ui modeline +light) + (defvar-local lsp-modeline-icon nil) + + (add-hook! '(lsp-before-initialize-hook + lsp-after-initialize-hook + lsp-after-uninitialized-functions + lsp-before-open-hook + lsp-after-open-hook) + (defun +lsp-update-modeline (&rest _) + "Update modeline with lsp state." + (let* ((workspaces (lsp-workspaces)) + (face (if workspaces 'success 'warning)) + (label (if workspaces "LSP Connected" "LSP Disconnected"))) + (setq lsp-modeline-icon (concat + " " + (+modeline-format-icon 'faicon "rocket" "" face label -0.0575) + " ")) + (add-to-list 'global-mode-string + '(t (:eval lsp-modeline-icon))))))) + (when (modulep! :completion corfu) + (setq lsp-completion-provider :none) + (add-hook 'lsp-mode-hook #'lsp-completion-mode))) + +(use-package! lsp-ui + :hook (lsp-mode . lsp-ui-mode) + :init + (defadvice! +lsp--use-hook-instead-a (fn &rest args) + "Change `lsp--auto-configure' to not force `lsp-ui-mode' on us. Using a hook +instead is more sensible." + :around #'lsp--auto-configure + (letf! ((#'lsp-ui-mode #'ignore)) + (apply fn args))) + + :config + (when (modulep! +peek) + (set-lookup-handlers! 'lsp-ui-mode + :definition 'lsp-ui-peek-find-definitions + :implementations 'lsp-ui-peek-find-implementation + :references 'lsp-ui-peek-find-references + :async t)) + + (setq lsp-ui-peek-enable (modulep! +peek) + lsp-ui-doc-max-height 8 + lsp-ui-doc-max-width 72 ; 150 (default) is too wide + lsp-ui-doc-delay 0.75 ; 0.2 (default) is too naggy + lsp-ui-doc-show-with-mouse nil ; don't disappear on mouseover + lsp-ui-doc-position 'at-point + lsp-ui-sideline-ignore-duplicate t + ;; Don't show symbol definitions in the sideline. They are pretty noisy, + ;; and there is a bug preventing Flycheck errors from being shown (the + ;; errors flash briefly and then disappear). + lsp-ui-sideline-show-hover nil + ;; Re-enable icon scaling (it's disabled by default upstream for Emacs + ;; 26.x compatibility; see emacs-lsp/lsp-ui#573) + lsp-ui-sideline-actions-icon lsp-ui-sideline-actions-icon-default) + + (map! :map lsp-ui-peek-mode-map + "j" #'lsp-ui-peek--select-next + "k" #'lsp-ui-peek--select-prev + "C-k" #'lsp-ui-peek--select-prev-file + "C-j" #'lsp-ui-peek--select-next-file)) + + +(use-package! helm-lsp + :when (modulep! :completion helm) + :commands helm-lsp-workspace-symbol helm-lsp-global-workspace-symbol) + + +(use-package! lsp-ivy + :when (modulep! :completion ivy) + :commands lsp-ivy-workspace-symbol lsp-ivy-global-workspace-symbol) + + +(use-package! consult-lsp + :defer t + :when (modulep! :completion vertico) + :init + (map! :map lsp-mode-map [remap xref-find-apropos] #'consult-lsp-symbols)) diff --git a/dots/doom/.back.modules/tools/lsp2/README.org b/dots/doom/.back.modules/tools/lsp2/README.org new file mode 100755 index 0000000..cf8c3c1 --- /dev/null +++ b/dots/doom/.back.modules/tools/lsp2/README.org @@ -0,0 +1,155 @@ +#+title: :tools lsp +#+subtitle: M-x vscode +#+created: March 05, 2019 +#+since: 21.12.0 + +* Description :unfold: +This module integrates [[https://langserver.org/][language servers]] into Doom Emacs. They provide features +you'd expect from IDEs, like code completion, realtime linting, language-aware +[[doom-package:imenu]]/[[doom-package:xref]] integration, jump-to-definition/references support, and more. + +As of this writing, this is the state of LSP support in Doom Emacs: + +| Module | Major modes | Default language server | +|------------------+---------------------------------------------------------+---------------------------------------------------------------| +| [[doom-module::lang cc]] | c-mode, c++-mode, objc-mode | ccls, clangd | +| [[doom-module::lang clojure]] | clojure-mode | clojure-lsp | +| [[doom-module::lang csharp]] | csharp-mode | omnisharp | +| [[doom-module::lang elixir]] | elixir-mode | elixir-ls | +| [[doom-module::lang fsharp]] | fsharp-mode | Mono, .NET core | +| [[doom-module::lang go]] | go-mode | go-langserver | +| [[doom-module::lang haskell]] | haskell-mode | haskell-language-server | +| [[doom-module::lang java]] | java-mode | lsp-java | +| [[doom-module::lang javascript]] | js2-mode, rjsx-mode, typescript-mode | ts-ls, deno-ls | +| [[doom-module::lang julia]] | julia-mode | LanguageServer.jl | +| [[doom-module::lang ocaml]] | tuareg-mode | ocaml-language-server | +| [[doom-module::lang php]] | php-mode | php-language-server | +| [[doom-module::lang purescript]] | purescript-mode | purescript-language-server | +| [[doom-module::lang python]] | python-mode | lsp-python-ms | +| [[doom-module::lang ruby]] | ruby-mode | solargraph | +| [[doom-module::lang rust]] | rust-mode | rls | +| [[doom-module::lang scala]] | scala-mode | metals | +| [[doom-module::lang sh]] | sh-mode | bash-language-server | +| [[doom-module::lang swift]] | swift-mode | sourcekit | +| [[doom-module::lang web]] | web-mode, css-mode, scss-mode, sass-mode, less-css-mode | vscode-css-languageserver-bin, vscode-html-languageserver-bin | +| [[doom-module::lang zig]] | zig-mode | zls | + +** Maintainers +/This module has no dedicated maintainers./ [[doom-contrib-maintainer:][Become a maintainer?]] + +** Module flags +- +eglot :: + Use [[https://elpa.gnu.org/packages/eglot.html][Eglot]] instead of [[https://github.com/emacs-lsp/lsp-mode][LSP-mode]] to implement the LSP client in Emacs. +- +peek :: + Use ~lsp-ui-peek~ when looking up definitions and references with + functionality from the [[doom-module::tools lookup]] module. + +** Packages +- [[doom-package:lsp-mode]] +- [[doom-package:lsp-ui]] +- [[doom-package:lsp-ivy]] ([[doom-module::completion ivy]]) +- [[doom-package:helm-lsp]] ([[doom-module::completion helm]]) +- [[doom-package:consult-lsp]] ([[doom-module::completion vertico]]) +- [[doom-package:eglot]] + +** Hacks +/No hacks documented for this module./ + +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ + +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] + +To get LSP working, you'll need to do three things: + +1. Enable this module, +2. Install a language server appropriate for your targeted language(s). +3. Enable the [[doom-module:+lsp]] flag on the [[doom-module::lang]] modules you want to enable LSP support for. + +Different languages will need different language servers, some of which [[doom-package:lsp-mode]] +will prompt you to auto-install, but [[doom-package:eglot]] will not. + +A table that lists available language servers and how to install them can be +found [[https://emacs-lsp.github.io/lsp-mode/page/languages/][on the lsp-mode project README]]. The documentation of the module for your +targeted language will contain brief instructions as well. + +For eglot users, a list of [[https://github.com/joaotavora/eglot/blob/master/README.md#connecting-to-a-server][default servers supported is on Eglot's README]], +including instructions to register your own. + +* TODO Usage +#+begin_quote + 🔨 /This module's usage documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote + +** LSP-powered project search +Without the [[doom-module:+eglot]] flag, and when [[doom-module::completion ivy]], [[doom-module::completion helm]] or +[[doom-module::completion vertico]] is active, LSP is used to search a symbol indexed by the LSP +server: +| Keybind | Description | +|---------+-------------------------------------| +| [[kbd:][SPC c j]] | Jump to symbol in current workspace | +| [[kbd:][SPC c J]] | Jump to symbol in any workspace | + +** Differences between eglot and lsp-mode +The two projects are large and actively developed, so without writing a novel, +it can only be compared in (very) broad strokes: + +- [[doom-package:lsp-mode]] tends to be more featureful, beginner-friendly (e.g. offers to + install servers for you and has more [[https://emacs-lsp.github.io/lsp-mode][helpful documentation]]), and has a user + experience that feels familiar to modern editors/IDEs, but at the cost of + performance (at baseline) and complexity (it has more moving parts and + reinvents a number of wheels to achieve a slicker UI, like ~lsp-ui-peek~, + ~lsp-ui-sideline~, etc). + +- [[doom-package:eglot]] has fewer bells and whistles: it relies on built-in Emacs functionality + more (eldoc, xref, capf, project.el, etc), offers less pre-configuration for + you, and is more performant than lsp-mode (again, at baseline). It also works + with TRAMP out-of-the-box (lsp-mode needs some extra configuration). + +#+begin_quote + 💬 I recommend beginners use lsp-mode. More experienced users may also opt to + disable many of [[https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/][its inessential features]] to gain back some ground on + performance and complexity costs. +#+end_quote + +All that said, it's easy to switch between the two implementations by swapping +in/out the [[doom-module:+lsp]] or [[doom-module:+eglot]] flag when [[id:01cffea4-3329-45e2-a892-95a384ab2338][enabling this module]]. + +* TODO Configuration +#+begin_quote + 🔨 /This module's configuration documentation is incomplete./ [[doom-contrib-module:][Complete it?]] +#+end_quote + +** Turn off lsp-mode's intrusive features +Many users may not like how many UI elements that lsp-mode adds. They have [[https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/][some +excellent documentation]] outlining what these features are called and how to turn +them off. + +* Troubleshooting +[[doom-report:][Report an issue?]] + +** My language server is not found +Check the entry in the [[../../../docs/faq.org][FAQ]] about "Doom can't find my executables/doesn't inherit +the correct ~PATH~" + +** LSP/Eglot is not started automatically in my buffer +Make sure that you have enabled the [[doom-module:+lsp]] flag on the appropriate module(s) (in +your ~doom!~ block in =$DOOMDIR/init.el=): +#+begin_src diff +:lang +-python ++(python +lsp) +#+end_src + +** LSP is slow +Follow [[https://emacs-lsp.github.io/lsp-mode/page/performance/#tuning][lsp-tuning-guide]] to further fine-tune LSP mode performance. + +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] + +* TODO Appendix +#+begin_quote + 🔨 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote diff --git a/dots/doom/.back.modules/tools/lsp2/autoload/common.el b/dots/doom/.back.modules/tools/lsp2/autoload/common.el new file mode 100755 index 0000000..d91f3d2 --- /dev/null +++ b/dots/doom/.back.modules/tools/lsp2/autoload/common.el @@ -0,0 +1,10 @@ +;;; tools/lsp/autoload/common.el -*- lexical-binding: t; -*- + +;;;###autodef (fset 'lsp! #'ignore) +(defun lsp! () + "Dispatch to call the currently used lsp client entrypoint" + (interactive) + (if (modulep! +eglot) + (eglot-ensure) + (unless (bound-and-true-p lsp-mode) + (lsp-deferred)))) diff --git a/dots/doom/.back.modules/tools/lsp2/autoload/eglot.el b/dots/doom/.back.modules/tools/lsp2/autoload/eglot.el new file mode 100755 index 0000000..7f23666 --- /dev/null +++ b/dots/doom/.back.modules/tools/lsp2/autoload/eglot.el @@ -0,0 +1,39 @@ +;;; tools/lsp/autoload/eglot.el -*- lexical-binding: t; -*- +;;;###if (modulep! +eglot) + +;;;###autodef +(defun set-eglot-client! (mode server-call) + "Add SERVER-CALL list as a possible lsp server for given major MODE. + +Example : (set-eglot-client! 'python-mode `(,(concat doom-data-dir \"lsp/mspyls/Microsoft.Python.LanguageServer\")))" + (after! eglot + (add-to-list 'eglot-server-programs `(,mode . ,server-call)))) + +;; HACK Eglot removed `eglot-help-at-point' in joaotavora/eglot@a044dec for a +;; more problematic approach of deferred to eldoc. Here, I've restored it. +;; Doom's lookup handlers try to open documentation in a separate window +;; (so they can be copied or kept open), but doing so with an eldoc buffer +;; is difficult because a) its contents are generated asynchronously, +;; making them tough to scrape, and b) their contents change frequently +;; (every time you move your cursor). +(defvar +eglot--help-buffer nil) +;;;###autoload +(defun +eglot-lookup-documentation (_identifier) + "Request documentation for the thing at point." + (eglot--dbind ((Hover) contents range) + (jsonrpc-request (eglot--current-server-or-lose) :textDocument/hover + (eglot--TextDocumentPositionParams)) + (let ((blurb (and (not (seq-empty-p contents)) + (eglot--hover-info contents range))) + (hint (thing-at-point 'symbol))) + (if blurb + (with-current-buffer + (or (and (buffer-live-p +eglot--help-buffer) + +eglot--help-buffer) + (setq +eglot--help-buffer (generate-new-buffer "*eglot-help*"))) + (with-help-window (current-buffer) + (rename-buffer (format "*eglot-help for %s*" hint)) + (with-current-buffer standard-output (insert blurb)) + (setq-local nobreak-char-display nil))) + (display-local-help)))) + 'deferred) diff --git a/dots/doom/.back.modules/tools/lsp2/autoload/flycheck-eglot.el b/dots/doom/.back.modules/tools/lsp2/autoload/flycheck-eglot.el new file mode 100755 index 0000000..c0568f5 --- /dev/null +++ b/dots/doom/.back.modules/tools/lsp2/autoload/flycheck-eglot.el @@ -0,0 +1,76 @@ +;;; flycheck-eglot --- Hacky eglot support in flycheck -*- lexical-binding: t; -*- +;;; Commentary: +;; This file sets up flycheck so that, when eglot receives a publishDiagnostics method +;; from the server, flycheck updates the reports. +;; +;; Thanks to: +;; - joaotavora for adding a handle to plug flycheck, and +;; - purcell for finding out the initial stub and the current implementation +;; +;; It works by creating a bridge function which can be used as the argument of +;; `eglot-flymake-backend', which both consumes diagnostics and queue a call to +;; 'flycheck-buffer' +;; +;;; Code: + +(defvar-local +lsp--flycheck-eglot--current-errors nil) + +(defun +lsp--flycheck-eglot-init (checker callback) + "CHECKER is the checker (eglot). +CALLBACK is the function that we need to call when we are done, on all the errors." + (eglot-flymake-backend #'+lsp--flycheck-eglot--on-diagnostics) + (funcall callback 'finished +lsp--flycheck-eglot--current-errors)) + +(defun +lsp--flycheck-eglot--on-diagnostics (diags &rest _) + (cl-labels + ((flymake-diag->flycheck-err + (diag) + (with-current-buffer (flymake--diag-buffer diag) + (flycheck-error-new-at-pos + (flymake--diag-beg diag) + (pcase (flymake--diag-type diag) + ('eglot-note 'info) + ('eglot-warning 'warning) + ('eglot-error 'error) + (_ (error "Unknown diagnostic type, %S" diag))) + (flymake--diag-text diag) + :end-pos (flymake--diag-end diag) + :checker 'eglot + :buffer (current-buffer) + :filename (buffer-file-name))))) + (setq +lsp--flycheck-eglot--current-errors + (mapcar #'flymake-diag->flycheck-err diags)) + ;; Call Flycheck to update the diagnostics annotations + (flycheck-buffer-deferred))) + +(defun +lsp--flycheck-eglot-available-p () + (bound-and-true-p eglot--managed-mode)) + +(flycheck-define-generic-checker 'eglot + "Report `eglot' diagnostics using `flycheck'." + :start #'+lsp--flycheck-eglot-init + :predicate #'+lsp--flycheck-eglot-available-p + :modes '(prog-mode text-mode)) + +(push 'eglot flycheck-checkers) + +(add-hook! 'eglot-managed-mode-hook + (defun +lsp-eglot-prefer-flycheck-h () + (when eglot--managed-mode + (flymake-mode -1) + (when-let ((current-checker (flycheck-get-checker-for-buffer))) + (unless (equal current-checker 'eglot) + (flycheck-add-next-checker 'eglot current-checker))) + (flycheck-add-mode 'eglot major-mode) + (flycheck-mode 1) + ;; Call flycheck on initilization to make sure to display initial + ;; errors + (flycheck-buffer-deferred)))) + +(after! flymake + (when (and + (not (fboundp 'flymake--diag-buffer)) + (fboundp 'flymake--diag-locus)) + (defalias 'flymake--diag-buffer 'flymake--diag-locus))) + +;;; flycheck-eglot.el ends here diff --git a/dots/doom/.back.modules/tools/lsp2/autoload/lsp-mode.el b/dots/doom/.back.modules/tools/lsp2/autoload/lsp-mode.el new file mode 100755 index 0000000..d769a26 --- /dev/null +++ b/dots/doom/.back.modules/tools/lsp2/autoload/lsp-mode.el @@ -0,0 +1,75 @@ +;;; tools/lsp/autoload/lsp-mode.el -*- lexical-binding: t; -*- +;;;###if (not (modulep! +eglot)) + +;;;###autodef +(defun set-lsp-priority! (client priority) + "Change the PRIORITY of lsp CLIENT." + (require 'lsp-mode) + (if-let (client (gethash client lsp-clients)) + (setf (lsp--client-priority client) + priority) + (error "No LSP client named %S" client))) + +;;;###autoload +(defun +lsp/uninstall-server (dir) + "Delete a LSP server from `lsp-server-install-dir'." + (interactive + (list (read-directory-name "Uninstall LSP server: " lsp-server-install-dir nil t))) + (unless (file-directory-p dir) + (user-error "Couldn't find %S directory" dir)) + (delete-directory dir 'recursive) + (message "Uninstalled %S" (file-name-nondirectory dir))) + +;;;###autoload +(defun +lsp/switch-client (client) + "Switch to another LSP server." + (interactive + (progn + (require 'lsp-mode) + (list (completing-read + "Select server: " + (or (mapcar #'lsp--client-server-id (lsp--filter-clients (-andfn #'lsp--supports-buffer? + #'lsp--server-binary-present?))) + (user-error "No available LSP clients for %S" major-mode)))))) + (require 'lsp-mode) + (let* ((client (if (symbolp client) client (intern client))) + (match (car (lsp--filter-clients (lambda (c) (eq (lsp--client-server-id c) client))))) + (workspaces (lsp-workspaces))) + (unless match + (user-error "Couldn't find an LSP client named %S" client)) + (let ((old-priority (lsp--client-priority match))) + (setf (lsp--client-priority match) 9999) + (unwind-protect + (if workspaces + (lsp-workspace-restart + (if (cdr workspaces) + (lsp--completing-read "Select server: " + workspaces + 'lsp--workspace-print + nil t) + (car workspaces))) + (lsp-mode +1)) + (add-transient-hook! 'lsp-after-initialize-hook + (setf (lsp--client-priority match) old-priority)))))) + +;;;###autoload +(defun +lsp-lookup-definition-handler () + "Find definition of the symbol at point using LSP." + (interactive) + (when-let (loc (lsp-request "textDocument/definition" + (lsp--text-document-position-params))) + (lsp-show-xrefs (lsp--locations-to-xref-items loc) nil nil) + 'deferred)) + +;;;###autoload +(defun +lsp-lookup-references-handler (&optional include-declaration) + "Find project-wide references of the symbol at point using LSP." + (interactive "P") + (when-let + (loc (lsp-request "textDocument/references" + (append (lsp--text-document-position-params) + (list + :context `(:includeDeclaration + ,(lsp-json-bool include-declaration)))))) + (lsp-show-xrefs (lsp--locations-to-xref-items loc) nil t) + 'deferred)) diff --git a/dots/doom/.back.modules/tools/lsp2/config.el b/dots/doom/.back.modules/tools/lsp2/config.el new file mode 100755 index 0000000..cc64003 --- /dev/null +++ b/dots/doom/.back.modules/tools/lsp2/config.el @@ -0,0 +1,47 @@ +;;; tools/lsp/config.el -*- lexical-binding: t; -*- + +(defvar +lsp-defer-shutdown 3 + "If non-nil, defer shutdown of LSP servers for this many seconds after last +workspace buffer is closed. + +This delay prevents premature server shutdown when a user still intends on +working on that project after closing the last buffer, or when programmatically +killing and opening many LSP/eglot-powered buffers.") + + +;; +;;; Common + +(defvar +lsp--default-read-process-output-max nil) +(defvar +lsp--default-gcmh-high-cons-threshold nil) +(defvar +lsp--optimization-init-p nil) + +(define-minor-mode +lsp-optimization-mode + "Deploys universal GC and IPC optimizations for `lsp-mode' and `eglot'." + :global t + :init-value nil + (if (not +lsp-optimization-mode) + (setq-default read-process-output-max +lsp--default-read-process-output-max + gcmh-high-cons-threshold +lsp--default-gcmh-high-cons-threshold + +lsp--optimization-init-p nil) + ;; Only apply these settings once! + (unless +lsp--optimization-init-p + (setq +lsp--default-read-process-output-max (default-value 'read-process-output-max) + +lsp--default-gcmh-high-cons-threshold (default-value 'gcmh-high-cons-threshold)) + (setq-default read-process-output-max (* 1024 1024)) + ;; REVIEW LSP causes a lot of allocations, with or without the native JSON + ;; library, so we up the GC threshold to stave off GC-induced + ;; slowdowns/freezes. Doom uses `gcmh' to enforce its GC strategy, + ;; so we modify its variables rather than `gc-cons-threshold' + ;; directly. + (setq-default gcmh-high-cons-threshold (* 2 +lsp--default-gcmh-high-cons-threshold)) + (gcmh-set-high-threshold) + (setq +lsp--optimization-init-p t)))) + + +;; +;;; Implementations + +(if (modulep! +eglot) + (load! "+eglot") + (load! "+lsp")) diff --git a/dots/doom/.back.modules/tools/lsp2/doctor.el b/dots/doom/.back.modules/tools/lsp2/doctor.el new file mode 100755 index 0000000..1739bfd --- /dev/null +++ b/dots/doom/.back.modules/tools/lsp2/doctor.el @@ -0,0 +1,9 @@ +;;; tools/lsp/doctor.el -*- lexical-binding: t; -*- + +(assert! (not (and (modulep! +eglot) + (modulep! +peek))) + "+eglot and +peek flags are not compatible. Peek uses lsp-mode, while Eglot is another package altogether for LSP.") + +(unless (executable-find "npm") + (warn! "Couldn't find npm, most server installers won't work and will have to be installed manually. +For more information, see https://emacs-lsp.github.io/lsp-mode/page/languages/.")) diff --git a/dots/doom/.back.modules/tools/lsp2/packages.el b/dots/doom/.back.modules/tools/lsp2/packages.el new file mode 100755 index 0000000..bcc0e81 --- /dev/null +++ b/dots/doom/.back.modules/tools/lsp2/packages.el @@ -0,0 +1,16 @@ +;; -*- no-byte-compile: t; -*- +;;; tools/lsp/packages.el + +(if (modulep! +eglot) + (progn + (package! eglot :pin "e501275e06952889056268dabe08ccd0dbaf23e5") + (when (modulep! :completion vertico) + (package! consult-eglot :pin "0da8801dd8435160ce1f62ad8066bd52e38f5cbd"))) + (package! lsp-mode :pin "a3b3c15359405f442fc51a2db09e503ca3b39f3d") + (package! lsp-ui :pin "3cd7cc61273341023b863dcf45906ac9142fd1aa") + (when (modulep! :completion ivy) + (package! lsp-ivy :pin "9ecf4dd9b1207109802bd1882aa621eb1c385106")) + (when (modulep! :completion helm) + (package! helm-lsp :pin "c2c6974dadfac459b1a69a1217441283874cea92")) + (when (modulep! :completion vertico) + (package! consult-lsp :pin "58b541476203fa68e9e7682531f2a10e11780857"))) diff --git a/dots/doom/asm-ref.pdf b/dots/doom/asm-ref.pdf new file mode 100755 index 0000000..90fc407 Binary files /dev/null and b/dots/doom/asm-ref.pdf differ diff --git a/dots/doom/config.el b/dots/doom/config.el new file mode 100755 index 0000000..7dc851b --- /dev/null +++ b/dots/doom/config.el @@ -0,0 +1,255 @@ +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- + +;; Place your private configuration here! Remember, you do not need to run 'doom +;; sync' after modifying this file! + + +;; Some functionality uses this to identify you, e.g. GPG configuration, email +;; clients, file templates and snippets. +(setq user-full-name "Zastian Pretorius" + user-mail-address "Zastian00@gmail.com") + +;; Doom exposes five (optional) variables for controlling fonts in Doom. Here +;; are the three important ones: +;; +;; + `doom-font' +;; + `doom-variable-pitch-font' +;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. +;; +;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd +;; font string. You generally only need these two: +;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light) +;; doom-variable-pitch-font (font-spec :family "sans" :size 13)) + +;; There are two ways to load a theme. Both assume the theme is installed and +;; available. You can either set `doom-theme' or manually load a theme with the +;; `load-theme' function. This is the default: +;;(add-to-list 'load-path "~/.config/doom/themes") +(setq doom-theme 'doom-dracula) + + + +;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! +(setq org-directory "~/org/") + + +(add-to-list 'load-path "~/.config/doom/lisp") + + +;; This determines the style of line numbers in effect. If set to `nil', line +;; numbers are disabled. For relative line numbers, set this to `relative'. +(setq display-line-numbers-type `relative) + +;; scroll one line at a time (less "jumpy" than defaults) +(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;; one line at a time +(setq mouse-wheel-progressive-speed nil) ;; don't accelerate scrolling +(setq mouse-wheel-follow-mouse 't) ;; scroll window under mouse +(setq scroll-step 1) ;; keyboard scroll one line at a time +(setq auto-window-vscroll nil) + +(set-fontset-font "fontset-default" nil (font-spec :size 17 :name "ZedMono Nerd Font")) + +(setq doom-font (font-spec :family "Illusion Z" :size 17) + doom-variable-pitch-font (font-spec :family "Illusion Z" :size 17) + doom-big-font (font-spec :family "Illusion Z" :size 24)) + +(require 'whitespace) +(setq whitespace-line-column 99) +(setq whitespace-style '(face lines-tail)) +(add-hook 'prog-mode-hook 'whitespace-mode) + +(require 'fill-column-indicator) +(setq fci-rule-column 99) +(setq fci-rule-width 1) +(setq fci-rule-color "#a280d5") +(add-hook 'prog-mode-hook 'fci-mode) + +;; tab width +(setq-default tab-width 4) ;; Set tab width to 2 spaces +(setq-default indent-tabs-mode nil) ;; Use spaces instead of tabs +(add-hook 'prog-mode-hook + (lambda () + (setq-local tab-width 4) + (setq-local indent-tabs-mode nil))) +(setq lisp-indent-offset 4) +(use-package nix-mode + :mode "\\.nix\\'" + :config + (setq nix-indent-function (lambda (_) 4))) + +(setq rust-indent-offset 4) + + + + + +(custom-set-faces + '(org-level-1 ((t (:inherit outline-1 :height 1.4)))) + '(org-level-2 ((t (:inherit outline-2 :height 1.3)))) + '(org-level-3 ((t (:inherit outline-3 :height 1.2)))) + '(org-level-4 ((t (:inherit outline-4 :height 1.1)))) + '(org-level-5 ((t (:inherit outline-5 :height 1.0))))) + + +;; company mode delay 0 +(setq company-idle-delay 0) + + + + +;;japanese stuff +(setq default-input-method "japanese") + + + +(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-shortmenu) +(remove-hook '+doom-dashboard-functions #'doom-dashboard-widget-footer) +(add-hook! '+doom-dashboard-functions :append + (insert "\n" (+doom-dashboard--center +doom-dashboard--width "The UwU Editor"))) + +;; +;; +;; +(setq org-image-actual-width 300) + +(setq fancy-splash-image (concat doom-user-dir "xenia.png")) + +(setq ess-r--no-company-meta t) + +(set-frame-parameter nil 'alpha-background 90) ; For current frame +(add-to-list 'default-frame-alist '(alpha-background . 90)) ; For all new frames henceforth +(add-to-list 'default-frame-alist '(undecorated . t)) + + + + ;undo fix +(setq undo-tree-enable-undo-in-region nil) +(setq undo-limit 8000000000) + + +(org-babel-do-load-languages + 'org-babel-load-languages + '((emacs-lisp . t) + (julia . t) + (python . t) + (jupyter . t))) + +;; accept completion from copilot and fallback to company +(defun my-tab () + (interactive) + (or (copilot-accept-completion) + (company-indent-or-complete-common nil))) + + +(use-package! copilot + :hook (prog-mode . copilot-mode) + :bind (("C-TAB" . 'copilot-accept-completion-by-word) + ("C-" . 'copilot-accept-completion-by-word) + :map company-active-map + ("" . 'my-tab) + ("TAB" . 'my-tab) + :map company-mode-map + ("" . 'my-tab) + ("TAB" . 'my-tab))) +(setq copilot-log-max 1000) + +;; asm stuff +(use-package! nasm-mode + :mode "\\.[n]*\\(asm\\|s\\)\\'") + +;; Get Haxor VM from https://github.com/krzysztof-magosa/haxor +(use-package! haxor-mode + :mode "\\.hax\\'") + +(use-package! mips-mode + :mode "\\.mips\\'") + +(use-package! riscv-mode + :mode "\\.riscv\\'") + +(use-package x86-lookup + :ensure t + :config + (setq x86-lookup-pdf "~/.config/doom/asm-ref.pdf")) + +(setq openai-key (getenv "OPENAIKEY")) +(setq chatgpt-input-method 'minibuffer) + + + +;;discord rich presence +;;(require 'elcord) +;;(add-hook 'doom-switch-buffer-hook +;; (lambda () +;; (if (string= (buffer-name) "*doom*") +;; (elcord-mode -1) +;; (elcord-mode 1)))) +;; +;;(defun elcord--disable-elcord-if-no-frames (f) +;; (declare (ignore f)) +;; (when (let ((frames (delete f (visible-frame-list)))) +;; (or (null frames) +;; (and (null (cdr frames)) +;; (eq (car frames) terminal-frame)))) +;; (elcord-mode -1) +;; (add-hook 'after-make-frame-functions 'elcord--enable-on-frame-created))) +;; +;;(defun elcord--enable-on-frame-created (f) +;; (declare (ignore f)) +;; (elcord-mode +1)) +;; +;;(defun my/elcord-mode-hook () +;; (if elcord-mode +;; (add-hook 'delete-frame-functions 'elcord--disable-elcord-if-no-frames) +;; (remove-hook 'delete-frame-functions 'elcord--disable-elcord-if-no-frames))) +;; +;;(add-hook 'elcord-mode-hook 'my/elcord-mode-hook) +;; +;;(setq elcord-idle-message "Out doing your mom") + + +;; add my_stuff.el here and load it +(load! "my_stuff.el") + + +;;ollama stuff +;; +(use-package ellama + :init + ;; setup key bindings + (setopt ellama-keymap-prefix "C-c e") + ;; language you want ellama to translate to + (setopt ellama-language "English") + ;; could be llm-openai for example + (require 'llm-ollama) + (setopt ellama-provider + (make-llm-ollama + ;; this model should be pulled to use it + ;; value should be the same as you print in terminal during pull + :chat-model "codellama:13b" + :embedding-model "codellama:13b")) + ) + + +;; custom functions + + + +;; Here are some additional functions/macros that could help you configure Doom: +;; +;; - `load!' for loading external *.el files relative to this one +;; - `use-package!' for configuring packages +;; - `after!' for running code after a package has loaded +;; - `add-load-path!' for adding directories to the `load-path', relative to +;; this file. Emacs searches the `load-path' when you load packages with +;; `require' or `use-package'. +;; - `map!' for binding new keys +;; +;; To get information about any of these functions/macros, move the cursor over +;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). +;; This will open documentation for it, including demos of how they are used. +;; +;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how +;; they are implemented. diff --git a/dots/doom/custom.el b/dots/doom/custom.el new file mode 100755 index 0000000..9d2702c --- /dev/null +++ b/dots/doom/custom.el @@ -0,0 +1,24 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(elfeed-feeds '("https://www.reddit.com/r/pcmasterrace/rss")) + '(warning-suppress-log-types '((initialization))) + '(warning-suppress-types + '((lsp-mode) + (lsp-mode) + (lsp-mode) + (lsp-mode) + (initialization) + (initialization)))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(org-level-1 ((t (:inherit outline-1 :height 1.4)))) + '(org-level-2 ((t (:inherit outline-2 :height 1.3)))) + '(org-level-3 ((t (:inherit outline-3 :height 1.2)))) + '(org-level-4 ((t (:inherit outline-4 :height 1.1)))) + '(org-level-5 ((t (:inherit outline-5 :height 1.0))))) diff --git a/dots/doom/init.el b/dots/doom/init.el new file mode 100755 index 0000000..8c112db --- /dev/null +++ b/dots/doom/init.el @@ -0,0 +1,192 @@ +;;; init.el -*- lexical-binding: t; -*- + +;; This file controls what Doom modules are enabled and what order they load +;; in. Remember to run 'doom sync' after modifying it! + +;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's +;; documentation. There you'll find a "Module Index" link where you'll find +;; a comprehensive list of Doom's modules and what flags they support. + +;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or +;; 'C-c c k' for non-vim users) to view its documentation. This works on +;; flags as well (those symbols that start with a plus). +;; +;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its +;; directory (for easy access to its source code). + +(doom! :input + ;;chinese + japanese + ;;layout ; auie,ctsrnm is the superior home row + + :completion + ;;(corfu +icons +orderless) ; the even more ultimate completion backend + (company +icons +childframe) ; the ultimate code completion backend + ;;(helm +fuzzy) ; the *other* search engine for love and life + ;;ido ; the other *other* search engine... + ;;(ivy +fuzzy) ; a search engine for love and life + (vertico +icons) ; the search engine of the future + + :ui + ;;deft ; notational velocity for Emacs + doom ; what makes DOOM look the way it does + doom-dashboard ; a nifty splash screen for Emacs + doom-quit ; DOOM quit-message prompts when you quit Emacs + (emoji +unicode) ; 🙂 + hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW + ;;hydra + indent-guides ; highlighted indent columns + ;;(ligatures +hasklig) ; ligatures and symbols to make your code pretty again + minimap ; show a map of the code on the side + modeline ; snazzy, Atom-inspired modeline, plus API + nav-flash ; blink cursor line after big motions + ;;neotree ; a project drawer, like NERDTree for vim + ophints ; highlight the region an operation acts on + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;tabs ; a tab bar for Emacs + treemacs ; a project drawer, like neotree but cooler + unicode ; extended unicode support for various languages + vc-gutter ; vcs diff in the fringe + vi-tilde-fringe ; fringe tildes to mark beyond EOB + ;;window-select ; visually switch windows + workspaces ; tab emulation, persistence & separate workspaces + ;;zen ; distraction-free coding or writing + + :editor + (evil +everywhere); come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding + (format +onsave) ; automated prettiness + ;;god ; run Emacs commands without modifier keys + ;;lispy ; vim for lisp, for people who don't like vim + ;;multiple-cursors ; editing in many places at once + ;;objed ; text object editing for the innocent + ;;parinfer ; turn lisp into python, sort of + ;;rotate-text ; cycle region at point between text candidates + snippets ; my elves. They type so I don't have to + ;;word-wrap ; soft wrapping with language-aware indent + + :emacs + (dired +icons) ; making dired pretty [functional] + electric ; smarter, keyword-based electric-indent + ;;ibuffer ; interactive buffer management + undo ; persistent, smarter undo for your inevitable mistakes + vc ; version-control and Emacs, sitting in a tree + + :term + ;;eshell ; the elisp shell that works everywhere + ;;shell ; simple shell REPL for Emacs + ;;term ; basic terminal emulator for Emacs + vterm ; the best terminal emulation in Emacs + + :checkers + syntax ; tasing you for every semicolon you forget + (spell +flyspell) ; tasing you for misspelling mispelling + grammar ; tasing grammar mistake every you make + + :tools + ;;ansible + collab + debugger ; FIXME stepping through code, to help you add bugs + direnv + ;;docker + ;;editorconfig ; let someone else argue about tabs vs spaces + ein ; tame Jupyter notebooks with emacs + ;;biblio ; Writes a PhD for you (citation needed) + (eval +overlay) ; run code, run (also, repls) + ;;gist ; interacting with github gists + lookup ; navigate your code and its documentation + lsp ; M-x vscode + ;;lsp2 ; my custom one + magit ; a git porcelain for Emacs + ;;make ; run make tasks from Emacs + ;;pass ; password manager for nerds + pdf ; pdf enhancements + ;;prodigy ; FIXME managing external services & code builders + ;;rgb ; creating color strings + ;;taskrunner ; taskrunner for all your projects + ;;terraform ; infrastructure as code + ;;tmux ; an API for interacting with tmux + ;;upload ; map local to remote projects via ssh/ftp + + :os + (:if IS-MAC macos) ; improve compatibility with macOS + ;;tty ; improve the terminal Emacs experience + + :lang + ;;agda ; types of types of types of types... + ;;beancount ; mind the GAAP + (cc +lsp) ; C > C++ == 1 + ;;clojure ; java with a lisp + common-lisp ; if you've seen one lisp, you've seen them all + ;;coq ; proofs-as-programs + ;;crystal ; ruby at the speed of c + (csharp +lsp) ; unity, .NET, and mono shenanigans + ;;data ; config/data formats + ;;(dart +flutter) ; paint ui and not much else + ;;dhall + ;;elixir ; erlang done right + ;;elm ; care for a cup of TEA? + emacs-lisp ; drown in parentheses + ;;erlang ; an elegant language for a more civilized age + ;;ess ; emacs speaks statistics + ;;factor + ;;faust ; dsp, but you get to keep your soul + ;;fsharp ; ML stands for Microsoft's Language + ;;fstar ; (dependent) types and (monadic) effects and Z3 + (gdscript +lsp) ; the language you waited for + (go +lsp) ; the hipster dialect + (haskell +lsp) ; a language that's lazier than I am + ;;hy ; readability of scheme w/ speed of python + ;;idris ; a language you can depend on + ;;json ; At least it ain't XML + (java +lsp) ; the poster child for carpal tunnel syndrome + ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) + ;;julia ; a better, faster MATLAB + kotlin ; a better, slicker Java(Script) + latex ; writing papers in Emacs has never been so fun + ;;lean ; for folks with too much to prove + ;;ledger ; be audit you can be + lua ; one-based indices? one-based indices + markdown ; writing docs for people to ignore + ;;nim ; python + lisp at the speed of c + (nix +lsp) ; I hereby declare "nix geht mehr!" + ;;ocaml ; an objective camel + (org +lsp) ; organize your plain life in plain text + ;;php ; perl's insecure younger brother + ;;plantuml ; diagrams for confusing people more + ;;purescript ; javascript, but functional + (python +lsp) ; beautiful is better than ugly + qt ; the 'cutest' gui framework ever + ;;racket ; a DSL for DSLs + ;;raku ; the artist formerly known as perl6 + ;;rest ; Emacs as a REST client + ;;rst ; ReST in peace + ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + ;;scala ; java, but good + ;;(scheme +guile) ; a fully conniving family of lisps + sh ; she sells {ba,z,fi}sh shells on the C xor + ;;sml + ;;solidity ; do you need a blockchain? No. + ;;swift ; who asked for emoji variables? + ;;terra ; Earth and Moon in alignment for performance. + ;;web ; the tubes + ;;yaml ; JSON, but readable + ;;zig ; C, but simpler + :email + ;;(mu4e +org +gmail) + ;;notmuch + ;;(wanderlust +gmail) + + :app + ;;calendar + ;;emms + ;;everywhere ; *leave* Emacs!? You must be joking + ;;irc ; how neckbeards socialize + (rss +org) ; emacs as an RSS reader + ;;twitter ; twitter client https://twitter.com/vnought + + :config + ;;literate + (default +bindings +smartparens)) diff --git a/dots/doom/lisp/ollama.el b/dots/doom/lisp/ollama.el new file mode 100755 index 0000000..bbed3eb --- /dev/null +++ b/dots/doom/lisp/ollama.el @@ -0,0 +1,112 @@ +;;; ollama.el --- ollama client for Emacs + +;; Copyright (C) 2023 ZHOU Feng + +;; Author: ZHOU Feng +;; URL: http://github.com/zweifisch/ollama +;; Keywords: ollama llama2 +;; Version: 0.0.1 +;; Created: 6th Aug 2023 + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: +;; +;; ollama client for Emacs +;; + +;;; Code: +(require 'json) +(require 'cl-lib) +(require 'url) + +(defgroup ollama nil + "Ollama client for Emacs." + :group 'ollama) + +(defcustom ollama:endpoint "http://localhost:11434/api/generate" + "Ollama http service endpoint." + :group 'ollama + :type 'string) + +(defcustom ollama:model "codellama:13b" + "Ollama model." + :group 'ollama + :type 'string) + +(defcustom ollama:language "English" + "Language to translate to." + :group 'ollama + :type 'string) + +(defun ollama-fetch (url prompt model) + (let* ((url-request-method "POST") + (url-request-extra-headers + '(("Content-Type" . "application/json"))) + (url-request-data + (encode-coding-string + (json-encode `((model . ,model) (prompt . ,prompt))) + 'utf-8))) + (with-current-buffer (url-retrieve-synchronously url) + (goto-char url-http-end-of-headers) + (decode-coding-string + (buffer-substring-no-properties + (point) + (point-max)) + 'utf-8)))) + +(defun ollama-get-response-from-line (line) + (cdr + (assoc 'response + (json-read-from-string line)))) + +(defun ollama-prompt (url prompt model) + (mapconcat 'ollama-get-response-from-line + (cl-remove-if #'(lambda (str) (string= str "")) + (split-string (ollama-fetch url prompt model) "\n")) "")) + +;;;###autoload +(defun ollama-prompt-line () + "Prompt with current word." + (interactive) + (with-output-to-temp-buffer "*ollama*" + (princ + (ollama-prompt ollama:endpoint (thing-at-point 'line) ollama:model)))) + +;;;###autoload +(defun ollama-define-word () + "Find definition of current word." + (interactive) + (with-output-to-temp-buffer "*ollama*" + (princ + (ollama-prompt ollama:endpoint (format "define %s" (thing-at-point 'word)) ollama:model)))) + +;;;###autoload +(defun ollama-translate-word () + "Translate current word." + (interactive) + (with-output-to-temp-buffer "*ollama*" + (princ + (ollama-prompt ollama:endpoint (format "translate \"%s\" to %s" (thing-at-point 'word) ollama:language) ollama:model)))) + +;;;###autoload +(defun ollama-summarize-region () + "Summarize marked text." + (interactive) + (with-output-to-temp-buffer "*ollama*" + (princ + (ollama-prompt ollama:endpoint (format "summarize \"\"\"%s\"\"\"" (buffer-substring (region-beginning) (region-end))) ollama:model)))) + +(provide 'ollama) +;;; ollama.el ends here diff --git a/dots/doom/lisp/oxycarbon.el b/dots/doom/lisp/oxycarbon.el new file mode 100755 index 0000000..e5bc3f5 --- /dev/null +++ b/dots/doom/lisp/oxycarbon.el @@ -0,0 +1,111 @@ + +(autothemer-deftheme oxocarbon "A port of oxocarbon" + + ;; Specify the color classes used by the theme + ((((class color) (min-colors #xFFFFFF)) + ((class color) (min-colors #xFF))) + + ;; Specify the color palette, color columns correspond to each of the classes above. + (oxocarbon-bg "#161616") + (oxocarbon-fg "#f2f4f8") + + (oxocarbon-base00 "#161616") + (oxocarbon-base01 "#262626") + (oxocarbon-base02 "#393939") + (oxocarbon-base03 "#525252") + + (oxocarbon-base04 "#dde1e6") + (oxocarbon-base05 "#f2f4f8") + (oxocarbon-base06 "#ffffff") + (oxocarbon-base07 "#08bdba") + (oxocarbon-base08 "#3ddbd9") + (oxocarbon-base09 "#78a9ff") + (oxocarbon-base10 "#ee5396") + (oxocarbon-base11 "#33b1ff") + (oxocarbon-base12 "#ff7eb6") + (oxocarbon-base13 "#42be65") + (oxocarbon-base14 "#be95ff") + (oxocarbon-base15 "#82cfff")) + + ;; Specifications for Emacs faces. + ;; Simpler than deftheme, just specify a face name and + ;; a plist of face definitions (nested for :underline, :box etc.) + ( + (default (:foreground oxocarbon-fg :background oxocarbon-bg)) ;; background and foreground + (button (:foreground oxocarbon-fg :background oxocarbon-base01)) + ;; (counsel--mark-ring-highlight) + + ;; Programming ;; + (font-lock-string-face (:foreground oxocarbon-base14)) ;; strings + (font-lock-keyword-face (:foreground oxocarbon-base09)) ;; keywords + (font-lock-type-face (:foreground oxocarbon-base09)) ;; variable types + (font-lock-variable-name-face (:foreground oxocarbon-base04)) ;; variable names + (font-lock-comment-face (:foreground oxocarbon-base03)) ;; comments + (font-lock-builtin-face (:foreground oxocarbon-base12)) ;; builtin functions + (font-lock-constant-face (:foreground oxocarbon-base14)) ;; constants + (font-lock-function-name-face (:foreground oxocarbon-base08)) ;; function names + (font-lock-preprocessor-face (:foreground oxocarbon-base09)) + (font-lock-doc-face (:foreground oxocarbon-base14)) + + (corfu-current (:background oxocarbon-base02 :foreground oxocarbon-base08)) + + ;; END ;; + + ;; General ;; + (error (:foreground oxocarbon-base10)) + (warning (:foreground oxocarbon-base13)) + ;; END ;; + + ;; UI ;; + (region (:background oxocarbon-base02)) ;; selction background + (highlight (:background oxocarbon-base02)) ;; highlight when hovering over a link etc. + + (mode-line (:foreground oxocarbon-fg :background oxocarbon-bg)) ;; modeline + (mode-line-inactive (:foreground oxocarbon-fg :background oxocarbon-bg)) + + (line-number-current-line (:foreground oxocarbon-base04 :background oxocarbon-base00)) ;; the current line num + (line-number (:foreground oxocarbon-base02)) ;; line numbers + + ;; parens + (show-paren-match (:background oxocarbon-base02)) ;; matching parens + (show-paren-mismatch (:background oxocarbon-base11)) ;; mismatching parens + + ;; isearch + (isearch-fail (:background oxocarbon-base10)) + + ;; ivy + (ivy-current-match (:background oxocarbon-base02 :foreground oxocarbon-base08)) + (ivy-minibuffer-match-face-1 (:foreground oxocarbon-base08)) + (ivy-minibuffer-match-face-2 (:foreground oxocarbon-base08)) + (ivy-minibuffer-match-face-3 (:foreground oxocarbon-base08)) + (ivy-minibuffer-match-face-4 (:foreground oxocarbon-base08)) + ;; END ;; + + + ) + + + ;; (custom-theme-set-variables 'oxocarbon + ;; `(ansi-color-names-vector [ + ;; ,oxocarbon-base00 + ;; ,oxocarbon-base01 + ;; ,oxocarbon-base02 + ;; ,oxocarbon-base03 + ;; ,oxocarbon-base04 + ;; ,oxocarbon-base05 + ;; ,oxocarbon-base06 + ;; ,oxocarbon-base07 + ;; ,oxocarbon-base08 + ;; ,oxocarbon-base09 + ;; ,oxocarbon-base10 + ;; ,oxocarbon-base11 + ;; ,oxocarbon-base12 + ;; ,oxocarbon-base13 + ;; ,oxocarbon-base14 + ;; ,oxocarbon-base15 + ;; ])) + + + ) + +(provide-theme 'oxocarbon) ;; theme ends here diff --git a/dots/doom/lisp/programs.el b/dots/doom/lisp/programs.el new file mode 100755 index 0000000..ac3f660 --- /dev/null +++ b/dots/doom/lisp/programs.el @@ -0,0 +1,9 @@ +;;; ../../dotfiles/doom/.config/doom/lisp/programs.el -*- lexical-binding: t; -*- + +;; make a function to run a program with a given name and arguments +(defun run-program (name &rest args) + (interactive) + (let ((program (executable-find name))) + (if program + (apply #'start-process name nil program args) + (error "Could not find program %s" name)))) diff --git a/dots/doom/lisp/test.el b/dots/doom/lisp/test.el new file mode 100755 index 0000000..e69de29 diff --git a/dots/doom/my_stuff.el b/dots/doom/my_stuff.el new file mode 100755 index 0000000..51c355a --- /dev/null +++ b/dots/doom/my_stuff.el @@ -0,0 +1,129 @@ +;;; ../../dotfiles/doom/.config/doom/my_stuff.el -*- lexical-binding: t; -*- + +(defun emenu () + "List all executable programs in the PATH environment variable and open the selected one. + Any text entered after the program name (separated by a space) is taken as arguments to the program." + (interactive) + (let* ((path-dirs (delete-dups (split-string (getenv "PATH") path-separator))) + (executables (apply #'append + (mapcar #'(lambda (dir) + (when (file-directory-p dir) + (mapcar #'file-name-nondirectory + (directory-files dir t ".+" + 'nosort)))) + path-dirs))) + (buf (generate-new-buffer "Programs"))) + (with-current-buffer buf + (insert (mapconcat 'identity executables "\n"))) + (let* ((program (completing-read "Program: " executables)) + (args (if (string-match (concat "^" program " ") (buffer-substring-no-properties + (line-beginning-position) + (line-end-position))) + (substring-no-properties (buffer-substring-no-properties + (line-beginning-position) + (line-end-position)) (length program) nil) + nil)) + (program-args (if args (concat program " " args) program))) + (when program + (start-process-shell-command program nil program-args) + (kill-buffer buf))))) +(map! :leader + :desc "Emenu" "d e" #'emenu) + + +;; open pdfs scaled in zathura +(defun open-pdf-with-zathura () + (interactive) + (start-process "zathura" nil "zathura" (buffer-file-name))) + +(add-hook 'pdf-view-mode-hook + (lambda () + (open-pdf-with-zathura) + (kill-buffer))) + +;; open images in imv +(defun open-image-with-imv () + "Open the current image file with imv, then kill the current buffer and +open a dired buffer in the directory of the image file." + (interactive) + (let* ((current-file (buffer-file-name)) + (directory (file-name-directory current-file)) + (all-files (directory-files directory nil "\\(png\\|jpg\\|jpeg\\|gif\\|bmp\\)$")) + (selected-file (file-relative-name current-file directory)) + (selected-index (cl-position selected-file all-files :test #'equal)) + (sorted-files (append (nthcdr selected-index all-files) + (butlast all-files (- (length all-files) selected-index))))) + (apply 'start-process "imv" nil "imv" sorted-files)) + (let ((image-dir (when buffer-file-name (file-name-directory buffer-file-name)))) + (kill-buffer) + (when image-dir + (cd image-dir) + (dired image-dir)))) + +(add-hook 'image-mode-hook + (lambda () + (open-image-with-imv))) + + +;;(add-hook 'doom-switch-buffer-hook +;; (lambda () +;; (if (string= (buffer-name) "*doom*") +;; (elcord-mode -1) +;; (elcord-mode 1)))) + +;; search forwards for link and copy the link under point to the clipboard withouth external dependencies +(defun elfeed-copy-image () + "Copy the URL of the image under point to the clipboard." + (interactive) + (or (search-forward "link" nil t) + (search-backward "link" nil t)) + (let ((url (get-text-property (point) 'shr-url))) + (if url + (progn + (message (concat "Copying image URL to clipboard: " url)) + (kill-new url) + (message "Copied image URL to clipboard.")) + (message "No image under point.")))) +;;bind the function to a key spc i c +(map! :leader + :desc "Copy image URL to clipboard" "i c" #'elfeed-copy-image) + + +(defun open-video-with-mpv () + "Open the current video file with mpv, then kill the current buffer and +open a dired buffer in the directory of the video file." + (interactive) + (setq large-file-warning-threshold nil) ; disable threshold + (let ((current-file (buffer-file-name))) + (start-process "mpv" nil "mpv" current-file)) + (let ((video-dir (when buffer-file-name (file-name-directory buffer-file-name)))) + (kill-buffer) + (when video-dir + (cd video-dir) + (dired video-dir)))) + +(add-hook 'find-file-hook + (lambda () + (when (and buffer-file-name + (string-match-p "\\(mp4\\|avi\\|mkv\\|webm\\|flv\\|mov\\|wmv\\)$" buffer-file-name)) + (open-video-with-mpv)))) + + +(defun open-audio-with-mpv () + "Open the current audio file with mpv, then kill the current buffer and +open a dired buffer in the directory of the audio file." + (interactive) + (setq large-file-warning-threshold nil) ; disable threshold + (let ((current-file (buffer-file-name))) + (start-process "mpv" nil "mpv" "--no-video" current-file)) + (let ((audio-dir (when buffer-file-name (file-name-directory buffer-file-name)))) + (kill-buffer) + (when audio-dir + (cd audio-dir) + (dired audio-dir)))) + +(add-hook 'find-file-hook + (lambda () + (when (and buffer-file-name + (string-match-p "\\(mp3\\|flac\\|wav\\|aac\\|ogg\\|m4b\\)$" buffer-file-name)) + (open-audio-with-mpv)))) diff --git a/dots/doom/packages.el b/dots/doom/packages.el new file mode 100755 index 0000000..939679d --- /dev/null +++ b/dots/doom/packages.el @@ -0,0 +1,78 @@ +;; -*- no-byte-compile: t; -*- +;;; $DOOMDIR/packages.el + +;; To install a package with Doom you must declare them here and run 'doom sync' +;; on the command line, then restart Emacs for the changes to take effect -- or +;; use 'M-x doom/reload'. + + +;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: + ;(package! some-package) + +;; To install a package directly from a remote git repo, you must specify a +;; `:recipe'. You'll find documentation on what `:recipe' accepts here: +;; https://github.com/raxod502/straight.el#the-recipe-format + ;(package! another-package + ; :recipe (:host github :repo "username/repo")) + +;; If the package you are trying to install does not contain a PACKAGENAME.el +;; file, or is located in a subdirectory of the repo, you'll need to specify +;; `:files' in the `:recipe': + ;(package! this-package + ; :recipe (:host github :repo "username/repo" + ; :files ("some-file.el" "src/lisp/*.el"))) + +;; If you'd like to disable a package included with Doom, you can do so here +;; with the `:disable' property: + ;(package! builtin-package :disable t) + +;; You can override the recipe of a built in package without having to specify +;; all the properties for `:recipe'. These will inherit the rest of its recipe +;; from Doom or MELPA/ELPA/Emacsmirror: + ;(package! builtin-package :recipe (:nonrecursive t)) + ;(package! builtin-package-2 :recipe (:repo "myfork/package")) + +;; Specify a `:branch' to install a package from a particular branch or tag. +;; This is required for some packages whose default branch isn't 'master' (which +;; our package manager can't deal with; see raxod502/straight.el#279) + ;(package! builtin-package :recipe (:branch "develop")) + +;; Use `:pin' to specify a particular commit to install. + ;(package! builtin-package :pin "1a2b3c4d5e") + + +;; Doom's packages are pinned to a specific commit and updated from release to +;; release. The `unpin!' macro allows you to unpin single packages... + ;(unpin! pinned-package) +;; ...or multiple packages + ;(unpin! pinned-package another-pinned-package) +;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) + ;(unpin! t) +(package! catppuccin-theme) +;;(package! elcord) +(package! fill-column-indicator) +(package! rainbow-mode) +(package! poly-org) +(package! ein) +(package! copilot + :recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist"))) +;;(package! codeium +;; :recipe (:host github :repo "Exafunction/codeium.el" :files ("*.el"))) + +(package! ellama) +(package! highlight-indent-guides) +(package! yuck-mode) +(package! openai + :recipe (:host github :repo "emacs-openai/openai" :files ("*.el"))) +(package! chatgpt + :recipe (:host github :repo "mrfluffy-dev/chatgpt" :files ("*.el"))) + +(package! nasm-mode :pin "65ca6546fc395711fac5b3b4299e76c2303d43a8") +(package! haxor-mode :pin "6fa25a8e6b6a59481bc0354c2fe1e0ed53cbdc91") +(package! mips-mode :pin "98795cdc81979821ac35d9f94ce354cd99780c67") +(package! riscv-mode :pin "8e335b9c93de93ed8dd063d702b0f5ad48eef6d7") +(package! x86-lookup :pin "1573d61cc4457737b94624598a891c837fb52c16") +(package! package-lint :pin "21edc6d0d0eadd2d0a537f422fb9b7b8a3ae6991") + + +;;(package! jupyter) diff --git a/dots/doom/themes/doom-hardcore-theme.el b/dots/doom/themes/doom-hardcore-theme.el new file mode 100755 index 0000000..77c42e4 --- /dev/null +++ b/dots/doom/themes/doom-hardcore-theme.el @@ -0,0 +1,120 @@ +;;; doom-hardcore-theme.el --- inspired by the Hardcore theme -*- lexical-binding: t; no-byte-compile: t; -*- +;; +;; Added: February 23, 2025 +;; Author: Your Name +;; Maintainer: Your Name +;; Source: Hardcore Theme +;; +;;; Commentary: +;;; Code: + +(require 'doom-themes) + +;; +;;; Variables + +(defgroup doom-hardcore-theme nil + "Options for the `doom-hardcore' theme." + :group 'doom-themes) + +(defcustom doom-hardcore-brighter-modeline nil + "If non-nil, more vivid colors will be used to style the mode-line." + :group 'doom-hardcore-theme + :type 'boolean) + +(defcustom doom-hardcore-brighter-comments nil + "If non-nil, comments will be highlighted in more vivid colors." + :group 'doom-hardcore-theme + :type 'boolean) + +(defcustom doom-hardcore-colorful-headers nil + "If non-nil, headers in org-mode will be more colorful." + :group 'doom-hardcore-theme + :type 'boolean) + +(defcustom doom-hardcore-comment-bg doom-hardcore-brighter-comments + "If non-nil, comments will have a subtle, darker background." + :group 'doom-hardcore-theme + :type 'boolean) + +(defcustom doom-hardcore-padded-modeline doom-themes-padded-modeline + "If non-nil, adds a 4px padding to the mode-line. Can be an integer." + :group 'doom-hardcore-theme + :type '(choice integer boolean)) + +;; +;;; Theme definition + +(def-doom-theme doom-hardcore + "A dark theme based on the Hardcore theme." + + ;; name default 256 16 + ((bg '("#141414" "#121212" "black" )) + (bg-alt '("#141414" "#0d0d0d" "black" )) + (base0 '("#0f0f0f" "#0a0a0a" "black" )) + (base1 '("#191919" "#161616" "brightblack" )) + (base2 '("#242424" "#202020" "brightblack" )) + (base3 '("#303030" "#282828" "brightblack" )) + (base4 '("#3c3c3c" "#363636" "brightblack" )) + (base5 '("#4e4e4e" "#484848" "brightblack" )) + (base6 '("#8c8c8c" "#888888" "brightblack" )) + (base7 '("#b2b2b2" "#b0b0b0" "brightblack" )) + (base8 '("#ffffff" "#eeeeee" "white" )) + (fg '("#e0e0e0" "#ffffff" "white" )) + (fg-alt '("#c6c6c6" "#b0b0b0" "brightwhite" )) + + (grey base4) + (red '("#ff5f5f" "#ff6b6b" "red" )) + (orange '("#ffaf5f" "#ffae5f" "brightred" )) + (green '("#5fff5f" "#6bff6b" "green" )) + (teal '("#5fafd7" "#5faed7" "brightgreen" )) + (yellow '("#ffff5f" "#ffff6b" "yellow" )) + (blue '("#5fafff" "#5faeff" "brightblue" )) + (dark-blue '("#005f87" "#004f77" "blue" )) + (magenta '("#af5fff" "#ae5fff" "magenta" )) + (violet '("#875fff" "#865fff" "brightmagenta")) + (cyan '("#5fdfff" "#5fceff" "brightcyan" )) + (dark-cyan '("#0087af" "#00779f" "cyan" )) + + ;; face categories -- required for all themes + (highlight magenta) + (vertical-bar (doom-darken base1 0.1)) + (selection dark-blue) + (builtin orange) + (comments (if doom-hardcore-brighter-comments dark-cyan base5)) + (doc-comments (doom-lighten (if doom-hardcore-brighter-comments dark-cyan base5) 0.25)) + (constants cyan) + (functions green) + (keywords magenta) + (methods teal) + (operators violet) + (type violet) + (strings yellow) + (variables (doom-lighten magenta 0.6)) + (numbers violet) + (region `(,(car base3) ,@(cdr base1))) + (error red) + (warning yellow) + (success green) + (vc-modified orange) + (vc-added green) + (vc-deleted red) + + ;; modeline + (-modeline-bright doom-hardcore-brighter-modeline) + (-modeline-pad (when doom-hardcore-padded-modeline (if (integerp doom-hardcore-padded-modeline) doom-hardcore-padded-modeline 4))) + (modeline-bg `(,(doom-darken (car bg) 0.15) ,@(cdr base0))) + (modeline-bg-l `(,(car bg) ,@(cdr base0))) + (modeline-bg-inactive `(,(doom-darken (car bg) 0.075) ,@(cdr base1))) + (modeline-bg-inactive-l (doom-darken bg 0.1))) + + ;; Base theme face overrides + (((line-number &override) :foreground base5) + ((line-number-current-line &override) :foreground fg) + (mode-line :background modeline-bg :foreground base8 + :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg))) + (mode-line-inactive :background modeline-bg-inactive :foreground base5 + :box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-inactive)))) + ) + +;;; doom-hardcore-theme.el ends here diff --git a/dots/doom/themes/doom-pandora-theme.el b/dots/doom/themes/doom-pandora-theme.el new file mode 100755 index 0000000..b60679a --- /dev/null +++ b/dots/doom/themes/doom-pandora-theme.el @@ -0,0 +1,107 @@ +;;; doom-pandora-theme.el --- Pandora Base16 theme for Doom Emacs -*- lexical-binding: t; no-byte-compile: t; -*- +;; +;; Based on Base16 Pandora scheme by Cassandra Fox. +;; Adapted from doom-dracula-theme.el +;; +;;; Commentary: +;; This theme is a modification of the Doom Dracula theme, +;; replacing the Dracula palette with the Base16 Pandora colors. +;; +;;; Code: + +(require 'doom-themes) + +(defgroup doom-pandora-theme nil + "Options for the `doom-pandora' theme." + :group 'doom-themes) + +(defcustom doom-pandora-brighter-modeline nil + "If non-nil, more vivid colors will be used to style the mode-line." + :group 'doom-pandora-theme + :type 'boolean) + +(defcustom doom-pandora-brighter-comments nil + "If non-nil, comments will be highlighted in more vivid colors." + :group 'doom-pandora-theme + :type 'boolean) + +(defcustom doom-pandora-colorful-headers nil + "If non-nil, headers in org-mode will be more colorful." + :group 'doom-pandora-theme + :type 'boolean) + +(defcustom doom-pandora-comment-bg doom-pandora-brighter-comments + "If non-nil, comments will have a subtle, darker background to enhance legibility." + :group 'doom-pandora-theme + :type 'boolean) + +(defcustom doom-pandora-padded-modeline doom-themes-padded-modeline + "If non-nil, adds a padding to the mode-line. It can be an integer to specify exact padding." + :group 'doom-pandora-theme + :type '(choice integer boolean)) + + +(def-doom-theme doom-pandora + "A dark theme based on the Base16 Pandora color scheme by Cassandra Fox." + + ;; Palette: + ;; Base16 Pandora (keys from base00 to base0F) + ((bg '("#131213" nil nil)) ; base00 + (bg-alt '("#2f1823" nil nil)) ; base01 + (base02 '("#472234" nil nil)) ; base02 + (base03 '("#ffbee3" nil nil)) ; base03 + (base04 '("#9b2a46" nil nil)) ; base04 + (fg '("#f15c99" "#f15c99" "brightwhite")) ; base05 + (fg-alt '("#9ddf69" "#9ddf69" "white")) ; base0B + (accent '("#008080" nil nil)) ; base0D + + (base06 '("#81506a" nil nil)) ; base06 + (base07 '("#632227" nil nil)) ; base07 + (base08 '("#b00b69" nil nil)) ; base08 (red) + (base09 '("#ff9153" nil nil)) ; base09 (orange) + (base0A '("#ffcc00" nil nil)) ; base0A (yellow) + (base0C '("#714ca6" nil nil)) ; base0C (blue) + (base0D '("#008080" nil nil)) ; base0D (teal; reused as accent) + (base0E '("#a24030" nil nil)) ; base0E (magenta) + (base0F '("#a24030" nil nil)) ; base0F (duplicate of base0E) + + ;; You may optionally define a "grey" for extra use: + (grey base04)) + + ;; Face categories: + ;; Here we map our palette to Doom's standard face categories. + ((red base08) + (orange base09) + (green base0B) + (teal base0D) + (yellow base0A) + (blue base0C) + (dark-blue (doom-darken base0C 0.2)) + (magenta base0E) + (violet (doom-blend base0E base0C 0.5)) + (cyan base0D)) ; Using base0D for cyan (teal) + + ;; Base theme face overrides + (((line-number &override) :foreground base04) + ((line-number-current-line &override) :foreground fg) + ((font-lock-comment-face &override) + :background (if doom-pandora-comment-bg (doom-lighten bg 0.05) 'unspecified)) + (mode-line + :background accent :foreground fg + :box (when doom-pandora-padded-modeline + `(:line-width ,(if (integerp doom-pandora-padded-modeline) + doom-pandora-padded-modeline 4) + :color ,accent))) + (mode-line-inactive + :background (doom-darken bg 0.075) :foreground base04 + :box (when doom-pandora-padded-modeline + `(:line-width ,(if (integerp doom-pandora-padded-modeline) + doom-pandora-padded-modeline 4) + :color ,(doom-darken bg 0.075)))) + (mode-line-emphasis :foreground (if doom-pandora-brighter-modeline fg accent)) + ;; Example for org-mode customizations: + ((org-tag &override) :foreground (doom-lighten orange 0.3))) + ;; No additional variable overrides + ()) + +;;; doom-pandora-theme.el ends here diff --git a/dots/doom/xenia.png b/dots/doom/xenia.png new file mode 100755 index 0000000..da746a2 Binary files /dev/null and b/dots/doom/xenia.png differ diff --git a/dots/foot.nix b/dots/foot.nix new file mode 100755 index 0000000..b995abd --- /dev/null +++ b/dots/foot.nix @@ -0,0 +1,20 @@ +{ + pkgs, + config, + lib, + ... +}: +{ + programs.foot = { + enable = true; + settings = { + main = { + pad = "5x5"; + }; + colors = { + alpha = lib.mkForce (0.9); + }; + }; + }; +} + diff --git a/dots/hyprland.nix b/dots/hyprland.nix new file mode 100755 index 0000000..7d2bec5 --- /dev/null +++ b/dots/hyprland.nix @@ -0,0 +1,273 @@ +{ + config, + lib, + pkgs, + window_manager, + systemName, + ... +}: +let + mod = "Alt"; + terminal = "footclient"; + fileManager = "pcmanfm"; + runner = "anyrun"; + browser = "zen-twilight"; + editor = "emacsclient -c"; +in +{ + wayland = { + windowManager = { + hyprland = { + enable = window_manager == "hyprland" || window_manager == "all"; + plugins = [ + pkgs.hyprlandPlugins.hyprsplit + ]; + settings = { + # Autostart necessary processes (like notifications daemons, status bars, etc.) + # Or execute your favorite apps at launch like this: + exec-once = + [ + "waybar" + "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" + "fcitx5 -d" + "foot -s" + ] + ++ lib.optional (systemName == "laptop") "swaybg -o eDP-1 -i ${../assets/Wallpapers/138.png}" + ++ + lib.optional (systemName == "pc") + "swaybg -o HDMI-A-1 -i ${../assets/Wallpapers/138.png} -o DP-1 -i ${../assets/Wallpapers/138.png}"; + + #plugins + plugin = { + hyprsplit = { + num_workspaces = 9; + persistent_workspaces = true; + }; + }; + + # See https://wiki.hyprland.org/Configuring/Monitors/ + monitor = lib.mkMerge [ + (lib.mkIf (systemName == "laptop") [ "eDP-1,1920x1080@59.99700,0x0,1" ]) + (lib.mkIf (systemName == "pc") [ + "HDMI-A-1,1920x1080@60,0x0,1" + "DP-1,2560x1440@144,1920x0,1" + ]) + ]; + + env = [ + "XCURSOR_SIZE, 24" + "HYPRCURSOR_SIZE, 24" + ]; + # Refer to https://wiki.hyprland.org/Configuring/Variables/ + # https://wiki.hyprland.org/Configuring/Variables/#general + general = { + gaps_in = 5; + gaps_out = 20; + border_size = 2; + # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors + #"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; + #"col.inactive_border" = "rgba(595959aa)"; + # Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false; + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false; + layout = "dwindle"; + }; + + # https://wiki.hyprland.org/Configuring/Variables/#decoration + decoration = { + rounding = 10; + rounding_power = 2; + # Change transparency of focused and unfocused windows + active_opacity = 1.0; + inactive_opacity = 1.0; + shadow = { + enabled = true; + range = 4; + render_power = 3; + #color = "rgba(1a1a1aee)"; + }; + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur = { + enabled = true; + size = 3; + passes = 1; + vibrancy = 0.1696; + }; + }; + animations = { + enabled = "yes, please :)"; + # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + bezier = [ + "easeOutQuint,0.23,1,0.32,1" + "easeInOutCubic,0.65,0.05,0.36,1" + "linear,0,0,1,1" + "almostLinear,0.5,0.5,0.75,1.0" + "quick,0.15,0,0.1,1" + ]; + animation = [ + "global, 1, 10, default" + "border, 1, 5.39, easeOutQuint" + "windows, 1, 4.79, easeOutQuint" + "windowsIn, 1, 4.1, easeOutQuint, popin 87%" + "windowsOut, 1, 1.49, linear, popin 87%" + "fadeIn, 1, 1.73, almostLinear" + "fadeOut, 1, 1.46, almostLinear" + "fade, 1, 3.03, quick" + "layers, 1, 3.81, easeOutQuint" + "layersIn, 1, 4, easeOutQuint, fade" + "layersOut, 1, 1.5, linear, fade" + "fadeLayersIn, 1, 1.79, almostLinear" + "fadeLayersOut, 1, 1.39, almostLinear" + "workspaces, 1, 1.94, almostLinear, fade" + "workspacesIn, 1, 1.21, almostLinear, fade" + "workspacesOut, 1, 1.94, almostLinear, fade" + ]; + }; + # Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/ + # "Smart gaps" / "No gaps when only" + # uncomment all if you wish to use that. + # workspace = w[tv1], gapsout:0, gapsin:0 + # workspace = f[1], gapsout:0, gapsin:0 + # windowrule = bordersize 0, floating:0, onworkspace:w[tv1] + # windowrule = rounding 0, floating:0, onworkspace:w[tv1] + # windowrule = bordersize 0, floating:0, onworkspace:f[1] + # windowrule = rounding 0, floating:0, onworkspace:f[1] + + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + dwindle = { + pseudotile = true; # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true; # You probably want this + force_split = 2; + }; + + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + master = { + new_status = "master"; + }; + + # https://wiki.hyprland.org/Configuring/Variables/#misc + misc = { + force_default_wallpaper = -1; # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = false; # If true disables the random hyprland logo / anime girl background. :( + enable_swallow = true; + swallow_regex = "foot"; + }; + + # https://wiki.hyprland.org/Configuring/Variables/#input + input = { + kb_layout = lib.mkMerge [ + (lib.mkIf (systemName == "laptop") "ie") + (lib.mkIf (systemName == "pc") "us") + ]; + #kb_variant = + #kb_model = + #kb_options = + #kb_rules = + follow_mouse = 1; + sensitivity = 0; # -1.0 - 1.0, 0 means no modification. + touchpad = { + natural_scroll = false; + }; + }; + # https://wiki.hyprland.org/Configuring/Variables/#gestures + gestures = { + workspace_swipe = true; + }; + + # Example per-device config + # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more + device = { + name = "epic-mouse-v1"; + sensitivity = -0.5; + }; + + bind = [ + # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more + "${mod}, Return, exec, ${terminal}" + "${mod}, B, exec, ${browser}" + "${mod}, Q, killactive," + "${mod}, M, exit," + "${mod}, F, exec, ${fileManager}" + "${mod}, V, togglefloating," + "${mod}, D, exec, ${runner}" + "${mod}, E, exec, ${editor}" + "SUPER_SHIFT, S, exec, grim -g \"$(slurp)\" - | swappy -f -" + "${mod}, P, pseudo, " # dwindle + "${mod}, J, togglesplit," # dwindle + #focus with mainMod + arrow keys + "${mod}, left, movefocus, l" + "${mod}, right, movefocus, r" + "${mod}, up, movefocus, u" + "${mod}, down, movefocus, d" + + # Switch workspaces with Mod + [0-9] + "${mod}, 1, split:workspace, 1 " + "${mod}, 2, split:workspace, 2 " + "${mod}, 3, split:workspace, 3 " + "${mod}, 4, split:workspace, 4 " + "${mod}, 5, split:workspace, 5 " + "${mod}, 6, split:workspace, 6 " + "${mod}, 7, split:workspace, 7 " + "${mod}, 8, split:workspace, 8 " + "${mod}, 9, split:workspace, 9 " + "${mod}, 0, split:workspace, 10" + # Move active window to a workspace with mainMod + SHIFT + [0-9] + "${mod} SHIFT, 1, split:movetoworkspacesilent, 1 " + "${mod} SHIFT, 2, split:movetoworkspacesilent, 2 " + "${mod} SHIFT, 3, split:movetoworkspacesilent, 3 " + "${mod} SHIFT, 4, split:movetoworkspacesilent, 4 " + "${mod} SHIFT, 5, split:movetoworkspacesilent, 5 " + "${mod} SHIFT, 6, split:movetoworkspacesilent, 6 " + "${mod} SHIFT, 7, split:movetoworkspacesilent, 7 " + "${mod} SHIFT, 8, split:movetoworkspacesilent, 8 " + "${mod} SHIFT, 9, split:movetoworkspacesilent, 9 " + "${mod} SHIFT, 0, split:movetoworkspacesilent, 10" + # Example special workspace (scratchpad) + "${mod}, S, togglespecialworkspace, magic" + "${mod} SHIFT, S, movetoworkspace, special:magic" + # Scroll through existing workspaces with mainMod + scroll + "${mod}, mouse_down, workspace, e+1" + "${mod}, mouse_up, workspace, e-1" + ]; + + bindm = [ + # Move/resize windows with mainMod + LMB/RMB and dragging + "${mod}, mouse:272, movewindow" + "${mod}, mouse:273, resizewindow" + ]; + + bindel = [ + ",XF86AudioRaiseVolume, exec, pamixer -i 5" + ",XF86AudioLowerVolume, exec, pamixer -d 5" + ",XF86AudioMute, exec, pamixer --toggle-mute" + ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + ",XF86MonBrightnessUp, exec, light -A 5" + ",XF86MonBrightnessDown, exec, light -U 5" + ]; + bindl = [ + ", XF86AudioNext, exec, playerctl next" + ", XF86AudioPause, exec, playerctl play-pause" + ", XF86AudioPlay, exec, playerctl play-pause " + ", XF86AudioPrev, exec, playerctl previous " + ]; + + # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more + # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules + + # Example windowrule + # windowrule = float,class:^(kitty)$,title:^(kitty)$ + + # Ignore maximize requests from apps. You'll probably like this. + windowrule = [ + # Ignore maximize requests from apps. You'll probably like this. + "suppressevent maximize, class:.*" + # Fix some dragging issues with XWayland + "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" + ]; + + }; + }; + }; + }; +} diff --git a/dots/hyprlock.nix b/dots/hyprlock.nix new file mode 100755 index 0000000..ad5ffaa --- /dev/null +++ b/dots/hyprlock.nix @@ -0,0 +1,102 @@ +{ + config, + lib, + pkgs, + inputs, + systemName, + ... +}: + +{ + services = { + hypridle = { + enable = true; + settings = { + general = { + lock_cmd = "${lib.getExe pkgs.hyprlock}"; + unlock_cmd = "killall -s SIGUSR1 hyprlock"; + before_sleep_cmd = "loginctl lock-session && sleep 1.5"; + ignore_dbus_inhibit = false; + }; + listener = + [ + { + timeout = 600; + on-timeout = "loginctl lock-session"; + } + + ] + ++ lib.optional (systemName == "laptop") { + timeout = 700; + on-timeout = "light -S 0"; + on-resume = "light -I"; + } + ++ lib.optional (systemName == "laptop") { + timeout = 800; + on-timeout = "systemctl suspend-then-hibernate"; + }; + }; + }; + }; + systemd.user.services.hypridle = lib.mkForce { + Unit = { + Description = "hypridle"; + After = [ "graphical-session.target" ]; + PartOf = [ "graphical-session.target" ]; + # Remove ConditionEnvironment, handle in ExecStart or ensure variable is imported + }; + Service = { + ExecStart = "${lib.getExe pkgs.hypridle}"; + Restart = "always"; + RestartSec = "10s"; + # Check inside the service if needed + ExecStartPre = "/bin/sh -c 'test -n \"$WAYLAND_DISPLAY\"'"; + }; + Install.WantedBy = [ "graphical-session.target" ]; + }; + programs = { + hyprlock = { + enable = true; + settings = { + background = { + path = "${../assets/Wallpapers/138.png}"; # only png supported for now + color = "rgba(25, 20, 20, 1.0)"; + + # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations + blur_passes = 0; # 0 disables blurring + blur_size = 7; + noise = 0.0117; + contrast = 0.8916; + brightness = 0.8172; + vibrancy = 0.1696; + vibrancy_darkness = 0.0; + }; + input-field = { + size = "200, 50"; + outline_thickness = 3; + dots_size = 0.33; # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.15; # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = false; + outer_color = "rgb(151515)"; + inner_color = "rgb(200, 200, 200)"; + font_color = "rgb(10, 10, 10)"; + fade_on_empty = true; + placeholder_text = "Input Password..."; # Text rendered in the input box when it's empty. + hide_input = false; + position = "0, -20"; + halign = "center"; + valign = "center"; + }; + label = { + text = "Hi there, $USER"; + color = "rgba(200, 200, 200, 1.0)"; + font_size = 25; + font_family = "Noto Sans"; + position = "0, 80"; + halign = "center"; + valign = "center"; + }; + }; + }; + }; +} diff --git a/dots/niri.nix b/dots/niri.nix new file mode 100755 index 0000000..a542b47 --- /dev/null +++ b/dots/niri.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + programs = { + niri = { + settings = { + outputs."eDP-1".scale = 1.0; + binds = { + "Mod+T".action.spawn = "alacritty"; + }; + }; + }; + }; +} diff --git a/dots/nixcord.nix b/dots/nixcord.nix new file mode 100755 index 0000000..7d5d364 --- /dev/null +++ b/dots/nixcord.nix @@ -0,0 +1,111 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + programs.nixcord = { + enable = true; + discord.enable = false; + vesktop = { + enable = true; + }; + config = { + plugins = { + alwaysTrust = { + enable = true; + file = true; + }; + translate = { + enable = true; + }; + anonymiseFileNames = { + enable = true; + anonymiseByDefault = true; + }; + betterRoleContext = { + enable = true; + }; + betterRoleDot = { + enable = true; + }; + betterUploadButton = { + enable = true; + }; + biggerStreamPreview = { + enable = true; + }; + clearURLs = { + enable = true; + }; + copyFileContents = { + enable = true; + }; + emoteCloner = { + enable = true; + }; + fakeNitro = { + enable = true; + enableEmojiBypass = true; + }; + fixImagesQuality = { + enable = true; + }; + fixYoutubeEmbeds = { + enable = true; + }; + forceOwnerCrown = { + enable = true; + }; + friendsSince = { + enable = true; + }; + gifPaste = { + enable = true; + }; + imageZoom = { + enable = true; + }; + memberCount = { + enable = true; + }; + messageLinkEmbeds = { + enable = true; + }; + messageLogger = { + enable = true; + }; + nsfwGateBypass = { + enable = true; + }; + petpet = { + enable = true; + }; + pictureInPicture = { + enable = true; + }; + reverseImageSearch = { + enable = true; + }; + showHiddenChannels = { + enable = true; + }; + showHiddenThings = { + enable = true; + }; + showTimeoutDuration = { + enable = true; + }; + whoReacted = { + enable = true; + }; + youtubeAdblock = { + enable = true; + }; + }; + }; + }; +} + diff --git a/dots/river.nix b/dots/river.nix new file mode 100755 index 0000000..8a3ca5f --- /dev/null +++ b/dots/river.nix @@ -0,0 +1,249 @@ +{ + pkgs, + lib, + config, + window_manager, + systemName, + ... +}: +{ + wayland.windowManager.river = { + enable = window_manager == "river" || window_manager == "all"; + xwayland.enable = true; + extraConfig = '' + #!/bin/sh + # + # + #systemctl --user import-environment + # + # + #eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) + #export SSH_AUTH_SOCK + browser="zen-twilight" + file_manager="pcmanfm" + terminal="footclient" + drunner="anyrun" + editor="emacs" + + riverctl input "pointer-2362-8197-ASUP1204:00_093A:2005_Touchpad" tap enabled + riverctl keyboard-layout -options "grp:ctrl_space_toggle" ${ + if systemName == "laptop" then "ie,us" else "us" + } + + #riverctl spawn 'export XDG_CURRENT_DESKTOP=river' + #riverctl spawn 'systemctl --user restart xdg-desktop-portal' + riverctl spawn 'dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP' + riverctl spawn 'swaybg ${ + # Handle laptop case + lib.optionalString (systemName == "laptop") "-o eDP-1 -i ${../assets/Wallpapers/138.png}" + }${ + # Handle PC case (appends to laptop case if needed, but conditions should be mutually exclusive) + lib.optionalString ( + systemName == "pc" + ) "-o HDMI-A-1 -i ${../assets/Wallpapers/138.png} -o DP-1 -i ${../assets/Wallpapers/138.png}" + }' + #riverctl spawn '/home/mrfluffy/.config/script/mic-gain-fix.sh' + riverctl spawn 'waybar &' + #riverctl spawn '(hypridle &) && loginctl unlock-session' + #riverctl spawn '(sleep 10 && systemctl --user restart hypridle.service) &' + #riverctl spawn '/nix/store/$(ls -la /nix/store | grep "polkit-gnome" | grep "^d" | awk ""$0=$NF" | head -n 1)/libexec/polkit-gnome-authentication-agent-1' + riverctl spawn ' ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1' + riverctl spawn '/home/mrfluffy/.config/script/waylock.sh' + riverctl spawn 'fcitx5 -d' + riverctl spawn 'foot -s' + riverctl spawn '[ -n "$(whereis swaync | awk '{print $2}')" ] && swaync' + riverctl focus-follows-cursor normal + riverctl set-cursor-warp on-focus-change + #riverctl xcursor-theme oreo_spark_pink_cursors + riverctl spawn '${ + # Handle laptop case + lib.optionalString (systemName == "laptop") "wlr-randr --output eDP-1 --mode 1920x1080@60" + }${ + # Handle PC case (appends to laptop case if needed, but conditions should be mutually exclusive) + lib.optionalString (systemName == "pc") + "wlr-randr --output DP-1 --mode 2560x1440@144 --pos 1920,0 --output HDMI-A-1 --mode 1920x1080@60 --pos 0,0" + }' + + # This is the example configuration file for river. + # + # If you wish to edit this, you will probably want to copy it to + # $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first. + # + # See the river(1), riverctl(1), and rivertile(1) man pages for complete + # documentation. + + # Note: the "Mod4" modifier is also known as Logo, GUI, Windows, Mod4, etc. + # + riverctl map normal Mod1+Shift+Control L spawn way-inhibitor + + # Mod4+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot) + riverctl map normal Mod1 Return spawn $terminal + + # Mod4+D open wofi + riverctl map normal Mod1 D spawn $drunner + + #Mod4+b open browser + riverctl map normal Mod1 B spawn $browser + + #Mod1+F open file manager + riverctl map normal Mod1 F spawn $file_manager + + #mod1+e open emacs + riverctl map normal Mod1 E spawn $editor + + # Mod4+Q to close the focused view + riverctl map normal Mod1 Q close + + # Mod4+Shift+E to exit river + riverctl map normal Mod1+Shift Q exit + + # Mod4+J and Super+K to focus the next/previous view in the layout stack + riverctl map normal Mod1 J focus-view next + riverctl map normal Mod1 K focus-view previous + + # Mod4+Shift+J and Super+Shift+K to swap the focused view with the next/previous + # view in the layout stack + riverctl map normal Mod1+Shift J swap next + riverctl map normal Mod1+Shift K swap previous + + # Mod4+Period and Super+Comma to focus the next/previous output + riverctl map normal Mod1 L focus-output next + riverctl map normal Mod1 H focus-output previous + + # Mod4+Shift+{Period,Comma} to send the focused view to the next/previous output + riverctl map normal Mod1+Shift L send-to-output next + riverctl map normal Mod1+Shift H send-to-output previous + + # Mod4+Return to bump the focused view to the top of the layout stack + riverctl map normal Mod4 Return zoom + + # Mod4+H and Super+L to decrease/increase the main ratio of rivertile(1) + riverctl map normal Mod1+Control H send-layout-cmd rivertile "main-ratio -0.05" + riverctl map normal Mod1+Control L send-layout-cmd rivertile "main-ratio +0.05" + + # Mod4+Mod1+{H,J,K,L} to move views + riverctl map normal Mod4+Mod1 H move left 100 + riverctl map normal Mod4+Mod1 J move down 100 + riverctl map normal Mod4+Mod1 K move up 100 + riverctl map normal Mod4+Mod1 L move right 100 + + # Mod4+Mod1+Control+{H,J,K,L} to snap views to screen edges + riverctl map normal Mod4+Mod1+Control H snap left + riverctl map normal Mod4+Mod1+Control J snap down + riverctl map normal Mod4+Mod1+Control K snap up + riverctl map normal Mod4+Mod1+Control L snap right + + # Mod4+Mod1+Shif+{H,J,K,L} to resize views + riverctl map normal Mod4+Mod1+Shift H resize horizontal -100 + riverctl map normal Mod4+Mod1+Shift J resize vertical 100 + riverctl map normal Mod4+Mod1+Shift K resize vertical -100 + riverctl map normal Mod4+Mod1+Shift L resize horizontal 100 + + # Mod4 + Left Mouse Button to move views + riverctl map-pointer normal Alt BTN_LEFT move-view + + # Mod4 + Right Mouse Button to resize views + riverctl map-pointer normal Alt BTN_RIGHT resize-view + + for i in $(seq 1 9); do + tags=$((1 << ($i - 1))) + + # Mod4+[1-9] to focus tag [0-8] + riverctl map normal Mod1 $i set-focused-tags $tags + + # Mod4+Shift+[1-9] to tag focused view with tag [0-8] + riverctl map normal Mod1+Shift $i set-view-tags $tags + + # Mod4+Ctrl+[1-9] to toggle focus of tag [0-8] + riverctl map normal Mod1+Control $i toggle-focused-tags $tags + + # Mod4+Shift+Ctrl+[1-9] to toggle tag [0-8] of focused view + riverctl map normal Mod1+Shift+Control $i toggle-view-tags $tags + done + + # Mod4+0 to focus all tags + # Mod4+Shift+0 to tag focused view with all tags + all_tags=$(((1 << 32) - 1)) + riverctl map normal Mod4 0 set-focused-tags $all_tags + riverctl map normal Mod4+Shift 0 set-view-tags $all_tags + + # Mod4+Space to toggle float + riverctl map normal Mod1 Space toggle-float + + # Mod4+F to toggle fullscreen + riverctl map normal Mod1 t toggle-fullscreen + + # Mod4+{Up,Right,Down,Left} to change layout orientation + riverctl map normal Mod4 Up send-layout-cmd rivertile "main-location top" + riverctl map normal Mod4 Right send-layout-cmd rivertile "main-location right" + riverctl map normal Mod4 Down send-layout-cmd rivertile "main-location bottom" + riverctl map normal Mod4 Left send-layout-cmd rivertile "main-location left" + + # Declare a passthrough mode. This mode has only a single mapping to return to + # normal mode. This makes it useful for testing a nested wayland compositor + riverctl declare-mode passthrough + + # Mod4+F11 to enter passthrough mode + riverctl map normal Mod4 F11 enter-mode passthrough + + # Mod4+F11 to return to normal mode + riverctl map passthrough Mod4 F11 enter-mode normal + + # Various media key mapping examples for both normal and locked mode which do + # not have a modifier + for mode in normal locked; do + # Eject the optical drive (well if you still have one that is) + riverctl map $mode None XF86Eject spawn 'eject -T' + + # Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer) + riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5' + riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5' + riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute' + + # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl) + riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause' + riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause' + riverctl map $mode None XF86AudioPrev spawn 'playerctl previous' + riverctl map $mode None XF86AudioNext spawn 'playerctl next' + #print screen + riverctl map $mode None Print spawn 'grim -g "$(slurp)" - | swappy -f -' + # Control screen backlight brighness with light (https://github.com/haikarainen/light) + riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5' + riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5' + done + + #make a raw mode + riverctl declare-mode raw + riverctl map normal Mod1 r spawn 'riverctl enter-mode raw' + riverctl map raw Mod1 r spawn 'riverctl enter-mode normal' + + + + # Set background and border color + #riverctl background-color 0x002b36 + #riverctl border-color-focused 0x8218c4 + #riverctl border-color-unfocused 0xff282a36 + #riverctl border-width 3 + + #set ssd for apps + riverctl rule-add ssd + + # Set keyboard repeat rate + riverctl set-repeat 50 300 + + # Make certain views start floating + riverctl float-filter-add app-id float + riverctl float-filter-add title "popup title with spaces" + riverctl rule-add -title "Idle Inhibitor" float + # Set app-ids and titles of views which should use client side decorations + riverctl csd-filter-add app-id "gedit" + + # Set and exec into the default layout generator, rivertile. + # River will send the process group of the init executable SIGTERM on exit. + riverctl default-layout rivertile + exec rivertile -view-padding 3 -outer-padding 3 -main-ratio 0.5 + + ''; + + }; +} diff --git a/dots/waybar.nix b/dots/waybar.nix new file mode 100755 index 0000000..53827e6 --- /dev/null +++ b/dots/waybar.nix @@ -0,0 +1,343 @@ +{ + config, + pkgs, + inputs, + window_manager, + ... +}: +{ + programs.waybar = { + enable = true; + style = '' + #tags button { + padding: 0 5px; + color: #f8f8f2; + } + + #tags button.occupied { + color: inherit; + background-color: #6a548d + } + + + + #tags button.focused { + color: #f8f8f2; + background-color: #aa86e1 ; + } + + #tags button.urgent { + color: #ea6962; + } + + #mode { + background: #64727D; + border-bottom: 3px solid #f8f8f2; + } + #backlight-slider slider { + min-height: 0px; + min-width: 0px; + opacity: 0; + background-image: none; + border: none; + box-shadow: none; + } + #backlight-slider trough { + min-height: 10px; + min-width: 10px; + border-radius: 5px; + background-color: black; + } + #backlight-slider highlight { + min-width: 100px; + border-radius: 5px; + background-color: red; + } + /* Add divider styling */ + #custom-divider { + color: #6a548d; + padding: 0 5px; + } + + + /* -------------------------- + Workspaces styling + -------------------------- */ + + + #workspaces button { + padding: 0 6px; + font-size: 0.9em; + color: #f8f8f2; + background: transparent; + border: none; + border-radius: 3px; + transition: background 0.2s ease, color 0.2s ease; + } + + #workspaces button.empty { + opacity: 0.5; + } + + #workspaces button.persistent { + background-color: #44475a; + } + + #workspaces button.special { + background-color: #8bd49e; + color: #282a36; + } + + #workspaces button.visible { + background-color: #aa86e1; + } + + #workspaces button.active { + background-color: #6a548d; + } + + #workspaces button.urgent { + color: #ea6962; + font-weight: bold; + } + + #workspaces button.hosting-monitor { + box-shadow: 0 0 0 1px #f8f8f2 inset; + } + + #workspaces button:hover { + background-color: rgba(255, 255, 255, 0.1); + } + ''; + + settings = { + mainBar = { + layer = "top"; # Waybar at top layer + # position= "bottom", # Waybar position (top|bottom|left|right) + height = 30; # Waybar height (to be removed for auto height) + #width = 1280; # Waybar width + spacing = 4; # Gaps between modules (4px) + # Choose the order of the modules + modules-left = + if window_manager == "river" then + [ + "river/tags" + "custom/media" + ] + else if window_manager == "hyprland" then + [ + "hyprland/workspaces" + ] + else + [ ]; + modules-center = [ + ]; + + modules-right = [ + "pulseaudio" + "custom/divider" + "network" + "custom/divider" + "cpu" + "custom/divider" + "memory" + "custom/divider" + "power-profiles-daemon" + "custom/divider" + "battery" + "custom/divider" + "backlight" + "custom/divider" + "clock" + "custom/divider" + "tray" + ]; + + # Modules configuration + "hyprland/workspaces" = { + format = "{icon}"; + on_click = "activate"; + format-icons = { + "1" = "一"; + "2" = "二"; + "3" = "三"; + "4" = "四"; + "5" = "五"; + "6" = "六"; + "7" = "七"; + "8" = "八"; + "9" = "九"; + "10" = "일"; + "11" = "이"; + "12" = "삼"; + "13" = "사"; + "14" = "오"; + "15" = "육"; + "16" = "칠"; + "17" = "팔"; + "18" = "구"; + + }; + active-only = false; + sort-by-name = true; + all-outputs = true; + }; + "river/tags" = { + num-tags = 9; + tag-labels = [ + "一" + "二" + "三" + "四" + "五" + "六" + "七" + "八" + "九" + ]; + }; + keyboard-state = { + numlock = true; + capslock = true; + format = "{name} {icon}"; + format-icons = { + locked = ""; + unlocked = ""; + }; + }; + idle_inhibitor = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; + }; + }; + battery = { + bat = "BAT0"; + interval = 60; + states = { + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-icons = [ + "" + "" + "" + "" + "" + ]; + max-length = 25; + }; + "backlight/slider" = { + min = 0; + max = 400; + orientation = "horizontal"; + device = "intel_backlight"; + }; + backlight = { + device = "intel_backlight"; + format = "{percent}% {icon}"; + tooltip-format = "Backlight is {percent}% {icon}"; + format-icons = [ + "☽" + "" + "" + ]; + }; + tray = { + #"icon-size": 21, + spacing = 10; + }; + #clock = { + # # "timezone": "America/New_York", + # tooltip-format = "{:%Y %B}\n{calendar}"; + # format-alt = "{:%Y-%m-%d}"; + #}; + "clock" = { + format = "{:%r}  "; + format-alt = "{:%A, %B %d, %Y (%R)}  "; + tooltip-format = "{calendar}"; + interval = 1; + calendar = { + mode = "year"; + "mode-mon-col" = 3; + "weeks-pos" = "right"; + "on-scroll" = 1; + format = { + months = "{}"; + days = "{}"; + weeks = "W{}"; + weekdays = "{}"; + today = "{}"; + }; + }; + actions = { + "on-click-right" = "mode"; + #"on-scroll-up" = "tz_up"; # Note: There's a duplicate "on-scroll-up" here + #"on-scroll-down" = "tz_down"; # And duplicate "on-scroll-down" + "on-scroll-up" = "shift_up"; + "on-scroll-down" = "shift_down"; + }; + }; + cpu = { + format = "{usage}% "; + tooltip = false; + }; + memory = { + format = "{}% "; + }; + + network = { + interface = "wlo1"; # (Optional) To force the use of this interface + format-wifi = "{essid} ({signalStrength}%) "; + format-ethernet = "{ipaddr}/{cidr} 囹"; + tooltip-format = "{ifname} via {gwaddr} 囹"; + format-linked = "{ifname} (No IP) 囹"; + format-disconnected = "Disconnected ⚠"; + format-alt = "{ifname}: {ipaddr}/{cidr}"; + }; + pulseaudio = { + # "scroll-step": 1, // %, can be a float + format = "{volume}% {icon} {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " {format_source}"; + format-source = "{volume}% "; + format-source-muted = ""; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ + "" + "" + "" + ]; + }; + on-click = "pavucontrol"; + }; + power-profiles-daemon = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + performance = ""; + balanced = ""; + power-saver = ""; + }; + }; + + # Add this new module definition + "custom/divider" = { + format = "│"; + interval = "once"; + tooltip = false; + }; + }; + }; + }; +} diff --git a/dots/xdg.nix b/dots/xdg.nix new file mode 100755 index 0000000..299c0ce --- /dev/null +++ b/dots/xdg.nix @@ -0,0 +1,104 @@ +{ + config, + lib, + pkgs, + window_manager, + ... +}: + +{ + xdg = { + enable = true; + portal = { + enable = true; + config.common.default = [ + "hyprland" + "river" + "gtk" + ]; + xdgOpenUsePortal = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-wlr + xdg-desktop-portal-gtk + xdg-desktop-portal-hyprland + ]; + }; + mime.enable = true; + mimeApps = { + enable = true; + defaultApplications = + let + browser = [ "zen-twilight.desktop" ]; + fileManager = [ "pcmanfm.desktop" ]; + editor = [ "emacs.desktop" ]; + player = [ "mpv.desktop" ]; + viewer = [ "imv-dir.desktop" ]; + reader = [ "org.pwmt.zathura.desktop" ]; + in + { + "application/pdf" = reader; + "application/epub" = reader; + + "text/html" = browser; + "text/xml" = browser; + "text/plain" = editor; + "application/x-wine-extension-ini" = editor; + + "application/json" = browser; + "application/xml" = browser; + "application/xhtml+xml" = browser; + "application/xhtml_xml" = browser; + "application/rdf+xml" = browser; + "application/rss+xml" = browser; + "application/x-extension-htm" = browser; + "application/x-extension-html" = browser; + "application/x-extension-shtml" = browser; + "application/x-extension-xht" = browser; + "application/x-extension-xhtml" = browser; + + "x-scheme-handler/about" = browser; + "x-scheme-handler/ftp" = browser; + "x-scheme-handler/http" = browser; + "x-scheme-handler/https" = browser; + + "inode/directory" = fileManager; + "application/zip" = fileManager; + + "audio/mpeg" = player; + "audio/aac" = player; + "audio/flac" = player; + "audio/wav" = player; + "video/mp4" = player; + "video/vnd.mpegurl" = player; + "video/x-matroska" = player; + "application/x-mpegURL" = player; + + "image/gif" = viewer; + "image/jpeg" = viewer; + "image/png" = viewer; + "image/webp" = viewer; + }; + }; + + userDirs = { + enable = true; + createDirectories = true; + download = "${config.home.homeDirectory}/Downloads"; + documents = "${config.home.homeDirectory}/Documents"; + desktop = "${config.home.homeDirectory}/Desktop"; + videos = "${config.home.homeDirectory}/Videos"; + pictures = "${config.home.homeDirectory}/Pictures"; + music = "${config.home.homeDirectory}/Music"; + templates = "${config.home.homeDirectory}/.local/share/templates"; + publicShare = "${config.home.homeDirectory}/.local/share/public"; + }; + + configFile."electron-flags.conf".text = '' + --enable-features=WaylandWindowDecorations + --enable-features=UseOzonePlatform + --ozone-platform-hint=wayland + ''; + #configFile."hypr/hyprland.conf".onChange = "hyprctl reload"; + + }; +} diff --git a/dots/zsh.nix b/dots/zsh.nix new file mode 100755 index 0000000..4a34021 --- /dev/null +++ b/dots/zsh.nix @@ -0,0 +1,83 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + programs.zsh = { + enable = true; + dotDir = ".config/zsh"; + plugins = [ + #pkgs.zsh-autosuggestions + #pkgs.spaceship-prompt + ]; + autosuggestion = { + enable = true; + highlight = "fg=#64677a,bold,underline"; + }; + history = { + path = "$XDG_DATA_HOME/zsh/history"; + }; + sessionVariables = { + HISTSIZE = 3000; + SAVEHIST = 3000; + CARGO_HOME = "$XDG_DATA_HOME/cargo"; + GNUPGHOME = "$XDG_DATA_HOME/gnupg"; + GOPATH = "$XDG_DATA_HOME/go"; + GRADLE_USER_HOME = "$XDG_DATA_HOME/gradle"; + IPYTHONDIR = "$XDG_CONFIG_HOMEipython"; + JUPYTER_CONFIG_DIR = "$XDG_CONFIG_HOME/jupyter"; + LESSHISTFILE = "$XDG_CACHE_HOME/less/history"; + NUGET_PACKAGES = "$XDG_CACHE_HOME/NuGetPackages"; + PYTHONSTARTUP = "$XDG_CONFIG_HOME/python/pythonrc"; + KERAS_HOME = "$XDG_STATE_HOME/keras"; + RUSTUP_HOME = "$XDG_DATA_HOME/rustup"; + XCOMPOSECACHE = "$XDG_CACHE_HOME/X11/xcompose"; + SSB_HOME = "$XDG_DATA_HOME/zoom"; + HISTFILE = "$XDG_STATE_HOME/zsh/history"; + }; + shellAliases = { + nix-switch = "sudo nixos-rebuild switch"; + nix-upgrade = "sudo nixos-rebuild switch --upgrade"; + nix-edit = "sudo vim /etc/nixos/configuration.nix"; + ls = "exa -lag --icons"; + upload = "~/.config/script/upload.sh"; + record = "~/.config/script/record.sh"; + speak = "~/.config/script/wisper.sh"; + vim = "nvim"; + cat = "bat"; + anime = "~/repos/ani-cli/ani-cli"; + hentai = "~/repos/and-scripts/fap-cli"; + manga = "manga-cli"; + yt = "~/repos/ytfzf/ytfzf --thumb-viewer='kitty' -t"; + cd = "z"; + rm = "rip"; + df = "duf"; + time = "hyperfine"; + kami = "~/Documents/Rust/kami/target/release/kami"; + calc = "cpc"; + pdf = "mupdf"; + emacs = "emacs"; + river = "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river && river"; + cp = "xcp"; + wget = "wget --hsts-file=$XDG_DATA_HOME/wget-hsts"; + }; + initContent = '' + eval "$(${lib.getExe pkgs.zoxide} init zsh)" + eval "$(${lib.getExe pkgs.atuin} init zsh)" + source ${pkgs.spaceship-prompt}/lib/spaceship-prompt/spaceship.zsh + ''; + envExtra = '' + ${lib.getExe pkgs.macchina} + nixdev() { + if [[ -z "$1" ]]; then + echo "Usage: nixdev " + return 1 + fi + nix flake init --template "https://flakehub.com/f/the-nix-way/dev-templates/*#$1" + } + ''; + }; +} + diff --git a/flake.lock b/flake.lock new file mode 100755 index 0000000..321a9af --- /dev/null +++ b/flake.lock @@ -0,0 +1,861 @@ +{ + "nodes": { + "anyrun": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1743762088, + "narHash": "sha256-f+oXT9b3xuBDmm4v4nDqJvlHabxxZRB6+pay4Ub/NvA=", + "owner": "Kirottu", + "repo": "anyrun", + "rev": "786f539d69d5abcefa68978dbaa964ac14536a00", + "type": "github" + }, + "original": { + "owner": "Kirottu", + "repo": "anyrun", + "type": "github" + } + }, + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1745523430, + "narHash": "sha256-EAYWV+kXbwsH+8G/8UtmcunDeKwLwSOyfcmzZUkWE/c=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "58bfe2553d937d8af0564f79d5b950afbef69717", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1622559957, + "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1736852337, + "narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-schemes": { + "flake": false, + "locked": { + "lastModified": 1696158499, + "narHash": "sha256-5yIHgDTPjoX/3oDEfLSQ0eJZdFL1SaCfb9d6M0RmOTM=", + "owner": "tinted-theming", + "repo": "base16-schemes", + "rev": "a9112eaae86d9dd8ee6bb9445b664fba2f94037a", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-schemes", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1732806396, + "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + } + }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1744642301, + "narHash": "sha256-5A6LL7T0lttn1vrKsNOKUk9V0ittdW0VEqh6AtefxJ4=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "59e3de00f01e5adb851d824cf7911bd90c31083a", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, + "flake-compat": { + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "revCount": 69, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_2": { + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "anyrun", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "stylix", + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": [ + "stylix", + "systems" + ] + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "stylix", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1742649964, + "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "stylix", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1732369855, + "narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "dadd58f630eeea41d645ee225a63f719390829dc", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "47.2", + "repo": "gnome-shell", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745810134, + "narHash": "sha256-WfnYH/i7DFzn4SESQfWviXiNUZjohZhzODqLwKYHIPI=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "be7cf1709b469a2a2c62169172a167d1fed3509f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745439012, + "narHash": "sha256-TwbdiH28QK7Da2JQTqFHdb+UCJq6QbF2mtf+RxHVzEA=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "d31710fb2cd536b1966fee2af74e99a0816a61a8", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_3": { + "inputs": { + "nixpkgs": [ + "zen-browser", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1743604125, + "narHash": "sha256-ZD61DNbsBt1mQbinAaaEqKaJk2RFo9R/j+eYWeGMx7A=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "180fd43eea296e62ae68e079fcf56aba268b9a1a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1746039648, + "narHash": "sha256-9qSmRXu902L1Ad6L6lujOsp2LkwCV3TW6XdVpvpT2kA=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "d21e04836830680650bf44fa3d8ab80d7ea762bd", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1740117926, + "narHash": "sha256-mTTHA0RAaQcdYe+9A3Jx77cmmyLFHmRoZdd8RpWa+m8=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "b94a5db8790339cf9134873d8b490be69e02ac71", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.02", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1746034376, + "narHash": "sha256-Bw6QTIVO8bDnqvwr9l2gBNY+s+7FnTe+2Krn25uNgQI=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "9fb02b9571a7d84c9e6a93b75e5352c411113640", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, + "nix-colors": { + "inputs": { + "base16-schemes": "base16-schemes", + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1707825078, + "narHash": "sha256-hTfge2J2W+42SZ7VHXkf4kjU+qzFqPeC9k66jAUBMHk=", + "owner": "Misterio77", + "repo": "nix-colors", + "rev": "b01f024090d2c4fc3152cd0cf12027a7b8453ba1", + "type": "github" + }, + "original": { + "owner": "Misterio77", + "repo": "nix-colors", + "type": "github" + } + }, + "nixcord": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs_2", + "systems": "systems_2", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1745757380, + "narHash": "sha256-MfA53mffVwGd1uZlFmUHwrGFSdggXfGzTuOH1DP+vY4=", + "owner": "kaylorben", + "repo": "nixcord", + "rev": "ab84b94df09d4ec856a89083cc8f629db5a2d8d9", + "type": "github" + }, + "original": { + "owner": "kaylorben", + "repo": "nixcord", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1745930157, + "narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1697935651, + "narHash": "sha256-qOfWjQ2JQSQL15KLh6D7xQhx0qgZlYZTYlcEiRuAMMw=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "e1e11fdbb01113d85c7f41cada9d2847660e3902", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1745921652, + "narHash": "sha256-hEAvEN+y/OQ7wA7+u3bFJwXSe8yoSf2QaOMH3hyTJTQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b000159bba69b0106a42f65e52dbf27f77aca9d3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1744868846, + "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1745526057, + "narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "f771eb401a46846c1aebd20552521b233dd7e18b", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1745234285, + "narHash": "sha256-GfpyMzxwkfgRVN0cTGQSkTC0OHhEkv3Jf6Tcjm//qZ0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c11863f1e964833214b767f4a369c6e6a7aba141", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1743448293, + "narHash": "sha256-bmEPmSjJakAp/JojZRrUvNcDX2R5/nuX6bm+seVaGhs=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "77b584d61ff80b4cef9245829a6f1dfad5afdfa3", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nur": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "stylix", + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix_2" + }, + "locked": { + "lastModified": 1745459908, + "narHash": "sha256-bWqgohVf/py9EW3bLS/dYbenD2p9N2/Qsw1+CJk1S04=", + "owner": "nix-community", + "repo": "NUR", + "rev": "dbc4ba3233b2bf951521177bf0ee0a7679959035", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, + "root": { + "inputs": { + "anyrun": "anyrun", + "home-manager": "home-manager", + "niri": "niri", + "nix-colors": "nix-colors", + "nixcord": "nixcord", + "nixpkgs": "nixpkgs_3", + "stylix": "stylix", + "zen-browser": "zen-browser" + } + }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "firefox-gnome-theme": "firefox-gnome-theme", + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils", + "git-hooks": "git-hooks", + "gnome-shell": "gnome-shell", + "home-manager": "home-manager_2", + "nixpkgs": "nixpkgs_4", + "nur": "nur", + "systems": "systems_3", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-schemes": "tinted-schemes", + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" + }, + "locked": { + "lastModified": 1745618823, + "narHash": "sha256-WGKSI0+CY3Ep2YnRASmBRU8oMIvTW4ngFyjA0dVcKgQ=", + "owner": "danth", + "repo": "stylix", + "rev": "11ceb2fde1901dc227421bbbef2d0800339f5126", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "type": "github" + } + }, + "systems": { + "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_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "id": "systems", + "type": "indirect" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1716423189, + "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + } + }, + "tinted-schemes": { + "flake": false, + "locked": { + "lastModified": 1744974599, + "narHash": "sha256-Fg+rdGs5FAgfkYNCs74lnl8vkQmiZVdBsziyPhVqrlY=", + "owner": "tinted-theming", + "repo": "schemes", + "rev": "28c26a621123ad4ebd5bbfb34ab39421c0144bdd", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "schemes", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1745111349, + "narHash": "sha256-udV+nHdpqgkJI9D0mtvvAzbqubt9jdifS/KhTTbJ45w=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "e009f18a01182b63559fb28f1c786eb027c3dee9", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1725758778, + "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixcord", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1744961264, + "narHash": "sha256-aRmUh0AMwcbdjJHnytg1e5h5ECcaWtIFQa6d9gI85AI=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "8d404a69efe76146368885110f29a2ca3700bee6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "stylix", + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733222881, + "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "49717b5af6f80172275d47a418c9719a31a78b53", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1739246919, + "narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.5.1", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1745730655, + "narHash": "sha256-Tdsw5lD/XM8i1GnQr7ombqnEaCpt/voPs2AbjuYBbjI=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "56a681bfecc5831f41f8eb0ec8c7e96c6b277153", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "zen-browser": { + "inputs": { + "home-manager": "home-manager_3", + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1745809801, + "narHash": "sha256-TPQZmVUZxq4rIXqZcAuXeHu1etCo0AXF+3Dkar44aCk=", + "owner": "0xc000022070", + "repo": "zen-browser-flake", + "rev": "7902bf43aefe27fc18448702ebe6705bb27ad36c", + "type": "github" + }, + "original": { + "owner": "0xc000022070", + "repo": "zen-browser-flake", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100755 index 0000000..cd6f981 --- /dev/null +++ b/flake.nix @@ -0,0 +1,54 @@ +{ + description = "Nixos config flake"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + stylix.url = "github:danth/stylix"; + nix-colors.url = "github:Misterio77/nix-colors"; + anyrun.url = "github:Kirottu/anyrun"; + anyrun.inputs.nixpkgs.follows = "nixpkgs"; + zen-browser.url = "github:0xc000022070/zen-browser-flake"; + nixcord.url = "github:kaylorben/nixcord"; + niri.url = "github:sodiboo/niri-flake"; + }; + + outputs = + { + self, + nixpkgs, + anyrun, + ... + }@inputs: + let + system = "x86_64-linux"; + #Avalable options are ["niri" "river" "hyprland" "all"] + window_manager = "hyprland"; + in + { + nixosConfigurations = { + laptop = nixpkgs.lib.nixosSystem { + specialArgs = { + systemName = "laptop"; + inherit inputs window_manager; + }; + modules = [ + ./configuration.nix + inputs.home-manager.nixosModules.default + ]; + }; + pc = nixpkgs.lib.nixosSystem { + specialArgs = { + systemName = "pc"; + inherit inputs window_manager; + }; + modules = [ + ./configuration.nix + inputs.home-manager.nixosModules.default + ]; + }; + }; + }; +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100755 index 0000000..5aced16 --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,45 @@ +# 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, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/fdcbb840-4b35-4023-a048-599b0c5161d6"; + fsType = "btrfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/E1B6-9089"; + fsType = "vfat"; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/d226a8ed-10eb-452e-9284-1ff994a7f179"; + fsType = "btrfs"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/ccf41b96-c45f-47e0-8541-cd865f5d2ec6"; } + ]; + + # 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 + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp6s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp4s0f0u8.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/home/homePkgs.nix b/home/homePkgs.nix new file mode 100755 index 0000000..ae72868 --- /dev/null +++ b/home/homePkgs.nix @@ -0,0 +1,183 @@ +{ + config, + lib, + pkgs, + inputs, + ... +}: +let +in +#hyprlock = pkgs.callPackage ../../universal/personalPKGS/hyprlock.nix {}; +#hypridle = pkgs.callPackage ../../universal/personalPKGS/hypridle.nix {}; +{ + #imports = [ inputs.anyrun.homeManagerModules.default ]; + + nixpkgs.config.allowUnfree = true; + nixpkgs.config.permittedInsecurePackages = [ "freeimage-unstable-2021-11-01" ]; + programs.vscode = { + enable = true; + }; + programs.anyrun = { + enable = true; + config = { + plugins = [ + # An array of all the plugins you want, which either can be paths to the .so files, or their packages + "${pkgs.anyrun}/lib/libapplications.so" + "${pkgs.anyrun}/lib/libdictionary.so" + "${pkgs.anyrun}/lib/libsymbols.so" + "${pkgs.anyrun}/lib/librink.so" + "${pkgs.anyrun}/lib/libtranslate.so" + "${pkgs.anyrun}/lib/libwebsearch.so" + ]; + x = { + fraction = 0.5; + }; + y = { + fraction = 0.3; + }; + width = { + fraction = 0.3; + }; + hideIcons = false; + ignoreExclusiveZones = false; + layer = "overlay"; + hidePluginInfo = false; + closeOnClick = false; + showResultsImmediately = false; + maxEntries = null; + }; + extraCss = '' + .some_class + enable = true;{ + background: red; + } + ''; + extraConfigFiles."websearch.ron".text = '' + Config( + prefix: "", + // Options: Google, Ecosia, Bing, DuckDuckGo, Custom + // + // Custom engines can be defined as such: + // Custom( + // name: "Searx", + // url: "searx.be/?q={}", + // ) + // + // NOTE: `{}` is replaced by the search query and `https://` is automatically added in front. + engines: [Google] + ) + ''; + extraConfigFiles."dictionary.ron".text = '' + Config( + prefix: "", + max_entries: 5, + ) + ''; + extraConfigFiles."rink.ron".text = '' + Config( + prefix: "", + max_entries: 5, + ) + ''; + extraConfigFiles."translate.ron".text = '' + Config( + prefix: ":", + language_delimiter: ">", + max_entries: 3, + ) + ''; + + extraConfigFiles."symbols.ron".text = '' + Config ( + // The prefix that the search needs to begin with to yield symbol results + prefix: "", + // Custom user defined symbols to be included along the unicode symbols + symbols: { + // "name": "text to be copied" + "shrug": "¯\\_(ツ)_/¯", + }, + max_entries: 3, + ) + ''; + }; + + home.packages = with pkgs; [ + + # # Adds the 'hello' command to your environment. It prints a friendly + # # "Hello, world!" when run. + # pkgs.hello + + # # It is sometimes useful to fine-tune packages, for example, by applying + # # overrides. You can do that directly here, just don't forget the + # # parentheses. Maybe you want to install Nerd Fonts with a limited number of + # # fonts? + # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) + + # # You can also create simple shell scripts directly inside your + # # configuration. For example, this adds a command 'my-hello' to your + # # environment: + # (pkgs.writeShellScriptBin "my-hello" '' + # echo "Hello, ${config.home.username}!" + # '') + zsh + zoom-us + rink + firefox + btop + libreoffice-fresh + rustup + rustc + macchina + hyprpaper + obs-studio + #xwaylandvideobridge + duf + grim + slurp + swappy + heroic + gamemode + gamescope + goverlay + rm-improved + nodejs_20 + playerctl + pamixer + openai-whisper + libreoffice + zathura + imv + libsixel + prismlauncher + godot_4 + wf-recorder + jellyfin-media-player + pcmanfm + hyprpicker + mangohud + gamemode + #discord + mpv + rofi + xdg-user-dirs + xarchiver + atuin + blender + wineWowPackages.stable + gdb + alsa-utils + brave + slack + zed-editor + dualsensectl + mangayomi + #inputs.way-inhibitor.packages.${pkgs.system}.default + inputs.zen-browser.packages.${pkgs.system}.twilight + element-desktop + scrcpy + fuse + fuse-emulator + fuse3 + alacritty + ]; +} diff --git a/home/mrfluffy.nix b/home/mrfluffy.nix new file mode 100755 index 0000000..17d9697 --- /dev/null +++ b/home/mrfluffy.nix @@ -0,0 +1,124 @@ +{ + config, + pkgs, + inputs, + lib, + window_manager, + ... +}: +let +in +{ + imports = [ + inputs.nix-colors.homeManagerModules.default + inputs.stylix.homeManagerModules.stylix + inputs.nixcord.homeModules.nixcord + #inputs.niri.homeModules.niri + ./sessionVars.nix + ../dots/foot.nix + ../dots/waybar.nix + ../dots/zsh.nix + ../dots/nixcord.nix + ../dots/hyprlock.nix + ./stylix.nix + ./homePkgs.nix + ../dots/xdg.nix + ../dots/river.nix + ../dots/niri.nix + ../dots/hyprland.nix + ]; + + # you can go look here for a list of color schemes https://github.com/tinted-theming/schemes + colorScheme = inputs.nix-colors.colorSchemes.hardcore; + stylix.base16Scheme.base00 = "141414"; + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "mrfluffy"; + home.homeDirectory = "/home/mrfluffy"; + + # This value determines the Home Manager release that your configuration is + # compatible with. This helps avoid breakage when a new Home Manager release + # introduces backwards incompatible changes. + # + # You should not change this value, even if you update Home Manager. If you do + # want to update the value, then make sure to first check the Home Manager + # release notes. + home.stateVersion = "23.11"; # Please read the comment before changing. + + # The home.packages option allows you to install Nix packages into your + # environment. + gtk = { + enable = true; + iconTheme = { + name = "Dracula"; + package = pkgs.dracula-icon-theme; + }; + }; + + home.packages = with pkgs; [ + swaybg + lswt + wlr-randr + #inputs.ladybird.packages."${pkgs.system}".ladybird + + # # Adds the 'hello' command to your environment. It prints a friendly + # # "Hello, world!" when run. + # pkgs.hello + + # # It is sometimes useful to fine-tune packages, for example, by applying + # # overrides. You can do that directly here, just don't forget the + # # parentheses. Maybe you want to install Nerd Fonts with a limited number of + # # fonts? + # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) + + # # You can also create simple shell scripts directly inside your + # # configuration. For example, this adds a command 'my-hello' to your + # # environment: + # (pkgs.writeShellScriptBin "my-hello" '' + # echo "Hello, ${config.home.username}!" + # '') + ]; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; + + # # You can also set the file content immediately. + # ".gradle/gradle.properties".text = '' + # org.gradle.console=verbose + # org.gradle.daemon.idletimeout=3600000 + # ''; + # + ".config/nixpkgs/config.nix".text = '' + { allowUnfree = true; } + ''; + ".config/doom".source = ../dots/doom; + #".config/kitty".source = ../../universal/dots/kitty; + #".config/nvim".source = ../../universal/dots/nvim; + "Pictures/Wallpapers".source = ../assets/Wallpapers; + + }; + + # Home Manager can also manage your environment variables through + # 'home.sessionVariables'. If you don't want to manage your shell through Home + # Manager then you have to manually source 'hm-session-vars.sh' located at + # either + # + # ~/.nix-profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # /etc/profiles/per-user/mrfluffy/etc/profile.d/hm-session-vars.sh + # + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +} diff --git a/home/sessionVars.nix b/home/sessionVars.nix new file mode 100755 index 0000000..a44ca70 --- /dev/null +++ b/home/sessionVars.nix @@ -0,0 +1,46 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + home.sessionVariables = { + EDITOR = "emacs"; + SDL_VIDEODRIVER = "wayland"; + _JAVA_AWT_WM_NONREPARENTING = 1; + QT_QPA_PLATFORM = "wayland"; + #XDG_CURRENT_DESKTOP = "hyprland"; + #XDG_SESSION_DESKTOP = "hyprland"; + MOZ_ENABLE_WAYLAND = 1; + WLR_DRM_NO_ATOMIC = 1; + VDPAU_DRIVER = "radeonsi"; + LIBVA_DRIVER_NAME = "radeonsi"; + OLLAMA_HOST = "0.0.0.0"; + PATH = "$HOME/.config/emacs/bin:$PATH"; + FZF_DEFAULT_COMMAND = "${lib.getExe pkgs.ripgrep} ~ --files --hidden"; + FZF_DEFAULT_OPTS = "--height 30% --reverse"; + FZF_CTRL_R_OPTS = "--sort"; + MANROFFOPT = "-c"; + MANPAGER = "sh -c 'col -bx | ${lib.getExe pkgs.bat} -l man -p'"; + LIBVIRT_DEFAULT_URI = "qemu:///system"; + CARGO_HOME = "$XDG_DATA_HOME/cargo"; + GNUPGHOME = "$XDG_DATA_HOME/gnupg"; + GOPATH = "$XDG_DATA_HOME/go"; + GRADLE_USER_HOME = "$XDG_DATA_HOME/gradle"; + IPYTHONDIR = "$XDG_CONFIG_HOMEipython"; + JUPYTER_CONFIG_DIR = "$XDG_CONFIG_HOME/jupyter"; + LESSHISTFILE = "$XDG_CACHE_HOME/less/history"; + NUGET_PACKAGES = "$XDG_CACHE_HOME/NuGetPackages"; + PYTHONSTARTUP = "$XDG_CONFIG_HOME/python/pythonrc"; + KERAS_HOME = "$XDG_STATE_HOME/keras"; + RUSTUP_HOME = "$XDG_DATA_HOME/rustup"; + XCOMPOSECACHE = "$XDG_CACHE_HOME/X11/xcompose"; + SSB_HOME = "$XDG_DATA_HOME/zoom"; + HISTFILE = "$XDG_STATE_HOME/zsh/history"; + ZDOTDIR = "$HOME/.config/zsh"; + ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=#64677a,bold,underline"; + }; + +} diff --git a/home/stylix.nix b/home/stylix.nix new file mode 100755 index 0000000..b1b76e6 --- /dev/null +++ b/home/stylix.nix @@ -0,0 +1,73 @@ +{ + pkgs, + lib, + config, + ... +}: +let + inherit (config.colorScheme) palette; + oreo = pkgs.callPackage ../personalPKGS/oreo.nix { }; +in +{ + stylix = { + enable = true; + autoEnable = false; + targets.gtk.enable = true; + targets.vscode.enable = true; + targets.gitui.enable = true; + targets.foot.enable = true; + targets.river.enable = true; + targets.hyprland.enable = true; + targets.waybar.enable = true; + targets.nixcord.enable = true; + polarity = "dark"; + image = ../assets/wallpapers/001.jpg; + base16Scheme = { + base00 = "${palette.base00}"; + base01 = "${palette.base01}"; + base02 = "${palette.base02}"; + base03 = "${palette.base03}"; + base04 = "${palette.base04}"; + base05 = "${palette.base05}"; + base06 = "${palette.base06}"; + base07 = "${palette.base07}"; + base08 = "${palette.base08}"; + base09 = "${palette.base09}"; + base0A = "${palette.base0A}"; + base0B = "${palette.base0B}"; + base0C = "${palette.base0C}"; + base0D = "${palette.base0D}"; + base0E = "${palette.base0E}"; + base0F = "${palette.base0F}"; + }; + fonts = { + serif = { + package = pkgs.open-sans; + name = "Open Sans"; + }; + sansSerif = { + package = pkgs.open-sans; + name = "Open Sans"; + }; + monospace = { + package = pkgs.iosevka-comfy.comfy; + name = "Iosevka Comfy"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + sizes = { + applications = 12; + desktop = 12; + popups = 14; + terminal = 16; + }; + }; + cursor = { + package = oreo.override { colors = [ "oreo_spark_pink_cursors" ]; }; + name = "oreo_spark_pink_cursors"; + size = 32; + }; + }; +} diff --git a/home/work.nix b/home/work.nix new file mode 100755 index 0000000..9f550cc --- /dev/null +++ b/home/work.nix @@ -0,0 +1,126 @@ +{ + config, + pkgs, + inputs, + lib, + window_manager, + ... +}: +let +in +{ + imports = [ + inputs.nix-colors.homeManagerModules.default + inputs.stylix.homeManagerModules.stylix + inputs.nixcord.homeModules.nixcord + #inputs.niri.homeModules.niri + ./sessionVars.nix + ../dots/foot.nix + ../dots/waybar.nix + ../dots/zsh.nix + ../dots/nixcord.nix + ../dots/hyprlock.nix + ./stylix.nix + ./homePkgs.nix + ../dots/xdg.nix + ../dots/river.nix + ../dots/niri.nix + ../dots/hyprland.nix + ]; + + # you can go look here for a list of color schemes https://github.com/tinted-theming/schemes + colorScheme = inputs.nix-colors.colorSchemes.hardcore; + stylix.base16Scheme.base00 = "141414"; + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "work"; + home.homeDirectory = "/home/work"; + + # This value determines the Home Manager release that your configuration is + # compatible with. This helps avoid breakage when a new Home Manager release + # introduces backwards incompatible changes. + # + # You should not change this value, even if you update Home Manager. If you do + # want to update the value, then make sure to first check the Home Manager + # release notes. + home.stateVersion = "23.11"; # Please read the comment before changing. + + # The home.packages option allows you to install Nix packages into your + # environment. + gtk = { + enable = true; + iconTheme = { + name = "Dracula"; + package = pkgs.dracula-icon-theme; + }; + }; + + home.packages = with pkgs; [ + swaybg + lswt + wlr-randr + brave + swaynotificationcenter + #inputs.ladybird.packages."${pkgs.system}".ladybird + + # # Adds the 'hello' command to your environment. It prints a friendly + # # "Hello, world!" when run. + # pkgs.hello + + # # It is sometimes useful to fine-tune packages, for example, by applying + # # overrides. You can do that directly here, just don't forget the + # # parentheses. Maybe you want to install Nerd Fonts with a limited number of + # # fonts? + # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) + + # # You can also create simple shell scripts directly inside your + # # configuration. For example, this adds a command 'my-hello' to your + # # environment: + # (pkgs.writeShellScriptBin "my-hello" '' + # echo "Hello, ${config.home.username}!" + # '') + ]; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; + + # # You can also set the file content immediately. + # ".gradle/gradle.properties".text = '' + # org.gradle.console=verbose + # org.gradle.daemon.idletimeout=3600000 + # ''; + # + ".config/nixpkgs/config.nix".text = '' + { allowUnfree = true; } + ''; + ".config/doom".source = ../dots/doom; + #".config/kitty".source = ../../universal/dots/kitty; + #".config/nvim".source = ../../universal/dots/nvim; + "Pictures/Wallpapers".source = ../assets/Wallpapers; + + }; + + # Home Manager can also manage your environment variables through + # 'home.sessionVariables'. If you don't want to manage your shell through Home + # Manager then you have to manually source 'hm-session-vars.sh' located at + # either + # + # ~/.nix-profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # /etc/profiles/per-user/mrfluffy/etc/profile.d/hm-session-vars.sh + # + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +} diff --git a/personalPKGS/oreo.nix b/personalPKGS/oreo.nix new file mode 100755 index 0000000..5523943 --- /dev/null +++ b/personalPKGS/oreo.nix @@ -0,0 +1,74 @@ +{ + config, + stdenv, + fetchurl, + lib, + colors ? [ "oreo_white_cursors" ], +}: + +let + pname = "oreo-cursors"; + +in +lib.checkListOfEnum "${pname}: color variants" + [ + "oreo_white_cursors" + "oreo_teal_cursors" + "oreo_red_cursors" + "oreo_purple_cursors" + "oreo_pink_cursors" + "oreo_grey_cursors" + "oreo_blue_cursors" + "oreo_black_cursors" + "oreo_spark_violet_cursors" + "oreo_spark_red_cursors" + "oreo_spark_purple_cursors" + "oreo_spark_pink_cursors" + "oreo_spark_orange_cursors" + "oreo_spark_lite_cursors" + "oreo_spark_lime_cursors" + "oreo_spark_light_pink_cursors" + "oreo_spark_green_cursors" + "oreo_spark_dark_cursors" + "oreo_spark_blue_cursors" + "all" + ] + colors + + stdenv.mkDerivation + { + name = "${pname}"; + version = "final"; + src = fetchurl { + url = "https://github.com/mrfluffy-dev/oreo-cursor/releases/download/v1/final.tar.gz"; + hash = "sha256-b10pr119XrP8qAj5U0kOJ061pbqv27iCEeVIvT7w5bk="; + }; + nativeBuildInputs = [ ]; + + dontRewriteSymlinks = true; + + propagatedBuildInputs = [ ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/icons + # see if colors has "all" in it, if so, use all the colors + if [[ " ${builtins.toString colors} " =~ " all " ]]; then + cp -r * $out/share/icons/ + else + for color in ${builtins.toString colors}; do + cp -r $color $out/share/icons/ + done + fi + + runHook postInstall + ''; + + meta = with lib; { + description = "oreo-cursors but purple"; + homepage = "https://github.com/varlesh/oreo-cursors?tab=readme-ov-file"; + platforms = platforms.linux; + license = licenses.gpl2; + maintainers = with maintainers; [ mrfluffy ]; + }; + } diff --git a/system/boot.nix b/system/boot.nix new file mode 100755 index 0000000..8baad42 --- /dev/null +++ b/system/boot.nix @@ -0,0 +1,48 @@ +{ + config, + lib, + pkgs, + systemName, + ... +}: + +{ + # Use the systemd-boot EFI boot loader. + boot = { + loader = { + systemd-boot = { + enable = true; + }; + efi.canTouchEfiVariables = true; + }; + initrd.kernelModules = lib.mkMerge [ + (lib.mkIf (systemName == "laptop") [ + "kvm" + ]) + (lib.mkIf (systemName == "pc") [ + "amdgpu" + "kvm" + ]) + ]; + + kernelPackages = pkgs.linuxPackages_latest; + kernelParams = lib.mkMerge [ + (lib.mkIf (systemName == "laptop") [ + "ipv6e=1" + "i915.force_probe=46a6" + ]) + (lib.mkIf (systemName == "pc") [ + "video=2560x1440x32" + "ipv6e=1" + ]) + ]; + + plymouth = { + enable = true; + themePackages = [ + pkgs.plymouth-matrix-theme + ]; + theme = "matrix"; + }; + }; +} diff --git a/system/fonts.nix b/system/fonts.nix new file mode 100755 index 0000000..18fce21 --- /dev/null +++ b/system/fonts.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + fonts.packages = with pkgs; [ + ubuntu_font_family + siji + unifont + noto-fonts + source-han-code-jp + source-han-sans + nerd-fonts.zed-mono + nerd-fonts.symbols-only + ]; +} diff --git a/system/hardware.nix b/system/hardware.nix new file mode 100755 index 0000000..5bb8cf2 --- /dev/null +++ b/system/hardware.nix @@ -0,0 +1,64 @@ +{ + config, + lib, + pkgs, + systemName, + ... +}: + +{ + # hardware stuff + hardware.graphics = lib.mkMerge [ + (lib.mkIf (systemName == "laptop") { + enable = true; + enable32Bit = true; + extraPackages = with pkgs; [ + intel-media-driver + intel-vaapi-driver + vpl-gpu-rt + libva + vaapiVdpau + libvdpau-va-gl + ]; + }) + (lib.mkIf (systemName == "pc") { + enable = true; + enable32Bit = true; + extraPackages = with pkgs; [ + rocmPackages.rocm-runtime + rocmPackages.clr.icd + rocmPackages.rocm-smi + rocmPackages.clr + rocmPackages.hipblas + rocmPackages.rocblas + rocmPackages.rocsolver + rocmPackages.rocm-comgr + rocmPackages.rocsparse + libva + vaapiVdpau + libvdpau-va-gl + ]; + }) + ]; + + hardware.bluetooth.enable = true; # enables support for Bluetooth + hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot + # hardware.pulseaudio = { + # package = pkgs.pulseaudioFull; + # }; + hardware.bluetooth.settings = { + General = { + Enable = "Source,Sink,Media,Socket"; + #Experimental = true; + }; + }; + hardware.opentabletdriver.enable = true; + hardware.opentabletdriver.daemon.enable = true; + # Enable sound. + # sound.enable = true; + #hardware.pulseaudio = { + # enable = true; + # package = pkgs.pulseaudioFull; + #}; + +} diff --git a/system/inputMethods.nix b/system/inputMethods.nix new file mode 100755 index 0000000..dc9e4cb --- /dev/null +++ b/system/inputMethods.nix @@ -0,0 +1,46 @@ +{ + config, + lib, + pkgs, + systemName, + ... +}: + +{ + console.keyMap = "ie"; + i18n = lib.mkMerge [ + (lib.mkIf (systemName == "laptop") { + defaultLocale = "en_IE.UTF-8"; + inputMethod = { + enable = true; + type = "fcitx5"; + fcitx5.addons = with pkgs; [ + fcitx5-mozc + fcitx5-gtk + ]; + }; + extraLocaleSettings = { + LC_ADDRESS = "en_IE.UTF-8"; + LC_IDENTIFICATION = "en_IE.UTF-8"; + LC_MEASUREMENT = "en_IE.UTF-8"; + LC_MONETARY = "en_IE.UTF-8"; + LC_NAME = "en_IE.UTF-8"; + LC_NUMERIC = "en_IE.UTF-8"; + LC_PAPER = "en_IE.UTF-8"; + LC_TELEPHONE = "en_IE.UTF-8"; + LC_TIME = "en_IE.UTF-8"; + }; + }) + (lib.mkIf (systemName == "pc") { + inputMethod = { + enable = true; + type = "fcitx5"; + fcitx5.addons = with pkgs; [ + fcitx5-mozc + fcitx5-gtk + ]; + }; + }) + ]; + +} diff --git a/system/network.nix b/system/network.nix new file mode 100755 index 0000000..00524d2 --- /dev/null +++ b/system/network.nix @@ -0,0 +1,35 @@ +{ + config, + lib, + pkgs, + systemName, + ... +}: + +{ + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + #networking.hostName = "mrfluffyLaptop"; # Define your hostname. + networking.hostName = lib.mkMerge [ + (lib.mkIf (systemName == "laptop") "mrfluffyLaptop") + (lib.mkIf (systemName == "pc") "mrfluffyPC") + ]; + + networking.firewall.enable = false; + # Pick only one of the below networking options. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + #networking.enableIPv6 = false; + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + networking.extraHosts = '' + 127.0.0.0 localhost + ''; + networking.nameservers = [ "192.168.1.180" ]; + # # environment.etc = { + # # "resolv.conf".text = "nameserver 192.168.1.180\noptions edns0 trust-ad\nsearch home\n"; + # # }; +} diff --git a/system/nixOSPkgs.nix b/system/nixOSPkgs.nix new file mode 100755 index 0000000..94e26e5 --- /dev/null +++ b/system/nixOSPkgs.nix @@ -0,0 +1,140 @@ +{ + config, + lib, + pkgs, + pkgs-stable, + ... +}: +let + inherit (pkgs) anime4k; + + # Use writeText instead of writeLua luacheck can't cry about the long lines + autoAnime4k = pkgs.writeText "auto-anime4k-switcher.lua" '' + local function get_nearest(x, numbers) + local min_index = nil + local min_dist = math.huge + + for i, n in ipairs(numbers) do + local d = math.abs(n - x) + if d < min_dist then + min_index = i + min_dist = d + end + end + + return numbers[min_index] + end + + -- Fast + -- local shader_map = { + -- [1080] = "${anime4k}/Anime4K_Clamp_Highlights.glsl:${anime4k}/Anime4K_Restore_CNN_M.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl:${anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_S.glsl", + -- [720] = "${anime4k}/Anime4K_Clamp_Highlights.glsl:${anime4k}/Anime4K_Restore_CNN_Soft_M.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl:${anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_S.glsl", + -- [480] = "${anime4k}/Anime4K_Clamp_Highlights.glsl:${anime4k}/Anime4K_Upscale_Denoise_CNN_x2_M.glsl:${anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_S.glsl" + -- } + -- HQ + local shader_map = { + [1080] = "${anime4k}/Anime4K_Clamp_Highlights.glsl:${anime4k}/Anime4K_Restore_CNN_VL.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_VL.glsl:${anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl", + [720] = "${anime4k}/Anime4K_Clamp_Highlights.glsl:${anime4k}/Anime4K_Restore_CNN_Soft_VL.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_VL.glsl:${anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl", + [480] = "${anime4k}/Anime4K_Clamp_Highlights.glsl:${anime4k}/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:${anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl" + } + + local resolutions = { 1080, 720, 480 } + + mp.register_event("file-loaded", function() + local height = mp.get_property_number("video-params/h") + + local shaders = shader_map[height] + if not shaders then + height = get_nearest(height, resolutions) + shaders = shader_map[height] + end + + mp.osd_message("Using " .. height .. "p Anime4K shaders") + mp.commandv("change-list", "glsl-shaders", "set", shaders) + end) + ''; +in + +{ + nixpkgs.config = { + allowUnfree = true; + }; + + nixpkgs.overlays = [ + (self: super: { + + mpv = super.wrapMpv (super.mpv.unwrapped.override { sixelSupport = true; }) { + scripts = [ self.mpvScripts.mpris ]; + + }; + }) + ]; + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + programs.direnv = { + enable = true; + enableZshIntegration = true; + nix-direnv.enable = true; + silent = true; + }; + programs.virt-manager.enable = true; + programs.zsh.enable = true; + programs.corectrl.enable = true; + programs.steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + }; + # enable dynamic bin executables + programs.nix-ld.enable = true; + programs.nix-ld.libraries = with pkgs; [ + # add libraries here + libGL + ]; + + #backlight tool + programs.light.enable = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + neovim + wl-clipboard + bat + anime4k + socat + eza + wget + foot + spaceship-prompt + git + bitwarden + zip + xclip + fd + fzf + zotero + jdk11 + hunspell + hunspellDicts.en_US + pavucontrol + zoxide + xcp + polkit_gnome + unzip + rocmPackages.rccl + ffmpeg + libva-utils + nixfmt-rfc-style + nil + kdePackages.qt6ct + ripgrep + xwayland-satellite + ]; +} diff --git a/system/services.nix b/system/services.nix new file mode 100755 index 0000000..5f8678b --- /dev/null +++ b/system/services.nix @@ -0,0 +1,220 @@ +{ + config, + lib, + pkgs, + systemName, + ... +}: + +{ + # Enable CUPS to print documents. + services.printing.enable = true; + + # power managment + services.power-profiles-daemon.enable = true; + + services.gnome.gnome-keyring.enable = true; + # Configure keymap in X11 + # services.xserver.xkb.layout = "us"; + # services.xserver.xkb.options = "eurosign:e,caps:escape"; + # Enable the X11 windowing system. + # services.xserver.enable = true; + + # Enable the GNOME Desktop Environment. + # services.xserver.displayManager.gdm.enable = true; + # services.xserver.desktopManager.gnome.enable = true; + + services.pipewire = lib.mkMerge [ + (lib.mkIf (systemName == "laptop") { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + extraConfig.pipewire = { + # the key "00-clock-rate" names the drop-in file + "00-clock-rate" = { + # these properties go under [context.properties] in pipewire.conf + context.properties = { + # force the graph sample rate + "default.clock.rate" = 48000; + # tell PipeWire which other rates you allow it to switch to + "default.clock.allowed-rates" = [ + 44100 + 48000 + 96000 + ]; + # quantum = number of frames per period (i.e. buffer size) + "default.clock.min-quantum" = 32; + "default.clock.max-quantum" = 8192; + }; + }; + "99-input-denoising" = { + "context.modules" = [ + { + "name" = "libpipewire-module-filter-chain"; + "args" = { + "node.description" = "Noise Canceling source"; + "media.name" = "Noise Canceling source"; + "filter.graph" = { + "nodes" = [ + { + "type" = "ladspa"; + "name" = "rnnoise"; + "plugin" = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so"; + "label" = "noise_suppressor_mono"; + "control" = { + "VAD Threshold (%)" = 20.0; + "VAD Grace Period (ms)" = 200; + "Retroactive VAD Grace (ms)" = 0; + }; + } + ]; + }; + + "capture.props" = { + "node.name" = "effect_input.rnnoise"; + "node.passive" = true; + "audio.rate" = 48000; + }; + "playback.props" = { + "node.name" = "effect_output.rnnoise"; + "media.class" = "Audio/Source"; + "audio.rate" = 48000; + }; + }; + } + ]; + }; + }; + + }) + (lib.mkIf (systemName == "pc") { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + extraConfig.pipewire = { + "92-low-latency" = { + "context.properties" = { + "default.clock.rate" = 48000; + "default.clock.allowed-rates" = [ 48000 ]; + }; + }; + "99-input-denoising" = { + "context.modules" = [ + { + "name" = "libpipewire-module-filter-chain"; + "args" = { + "node.description" = "Noise Canceling source"; + "media.name" = "Noise Canceling source"; + "filter.graph" = { + "nodes" = [ + { + "type" = "ladspa"; + "name" = "rnnoise"; + "plugin" = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so"; + "label" = "noise_suppressor_mono"; + "control" = { + "VAD Threshold (%)" = 50.0; + "VAD Grace Period (ms)" = 200; + "Retroactive VAD Grace (ms)" = 0; + }; + } + ]; + }; + + "capture.props" = { + "node.name" = "effect_input.rnnoise"; + "node.passive" = true; + "audio.rate" = 48000; + }; + "playback.props" = { + "node.name" = "effect_output.rnnoise"; + "media.class" = "Audio/Source"; + "audio.rate" = 48000; + }; + }; + } + ]; + }; + }; + + }) + ]; + + services.blueman.enable = true; + + # Enable touchpad support (enabled default in most desktopManager). + services.libinput = { + enable = true; + touchpad = { + tapping = true; + #horizontalScrolling = false; + }; + }; + # List services that you want to enable: + services.emacs = { + enable = true; + package = pkgs.emacs30-pgtk; # replace with emacs-gtk, or a version provided by the community overlay if desired. + }; + services.sunshine = lib.mkIf (systemName == "pc") { + enable = true; + settings = { + sunshine_name = "nixos"; + port = 47989; + }; + applications = { + apps = [ + { + name = "Steam"; + output = "steam.txt"; + detached = [ "${pkgs.util-linux}/bin/setsid ${pkgs.steam}/bin/steam steam://open/gamepadui" ]; + image-path = "steam.png"; + } + ]; + }; + capSysAdmin = true; + openFirewall = true; + }; + + services.ollama = lib.mkIf (systemName == "pc") { + enable = true; + port = 11434; + host = "0.0.0.0"; + acceleration = "rocm"; + environmentVariables = { + HSA_OVERRIDE_GFX_VERSION = "11.0.0"; + }; + }; + + services.gvfs.enable = true; + # services.resolved = { + # enable = true; + # dnssec = "true"; + # domains = [ "~." ]; + # fallbackDns = [ "192.168.1.180" ]; + # dnsovertls = "true"; + # }; + + virtualisation.libvirtd.enable = true; + # Enable the OpenSSH daemon. + services.openssh.enable = true; + # laptop screen lid colose stuff + services.logind = lib.mkIf (systemName == "laptop") { + lidSwitch = "suspend-then-hibernate"; + lidSwitchExternalPower = "suspend-then-hibernate"; + lidSwitchDocked = "suspend-then-hibernate"; + }; + #suspend stuff + systemd.sleep.extraConfig = lib.mkIf (systemName == "laptop") '' + HibernateDelaySec=120min + SuspendState=mem + ''; + #udev rules + #services.udev.extraRules = '' + # KERNEL=="hidraw*", KERNELS=="*054C:0CE6*", MODE="0660", TAG+="uaccess" + #''; + +} diff --git a/system/wm.nix b/system/wm.nix new file mode 100755 index 0000000..865d469 --- /dev/null +++ b/system/wm.nix @@ -0,0 +1,5 @@ +{ config, lib, pkgs, ... }: + +{ + +}