diff --git a/flake.lock b/flake.lock index c4fd86f..72bf0bc 100644 --- a/flake.lock +++ b/flake.lock @@ -1,27 +1,5 @@ { "nodes": { - "anyrun": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems" - }, - "locked": { - "lastModified": 1735301051, - "narHash": "sha256-jU88Q9tP4vuvWYGQcmOdFwI9e2uMPVYJHbXdiklIH9o=", - "owner": "Kirottu", - "repo": "anyrun", - "rev": "06017e753c8886d5296768dca80745ee09402a2d", - "type": "github" - }, - "original": { - "owner": "Kirottu", - "repo": "anyrun", - "type": "github" - } - }, "devshell": { "inputs": { "nixpkgs": [ @@ -58,27 +36,6 @@ } }, "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "anyrun", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -101,7 +58,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1731533236, @@ -172,11 +129,11 @@ ] }, "locked": { - "lastModified": 1737630279, - "narHash": "sha256-wJQCxyMRc4P26zDrHmZiRD5bbfcJpqPG3e2djdGG3pk=", + "lastModified": 1738448366, + "narHash": "sha256-4ATtQqBlgsGqkHTemta0ydY6f7JBRXz4Hf574NHQpkg=", "owner": "nix-community", "repo": "home-manager", - "rev": "0db5c8bfcce78583ebbde0b2abbc95ad93445f7c", + "rev": "18fa9f323d8adbb0b7b8b98a8488db308210ed93", "type": "github" }, "original": { @@ -193,11 +150,11 @@ ] }, "locked": { - "lastModified": 1737480538, - "narHash": "sha256-rk/cmrvq3In0TegW9qaAxw+5YpJhRWt2p74/6JStrw0=", + "lastModified": 1738407251, + "narHash": "sha256-IDrc1qvFolaEDST/dWKgDcmJsemlfP4Yw6kh5O9TMVs=", "owner": "nix-community", "repo": "home-manager", - "rev": "4481a16d1ac5bff4a77c608cefe08c9b9efe840d", + "rev": "055c67056d87577a39af4144ad5eadb093cfb97d", "type": "github" }, "original": { @@ -236,8 +193,10 @@ }, "matugen": { "inputs": { - "nixpkgs": "nixpkgs", - "systems": "systems_2" + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems" }, "locked": { "lastModified": 1716548249, @@ -262,11 +221,11 @@ ] }, "locked": { - "lastModified": 1737504076, - "narHash": "sha256-/B4XJnzYU/6K1ZZOBIgsa3K4pqDJrnC2579c44c+4rI=", + "lastModified": 1738277753, + "narHash": "sha256-iyFcCOk0mmDiv4ut9mBEuMxMZIym3++0qN1rQBg8FW0=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "65cc1fa8e36ceff067daf6cfb142331f02f524d3", + "rev": "49b807fa7c37568d7fbe2aeaafb9255c185412f9", "type": "github" }, "original": { @@ -293,11 +252,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1716330097, - "narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=", + "lastModified": 1738410390, + "narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2", + "rev": "3a228057f5b619feb3186e986dbe76278d707b6e", "type": "github" }, "original": { @@ -307,27 +266,11 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1737181194, - "narHash": "sha256-eoGbMQQTjobtGaPyXInuciinBUWOHG68Ft9zcJer6LE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "947eb2af89cbad3d4ffb8bdd2557c48045b7f497", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixvim": { "inputs": { "devshell": "devshell", "flake-compat": "flake-compat", - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts", "git-hooks": "git-hooks", "home-manager": "home-manager_2", "nix-darwin": "nix-darwin", @@ -338,11 +281,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1737645531, - "narHash": "sha256-2cLk8KXpFZhMUFg61Fb8ykTp0VWqJSwcg/1o30nDYVo=", + "lastModified": 1738468832, + "narHash": "sha256-+YOdIULLio6C6mlZvW3cg1oHLLbuNh0Hx82zFTaP9SM=", "owner": "nix-community", "repo": "nixvim", - "rev": "e22bb46c8863c30a791a4183aa9013d542cc5be5", + "rev": "8104356af6536df366eea4b8bcc409320323b959", "type": "github" }, "original": { @@ -361,11 +304,11 @@ ] }, "locked": { - "lastModified": 1737372689, - "narHash": "sha256-nH3zK2ki0fd5o5qvbGHxukE4qnOLJa1uCzoDObG5vrE=", + "lastModified": 1737924095, + "narHash": "sha256-9RO/IlxiE7bpY7GYsdDMNB533PnDOBo9UvYyXXqlN4c=", "owner": "NuschtOS", "repo": "search", - "rev": "570cc17bbc25650eb7d69e4fcda8cfd2f1656922", + "rev": "5efc9c966bb9bdad07a3c28667eac38b758c6f18", "type": "github" }, "original": { @@ -376,11 +319,10 @@ }, "root": { "inputs": { - "anyrun": "anyrun", "home-manager": "home-manager", "matugen": "matugen", "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "nixvim": "nixvim" } }, @@ -400,21 +342,6 @@ } }, "systems_2": { - "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_3": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -437,11 +364,11 @@ ] }, "locked": { - "lastModified": 1737483750, - "narHash": "sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo=", + "lastModified": 1738070913, + "narHash": "sha256-j6jC12vCFsTGDmY2u1H12lMr62fnclNjuCtAdF1a4Nk=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "f2cc121df15418d028a59c9737d38e3a90fbaf8f", + "rev": "bebf27d00f7d10ba75332a0541ac43676985dea3", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6a11d89..857537d 100644 --- a/flake.nix +++ b/flake.nix @@ -1,17 +1,16 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - matugen.url = "github:Theaninova/matugen/add-home-manager-module"; - nixvim = { - url = "github:nix-community/nixvim"; + matugen = { + url = "github:Theaninova/matugen/add-home-manager-module"; inputs.nixpkgs.follows = "nixpkgs"; }; - anyrun = { - url = "github:Kirottu/anyrun"; + nixvim = { + url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; }; nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest"; @@ -22,7 +21,6 @@ nixpkgs, home-manager, nixvim, - anyrun, matugen, nix-flatpak, ... @@ -42,13 +40,17 @@ }; overlays = [ (final: prev: { - anyrunPlugins = anyrun.packages.${prev.system}; matugen = matugen.packages.${prev.system}.default; gccdiag = prev.callPackage ./overlays/gccdiag { }; gbmonctl = prev.callPackage ./overlays/gbmonctl { }; lpc21isp = prev.callPackage ./overlays/lpc21isp { }; rquickshare = prev.callPackage ./overlays/rquickshare { }; rastertokpsl-re = prev.callPackage ./overlays/rastertokpsl-re { }; + plymouth = prev.plymouth.overrideAttrs ( + final: prev: { + patches = prev.patches ++ [ ]; + } + ); }) ]; } diff --git a/hosts/MONSTER/default.nix b/hosts/MONSTER/default.nix index 5d6b8d6..3ceac82 100644 --- a/hosts/MONSTER/default.nix +++ b/hosts/MONSTER/default.nix @@ -45,28 +45,41 @@ }; shell.components = { - waybar.enable = true; dunst.enable = true; + firefox-pip.enable = true; + flameshot.enable = true; + gnome-keyring.enable = true; + hyprpicker.enable = true; + kitty.enable = true; + walker.enable = true; + waybar.enable = true; }; desktops = { hyprland.enable = true; }; locale.preset.theaninova.enable = true; - services.ollama = { - enable = true; - acceleration = "rocm"; + services = { + ollama = { + enable = false; + acceleration = "rocm"; + }; + + printing = { + enable = true; + drivers = with pkgs; [ + # rastertokpsl-re + ]; + }; + + xserver.xkb.variant = "altgr-intl"; + xserver.xkb.layout = "us"; + + airprint.enable = true; + + udev.packages = with pkgs; [ android-udev-rules ]; }; - services.printing = { - enable = true; - drivers = with pkgs; [ - # rastertokpsl-re - ]; - }; - - services.xserver.xkb.variant = "altgr-intl"; - services.xserver.xkb.layout = "us"; hardware = { amdgpu.preset.default.enable = true; audio.preset.pipewire.enable = true; @@ -95,10 +108,6 @@ nerd-fonts.enable = true; }; - services.airprint.enable = true; - - services.udev.packages = with pkgs; [ android-udev-rules ]; - programs.zsh.enable = true; security.sudo.configFile = '' Defaults env_reset,pwfeedback,passprompt="󰟵 " diff --git a/modules/home-manager/default-apps.nix b/modules/home-manager/default-apps.nix deleted file mode 100644 index f40d1dc..0000000 --- a/modules/home-manager/default-apps.nix +++ /dev/null @@ -1,677 +0,0 @@ -{ config, ... }: { - xdg.mimeApps = { - enable = true; - defaultApplications = { -.3dm x-world/x-3dmf -.3dmf x-world/x-3dmf -.7z application/x-7z-compressed -.a application/octet-stream -.aab application/x-authorware-bin -.aam application/x-authorware-map -.aas application/x-authorware-seg -.abc text/vnd.abc -.acgi text/html -.afl video/animaflex -.ai application/postscript -.aif audio/aiff -.aif audio/x-aiff -.aifc audio/aiff -.aifc audio/x-aiff -.aiff audio/aiff -.aiff audio/x-aiff -.aim application/x-aim -.aip text/x-audiosoft-intra -.ani application/x-navi-animation -.aos application/x-nokia-9000-communicator-add-on-software -.aps application/mime -.arc application/octet-stream -.arj application/arj -.arj application/octet-stream -.art image/x-jg -.asf video/x-ms-asf -.asm text/x-asm -.asp text/asp -.asx application/x-mplayer2 -.asx video/x-ms-asf -.asx video/x-ms-asf-plugin -.au audio/basic -.au audio/x-au -.avi application/x-troff-msvideo -.avi video/avi -.avi video/msvideo -.avi video/x-msvideo -.avs video/avs-video -.bcpio application/x-bcpio -.bin application/mac-binary -.bin application/macbinary -.bin application/octet-stream -.bin application/x-binary -.bin application/x-macbinary -.bm image/bmp -.bmp image/bmp -.bmp image/x-windows-bmp -.boo application/book -.book application/book -.boz application/x-bzip2 -.bsh application/x-bsh -.bz application/x-bzip -.bz2 application/x-bzip2 -.c text/plain -.c text/x-c -.c++ text/plain -.cat application/vnd.ms-pki.seccat -.cc text/plain -.cc text/x-c -.ccad application/clariscad -.cco application/x-cocoa -.cdf application/cdf -.cdf application/x-cdf -.cdf application/x-netcdf -.cer application/pkix-cert -.cer application/x-x509-ca-cert -.cha application/x-chat -.chat application/x-chat -.class application/java -.class application/java-byte-code -.class application/x-java-class -.com application/octet-stream -.com text/plain -.conf text/plain -.cpio application/x-cpio -.cpp text/x-c -.cpt application/mac-compactpro -.cpt application/x-compactpro -.cpt application/x-cpt -.crl application/pkcs-crl -.crl application/pkix-crl -.crt application/pkix-cert -.crt application/x-x509-ca-cert -.crt application/x-x509-user-cert -.csh application/x-csh -.csh text/x-script.csh -.css application/x-pointplus -.css text/css -.csv text/csv -.cxx text/plain -.dcr application/x-director -.deepv application/x-deepv -.def text/plain -.der application/x-x509-ca-cert -.dif video/x-dv -.dir application/x-director -.dl video/dl -.dl video/x-dl -.doc application/msword -.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document -.dot application/msword -.dp application/commonground -.drw application/drafting -.dump application/octet-stream -.dv video/x-dv -.dvi application/x-dvi -.dwf drawing/x-dwf (old) -.dwf model/vnd.dwf -.dwg application/acad -.dwg image/vnd.dwg -.dwg image/x-dwg -.dxf application/dxf -.dxf image/vnd.dwg -.dxf image/x-dwg -.dxr application/x-director -.el text/x-script.elisp -.elc application/x-bytecode.elisp (compiled elisp) -.elc application/x-elc -.env application/x-envoy -.eot application/vnd.ms-fontobject -.eps application/postscript -.es application/x-esrehber -.etx text/x-setext -.evy application/envoy -.evy application/x-envoy -.exe application/octet-stream -.f text/plain -.f text/x-fortran -.f77 text/x-fortran -.f90 text/plain -.f90 text/x-fortran -.fdf application/vnd.fdf -.fif application/fractals -.fif image/fif -.flac audio/flac -.fli video/fli -.fli video/x-fli -.flo image/florian -.flx text/vnd.fmi.flexstor -.fmf video/x-atomic3d-feature -.for text/plain -.for text/x-fortran -.fpx image/vnd.fpx -.fpx image/vnd.net-fpx -.frl application/freeloader -.funk audio/make -.g text/plain -.g3 image/g3fax -.gif image/gif -.gl video/gl -.gl video/x-gl -.gsd audio/x-gsm -.gsm audio/x-gsm -.gsp application/x-gsp -.gss application/x-gss -.gtar application/x-gtar -.gz application/x-compressed -.gz application/x-gzip -.gzip application/x-gzip -.gzip multipart/x-gzip -.h text/plain -.h text/x-h -.hdf application/x-hdf -.help application/x-helpfile -.hgl application/vnd.hp-hpgl -.hh text/plain -.hh text/x-h -.hlb text/x-script -.hlp application/hlp -.hlp application/x-helpfile -.hlp application/x-winhelp -.hpg application/vnd.hp-hpgl -.hpgl application/vnd.hp-hpgl -.hqx application/binhex -.hqx application/binhex4 -.hqx application/mac-binhex -.hqx application/mac-binhex40 -.hqx application/x-binhex40 -.hqx application/x-mac-binhex40 -.hta application/hta -.htc text/x-component -.htm text/html -.html text/html -.htmls text/html -.htt text/webviewhtml -.htx text/html -.ice x-conference/x-cooltalk -.ico image/x-icon -.ics text/calendar -.idc text/plain -.ief image/ief -.iefs image/ief -.iges application/iges -.iges model/iges -.igs application/iges -.igs model/iges -.ima application/x-ima -.imap application/x-httpd-imap -.inf application/inf -.ins application/x-internett-signup -.ip application/x-ip2 -.isu video/x-isvideo -.it audio/it -.iv application/x-inventor -.ivr i-world/i-vrml -.ivy application/x-livescreen -.jam audio/x-jam -.jav text/plain -.jav text/x-java-source -.java text/plain -.java text/x-java-source -.jcm application/x-java-commerce -.jfif image/jpeg -.jfif image/pjpeg -.jfif-tbnl image/jpeg -.jpe image/jpeg -.jpe image/pjpeg -.jpeg image/jpeg -.jpeg image/pjpeg -.jpg image/jpeg -.jpg image/pjpeg -.jps image/x-jps -.js application/x-javascript -.js application/javascript -.js application/ecmascript -.js text/javascript -.js text/ecmascript -.json application/json -.jut image/jutvision -.kar audio/midi -.kar music/x-karaoke -.ksh application/x-ksh -.ksh text/x-script.ksh -.la audio/nspaudio -.la audio/x-nspaudio -.lam audio/x-liveaudio -.latex application/x-latex -.lha application/lha -.lha application/octet-stream -.lha application/x-lha -.lhx application/octet-stream -.list text/plain -.lma audio/nspaudio -.lma audio/x-nspaudio -.log text/plain -.lsp application/x-lisp -.lsp text/x-script.lisp -.lst text/plain -.lsx text/x-la-asf -.ltx application/x-latex -.lzh application/octet-stream -.lzh application/x-lzh -.lzx application/lzx -.lzx application/octet-stream -.lzx application/x-lzx -.m text/plain -.m text/x-m -.m1v video/mpeg -.m2a audio/mpeg -.m2v video/mpeg -.m3u audio/x-mpequrl -.man application/x-troff-man -.map application/x-navimap -.mar text/plain -.mbd application/mbedlet -.mc$ application/x-magic-cap-package-1.0 -.mcd application/mcad -.mcd application/x-mathcad -.mcf image/vasa -.mcf text/mcf -.mcp application/netmc -.me application/x-troff-me -.mht message/rfc822 -.mhtml message/rfc822 -.mid application/x-midi -.mid audio/midi -.mid audio/x-mid -.mid audio/x-midi -.mid music/crescendo -.mid x-music/x-midi -.midi application/x-midi -.midi audio/midi -.midi audio/x-mid -.midi audio/x-midi -.midi music/crescendo -.midi x-music/x-midi -.mif application/x-frame -.mif application/x-mif -.mime message/rfc822 -.mime www/mime -.mjf audio/x-vnd.audioexplosion.mjuicemediafile -.mjpg video/x-motion-jpeg -.mka audio/x-matroska -.mkv video/x-matroska -.mm application/base64 -.mm application/x-meme -.mme application/base64 -.mod audio/mod -.mod audio/x-mod -.moov video/quicktime -.mov video/quicktime -.movie video/x-sgi-movie -.mp2 audio/mpeg -.mp2 audio/x-mpeg -.mp2 video/mpeg -.mp2 video/x-mpeg -.mp2 video/x-mpeq2a -.mp3 audio/mpeg3 -.mp3 audio/x-mpeg-3 -.mp3 video/mpeg -.mp3 video/x-mpeg -.mp4 video/mp4 -.mpa audio/mpeg -.mpa video/mpeg -.mpc application/x-project -.mpe video/mpeg -.mpeg video/mpeg -.mpg audio/mpeg -.mpg video/mpeg -.mpga audio/mpeg -.mpp application/vnd.ms-project -.mpt application/x-project -.mpv application/x-project -.mpx application/x-project -.mrc application/marc -.ms application/x-troff-ms -.mv video/x-sgi-movie -.my audio/make -.mzz application/x-vnd.audioexplosion.mzz -.nap image/naplps -.naplps image/naplps -.nc application/x-netcdf -.ncm application/vnd.nokia.configuration-message -.nif image/x-niff -.niff image/x-niff -.nix application/x-mix-transfer -.nsc application/x-conference -.nvd application/x-navidoc -.o application/octet-stream -.oda application/oda -.ogg audio/ogg -.ogg video/ogg -.omc application/x-omc -.omcd application/x-omcdatamaker -.omcr application/x-omcregerator -.otf font/otf -.p text/x-pascal -.p10 application/pkcs10 -.p10 application/x-pkcs10 -.p12 application/pkcs-12 -.p12 application/x-pkcs12 -.p7a application/x-pkcs7-signature -.p7c application/pkcs7-mime -.p7c application/x-pkcs7-mime -.p7m application/pkcs7-mime -.p7m application/x-pkcs7-mime -.p7r application/x-pkcs7-certreqresp -.p7s application/pkcs7-signature -.part application/pro_eng -.pas text/pascal -.pbm image/x-portable-bitmap -.pcl application/vnd.hp-pcl -.pcl application/x-pcl -.pct image/x-pict -.pcx image/x-pcx -.pdb chemical/x-pdb -.pdf application/pdf -.pfunk audio/make -.pfunk audio/make.my.funk -.pgm image/x-portable-graymap -.pgm image/x-portable-greymap -.pic image/pict -.pict image/pict -.pkg application/x-newton-compatible-pkg -.pko application/vnd.ms-pki.pko -.pl text/plain -.pl text/x-script.perl -.plx application/x-pixclscript -.pm image/x-xpixmap -.pm text/x-script.perl-module -.pm4 application/x-pagemaker -.pm5 application/x-pagemaker -.png image/png -.pnm application/x-portable-anymap -.pnm image/x-portable-anymap -.pot application/mspowerpoint -.pot application/vnd.ms-powerpoint -.pov model/x-pov -.ppa application/vnd.ms-powerpoint -.ppm image/x-portable-pixmap -.pps application/mspowerpoint -.pps application/vnd.ms-powerpoint -.ppt application/mspowerpoint -.ppt application/powerpoint -.ppt application/vnd.ms-powerpoint -.ppt application/x-mspowerpoint -.pptx application/vnd.openxmlformats-officedocument.presentationml.presentation -.ppz application/mspowerpoint -.pre application/x-freelance -.prt application/pro_eng -.ps application/postscript -.psd application/octet-stream -.pvu paleovu/x-pv -.pwz application/vnd.ms-powerpoint -.py text/x-script.phyton -.pyc application/x-bytecode.python -.qcp audio/vnd.qcelp -.qd3 x-world/x-3dmf -.qd3d x-world/x-3dmf -.qif image/x-quicktime -.qt video/quicktime -.qtc video/x-qtc -.qti image/x-quicktime -.qtif image/x-quicktime -.ra audio/x-pn-realaudio -.ra audio/x-pn-realaudio-plugin -.ra audio/x-realaudio -.ram audio/x-pn-realaudio -.ras application/x-cmu-raster -.ras image/cmu-raster -.ras image/x-cmu-raster -.rast image/cmu-raster -.rar application/vnd.rar -.rexx text/x-script.rexx -.rf image/vnd.rn-realflash -.rgb image/x-rgb -.rm application/vnd.rn-realmedia -.rm audio/x-pn-realaudio -.rmi audio/mid -.rmm audio/x-pn-realaudio -.rmp audio/x-pn-realaudio -.rmp audio/x-pn-realaudio-plugin -.rng application/ringing-tones -.rng application/vnd.nokia.ringing-tone -.rnx application/vnd.rn-realplayer -.roff application/x-troff -.rp image/vnd.rn-realpix -.rpm audio/x-pn-realaudio-plugin -.rt text/richtext -.rt text/vnd.rn-realtext -.rtf application/rtf -.rtf application/x-rtf -.rtf text/richtext -.rtx application/rtf -.rtx text/richtext -.rv video/vnd.rn-realvideo -.s text/x-asm -.s3m audio/s3m -.saveme application/octet-stream -.sbk application/x-tbook -.scm application/x-lotusscreencam -.scm text/x-script.guile -.scm text/x-script.scheme -.scm video/x-scm -.sdml text/plain -.sdp application/sdp -.sdp application/x-sdp -.sdr application/sounder -.sea application/sea -.sea application/x-sea -.set application/set -.sgm text/sgml -.sgm text/x-sgml -.sgml text/sgml -.sgml text/x-sgml -.sh application/x-bsh -.sh application/x-sh -.sh application/x-shar -.sh text/x-script.sh -.shar application/x-bsh -.shar application/x-shar -.shtml text/html -.shtml text/x-server-parsed-html -.sid audio/x-psid -.sit application/x-sit -.sit application/x-stuffit -.skd application/x-koan -.skm application/x-koan -.skp application/x-koan -.skt application/x-koan -.sl application/x-seelogo -.smi application/smil -.smil application/smil -.snd audio/basic -.snd audio/x-adpcm -.sol application/solids -.spc application/x-pkcs7-certificates -.spc text/x-speech -.spl application/futuresplash -.spr application/x-sprite -.sprite application/x-sprite -.src application/x-wais-source -.ssi text/x-server-parsed-html -.ssm application/streamingmedia -.sst application/vnd.ms-pki.certstore -.step application/step -.stl application/sla -.stl application/vnd.ms-pki.stl -.stl application/x-navistyle -.stp application/step -.sv4cpio application/x-sv4cpio -.sv4crc application/x-sv4crc -.svf image/vnd.dwg -.svf image/x-dwg -.svg image/svg+xml -.svr application/x-world -.svr x-world/x-svr -.swf application/x-shockwave-flash -.t application/x-troff -.talk text/x-speech -.tar application/x-tar -.tbk application/toolbook -.tbk application/x-tbook -.tcl application/x-tcl -.tcl text/x-script.tcl -.tcsh text/x-script.tcsh -.tex application/x-tex -.texi application/x-texinfo -.texinfo application/x-texinfo -.text application/plain -.text text/plain -.tgz application/gnutar -.tgz application/x-compressed -.tif image/tiff -.tif image/x-tiff -.tiff image/tiff -.tiff image/x-tiff -.tr application/x-troff -.ts video/mp2t -.tsi audio/tsp-audio -.tsp application/dsptype -.tsp audio/tsplayer -.tsv text/tab-separated-values -.turbot image/florian -.txt text/plain -.uil text/x-uil -.uni text/uri-list -.unis text/uri-list -.unv application/i-deas -.uri text/uri-list -.uris text/uri-list -.ustar application/x-ustar -.ustar multipart/x-ustar -.uu application/octet-stream -.uu text/x-uuencode -.uue text/x-uuencode -.vcd application/x-cdlink -.vcs text/x-vcalendar -.vda application/vda -.vdo video/vdo -.vew application/groupwise -.viv video/vivo -.viv video/vnd.vivo -.vivo video/vivo -.vivo video/vnd.vivo -.vmd application/vocaltec-media-desc -.vmf application/vocaltec-media-file -.voc audio/voc -.voc audio/x-voc -.vos video/vosaic -.vox audio/voxware -.vqe audio/x-twinvq-plugin -.vqf audio/x-twinvq -.vql audio/x-twinvq-plugin -.vrml application/x-vrml -.vrml model/vrml -.vrml x-world/x-vrml -.vrt x-world/x-vrt -.vsd application/x-visio -.vst application/x-visio -.vsw application/x-visio -.w60 application/wordperfect6.0 -.w61 application/wordperfect6.1 -.w6w application/msword -.wav audio/wav -.wav audio/x-wav -.wb1 application/x-qpro -.wbmp image/vnd.wap.wbmp -.web application/vnd.xara -.webm video/webm -.webp image/webp -.wiz application/msword -.wk1 application/x-123 -.wmf windows/metafile -.wml text/vnd.wap.wml -.wmlc application/vnd.wap.wmlc -.wmls text/vnd.wap.wmlscript -.wmlsc application/vnd.wap.wmlscriptc -.word application/msword -.woff font/woff -.woff2 font/woff2 -.wp application/wordperfect -.wp5 application/wordperfect -.wp5 application/wordperfect6.0 -.wp6 application/wordperfect -.wpd application/wordperfect -.wpd application/x-wpwin -.wq1 application/x-lotus -.wri application/mswrite -.wri application/x-wri -.wrl application/x-world -.wrl model/vrml -.wrl x-world/x-vrml -.wrz model/vrml -.wrz x-world/x-vrml -.wsc text/scriplet -.wsrc application/x-wais-source -.wtk application/x-wintalk -.xbm image/x-xbitmap -.xbm image/x-xbm -.xbm image/xbm -.xdr video/x-amt-demorun -.xgz xgl/drawing -.xif image/vnd.xiff -.xl application/excel -.xla application/excel -.xla application/x-excel -.xla application/x-msexcel -.xlb application/excel -.xlb application/vnd.ms-excel -.xlb application/x-excel -.xlc application/excel -.xlc application/vnd.ms-excel -.xlc application/x-excel -.xld application/excel -.xld application/x-excel -.xlk application/excel -.xlk application/x-excel -.xll application/excel -.xll application/vnd.ms-excel -.xll application/x-excel -.xlm application/excel -.xlm application/vnd.ms-excel -.xlm application/x-excel -.xls application/excel -.xls application/vnd.ms-excel -.xls application/x-excel -.xls application/x-msexcel -.xlt application/excel -.xlt application/x-excel -.xlv application/excel -.xlv application/x-excel -.xlw application/excel -.xlw application/vnd.ms-excel -.xlw application/x-excel -.xlw application/x-msexcel -.xm audio/xm -.xml application/xml -.xml text/xml -.xmz xgl/movie -.xpix application/x-vnd.ls-xpix -.xpm image/x-xpixmap -.xpm image/xpm -.x-png image/png -.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet -.xsr video/x-amt-showrun -.xwd image/x-xwd -.xwd image/x-xwindowdump -.xyz chemical/x-pdb -.yaml application/x-yaml -.yml application/x-yaml -.z application/x-compress -.z application/x-compressed -.zip application/x-compressed -.zip application/x-zip-compressed -.zip application/zip -.zip multipart/x-zip -.zoo application/octet-stream -.zsh text/x-script.zsh - }; - }; -} diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index f858d04..efa3ad2 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -6,13 +6,12 @@ }: { home = { - stateVersion = osConfig.system.stateVersion; + inherit (osConfig.system) stateVersion; inherit username; homeDirectory = "/home/${username}"; }; imports = [ inputs.nixvim.homeManagerModules.nixvim - inputs.anyrun.homeManagerModules.default ./programs/nixvim/presets ./programs/neovide.nix ./packages diff --git a/modules/home-manager/desktops/hyprland/anyrun.css b/modules/home-manager/desktops/hyprland/anyrun.css deleted file mode 100644 index fe9c0a6..0000000 --- a/modules/home-manager/desktops/hyprland/anyrun.css +++ /dev/null @@ -1,40 +0,0 @@ -@import "./theme.css"; - -* { - font-family: "NotoSans NF"; -} - -window#window { - background: transparent; -} - -box#main { - box-shadow: 0 0 15px rgba(0, 0, 0, 0.29); - border-radius: 24px; -} - -entry#entry { - border: none; - box-shadow: none; - padding: 8px 24px; -} - -entry#entry, -list#main { - border-radius: 24px; - background: transparent; -} - -row#match { - border-radius: 8px; - padding: 0 4px; -} - -row#plugin { - border-radius: 16px; - padding: 16px; -} - -list#plugin { - background: transparent; -} diff --git a/modules/home-manager/desktops/hyprland/anyrun.nix b/modules/home-manager/desktops/hyprland/anyrun.nix deleted file mode 100644 index 242ed99..0000000 --- a/modules/home-manager/desktops/hyprland/anyrun.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ pkgs }: { - enable = true; - config = { - plugins = with pkgs.anyrunPlugins; [ - applications - symbols - rink - dictionary - shell - ]; - y.fraction = 0.2; - closeOnClick = true; - }; - extraCss = builtins.readFile ./anyrun.css; -} diff --git a/modules/home-manager/desktops/hyprland/default.nix b/modules/home-manager/desktops/hyprland/default.nix index ef9bcc7..f10f82a 100644 --- a/modules/home-manager/desktops/hyprland/default.nix +++ b/modules/home-manager/desktops/hyprland/default.nix @@ -1,5 +1,4 @@ { - config, pkgs, lib, osConfig, @@ -9,131 +8,75 @@ config = lib.mkIf osConfig.desktops.hyprland.enable { wayland.windowManager.hyprland = { enable = true; - systemd = { - enable = true; - variables = [ "--all" ]; - }; settings = { - env = [ - "XDG_SESSION_TYPE,wayland" - "NIXOS_OZONE_WL,1" - # Gnome file manager fix - "GIO_EXTRA_MODULES,${pkgs.gnome.gvfs}/lib/gio/modules" - ]; - exec-once = [ - "gnome-keyring-daemon --start --components=secrets" - "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" - ]; input = { accel_profile = "flat"; kb_layout = osConfig.services.xserver.xkb.layout; kb_variant = osConfig.services.xserver.xkb.variant; }; - bind = import ./keybinds.nix; - bindm = import ./mousebinds.nix; - bindr = [ "SUPER,SUPER_L,exec,pkill anyrun || anyrun" ]; - workspace = [ - "special:calc,border:false,gapsout:200,on-created-empty:[noanim;silent] kitty -e qalc" - ]; - windowrulev2 = - let - firefoxPip = "class:^(firefox)$,title:^(Picture-in-Picture)$"; - firefoxPipInitial = "class:^(firefox)$,title:^(Firefox)$"; - pipPadding = toString (config.theme.md3-evo.padding * 2); - in - [ - "keepaspectratio,${firefoxPip}" - "noborder,${firefoxPip}" - "float,${firefoxPip}" - "float,${firefoxPipInitial}" - "pin,${firefoxPip}" - "pin,${firefoxPipInitial}" - "fullscreenstate 2 0,${firefoxPip}" - "fullscreenstate 2 0,${firefoxPipInitial}" - "move ${pipPadding} ${pipPadding},${firefoxPip}" - "move ${pipPadding} ${pipPadding},${firefoxPipInitial}" - # For some reason it really wants to be maximized - "suppressevent maximize,class:^(neovide)$" - # pinentry - "dimaround,class:^(gcr-prompter)$" - "noborder,class:^(gcr-prompter)$" - "rounding 10,class:^(gcr-prompter)$" - "animation slide,class:^(gcr-prompter)$" - # Flameshot fixes - "float,class:^(flameshot)$" - "animation fade,class:^(flameshot)$" + bind = [ + "SUPER,Q,killactive" + "SUPER,P,togglefloating," + "SUPER,P,pin," + "SUPER,D,fullscreen,1" + "SUPER,V,fullscreen,0" - "float,class:^(zenity)$" - ]; + "SUPER_SHIFT,up,movewindow,u" + "SUPER_SHIFT,down,movewindow,d" + "SUPER_SHIFT,left,movewindow,l" + "SUPER_SHIFT,right,movewindow,r" + + "SUPER,up,movefocus,u" + "SUPER,down,movefocus,d" + "SUPER,left,movefocus,l" + "SUPER,right,movefocus,r" + + "SUPER,f,workspace,r-1" + "SUPER,h,workspace,r+1" + "SUPER_SHIFT,f,movetoworkspace,r-1" + "SUPER_SHIFT,h,movetoworkspace,r+1" + "SUPER,mouse_up,workspace,r+1" + "SUPER,mouse_down,workspace,r-1" + + "SUPER,1,workspace,1" + "SUPER,2,workspace,2" + "SUPER,3,workspace,3" + "SUPER,4,workspace,4" + "SUPER,5,workspace,5" + "SUPER,6,workspace,6" + "SUPER,7,workspace,7" + "SUPER,8,workspace,8" + "SUPER,9,workspace,9" + + "SUPER_SHIFT,1,movetoworkspace,1" + "SUPER_SHIFT,2,movetoworkspace,2" + "SUPER_SHIFT,3,movetoworkspace,3" + "SUPER_SHIFT,4,movetoworkspace,4" + "SUPER_SHIFT,5,movetoworkspace,5" + "SUPER_SHIFT,6,movetoworkspace,6" + "SUPER_SHIFT,7,movetoworkspace,7" + "SUPER_SHIFT,8,movetoworkspace,8" + "SUPER_SHIFT,9,movetoworkspace,9" + ]; + bindm = [ + "SUPER,mouse:272,movewindow" + "SUPER,mouse:273,resizewindow" + ]; misc = { layers_hog_keyboard_focus = false; - disable_splash_rendering = true; - disable_hyprland_logo = true; - background_color = "rgb(000000)"; - force_default_wallpaper = 0; - }; - layerrule = [ - "blur, anyrun" - "ignorealpha 0.3, anyrun" - ]; - decoration.shadow = { - enabled = true; - range = 16; - color = "rgba(00000044)"; - }; - animations = { - enabled = "yes"; - bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; - animation = [ - "windows, 1, 5, myBezier" - "windowsOut, 1, 7, default, popin 80%" - "border, 1, 10, default" - "fade, 1, 7, default" - "workspaces, 1, 6, default" - ]; }; }; }; - services.kdeconnect = { + services.udiskie = { enable = true; - indicator = true; + tray = "never"; }; - services.flameshot = { - enable = true; - package = pkgs.flameshot.overrideAttrs ( - final: prev: { - cmakeFlags = [ - "-DUSE_WAYLAND_CLIPBOARD=1" - "-DUSE_WAYLAND_GRIM=true" - ]; - nativeBuildInputs = prev.nativeBuildInputs ++ [ pkgs.libsForQt5.kguiaddons ]; - } - ); - settings = { - General = { - uiColor = "#99d1db"; - showDesktopNotification = false; - disabledTrayIcon = true; - }; - }; - }; - - programs.kitty = import ./kitty.nix { inherit pkgs; }; - programs.anyrun = import ./anyrun.nix { inherit pkgs; }; - services.udiskie.enable = true; - services.udiskie.tray = "never"; fonts.fontconfig.enable = true; home.packages = with pkgs; [ # fonts noto-fonts - # essentials - hyprpicker - grim - slurp - wl-clipboard - polkit_gnome # qt/kde packages qt6.qtwayland qt5.qtwayland @@ -142,47 +85,22 @@ evince baobab gnome.gvfs - gnome-keyring nautilus - gnome-calendar - gnome-characters - gnome-contacts - gnome-clocks - gnome-calculator simple-scan eog - geary ghex - gnome-weather - gnome-keyring gnome-disk-utility # fixes xorg.xrandr ]; - gtk = { - enable = true; - iconTheme = { - name = "Tela"; - package = pkgs.tela-icon-theme; - }; - }; - qt = { - enable = true; - platformTheme.name = "qtct"; - }; + gtk.enable = true; + qt.enable = true; - home = { - pointerCursor = { - gtk.enable = true; - package = pkgs.capitaine-cursors; - name = "capitaine-cursors"; - }; - - file.".config/hypr/shaders" = { - source = ./hypr/shaders; - recursive = true; - }; + home.pointerCursor = { + gtk.enable = true; + package = pkgs.capitaine-cursors; + name = "capitaine-cursors"; }; }; } diff --git a/modules/home-manager/desktops/hyprland/fonts/Torus-Bold.c233ce17.otf b/modules/home-manager/desktops/hyprland/fonts/Torus-Bold.c233ce17.otf deleted file mode 100644 index 4b5e08c..0000000 Binary files a/modules/home-manager/desktops/hyprland/fonts/Torus-Bold.c233ce17.otf and /dev/null differ diff --git a/modules/home-manager/desktops/hyprland/fonts/Torus-Regular.734ed3ae.otf b/modules/home-manager/desktops/hyprland/fonts/Torus-Regular.734ed3ae.otf deleted file mode 100644 index d5fc09e..0000000 Binary files a/modules/home-manager/desktops/hyprland/fonts/Torus-Regular.734ed3ae.otf and /dev/null differ diff --git a/modules/home-manager/desktops/hyprland/fonts/Torus-SemiBold.d263d500.otf b/modules/home-manager/desktops/hyprland/fonts/Torus-SemiBold.d263d500.otf deleted file mode 100644 index a3d0712..0000000 Binary files a/modules/home-manager/desktops/hyprland/fonts/Torus-SemiBold.d263d500.otf and /dev/null differ diff --git a/modules/home-manager/desktops/hyprland/hypr/shaders/bluefilter.frag b/modules/home-manager/desktops/hyprland/hypr/shaders/bluefilter.frag deleted file mode 100755 index 5469af9..0000000 --- a/modules/home-manager/desktops/hyprland/hypr/shaders/bluefilter.frag +++ /dev/null @@ -1,20 +0,0 @@ -// vim: set ft=glsl: -// blue light filter shader -// values from https://reshade.me/forum/shader-discussion/3673-blue-light-filter-similar-to-f-lux - -precision mediump float; -varying vec2 v_texcoord; -uniform sampler2D tex; - -void main() { - - vec4 pixColor = texture2D(tex, v_texcoord); - - // green - pixColor[1] *= 0.855; - - // blue - pixColor[2] *= 0.725; - - gl_FragColor = pixColor; -} diff --git a/modules/home-manager/desktops/hyprland/hypr/shaders/blur.frag b/modules/home-manager/desktops/hyprland/hypr/shaders/blur.frag deleted file mode 100755 index 700dfb2..0000000 --- a/modules/home-manager/desktops/hyprland/hypr/shaders/blur.frag +++ /dev/null @@ -1,39 +0,0 @@ -precision mediump float; -varying vec2 v_texcoord; // is in 0-1 -uniform sampler2D tex; -uniform float alpha; - -uniform vec2 topLeft; -uniform vec2 fullSize; -uniform float radius; - -uniform int discardOpaque; -uniform int discardAlpha; -uniform float discardAlphaValue; - -uniform int applyTint; -uniform vec3 tint; - -uniform int primitiveMultisample; - -void main() { - - vec4 pixColor = texture2D(tex, v_texcoord); - - if (discardOpaque == 1 && pixColor[3] * alpha == 1.0) - discard; - - if (discardAlpha == 1 && pixColor[3] <= discardAlphaValue) - discard; - - if (applyTint == 1) { - pixColor[0] = pixColor[0] * tint[0]; - pixColor[1] = pixColor[1] * tint[1]; - pixColor[2] = pixColor[2] * tint[2]; - } - - )#" + - ROUNDED_SHADER_FUNC("pixColor") + R"#( - - gl_FragColor = pixColor * alpha; -} \ No newline at end of file diff --git a/modules/home-manager/desktops/hyprland/hypr/shaders/chromatic_abberation.frag b/modules/home-manager/desktops/hyprland/hypr/shaders/chromatic_abberation.frag deleted file mode 100755 index 5389241..0000000 --- a/modules/home-manager/desktops/hyprland/hypr/shaders/chromatic_abberation.frag +++ /dev/null @@ -1,24 +0,0 @@ -// vim: set ft=glsl: - -precision highp float; -varying highp vec2 v_texcoord; -uniform highp sampler2D tex; - -#define STRENGTH 0.0027 - -void main() { - vec2 center = vec2(0.5, 0.5); - vec2 offset = (v_texcoord - center) * STRENGTH; - - float rSquared = dot(offset, offset); - float distortion = 1.0 + 1.0 * rSquared; - vec2 distortedOffset = offset * distortion; - - vec2 redOffset = vec2(distortedOffset.x, distortedOffset.y); - vec2 blueOffset = vec2(distortedOffset.x, distortedOffset.y); - - vec4 redColor = texture2D(tex, v_texcoord + redOffset); - vec4 blueColor = texture2D(tex, v_texcoord + blueOffset); - - gl_FragColor = vec4(redColor.r, texture2D(tex, v_texcoord).g, blueColor.b, 1.0); -} diff --git a/modules/home-manager/desktops/hyprland/hypr/shaders/crt.frag b/modules/home-manager/desktops/hyprland/hypr/shaders/crt.frag deleted file mode 100755 index a37ff9f..0000000 --- a/modules/home-manager/desktops/hyprland/hypr/shaders/crt.frag +++ /dev/null @@ -1,511 +0,0 @@ -#version 100 -precision highp float; -varying highp vec2 v_texcoord; -varying highp vec3 v_pos; -uniform highp sampler2D tex; -uniform lowp float time; - -#define BORDER_COLOR vec4(vec3(0.0, 0.0, 0.0), 1.0) // black border -#define BORDER_RADIUS 1.0 // larger vignette radius -#define BORDER_SIZE 0.01 // small border size -#define CHROMATIC_ABERRATION_STRENGTH 0.00 -#define DENOISE_INTENSITY 0.0001 // -#define DISTORTION_AMOUNT 0.00 // moderate distortion amount -#define HDR_BLOOM 0.75 // bloom intensity -#define HDR_BRIGHTNESS 0.011 // brightness -#define HDR_CONTRAST 0.011 // contrast -#define HDR_SATURATION 1.0// saturation -#define LENS_DISTORTION_AMOUNT 0.0 -#define NOISE_THRESHOLD 0.0001 -#define PHOSPHOR_BLUR_AMOUNT 0.77 // Amount of blur for phosphor glow -#define PHOSPHOR_GLOW_AMOUNT 0.77 // Amount of phosphor glow -#define SAMPLING_RADIUS 0.0001 -#define SCANLINE_FREQUENCY 540.0 -#define SCANLINE_THICKNESS 0.0507 -#define SCANLINE_TIME time * 471.24 -#define SHARPNESS 0.25 -#define SUPERSAMPLING_SAMPLES 16.0 -#define VIGNETTE_RADIUS 0.0 // larger vignette radius -#define PI 3.14159265359 -#define TWOPI 6.28318530718 - -vec2 applyBarrelDistortion(vec2 coord, float amt) { - vec2 p = coord.xy / vec2(1.0); - vec2 v = p * 2.0 - vec2(1.0); - float r = dot(v, v); - float k = 1.0 + pow(r, 2.0) * pow(amt, 2.0); - vec2 result = v * k; - return vec2(0.5, 0.5) + 0.5 * result.xy; -} - -vec4 applyColorCorrection(vec4 color) { - color.rgb *= vec3(1.0, 0.79, 0.89); - return vec4(color.rgb, 1.0); -} - -vec4 applyBorder(vec2 tc, vec4 color, float borderSize, vec4 borderColor) { - float dist_x = min(tc.x, 1.0 - tc.x); - float dist_y = min(tc.y, 1.0 - tc.y); - float dist = min(dist_x, dist_y) * -1.0; - float border = smoothstep(borderSize, 0.0, dist); - border += smoothstep(borderSize, 0.0, dist); - return mix(color, borderColor, border); -} - -vec4 applyFakeHDR(vec4 color, float brightness, float contrast, float saturation, float bloom) { - color.rgb = (color.rgb - vec3(0.5)) * exp2(brightness) + vec3(0.5); - vec3 crtfactor = vec3(1.05, 0.92, 1.0); - color.rgb = pow(color.rgb, crtfactor); - // // NTSC - // vec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721); - - // // BT.709 - // vec3 lumCoeff = vec3(0.299, 0.587, 0.114); - - // BT.2020 - vec3 lumCoeff = vec3(0.2627, 0.6780, 0.0593); - - // // Warm NTSC - // vec3 lumCoeff = vec3(0.2125, 0.7010, 0.0865); - - float luminance = dot(color.rgb, lumCoeff); - luminance = pow(luminance, 2.2); - color.rgb = mix(vec3(luminance), color.rgb, saturation); - color.rgb = mix(color.rgb, vec3(1.0), pow(max(0.0, luminance - 1.0 + bloom), 4.0)); - return color; -} - -vec4 applyVignette(vec4 color) { - vec2 center = vec2(0.5, 0.5); // center of screen - float radius = VIGNETTE_RADIUS; // radius of vignette effect - float softness = 1.0; // softness of vignette effect - float intensity = 0.7; // intensity of vignette effect - vec2 offset = v_texcoord - center; // offset from center of screen - float distance = length(offset); // distance from center of screen - float alpha = smoothstep(radius, radius - radius * softness, distance) * intensity; // calculate alpha value for vignette effect - return mix(vec4(0.0, 0.0, 0.0, alpha), color, alpha); // mix black with color using calculated alpha value -} - -vec4 applyPhosphorGlow(vec2 tc, vec4 color, sampler2D tex) { - // Calculate average color value of the texture - vec4 texelColor = color; - float averageColor = (texelColor.r + texelColor.g + texelColor.b) / 3.0; - - // Determine brightness-dependent color factor - float factor = mix( - mix(0.09, - mix(0.005, 0.0075, (averageColor - 0.1) / 0.1), - step(0.01, averageColor)), 0.0005, - step(0.02, averageColor)); - // Apply phosphor glow effect - vec4 sum = vec4(0.0); - vec4 pixels[9]; - pixels[0] = texture2D(tex, tc - vec2(0.001, 0.001)); - pixels[1] = texture2D(tex, tc - vec2(0.001, 0.0)); - pixels[2] = texture2D(tex, tc - vec2(0.001, -0.001)); - pixels[3] = texture2D(tex, tc - vec2(0.0, 0.001)); - pixels[4] = texture2D(tex, tc); - pixels[5] = texture2D(tex, tc + vec2(0.001, 0.001)); - pixels[6] = texture2D(tex, tc + vec2(0.001, 0.0)); - pixels[7] = texture2D(tex, tc + vec2(0.001, -0.001)); - pixels[8] = texture2D(tex, tc + vec2(0.0, 0.001)); - -// Perform operations on input pixels in parallel - sum = pixels[0] - + pixels[1] - + pixels[2] - + pixels[3] - + pixels[4] - + pixels[5] - + pixels[6] - + pixels[7] - + pixels[8]; - sum /= 9.0; - sum += texture2D(tex, tc - vec2(0.01, 0.01)) * 0.001; - sum += texture2D(tex, tc - vec2(0.0, 0.01)) * 0.001; - sum += texture2D(tex, tc - vec2(-0.01, 0.01)) * 0.001; - sum += texture2D(tex, tc - vec2(0.01, 0.0)) * 0.001; - sum += color * PHOSPHOR_BLUR_AMOUNT; - sum += texture2D(tex, tc - vec2(-0.01, 0.0)) * 0.001; - sum += texture2D(tex, tc - vec2(0.01, -0.01)) * 0.001; - sum += texture2D(tex, tc - vec2(0.0, -0.01)) * 0.001; - sum += texture2D(tex, tc - vec2(-0.01, -0.01)) * 0.001; - sum *= PHOSPHOR_GLOW_AMOUNT; - - // Initialize sum_sum_factor to zero - vec4 sum_sum_factor = vec4(0.0); - // Compute sum_j for i = -1 - vec4 sum_j = vec4(0.0); - sum_j += texture2D(tex, tc + vec2(-1, -1) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, -1) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, -1) * 0.01); - sum_j += texture2D(tex, tc + vec2(-1, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(-1, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, 1) * 0.01); - sum_sum_factor += sum_j * vec4(0.011); - - // Compute sum_j for i = 0 - sum_j = vec4(0.0); - sum_j += texture2D(tex, tc + vec2(-1, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(-1, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, 1) * 0.01); - sum_sum_factor += sum_j * vec4(0.011); - - // Compute sum_j for i = 1 - sum_j = vec4(0.0); - sum_j += texture2D(tex, tc + vec2(-1, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, 0) * 0.01); - sum_j += texture2D(tex, tc + vec2(-1, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(0, 1) * 0.01); - sum_j += texture2D(tex, tc + vec2(1, 1) * 0.01); - sum_sum_factor += sum_j * vec4(0.011); - color += mix(sum_sum_factor * sum_sum_factor * vec4(factor), sum, 0.5); - return color; -} - -vec4 applyAdaptiveSharpen(vec2 tc, vec4 color, sampler2D tex) { - vec4 color_tl = texture2D(tex, tc + vec2(-1.0, -1.0) * 0.5 / 2160.0); - vec4 color_tr = texture2D(tex, tc + vec2(1.0, -1.0) * 0.5 / 2160.0); - vec4 color_bl = texture2D(tex, tc + vec2(-1.0, 1.0) * 0.5 / 2160.0); - vec4 color_br = texture2D(tex, tc + vec2(1.0, 1.0) * 0.5 / 2160.0); - float sharpness = SHARPNESS; - vec3 color_no_alpha = color.rgb; - vec3 color_tl_no_alpha = color_tl.rgb; - vec3 color_tr_no_alpha = color_tr.rgb; - vec3 color_bl_no_alpha = color_bl.rgb; - vec3 color_br_no_alpha = color_br.rgb; - float delta = (dot(color_no_alpha, vec3(0.333333)) + dot(color_tl_no_alpha, vec3(0.333333)) + dot(color_tr_no_alpha, vec3(0.333333)) + dot(color_bl_no_alpha, vec3(0.333333)) + dot(color_br_no_alpha, vec3(0.333333))) * 0.2 - dot(color_no_alpha, vec3(0.333333)); - vec3 sharp_color_no_alpha = color_no_alpha + min(vec3(0.0), vec3(delta * sharpness)); - vec4 sharp_color = vec4(sharp_color_no_alpha, color.a); - return sharp_color; -} - -vec4 applyScanlines(vec2 tc, vec4 color) { - float scanline = (cos(tc.y * SCANLINE_FREQUENCY + SCANLINE_TIME) * - sin(tc.y * SCANLINE_FREQUENCY + SCANLINE_TIME)) * SCANLINE_THICKNESS; - float alpha = clamp(1.0 - abs(scanline), 0.0, 1.0); - return vec4(color.rgb * alpha, color.a); -} - -vec4 applyChromaticAberration(vec2 uv, vec4 color) { - vec2 center = vec2(0.5, 0.5); // center of the screen - vec2 offset = (uv - center) * CHROMATIC_ABERRATION_STRENGTH; // calculate the offset from the center - - // apply lens distortion - float rSquared = dot(offset, offset); - float distortion = 1.0 + LENS_DISTORTION_AMOUNT * rSquared; - vec2 distortedOffset = offset * distortion; - - // apply chromatic aberration - vec2 redOffset = vec2(distortedOffset.x * 1.00, distortedOffset.y * 1.00); - vec2 blueOffset = vec2(distortedOffset.x * 1.00, distortedOffset.y * 1.00); - - vec4 redColor = texture2D(tex, uv + redOffset); - vec4 blueColor = texture2D(tex, uv + blueOffset); - - vec4 result = vec4(redColor.r, color.g, blueColor.b, color.a); - - return result; -} - -vec4 reduceGlare(vec4 color) { - // Calculate the intensity of the color by taking the average of the RGB components - float intensity = (color.r + color.g + color.b) / 3.0; - // Set the maximum intensity that can be considered for glare - float maxIntensity = 0.98; - // Use smoothstep to create a smooth transition from no glare to full glare - // based on the intensity of the color and the maximum intensity - float glareIntensity = smoothstep(maxIntensity - 0.02, maxIntensity, intensity); - // Set the amount of glare to apply to the color - float glareAmount = 0.02; - // Mix the original color with the reduced color that has glare applied to it - vec3 reducedColor = mix(color.rgb, vec3(glareIntensity), glareAmount); - // Return the reduced color with the original alpha value - return vec4(reducedColor, color.a); -} - -// Apply a fake HDR effect to the input color. -// Parameters: -// - inputColor: the color to apply the effect to. -// - brightness: the brightness of the image. Should be a value between 0 and 1. -// - contrast: the contrast of the image. Should be a value between 0 and 1. -// - saturation: the saturation of the image. Should be a value between 0 and 2. -// - bloom: the intensity of the bloom effect. Should be a value between 0 and 1. -vec4 applyFakeHDREffect(vec4 inputColor, float brightness, float contrast, float saturation, float bloom) { - const float minBrightness = 0.0; - const float maxBrightness = 1.0; - const float minContrast = 0.0; - const float maxContrast = 1.0; - const float minSaturation = 0.0; - const float maxSaturation = 2.0; - const float minBloom = 0.0; - const float maxBloom = 1.0; - - // Check input parameters for validity - if (brightness < minBrightness || brightness > maxBrightness) { - return vec4(0.0, 0.0, 0.0, 1.0); // Return black with alpha of 1.0 to indicate error - } - if (contrast < minContrast || contrast > maxContrast) { - return vec4(0.0, 0.0, 0.0, 1.0); - } - if (saturation < minSaturation || saturation > maxSaturation) { - return vec4(0.0, 0.0, 0.0, 1.0); - } - if (bloom < minBloom || bloom > maxBloom) { - return vec4(0.0, 0.0, 0.0, 1.0); - } - - // Apply brightness and contrast - vec3 color = inputColor.rgb; - color = (color - vec3(0.5)) * exp2(brightness * 10.0) + vec3(0.5); - color = mix(vec3(0.5), color, pow(contrast * 4.0 + 1.0, 2.0)); - - // // NTSC - // vec3 lumCoeff = vec3(0.2125, 0.7154, 0.0721); - - // // BT.709 - // vec3 lumCoeff = vec3(0.299, 0.587, 0.114); - - // // BT.2020 - // vec3 lumCoeff = vec3(0.2627, 0.6780, 0.0593); - - // Warm NTSC - vec3 lumCoeff = vec3(0.2125, 0.7010, 0.0865); - - // Apply saturation - float luminance = dot(color, lumCoeff); - vec3 grey = vec3(luminance); - color = mix(grey, color, saturation); - - // Apply bloom effect - float threshold = 1.0 - bloom; - vec3 bloomColor = max(color - threshold, vec3(0.0)); - bloomColor = pow(bloomColor, vec3(2.0)); - bloomColor = mix(vec3(0.0), bloomColor, pow(min(luminance, threshold), 4.0)); - color += bloomColor; - - return vec4(color, inputColor.a); -} - -vec4 bilateralFilter(sampler2D tex, vec2 uv, vec4 color, float sampleRadius, float noiseThreshold, float intensity) { - vec4 filteredColor = vec4(0.0); - float totalWeight = 0.0; - - // Top-left pixel - vec4 sample = texture2D(tex, uv + vec2(-1.0, -1.0)); - float dist = length(vec2(-1.0, -1.0)); - float colorDist = length(sample - color); - float weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - // Top pixel - sample = texture2D(tex, uv + vec2(0.0, -1.0)); - dist = length(vec2(0.0, -1.0)); - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - // Top-right pixel - sample = texture2D(tex, uv + vec2(1.0, -1.0)); - dist = length(vec2(1.0, -1.0)); - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - // Left pixel - sample = texture2D(tex, uv + vec2(-1.0, 0.0)); - dist = length(vec2(-1.0, 0.0)); - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - // Center pixel - sample = texture2D(tex, uv); - dist = 0.0; - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - // Right pixel - sample = texture2D(tex, uv + vec2(1.0, 0.0)); - dist = length(vec2(1.0, 0.0)); - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - // Bottom-left pixel - sample = texture2D(tex, uv + vec2(-1.0, 1.0)); - dist = length(vec2(-1.0, 1.0)); - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - -// Bottom pixel - sample = texture2D(tex, uv + vec2(0.0, sampleRadius)); - dist = length(vec2(0.0, sampleRadius)); - colorDist = length(sample - color); - weight = exp(-0.5 * (dist * dist + colorDist * colorDist * intensity) / (sampleRadius * sampleRadius)); - filteredColor += sample * weight; - totalWeight += weight; - - filteredColor /= totalWeight; - return mix(color, filteredColor, step(noiseThreshold, length(filteredColor - color))); -} - -vec4 supersample(sampler2D tex, vec2 uv, float sampleRadius, float noiseThreshold, float intensity) { - float radiusSq = sampleRadius * sampleRadius; - vec2 poissonDisk; - vec4 color = vec4(0.0); - - float r1_0 = sqrt(0.0 / 16.0); - float r2_0 = fract(1.0 / 3.0); - float theta_0 = TWOPI * r2_0; - poissonDisk = vec2(r1_0 * cos(theta_0), r1_0 * sin(theta_0)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_1 = sqrt(1.0 / 16.0); - float r2_1 = fract(2.0 / 3.0); - float theta_1 = TWOPI * r2_1; - poissonDisk = vec2(r1_1 * cos(theta_1), r1_1 * sin(theta_1)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_2 = sqrt(2.0 / 16.0); - float r2_2 = fract(3.0 / 3.0); - float theta_2 = TWOPI * r2_2; - poissonDisk = vec2(r1_2 * cos(theta_2), r1_2 * sin(theta_2)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_3 = sqrt(3.0 / 16.0); - float r2_3 = fract(4.0 / 3.0); - float theta_3 = TWOPI * r2_3; - poissonDisk = vec2(r1_3 * cos(theta_3), r1_3 * sin(theta_3)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_4 = sqrt(4.0 / 16.0); - float r2_4 = fract(5.0 / 3.0); - float theta_4 = TWOPI * r2_4; - poissonDisk = vec2(r1_4 * cos(theta_4), r1_4 * sin(theta_4)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_5 = sqrt(5.0 / 16.0); - float r2_5 = fract(6.0 / 3.0); - float theta_5 = TWOPI * r2_5; - poissonDisk = vec2(r1_5 * cos(theta_5), r1_5 * sin(theta_5)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_6 = sqrt(6.0 / 16.0); - float r2_6 = fract(7.0 / 3.0); - float theta_6 = TWOPI * r2_6; - poissonDisk = vec2(r1_6 * cos(theta_6), r1_6 * sin(theta_6)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_7 = sqrt(7.0 / 16.0); - float r2_7 = fract(8.0 / 3.0); - float theta_7 = TWOPI * r2_7; - poissonDisk = vec2(r1_7 * cos(theta_7), r1_7 * sin(theta_7)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_8 = sqrt(8.0 / 16.0); - float r2_8 = fract(9.0 / 3.0); - float theta_8 = TWOPI * r2_8; - poissonDisk = vec2(r1_8 * cos(theta_8), r1_8 * sin(theta_8)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_9 = sqrt(9.0 / 16.0); - float r2_9 = fract(10.0 / 3.0); - float theta_9 = TWOPI * r2_9; - poissonDisk = vec2(r1_9 * cos(theta_9), r1_9 * sin(theta_9)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_10 = sqrt(10.0 / 16.0); - float r2_10 = fract(11.0 / 3.0); - float theta_10 = TWOPI * r2_10; - poissonDisk = vec2(r1_10 * cos(theta_10), r1_10 * sin(theta_10)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_11 = sqrt(11.0 / 16.0); - float r2_11 = fract(12.0 / 3.0); - float theta_11 = TWOPI * r2_11; - poissonDisk = vec2(r1_11 * cos(theta_11), r1_11 * sin(theta_11)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_12 = sqrt(12.0 / 16.0); - float r2_12 = fract(13.0 / 3.0); - float theta_12 = TWOPI * r2_12; - poissonDisk = vec2(r1_12 * cos(theta_12), r1_12 * sin(theta_12)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_13 = sqrt(13.0 / 16.0); - float r2_13 = fract(14.0 / 3.0); - float theta_13 = TWOPI * r2_13; - poissonDisk = vec2(r1_13 * cos(theta_13), r1_13 * sin(theta_13)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_14 = sqrt(14.0 / 16.0); - float r2_14 = fract(15.0 / 3.0); - float theta_14 = TWOPI * r2_14; - poissonDisk = vec2(r1_14 * cos(theta_14), r1_14 * sin(theta_14)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - float r1_15 = sqrt(15.0 / 16.0); - float r2_15 = fract(16.0 / 3.0); - float theta_15 = TWOPI * r2_15; - poissonDisk = vec2(r1_15 * cos(theta_15), r1_15 * sin(theta_15)); - color += texture2D(tex, uv + poissonDisk * sampleRadius); - - return bilateralFilter(tex, uv, color, sampleRadius, noiseThreshold, intensity); -} -void main() { - vec2 tc_no_dist = v_texcoord; - - vec2 tc = applyBarrelDistortion(tc_no_dist, DISTORTION_AMOUNT); - - // [-1, 1] - vec2 tc_no_dist_symmetric = tc_no_dist * 2.0 - 1.0; - - // [0,1] - vec2 tc_no_dist_normalized = (tc_no_dist_symmetric + 1.0) / 2.0; - - // vec4 color = texture2D(tex, tc); - vec4 color = supersample(tex, tc, SAMPLING_RADIUS, NOISE_THRESHOLD, DENOISE_INTENSITY); - - color = applyAdaptiveSharpen(tc, color, tex); - - color = applyPhosphorGlow(tc, color, tex); - - color = reduceGlare(color); - - color = mix(applyFakeHDREffect(color, HDR_BRIGHTNESS, HDR_CONTRAST, HDR_SATURATION, HDR_BLOOM), color, 0.5); - - color = applyColorCorrection(color); - - color /= SUPERSAMPLING_SAMPLES; - - color = mix(applyChromaticAberration(tc, color), color, 0.25); - - color = mix(color, applyVignette(color), 0.37); - - color = applyBorder(tc_no_dist_normalized, color, 1.0 - BORDER_SIZE * BORDER_RADIUS, BORDER_COLOR); - - color = mix(applyBorder(tc, color, BORDER_SIZE, BORDER_COLOR), color, 0.05); - - color = applyScanlines(tc, color); - - gl_FragColor = color; - gl_FragColor.a = 1.0; -} - diff --git a/modules/home-manager/desktops/hyprland/hypr/shaders/drugs.frag b/modules/home-manager/desktops/hyprland/hypr/shaders/drugs.frag deleted file mode 100755 index 1190ed0..0000000 --- a/modules/home-manager/desktops/hyprland/hypr/shaders/drugs.frag +++ /dev/null @@ -1,42 +0,0 @@ - -precision highp float; -varying vec2 v_texcoord; -uniform sampler2D tex; -uniform float time; - -void warpco(inout vec2 tc) { - tc -= 0.5; - tc *= length(tc) * 2.0; - tc += 0.5; -} - -float rand1d(float seed) { - return sin(seed*1454.0); -} - -float rand2d(vec2 co) -{ - return fract(sin(dot(co.xy, vec2(12.9898,78.233))) * 43758.5453); -} - -vec3 rgb(in vec2 tc, float freq, float amp, inout vec4 centre) { - vec2 off = vec2(1.0/800.0, 0.0) * sin(tc.t * freq + time) * amp; - vec2 off2 = vec2(1.0/800.0, 0.0) * sin(tc.t * freq - time * 1.5) * amp; - centre = texture2D(tex, tc); - return vec3(texture2D(tex, tc-off).r, centre.g, texture2D(tex, tc+off2).b); -} - -void main() { - // vec2 px = 1.0 / textureSize(tex, 0).st; - vec2 tc = v_texcoord; - warpco(tc); - tc = mix(v_texcoord, tc, sin(time * 2.0)*0.07); - tc.x += rand2d(floor(tc * 20.0 + floor(time * 2.5))) * 0.01; - tc.x += rand1d(floor(tc.x * 40.0)) * 0.005 * rand1d(time * 0.001); - tc.y += sin(tc.x + time) * 0.02; - vec4 centre; - vec3 bent = rgb(tc, 100.0, 5.0, centre); - vec3 col = mix(centre.rgb, bent, sin(time)); - gl_FragColor = vec4(col, centre.a); - // gl_FragColor = vec4(texture2D(tex, v_texcoord)); -} \ No newline at end of file diff --git a/modules/home-manager/desktops/hyprland/hypr/shaders/extradark.frag b/modules/home-manager/desktops/hyprland/hypr/shaders/extradark.frag deleted file mode 100755 index 089ee81..0000000 --- a/modules/home-manager/desktops/hyprland/hypr/shaders/extradark.frag +++ /dev/null @@ -1,21 +0,0 @@ -// vim: set ft=glsl: -// blue light filter shader -// values from https://reshade.me/forum/shader-discussion/3673-blue-light-filter-similar-to-f-lux - -precision mediump float; -varying vec2 v_texcoord; -uniform sampler2D tex; - -void main() { - - vec4 pixColor = texture2D(tex, v_texcoord); - - // red - pixColor[0] *= 0.7; - // green - pixColor[1] *= 0.6; - // blue - pixColor[2] *= 0.5; - - gl_FragColor = pixColor; -} diff --git a/modules/home-manager/desktops/hyprland/hypr/shaders/gaussian.frag b/modules/home-manager/desktops/hyprland/hypr/shaders/gaussian.frag deleted file mode 100755 index c4b9e0e..0000000 --- a/modules/home-manager/desktops/hyprland/hypr/shaders/gaussian.frag +++ /dev/null @@ -1,31 +0,0 @@ -//--------------------------------------------------------------------------- -// Fragment -//--------------------------------------------------------------------------- -#version 420 core -//--------------------------------------------------------------------------- -precision mediump float; -in vec2 pos; // screen position <-1,+1> -out vec4 gl_FragColor; // fragment output color -uniform sampler2D txr; // texture to blur -uniform float xs,ys; // texture resolution -uniform float r = 6.0; // blur radius - -varying vec2 v_texcoord; -uniform sampler2D tex; -//--------------------------------------------------------------------------- -void main() - { - float x,y,xx,yy,rr=r*r,dx,dy,w,w0; - w0=0.3780/pow(r,1.975); - vec2 p; - vec4 pixColor = texture2D(tex, v_texcoord); - for (dx=1.0/xs,x=-r,p.x=0.5+(pos.x*0.5)+(x*dx);x<=r;x++,p.x+=dx){ xx=x*x; - for (dy=1.0/ys,y=-r,p.y=0.5+(pos.y*0.5)+(y*dy);y<=r;y++,p.y+=dy){ yy=y*y; - if (xx+yy<=rr) - { - w=w0*exp((-xx-yy)/(2.0*rr)); - pixColor+=texture2D(txr,p)*w; - }}} - gl_FragColor = pixColor; - } -//--------------------------------------------------------------------------- diff --git a/modules/home-manager/desktops/hyprland/hypr/shaders/motion-blur.frag b/modules/home-manager/desktops/hyprland/hypr/shaders/motion-blur.frag deleted file mode 100755 index f0770de..0000000 --- a/modules/home-manager/desktops/hyprland/hypr/shaders/motion-blur.frag +++ /dev/null @@ -1,28 +0,0 @@ -// vim: set ft=glsl: - -precision mediump float; -varying vec2 v_texcoord; -uniform sampler2D tex; -uniform float blurFactor; -uniform vec2 resolution; - -const int numSamples = 120000; - -uniform sampler2D accumulator; - -void main() { - float blurFactor = 120000.0; - - vec4 currentColor = texture2D(tex, v_texcoord); - vec4 prevColor = texture2D(accumulator, v_texcoord); - - vec2 velocity = (v_texcoord - gl_FragCoord.xy / resolution) * 2.0; - - vec4 colorDiff = currentColor - prevColor; - - float motionBlur = length(velocity) * blurFactor; - - vec4 finalColor = prevColor + colorDiff * 2.0; - - gl_FragColor = finalColor; -} \ No newline at end of file diff --git a/modules/home-manager/desktops/hyprland/hypr/shaders/nothing.frag b/modules/home-manager/desktops/hyprland/hypr/shaders/nothing.frag deleted file mode 100755 index 163e600..0000000 --- a/modules/home-manager/desktops/hyprland/hypr/shaders/nothing.frag +++ /dev/null @@ -1,14 +0,0 @@ -// vim: set ft=glsl: -// blue light filter shader -// values from https://reshade.me/forum/shader-discussion/3673-blue-light-filter-similar-to-f-lux - -precision mediump float; -varying vec2 v_texcoord; -uniform sampler2D tex; - -void main() { - - vec4 pixColor = texture2D(tex, v_texcoord); - - gl_FragColor = pixColor; -} diff --git a/modules/home-manager/desktops/hyprland/hypr/shaders/solarized.frag b/modules/home-manager/desktops/hyprland/hypr/shaders/solarized.frag deleted file mode 100755 index 1c37f2c..0000000 --- a/modules/home-manager/desktops/hyprland/hypr/shaders/solarized.frag +++ /dev/null @@ -1,41 +0,0 @@ -// -*- mode:c -*- -precision lowp float; -varying vec2 v_texcoord; -uniform sampler2D tex; - -float distanceSquared(vec3 pixColor, vec3 solarizedColor) { - vec3 distanceVector = pixColor - solarizedColor; - return dot(distanceVector, distanceVector); -} - -void main() { - vec3 solarized[16]; - solarized[0] = vec3(0.,0.169,0.212); - solarized[1] = vec3(0.027,0.212,0.259); - solarized[2] = vec3(0.345,0.431,0.459); - solarized[3] = vec3(0.396,0.482,0.514); - solarized[4] = vec3(0.514,0.58,0.588); - solarized[5] = vec3(0.576,0.631,0.631); - solarized[6] = vec3(0.933,0.91,0.835); - solarized[7] = vec3(0.992,0.965,0.89); - solarized[8] = vec3(0.71,0.537,0.); - solarized[9] = vec3(0.796,0.294,0.086); - solarized[10] = vec3(0.863,0.196,0.184); - solarized[11] = vec3(0.827,0.212,0.51); - solarized[12] = vec3(0.424,0.443,0.769); - solarized[13] = vec3(0.149,0.545,0.824); - solarized[14] = vec3(0.165,0.631,0.596); - solarized[15] = vec3(0.522,0.6,0.); - - vec3 pixColor = vec3(texture2D(tex, v_texcoord)); - int closest = 0; - float closestDistanceSquared = distanceSquared(pixColor, solarized[0]); - for (int i = 1; i < 15; i++) { - float newDistanceSquared = distanceSquared(pixColor, solarized[i]); - if (newDistanceSquared < closestDistanceSquared) { - closest = i; - closestDistanceSquared = newDistanceSquared; - } - } - gl_FragColor = vec4(solarized[closest], 1.); -} diff --git a/modules/home-manager/desktops/hyprland/hypr/shaders/vibrance.frag b/modules/home-manager/desktops/hyprland/hypr/shaders/vibrance.frag deleted file mode 100755 index 5d3d488..0000000 --- a/modules/home-manager/desktops/hyprland/hypr/shaders/vibrance.frag +++ /dev/null @@ -1,39 +0,0 @@ -// vibrance for hyprland - -precision mediump float; -varying vec2 v_texcoord; -uniform sampler2D tex; - -// see https://github.com/CeeJayDK/SweetFX/blob/a792aee788c6203385a858ebdea82a77f81c67f0/Shaders/Vibrance.fx#L20-L30 -const vec3 VIB_RGB_BALANCE = vec3(1.0, 1.0, 1.0); -const float VIB_VIBRANCE = 0.15; - - -const vec3 VIB_coeffVibrance = VIB_RGB_BALANCE * -VIB_VIBRANCE; - -void main() { - - vec4 pixColor = texture2D(tex, v_texcoord); - - // RGB - vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]); - - - // vec3 VIB_coefLuma = vec3(0.333333, 0.333334, 0.333333); // was for `if VIB_LUMA == 1` - vec3 VIB_coefLuma = vec3(0.212656, 0.715158, 0.072186); // try both and see which one looks nicer. - - float luma = dot(VIB_coefLuma, color); - - float max_color = max(color[0], max(color[1], color[2])); - float min_color = min(color[0], min(color[1], color[2])); - - float color_saturation = max_color - min_color; - - vec3 p_col = vec3(vec3(vec3(vec3(sign(VIB_coeffVibrance) * color_saturation) - 1.0) * VIB_coeffVibrance) + 1.0); - - pixColor[0] = mix(luma, color[0], p_col[0]); - pixColor[1] = mix(luma, color[1], p_col[1]); - pixColor[2] = mix(luma, color[2], p_col[2]); - - gl_FragColor = pixColor; -} \ No newline at end of file diff --git a/modules/home-manager/desktops/hyprland/keybinds.nix b/modules/home-manager/desktops/hyprland/keybinds.nix deleted file mode 100644 index 33d5097..0000000 --- a/modules/home-manager/desktops/hyprland/keybinds.nix +++ /dev/null @@ -1,49 +0,0 @@ -[ - "SUPER,Q,killactive" - "SUPER,T,exec,kitty" - "SUPER,TAB,exec,ags -t overview" - "SUPER,C,togglespecialworkspace,calc" - "SUPER_SHIFT,C,exec,hyprpicker | wl-copy" - "SUPER_SHIFT,V,exec,XDG_CURRENT_DESKTOP=sway flameshot gui --clipboard" - "SUPER,P,togglefloating," - "SUPER,P,pin," - "SUPER,D,fullscreen,1" - "SUPER,V,fullscreen,0" - - "SUPER_SHIFT,up,movewindow,u" - "SUPER_SHIFT,down,movewindow,d" - "SUPER_SHIFT,left,movewindow,l" - "SUPER_SHIFT,right,movewindow,r" - - "SUPER,up,movefocus,u" - "SUPER,down,movefocus,d" - "SUPER,left,movefocus,l" - "SUPER,right,movefocus,r" - - "SUPER,f,workspace,r-1" - "SUPER,h,workspace,r+1" - "SUPER_SHIFT,f,movetoworkspace,r-1" - "SUPER_SHIFT,h,movetoworkspace,r+1" - "SUPER,mouse_up,workspace,r+1" - "SUPER,mouse_down,workspace,r-1" - - "SUPER,1,workspace,1" - "SUPER,2,workspace,2" - "SUPER,3,workspace,3" - "SUPER,4,workspace,4" - "SUPER,5,workspace,5" - "SUPER,6,workspace,6" - "SUPER,7,workspace,7" - "SUPER,8,workspace,8" - "SUPER,9,workspace,9" - - "SUPER_SHIFT,1,movetoworkspace,1" - "SUPER_SHIFT,2,movetoworkspace,2" - "SUPER_SHIFT,3,movetoworkspace,3" - "SUPER_SHIFT,4,movetoworkspace,4" - "SUPER_SHIFT,5,movetoworkspace,5" - "SUPER_SHIFT,6,movetoworkspace,6" - "SUPER_SHIFT,7,movetoworkspace,7" - "SUPER_SHIFT,8,movetoworkspace,8" - "SUPER_SHIFT,9,movetoworkspace,9" -] diff --git a/modules/home-manager/desktops/hyprland/kitty.nix b/modules/home-manager/desktops/hyprland/kitty.nix deleted file mode 100644 index e8c472f..0000000 --- a/modules/home-manager/desktops/hyprland/kitty.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ pkgs }: -{ - enable = true; - shellIntegration.enableZshIntegration = true; - extraConfig = '' - symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono - - font_size 12.75 - ''; - settings = { - window_padding_width = 10; - text_composition_strategy = "1.0 0"; - }; -} diff --git a/modules/home-manager/desktops/hyprland/mousebinds.nix b/modules/home-manager/desktops/hyprland/mousebinds.nix deleted file mode 100644 index f4c3f28..0000000 --- a/modules/home-manager/desktops/hyprland/mousebinds.nix +++ /dev/null @@ -1 +0,0 @@ -[ "SUPER,mouse:272,movewindow" "SUPER,mouse:273,resizewindow" ] diff --git a/modules/home-manager/programs/neovide.nix b/modules/home-manager/programs/neovide.nix index 5946b79..db7e803 100644 --- a/modules/home-manager/programs/neovide.nix +++ b/modules/home-manager/programs/neovide.nix @@ -22,6 +22,10 @@ ]; }; }; + wayland.windowManager.hyprland.settings.windowrulev2 = [ + # For some reason it really wants to be maximized + "suppressevent maximize,class:^(neovide)$" + ]; programs.nixvim = { globals = { neovide_text_gamma = 0.0; diff --git a/modules/home-manager/theme/md3-evo.nix b/modules/home-manager/theme/md3-evo.nix index bd187d8..f120e3a 100644 --- a/modules/home-manager/theme/md3-evo.nix +++ b/modules/home-manager/theme/md3-evo.nix @@ -168,217 +168,274 @@ in }; }; - config = lib.mkIf cfg.enable { - home.packages = [ - pkgs.adw-gtk3 - (pkgs.writeShellApplication { - name = "theme"; - runtimeInputs = [ - pkgs.matugen - pkgs.swww - pkgs.zenity - ]; - text = '' - WALLPAPER=${config.xdg.configHome}/matugen/wallpaper + config = + let + theme-script = ( + pkgs.writeShellApplication { + name = "theme"; + runtimeInputs = [ + pkgs.matugen + pkgs.swww + pkgs.zenity + ]; + text = '' + WALLPAPER=${config.xdg.configHome}/matugen/wallpaper - SCHEME=$(dconf read /org/gnome/desktop/interface/color-scheme) - if [ "$SCHEME" = "'prefer-light'" ]; then - MODE="light" - else - MODE="dark" - fi - - if [ $# -eq 0 ]; then - echo -e "\033[1mUsage:\033[0m mode|light|dark|toggle|wallpaper" - exit 1 - elif [ "$1" = "mode" ]; then - echo -e "$MODE" - exit 0 - elif [ "$1" = "wallpaper" ]; then - if [ $# -eq 1 ]; then - PICKED=$(zenity --file-selection --file-filter='Images | *.png *.jpg *.jpeg *.svg *.bmp *.gif') - cp "$PICKED" "$WALLPAPER" - else - cp "$2" "$WALLPAPER" - fi - elif [ "$1" = "toggle" ]; then - if [ "$MODE" = "light" ]; then - MODE="dark" - else + SCHEME=$(dconf read /org/gnome/desktop/interface/color-scheme) + if [ "$SCHEME" = "'prefer-light'" ]; then MODE="light" + else + MODE="dark" fi - elif [ "$1" = "light" ] || [ "$1" = "dark" ]; then - MODE="$1" - elif [ "$1" = "init" ]; then - echo -e "\033[1mSetting up matugen\033[0m" - else - echo -e "\033[31mInvalid argument\033[0m" - exit 1 - fi - if [ ! -f $WALLPAPER ]; then - echo -e "\033[31,1mNo wallpaper set\033[0m" - exit 1 - fi + if [ $# -eq 0 ]; then + echo -e "\033[1mUsage:\033[0m mode|light|dark|toggle|wallpaper" + exit 1 + elif [ "$1" = "mode" ]; then + echo -e "$MODE" + exit 0 + elif [ "$1" = "wallpaper" ]; then + if [ $# -eq 1 ]; then + PICKED=$(zenity --file-selection --file-filter='Images | *.png *.jpg *.jpeg *.svg *.bmp *.gif') + cp "$PICKED" "$WALLPAPER" + else + cp "$2" "$WALLPAPER" + fi + elif [ "$1" = "toggle" ]; then + if [ "$MODE" = "light" ]; then + MODE="dark" + else + MODE="light" + fi + elif [ "$1" = "light" ] || [ "$1" = "dark" ]; then + MODE="$1" + elif [ "$1" = "init" ]; then + echo -e "\033[1mSetting up matugen\033[0m" + else + echo -e "\033[31mInvalid argument\033[0m" + exit 1 + fi - if [ "$MODE" = "light" ]; then - GTK_THEME="adw-gtk3" - else - GTK_THEME="adw-gtk3-dark" - fi + if [ ! -f $WALLPAPER ]; then + echo -e "\033[31,1mNo wallpaper set\033[0m" + exit 1 + fi - matugen image "$WALLPAPER" --type scheme-${cfg.flavour} --contrast ${builtins.toString cfg.contrast} --mode "$MODE" - sed -i "s/set background=dark/set background=$MODE/g" ${config.xdg.configHome}/nvim/colors/md3-evo.vim + if [ "$MODE" = "light" ]; then + GTK_THEME="adw-gtk3" + else + GTK_THEME="adw-gtk3-dark" + fi - dconf write /org/gnome/desktop/interface/gtk-theme "'$GTK_THEME'" - dconf write /org/gnome/desktop/interface/color-scheme "'prefer-$MODE'" + matugen image "$WALLPAPER" --type scheme-${cfg.flavour} --contrast ${builtins.toString cfg.contrast} --mode "$MODE" + sed -i "s/set background=dark/set background=$MODE/g" ${config.xdg.configHome}/nvim/colors/md3-evo.vim - if command -v hyprctl &> /dev/null; then - hyprctl reload - fi + dconf write /org/gnome/desktop/interface/gtk-theme "'$GTK_THEME'" + dconf write /org/gnome/desktop/interface/color-scheme "'prefer-$MODE'" - for i in $(pgrep -u "$USER" -x nvim); do - kill -USR1 "$i" - done - ''; - }) - ]; + if command -v hyprctl &> /dev/null; then + hyprctl reload + fi - programs.kitty = { - extraConfig = '' - include ${config.xdg.configHome}/kitty/theme.conf - ''; - }; - - programs.nixvim = { - opts.termguicolors = true; - colorscheme = "md3-evo"; - autoCmd = [ - { - event = [ "Signal" ]; - pattern = [ "SIGUSR1" ]; - command = # vim - "colorscheme md3-evo"; - nested = true; + for i in $(pgrep -u "$USER" -x nvim); do + kill -USR1 "$i" + done + ''; } + ); + in + lib.mkIf cfg.enable { + home.packages = [ + pkgs.adw-gtk3 + theme-script ]; - plugins.lualine.settings.options.theme.__raw = # lua - "function() return vim.g.lualine_theme end"; - }; - gtk = { - gtk3.extraCss = # css - "@import './theme.css';"; - gtk4.extraCss = # css - "@import './theme.css';"; - }; + gtk = { + gtk3.extraCss = # css + "@import './theme.css';"; + gtk4.extraCss = # css + "@import './theme.css';"; + iconTheme = { + name = "Tela"; + package = pkgs.tela-icon-theme; + }; + }; + qt.platformTheme.name = "qtct"; - wayland.windowManager.hyprland = { - settings.exec-once = [ - "${pkgs.swww}/bin/swww-daemon" - "theme init" - ]; - extraConfig = '' - source=./theme.conf - ''; - }; - - programs.matugen = { - enable = true; - settings = { - config = { - reload_apps = true; - reload_apps_list = { - kitty = config.programs.kitty.enable; - waybar = false; - dunst = config.services.dunst.enable; - }; - - set_wallpaper = true; - wallpaper_tool = "Swww"; - - custom_colors = - let - mkColor = category: color: { - color = cfg.${category}.${color}; - blend = cfg.${category}.blend; - }; - in - { - red = mkColor "ansi" "red"; - green = mkColor "ansi" "green"; - yellow = mkColor "ansi" "yellow"; - orange = mkColor "ansi" "orange"; - blue = mkColor "ansi" "blue"; - magenta = mkColor "ansi" "magenta"; - cyan = mkColor "ansi" "cyan"; - - keywords = mkColor "syntax" "keywords"; - functions = mkColor "syntax" "functions"; - constants = mkColor "syntax" "constants"; - properties = mkColor "syntax" "properties"; - strings = mkColor "syntax" "strings"; - numbers = mkColor "syntax" "numbers"; - structures = mkColor "syntax" "structures"; - types = mkColor "syntax" "types"; - - danger = mkColor "semantic" "danger"; - warning = mkColor "semantic" "warning"; - success = mkColor "semantic" "success"; - info = mkColor "semantic" "info"; + systemd.user.services = { + /* + swww-daemon = { + Unit = { + Description = "Swww Daemon"; + After = [ "graphical-session.target" ]; }; - - custom_keywords = { - padding = builtins.toString cfg.padding; - double_padding = builtins.toString (cfg.padding * 2); - radius = builtins.toString cfg.radius; - transparency = builtins.toString cfg.transparency; - blur = builtins.toString cfg.blur; - flavour = cfg.flavour; - contrast = builtins.toString cfg.contrast; - transparency_hex = - let - zeroPad = hex: if builtins.stringLength hex == 1 then "0${hex}" else hex; - in - zeroPad (lib.trivial.toHexString (builtins.floor (cfg.transparency * 255))); + Install.WantedBy = [ "graphical-session.target" ]; + Service = { + ExecStart = "${pkgs.swww}/bin/swww-daemon"; + Restart = "on-failure"; + }; + }; + */ + theme-init = { + Unit = { + Description = "MD3 Evo Theme Init"; + After = [ + "graphical-session.target" + "swww-daemon.service" + ]; + }; + Install.WantedBy = [ "graphical-session.target" ]; + Service = { + ExecStart = "${lib.getExe theme-script} init"; + Restart = "on-failure"; }; }; + }; - templates = - let - gtk = pkgs.writeText "gtk4.css" (import ./gtk.nix); - in - { - kitty = { - input_path = ./kitty.conf; - output_path = "${config.xdg.configHome}/kitty/theme.conf"; - }; - nvim = { - input_path = ./nvim.vim; - output_path = "${config.xdg.configHome}/nvim/colors/md3-evo.vim"; - }; - hyprland = { - input_path = ./hyprland.conf; - output_path = "${config.xdg.configHome}/hypr/theme.conf"; - }; - anyrun = { - input_path = ./anyrun.css; - output_path = "${config.xdg.configHome}/anyrun/theme.css"; - }; - gtk3 = { - input_path = gtk; - output_path = "${config.xdg.configHome}/gtk-3.0/theme.css"; - }; - gtk4 = { - input_path = gtk; - output_path = "${config.xdg.configHome}/gtk-4.0/theme.css"; - }; - vesktop = { - input_path = ./discord.css; - output_path = "${config.xdg.configHome}/vesktop/themes/matugen.theme.css"; - }; + wayland.windowManager.hyprland = { + settings = { + windowrulev2 = [ "float,class:^(zenity)$" ]; + decoration.shadow = { + enabled = true; + range = 16; + color = "rgba(00000044)"; }; + animations = { + enabled = "yes"; + bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; + animation = [ + "windows, 1, 5, myBezier" + "windowsOut, 1, 7, default, popin 80%" + "border, 1, 10, default" + "fade, 1, 7, default" + "workspaces, 1, 6, default" + ]; + }; + }; + extraConfig = '' + source=./theme.conf + ''; + }; + + programs = { + kitty = { + extraConfig = '' + include ${config.xdg.configHome}/kitty/theme.conf + ''; + }; + + nixvim = { + opts.termguicolors = true; + colorscheme = "md3-evo"; + autoCmd = [ + { + event = [ "Signal" ]; + pattern = [ "SIGUSR1" ]; + command = # vim + "colorscheme md3-evo"; + nested = true; + } + ]; + plugins.lualine.settings.options.theme.__raw = # lua + "function() return vim.g.lualine_theme end"; + }; + matugen = { + enable = true; + settings = { + config = { + reload_apps = true; + reload_apps_list = { + kitty = config.programs.kitty.enable; + waybar = false; + dunst = config.services.dunst.enable; + }; + + set_wallpaper = true; + wallpaper_tool = "Swww"; + + custom_colors = + let + mkColor = category: color: { + inherit (cfg.${category}) blend; + color = cfg.${category}.${color}; + }; + in + { + red = mkColor "ansi" "red"; + green = mkColor "ansi" "green"; + yellow = mkColor "ansi" "yellow"; + orange = mkColor "ansi" "orange"; + blue = mkColor "ansi" "blue"; + magenta = mkColor "ansi" "magenta"; + cyan = mkColor "ansi" "cyan"; + + keywords = mkColor "syntax" "keywords"; + functions = mkColor "syntax" "functions"; + constants = mkColor "syntax" "constants"; + properties = mkColor "syntax" "properties"; + strings = mkColor "syntax" "strings"; + numbers = mkColor "syntax" "numbers"; + structures = mkColor "syntax" "structures"; + types = mkColor "syntax" "types"; + + danger = mkColor "semantic" "danger"; + warning = mkColor "semantic" "warning"; + success = mkColor "semantic" "success"; + info = mkColor "semantic" "info"; + }; + + custom_keywords = { + inherit (cfg) flavour; + padding = builtins.toString cfg.padding; + double_padding = builtins.toString (cfg.padding * 2); + radius = builtins.toString cfg.radius; + transparency = builtins.toString cfg.transparency; + blur = builtins.toString cfg.blur; + contrast = builtins.toString cfg.contrast; + transparency_hex = + let + zeroPad = hex: if builtins.stringLength hex == 1 then "0${hex}" else hex; + in + zeroPad (lib.trivial.toHexString (builtins.floor (cfg.transparency * 255))); + }; + }; + + templates = + let + gtk = pkgs.writeText "gtk4.css" (import ./gtk.nix); + in + { + kitty = { + input_path = ./kitty.conf; + output_path = "${config.xdg.configHome}/kitty/theme.conf"; + }; + nvim = { + input_path = ./nvim.vim; + output_path = "${config.xdg.configHome}/nvim/colors/md3-evo.vim"; + }; + hyprland = { + input_path = ./hyprland.conf; + output_path = "${config.xdg.configHome}/hypr/theme.conf"; + }; + anyrun = { + input_path = ./anyrun.css; + output_path = "${config.xdg.configHome}/anyrun/theme.css"; + }; + gtk3 = { + input_path = gtk; + output_path = "${config.xdg.configHome}/gtk-3.0/theme.css"; + }; + gtk4 = { + input_path = gtk; + output_path = "${config.xdg.configHome}/gtk-4.0/theme.css"; + }; + vesktop = { + input_path = ./discord.css; + output_path = "${config.xdg.configHome}/vesktop/themes/matugen.theme.css"; + }; + }; + }; + }; }; }; - }; } diff --git a/modules/nixos/boot/quiet.nix b/modules/nixos/boot/quiet.nix index 28f19fc..6bdf86e 100644 --- a/modules/nixos/boot/quiet.nix +++ b/modules/nixos/boot/quiet.nix @@ -1,4 +1,9 @@ -{ config, lib, ... }: +{ + config, + lib, + username, + ... +}: with lib; @@ -11,10 +16,11 @@ in }; config = mkIf cfg.enable { + users.users.${username}.linger = true; boot = { loader.timeout = 0; - # plymouth.enable = true; + plymouth.enable = true; kernelParams = [ "quiet" @@ -25,7 +31,31 @@ in "vt.global_cursor_default=0" # no cursor blinking ]; consoleLogLevel = 0; - initrd.verbose = false; + initrd = { + verbose = false; + systemd = { + enable = true; + services = { + #plymouth-quit.wantedBy = lib.mkForce [ ]; + # plymouth-quit-wait.wantedBy = lib.mkForce [ ]; + }; + }; + }; }; + services.greetd.greeterManagesPlymouth = true; + /* + systemd.services = { + plymouth-quit-wait = { + overrideStrategy = "asDropin"; + after = [ "graphical-session.target" ]; + wantedBy = lib.mkForce [ "graphical-session.target" ]; + }; + plymouth-quit = { + overrideStrategy = "asDropin"; + after = [ "graphical-session.target" ]; + wantedBy = lib.mkForce [ "graphical-session.target" ]; + }; + }; + */ }; } diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 2b99b2a..0a37c42 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -4,7 +4,6 @@ ./boot/quiet.nix ./desktops/hyprland.nix - ./desktops/gamescope.nix ./fonts/fira-code.nix ./fonts/noto-sans.nix @@ -30,8 +29,14 @@ ./services/airprint.nix - ./shell/waybar.nix ./shell/dunst.nix + ./shell/firefox-pip.nix + ./shell/flameshot.nix + ./shell/gnome-keyring.nix + ./shell/hyprpicker.nix + ./shell/kitty.nix + ./shell/walker.nix + ./shell/waybar.nix ./xdg/forced-compliance.nix ]; diff --git a/modules/nixos/desktops/gamescope.nix b/modules/nixos/desktops/gamescope.nix deleted file mode 100644 index db619d5..0000000 --- a/modules/nixos/desktops/gamescope.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ - config, - lib, - pkgs, - username, - ... -}: - -with lib; - -let - cfg = config.desktops.gamescope; -in -{ - options.desktops.gamescope.enable = mkEnableOption "Enable the SteamOS Compositor as a desktop environment"; - - config = mkIf cfg.enable { - programs.steam = { - enable = true; - gamescopeSession = { - enable = true; - args = [ - "--hide-cursor-delay" - "3000" - "--fadee-out-duration" - "200" - "--xwayland-count" - "2" - "-W" - (placeholder "SCREEN_WIDTH") - "-H" - (placeholder "SCREEN_HEIGHT") - ]; - }; - }; - - /* - services = { - greetd = { - enable = true; - settings = rec { - initial_session = { - command = "${pkgs.hyprland}/bin/Hyprland &> /dev/null"; - user = username; - }; - default_session = "${pkgs.greetd.tuigreet}/bin/tuigreet"; - }; - }; - - dbus.enable = true; - - pcscd.enable = true; - - # nautilus on non-gnome - gvfs.enable = true; - # fix pinentry on non-gnome - dbus.packages = with pkgs; [ gcr ]; - gnome.gnome-online-accounts.enable = true; - gnome.evolution-data-server.enable = true; - }; - - programs = { - hyprland.enable = true; - kdeconnect.enable = true; - }; - - environment.sessionVariables.NIXOS_OZONE_WL = "1"; - */ - }; -} diff --git a/modules/nixos/desktops/hyprland.nix b/modules/nixos/desktops/hyprland.nix index 697a084..391b873 100644 --- a/modules/nixos/desktops/hyprland.nix +++ b/modules/nixos/desktops/hyprland.nix @@ -8,6 +8,7 @@ let cfg = config.desktops.hyprland; + homeConfig = config.home-manager.users.${username}; in { options.desktops.hyprland = { @@ -15,12 +16,123 @@ in }; config = lib.mkIf cfg.enable { - environment = { - sessionVariables.NIXOS_OZONE_WL = "1"; - systemPackages = with pkgs; [ glib ]; + environment.systemPackages = with pkgs; [ glib ]; + + programs.hyprland = { + enable = true; + withUWSM = true; + }; + home-manager.users.${username} = { + wayland.windowManager.hyprland = { + systemd.enable = false; + }; + home.sessionVariables = { + NIXOS_OZONE_WL = "1"; + GDK_BACKEND = "wayland,x11,*"; + QT_QPA_PLATFORM = "wayland;xcb"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + SDL_VIDEODRIVER = "wayland"; + CLUTTER_BACKEND = "wayland"; + }; + xdg.configFile."uwsm/env".source = pkgs.writeText "env" ( + lib.strings.concatLines ( + lib.attrsets.mapAttrsToList ( + k: v: "export ${builtins.toString k}=${builtins.toString v}" + ) config.home-manager.users.${username}.home.sessionVariables + ) + ); + systemd.user.services = { + "flatpak-managed-install".Unit = { + After = [ "network-online.target" ]; + Wants = [ "network-online.target" ]; + }; + }; + /* + programs.zsh.initExtraFirst = # sh + '' + if uwsm check may-start; then + exec uwsm start hyprland-uwsm.desktop > ${homeConfig.xdg.configHome}/uwsm.log 2> ${homeConfig.xdg.configHome}/uwsm.err + fi + ''; + */ + }; + + systemd.services = { + "flatpak-managed-install" = { + after = [ "network-online.target" ]; + wants = [ "network-online.target" ]; + }; + greetd.serviceConfig = { + Type = "idle"; + StandardInput = "tty"; + StandardOutput = "journal"; + StandardError = "journal"; + TTYReset = false; + TTYVHangup = false; + TTYVTDisallocate = false; + }; + /* + "uwsm-display-manager" = { + description = "UWSM Display Manager"; + conflicts = [ "getty@tty1.service" ]; + after = [ + "systemd-user-sessions.service" + "plymouth-quit-wait.service" + "getty@tty1.service" + ]; + serviceConfig = { + Type = "simple"; + IgnoreSIGPIPE = "no"; + SendSIGHUP = "yes"; + TimeoutStopSec = "30s"; + KeyringMode = "shared"; + Restart = "always"; + RestartSec = "5"; + StartLimitBurst = "5"; + StartLimitInterval = "30"; + }; + restartIfChanged = false; + script = '' + ${pkgs.sudo}/bin/sudo -u ${username} --login uwsm start hyprland-uwsm.desktop + ''; + environment = { + DISPLAY = ":0"; + # XDG_RUNTIME_DIR = "/run/user/$(id -u ${username})"; + }; + aliases = [ "display-manager.service" ]; + }; + */ + /* + "getty@tty1" = { + overrideStrategy = "asDropin"; + description = "Start Hyprland"; + after = [ + "sysinit.target" + "initrd-switch-root.service" + "systemd-udev-trigger.service" + "seatd.service" + "systemd-logind.service" + ]; + wants = [ + "systemd-udev-trigger.service" + "seatd.service" + "systemd-logind.service" + ]; + unitConfig.ConditionPathExists = "/home/${username}"; + onFailure = [ "emergency.target" ]; + serviceConfig.Type = "simple"; + preStart = "+${pkgs.coreutils}/bin/rm -f /run/nologin"; + script = '' + -${pkgs.util-linux}/bin/agetty -o '-p -f -- \u' --noclear --autologin ${username} %I $TERM StandardOutput=null StandardError=journal + ''; + wantedBy = [ + "graphical.target" + "initrd-switch-root.service" + ]; + }; + */ }; - programs.hyprland.enable = true; xdg.portal = { enable = true; extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; @@ -35,38 +147,46 @@ in }; # https://github.com/sjcobb2022/nixos-config/blob/70fb548b961c19e9855d2de86ee9569a7a88d976/hosts/common/optional/greetd.nix#L23C1-L33C2 - systemd.services.greetd.serviceConfig = { - Type = "idle"; - StandardInput = "tty"; - StandardOutput = "tty"; - StandardError = "journal"; # Without this errors will spam on screen - # Without these bootlogs will spam on screen - TTYReset = true; - TTYVHangup = true; - TTYVTDisallocate = true; - }; + /* + systemd.services = { + greetd.serviceConfig = { + Type = "idle"; + StandardInput = "tty"; + StandardOutput = "tty"; + StandardError = "journal"; # Without this errors will spam on screen + # Without these bootlogs will spam on screen + TTYReset = true; + TTYVHangup = true; + TTYVTDisallocate = true; + }; + }; + */ services = { greetd = { enable = true; + greeterManagesPlymouth = false; + vt = 2; settings = { - default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks --remember --remember-session --sessions ${pkgs.hyprland}/share/wayland-sessions"; + initial_session = { + command = "uwsm start hyprland-uwsm.desktop"; user = username; }; + default_session = { + command = "${lib.getExe pkgs.greetd.tuigreet} --asterisks --remember --user-menu --cmd 'uwsm start hyprland-uwsm.desktop'"; + user = username; + }; + terminal.switch = false; }; }; - - dbus.enable = true; - + dbus = { + enable = true; + implementation = "broker"; + }; pcscd.enable = true; - # nautilus on non-gnome gvfs.enable = true; - # fix pinentry on non-gnome - dbus.packages = with pkgs; [ gcr ]; - gnome.gnome-online-accounts.enable = true; - gnome.evolution-data-server.enable = true; }; + programs.dconf.enable = true; }; } diff --git a/modules/nixos/hardware/amdgpu.nix b/modules/nixos/hardware/amdgpu.nix index 6cbe556..aa457cd 100644 --- a/modules/nixos/hardware/amdgpu.nix +++ b/modules/nixos/hardware/amdgpu.nix @@ -21,12 +21,26 @@ in extraPackages = with pkgs; [ rocmPackages.clr.icd ]; }; + systemd.tmpfiles.rules = + let + rocmEnv = pkgs.symlinkJoin { + name = "rocm-combined"; + paths = with pkgs.rocmPackages; [ + rocblas + hipblas + clr + ]; + }; + in + [ + "L+ /opt/rocm - - - - ${rocmEnv}" + ]; + boot = { # https://docs.kernel.org/gpu/amdgpu/module-parameters.html kernelParams = [ "amdgpu.seamless=1" "amdgpu.freesync_video=1" - "initcall_blacklist=simpledrm_platform_driver_init" ]; initrd.kernelModules = [ "amdgpu" ]; }; @@ -36,6 +50,7 @@ in glxinfo libva-utils vulkan-tools + clinfo ]; }; } diff --git a/modules/nixos/hardware/fv43u.icc b/modules/nixos/hardware/fv43u.icc new file mode 100644 index 0000000..56744d5 Binary files /dev/null and b/modules/nixos/hardware/fv43u.icc differ diff --git a/modules/nixos/hardware/fv43u.nix b/modules/nixos/hardware/fv43u.nix index ed3a572..9a2fae8 100644 --- a/modules/nixos/hardware/fv43u.nix +++ b/modules/nixos/hardware/fv43u.nix @@ -17,15 +17,42 @@ in config = mkIf cfg.enable { fonts.fontconfig.subpixel.rgba = "bgr"; - hardware.gbmonctl.enable = true; - boot.kernelParams = [ "video=3840x2160@144" ]; + hardware = { + gbmonctl.enable = true; + firmware = [ + (pkgs.runCommandNoCC "fv43u_edid" { } '' + mkdir -p $out/lib/firmware/edid + cp ${./fv43u_edid.bin} $out/lib/firmware/edid/fv43u.bin + '') + ]; + }; + boot = { + kernelParams = [ + "drm.edid_firmware=DP-3:edid/fv43u.bin" + "video=DP-3:3840x2160-30@144" + ]; + initrd.extraFiles."lib/firmware/edid/fv43u.bin".source = + pkgs.runCommandLocal "fv43u_edid" { } + "cp ${./fv43u_edid.bin} $out"; + }; + services.colord.enable = true; + environment.systemPackages = [ + (pkgs.runCommandNoCC "fv43u_icc" { } '' + mkdir -p $out/share/color/icc + cp ${./fv43u.icc} $out/share/color/icc/fv43u.icc + '') + ]; home-manager.users.${username} = { + home.sessionVariables = { + ENABLE_HDR_WSI = "1"; + DXVK_HDR = "1"; + }; wayland.windowManager.hyprland.settings = { general.layout = "master"; master = { orientation = "center"; - always_center_master = true; + slave_count_for_center_master = 0; mfact = 0.4; }; monitor = [ @@ -34,6 +61,13 @@ in ]; xwayland.force_zero_scaling = true; misc.vrr = 2; # VA suffers from VRR flicker + cursor = { + min_refresh_rate = 48; + no_break_fs_vrr = true; + }; + experimental = { + xx_color_management_v4 = true; + }; }; programs.waybar.settings.mainBar."custom/brightness" = @@ -81,16 +115,5 @@ in interval = "once"; }; }; - - programs.steam.gamescopeSession = { - env = { - SCREEN_WIDTH = "3840"; - SCREEN_HEIGHT = "2160"; - }; - args = [ - "--hdr-enabled" - "--hdr-itm-enable" - ]; - }; }; } diff --git a/modules/nixos/hardware/fv43u_edid.bin b/modules/nixos/hardware/fv43u_edid.bin new file mode 100644 index 0000000..50a0329 Binary files /dev/null and b/modules/nixos/hardware/fv43u_edid.bin differ diff --git a/modules/nixos/shell/dunst.nix b/modules/nixos/shell/dunst.nix index db047be..4641b98 100644 --- a/modules/nixos/shell/dunst.nix +++ b/modules/nixos/shell/dunst.nix @@ -1,7 +1,6 @@ { config, lib, - pkgs, username, ... }: diff --git a/modules/nixos/shell/firefox-pip.nix b/modules/nixos/shell/firefox-pip.nix new file mode 100644 index 0000000..2a63458 --- /dev/null +++ b/modules/nixos/shell/firefox-pip.nix @@ -0,0 +1,41 @@ +{ + config, + lib, + username, + ... +}: + +let + cfg = config.shell.components.firefox-pip; + homeConfig = config.home-manager.users.${username}; +in +{ + options.shell.components.firefox-pip = { + enable = lib.mkEnableOption (lib.mdDoc "Enable firefox-pip"); + }; + + config = lib.mkIf cfg.enable { + home-manager.users.${username} = { + wayland.windowManager.hyprland.settings = { + windowrulev2 = + let + firefoxPip = "class:^(firefox)$,title:^(Picture-in-Picture)$"; + firefoxPipInitial = "class:^(firefox)$,title:^(Firefox)$"; + pipPadding = toString (homeConfig.theme.md3-evo.padding * 2); + in + [ + "keepaspectratio,${firefoxPip}" + "noborder,${firefoxPip}" + "float,${firefoxPip}" + "float,${firefoxPipInitial}" + "pin,${firefoxPip}" + "pin,${firefoxPipInitial}" + "fullscreenstate 2 0,${firefoxPip}" + "fullscreenstate 2 0,${firefoxPipInitial}" + "move ${pipPadding} ${pipPadding},${firefoxPip}" + "move ${pipPadding} ${pipPadding},${firefoxPipInitial}" + ]; + }; + }; + }; +} diff --git a/modules/nixos/shell/flameshot.nix b/modules/nixos/shell/flameshot.nix new file mode 100644 index 0000000..850cdcc --- /dev/null +++ b/modules/nixos/shell/flameshot.nix @@ -0,0 +1,56 @@ +{ + config, + lib, + pkgs, + username, + ... +}: + +let + cfg = config.shell.components.flameshot; +in +{ + options.shell.components.flameshot = { + enable = lib.mkEnableOption (lib.mdDoc "Enable a pre-configured flameshot"); + }; + + config = lib.mkIf cfg.enable { + home-manager.users.${username} = { + wayland.windowManager.hyprland = { + settings = { + bind = [ + "SUPER_SHIFT,V,exec,XDG_CURRENT_DESKTOP=sway uwsm app -- flameshot gui --clipboard" + ]; + windowrulev2 = [ + "float,class:^(flameshot)$" + "animation fade,class:^(flameshot)$" + ]; + }; + }; + + systemd.user.services."flameshot" = { + Unit.After = lib.mkForce [ "graphical-session.target" ]; + Install.WantedBy = lib.mkForce [ "graphical-session.target" ]; + }; + services.flameshot = { + enable = true; + package = pkgs.flameshot.overrideAttrs ( + final: prev: { + cmakeFlags = [ + "-DUSE_WAYLAND_CLIPBOARD=1" + "-DUSE_WAYLAND_GRIM=true" + ]; + nativeBuildInputs = prev.nativeBuildInputs ++ [ pkgs.libsForQt5.kguiaddons ]; + } + ); + settings = { + General = { + uiColor = "#99d1db"; + showDesktopNotification = false; + disabledTrayIcon = true; + }; + }; + }; + }; + }; +} diff --git a/modules/nixos/shell/gnome-keyring.nix b/modules/nixos/shell/gnome-keyring.nix new file mode 100644 index 0000000..6446061 --- /dev/null +++ b/modules/nixos/shell/gnome-keyring.nix @@ -0,0 +1,62 @@ +{ + config, + lib, + pkgs, + username, + ... +}: + +let + cfg = config.shell.components.gnome-keyring; +in +{ + options.shell.components.gnome-keyring = { + enable = lib.mkEnableOption (lib.mdDoc "Enable the gnome keyring"); + }; + + config = lib.mkIf cfg.enable { + home-manager.users.${username} = { + wayland.windowManager.hyprland.settings.windowrulev2 = [ + "dimaround,class:^(gcr-prompter)$" + "noborder,class:^(gcr-prompter)$" + "rounding 10,class:^(gcr-prompter)$" + "animation slide,class:^(gcr-prompter)$" + ]; + home.packages = with pkgs; [ + polkit_gnome + gnome-keyring + ]; + /* + systemd.user.services = { + polkit-gnome-authentication-agent-1 = { + Unit = { + Description = "Gnome Polkit Agent"; + After = [ + "graphical-session.target" + "gnome-keyring-daemon.service" + ]; + }; + Install.WantedBy = [ "graphical-session.target" ]; + Service = { + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + }; + }; + gnome-keyring-daemon = { + Unit = { + Description = "Gnome Keyring Daemon"; + After = [ "graphical-session.target" ]; + }; + Install.WantedBy = [ "graphical-session.target" ]; + Service = { + ExecStart = "${pkgs.gnome-keyring}/bin/gnome-keyring-daemon --start --components=secrets"; + Restart = "on-failure"; + }; + }; + }; + */ + }; + # fix pinentry on non-gnome + services.dbus.packages = with pkgs; [ gcr ]; + }; +} diff --git a/modules/nixos/shell/hyprpicker.nix b/modules/nixos/shell/hyprpicker.nix new file mode 100644 index 0000000..81cd4fc --- /dev/null +++ b/modules/nixos/shell/hyprpicker.nix @@ -0,0 +1,28 @@ +{ + config, + lib, + pkgs, + username, + ... +}: + +let + cfg = config.shell.components.hyprpicker; +in +{ + options.shell.components.hyprpicker = { + enable = lib.mkEnableOption (lib.mdDoc "Enable a pre-configured hyprpicker"); + }; + + config = lib.mkIf cfg.enable { + home-manager.users.${username}.wayland.windowManager.hyprland.settings.bind = + let + color-picker = pkgs.writeShellScript "color-picker" '' + ${lib.getExe pkgs.hyprpicker} | ${pkgs.wl-clipboard}/bin/wl-copy + ''; + in + [ + "SUPER_SHIFT,C,exec,uwsm app -- ${color-picker}" + ]; + }; +} diff --git a/modules/nixos/shell/kitty.nix b/modules/nixos/shell/kitty.nix new file mode 100644 index 0000000..ee807e9 --- /dev/null +++ b/modules/nixos/shell/kitty.nix @@ -0,0 +1,36 @@ +{ + config, + lib, + username, + ... +}: + +let + cfg = config.shell.components.kitty; +in +{ + options.shell.components.kitty = { + enable = lib.mkEnableOption (lib.mdDoc "Enable pre-configured kitty"); + }; + + config = lib.mkIf cfg.enable { + home-manager.users.${username} = { + wayland.windowManager.hyprland.settings.bind = [ + "SUPER,T,exec,uwsm app -- kitty" + ]; + programs.kitty = { + enable = true; + shellIntegration.enableZshIntegration = true; + extraConfig = '' + symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono + + font_size 12.75 + ''; + settings = { + window_padding_width = 10; + text_composition_strategy = "1.0 0"; + }; + }; + }; + }; +} diff --git a/modules/nixos/shell/walker.nix b/modules/nixos/shell/walker.nix new file mode 100644 index 0000000..77655b0 --- /dev/null +++ b/modules/nixos/shell/walker.nix @@ -0,0 +1,54 @@ +{ + config, + lib, + pkgs, + username, + ... +}: + +let + cfg = config.shell.components.walker; + hmConfig = config.home-manager.users.${username}; +in +{ + options.shell.components.walker = { + enable = lib.mkEnableOption (lib.mdDoc "Enable a pre-configured walker setup"); + }; + + config = lib.mkIf cfg.enable { + home-manager.users.${username} = { + wayland.windowManager.hyprland.settings = { + bindr = [ "SUPER,SUPER_L,exec,uwsm app -- ${lib.getExe pkgs.walker}" ]; + layerrule = [ + # TODO: Add layer rules for walker + "blur, anyrun" + "ignorealpha 0.3, anyrun" + ]; + }; + home.packages = with pkgs; [ + walker + wl-clipboard + ]; + + xdg.configFile."walker/config.toml".source = (pkgs.formats.toml { }).generate "walker-config.toml" { + app_launch_prefix = "uwsm app -- "; + close_when_open = true; + force_keyboard_focus = true; + }; + systemd.user.services.walker = { + Unit = { + Description = "Walker - Application Runner"; + X-Restart-Triggers = [ + "${hmConfig.xdg.configFile."walker/config.toml".source}" + ]; + After = [ "graphical-session.target" ]; + }; + Install.WantedBy = [ "graphical-session.target" ]; + Service = { + ExecStart = "${lib.getExe pkgs.walker} --gapplication-service"; + Restart = "always"; + }; + }; + }; + }; +} diff --git a/modules/nixos/shell/waybar.nix b/modules/nixos/shell/waybar.nix index 2f2cfe2..e326cca 100644 --- a/modules/nixos/shell/waybar.nix +++ b/modules/nixos/shell/waybar.nix @@ -68,9 +68,9 @@ in }; }; }; - systemd = lib.mkIf config.desktops.hyprland.enable { + systemd = { enable = true; - target = "hyprland-session.target"; + target = "graphical-session.target"; }; }; }; diff --git a/overlays/plymouth/drm-close-fb.patch b/overlays/plymouth/drm-close-fb.patch new file mode 100644 index 0000000..f5829fc --- /dev/null +++ b/overlays/plymouth/drm-close-fb.patch @@ -0,0 +1,16 @@ +diff --git a/src/plugins/renderers/drm/plugin.c b/src/plugins/renderers/drm/plugin.c +index 0335283d..cd7256e4 100644 +--- a/src/plugins/renderers/drm/plugin.c ++++ b/src/plugins/renderers/drm/plugin.c +@@ -263,7 +263,10 @@ ply_renderer_buffer_free (ply_renderer_backend_t *backend, + struct drm_mode_destroy_dumb destroy_dumb_buffer_request; + + if (buffer->added_fb) +- drmModeRmFB (backend->device_fd, buffer->id); ++ /* Use CloseFB if possible, to avoid screen flicker when handing ++ * over to the login manager */ ++ if (drmModeCloseFB (backend->device_fd, buffer->id) == -EINVAL) ++ drmModeRmFB (backend->device_fd, buffer->id); + + if (buffer->map_address != MAP_FAILED) { + munmap (buffer->map_address, buffer->map_size);