dotfiles

My PC Dotfiles & Website
commit be17faa6b48b9cc2cbc59a8de4f875dcfb6f2011
parent 3c23a4f0200cff9bead9942d958ae897c56dfb51
Author: V7 <maydayv7@gmail.com>
Date:   Mon, 15 Jun 2026 22:58:47 +0530

feat: IM BACK!

Diffstat:

A.github/ISSUE_TEMPLATE/bug-report.md | 40++++++++++++++++++++++++++++++++++++++++
A.github/ISSUE_TEMPLATE/feature-request.md | 19+++++++++++++++++++
A.github/ISSUE_TEMPLATE/help-request.md | 32++++++++++++++++++++++++++++++++
D.github/devcontainer | 2--
A.github/workflows/build.yml | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.github/workflows/check.yml | 33+++++++++++++++++++++++++++++++++
Rnixos/checks/github/workflows/install.yml -> .github/workflows/install.yml | 0
A.github/workflows/shell.yml | 33+++++++++++++++++++++++++++++++++
A.github/workflows/update.yml | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
M.github/workflows/website-git.yaml | 2+-
M.github/workflows/website.yml | 2+-
M.gitignore | 1+
MCHANGELOG.md | 24++++++++++++++++++++++++
MREADME.md | 400+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Darch/COMMANDS.md | 60------------------------------------------------------------
Darch/INSTALL.md | 174-------------------------------------------------------------------------------
Darch/zshrc | 41-----------------------------------------
Afiles/README.md | 6++++++
Afiles/_module.nix | 148+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/ascii/groot | 10++++++++++
Afiles/ascii/lol | 7+++++++
Afiles/ascii/pacman | 12++++++++++++
Afiles/ascii/tux | 19+++++++++++++++++++
Afiles/colors/README.md | 26++++++++++++++++++++++++++
Afiles/colors/adwaita.yaml | 18++++++++++++++++++
Afiles/colors/catppuccin.yaml | 18++++++++++++++++++
Afiles/fastfetch.jsonc | 160+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/geany/keybindings.conf | 152+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/geany/settings.conf | 188+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/git/hooks/commit-msg | 16++++++++++++++++
Afiles/git/hooks/pre-commit | 10++++++++++
Afiles/gnome/menu.json | 102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/gnome/shortcuts.json | 304+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/hyprland/greeter.conf | 20++++++++++++++++++++
Afiles/hyprland/kebihelp.json | 1640+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/hyprland/pypr.toml | 40++++++++++++++++++++++++++++++++++++++++
Afiles/hyprland/shaders/dim.frag | 14++++++++++++++
Afiles/hyprland/shaders/invert.frag | 15+++++++++++++++
Afiles/hyprland/shaders/monochrome.frag | 21+++++++++++++++++++++
Afiles/hyprland/theme/drawer.css | 26++++++++++++++++++++++++++
Afiles/hyprland/theme/hyprshell.css | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/hyprland/theme/waybar.css | 226+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/hyprland/waycorner.toml | 11+++++++++++
R.misc/banner-dark.png -> files/images/banner-dark.png | 0
R.misc/banner-light.png -> files/images/banner-light.png | 0
Rnixos/files/images/desktop/gnome.jpg -> files/images/desktop/gnome.jpg | 0
Rnixos/files/images/desktop/hyprland.jpg -> files/images/desktop/hyprland.jpg | 0
Rnixos/files/images/desktop/old/gnome_41.jpg -> files/images/desktop/old/gnome_41.jpg | 0
Rnixos/files/images/desktop/old/gnome_44.jpg -> files/images/desktop/old/gnome_44.jpg | 0
Rnixos/files/images/desktop/old/gnome_45.jpg -> files/images/desktop/old/gnome_45.jpg | 0
Rnixos/files/images/desktop/pantheon.jpg -> files/images/desktop/pantheon.jpg | 0
R.misc/desktop.png -> files/images/desktop/windows.png | 0
Rnixos/files/images/desktop/xfce.jpg -> files/images/desktop/xfce.jpg | 0
Rnixos/files/images/transparent.png -> files/images/transparent.png | 0
R.misc/website.png -> files/images/website.png | 0
Afiles/logseq/preferences.json | 22++++++++++++++++++++++
Afiles/logseq/settings/logseq-awesome-ui.json | 23+++++++++++++++++++++++
Afiles/logseq/settings/logseq-bullet-threading.json | 6++++++
Afiles/logseq/settings/logseq-git.json | 9+++++++++
Afiles/logseq/settings/logseq-journals-calendar.json | 10++++++++++
Afiles/logseq/settings/logseq-move-block.json | 7+++++++
Afiles/logseq/settings/logseq-pdf-export-plugin.json | 14++++++++++++++
Afiles/logseq/settings/logseq-tabs.json | 11+++++++++++
Afiles/logseq/settings/logseq-tocgen.json | 13+++++++++++++
Afiles/nanorc | 9+++++++++
Afiles/pcmanfm.conf | 116+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/repl.nix | 48++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/sunsetr/presets/3000/sunsetr.toml | 3+++
Afiles/sunsetr/presets/4000/sunsetr.toml | 3+++
Afiles/sunsetr/presets/5000/sunsetr.toml | 3+++
Afiles/sunsetr/presets/6000/sunsetr.toml | 3+++
Afiles/sunsetr/presets/7000/sunsetr.toml | 3+++
Afiles/sunsetr/presets/8000/sunsetr.toml | 3+++
Afiles/sunsetr/sunsetr.toml | 16++++++++++++++++
Afiles/swaync.css | 251+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rnixos/files/templates/Document.docx -> files/templates/Document.docx | 0
Rnixos/devices/.keep -> files/templates/File | 0
Rnixos/files/templates/Presentation.pptx -> files/templates/Presentation.pptx | 0
Rnixos/files/templates/Spreadsheet.xlsx -> files/templates/Spreadsheet.xlsx | 0
Afiles/tmuxrc.tmux | 11+++++++++++
Afiles/vscode/keybindings.json | 28++++++++++++++++++++++++++++
Afiles/vscode/settings.json | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rwindows/Vollmond.rmskin -> files/windows/Vollmond.rmskin | 0
Afiles/windows/packages.ubundle | 1578+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rwindows/powertoys/settings_134221974307868093.ptb -> files/windows/powertoys/settings_134221974307868093.ptb | 0
Rwindows/scripts/clipboard.ahk -> files/windows/scripts/clipboard.ahk | 0
Rwindows/scripts/keybinds.ahk -> files/windows/scripts/keybinds.ahk | 0
Rwindows/starship.toml -> files/windows/starship.toml | 0
Rwindows/windhawk.zip -> files/windows/windhawk.zip | 0
Rwindows/wsl/.zsh_plugins.txt -> files/windows/wsl/.zsh_plugins.txt | 0
Rwindows/wsl/.zshrc -> files/windows/wsl/.zshrc | 0
Rwindows/yasb/config.yaml -> files/windows/yasb/config.yaml | 0
Rwindows/yasb/styles.css -> files/windows/yasb/styles.css | 0
Rwindows/zellij.kdl -> files/windows/zellij.kdl | 0
Afiles/wlogout.css | 32++++++++++++++++++++++++++++++++
Afiles/ytmusic.json | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aflake.lock | 2272+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aflake.nix | 274+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alib/README.md | 24++++++++++++++++++++++++
Alib/_mime.nix | 296+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alib/_module.nix | 14++++++++++++++
Alib/build.nix | 108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alib/map.nix | 140+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alib/types.nix | 15+++++++++++++++
Amodules/README.md | 177+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/apps/auth.nix | 22++++++++++++++++++++++
Amodules/apps/discord.nix | 87+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/apps/firefox.nix | 121+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/apps/flatpak.nix | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/apps/git/git-hosting.nix | 130+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/apps/git/git-runner.nix | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/apps/git/git.nix | 183+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/apps/internet.nix | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/apps/latex.nix | 20++++++++++++++++++++
Amodules/apps/notes.nix | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/apps/office.nix | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/apps/spotify.nix | 32++++++++++++++++++++++++++++++++
Amodules/apps/stream.nix | 10++++++++++
Amodules/apps/syncthing.nix | 11+++++++++++
Amodules/apps/tools.nix | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/apps/vscode/_mutable.nix | 36++++++++++++++++++++++++++++++++++++
Amodules/apps/vscode/default.nix | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/apps/wine.nix | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/apps/youtube.nix | 38++++++++++++++++++++++++++++++++++++++
Amodules/core/checks.nix | 33+++++++++++++++++++++++++++++++++
Amodules/core/flake-parts.nix | 5+++++
Amodules/core/home-manager.nix | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/core/nixos.nix | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/core/shells.nix | 12++++++++++++
Amodules/core/systems.nix | 7+++++++
Amodules/core/templates.nix | 15+++++++++++++++
Amodules/desktop/_base.nix | 43+++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/_install.nix | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/gnome/_common.nix | 43+++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/gnome/_main.nix | 185+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/gnome/_settings/apps.nix | 276+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/gnome/_settings/extensions.nix | 578++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/gnome/_settings/main.nix | 202+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/gnome/default.nix | 29+++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/browser.nix | 18++++++++++++++++++
Amodules/desktop/hyprland/_features/files.nix | 125+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/hyprutils.nix | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/idle.nix | 33+++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/launcher.nix | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/login.nix | 35+++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/main.nix | 48++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/media.nix | 41+++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/notify.nix | 92+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/panel.nix | 426+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/security.nix | 103+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/style.nix | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/sysutils.nix | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/terminal.nix | 34++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_features/text.nix | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_idle.nix | 15+++++++++++++++
Amodules/desktop/hyprland/_settings/apps.nix | 166+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_settings/keybinds.nix | 207+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_settings/main.nix | 220+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/_settings/plugins.nix | 42++++++++++++++++++++++++++++++++++++++++++
Amodules/desktop/hyprland/default.nix | 33+++++++++++++++++++++++++++++++++
Amodules/games/games.nix | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/games/mc-server.nix | 221+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/games/minecraft.nix | 7+++++++
Amodules/games/osu.nix | 7+++++++
Amodules/games/roblox.nix | 11+++++++++++
Amodules/gui/fonts.nix | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/gui/gtk.nix | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/gui/qt.nix | 163+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/gui/theme.nix | 100+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/hardware/README.md | 40++++++++++++++++++++++++++++++++++++++++
Amodules/hardware/blockchain.nix | 9+++++++++
Amodules/hardware/cpu.nix | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/hardware/gpu.nix | 102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/hardware/laptop.nix | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/hardware/mobile.nix | 12++++++++++++
Amodules/hardware/mouse.nix | 14++++++++++++++
Amodules/hardware/printer.nix | 24++++++++++++++++++++++++
Amodules/hosts/futura.nix | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/hosts/install.nix | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/hosts/valkyrie/_minecraft.nix | 46++++++++++++++++++++++++++++++++++++++++++++++
Amodules/hosts/valkyrie/_settings/asusd.ron | 16++++++++++++++++
Amodules/hosts/valkyrie/_settings/aura.ron | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/hosts/valkyrie/_settings/default.nix | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/hosts/valkyrie/default.nix | 175+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/hosts/vortex.nix | 121+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/shell/prompt.nix | 186+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/shell/shell-utils.nix | 138+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/shell/shell.nix | 104+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/system/base-ext.nix | 29+++++++++++++++++++++++++++++
Amodules/system/base.nix | 195+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/system/boot.nix | 115+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/system/filesystem.nix | 281+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/system/nix.nix | 124+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/system/security.nix | 127+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/system/user/_mutable.nix | 104+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/system/user/default.nix | 182+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/users/navya.nix | 4++++
Amodules/users/v7/accounts.conf | 11+++++++++++
Amodules/users/v7/default.nix | 37+++++++++++++++++++++++++++++++++++++
Rnixos/users/v7/profile.png -> modules/users/v7/profile.png | 0
Amodules/virt/android.nix | 36++++++++++++++++++++++++++++++++++++
Amodules/virt/docker.nix | 16++++++++++++++++
Amodules/virt/libvirt.nix | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/virt/vfio.nix | 116+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dnixos/.gitignore | 1-
Dnixos/README.md | 468-------------------------------------------------------------------------------
Dnixos/checks/flake.nix | 42------------------------------------------
Dnixos/checks/github/ISSUE_TEMPLATE/bug-report.md | 40----------------------------------------
Dnixos/checks/github/ISSUE_TEMPLATE/feature-request.md | 19-------------------
Dnixos/checks/github/ISSUE_TEMPLATE/help-request.md | 32--------------------------------
Dnixos/checks/github/workflows/build.yml | 54------------------------------------------------------
Dnixos/checks/github/workflows/check.yml | 33---------------------------------
Dnixos/checks/github/workflows/shell.yml | 33---------------------------------
Dnixos/checks/github/workflows/update.yml | 60------------------------------------------------------------
Dnixos/checks/gitlab/.gitlab-ci.yml | 16----------------
Dnixos/checks/gitlab/.gitlab-webide.yml | 4----
Dnixos/checks/gitlab/issue_templates/Bug.md | 32--------------------------------
Dnixos/checks/gitlab/issue_templates/Feature.md | 11-----------
Dnixos/checks/gitlab/issue_templates/Help.md | 24------------------------
Dnixos/checks/gitlab/pipelines/build.yml | 27---------------------------
Dnixos/checks/gitlab/pipelines/check.yml | 11-----------
Dnixos/checks/gitlab/pipelines/release.yml | 20--------------------
Dnixos/checks/gitlab/pipelines/shell.yml | 18------------------
Dnixos/checks/gitlab/pipelines/update.yml | 18------------------
Dnixos/devices/README.md | 20--------------------
Dnixos/devices/flake.nix | 8--------
Dnixos/devices/futura.nix | 40----------------------------------------
Dnixos/devices/install/default.nix | 17-----------------
Dnixos/devices/install/image.nix | 13-------------
Dnixos/devices/valkyrie/default.nix | 107-------------------------------------------------------------------------------
Dnixos/devices/valkyrie/minecraft.nix | 48------------------------------------------------
Dnixos/devices/valkyrie/settings/asusd.ron | 16----------------
Dnixos/devices/valkyrie/settings/aura.ron | 99-------------------------------------------------------------------------------
Dnixos/devices/valkyrie/settings/default.nix | 32--------------------------------
Dnixos/devices/valkyrie/settings/home.nix | 62--------------------------------------------------------------
Dnixos/devices/valkyrie/settings/network.nix | 18------------------
Dnixos/devices/vortex.nix | 74--------------------------------------------------------------------------
Dnixos/files/README.md | 6------
Dnixos/files/ascii/groot | 10----------
Dnixos/files/ascii/lol | 7-------
Dnixos/files/ascii/pacman | 12------------
Dnixos/files/ascii/tux | 19-------------------
Dnixos/files/colors/README.md | 26--------------------------
Dnixos/files/colors/adwaita.yaml | 18------------------
Dnixos/files/colors/catppuccin.yaml | 18------------------
Dnixos/files/colors/elementary.yaml | 18------------------
Dnixos/files/fastfetch.jsonc | 160-------------------------------------------------------------------------------
Dnixos/files/flake.nix | 169-------------------------------------------------------------------------------
Dnixos/files/geany/keybindings.conf | 152-------------------------------------------------------------------------------
Dnixos/files/geany/settings.conf | 188-------------------------------------------------------------------------------
Dnixos/files/git/hooks/commit-msg | 16----------------
Dnixos/files/git/hooks/pre-commit | 10----------
Dnixos/files/gitea/theme-black.css | 61-------------------------------------------------------------
Dnixos/files/gitea/theme-blue.css | 58----------------------------------------------------------
Dnixos/files/gitea/theme-red.css | 58----------------------------------------------------------
Dnixos/files/gnome/menu.json | 102-------------------------------------------------------------------------------
Dnixos/files/gnome/shortcuts.json | 308-------------------------------------------------------------------------------
Dnixos/files/hyprland/greeter.conf | 20--------------------
Dnixos/files/hyprland/kebihelp.json | 1640-------------------------------------------------------------------------------
Dnixos/files/hyprland/pypr.toml | 40----------------------------------------
Dnixos/files/hyprland/shaders/dim.frag | 14--------------
Dnixos/files/hyprland/shaders/invert.frag | 15---------------
Dnixos/files/hyprland/shaders/monochrome.frag | 21---------------------
Dnixos/files/hyprland/theme/drawer.css | 26--------------------------
Dnixos/files/hyprland/theme/hyprshell.css | 49-------------------------------------------------
Dnixos/files/hyprland/theme/waybar.css | 226-------------------------------------------------------------------------------
Dnixos/files/hyprland/waycorner.toml | 11-----------
Dnixos/files/logseq/preferences.json | 22----------------------
Dnixos/files/logseq/settings/logseq-awesome-ui.json | 23-----------------------
Dnixos/files/logseq/settings/logseq-bullet-threading.json | 6------
Dnixos/files/logseq/settings/logseq-git.json | 9---------
Dnixos/files/logseq/settings/logseq-journals-calendar.json | 10----------
Dnixos/files/logseq/settings/logseq-move-block.json | 7-------
Dnixos/files/logseq/settings/logseq-pdf-export-plugin.json | 14--------------
Dnixos/files/logseq/settings/logseq-tabs.json | 11-----------
Dnixos/files/logseq/settings/logseq-tocgen.json | 13-------------
Dnixos/files/nanorc | 9---------
Dnixos/files/niri/rofi.rasi | 315-------------------------------------------------------------------------------
Dnixos/files/niri/theme/drawer.css | 26--------------------------
Dnixos/files/niri/theme/waybar.css | 202-------------------------------------------------------------------------------
Dnixos/files/pcmanfm.conf | 116-------------------------------------------------------------------------------
Dnixos/files/repl.nix | 47-----------------------------------------------
Dnixos/files/sunsetr/presets/3000/sunsetr.toml | 3---
Dnixos/files/sunsetr/presets/4000/sunsetr.toml | 3---
Dnixos/files/sunsetr/presets/5000/sunsetr.toml | 3---
Dnixos/files/sunsetr/presets/6000/sunsetr.toml | 3---
Dnixos/files/sunsetr/presets/7000/sunsetr.toml | 3---
Dnixos/files/sunsetr/presets/8000/sunsetr.toml | 3---
Dnixos/files/sunsetr/sunsetr.toml | 16----------------
Dnixos/files/swaync.css | 251-------------------------------------------------------------------------------
Dnixos/files/tmuxrc.tmux | 11-----------
Dnixos/files/vscode/keybindings.json | 28----------------------------
Dnixos/files/vscode/settings.json | 94-------------------------------------------------------------------------------
Dnixos/files/wlogout.css | 32--------------------------------
Dnixos/files/ytmusic.json | 56--------------------------------------------------------
Dnixos/flake.lock | 2068-------------------------------------------------------------------------------
Dnixos/flake.nix | 307-------------------------------------------------------------------------------
Dnixos/lib/README.md | 29-----------------------------
Dnixos/lib/_mime.nix | 296-------------------------------------------------------------------------------
Dnixos/lib/build.nix | 120-------------------------------------------------------------------------------
Dnixos/lib/map.nix | 161-------------------------------------------------------------------------------
Dnixos/lib/pack.nix | 23-----------------------
Dnixos/modules/README.md | 100-------------------------------------------------------------------------------
Dnixos/modules/apps/default.nix | 25-------------------------
Dnixos/modules/apps/discord.nix | 90-------------------------------------------------------------------------------
Dnixos/modules/apps/firefox.nix | 132-------------------------------------------------------------------------------
Dnixos/modules/apps/flatpak.nix | 91-------------------------------------------------------------------------------
Dnixos/modules/apps/games/default.nix | 73-------------------------------------------------------------------------
Dnixos/modules/apps/games/mc-server.nix | 218-------------------------------------------------------------------------------
Dnixos/modules/apps/games/minecraft.nix | 13-------------
Dnixos/modules/apps/games/osu.nix | 13-------------
Dnixos/modules/apps/games/roblox.nix | 18------------------
Dnixos/modules/apps/git/default.nix | 169-------------------------------------------------------------------------------
Dnixos/modules/apps/git/hosting.nix | 130-------------------------------------------------------------------------------
Dnixos/modules/apps/git/runner.nix | 75---------------------------------------------------------------------------
Dnixos/modules/apps/git/user.nix | 34----------------------------------
Dnixos/modules/apps/internet.nix | 52----------------------------------------------------
Dnixos/modules/apps/latex.nix | 26--------------------------
Dnixos/modules/apps/notes.nix | 60------------------------------------------------------------
Dnixos/modules/apps/office.nix | 94-------------------------------------------------------------------------------
Dnixos/modules/apps/spotify.nix | 52----------------------------------------------------
Dnixos/modules/apps/stream.nix | 19-------------------
Dnixos/modules/apps/tools.nix | 62--------------------------------------------------------------
Dnixos/modules/apps/vscode/default.nix | 97-------------------------------------------------------------------------------
Dnixos/modules/apps/vscode/mutable.nix | 36------------------------------------
Dnixos/modules/apps/wine.nix | 76----------------------------------------------------------------------------
Dnixos/modules/apps/youtube.nix | 54------------------------------------------------------
Dnixos/modules/base/default.nix | 103-------------------------------------------------------------------------------
Dnixos/modules/base/firmware.nix | 99-------------------------------------------------------------------------------
Dnixos/modules/base/security.nix | 101-------------------------------------------------------------------------------
Dnixos/modules/configuration.nix | 142-------------------------------------------------------------------------------
Dnixos/modules/gui/default.nix | 85-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/_shared/browser.nix | 30------------------------------
Dnixos/modules/gui/desktop/_shared/default.nix | 5-----
Dnixos/modules/gui/desktop/_shared/files.nix | 131-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/_shared/login.nix | 35-----------------------------------
Dnixos/modules/gui/desktop/_shared/media.nix | 49-------------------------------------------------
Dnixos/modules/gui/desktop/_shared/misc.nix | 96-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/_shared/notify.nix | 96-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/_shared/panel.nix | 309-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/_shared/security.nix | 132-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/_shared/style.nix | 38--------------------------------------
Dnixos/modules/gui/desktop/_shared/terminal.nix | 47-----------------------------------------------
Dnixos/modules/gui/desktop/_shared/text.nix | 63---------------------------------------------------------------
Dnixos/modules/gui/desktop/_shared/theme.nix | 40----------------------------------------
Dnixos/modules/gui/desktop/_shared/utilities.nix | 105-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/gnome/common.nix | 44--------------------------------------------
Dnixos/modules/gui/desktop/gnome/default.nix | 258-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/gnome/settings/apps.nix | 229-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/gnome/settings/default.nix | 205-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/gnome/settings/extensions.nix | 599-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/hyprland/apps/idle.nix | 34----------------------------------
Dnixos/modules/gui/desktop/hyprland/apps/launcher.nix | 81-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/hyprland/apps/panel.nix | 166-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/hyprland/apps/utilities.nix | 81-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/hyprland/default.nix | 65-----------------------------------------------------------------
Dnixos/modules/gui/desktop/hyprland/settings/apps.nix | 162-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/hyprland/settings/default.nix | 214-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/hyprland/settings/keybinds.nix | 209-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/hyprland/settings/plugins.nix | 51---------------------------------------------------
Dnixos/modules/gui/desktop/install.nix | 85-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/niri/apps/idle.nix | 28----------------------------
Dnixos/modules/gui/desktop/niri/apps/launcher.nix | 30------------------------------
Dnixos/modules/gui/desktop/niri/apps/panel.nix | 158-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/niri/apps/utilities.nix | 31-------------------------------
Dnixos/modules/gui/desktop/niri/default.nix | 54------------------------------------------------------
Dnixos/modules/gui/desktop/niri/settings/apps.nix | 141-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/niri/settings/default.nix | 75---------------------------------------------------------------------------
Dnixos/modules/gui/desktop/niri/settings/keybinds.nix | 100-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/niri/settings/style.nix | 56--------------------------------------------------------
Dnixos/modules/gui/desktop/pantheon/default.nix | 188-------------------------------------------------------------------------------
Dnixos/modules/gui/desktop/pantheon/settings.nix | 321-------------------------------------------------------------------------------
Dnixos/modules/gui/fonts.nix | 93-------------------------------------------------------------------------------
Dnixos/modules/gui/gtk.nix | 80-------------------------------------------------------------------------------
Dnixos/modules/gui/qt.nix | 151------------------------------------------------------------------------------
Dnixos/modules/gui/theme.nix | 114-------------------------------------------------------------------------------
Dnixos/modules/hardware/README.md | 40----------------------------------------
Dnixos/modules/hardware/blockchain.nix | 26--------------------------
Dnixos/modules/hardware/boot.nix | 120-------------------------------------------------------------------------------
Dnixos/modules/hardware/cpu.nix | 47-----------------------------------------------
Dnixos/modules/hardware/default.nix | 36------------------------------------
Dnixos/modules/hardware/filesystem.nix | 262-------------------------------------------------------------------------------
Dnixos/modules/hardware/gpu.nix | 109-------------------------------------------------------------------------------
Dnixos/modules/hardware/laptop.nix | 63---------------------------------------------------------------
Dnixos/modules/hardware/mobile.nix | 25-------------------------
Dnixos/modules/hardware/printer.nix | 40----------------------------------------
Dnixos/modules/hardware/virtualisation/android.nix | 45---------------------------------------------
Dnixos/modules/hardware/virtualisation/default.nix | 58----------------------------------------------------------
Dnixos/modules/hardware/virtualisation/vfio.nix | 128-------------------------------------------------------------------------------
Dnixos/modules/nix/config.nix | 7-------
Dnixos/modules/nix/default.nix | 51---------------------------------------------------
Dnixos/modules/nix/index.nix | 20--------------------
Dnixos/modules/nix/registry.nix | 28----------------------------
Dnixos/modules/nix/tools.nix | 30------------------------------
Dnixos/modules/secrets.nix | 1-
Dnixos/modules/shell/default.nix | 177-------------------------------------------------------------------------------
Dnixos/modules/shell/list/bash.nix | 42------------------------------------------
Dnixos/modules/shell/list/zsh.nix | 58----------------------------------------------------------
Dnixos/modules/shell/prompt.nix | 198-------------------------------------------------------------------------------
Dnixos/modules/user/default.nix | 184-------------------------------------------------------------------------------
Dnixos/modules/user/home.nix | 38--------------------------------------
Dnixos/modules/user/mutable.nix | 102-------------------------------------------------------------------------------
Dnixos/modules/user/security.nix | 94-------------------------------------------------------------------------------
Dnixos/packages/README.md | 20--------------------
Dnixos/packages/copyous.nix | 51---------------------------------------------------
Dnixos/packages/default.nix | 2--
Dnixos/packages/fabric-ca.nix | 36------------------------------------
Dnixos/packages/firefox-elementary/default.nix | 29-----------------------------
Dnixos/packages/firefox-elementary/metadata.nix | 6------
Dnixos/packages/flake.nix | 110-------------------------------------------------------------------------------
Dnixos/packages/geany-catppuccin/default.nix | 33---------------------------------
Dnixos/packages/geany-catppuccin/metadata.nix | 5-----
Dnixos/packages/geany-catppuccin/selection.patch | 11-----------
Dnixos/packages/hyprshellevents/default.nix | 42------------------------------------------
Dnixos/packages/hyprshellevents/metadata.nix | 5-----
Dnixos/packages/kebihelp/default.nix | 43-------------------------------------------
Dnixos/packages/kebihelp/metadata.nix | 6------
Dnixos/packages/kitty-search/default.nix | 29-----------------------------
Dnixos/packages/kitty-search/metadata.nix | 6------
Dnixos/packages/kvlibadwaita/default.nix | 32--------------------------------
Dnixos/packages/kvlibadwaita/metadata.nix | 5-----
Dnixos/packages/overlays/brave.nix | 11-----------
Dnixos/packages/overlays/nix-output-monitor.nix | 18------------------
Dnixos/packages/overlays/nixFlakes.nix | 4----
Dnixos/packages/patches/stremio.patch | 138-------------------------------------------------------------------------------
Dnixos/packages/wine/.keep | 0
Dnixos/packages/wine/7zip.nix | 84-------------------------------------------------------------------------------
Dnixos/packages/wine/notepad++.nix | 86-------------------------------------------------------------------------------
Dnixos/scripts/README.md | 7-------
Dnixos/scripts/audio.sh | 28----------------------------
Dnixos/scripts/colors.sh | 9---------
Dnixos/scripts/commands.sh | 89-------------------------------------------------------------------------------
Dnixos/scripts/hyprutils.nix | 211-------------------------------------------------------------------------------
Dnixos/scripts/install.nix | 184-------------------------------------------------------------------------------
Dnixos/scripts/mail.sh | 28----------------------------
Dnixos/scripts/nixos.nix | 504-------------------------------------------------------------------------------
Dnixos/scripts/packages.sh | 138-------------------------------------------------------------------------------
Dnixos/scripts/pci.sh | 13-------------
Dnixos/scripts/sysutils.nix | 258-------------------------------------------------------------------------------
Dnixos/secrets/README.md | 10----------
Dnixos/secrets/default.nix | 35-----------------------------------
Dnixos/secrets/secrets.yaml | 13-------------
Dnixos/shells/.envrc | 1-
Dnixos/shells/android.nix | 51---------------------------------------------------
Dnixos/shells/cc.nix | 13-------------
Dnixos/shells/default.nix | 25-------------------------
Dnixos/shells/flake.nix | 11-----------
Dnixos/shells/java.nix | 6------
Dnixos/shells/js.nix | 12------------
Dnixos/shells/lua.nix | 8--------
Dnixos/shells/python.nix | 22----------------------
Dnixos/shells/rust.nix | 10----------
Dnixos/shells/sql.nix | 37-------------------------------------
Dnixos/shells/video.nix | 13-------------
Dnixos/site | 2--
Dnixos/users/README.md | 7-------
Dnixos/users/default.nix | 114-------------------------------------------------------------------------------
Dnixos/users/navya.nix | 8--------
Dnixos/users/v7/accounts.conf | 9---------
Dnixos/users/v7/default.nix | 46----------------------------------------------
Apackages/README.md | 20++++++++++++++++++++
Apackages/_config.nix | 7+++++++
Apackages/_module.nix | 97+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apackages/default.nix | 2++
Apackages/fabric-ca.nix | 36++++++++++++++++++++++++++++++++++++
Apackages/geany-catppuccin/default.nix | 32++++++++++++++++++++++++++++++++
Apackages/geany-catppuccin/metadata.nix | 5+++++
Apackages/geany-catppuccin/selection.patch | 11+++++++++++
Apackages/hyprshellevents/default.nix | 41+++++++++++++++++++++++++++++++++++++++++
Apackages/hyprshellevents/metadata.nix | 5+++++
Apackages/kebihelp/default.nix | 42++++++++++++++++++++++++++++++++++++++++++
Apackages/kebihelp/metadata.nix | 6++++++
Apackages/kitty-search/default.nix | 28++++++++++++++++++++++++++++
Apackages/kitty-search/metadata.nix | 6++++++
Apackages/kvlibadwaita/default.nix | 31+++++++++++++++++++++++++++++++
Apackages/kvlibadwaita/metadata.nix | 5+++++
Apackages/overlays/brave.nix | 13+++++++++++++
Apackages/overlays/nix-output-monitor.nix | 20++++++++++++++++++++
Apackages/overlays/nixFlakes.nix | 4++++
Rnixos/files/templates/File -> packages/patches/.keep | 0
Apackages/patches/copilot.patch | 31+++++++++++++++++++++++++++++++
Apackages/thunderbird-tools-ng/default.nix | 36++++++++++++++++++++++++++++++++++++
Apackages/thunderbird-tools-ng/metadata.nix | 6++++++
Rnixos/packages/update.sh -> packages/update.sh | 0
Rnixos/packages/patches/.keep -> packages/wine/.keep | 0
Apackages/wine/7zip.nix | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apackages/wine/notepad++.nix | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dpopos/conky/conky.lua | 551-------------------------------------------------------------------------------
Dpopos/conky/conkyrc | 80-------------------------------------------------------------------------------
Dpopos/neofetch/config.conf | 54------------------------------------------------------
Dpopos/p10k.zsh | 472-------------------------------------------------------------------------------
Ascripts/README.md | 7+++++++
Ascripts/audio.sh | 28++++++++++++++++++++++++++++
Ascripts/colors.sh | 9+++++++++
Ascripts/commands.sh | 89+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ascripts/hyprutils.nix | 210+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ascripts/install.nix | 183+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ascripts/mail.sh | 28++++++++++++++++++++++++++++
Ascripts/nixos.nix | 505+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ascripts/packages.sh | 138+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ascripts/pci.sh | 13+++++++++++++
Ascripts/sysutils.nix | 257+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asecrets/README.md | 10++++++++++
Asecrets/_module.nix | 39+++++++++++++++++++++++++++++++++++++++
Rnixos/secrets/cachix-token.secret -> secrets/cachix-token.secret | 0
Rnixos/secrets/github-token.secret -> secrets/github-token.secret | 0
Rnixos/secrets/gitlab-token.secret -> secrets/gitlab-token.secret | 0
Rnixos/secrets/keys/.gitattributes -> secrets/keys/.gitattributes | 0
Rnixos/secrets/keys/navya.gpg -> secrets/keys/navya.gpg | 0
Rnixos/secrets/keys/v7.gpg -> secrets/keys/v7.gpg | 0
Rnixos/users/passwords/default -> secrets/passwords/default | 0
Rnixos/users/passwords/navya.secret -> secrets/passwords/navya.secret | 0
Rnixos/users/passwords/root.secret -> secrets/passwords/root.secret | 0
Rnixos/users/passwords/v7.secret -> secrets/passwords/v7.secret | 0
Asecrets/secrets.yaml | 13+++++++++++++
Rnixos/secrets/valkyrie/tailscale.secret -> secrets/valkyrie/tailscale.secret | 0
Rnixos/secrets/vortex/cloudflare.secret -> secrets/vortex/cloudflare.secret | 0
Rnixos/secrets/vortex/github-runner.secret -> secrets/vortex/github-runner.secret | 0
Rnixos/secrets/vortex/gitlab-runner.secret -> secrets/vortex/gitlab-runner.secret | 0
Ashells/.envrc | 1+
Ashells/android.nix | 48++++++++++++++++++++++++++++++++++++++++++++++++
Ashells/cc.nix | 13+++++++++++++
Ashells/default.nix | 23+++++++++++++++++++++++
Ashells/java.nix | 6++++++
Ashells/js.nix | 12++++++++++++
Ashells/lua.nix | 8++++++++
Ashells/python.nix | 23+++++++++++++++++++++++
Ashells/rust.nix | 10++++++++++
Ashells/sql.nix | 35+++++++++++++++++++++++++++++++++++
Ashells/video.nix | 13+++++++++++++
Msite/README.md | 12++++++------
Asite/_module.nix | 30++++++++++++++++++++++++++++++
Msite/default.nix | 10+++++++---
Dsite/flake.lock | 142-------------------------------------------------------------------------------
Dsite/flake.nix | 99-------------------------------------------------------------------------------
Msite/git/default.nix | 12+++++-------
Msite/git/theme.nix | 54+++++++++++++++++++++++++-----------------------------
Msite/shell.nix | 5+----
Dwindows/packages.ubundle | 1426-------------------------------------------------------------------------------
539 files changed, 20571 insertions(+), 24875 deletions(-)

diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,40 @@ +--- +name: Bug Report +about: Create a report to help improve the configuration +title: "" +labels: bug +assignees: maydayv7 +--- + +### Describe the bug + +A clear and concise description of what the bug is + +### Steps To Reproduce + +Steps to reproduce the behavior: + +1. ... +2. ... +3. ... + +### Expected behavior + +A clear and concise description of what you expected to happen + +### Screenshots + +If applicable, add screenshots to help explain your problem + +### Additional context + +Add any other context about the problem + +### Metadata + +Please run `nix shell nixpkgs#nix-info --command sh -c "nix-info -m"` and paste the result + +```console +[user@system:~]$ nix shell nixpkgs#nix-info --command sh -c "nix-info -m" +output here +``` diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "" +labels: enhancement +assignees: maydayv7 +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is + +**Describe the solution you'd like** +A clear and concise description of what you want to happen + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered, if applicable + +**Additional context** +Add any other context or screenshots diff --git a/.github/ISSUE_TEMPLATE/help-request.md b/.github/ISSUE_TEMPLATE/help-request.md @@ -0,0 +1,32 @@ +--- +name: Help Request +about: Request for help or clarification on anything related to this project +title: "" +labels: help wanted, question +assignees: maydayv7 +--- + +### Description + +A clear and concise description of what problem you're facing or any area where clarification is required + +### Expected behavior + +A clear and concise description of what you expect to happen + +### Screenshots + +If applicable, add screenshots to help explain your problem + +### Additional context + +Add any other context about the problem + +### Metadata + +Please run `nix shell nixpkgs#nix-info --command sh -c "nix-info -m"` and paste the result. + +```console +[user@system:~]$ nix shell nixpkgs#nix-info --command sh -c "nix-info -m" +output here +``` diff --git a/.github/devcontainer b/.github/devcontainer @@ -1 +0,0 @@ -../.devcontainer -\ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml @@ -0,0 +1,54 @@ +name: "ci: Build `nixosConfigurations`" +on: + workflow_dispatch: + workflow_call: + push: + tags: + - "*" + paths: + - "**.lock" + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + paths: + - "**.lock" + - "**.nix" +env: + NIX_SHOW_STATS: 1 +jobs: + build: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + strategy: + max-parallel: 1 + fail-fast: false + matrix: + device: [valkyrie, vortex, futura] + steps: + - name: Maximize Build Space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + - name: Clone Repo + uses: actions/checkout@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + - name: Install Nix + uses: cachix/install-nix-action@v31 + with: + extra_nix_config: | + experimental-features = nix-command flakes + accept-flake-config = true + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - name: Setup Cachix + uses: cachix/cachix-action@v16 + with: + name: maydayv7-dotfiles + authToken: "${{ secrets.CACHIX_TOKEN }}" + - name: Build Configuration + run: | + export LC_ALL=C.UTF-8 + ulimit -n 2048 + nix build .#nixosConfigurations.${{ matrix.device }}.config.system.build.toplevel -L --show-trace diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml @@ -0,0 +1,33 @@ +name: "ci: Check Syntax" +on: + workflow_dispatch: + push: + paths: + - "**.lock" + - "**.nix" +env: + NIX_SHOW_STATS: 1 +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Maximize Build Space + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + - name: Clone Repo + uses: actions/checkout@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + - name: Install Nix + uses: cachix/install-nix-action@v31 + with: + extra_nix_config: | + experimental-features = nix-command flakes + accept-flake-config = true + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - name: Check Syntax + run: nix flake check . --keep-going diff --git a/nixos/checks/github/workflows/install.yml b/.github/workflows/install.yml diff --git a/.github/workflows/shell.yml b/.github/workflows/shell.yml @@ -0,0 +1,33 @@ +name: "ci: Check `devShells`" +on: + push: + paths: + - "shells/**" +env: + NIX_SHOW_STATS: 1 +jobs: + shell: + runs-on: ubuntu-latest + strategy: + matrix: + shell: [android, cc, java, js, lua, python, rust, sql, video, website] + steps: + - name: Clone Repo + uses: actions/checkout@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + - name: Install Nix + uses: cachix/install-nix-action@v31 + with: + extra_nix_config: | + experimental-features = nix-command flakes + accept-flake-config = true + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - name: Setup Cachix + uses: cachix/cachix-action@v16 + with: + name: maydayv7-dotfiles + authToken: "${{ secrets.CACHIX_TOKEN }}" + - name: Check Shells + run: nix develop .#${{ matrix.shell }} diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml @@ -0,0 +1,60 @@ +name: "chore: Automatic Scheduled Updates" +on: + workflow_dispatch: + schedule: + - cron: "0 0 1 * *" +env: + NIX_SHOW_STATS: 1 +jobs: + update: + runs-on: ubuntu-latest + steps: + - name: Clone Repo + uses: actions/checkout@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + - name: Install Nix + uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixos-unstable + extra_nix_config: | + experimental-features = nix-command flakes + accept-flake-config = true + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - name: Update Flake Lock File + uses: DeterminateSystems/update-flake-lock@v28 + with: + branch: update_flake + pr-labels: dependencies + pr-title: > + chore(flake): Update `inputs` + - name: Update Packages + env: + GIT_AUTHOR_NAME: github-actions[bot] + GIT_AUTHOR_EMAIL: <github-actions[bot]@users.noreply.github.com> + GIT_COMMITTER_NAME: github-actions[bot] + GIT_COMMITTER_EMAIL: <github-actions[bot]@users.noreply.github.com> + run: | + git checkout stable + cd packages && ./update.sh + - name: Create PR + uses: peter-evans/create-pull-request@v8 + with: + branch: update_packages + delete-branch: true + title: > + chore(packages): Automatic Updates + labels: dependencies + body: | + Automated package updates using `packages/update.sh`. + ### Running GitHub Actions on this PR + GitHub Actions will not run workflows on pull requests which are opened by a GitHub Action. + To run GitHub Actions workflows on this PR, run: + ```sh + git branch -D update_packages + git fetch origin + git checkout update_packages + git commit --amend --no-edit + git push origin update_packages --force + ``` diff --git a/.github/workflows/website-git.yaml b/.github/workflows/website-git.yaml @@ -28,7 +28,7 @@ jobs: accept-flake-config = true access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - name: Build Stagit Site - run: nix run ./site#build-stagit + run: nix run .#build-stagit - name: Prepare for Deployment run: mv public site/git/public - name: Deploy to Cloudflare diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml @@ -29,7 +29,7 @@ jobs: accept-flake-config = true access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - name: Build Zola Site - run: nix build ./site#website + run: nix build .#website - name: Prepare for Deployment run: | mkdir -p site/public diff --git a/.gitignore b/.gitignore @@ -1,3 +1,4 @@ ~* *.log* .env +result diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -1,5 +1,29 @@ ## 2026 +### June + +- Add `auth`, `syncthing`, `mouse` +- Use Thunderbird for mail +- Upgrade to NixOS 26.05 +- Drop Niri & Pantheon +- Support standalone `home-manager` configurations +- Refactor NixOS Configuration to use [dendritic](https://github.com/mightyiam/dendritic) pattern +- Switch back formatter to `alejandra` +- Switch back to NixOS (Yay!) +- Create website favicon +- Update website to use Zola v0.22 + - Fix search and anchor links + - Update syntax highlighting and lazy-load images + - Support GitHub alerts + +### April + +- More Windows Configuration + - Windhawk + - Powertoys + - AutoHotKey Scripts + - WSL + ### March - Move to Windows diff --git a/README.md b/README.md @@ -1,10 +1,396 @@ <picture> - <source media="(prefers-color-scheme: light)" srcset=".misc/banner-dark.png"/> - <source media="(prefers-color-scheme: dark)" srcset=".misc/banner-dark.png"/> - <img alt="Banner" src=".misc/banner-dark.png"> + <source media="(prefers-color-scheme: light)" srcset="./files/images/banner-light.png"/> + <source media="(prefers-color-scheme: dark)" srcset="./files/images/banner-dark.png"/> + <img alt="Banner" src="./files/images/banner-dark.png"> </picture> -| Desktop | -| :-----------------------------: | -| ![Desktop](./.misc/desktop.png) | -| | +[![NixOS](https://img.shields.io/badge/NixOS-26.05-9cf.svg?style=flat-square&logo=NixOS&logoColor=white)](https://nixos.org) +![License](https://img.shields.io/github/license/maydayv7/dotfiles?color=dgreen&style=flat-square) +![Size](https://img.shields.io/github/repo-size/maydayv7/dotfiles?color=red&label=size&style=flat-square) + +This directory contains the configuration and `dotfiles` for my continuously evolving multi-PC setup (using [Nix](https://nixos.org/)). +All the devices I own, controlled by code. +It also builds and deploys my website to [maydayv7.cc](https://maydayv7.cc). + +<details> +<summary><b>Pictures</b></summary> + +**_Note:_** These may be outdated + +| ![Hyprland](./files/images/desktop/hyprland.jpg) | +| :----------------------------------------------: | +| _Hyprland_ | + +| ![GNOME Desktop](./files/images/desktop/gnome.jpg) | +| :------------------------------------------------: | +| _GNOME Desktop_ | + +| ![Pantheon Desktop](./files/images/desktop/pantheon.jpg) | +| :------------------------------------------------------: | +| _Pantheon Desktop_ | + +| Windows | +| :--------------------------------------------: | +| ![Windows](./files/images/desktop/windows.png) | +| | + +<details> +<summary>Theming</summary> + +- [Starship](https://starship.rs/) Prompt Theme: Minimal, blazing-fast, and infinitely customizable prompt for any shell +- [Bibata Cursor](https://github.com/ful1e5/Bibata_Cursor): Compact and material designed cursor set +- [Papirus Icon Theme](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme): Pixel perfect icon theme for Linux +- [Catppuccin](https://github.com/catppuccin) Theme: A community-driven Pastel Theme consisting of 4 soothing warm Flavors with 26 eye-candy Colors each + +- [Adwaita GTK3](https://github.com/lassekongo83/adw-gtk3): Theme from `libadwaita` ported to GTK3 +- [KvLibadwaita](https://github.com/GabePoel/KvLibadwaita) Kvantum Theme: Integrates QT Apps with GNOME Desktop +- Firefox [GNOME Theme](https://github.com/rafaelmardojai/firefox-gnome-theme): GNOME Theme for the Mozilla Firefox Browser, used for better desktop integration +- VS Code [Adwaita Theme](https://github.com/piousdeer/vscode-adwaita): Integrates Visual Studio Code with GNOME Desktop +- Discord [GNOME Theme](https://github.com/ricewind012/discord-gnome-theme): A GNOME theme for Discord, following the Adwaita style & GNOME HIG + +- Firefox [Elementary Theme](https://github.com/Zonnev/elementaryos-firefox-theme): Elementary OS Theme for the Mozilla Firefox Browser, used for better desktop integration +- VS Code [Elementary Theme](https://github.com/sixpounder/vscode-elementary-theme): Integrates Visual Studio Code with Pantheon Desktop +- Logseq [Bonofix Theme](https://github.com/Sansui233/logseq-bonofix-theme): A clean Logseq theme with focus on long-time writing experience + +</details> + +<details> +<summary><i>Older...</i></summary> + +| [![XFCE Desktop](./files/images/desktop/xfce.jpg)](https://www.reddit.com/r/unixporn/comments/19efxry/xfce_functional_and_beautiful/) | +| :-----------------------------------------------------------------------------------------------------------------------------------: | +| _XFCE Desktop_ | + +| ![GNOME 45](./files/images/desktop/old/gnome_45.jpg) | +| :--------------------------------------------------: | +| _GNOME 45_ | + +| ![GNOME 44](./files/images/desktop/old/gnome_44.jpg) | +| :--------------------------------------------------: | +| _GNOME 44_ | + +| [![GNOME 41](./files/images/desktop/old/gnome_41.jpg)](https://www.reddit.com/r/unixporn/comments/ssb7mf/gnome_my_dream/) | +| :-----------------------------------------------------------------------------------------------------------------------: | +| _GNOME 41_ | + +</details> + +</details> + +## Features + +<img alt="Built with Nix" src="https://raw.githubusercontent.com/nix-community/builtwithnix.org/62897617ceefe428f135e82c3a87ea093e29e045/img/built_with_nix.svg" width="130" height="50"/> + +- Device-Agnostic +- Convenient and Automated +- Hermetically Reproducible +- Declarative and Derivational +- Atomic, Generational and Immutable + +#### Notable Features + +- Supports multiple users and devices +- Configuration for multiple DEs and Compositors +- Incorporates PipeWire, Wayland, ...! +- Automatically builds and deploys my [Website](./site) +- Credentials management using the [`sops-nix`](https://github.com/Mic92/sops-nix) module and [`gnupg`](https://gnupg.org/) keys +- Comprehensive User Configuration using the [`home-manager`](https://github.com/nix-community/home-manager) module +- Ephemeral, Opt-In filesystem state using the [`impermanence`](https://github.com/nix-community/impermanence) module and [ZFS](https://zfsonlinux.org/) +- Support for Secure Boot using [`lanzaboote`](https://github.com/nix-community/lanzaboote) +- Multiple development [`shells`](./shells) integrated with [`direnv`](https://direnv.net/) and [`lorri`](https://github.com/nix-community/lorri) +- Automatic `packages` updates using [`update.sh`](./packages/update.sh) +- Syntax [formatting](./modules/core/checks.nix) using [`treefmt`](https://github.com/numtide/treefmt) +- Support for `source` filters with [`nix-filter`](https://github.com/numtide/nix-filter) +- Support for Base16 color theming using [`stylix`](https://github.com/danth/stylix) +- Support for declaratively installing [Flatpak](./modules/apps/flatpak.nix) applications using [`nix-flatpak`](https://github.com/gmodena/nix-flatpak) +- Wrapped `wine` [Applications](./packages/wine) using Emmanuel's [Wrapper](https://github.com/emmanuelrosa/erosanix/tree/0dabea58d483e13d2de141517cb4ff1cb230b2aa/pkgs/mkwindowsapp) +- Support for Android Virtualisation using [Waydroid](https://waydro.id/) +- Support for VFIO PCI Device Passthrough along with [Looking Glass](https://looking-glass.io/) for high-performance VMs + +## Programs + +| Type | Programs | +| :------- | :--------------------------------------------------------------------------------------------------------------------------: | +| Editors | [`nano`](https://www.nano-editor.org/), [`micro`](https://micro-editor.github.io), [VS Code](https://code.visualstudio.com/) | +| Shells | [`bash`](https://www.gnu.org/software/bash/), [`zsh`](https://www.zsh.org) | +| Terminal | [Ghostty](https://ghostty.org/), [Kitty](https://sw.kovidgoyal.net/kitty/) | +| Browser | [Firefox](https://www.mozilla.org/en-US/firefox/) | +| Desktops | [GNOME](https://www.gnome.org), [Hyprland](https://hypr.land/) | + +## Structure + +**_Overview of File Hierarchy_** + +<details> +<summary><b>Outputs</b></summary> + +```shellsession +$ nix flake show +github:maydayv7/dotfiles +├───apps +│ └───x86_64-linux +│ ├───sysutils: app +│ ├───hyprutils: app +│ ├───install: app +│ ├───nixos: app +│ └───default: app +├───checks +│ └───x86_64-linux +│ ├───configurations:nixos:futura: derivation +│ ├───configurations:nixos:valkyrie: derivation +│ ├───configurations:nixos:vortex: derivation +│ └───treefmt: derivation 'treefmt-check' +├───devShells +│ └───x86_64-linux +│ ├───cc: development environment 'C' +│ ├───android: development environment 'Android' +│ ├───default: development environment 'devShell' +│ ├───format: development environment 'nix-shell' +│ ├───java: development environment 'Java' +│ ├───js: development environment 'JavaScript' +│ ├───lua: development environment 'Lua' +│ ├───python: development environment 'Python' +│ ├───rust: development environment 'Rust' +│ ├───sql: development environment 'SQL' +│ ├───video: development environment 'Video' +│ └───website: development environment 'Website' +├───files: 'dotfiles' and program configuration +├───formatter +│ └───x86_64-linux: package 'treefmt' +├───homeConfigurations +│ ├───navya@futura: Home Manager configuration +│ ├───v7@valkyrie: Home Manager configuration +│ └───v7@vortex: Home Manager configuration +├───legacyPackages +│ └───x86_64-linux (Default package channel) +├───modules: dendritic configuration modules +├───nixosConfigurations +│ ├───futura: NixOS configuration +│ ├───install: NixOS configuration +│ ├───valkyrie: NixOS configuration +│ └───vortex: NixOS configuration +├───overlays +├───packages +│ └───x86_64-linux +│ ├───install: package 'os-install' +│ ├───nixos: package 'nixos' +│ └───website: package 'website-stable' +├───patchedPkgs: patched package source +└───templates + └───default: template: My NixOS Configuration +``` + +</details> + +``` +┌── flake.nix +├── flake.lock +├── files +├── site +├── secrets +│ └── passwords +├── shells +├── lib +│ ├── build.nix +│ └── map.nix +├── scripts +│ ├── install.nix +│ └── nixos.nix +├── packages +│ ├── overlays +│ └── patches +└── modules + ├── core + ├── hosts + ├── apps + ├── desktop + ├── games + ├── gui + ├── hardware + ├── shell + ├── system + ├── users + └── virt +``` + +- `flake.nix`: toplevel configuration file and repository version control + [`flake-parts`](https://github.com/hercules-ci/flake-parts) is used for modularization, following the [dendritic](https://github.com/mightyiam/dendritic) pattern + +- [`files`](./files/README.md): `dotfiles` and program configuration +- [`site`](./site/README.md): personal website generated using [`zola`](https://www.getzola.org/) +- [`secrets`](./secrets/README.md): authentication credentials and user passwords managed using [`sops-nix`](https://github.com/Mic92/sops-nix) +- `shells`: sand-boxed shells for development purposes +- [`lib`](./lib/README.md): custom functions designed for conveniently defining configuration +- [`scripts`](./scripts/README.md): useful system management scripts +- [`packages`](./packages/README.md): locally built custom packages +- `overlays`: overrides for pre-built packages +- [`modules`](./modules/README.md): custom configuration modules for additional functionality + +## Installation + +<details> +<summary><b>Already Installed</b></summary> + +To use my configuration as-is for a fresh NixOS installation, you can try the following steps: + +**_Note:_** Run `nix develop` in the repository to install all required dependencies + +1. Prepare `/etc/nixos`: + <pre><code>sudo mkdir /etc/nixos + sudo chown $USER /etc/nixos && sudo chmod ugo+rw /etc/nixos + cd /etc/nixos + </code></pre> + +2. Clone this repository (and preferably initialize it using `git`): + <pre><code>nix flake init -t github:maydayv7/dotfiles + git init + </code></pre> + +3. Install `gnupg` and generate a GPG Key for yourself (if you don't already have one), and include it in the [`secrets.yaml`](./secrets/secrets.yaml) file (using `gpg --list-keys`). You can use the following commands to generate the GPG key (Ultimate trust and w/o passphrase is preferred): + _Replace_ **_USER_** _,_ **_EMAIL_** _and_ **_COMMENT_** + <pre><code>gpg --full-generate-key + 1 + 4096 + 0 + y + <b><i>USER + EMAIL + COMMENT</i></b> + O + gpg --output public.pgp --armor --export <b><i>USER</i></b>@<b><i>EMAIL</i></b> + gpg --output private.pgp --armor --export-secret-key <b><i>USER</i></b>@<b><i>EMAIL</i></b> + </code></pre> + + _Save the keys `public.gpg` and `private.gpg` in a secure location_ + +4. Import all required GPG Keys into a convenient location (like `/etc/gpg`) using <code>gpg --homedir <i>DIR</i> import</code> and specify it at `config.sops.gnupg.home` (Required for decryption of `secrets` on boot, can also be on an external drive) + +5. Make new `secrets` and `passwords` in the desired directories by appending the paths to `secrets.yaml` and then using the following command (The [`nixos`](./scripts/README.md) script can be used to simplify the process): + _Replace_ **_PATH_** _with the path to the `secret`_ + <pre><code>sops --config <i>/path/to/<b>secrets.yaml</b></i> -i <b><i>PATH</i></b></code></pre> + +6. Add device-specific configuration by creating a new file in [`modules/hosts`](./modules/hosts). Do keep in mind that the filesystems must be appropriately created and labeled as defined [here](./modules/system/filesystem.nix). + +7. Finally, run `nixos-rebuild switch --flake /etc/nixos#HOSTNAME` (as `root`) to switch to the configuration! + +</details> + +</details> + +<details> +<summary><b>From Scratch</b></summary> + +> [!IMPORTANT] +> These instructions are mainly intended for personal use + +To download the Install Media, click on the latest successsful run listed [here](../../actions/workflows/install.yml) and download the image artifact. Burn it to a USB using a flashing utility such as [Etcher](https://www.balena.io/etcher/) + +> [!TIP] +> In order to directly use the configuration, you must first create a clone of this repository and follow steps 2 to 6 from the first section, and preferably create your own install media + +<details> +<summary><i>Build</i></summary> +If Nix is already installed on your system, you may run the following command to build the Install Media image: + +<pre><code>nix build github:maydayv7/dotfiles#nixosConfigurations.install.config.system.build.images.iso</code></pre> + +To build and run the `install` script, use the following commands: + +``` +nix build github:maydayv7/dotfiles#install +sudo ./result/bin/os-install +``` + +If you want to create an `.iso` image of the entire system, run the following command: +_Replace_ **_DEVICE_** _with the name of Device to build_ + +<pre><code>nix build github:maydayv7/dotfiles#nixosConfigurations.<b><i>DEVICE</i></b>.config.system.build.images.iso</code></pre> + +</details> + +#### Partition Scheme + +_The `install` script handles partition creation and labeling, so it is recommended to create only the partition table and ensure sufficient free space_ + +| Name | Label | Format | Size (minimum) | +| :------------- | :----: | :----: | :------------: | +| BOOT Partition | ESP | vfat | 500M | +| ROOT Partition | System | ZFS | 50G | +| SWAP Area | swap | swap | 8G | +| DATA Partition | Files | ZFS | 10G | + +> [!NOTE] +> For the `advanced` filesystem scheme only + +#### Procedure + +To install the OS, just boot the Live USB and run `sudo os-install` +_If the image doesn't boot, try disabling the `secure boot` and `RAID` options from `BIOS`_ +After the reboot, run `nixos setup` to finish the install +_In case you are using the `advanced` filesystem scheme, you may need to set the boot flag `zfs_force=1` on first boot_ + +</details> + +<details> +<summary><b>Build It Yourself</b></summary> + +If you really want to get dirty with Nix and decide to invest oodles of your time into building your own configuration, this repository can be used as inspiration. +Follow along with my [NixOS Desktop](https://maydayv7.cc/series/nixos-desktop/) Series + +**Welcome** to the Nix Community! ;) + +</details> + +## Notes + +### Caution + +This repository contains my personal configuration, and may cause undesirable effects on other systems. +It may also be subject to rapid undocumented changes, and uses Nix [Flakes](https://wiki.nixos.org/wiki/Flakes), an experimental feature. + +> [!NOTE] +> Required Nix Version >= 2.19 + +It is not recommended to use NixOS if you are a beginner just starting out, without acquaintance with either the command-line or functional programming languages, since the learning curve is steep, debugging issues is difficult, documentation is shallow, and the effort required/time spent isn't worth the hassle for a novice/casual user. + +### Platform + +_May change according to available hardware_ + +This configuration works well with an Intel CPU + iGPU, and is currently being improved to support an AMD APU + Nvidia GPU. Any other setup is untested. +The `hardware.modules` option can be used to load relevant configuration from [`nixos-hardware`](https://github.com/nixos/nixos-hardware). + +See [this](./modules/hardware/README.md) for additional information + +### Cache + +The system build cache is publicly hosted using [Cachix](https://www.cachix.org) at [maydayv7-dotfiles](https://app.cachix.org/cache/maydayv7-dotfiles), and can be used while building the system to prevent rebuilding from scratch + +### Continuous Integration + +This repository makes use of [`GitHub Actions`](./.github/workflows) in order to automatically check the configuration syntax & format on every commit, update the `inputs` and build the Install Media `.iso` every month, and upload the build cache to [Cachix](https://app.cachix.org/cache/maydayv7-dotfiles). +A `git` [hook](./files/git/hooks) is used to check the commit message to adhere to the [`Conventional Commits`](https://www.conventionalcommits.org) specification + +##### Variables + +- [`ACCESS_TOKEN`](./secrets/github-token.secret): Personal Access Token + (To create one, see [this](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)) +- [`CACHIX_TOKEN`](./secrets/cachix-token.secret): Cachix Authentication Token + +--- + +<details> +<summary><b>Known Limitations</b></summary> + +### Manual Intervention + +- [Wine](./packages/wine) Applications have to be manually updated +- Minecraft [Server](./modules/apps/games/mc-server.nix) has to be manually updated +- Logseq Plugins have to be manually installed +- Cannot automatically hibernate on NVIDIA due to upstream [issue](https://forums.developer.nvidia.com/t/systemds-suspend-then-hibernate-not-working-in-nvidia-optimus-laptop/213690) + +</details> + +> Last Updated: **June** 2026 + +If you like this project, consider leaving a [star](https://github.com/maydayv7/dotfiles) diff --git a/arch/COMMANDS.md b/arch/COMMANDS.md @@ -1,60 +0,0 @@ -# Useful Commands - -#### GRUB - -_The update-grub script:_ -_Add the following in_ **/usr/sbin/update-grub** - -**_#!/bin/sh_** -**_set -e_** -**_exec grub-mkconfig -o /boot/grub/grub.cfg_** - -_Then execute:_ -`sudo chown root:root /usr/sbin/update-grub` -`sudo chmod 755 /usr/sbin/update-grub` - -#### Virtualisation - -`sudo usermod -a -G libvirt $(whoami)` -`newgrp libvirt` -`sudo usermod -a -G kvm $(whoami)` - -#### Fonts - -`sudo ln -s /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d/` -`sudo ln -s /usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d/` -`sudo fc-cache -fv` - -#### Theming - -_To set QT theme in GTK+ based DEs using qt5ct, add the following in /etc/environment:_ -`QT_QPA_PLATFORMTHEME=qt5ct` - -_To make apps running as root in **OpenSUSE** use the right theme:_ -`sudo ln -s /home/USER/.config/kdeglobals /root/.config/kdeglobals` -`sudo ln -s /home/USER/.config/gtk-4.0 /root/.config/gtk-4.0` - -#### Filesystem - -_Fix NTFS Disk after a faulty Windows shutdown:_ -`sudo ntfsfix /dev/X` - -_Create symlinks for home directories (Useful for multiboot)_ -`ln -s /PATH/HOME_DIR ~/home/USER/HOME_DIR` - -_If a home directory got deleted or if you want a custom home directory, modify this file_ -`nano ~/.config/user-dirs.dirs` - -_How I mount my data partition_ -`sudo mkdir /data` -`sudo chmod ugo+rw /data` - -``` -# DATA Partition -UUID=partuuid /data ntfs rw,defaults,x-gvfs-show 0 0 -``` - -#### Miscellaneous - -_To clear configuration files of deleted apps in **Debian**:_ -`sudo dpkg --purge dpkg --get-selections | grep deinstall | cut -f1` diff --git a/arch/INSTALL.md b/arch/INSTALL.md @@ -1,174 +0,0 @@ -# Arch Linux BTRFS Install - -Enter custom values for THESE letters -_These_ and **_these_** letters are comments - -## Create live disk - -Go to [this](https://www.archlinux.org/download/) website and download the latest .iso file, then either burn it to a USB using [Etcher](https://www.balena.io/etcher/) or a CD using [Brasero](https://wiki.gnome.org/Apps/Brasero). Make sure that the size of the device is at least 1 GB - -## Network - -_Replace_ **_DEVICE_** _with the name of the device found from device list_ -`iwctl` -`device list` -`station DEVICE get-networks` -`station DEVICE connect NETWORK` -`exit` - -## Partitions - -Create your partitions using a tool like [Gparted](https://gparted.org/) or [cfdisk](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjM3OO5yLnwAhUDXSsKHZi0DGcQFjABegQIAhAD&url=https%3A%2F%2Fman.archlinux.org%2Fman%2Fcfdisk.8.en&usg=AOvVaw1IUZ8UEyqlKjnpyVtymdfu). It is recommended to have an ESP or BOOT Partition, a ROOT Partition and a DATA Partition for storing files - -`fdisk -l` -_Check which partitions to install onto and note their_ **_number_** -_Replace_ **_X_**, **_Y_** and **_Z_** _with the required partitions as -found from the above command_ - -`mkfs.btrfs -f -L Root /dev/X` **- ROOT Partition** -`mkfs.fat -F32 -n BOOT /dev/Y` **- BOOT Partition** -`mkswap -L Swap /dev/Z` **- SWAP Partition (Optional)** -`mount /dev/X /mnt` -`cd /mnt` -`btrfs subvolume create @` -`btrfs subvolume create @home` -`btrfs subvolume create snapshots` -`cd` -`umount /mnt` -`mount -o noatime,space_cache=v2,ssd,compress=zstd,subvol=@ /dev/X /mnt` -`mkdir /mnt/home` -`mount -o noatime,space_cache=v2,ssd,compress=zstd,subvol=@home /dev/X/mnt/home` -`swapon /dev/Z` - -\*Skip below if using a **_UEFI_** System\* -`mkdir /mnt/boot` -`mount /dev/Y /mnt/boot` - -## Install Arch - -`pacstrap /mnt base linux linux-firmware nano base-devel man-db man-pages texinfo btrfs-progs` -`genfstab -U /mnt >> /mnt/etc/fstab` - -### Configuring Disks - -`mkdir /mnt/mnt/volume` -`nano /mnt/etc/fstab` -_Remove subvolids from all entries, add the /mnt/volume entry. Eg:_ - -``` -# ROOT Subvolume -UUID=1a787b5a-c649-4c75-b8bc-b0ac970a1b6d / btrfs rw,noatime,compress=zstd:3,ssd,space_cache=v2,autodefrag,subvol=@ 0 0 - -# HOME Subvolume -UUID=1a787b5a-c649-4c75-b8bc-b0ac970a1b6d /home btrfs rw,noatime,compress=zstd:3,ssd,space_cache=v2,autodefrag,subvol=@home 0 0 - -# BTRFS Partition -UUID=1a787b5a-c649-4c75-b8bc-b0ac970a1b6d /mnt/volume btrfs rw,noatime,discard,autodefrag,space_cache=v2,subvol=/ 0 0 - -# SWAP Partition -UUID=e82defeb-409d-449f-bd51-cdd87bd2af02 none swap defaults 0 0 -``` - -_To get the UUID of a partition, use the `blkid` command_ - -## General Settings - -`arch-chroot /mnt` - -`timedatectl set-timezone CONTINENT/CITY` -`nano /etc/locale.gen` -**_Uncomment_** _the required locale_ -`locale-gen` -`nano /etc/locale.conf` -_Add:_ -_LANG=**ab_CD**.UTF-8_ - -_Replace_ **_HOSTNAME_** _with the desired name for your computer_ -`echo HOSTNAME > /etc/hostname` -`touch /etc/hosts` -`nano /etc/hosts` -_Add:_ - -``` -127.0.0.1 localhost -::1 localhost -127.0.1.1 HOSTNAME -``` - -_Replace_ **_USER_** _with the desired username_ -`passwd` -`useradd -m USER` -`passwd USER` -`export EDITOR=nano` -`visudo` -_Add:_ -_USER_ **_ALL=(ALL) ALL_** - -## Bootloader - -`pacman -S grub` - -#### For BIOS Systems - -`grub-install /dev/X` -`grub-mkconfig -o /boot/grub/grub.cfg` - -#### For UEFI Systems - -`pacman -S efibootmgr` -`mkdir /boot/efi` -`mount /dev/Y /boot/efi` -`grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi` -`grub-mkconfig -o /boot/grub/grub.cfg` - -## Desktop Environment - -### Gnome - -`pacman -S xorg gnome networkmanager` -`systemctl enable gdm` - -### XFCE - -`pacman -S xorg xfce4 xfce4-goodies lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings networkmanager` -`systemctl enable lightdm` - -### KDE - -`pacman -S xorg plasma plasma-wayland-session` -`systemctl enable sddm` - -## After Install - -### Essential Utilites - -`pacman -S bluez bluez-utils cups git ntfs-3g intel-ucode system-config-printer` -`systemctl enable bluetooth` -`systemctl enable cups` -`systemctl enable NetworkManager` - -### Zram (Optional) - -`nano /etc/systemd/system/zram.service` -_Add the following by changing the size according to your RAM:_ - -``` -[Unit] -Description=zRam block devices swapping - -[Service] -Type=oneshot -ExecStart=/usr/bin/bash -c "modprobe zram && echo lz4 > /sys/block/zram0/comp_algorithm && echo 6G > /sys/block/zram0/disksize && mkswap --label zram0 /dev/zram0 && swapon --priority 100 /dev/zram0" -ExecStop=/usr/bin/bash -c "swapoff /dev/zram0 && rmmod zram" -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target -``` - -`systemctl enable zram` - -### We're Done! :) - -`exit` -`reboot` diff --git a/arch/zshrc b/arch/zshrc @@ -1,41 +0,0 @@ -## My ZSH Config ## -# Plugins -source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh -source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme - -# Powerlevel10K Prompt -if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -fi -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh - -# Find The Command -source /usr/share/doc/find-the-command/ftc.zsh noprompt quiet - -bindkey '^[[1;5C' forward-word -bindkey '^[[1;5D' backward-word -bindkey '^[[3;5~' kill-word -bindkey '^[[3~' delete-char -bindkey "^[[5~" beginning-of-history -bindkey "^[[6~" end-of-history -bindkey '^[[A' up-line-or-search -bindkey '^[[B' down-line-or-search -bindkey '^[[C' forward-char -bindkey '^[[D' backward-char -bindkey '^[[F' end-of-line -bindkey '^[[H' beginning-of-line -bindkey '^J' backward-kill-line - -HISTFILE=~/.zsh_history -HISTSIZE=10000 -SAVEHIST=1000 -setopt SHARE_HISTORY - -alias hi="echo 'Hi there. How are you?'" -alias bye="exit" -alias c="bat" -alias l="eza -b -h -l -F --octal-permissions --icons --time-style iso" -alias grep="grep --color" -alias edit="sudo $EDITOR" -alias sike="neofetch --ascii_distro arch" diff --git a/files/README.md b/files/README.md @@ -0,0 +1,6 @@ +### Dotfiles + +The `files` directory is used to store all my plain-text program configuration files +_(or as we all love to call it, the `dotfiles`)_ + +Read [`_module.nix`](./_module.nix) to understand how they are used diff --git a/files/_module.nix b/files/_module.nix @@ -0,0 +1,148 @@ +{ + config, + inputs, + ... +}: let + inherit (config) util; + inherit (util) build map; + inherit (builtins) fromJSON readFile; +in { + flake.files = rec { + # File Paths + path = { + toplevel = ./.; + + system = "/etc/nixos"; + persist = "/nix/state"; + data = "/data"; + + gpg = "/etc/gpg"; + sops = ../secrets/secrets.yaml; + + cache = "maydayv7-dotfiles"; + flake = "github:maydayv7/dotfiles"; + repo = "https://github.com/maydayv7/dotfiles"; + }; + + # Interactive Nix Shell + repl = ./repl.nix; + + # ASCII Art + ascii = map.files { + directory = ./ascii; + extension = ""; + recursive = true; + }; + + # Directory Bookmarks + bookmarks = '' + file://${path.data}/files Files + file://${path.data}/sync Sync + file:/// Computer + ''; + + # Base16 Color Schemes + colors = map.files { + directory = ./colors; + extension = ".yaml"; + }; + + # Fastfetch + fetch = readFile ./fastfetch.jsonc; + + # Geany Text Editor + geany = map.files { + directory = ./geany; + apply = readFile; + extension = ".conf"; + }; + + # 'git' Version Control + git.hooks = ./git/hooks; + + # Gitea Code Hosting + gitea = map.files { + directory = ./gitea; + apply = readFile; + extension = ".css"; + }; + + # GNOME Desktop + gnome = map.files { + directory = ./gnome; + extension = ".json"; + }; + + # Hyprland WM + hyprland = + { + shaders = ./hyprland/shaders; + pypr = readFile ./hyprland/pypr.toml; + waycorner = readFile ./hyprland/waycorner.toml; + kebihelp = readFile ./hyprland/kebihelp.json; + greeter = readFile ./hyprland/greeter.conf; + } + // map.files { + directory = ./hyprland/theme; + apply = readFile; + extension = ".css"; + }; + + # Pictures + images = map.files { + directory = ./images; + extension = ".png"; + }; + + # Logseq Notes + logseq = { + settings = ./logseq/settings; + prefs = readFile ./logseq/preferences.json; + }; + + # Nano Text Editor + nano = readFile ./nanorc; + + # PcmanFM File Manager + pcmanfm = readFile ./pcmanfm.conf; + + # Custom Proprietary Files + proprietary = inputs.proprietary.files; + inherit (proprietary) wallpapers; + + # Bash Scripts + scripts = map.files { + directory = ../scripts; + apply = build.script; + extension = ".sh"; + }; + + # Display Temperature Control + sunsetr = ./sunsetr; + + # Notifications Daemon + swaync = readFile ./swaync.css; + + # Document Templates + templates = ./templates; + + # Terminal Multiplexer + tmux = readFile ./tmuxrc.tmux; + + # Visual Studio Code Editor + vscode = map.files { + directory = ./vscode; + apply = file: fromJSON (readFile file); + extension = ".json"; + }; + + # My Personal Website + website = ../site; + + # Logout Menu + wlogout = readFile ./wlogout.css; + + # YouTube + youtube = readFile ./ytmusic.json; + }; +} diff --git a/files/ascii/groot b/files/ascii/groot @@ -0,0 +1,10 @@ +  \^V// +  |. .|  I AM (G)ROOT! + - \ - / _ +  \_| |_/ +  \ \ +  __/_/__ + |_______|  With Great Power Comes Great Responsibility +  \ /  Use it Wisely +  \___/ + diff --git a/files/ascii/lol b/files/ascii/lol @@ -0,0 +1,6 @@ +██╗░░░░░░█████╗░██╗░░░░░ +██║░░░░░██╔══██╗██║░░░░░ +██║░░░░░██║░░██║██║░░░░░ +██║░░░░░██║░░██║██║░░░░░ +███████╗╚█████╔╝███████╗ +╚══════╝░╚════╝░╚══════╝ +\ No newline at end of file diff --git a/files/ascii/pacman b/files/ascii/pacman @@ -0,0 +1,11 @@ +================================================. + .-. .-. .--. | + | OO| | OO| / _.-' .-. .-. .-. .''. | + | | | | \ '-. '-' '-' '-' '..' | + '^^^' '^^^' '--' | +===============. .-. .================. .-. | + | | | | | '-' | + | | | | | | + | ':-:' | | .-. | + | '-' | | '-' | +===============' '================' | +\ No newline at end of file diff --git a/files/ascii/tux b/files/ascii/tux @@ -0,0 +1,18 @@ + .-"""-. + ' \ + |,. ,-. | + |()L( ()| | + |,' `".| | + |.___.',| ` + .j `--"' ` `. + / ' ' \ + / / ` `. + / / ` . + / / l | + . , | | + ,"`. .| | + _.' ``. | `..-'l +| `.`, | `. +| `. __.j ) +|__ |--""___| ,-' + `"--...,+"""" `._,.-' +\ No newline at end of file diff --git a/files/colors/README.md b/files/colors/README.md @@ -0,0 +1,26 @@ +### Base16 Color Schemes + +The color schemes are specified according to the following format - + +```yaml +scheme: Name +author: Maker +base00: Base +base01: Mantle +base02: Surface0 +base03: Surface1 +base04: Surface2 +base05: Text +base06: Rosewater +base07: Lavender +base08: Red +base09: Peach +base0A: Yellow +base0B: Green +base0C: Teal +base0D: Blue +base0E: Mauve +base0F: Flamingo +``` + +(_or other equivalent colors_) diff --git a/files/colors/adwaita.yaml b/files/colors/adwaita.yaml @@ -0,0 +1,18 @@ +scheme: "Adwaita" +author: "maydayv7" +base00: "#1c1c1f" +base01: "#222226" +base02: "#3d3846" +base03: "#5e5c64" +base04: "#c0bfbc" +base05: "#f6f5f4" +base06: "#cdab8f" +base07: "#62a0ea" +base08: "#ed333b" +base09: "#ffa348" +base0A: "#f5c211" +base0B: "#57e389" +base0C: "#0ab9dc" +base0D: "#1e78e4" +base0E: "#9841bb" +base0F: "#c061cb" diff --git a/files/colors/catppuccin.yaml b/files/colors/catppuccin.yaml @@ -0,0 +1,18 @@ +scheme: "Catppuccin Macchiato" +author: "Catppuccin" +base00: "#24273a" +base01: "#1e2030" +base02: "#363a4f" +base03: "#494d64" +base04: "#5b6078" +base05: "#cad3f5" +base06: "#f4dbd6" +base07: "#b7bdf8" +base08: "#ed8796" +base09: "#f5a97f" +base0A: "#eed49f" +base0B: "#a6da95" +base0C: "#8bd5ca" +base0D: "#8aadf4" +base0E: "#c6a0f6" +base0F: "#f0c6c6" diff --git a/files/fastfetch.jsonc b/files/fastfetch.jsonc @@ -0,0 +1,160 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "type": "auto", + "padding": { + "top": 6, + "left": 3 + }, + "color": { + "1": "blue", + "2": "white" + } + }, + "display": { + "separator": " : " + }, + "modules": [ + { + "type": "custom", + "format": "┌─⮞ {#1}Hardware{#}" + }, + { + "type": "host", + "key": " ", + "keyColor": "cyan" + }, + { + "type": "cpu", + "key": " ", + "keyColor": "cyan", + "showPeCoreCount": true + }, + { + "type": "gpu", + "key": " ", + "keyColor": "cyan", + "driverSpecific": true + }, + { + "type": "display", + "key": " 󰹑", + "keyColor": "cyan" + }, + { + "type": "memory", + "key": " ", + "keyColor": "green" + }, + { + "type": "disk", + "key": " ", + "keyColor": "green" + }, + { + "type": "custom", + "format": "└─" + }, + "break", + { + "type": "custom", + "format": "┌─⮞ {#1}Software{#}" + }, + { + "type": "os", + "key": " ", + "keyColor": "yellow" + }, + { + "type": "kernel", + "key": " ", + "keyColor": "yellow" + }, + { + "type": "bios", + "key": " ", + "keyColor": "yellow" + }, + { + "type": "packages", + "key": " 󰏖", + "keyColor": "yellow" + }, + { + "type": "shell", + "key": " ", + "keyColor": "blue" + }, + { + "type": "de", + "key": " ", + "keyColor": "blue" + }, + { + "type": "wm", + "key": " ", + "keyColor": "blue" + }, + { + "type": "lm", + "key": " ", + "keyColor": "blue" + }, + { + "type": "wmtheme", + "key": " 󰉼", + "keyColor": "blue" + }, + { + "type": "terminal", + "key": " ", + "keyColor": "blue" + }, + { + "type": "terminalfont", + "key": " ", + "keyColor": "light_red" + }, + { + "type": "theme", + "key": " 󰃣", + "keyColor": "light_red", + "format": "{2}" + }, + { + "type": "icons", + "key": " 󱢈", + "keyColor": "light_red" + }, + { + "type": "cursor", + "key": " ", + "keyColor": "light_red" + }, + { + "type": "custom", + "format": "└─" + }, + "break", + { + "type": "custom", + "format": "┌─⮞ {#1}Uptime{#}" + }, + { + "type": "command", + "key": " ", + "keyColor": "magenta", + "text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days" + }, + { + "type": "uptime", + "key": " ", + "keyColor": "magenta" + }, + { + "type": "custom", + "format": "└─" + }, + "break" + ] +} diff --git a/files/geany/keybindings.conf b/files/geany/keybindings.conf @@ -0,0 +1,152 @@ +[Bindings] +popup_gototagdefinition= +edit_transposeline=<Primary>t +edit_movelineup= +edit_movelinedown= +move_tableft=<Alt>Page_Up +move_tabright=<Alt>Page_Down +menu_new=<Primary>n +menu_open=<Primary>o +menu_open_selected=<Primary><Shift>o +menu_save=<Primary>s +menu_saveas= +menu_saveall=<Primary><Shift>s +file_properties=<Primary><Shift>v +menu_print=<Primary>p +menu_close=<Primary>w +menu_closeall=<Primary><Shift>w +menu_reloadfile=<Primary>r +menu_reloadall= +file_openlasttab= +menu_quit=<Primary>q +menu_undo=<Primary>z +menu_redo=<Primary>y +edit_duplicateline=<Primary>k +edit_deleteline=<Primary>d +edit_deletelinetoend=<Primary><Shift>Delete +edit_deletelinetobegin=<Primary><Shift>BackSpace +edit_scrolltoline=<Primary><Shift>l +edit_scrolllineup=<Alt>Up +edit_scrolllinedown=<Alt>Down +edit_completesnippet=Tab +move_snippetnextcursor= +edit_suppresssnippetcompletion= +popup_contextaction= +edit_autocomplete=<Primary>space +edit_calltip=<Primary><Shift>space +edit_wordpartcompletion=Tab +menu_cut=<Primary>x +menu_copy=<Primary>c +menu_paste=<Primary>v +edit_copyline=<Primary><Shift>c +edit_cutline=<Primary><Shift>x +menu_selectall=<Primary>a +edit_selectword=<Shift><Alt>w +edit_selectline=<Shift><Alt>l +edit_selectparagraph=<Shift><Alt>p +edit_selectwordpartleft= +edit_selectwordpartright= +edit_togglecase=<Primary><Alt>u +edit_commentlinetoggle=<Primary>e +edit_commentline= +edit_uncommentline= +edit_increaseindent=<Primary>i +edit_decreaseindent=<Primary>u +edit_increaseindentbyspace= +edit_decreaseindentbyspace= +edit_autoindent= +edit_sendtocmd1=<Primary>1 +edit_sendtocmd2=<Primary>2 +edit_sendtocmd3=<Primary>3 +edit_sendtocmd4= +edit_sendtocmd5= +edit_sendtocmd6= +edit_sendtocmd7= +edit_sendtocmd8= +edit_sendtocmd9= +edit_sendtovte= +format_reflowparagraph=<Primary>j +edit_joinlines= +menu_insert_date=<Shift><Alt>d +edit_insertwhitespace= +edit_insertlinebefore= +edit_insertlineafter= +menu_preferences=<Primary><Alt>p +menu_pluginpreferences= +menu_find=<Primary>f +menu_findnext=<Primary>g +menu_findprevious=<Primary><Shift>g +menu_findnextsel= +menu_findprevsel= +menu_replace=<Primary>h +menu_findinfiles=<Primary><Shift>f +menu_nextmessage= +menu_previousmessage= +popup_findusage=<Primary><Shift>e +popup_finddocumentusage=<Primary><Shift>d +find_markall=<Primary><Shift>m +nav_back=<Alt>Left +nav_forward=<Alt>Right +menu_gotoline=<Primary>l +edit_gotomatchingbrace=<Primary>b +edit_togglemarker=<Primary>m +edit_gotonextmarker=<Primary>period +edit_gotopreviousmarker=<Primary>comma +popup_gototagdeclaration=<Primary><Shift>t +edit_gotolinestart=Home +edit_gotolineend=End +edit_gotolinestartvisual=<Alt>Home +edit_gotolineendvisual=<Alt>End +edit_prevwordstart=<Primary>slash +edit_nextwordstart=<Primary>backslash +menu_toggleall= +menu_fullscreen=F11 +menu_messagewindow= +toggle_sidebar= +menu_zoomin=<Primary>plus +menu_zoomout=<Primary>minus +normal_size=<Primary>0 +menu_linewrap= +menu_linebreak= +menu_clone= +menu_strip_trailing_spaces= +menu_replacetabs= +menu_replacespaces= +menu_togglefold= +menu_foldall= +menu_unfoldall= +reloadtaglist=<Primary><Shift>r +remove_markers= +remove_error_indicators= +remove_markers_and_indicators= +project_new= +project_new_from_folder= +project_open= +project_properties= +project_close= +build_compile=F8 +build_link=F9 +build_make=<Shift>F9 +build_makeowntarget=<Primary><Shift>F9 +build_makeobject=<Shift>F8 +build_nexterror= +build_previouserror= +build_run=F5 +build_options= +menu_opencolorchooser= +menu_help=F1 +switch_editor=F2 +switch_search_bar=F7 +switch_message_window= +switch_compiler= +switch_messages= +switch_scribble=F6 +switch_vte=F4 +switch_sidebar= +switch_sidebar_symbol_list= +switch_sidebar_doc_list= +switch_tableft=<Primary>Page_Up +switch_tabright=<Primary>Page_Down +switch_tablastused=<Primary>Tab +move_tabfirst= +move_tablast= diff --git a/files/geany/settings.conf b/files/geany/settings.conf @@ -0,0 +1,188 @@ +[geany] +pref_main_load_session=true +pref_main_project_file_in_basedir=true +pref_main_save_winpos=true +pref_main_save_wingeom=true +pref_main_confirm_exit=false +pref_main_suppress_status_messages=false +switch_msgwin_pages=false +beep_on_errors=true +auto_focus=false +sidebar_symbol_visible=true +sidebar_openfiles_visible=true +editor_font=Monospace 10 +tagbar_font=Sans 9 +msgwin_font=Monospace 9 +show_notebook_tabs=true +show_tab_cross=true +tab_order_ltr=true +tab_order_beside=false +tab_pos_editor=2 +tab_pos_msgwin=0 +tab_label_length=1000 +show_indent_guide=false +show_white_space=false +show_line_endings=false +show_line_endings_only_when_differ=false +show_markers_margin=true +show_linenumber_margin=true +long_line_enabled=true +long_line_type=0 +long_line_column=72 +long_line_color=#C2EBC2 +symbolcompletion_max_height=10 +symbolcompletion_min_chars=4 +use_folding=true +unfold_all_children=false +use_indicators=true +line_wrapping=false +auto_close_xml_tags=true +complete_snippets=true +auto_complete_symbols=true +pref_editor_disable_dnd=false +pref_editor_smart_home_key=true +pref_editor_newline_strip=false +line_break_column=72 +auto_continue_multiline=true +comment_toggle_mark=~ +scroll_stop_at_last_line=true +autoclose_chars=0 +pref_editor_default_new_encoding=UTF-8 +pref_editor_default_open_encoding=none +default_eol_character=2 +pref_editor_new_line=true +pref_editor_ensure_convert_line_endings=false +pref_editor_replace_tabs=false +pref_editor_trail_space=false +pref_toolbar_show=true +pref_toolbar_append_to_menu=false +pref_toolbar_use_gtk_default_style=true +pref_toolbar_use_gtk_default_icon=true +pref_toolbar_icon_style=0 +pref_toolbar_icon_size=0 +pref_template_developer=V 7 +pref_template_company= +pref_template_mail=v7@vortex +pref_template_initial=V7 +pref_template_version=1.0 +pref_template_year=%Y +pref_template_date=%Y-%m-%d +pref_template_datetime=%d.%m.%Y %H:%M:%S %Z +context_action_cmd= +sidebar_visible=true +statusbar_visible=true +msgwindow_visible=true +fullscreen=false +symbols_group_by_type=true +color_picker_palette= +scribble_text=Type here what you want, use it as a notice/scratch board +scribble_pos=57 +custom_date_format= +default_open_path= +cmdline_new_files=true +notebook_double_click_hides_widgets=false +tab_close_switch_to_mru=false +tab_pos_sidebar=2 +openfiles_path_mode=2 +sidebar_pos=0 +symbols_sort_mode=0 +msgwin_orientation=1 +highlighting_invert_all=false +pref_main_search_use_current_word=true +check_detect_indent=false +detect_indent_width=false +use_tab_to_indent=true +backspace_unindent=true +pref_editor_tab_width=4 +indent_mode=2 +indent_type=1 +virtualspace=1 +change_history_markers=false +change_history_indicators=false +autocomplete_doc_words=false +completion_drops_rest_of_word=false +autocompletion_max_entries=30 +autocompletion_update_freq=250 +color_scheme=theme.conf +scroll_lines_around_cursor=0 +mru_length=10 +disk_check_timeout=30 +show_editor_scrollbars=true +brace_match_ltgt=false +use_gtk_word_boundaries=true +complete_snippets_whilst_editing=false +indent_hard_tab_width=8 +editor_ime_interaction=0 +use_atomic_file_saving=false +gio_unsafe_save_backup=false +use_gio_unsafe_file_saving=true +keep_edit_history_on_reload=true +show_keep_edit_history_on_reload_msg=true +reload_clean_doc_on_file_change=false +save_config_on_file_change=true +extract_filetype_regex=-\\*-\\s*([^\\s]+)\\s*-\\*- +allow_always_save=false +find_selection_type=0 +replace_and_find_by_default=true +show_symbol_list_expanders=true +compiler_tab_autoscroll=true +statusbar_template=line: %l / %L col: %c sel: %s %w %t %mEOL: %M encoding: %e filetype: %f scope: %S +new_document_after_close=false +msgwin_status_visible=true +msgwin_compiler_visible=true +msgwin_messages_visible=true +msgwin_scribble_visible=true +warn_on_project_close=true + +[tools] +terminal_cmd=xterm -e "/bin/sh %c" +browser_cmd= +grep_cmd=grep + +[printing] +print_cmd=lpr '%f' +use_gtk_printing=true +print_line_numbers=true +print_page_numbers=true +print_page_header=true +page_header_basename=false +page_header_datefmt=%c + +[VTE] +load_vte=true +send_cmd_prefix= +send_selection_unsafe=false + +[build-menu] +number_ft_menu_items=0 +number_non_ft_menu_items=0 +number_exec_menu_items=0 + +[search] +pref_search_hide_find_dialog=false +pref_search_always_wrap=false +pref_search_current_file_dir=true +fif_regexp=false +fif_case_sensitive=true +fif_match_whole_word=false +fif_invert_results=false +fif_recursive=false +fif_extra_options= +fif_use_extra_options=false +fif_files= +fif_files_mode=0 +find_regexp=false +find_regexp_multiline=false +find_case_sensitive=false +find_escape_sequences=false +find_match_whole_word=false +find_match_word_start=false +find_close_dialog=true +replace_regexp=false +replace_regexp_multiline=false +replace_case_sensitive=false +replace_escape_sequences=false +replace_match_whole_word=false +replace_match_word_start=false +replace_search_backwards=false +replace_close_dialog=true diff --git a/files/git/hooks/commit-msg b/files/git/hooks/commit-msg @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +error() { echo -e "\033[0;31merror:\033[0m $1"; exit 7; } + +## Commit Message ## + +# 1. Structure +if ! head -n 1 "$1" | grep -qE '^(feat|fix|ci|blog|chore|docs|test|style|refactor)(\([^)]+\))?!?: .+$' +then + error "Commit Message header is invalid\nFormat -> type(scope): subject" +fi + +# 2. Length +if ! head -n 1 "$1" | grep -qE '^.{1,50}$' +then + error "Commit Message header is too long\nGreater than 50 characters" +fi diff --git a/files/git/hooks/pre-commit b/files/git/hooks/pre-commit @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +error() { echo -e "\033[0;31merror:\033[0m $1"; exit 7; } + +## Pre-Commit Checks ## + +# Nix Syntax +if [ "$(find . -name 'flake.nix' 2>/dev/null | wc -l)" != 0 ] +then + nix flake check || error "Invalid Nix Flakes Configuration" +fi diff --git a/files/gnome/menu.json b/files/gnome/menu.json @@ -0,0 +1,102 @@ +{ + "settings": { + "icon": "open-menu-symbolic", + "loglevel": "warning" + }, + "menu": [ + { + "type": "submenu", + "title": "Audio", + "icon": "audio-headset-symbolic", + "items": [ + { + "type": "command", + "title": "Test Sound", + "command": "find /run/current-system/sw/share/sounds/alsa/ -name '*_*' -exec aplay {} \\;", + "instancing": "singleInstance", + "icon": "sound-symbolic", + "killOnDisable": false + }, + { + "type": "command", + "title": "Microphone Boost", + "command": "sh -c \"CARD=$(arecord -l | grep card | awk '{print $3}'); VALUE=$(zenity --scale --text='Select Microphone Boost value' --value=0 --min-value=0 --max-value=100 --step=5); amixer -c $CARD sset 'Mic Boost' $VALUE\"", + "instancing": "singleInstance", + "icon": "microphone-symbolic", + "killOnDisable": false + } + ] + }, + { + "type": "submenu", + "title": "Phone", + "icon": "smartphone-symbolic", + "items": [ + { + "type": "command", + "title": "iPhone File Transfer", + "command": "systemctl restart usbmuxd.service", + "instancing": "singleInstance", + "icon": "fileopen", + "killOnDisable": false + }, + { + "type": "command", + "title": "ADB Screen Mirror", + "command": "scrcpy --video-codec=h265 --keyboard=uhid --stay-awake --turn-screen-off --power-off-on-close --shortcut-mod=rctrl", + "instancing": "singleInstance", + "icon": "display-projector-symbolic", + "killOnDisable": false + } + ] + }, + { + "type": "submenu", + "title": "Virtualisation", + "icon": "computer-symbolic", + "items": [ + { + "type": "switch", + "title": "Android", + "icon": "im-google-symbolic", + "start": "sh -c 'nohup waydroid session start > /dev/null 2>&1&'", + "stop": "waydroid session stop", + "check": "sh -c 'waydroid status | grep RUNNING'", + "interval_s": 10 + }, + { + "type": "switch", + "title": "Windows", + "icon": "im-msn-symbolic", + "start": "virsh -c qemu:///system start Windows", + "stop": "virsh -c qemu:///system shutdown Windows", + "check": "sh -c 'virsh -c qemu:///system list | grep Windows'", + "interval_s": 10 + } + ] + }, + { + "type": "submenu", + "title": "Settings", + "icon": "application-menu-symbolic", + "items": [ + { + "type": "command", + "title": "Configuration", + "command": "xdg-open .config/guillotine.json", + "instancing": "singleInstance", + "icon": "preferences-other-symbolic", + "killOnDisable": true + }, + { + "type": "command", + "title": "Log Desktop", + "command": "kgx -e 'sudo journalctl /run/current-system/sw/bin/gnome-shell -f -o cat'", + "instancing": "singleInstance", + "icon": "emblem-documents-symbolic", + "killOnDisable": false + } + ] + } + ] +} diff --git a/files/gnome/shortcuts.json b/files/gnome/shortcuts.json @@ -0,0 +1,304 @@ +[ + { + "name": "Window Navigation", + "shortcuts": [ + { + "key": "ALT + F4 / Super + Q", + "description": "Close active window" + }, + { + "key": "ALT + Space", + "description": "Activate window menu" + }, + { + "key": "Super + ↑/↓", + "description": "Maximize/Minimize window" + }, + { + "key": "Super + M", + "description": "Toggle maximized window" + }, + { + "key": "Super + SHIFT + F", + "description": "Toggle fullscreen window" + }, + { + "key": "Super + W/A/S/D", + "description": "Focus window in specified direction" + }, + { + "key": "Super + SHIFT + W/A/S/D", + "description": "Move window to specified tile" + }, + { + "key": "Super + Mouse Drag", + "description": "Move window" + }, + { + "key": "Super + CTRL + Mouse Drag", + "description": "Tile window ('ALT' to span)" + }, + { + "key": "Super + P", + "description": "Pin window above all others" + }, + { + "key": "ALT + Tab", + "description": "Switch between applications" + }, + { + "key": "Super + Tab", + "description": "Switch between windows of current app" + } + ] + }, + { + "name": "Desktop Actions", + "shortcuts": [ + { + "key": "Super", + "description": "Enter Overview" + }, + { + "key": "Super * 2", + "description": "Enter App Grid" + }, + { + "key": "Super + 1,2,3...", + "description": "Run app by position in launcher" + }, + { + "key": "Super + ←/→", + "description": "Switch workspaces" + }, + { + "key": "Super + Home/End", + "description": "Switch to first/last workspace" + }, + { + "key": "Super + SHIFT + ←/→", + "description": "Move window between workspaces" + }, + { + "key": "Super + CTRL + ←/→", + "description": "Move window between monitors" + }, + { + "key": "Super + F2", + "description": "Run Dialog" + }, + { + "key": "Super + SHIFT + N", + "description": "Show notification tray" + }, + { + "key": "CTRL + ALT + S", + "description": "Resize window to pre-defined sizes" + }, + { + "key": "CTRL + ALT + Del", + "description": "Open shutdown menu" + }, + { + "key": "Super + L", + "description": "Lock the screen" + }, + { + "key": "Super + X", + "description": "Toggle zoom" + }, + { + "key": "Super + =", + "description": "Zoom in" + }, + { + "key": "Super + -", + "description": "Zoom out" + } + ] + }, + { + "name": "Application Shortcuts", + "shortcuts": [ + { + "key": "Super + ~", + "description": "Open Settings" + }, + { + "key": "Super + F", + "description": "Open Files" + }, + { + "key": "Super + T", + "description": "Open Terminal" + }, + { + "key": "Super + Space", + "description": "Open Dropdown Terminal" + }, + { + "key": "Super + `", + "description": "Open Browser" + }, + { + "key": "Super + V", + "description": "Open Clipboard ('CTRL' for incognito)" + }, + { + "key": "Super + Enter", + "description": "Open Task Manager" + }, + { + "key": "Super + SHIFT + E", + "description": "Open Emoji Picker" + }, + { + "key": "Super + /", + "description": "Show this shortcuts menu" + }, + { + "key": "CTRL + W", + "description": "Close tab in tabbed apps" + }, + { + "key": "CTRL + T", + "description": "Opens new tab in tabbed apps" + }, + { + "key": "CTRL + SHIFT + T", + "description": "Reopen last closed tab in browser" + }, + { + "key": "CTRL + /", + "description": "Code Editor command palette" + }, + { + "key": "F5", + "description": "Document Viewer presentation mode" + }, + { + "key": "F9", + "description": "LibreOffice presentation mode" + } + ] + }, + { + "name": "Screenshots", + "shortcuts": [ + { + "key": "Print", + "description": "Take region screenshot" + }, + { + "key": "SHIFT + Print", + "description": "Take full screenshot" + }, + { + "key": "CTRL + Print", + "description": "Take window screenshot" + }, + { + "key": "ALT + Print", + "description": "Video capture desktop" + } + ] + }, + { + "name": "Overview Actions", + "shortcuts": [ + { + "key": "Tab", + "description": "Focus next window" + }, + { + "key": "Super + Tab", + "description": "Focus next monitor" + }, + { + "key": "Super + ←/→", + "description": "Switch between workspaces" + }, + { + "key": "ALT + Tab", + "description": "Focus dash icons" + }, + { + "key": "PgUp/PgDown or CTRL + Tab", + "description": "Switch between workspaces" + }, + { + "key": "SHIFT + PgUp/PgDown or Scroll", + "description": "Reorder workspaces" + }, + { + "key": "SHIFT + ←/→", + "description": "Move window between workspaces ('CTRL' for new)" + }, + { + "key": "Delete", + "description": "Close window" + }, + { + "key": "SHIFT + CTRL + Delete", + "description": "Close all windows on workspace" + }, + { + "key": "SHIFT + Enter", + "description": "Move window between monitors" + }, + { + "key": "Space or `", + "description": "Show open application windows" + }, + { + "key": "..", + "description": "Show system actions" + } + ] + }, + { + "name": "Navigation Gestures", + "shortcuts": [ + { + "key": "4F ↑ Swipe (←/→)", + "description": "Maximize/fullscreen/restore(/snap) a window" + }, + { + "key": "3F ↑ Swipe", + "description": "Show overview/apps grid" + }, + { + "key": "3F ↓ Swipe", + "description": "Minimize window" + }, + { + "key": "3F ←/→ Swipe", + "description": "Switch workspaces" + }, + { + "key": "4F Hold then Swipe", + "description": "Move window" + }, + { + "key": "3F ↓ Swipe then ←/→", + "description": "Switch to previous/next window" + }, + { + "key": "4F ↓ Swipe", + "description": "Show notification center" + }, + { + "key": "4F Pinch Out", + "description": "Show desktop" + }, + { + "key": "4F Pinch In", + "description": "Mute audio" + }, + { + "key": "2F ←/→ Swipe", + "description": "Switch pages or move backward/forward" + } + ] + } +] diff --git a/files/hyprland/greeter.conf b/files/hyprland/greeter.conf @@ -0,0 +1,20 @@ +exec-once = @greeter; hyprctl dispatch exit + +windowrule = fullscreen on, stay_focused on, match:class ^(.*)$ +monitor = , preferred, auto, 1 + +animations:enabled = false +misc { + background_color = rgb(@base00) + disable_autoreload = true + disable_hyprland_logo = true + disable_splash_rendering = true + disable_hyprland_guiutils_check = true + enable_anr_dialog = false + force_default_wallpaper = 0 +} + +ecosystem { + no_update_news = true + no_donation_nag = true +} diff --git a/files/hyprland/kebihelp.json b/files/hyprland/kebihelp.json @@ -0,0 +1,1640 @@ +{ + "Parameters": { + "cmd_focused_window": "hyprctl activewindow", + "importer": { + "match_line": ".*@@(.+?)@@(.+?)@@(.+?)@@.*", + "position_group": 1, + "position_keybinding": 2, + "position_label": 3 + }, + "keys": { + "tab_previous": "Backtab", + "tab_next": "Tab", + "scroll_down": "Down", + "scroll_up": "Up", + "quit": "Esc" + }, + "layout": { + "n_columns": 3, + "spacing": 3, + "width": 1100, + "height": 900, + "background_color": "#@base00", + "opacity": 0.9, + "tabs": { + "background_color": "#@base02", + "background_color_current": "#@base04", + "color": "#@white", + "font": "@font", + "font_size": 10, + "padding": 1 + }, + "group_name": { + "background_color": "#@accent", + "color": "#@base00", + "bold": true, + "stretched": false, + "padding": "0px 5px 0px 2px", + "font": "@font", + "font_size": 11 + }, + "shortcut": { + "label": { + "color": "#@white", + "bold": false, + "font": "@font", + "font_size": 10 + }, + "value": { + "color": "#@base05", + "bold": true, + "font": "@monospace", + "font_size": 10 + }, + "spacing": 10 + } + } + }, + "Rules": { + "default": "Desktop", + "kitty": "Terminal", + "code": "Code", + "firefox": "Firefox" + }, + "Keybindings": { + "Desktop": { + "_hidden": false, + "Legend": { + "_hidden": false, + "keybindings": [ + { + "value": "SUPER", + "label": "$mod" + }, + { + "value": "L' / R'", + "label": "Left/Right Mouse Click" + } + ] + }, + "Compositor": { + "_hidden": false, + "keybindings": [ + { + "value": "$mod Q or ALT F4", + "label": "Quit application" + }, + { + "value": "$mod SHIFT Q", + "label": "Force Quit application" + }, + { + "value": "ALT A", + "label": "Activate urgent/last window" + }, + { + "value": "$mod E", + "label": "Maximize window" + }, + { + "value": "$mod SHIFT E", + "label": "Fullscreen window" + }, + { + "value": "ALT Q", + "label": "Minimize window" + }, + { + "value": "ALT SHIFT Q", + "label": "Show all minimized windows" + }, + { + "value": "$mod <ARROW>", + "label": "Switch focus to window in desired direction" + }, + { + "value": "$mod SHIFT <ARROW>", + "label": "Swap windows in desired direction" + }, + { + "value": "$mod Space", + "label": "Change window split direction" + }, + { + "value": "$mod SHIFT Space", + "label": "Toggle application grouping" + }, + { + "value": "$mod CTRL <ARROW>", + "label": "Move window into desired group" + }, + { + "value": "$mod ; or :", + "label": "Toggle window float for one/all window(s)" + }, + { + "value": "$mod C", + "label": "Center floating window and/or move cursor to top right corner" + }, + { + "value": "$mod P", + "label": "Pin floating window on all workspaces" + } + ] + }, + "Switcher": { + "_hidden": false, + "keybindings": [ + { + "value": "$mod Tab", + "label": "Application Launcher and Overview" + }, + { + "value": "$mod `", + "label": "Show workspace overview" + }, + { + "value": "ALT [SHIFT] Tab", + "label": "Cycle [backwards] through open windows on current workspace" + }, + { + "value": "ALT [SHIFT] `", + "label": "Cycle [backwards] through grouped windows" + } + ] + }, + "Workspaces": { + "_hidden": false, + "keybindings": [ + { + "value": "$mod <NUM>", + "label": "Create workspace 'NUM' {1 to 9}" + }, + { + "value": "$mod SHIFT <NUM>", + "label": "Move window to workspace 'NUM' {1 to 9}" + }, + { + "value": "$mod , or . (3F Swipe Left/Right)", + "label": "Move across non-empty workspaces" + }, + { + "value": "$mod CTRL , or .", + "label": "Move across workspaces" + }, + { + "value": "$mod 0", + "label": "Toggle special workspace to stash windows" + }, + { + "value": "$mod SHIFT 0", + "label": "Move window to/from stash" + }, + { + "value": "$mod SHIFT , or .", + "label": "Move window to previous/next workspace" + }, + { + "value": "$mod ALT , or .", + "label": "Move focus to left/right monitor" + }, + { + "value": "$mod SHIFT ALT , or .", + "label": "Move window to left/right monitor" + } + ] + }, + "Utility": { + "_hidden": false, + "keybindings": [ + { + "value": "Print", + "label": "Take Screenshot of area" + }, + { + "value": "CTRL Print", + "label": "Take Screenshot of window" + }, + { + "value": "SHIFT Print", + "label": "Take Screenshot of screen" + }, + { + "value": "$mod = or -", + "label": "Zoom in/out" + }, + { + "value": "$mod SHIFT -", + "label": "Zoom out fully" + }, + { + "value": "$mod L or Esc", + "label": "Lock screen / System Logoff" + }, + { + "value": "$mod S", + "label": "Toggle Compositor Shader" + }, + { + "value": "$mod SHIFT S", + "label": "Toggle window swallowing" + }, + { + "value": "$mod SHIFT D", + "label": "Toggle main Display" + } + ] + }, + "Applications": { + "_hidden": false, + "keybindings": [ + { + "value": "$mod /", + "label": "Show this page" + }, + { + "value": "$mod A", + "label": "Application Drawer" + }, + { + "value": "$mod SHIFT A", + "label": "Toggle top Panel" + }, + { + "value": "$mod SHIFT C", + "label": "Color Picker" + }, + { + "value": "$mod D", + "label": "Monitor Configuration" + }, + { + "value": "$mod F", + "label": "File Manager" + }, + { + "value": "$mod T", + "label": "Terminal" + }, + { + "value": "$mod SHIFT T", + "label": "Toggle Terminal in Quake mode" + }, + { + "value": "$mod V", + "label": "Toggle Clipboard" + }, + { + "value": "$mod W", + "label": "Web Browser" + }, + { + "value": "$mod Enter", + "label": "Task Manager" + }, + { + "value": "$mod +", + "label": "Calculator" + }, + { + "value": "$mod SHIFT B", + "label": "Bluetooth Settings" + }, + { + "value": "$mod SHIFT P", + "label": "Volume Control" + }, + { + "value": "$mod SHIFT N", + "label": "Network Settings" + }, + { + "value": "$mod N", + "label": "Show notification panel" + }, + { + "value": "$mod SHIFT Esc", + "label": "Inhibit all keybindings" + } + ] + }, + "Mouse": { + "_hidden": false, + "keybindings": [ + { + "value": "$mod L'", + "label": "Move window" + }, + { + "value": "$mod R'", + "label": "Window resize" + }, + { + "value": "$mod Scroll", + "label": "Move across workspaces" + }, + { + "value": "", + "label": "" + }, + { + "value": "R' (in overview)", + "label": "Move windows across workspaces" + }, + { + "value": "L' (in overview)", + "label": "Switch workspaces" + } + ] + }, + "Submap": { + "_hidden": false, + "keybindings": [ + { + "value": "esc", + "label": "Exit Submap" + }, + { + "value": "", + "label": "" + }, + { + "value": "$mod R", + "label": "Resize Submap" + }, + { + "value": "<ARROW> or L' (Mouse Drag)", + "label": "Resize window" + }, + { + "value": "", + "label": "" + }, + { + "value": "$mod M", + "label": "Move Submap" + }, + { + "value": "L' (Mouse Drag)", + "label": "Move window" + }, + { + "value": "<ARROW>", + "label": "Move window (into group)" + }, + { + "value": "SHIFT <ARROW>", + "label": "Move floating window" + }, + { + "value": ", or .", + "label": "Move window across workspaces" + }, + { + "value": "C", + "label": "Center floating window" + }, + { + "value": "P", + "label": "Pin floating window" + }, + { + "value": "", + "label": "" + }, + { + "value": "ALT SHIFT Q", + "label": "Minimized Submap" + }, + { + "value": "Return or L'", + "label": "Unminimize selected window" + }, + { + "value": "<ARROW>", + "label": "Focus window in desired direction" + }, + { + "value": "Q", + "label": "Close selected window" + } + ] + } + }, + "Code": { + "_hidden": false, + "General": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL /", + "label": "Show Command Palette" + }, + { + "value": "CTRL P", + "label": "Quick Open, Go to File..." + }, + { + "value": "CTRL SHIFT N", + "label": "New window/instance" + }, + { + "value": "CTRL SHIFT W", + "label": "Close window/instance" + }, + { + "value": "CTRL ,", + "label": "User Settings" + }, + { + "value": "CTRL K + CTRL S", + "label": "Keyboard Shortcuts" + } + ] + }, + "Editing": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL X", + "label": "Cut line (empty selection)" + }, + { + "value": "CTRL C", + "label": "Copy line (empty selection)" + }, + { + "value": "ALT Up / Down", + "label": "Move line up/down" + }, + { + "value": "SHIFT ALT Up / Down", + "label": "Copy line up/down" + }, + { + "value": "CTRL D", + "label": "Delete line" + }, + { + "value": "CTRL Return", + "label": "Insert line below" + }, + { + "value": "CTRL SHIFT Return", + "label": "Insert line above" + }, + { + "value": "CTRL SHIFT \\", + "label": "Jump to matching bracket" + }, + { + "value": "CTRL ] / [", + "label": "Indent/outdent line" + }, + { + "value": "Home / End", + "label": "Go to beginning/end of line" + }, + { + "value": "CTRL Home", + "label": "Go to beginning of file" + }, + { + "value": "CTRL End", + "label": "Go to end of file" + }, + { + "value": "CTRL Up / Down", + "label": "Scroll line up/down" + }, + { + "value": "ALT PgUp / PgDown", + "label": "Scroll page up/down" + }, + { + "value": "CTRL SHIFT [", + "label": "Fold (collapse) region" + }, + { + "value": "CTRL SHIFT ]", + "label": "Unfold (uncollapse) region" + }, + { + "value": "CTRL K + CTRL [", + "label": "Fold (collapse) all subregions" + }, + { + "value": "CTRL K + CTRL ]", + "label": "Unfold (uncollapse) all subregions" + }, + { + "value": "CTRL K + CTRL 0", + "label": "Fold (collapse) all regions" + }, + { + "value": "CTRL K + CTRL J", + "label": "Unfold (uncollapse) all regions" + }, + { + "value": "CTRL K + CTRL C", + "label": "Add line comment" + }, + { + "value": "CTRL K + CTRL U", + "label": "Remove line comment" + }, + { + "value": "SHIFT ALT A", + "label": "Toggle block comment" + }, + { + "value": "ALT Z", + "label": "Toggle word wrap" + } + ] + }, + "Navigation": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL T", + "label": "Show all Symbols" + }, + { + "value": "CTRL G", + "label": "Go to Line..." + }, + { + "value": "CTRL P", + "label": "Go to File..." + }, + { + "value": "CTRL SHIFT O", + "label": "Go to Symbol..." + }, + { + "value": "CTRL SHIFT M", + "label": "Show Problems panel" + }, + { + "value": "F8", + "label": "Go to next error or warning" + }, + { + "value": "SHIFT F8", + "label": "Go to previous error or warning" + }, + { + "value": "CTRL SHIFT TAB", + "label": "Navigate editor group history" + }, + { + "value": "ALT Left / Right", + "label": "Go back/forward" + }, + { + "value": "CTRL M", + "label": "Toggle Tab moves focus" + } + ] + }, + "Search": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL F", + "label": "Find" + }, + { + "value": "CTRL H", + "label": "Replace" + }, + { + "value": "F3", + "label": "Find next" + }, + { + "value": "SHIFT F3", + "label": "Find previous" + }, + { + "value": "ALT Return", + "label": "Select all occurences of Find match" + }, + { + "value": "CTRL K + CTRL D", + "label": "Move last selection to next Find match" + }, + { + "value": "ALT C / R / W", + "label": "Toggle case-sensitive/regex/whole word" + } + ] + }, + "Selection": { + "_hidden": false, + "keybindings": [ + { + "value": "ALT Click", + "label": "Insert cursor" + }, + { + "value": "CTRL ALT Up / Down", + "label": "Insert cursor above/below" + }, + { + "value": "CTRL U", + "label": "Undo last cursor operation" + }, + { + "value": "SHIFT ALT I", + "label": "Insert cursor at end of each line selected" + }, + { + "value": "CTRL I", + "label": "Select current line" + }, + { + "value": "CTRL SHIFT L", + "label": "Select all occurrences of current selection" + }, + { + "value": "CTRL F2", + "label": "Select all occurrences of current word" + }, + { + "value": "SHIFT ALT Right", + "label": "Expand selection" + }, + { + "value": "SHIFT ALT Left", + "label": "Shrink selection" + }, + { + "value": "SHIFT ALT (Mouse Drag) or <ARROW>", + "label": "Column (box) selection" + } + ] + }, + "Editor": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL F4", + "label": "Close editor" + }, + { + "value": "CTRL W", + "label": "Close editor" + }, + { + "value": "CTRL K + F", + "label": "Close folder" + }, + { + "value": "CTRL \\", + "label": "Split editor" + }, + { + "value": "CTRL 1 / 2 / 3", + "label": "Focus into 1st, 2nd, or 3rd editor group" + }, + { + "value": "CTRL K + CTRL Left / Right", + "label": "Focus into previous/next editor group" + }, + { + "value": "CTRL SHIFT PgUp / PgDown", + "label": "Move editor left/right" + }, + { + "value": "CTRL K + Left / Right", + "label": "Move active editor group" + } + ] + }, + "File": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL N", + "label": "New File" + }, + { + "value": "CTRL O", + "label": "Open File..." + }, + { + "value": "CTRL S", + "label": "Save" + }, + { + "value": "CTRL SHIFT S", + "label": "Save As..." + }, + { + "value": "CTRL K + S", + "label": "Save All" + }, + { + "value": "CTRL F4", + "label": "Close" + }, + { + "value": "CTRL K + CTRL W", + "label": "Close All" + }, + { + "value": "CTRL SHIFT T", + "label": "Reopen closed editor" + }, + { + "value": "CTRL K + Return", + "label": "Keep preview mode editor open" + }, + { + "value": "CTRL TAB", + "label": "Open next" + }, + { + "value": "CTRL SHIFT TAB", + "label": "Open previous" + }, + { + "value": "CTRL K + P", + "label": "Copy path of active file" + }, + { + "value": "CTRL K + R", + "label": "Reveal active file in Explorer" + }, + { + "value": "CTRL K + O", + "label": "Show active file in new window/instance" + } + ] + }, + "Display": { + "_hidden": false, + "keybindings": [ + { + "value": "F11", + "label": "Toggle full screen" + }, + { + "value": "SHIFT ALT 0", + "label": "Toggle editor layout" + }, + { + "value": "CTRL =/-", + "label": "Zoom in/out" + }, + { + "value": "CTRL B", + "label": "Toggle Sidebar visibility" + }, + { + "value": "CTRL SHIFT E", + "label": "Show Explorer/Toggle focus" + }, + { + "value": "CTRL SHIFT F", + "label": "Show Search" + }, + { + "value": "CTRL SHIFT G", + "label": "Show Source Control" + }, + { + "value": "CTRL SHIFT D", + "label": "Show Debug" + }, + { + "value": "CTRL SHIFT X", + "label": "Show Extensions" + }, + { + "value": "CTRL SHIFT H", + "label": "Replace in files" + }, + { + "value": "CTRL SHIFT J", + "label": "Toggle Search details" + }, + { + "value": "CTRL SHIFT U", + "label": "Show Output panel" + }, + { + "value": "CTRL SHIFT V", + "label": "Open Markdown preview" + }, + { + "value": "CTRL K + V", + "label": "Open Markdown preview to the side" + }, + { + "value": "CTRL K + Z", + "label": "Zen Mode (Esc to exit)" + } + ] + }, + "Debug": { + "_hidden": false, + "keybindings": [ + { + "value": "F9", + "label": "Toggle breakpoint" + }, + { + "value": "F5", + "label": "Start/Continue" + }, + { + "value": "SHIFT F5", + "label": "Stop" + }, + { + "value": "F11", + "label": "Step into" + }, + { + "value": "SHIFT F11", + "label": "Step out" + }, + { + "value": "F10", + "label": "Step over" + }, + { + "value": "CTRL K + CTRL I", + "label": "Show hover" + } + ] + }, + "Terminal": { + "_hidden": false, + "keybindings": [ + { + "value": "ALT T", + "label": "Show terminal" + }, + { + "value": "CTRL C", + "label": "Copy selection" + }, + { + "value": "CTRL V", + "label": "Paste into active terminal" + }, + { + "value": "CTRL Up / Down", + "label": "Scroll up/down" + }, + { + "value": "SHIFT PgUp / PgDown", + "label": "Scroll page up/down" + }, + { + "value": "CTRL Home / End", + "label": "Scroll to top/bottom" + } + ] + } + }, + "Terminal": { + "_hidden": false, + "Legend": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL SHIFT", + "label": "$mod" + } + ] + }, + "Scrolling": { + "_hidden": false, + "keybindings": [ + { + "value": "$mod Up", + "label": "Scroll line up" + }, + { + "value": "$mod Down", + "label": "Scroll line down" + }, + { + "value": "$mod PgUp", + "label": "Scroll page up" + }, + { + "value": "$mod PgDown", + "label": "Scroll page down" + }, + { + "value": "$mod Home", + "label": "Scroll to beginning" + }, + { + "value": "$mod End", + "label": "Scroll to end" + }, + { + "value": "$mod Z", + "label": "Scroll to prompt -1" + }, + { + "value": "$mod X", + "label": "Scroll to prompt 1" + }, + { + "value": "$mod H", + "label": "Show scrollback" + }, + { + "value": "$mod G", + "label": "Show last command output" + } + ] + }, + "Tabs": { + "_hidden": false, + "keybindings": [ + { + "value": "$mod Right", + "label": "Next tab" + }, + { + "value": "CTRL TAB", + "label": "Next tab" + }, + { + "value": "$mod Left", + "label": "Previous tab" + }, + { + "value": "CTRL SHIFT TAB", + "label": "Previous tab" + }, + { + "value": "$mod T", + "label": "New tab" + }, + { + "value": "$mod Q", + "label": "Close tab" + }, + { + "value": "$mod .", + "label": "Move tab forward" + }, + { + "value": "$mod ,", + "label": "Move tab backward" + }, + { + "value": "$mod ALT T", + "label": "Set tab title" + } + ] + }, + "Window": { + "_hidden": false, + "keybindings": [ + { + "value": "$mod Return", + "label": "New window" + }, + { + "value": "$mod N", + "label": "New OS window" + }, + { + "value": "$mod W", + "label": "Close window" + }, + { + "value": "$mod ]", + "label": "Next window" + }, + { + "value": "$mod [", + "label": "Previous window" + }, + { + "value": "$mod B", + "label": "Move window backward" + }, + { + "value": "$mod `", + "label": "Move window to top" + }, + { + "value": "$mod R", + "label": "Resize window" + }, + { + "value": "$mod <N>", + "label": "'N'th window" + }, + { + "value": "$mod F7", + "label": "Focus visible window" + }, + { + "value": "$mod F8", + "label": "Swap with window" + }, + { + "value": "$mod L", + "label": "Next layout" + } + ] + }, + "Actions": { + "_hidden": false, + "keybindings": [ + { + "value": "$mod F", + "label": "Find occurrences of entered text" + }, + { + "value": "$mod C", + "label": "Copy to clipboard" + }, + { + "value": "$mod V", + "label": "Paste from clipboard" + }, + { + "value": "$mod S or SHIFT Insert", + "label": "Paste from selection" + }, + { + "value": "CTRL C", + "label": "Copy or Interrupt" + }, + { + "value": "$mod O", + "label": "Pass selection to program" + }, + { + "value": "$mod U", + "label": "Unicode input" + }, + { + "value": "$mod = / + / -", + "label": "Change font size" + }, + { + "value": "$mod E", + "label": "Open URL with hints" + } + ] + }, + "Debug": { + "_hidden": false, + "keybindings": [ + { + "value": "$mod F1", + "label": "Show help" + }, + { + "value": "$mod F2", + "label": "Edit config file" + }, + { + "value": "$mod Esc", + "label": "Shell window" + }, + { + "value": "$mod Del", + "label": "Clear terminal reset active" + }, + { + "value": "$mod F5", + "label": "Load config file" + }, + { + "value": "$mod F6", + "label": "Debug config" + } + ] + } + }, + "Firefox": { + "_hidden": false, + "Navigation": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + Left", + "label": "Back" + }, + { + "value": "CTRL + Right", + "label": "Forward" + }, + { + "value": "ALT + Home", + "label": "Home" + }, + { + "value": "CTRL + O", + "label": "Open File" + }, + { + "value": "CTRL + R", + "label": "Reload" + }, + { + "value": "CTRL + SHIFT + R", + "label": "Reload (override cache)" + }, + { + "value": "CTRL + .", + "label": "Stop" + } + ] + }, + "Current Page": { + "_hidden": false, + "keybindings": [ + { + "value": "Tab", + "label": "Focus Next Link or Input Field" + }, + { + "value": "SHIFT + Tab", + "label": "Focus Previous Link or Input Field" + }, + { + "value": "Space", + "label": "Go Down a Screen" + }, + { + "value": "SHIFT + Space", + "label": "Go Up a Screen" + }, + { + "value": "CTRL + Down", + "label": "Go to Bottom of Page" + }, + { + "value": "CTRL + Up", + "label": "Go to Top of Page" + }, + { + "value": "F6", + "label": "Move to Next Frame" + }, + { + "value": "SHIFT + F6", + "label": "Move to Previous Frame" + }, + { + "value": "CTRL + P", + "label": "Print" + }, + { + "value": "CTRL + S", + "label": "Save Page As" + }, + { + "value": "CTRL + +", + "label": "Zoom In" + }, + { + "value": "CTRL + -", + "label": "Zoom Out" + }, + { + "value": "CTRL + 0", + "label": "Zoom Reset" + } + ] + }, + "Editing": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + C", + "label": "Copy" + }, + { + "value": "CTRL + X", + "label": "Cut" + }, + { + "value": "Backspace", + "label": "Delete" + }, + { + "value": "Home", + "label": "Go to Beginning of Line" + }, + { + "value": "End", + "label": "Go to End of Line" + }, + { + "value": "CTRL + V", + "label": "Paste" + }, + { + "value": "CTRL + SHIFT + V", + "label": "Paste (as plain text)" + }, + { + "value": "CTRL + SHIFT + Z", + "label": "Redo" + }, + { + "value": "CTRL + A", + "label": "Select All" + }, + { + "value": "CTRL + Z", + "label": "Undo" + } + ] + }, + "Search": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + F", + "label": "Find" + }, + { + "value": "CTRL + G", + "label": "Find Again" + }, + { + "value": "CTRL + SHIFT + G", + "label": "Find Previous" + }, + { + "value": "'", + "label": "Quick Find within link-text only" + }, + { + "value": "/", + "label": "Quick Find" + }, + { + "value": "Esc", + "label": "Close the Find or Quick Find bar" + }, + { + "value": "CTRL + K", + "label": "Focus Search bar" + }, + { + "value": "CTRL + Up / Down", + "label": "Change the Default Search Engine" + }, + { + "value": "ALT + Up / Down", + "label": "View menu to switch, add, or manage search engines" + }, + { + "value": "CTRL + W", + "label": "Close Tab" + }, + { + "value": "CTRL + SHIFT + W", + "label": "Close Window" + }, + { + "value": "CTRL + Tab", + "label": "Cycle through Tabs in Recently Used Order" + }, + { + "value": "CTRL + Q", + "label": "Quit" + }, + { + "value": "CTRL + ALT + Left", + "label": "Go one Tab to the Left" + }, + { + "value": "CTRL + ALT + Right", + "label": "Go one Tab to the Right" + }, + { + "value": "CTRL + SHIFT + PgUp", + "label": "Move Tab Left" + }, + { + "value": "CTRL + SHIFT + PgDown", + "label": "Move Tab Right" + }, + { + "value": "CTRL + SHIFT + Home", + "label": "Move Tab in focus to start" + }, + { + "value": "CTRL + SHIFT + End", + "label": "Move Tab in focus to end" + }, + { + "value": "CTRL + M", + "label": "Mute/Unmute Audio" + }, + { + "value": "CTRL + T", + "label": "New Tab" + }, + { + "value": "CTRL + N", + "label": "New Window" + }, + { + "value": "CTRL + SHIFT + P", + "label": "New Private Window" + }, + { + "value": "ALT + Enter", + "label": "Open Address in New Foreground Tab" + }, + { + "value": "Enter", + "label": "Open Focused Bookmark or Link in Current Tab" + }, + { + "value": "CTRL + Enter", + "label": "Open Focused Link in New Background Tab" + }, + { + "value": "CTRL + SHIFT + Enter", + "label": "Open Focused Bookmark in New Background Tab" + }, + { + "value": "SHIFT + Enter", + "label": "Open Focused Bookmark or Link in New Window" + }, + { + "value": "CTRL + SHIFT + T", + "label": "Undo Close Tab" + }, + { + "value": "CTRL + SHIFT + N", + "label": "Undo Close Window" + }, + { + "value": "CTRL + 1-8", + "label": "Select Tab 1-8" + }, + { + "value": "CTRL + 9", + "label": "Select Last Tab" + }, + { + "value": "CTRL + SHIFT + X", + "label": "Moves the URL left or right" + } + ] + }, + "History": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + SHIFT + H", + "label": "History sidebar" + }, + { + "value": "CTRL + SHIFT + Delete", + "label": "Clear Recent History" + } + ] + }, + "Bookmarks": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + SHIFT + D", + "label": "Bookmark All Tabs" + }, + { + "value": "CTRL + D", + "label": "Bookmark This Page" + }, + { + "value": "CTRL + B", + "label": "Bookmarks sidebar" + }, + { + "value": "CTRL + SHIFT + S", + "label": "Library window (Bookmarks)" + }, + { + "value": "(search field in Library) + Space", + "label": "Search for all Bookmarks" + } + ] + }, + "Tools": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + J", + "label": "Downloads" + }, + { + "value": "CTRL + SHIFT + A", + "label": "Add-ons" + }, + { + "value": "CTRL + ALT + I", + "label": "Toggle Developer Tools" + }, + { + "value": "CTRL + ALT + K", + "label": "Web Console" + }, + { + "value": "CTRL + ALT + C", + "label": "Inspector" + }, + { + "value": "CTRL + ALT + S", + "label": "Debugger" + }, + { + "value": "SHIFT + F7", + "label": "Style Editor" + }, + { + "value": "SHIFT + F5", + "label": "Profiler" + }, + { + "value": "CTRL + ALT + E", + "label": "Network" + }, + { + "value": "SHIFT + F2", + "label": "Developer Toolbar" + }, + { + "value": "CTRL + ALT + M", + "label": "Responsive Design View" + }, + { + "value": "SHIFT + F4", + "label": "Scratchpad" + }, + { + "value": "CTRL + U", + "label": "Page Source" + }, + { + "value": "CTRL + SHIFT + J", + "label": "Browser Console" + }, + { + "value": "CTRL + I", + "label": "Page Info" + } + ] + }, + "PDF Viewer": { + "_hidden": false, + "keybindings": [ + { + "value": "N / J / Right", + "label": "Next page" + }, + { + "value": "P / K / Left", + "label": "Previous page" + }, + { + "value": "CTRL + +", + "label": "Zoom in" + }, + { + "value": "CTRL + -", + "label": "Zoom out" + }, + { + "value": "CTRL + 0", + "label": "Automatic Zoom" + }, + { + "value": "R", + "label": "Rotate the document clockwise" + }, + { + "value": "CTRL + R", + "label": "Rotate counterclockwise" + }, + { + "value": "CTRL + ALT + P", + "label": "Switch to Presentation Mode" + }, + { + "value": "S", + "label": "Choose Text Selection Tool" + }, + { + "value": "H", + "label": "Choose Hand Tool" + }, + { + "value": "CTRL + ALT + G", + "label": "Focus the Page Number input box" + } + ] + }, + "Miscellaneous": { + "_hidden": false, + "keybindings": [ + { + "value": "CTRL + Enter", + "label": "Complete .com address" + }, + { + "value": "SHIFT + Enter", + "label": "Complete .net address" + }, + { + "value": "CTRL + SHIFT + Enter", + "label": "Complete .org address" + }, + { + "value": "SHIFT + Delete", + "label": "Delete Selected Autocomplete Entry" + }, + { + "value": "CTRL + SHIFT + F", + "label": "Toggle Full Screen" + }, + { + "value": "CTRL + ALT + R", + "label": "Toggle Reader Mode" + }, + { + "value": "F7", + "label": "Caret Browsing" + }, + { + "value": "CTRL + L", + "label": "Select Location Bar" + } + ] + }, + "Media": { + "_hidden": false, + "keybindings": [ + { + "value": "Space", + "label": "Toggle Play/Pause" + }, + { + "value": "Down", + "label": "Decrease volume" + }, + { + "value": "Up", + "label": "Increase volume" + }, + { + "value": "CTRL + Down", + "label": "Mute audio" + }, + { + "value": "CTRL + Up", + "label": "Unmute audio" + }, + { + "value": "Left", + "label": "Seek back 15 seconds" + }, + { + "value": "CTRL + Left", + "label": "Seek back 10%" + }, + { + "value": "Right", + "label": "Seek forward 15 seconds" + }, + { + "value": "CTRL + Right", + "label": "Seek forward 10%" + }, + { + "value": "Home", + "label": "Seek to the beginning" + }, + { + "value": "End", + "label": "Seek to the end" + } + ] + } + } + } +} diff --git a/files/hyprland/pypr.toml b/files/hyprland/pypr.toml @@ -0,0 +1,40 @@ +[pyprland] +plugins = [ + "magnify", + "scratchpads", + "toggle_special" +] + +[scratchpads.top] +animation = "fromTop" +lazy = true +size = "75% 60%" + +[scratchpads.bottom] +animation = "fromBottom" +size = "75% 60%" +margin = 30 +lazy = true + +[scratchpads.calc] +command = "qalculate-gtk" +class = "qalculate-gtk" +use = "top" +unfocus = "hide" + +[scratchpads.term] +command = "kitty --class kitty-dropterm" +class = "kitty-dropterm" +use = "top" +unfocus = "hide" + +[scratchpads.clip] +use = "bottom" +command = "kitty --class kitty-clip 'clipse'" +class = "kitty-clip" + +[scratchpads.emoji] +use = "bottom" +command = "smile" +class = "it.mijorus.smile" +unfocus = "hide" diff --git a/files/hyprland/shaders/dim.frag b/files/hyprland/shaders/dim.frag @@ -0,0 +1,14 @@ +// Screen Dimming + +#version 300 es +precision highp float; + +in vec2 v_texcoord; +uniform sampler2D tex; + +out vec4 fragColor; + +void main() +{ + fragColor = texture(tex, v_texcoord) * 0.3; +} diff --git a/files/hyprland/shaders/invert.frag b/files/hyprland/shaders/invert.frag @@ -0,0 +1,15 @@ +// Invert Colors + +#version 300 es +precision highp float; + +in vec2 v_texcoord; +uniform sampler2D tex; + +out vec4 fragColor; + +void main() +{ + vec4 pixColor = texture(tex, v_texcoord); + fragColor = vec4(1.0 - pixColor.r, 1.0 - pixColor.g, 1.0 - pixColor.b, pixColor.a); +} diff --git a/files/hyprland/shaders/monochrome.frag b/files/hyprland/shaders/monochrome.frag @@ -0,0 +1,21 @@ +// Monochrome filter + +#version 300 es +precision mediump float; + +in vec2 v_texcoord; +uniform sampler2D tex; + +out vec4 fragColor; + +void main() +{ + vec4 pixColor = texture(tex, v_texcoord); + + // Check https://en.wikipedia.org/wiki/Grayscale#Luma_coding_in_video_systems for which one to choose + float lum = dot(pixColor.rgb, vec3(0.299, 0.587, 0.114)); // BT.601 + // float lum = dot(pixColor.rgb, vec3(0.2126, 0.7152, 0.0722)); // BT.709 + // float lum = dot(pixColor.rgb, vec3(0.2627, 0.6780, 0.0593)); // BT.2100 + + fragColor = vec4(vec3(lum), pixColor.a); +} diff --git a/files/hyprland/theme/drawer.css b/files/hyprland/theme/drawer.css @@ -0,0 +1,26 @@ +/* nwg-drawer Styling */ + +window { + background-color: transparent; +} + +button, +image { + background: none; + border: none; +} + +button:hover { + background-color: rgba (255, 255, 255, 0.1); +} + +#pinned-box { + padding-bottom: 5px; + border-bottom: 1px dotted gray; +} + +#files-box { + padding: 5px; + border: 1px dotted gray; + border-radius: 10px; +} diff --git a/files/hyprland/theme/hyprshell.css b/files/hyprland/theme/hyprshell.css @@ -0,0 +1,49 @@ +:root { + --text-color: #@white; + --bg-color: alpha(#@base00, 0.5); + --bg-window-color: alpha(#@base00, 0.7); + --bg-color-active: rgba(255, 255, 255, 0.2); + --bg-color-hover: rgba(255, 255, 255, 0.4); + --border-radius: 10px; + --border-size: 2px; + --border-color: #@base04; + --border-color-active: #@base05; + --border-style: solid; + --border-style-secondary: dashed; + --window-padding: 2px; +} + +.workspace.active { + border-color: var(--border-color-active); +} + +.workspace.special { + box-shadow: inset 0 0 9px #@base0D; +} + +.client.active { + background: var(--bg-color-active); + border-color: var(--border-color-active); +} + +.launch { + animation: pulse 0.7s normal infinite; +} + +@keyframes pulse { + 0% { + background: var(--bg-color); + } + 5% { + background: alpha(var(--border-color-active), 0.4); + } + 15% { + background: alpha(var(--border-color-active), 0.6); + } + 60% { + background: alpha(var(--border-color-active), 0.9); + } + 100% { + background: var(--bg-color); + } +} diff --git a/files/hyprland/theme/waybar.css b/files/hyprland/theme/waybar.css @@ -0,0 +1,226 @@ +* { + font-size: 16px; + font-weight: 500; + border-radius: 10px; + min-height: 0; +} +window#waybar { + background-color: alpha(@base00, 0.3); + border: 2px solid @base00; +} +tooltip { + background: alpha(@base00, 0.9); + color: @base05; + border: 1px solid @base0D; +} + +#custom-logo { + color: #ffffff; +} + +#user { + background-color: @base0F; + color: @base00; +} +#user > image { + padding-right: 5px; +} +#users .drawer box { + margin-left: 2px; +} +#custom-power { + color: @base08; +} + +#workspaces button { + color: @base00; + background-color: @base07; + border: 2px solid @base00; + padding: 4px 6px; +} +#workspaces button.active { + background-color: @base05; +} +#workspaces button.empty { + color: @base07; + background-color: transparent; +} +#workspaces button.empty .workspace-label { + padding-left: 4px; +} +#workspaces button.hosting-monitor.visible { + border: 2px solid @base04; +} +#workspaces button.special { + opacity: 0.8; + padding-right: 8px; + margin-left: 5px; +} +#workspaces .taskbar-window { + padding-left: 4px; +} + +#custom-dropdown { + color: #ffffff; +} + +#window { + color: @base0C; + background-color: transparent; +} + +#submap { + color: @base00; + background-color: @base08; +} + +#tray { + color: #ffffff; + margin: 0; + padding: 0; +} +#tray * { + margin-left: 8px; +} +#keyboard-state { + color: @base05; + opacity: 0.8; + border: 2px solid @base04; +} + +#bluetooth { + color: #ffffff; + background-color: transparent; +} +#bluetooth.disabled { + background-color: transparent; +} + +#network { + background-color: @base0B; + color: @base00; +} +#network.disconnected { + background-color: @base06; +} + +#wireplumber { + background-color: @base09; + color: @base00; +} +#wireplumber.muted { + background-color: @base06; +} +#mpris { + color: @base05; +} + +#backlight { + background-color: @base0E; + color: @base00; +} +#custom-temperature { + color: @base07; +} + +#battery { + background-color: @base0A; + color: @base00; +} +@keyframes blink { + to { + background-color: #ffffff; + } +} +#battery.critical:not(.charging) { + background-color: @base08; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} +#power-profiles-daemon.performance { + color: @base08; +} +#power-profiles-daemon.balanced { + color: @base0A; +} +#power-profiles-daemon.power-saver { + color: @base0B; +} + +#custom-weather { + color: @base00; + background-color: @base05; +} + +#clock { + background-color: @base0D; + color: @base00; +} + +#custom-notify { + color: @base0A; +} + +#idle_inhibitor { + color: @base09; + background-color: transparent; +} + +/* Area */ +#backlight, +#battery, +#bluetooth, +#clock, +#custom-dropdown, +#custom-logo, +#custom-notify, +#custom-minimized, +#custom-power, +#custom-temperature, +#custom-weather, +#idle_inhibitor, +#keyboard-state, +#network, +#power-profiles-daemon, +#window, +#wireplumber { + padding: 0 5px; + margin: 4px 2px; +} + +#workspaces { + margin: 3px 1px; +} +#user, +#submap { + padding: 0 5px; + margin: 5px 2px; +} + +#taskbar { + margin: 4px 2px; +} + +#mpris { + padding: 0; + margin: 0; +} +#mpris.playing { + margin-left: 2px; + margin-right: 6px; +} +#mpris.paused { + margin-left: 2px; + margin-right: 6px; +} + +#custom-power { + margin-right: 0; +} + +#power-profiles-daemon { + margin-right: 5px; +} diff --git a/files/hyprland/waycorner.toml b/files/hyprland/waycorner.toml @@ -0,0 +1,11 @@ +[overview] +command = [ "hyprctl", "dispatch", "hyprexpo:expo", "on" ] +locations = [ "top_left" ] +size = 10 +timeout_ms = 200 + +[workspace] +command = [ "hyprctl", "dispatch", "split:workspace", "empty" ] +locations = [ "top_right" ] +size = 10 +timeout_ms = 200 diff --git a/.misc/banner-dark.png b/files/images/banner-dark.png Binary files differ. diff --git a/.misc/banner-light.png b/files/images/banner-light.png Binary files differ. diff --git a/nixos/files/images/desktop/gnome.jpg b/files/images/desktop/gnome.jpg Binary files differ. diff --git a/nixos/files/images/desktop/hyprland.jpg b/files/images/desktop/hyprland.jpg Binary files differ. diff --git a/nixos/files/images/desktop/old/gnome_41.jpg b/files/images/desktop/old/gnome_41.jpg Binary files differ. diff --git a/nixos/files/images/desktop/old/gnome_44.jpg b/files/images/desktop/old/gnome_44.jpg Binary files differ. diff --git a/nixos/files/images/desktop/old/gnome_45.jpg b/files/images/desktop/old/gnome_45.jpg Binary files differ. diff --git a/nixos/files/images/desktop/pantheon.jpg b/files/images/desktop/pantheon.jpg Binary files differ. diff --git a/.misc/desktop.png b/files/images/desktop/windows.png Binary files differ. diff --git a/nixos/files/images/desktop/xfce.jpg b/files/images/desktop/xfce.jpg Binary files differ. diff --git a/nixos/files/images/transparent.png b/files/images/transparent.png Binary files differ. diff --git a/.misc/website.png b/files/images/website.png Binary files differ. diff --git a/files/logseq/preferences.json b/files/logseq/preferences.json @@ -0,0 +1,22 @@ +{ + "theme": null, + "themes": { + "mode": "dark", + "light": null, + "dark": { + "name": "Default Dark Theme", + "url": null, + "description": "Logseq default dark theme.", + "mode": "dark", + "selected": true, + "group-first": true, + "group-desc": "dark themes" + } + }, + "externals": [], + "pinnedToolbarItems": [ + "logseq-git:git", + "logseq-tocgen:open-toc", + "logseq-journals-calendar:open-calendar" + ] +} diff --git a/files/logseq/settings/logseq-awesome-ui.json b/files/logseq/settings/logseq-awesome-ui.json @@ -0,0 +1,23 @@ +{ + "disabled": false, + "alwaysShowNewBlockBullet": true, + "compactSidebarMenu": true, + "contentHeading": null, + "headerHeading": null, + "headerVariant": "Wide", + "hideAddNewPage": false, + "hideHomeButton": true, + "hideRightSidebarToolbar": false, + "hideSidebarPageIcons": false, + "killAnimations": false, + "leftSidebarHeading": null, + "menuCalendar": true, + "navigationPosition": "Left", + "otherHeading": null, + "rightSidebarHeading": null, + "searchStyle": "Wide", + "tabsHeading": null, + "tabsPosition": "TopPanel", + "tabsStyle": "Awesome", + "vaultButtonToBottom": true +} diff --git a/files/logseq/settings/logseq-bullet-threading.json b/files/logseq/settings/logseq-bullet-threading.json @@ -0,0 +1,6 @@ +{ + "disabled": false, + "color": "", + "customColor": false, + "width": "2px" +} diff --git a/files/logseq/settings/logseq-git.json b/files/logseq/settings/logseq-git.json @@ -0,0 +1,9 @@ +{ + "disabled": false, + "autoCheckSynced": true, + "autoPush": false, + "checkWhenDBChanged": true, + "customCommitMessage": "feat: Notes", + "typeCommitMessage": "Custom Message With Date", + "buttons": ["Check Status", "Show Log", "Pull Rebase", "Commit & Push"] +} diff --git a/files/logseq/settings/logseq-journals-calendar.json b/files/logseq/settings/logseq-journals-calendar.json @@ -0,0 +1,10 @@ +{ + "disabled": false, + "backgroundColorOfContainerDark": "#@bg", + "backgroundColorOfContainerLight": "#@bg", + "firstDayOfWeek": 1, + "hotkey": null, + "keepOpenOnSelect": false, + "showTodayBtn": false, + "showWeekNumbers": true +} diff --git a/files/logseq/settings/logseq-move-block.json b/files/logseq/settings/logseq-move-block.json @@ -0,0 +1,7 @@ +{ + "disabled": false, + "settingsVersion": "v1", + "keyBindings": { + "moveBlock": "mod+shift+m" + } +} diff --git a/files/logseq/settings/logseq-pdf-export-plugin.json b/files/logseq/settings/logseq-pdf-export-plugin.json @@ -0,0 +1,14 @@ +{ + "disabled": false, + "blockExportHandling": "Keep title as heading of block", + "retainedOptions": "", + "template1CSS": "", + "template1Choice": "Bullets for non top level elements", + "template1Options": ["Inherit logseq CSS"], + "template2CSS": "", + "template2Choice": "Bullets througout the document", + "template2Options": ["Inherit logseq CSS"], + "template3CSS": "", + "template3Choice": "", + "template3Options": ["Inherit logseq CSS"] +} diff --git a/files/logseq/settings/logseq-tabs.json b/files/logseq/settings/logseq-tabs.json @@ -0,0 +1,11 @@ +{ + "disabled": false, + "tabs:close-button-left": false, + "tabs:close": "mod+shift+w", + "tabs:hide-close-all-button": false, + "tabs:inherit-custom-css": true, + "tabs:select-next": "ctrl+tab", + "tabs:select-prev": "ctrl+shift+tab", + "tabs:show-single-tab": true, + "tabs:toggle-pin": "" +} diff --git a/files/logseq/settings/logseq-tocgen.json b/files/logseq/settings/logseq-tocgen.json @@ -0,0 +1,13 @@ +{ + "disabled": false, + "defaultExpansionLevel": 1, + "defaultHeadingType": "h", + "defaultLevels": 6, + "hideBackTop": false, + "hideGoDown": false, + "maxScrollTryCount": 20, + "noPageJump": false, + "openShortcut": "", + "pageScrollBehavior": "top", + "showTags": false +} diff --git a/files/nanorc b/files/nanorc @@ -0,0 +1,9 @@ +set autoindent +set indicator +set linenumbers +set locking +set matchbrackets "(<[{)>]}" +set minibar +set mouse +set nonewlines +set smarthome diff --git a/files/pcmanfm.conf b/files/pcmanfm.conf @@ -0,0 +1,116 @@ +[Behavior] +AutoSelectionDelay=600 +BookmarkOpenMethod=current_tab +ConfirmDelete=true +ConfirmTrash=false +CtrlRightClick=false +NoUsbTrash=false +QuickExec=false +RecentFilesNumber=0 +SelectNewFiles=false +SingleClick=false +SingleWindowMode=true +UseTrash=true + +[Desktop] +AllSticky=true +BgColor=#000000 +DesktopCellMargins=@Size(3 1) +DesktopIconSize=48 +DesktopShortcuts=@Invalid() +FgColor=#ffffff +Font="@font,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular" +HideItems=false +LastSlide= +OpenWithDefaultFileManager=true +PerScreenWallpaper=false +ShadowColor=#000000 +ShowHidden=false +SlideShowInterval=0 +SortColumn=name +SortFolderFirst=true +SortHiddenLast=false +SortOrder=ascending +TransformWallpaper=false +Wallpaper=@wallpaper +WallpaperDialogSize=@Size(700 500) +WallpaperDialogSplitterPos=200 +WallpaperDirectory= +WallpaperMode=stretch +WallpaperRandomize=false +WorkAreaMargins=15, 60, 15, 30 + +[FolderView] +BackupAsHidden=false +BigIconSize=48 +CustomColumnWidths=@Invalid() +FolderViewCellMargins=@Size(3 3) +HiddenColumns=@Invalid() +Mode=icon +NoItemTooltip=false +ScrollPerPixel=true +ShadowHidden=true +ShowFilter=false +ShowFullNames=true +ShowHidden=false +SidePaneIconSize=24 +SmallIconSize=24 +SortCaseSensitive=false +SortColumn=name +SortFolderFirst=true +SortHiddenLast=false +SortOrder=ascending +ThumbnailIconSize=128 + +[Places] +HiddenPlaces=@Invalid() + +[Search] +ContentPatterns=@Invalid() +MaxSearchHistory=0 +NamePatterns=@Invalid() +searchContentCaseInsensitive=false +searchContentRegexp=true +searchNameCaseInsensitive=true +searchNameRegexp=false +searchRecursive=true +searchhHidden=true + +[System] +Archiver=@archiver +FallbackIconThemeName=@icon +OnlyUserTemplates=true +SIUnit=false +SuCommand=lxqt-sudo %s +TemplateRunApp=false +TemplateTypeOnce=false +Terminal=@terminal + +[Thumbnail] +MaxExternalThumbnailFileSize=-1 +MaxThumbnailFileSize=4096 +ShowThumbnails=true +ThumbnailLocalFilesOnly=true + +[Volume] +AutoRun=true +CloseOnUnmount=true +MountOnStartup=false +MountRemovable=false + +[Window] +AlwaysShowTabs=false +FixedHeight=480 +FixedWidth=640 +PathBarButtons=true +RememberWindowSize=false +ReopenLastTabs=false +ShowMenuBar=true +ShowTabClose=true +SidePaneMode=places +SidePaneVisible=true +SplitView=false +SplitViewTabsNum=0 +SplitterPos=150 +SwitchToNewTab=false +TabPaths=@Invalid() diff --git a/files/repl.nix b/files/repl.nix @@ -0,0 +1,48 @@ +{ + path ? /etc/nixos, + host ? false, +}: let + inherit + (builtins) + currentSystem + getFlake + head + match + pathExists + readFile + removeAttrs + toString + ; + + flake = + if pathExists "${path}/flake.nix" + then getFlake "${toString path}" + else getFlake "/etc/nixos"; + + pkgs = + if (flake.inputs ? nixpkgs) + then import flake.inputs.nixpkgs.outPath {} + else if (flake.legacyPackages ? currentSystem) + then import flake.legacyPackages."${currentSystem}" + else import <nixpkgs> {}; +in + { + inherit flake; + } + // builtins + // (removeAttrs (pkgs // pkgs.lib) [ + "options" + "config" + ]) + // flake + // (flake.nixosConfigurations or {}) + // ( + if host + then + flake.nixosConfigurations."${head ( + match '' + ([a-zA-Z0-9\-]+) + '' (readFile "/etc/hostname") + )}" + else {} + ) diff --git a/files/sunsetr/presets/3000/sunsetr.toml b/files/sunsetr/presets/3000/sunsetr.toml @@ -0,0 +1,3 @@ +transition_mode = "static" +static_temp = 3000 +static_gamma = 100 diff --git a/files/sunsetr/presets/4000/sunsetr.toml b/files/sunsetr/presets/4000/sunsetr.toml @@ -0,0 +1,3 @@ +transition_mode = "static" +static_temp = 4000 +static_gamma = 100 diff --git a/files/sunsetr/presets/5000/sunsetr.toml b/files/sunsetr/presets/5000/sunsetr.toml @@ -0,0 +1,3 @@ +transition_mode = "static" +static_temp = 5000 +static_gamma = 100 diff --git a/files/sunsetr/presets/6000/sunsetr.toml b/files/sunsetr/presets/6000/sunsetr.toml @@ -0,0 +1,3 @@ +transition_mode = "static" +static_temp = 6000 +static_gamma = 100 diff --git a/files/sunsetr/presets/7000/sunsetr.toml b/files/sunsetr/presets/7000/sunsetr.toml @@ -0,0 +1,3 @@ +transition_mode = "static" +static_temp = 7000 +static_gamma = 100 diff --git a/files/sunsetr/presets/8000/sunsetr.toml b/files/sunsetr/presets/8000/sunsetr.toml @@ -0,0 +1,3 @@ +transition_mode = "static" +static_temp = 8000 +static_gamma = 100 diff --git a/files/sunsetr/sunsetr.toml b/files/sunsetr/sunsetr.toml @@ -0,0 +1,16 @@ +backend = "auto" +transition_mode = "start_at" + +smoothing = true +startup_duration = 0.5 +shutdown_duration = 0.5 +adaptive_interval = 1 + +sunset = "19:00:00" +sunrise = "06:00:00" +transition_duration = 15 +night_temp = 4000 +day_temp = 6500 +night_gamma = 90 +day_gamma = 100 +update_interval = 60 diff --git a/files/swaync.css b/files/swaync.css @@ -0,0 +1,251 @@ +* { + all: unset; + transition: 200ms; + font-family: @font; + font-size: 16px; + font-weight: 500; +} + +/* -- Notification -- */ +.notification-background { + background: alpha(#@base01, 0.9); + color: #@base05; + margin: 6px 12px; + border-radius: 7px; + border: solid 0.5px #@base05; + padding: 0; +} + +.notification { + padding: 7px; + border-radius: 7px; +} + +.notification.critical { + box-shadow: inset 0 0 7px #@base08; +} + +.notification-content { + margin: 7px; +} + +/* Icon */ +.notification-content overlay { + margin-right: 10px; +} + +.notification-content image { + -gtk-icon-size: 48px; + min-width: 48px; + min-height: 48px; + margin-right: 6px; +} + +.notification .app-icon { + -gtk-icon-size: 24px; + -gtk-icon-shadow: 0 1px 4px black; +} + +/* Text */ +.notification-content .summary { + color: #@base05; + margin-bottom: 4px; +} + +.notification-content .time { + color: #@base04; +} + +.notification-content .body { + color: #@base05; + font-size: 14px; +} + +/* Buttons */ +.close-button { + margin: 7px; + padding: 4px; + border-radius: 7px; + background: #@base08; + color: #@base00; +} + +.close-button:hover { + background: #@base09; +} + +.notification-action { + background: #@base02; + color: #@base05; + margin: 3px; + padding: 6px; + border-radius: 7px; + box-shadow: inset 0 0 0 1px #@base03; + font-size: 12px; +} + +.notification-action:hover { + background: #@base03; +} + +/* Progress Bar */ +.notification progress, +.notification trough, +.notification progressbar { + border-radius: 7px; + padding: 3px 0; +} + +.notification.low progress, +.notification.normal progress { + background: #@base0D; +} + +.notification.critical progress { + background: #@base08; +} + +/* -- Control Center -- */ +.control-center { + background: alpha(#@base00, 0.9); + color: #@base05; + padding: 14px; + border-radius: 7px; + box-shadow: inset 0 0 0 2px #@base02; +} + +/* Title */ +.widget-title { + margin-bottom: 10px; +} + +.widget-title > label { + font-size: 1.3em; +} + +.widget-title button { + background: #@base02; + color: #@base05; + padding: 7px; + border-radius: 7px; + box-shadow: inset 0 0 0 1px #@base03; +} + +.widget-title button:hover { + background: #@base03; +} + +/* DND */ +.widget-dnd { + padding: 10px; +} + +.widget-dnd > switch { + min-width: 30px; + min-height: 15px; + border-radius: 999px; + background: #@base02; +} + +.widget-dnd > switch:checked { + background: #@base0D; +} + +.widget-dnd > switch slider { + min-width: 15px; + min-height: 15px; + margin: 2px; + border-radius: 999px; + background: #@base05; +} + +/* Notifications */ +.widget-notifications { + min-height: 400px; +} + +.notification-group { + margin-top: 12px; + padding: 0 4px; +} + +.notification-group-headers { + margin-bottom: 5px; +} + +.notification-group-icon { + margin-left: 5px; + margin-right: 12px; +} + +.notification-group-header { + margin-left: 4px; +} + +.notification-group-buttons { + margin-right: 7px; +} + +/* Volume/Backlight */ +.widget-volume, +.widget-backlight { + padding: 10px; +} + +.widget-volume trough highlight { + background: #@base0C; +} + +.widget-backlight trough highlight { + background: #@base0A; +} + +/* Sliders */ +scale { + margin: 0 7px; +} + +scale trough { + margin: 0rem 1rem; + min-height: 10px; + min-width: 70px; + border-radius: 7px; +} + +trough { + background-color: #@base02; +} + +trough highlight { + background: #@base0D; +} + +trough slider { + margin: -10px; + border-radius: 7px; + background-color: #@base0D; + box-shadow: 0 0 2px rgba(0, 0, 0, 0.8); +} + +trough slider:hover { + box-shadow: + 0 0 2px rgba(0, 0, 0, 0.8), + 0 0 8px #@base0D; +} + +/* Scrollbar */ +scrollbar slider { + min-width: 3px; + margin: 0 1px; + border-radius: 99px; + background-color: #@base0D; + opacity: 0.4; + box-shadow: none; + border: none; +} + +scrollbar:hover slider { + min-width: 5px; + opacity: 0.8; + box-shadow: none; +} diff --git a/nixos/files/templates/Document.docx b/files/templates/Document.docx Binary files differ. diff --git a/nixos/devices/.keep b/files/templates/File diff --git a/nixos/files/templates/Presentation.pptx b/files/templates/Presentation.pptx Binary files differ. diff --git a/nixos/files/templates/Spreadsheet.xlsx b/files/templates/Spreadsheet.xlsx Binary files differ. diff --git a/files/tmuxrc.tmux b/files/tmuxrc.tmux @@ -0,0 +1,11 @@ +set -g default-command "${SHELL}" +set-option -g mouse on +set-option -g focus-events on +set -g set-clipboard on +set-option -g automatic-rename on +set-option -g status-style bg=default +set-option -ga terminal-overrides ",xterm*:Tc" + +# Split with same directory +bind | split-window -h -c "#{pane_current_path}" +bind - split-window -v -c "#{pane_current_path}" diff --git a/files/vscode/keybindings.json b/files/vscode/keybindings.json @@ -0,0 +1,28 @@ +[ + { + "key": "ctrl+/", + "command": "workbench.action.showCommands" + }, + { + "key": "ctrl+d", + "command": "editor.action.deleteLines" + }, + { + "key": "alt+t", + "command": "workbench.action.terminal.focus" + }, + { + "key": "ctrl+shift+t", + "command": "workbench.action.createTerminalEditor" + }, + { + "key": "ctrl+'", + "command": "editor.action.addCommentLine", + "when": "editorTextFocus && !editorReadonly" + }, + { + "key": "ctrl+shift+'", + "command": "editor.action.removeCommentLine", + "when": "editorTextFocus && !editorReadonly" + } +] diff --git a/files/vscode/settings.json b/files/vscode/settings.json @@ -0,0 +1,65 @@ +{ + "chat.disableAIFeatures": true, + "editor.cursorBlinking": "expand", + "editor.cursorSmoothCaretAnimation": "on", + "editor.cursorStyle": "line-thin", + "editor.formatOnSave": true, + "editor.smoothScrolling": true, + "editor.suggest.preview": true, + "editor.suggest.showStatusBar": true, + "editor.unfoldOnClickAfterEndOfLine": true, + "explorer.confirmDelete": false, + "explorer.incrementalNaming": "smart", + "explorer.openEditors.visible": 7, + "extensions.autoCheckUpdates": false, + "extensions.autoUpdate": false, + "extensions.ignoreRecommendations": true, + "files.autoSave": "onWindowChange", + "files.trimFinalNewlines": true, + "security.workspace.trust.enabled": false, + "search.showLineNumbers": true, + "search.smartCase": true, + "search.useGlobalIgnoreFiles": true, + "search.useParentIgnoreFiles": true, + "terminal.integrated.cursorStyle": "line", + "terminal.integrated.enableVisualBell": true, + "terminal.integrated.tabs.separator": " / ", + "update.mode": "none", + "window.autoDetectColorScheme": false, + "window.closeWhenEmpty": true, + "window.commandCenter": true, + "window.dialogStyle": "custom", + "window.doubleClickIconToClose": true, + "window.menuBarVisibility": "toggle", + "window.titleSeparator": " / ", + "workbench.commandPalette.preserveInput": true, + "workbench.editor.highlightModifiedTabs": true, + "workbench.list.horizontalScrolling": true, + "workbench.list.smoothScrolling": true, + "workbench.startupEditor": "readme", + + "editor.defaultFormatter": "esbenp.prettier-vscode", + "better-comments.highlightPlainText": true, + "scm.repositories.visible": 7, + "nix.enableLanguageServer": true, + "nix.serverPath": "nil", + "nix.serverSettings": { + "nil": { + "formatting": { + "command": ["alejandra"] + } + } + }, + "[nix]": { + "editor.defaultFormatter": "jnoortheen.nix-ide" + }, + "[cpp]": { + "editor.defaultFormatter": "ms-vscode.cpptools" + }, + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter" + }, + "[xml]": { + "editor.defaultFormatter": "DotJoshJohnson.xml" + } +} diff --git a/windows/Vollmond.rmskin b/files/windows/Vollmond.rmskin Binary files differ. diff --git a/files/windows/packages.ubundle b/files/windows/packages.ubundle @@ -0,0 +1,1577 @@ +{ + "export_version": 3, + "packages": [ + { + "Id": "7zip.7zip", + "Name": "7-Zip", + "Version": "26.01", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "9WZDNCRDXF41", + "Name": "Character Map UWP", + "Version": "2026.3.0.0", + "Source": "msstore", + "ManagerName": "winget" + }, + { + "Id": "AdrienAllard.FileConverter", + "Name": "File Converter", + "Version": "2.2.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Alacritty.Alacritty", + "Name": "Alacritty", + "Version": "0.17.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Alex313031.Thorium.AVX2", + "Name": "Thorium (AVX2)", + "Version": "138.0.7204.303", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "AmN.yasb", + "Name": "yasb", + "Version": "2.0.2", + "Source": "winget", + "ManagerName": "winget", + "Updates": { + "IgnoredVersion": "2.0.0" + } + }, + { + "Id": "Anthropic.Claude", + "Name": "Claude", + "Version": "1.11187.4.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "AntibodySoftware.WizTree", + "Name": "WizTree", + "Version": "4.31", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Audacity.Audacity", + "Name": "Audacity", + "Version": "3.7.7", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "AutoHotkey.AutoHotkey", + "Name": "AutoHotkey", + "Version": "2.0.26", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "BlenderFoundation.Blender.LTS.4.2", + "Name": "blender", + "Version": "4.2.16", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "BrechtSanders.WinLibs.POSIX.UCRT.LLVM", + "Name": "WinLibs (POSIX threads, UCRT runtime, LLVM included)", + "Version": "14.2.0-19.1.1-12.0.0-r2", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "BurntSushi.ripgrep.MSVC", + "Name": "RipGrep MSVC", + "Version": "15.1.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Cloudflare.Warp", + "Name": "Cloudflare One Client", + "Version": "26.4.1390.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Cloudflare.cloudflared", + "Name": "cloudflared", + "Version": "2026.5.2", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "CodecGuide.K-LiteCodecPack.Full", + "Name": "K-Lite Codec Pack Full", + "Version": "19.7.5", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Cyanfish.NAPS2", + "Name": "NAPS2", + "Version": "8.2.1", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Devolutions.UniGetUI", + "Name": "UniGetUI", + "Version": "2026.2.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Discord.Discord", + "Name": "Discord", + "Version": "1.0.9240", + "Source": "winget", + "ManagerName": "winget", + "InstallationOptions": { + "OverridesNextLevelOpts": true + } + }, + { + "Id": "Docker.DockerDesktop", + "Name": "Docker Desktop", + "Version": "4.76.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "EpicGames.EpicGamesLauncher", + "Name": "Epic Games Launcher", + "Version": "1.3.176.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Exploitox.GoAwayEdge", + "Name": "GoAwayEdge", + "Version": "2.0.3.264", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Figma.Figma", + "Name": "Figma", + "Version": "126.5.6", + "Source": "winget", + "ManagerName": "winget", + "InstallationOptions": { + "OverridesNextLevelOpts": true + } + }, + { + "Id": "GIMP.GIMP.3", + "Name": "GIMP", + "Version": "3.2.4.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "GermanCoding.SyncTrayzor", + "Name": "SyncTrayzor (x64)", + "Version": "2.1.0.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Git.Git", + "Name": "Git", + "Version": "2.54.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Google.AntigravityIDE", + "Name": "Antigravity IDE", + "Version": "2.0.4", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Google.GoogleDrive", + "Name": "Google Drive", + "Version": "126.0.5.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Google.QuickShare", + "Name": "Quick Share from Google", + "Version": "1.0.2600.1", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Gyan.FFmpeg.Shared", + "Name": "FFmpeg (Shared)", + "Version": "8.1.1", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "HandBrake.HandBrake", + "Name": "HandBrake", + "Version": "1.11.1", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "IrfanSkiljan.IrfanView", + "Name": "IrfanView", + "Version": "4.73", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "JohnMacFarlane.Pandoc", + "Name": "Pandoc", + "Version": "3.10", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "KeePassXCTeam.KeePassXC", + "Name": "KeePassXC", + "Version": "2.7.12", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Kitware.CMake", + "Name": "CMake", + "Version": "4.3.3", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Klocman.BulkCrapUninstaller", + "Name": "Bulk Crap Uninstaller", + "Version": "6.1.0.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Logseq.Logseq", + "Name": "Logseq", + "Version": "0.10.15", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "M2Team.NanaZip", + "Name": "NanaZip", + "Version": "6.0.1711.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Meltytech.Shotcut", + "Name": "Shotcut", + "Version": "26.4.30", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "MiKTeX.MiKTeX", + "Name": "MiKTeX", + "Version": "25.12", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.AppInstaller", + "Name": "App Installer", + "Version": "1.28.240.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.CLRTypesSQLServer.2019", + "Name": "Microsoft System CLR Types for SQL Server 2019", + "Version": "15.0.2000.5", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.DotNet.DesktopRuntime.10", + "Name": "Microsoft .NET Windows Desktop Runtime 10.0", + "Version": "10.0.8", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.DotNet.DesktopRuntime.8", + "Name": "Microsoft .NET Windows Desktop Runtime 8.0", + "Version": "8.0.27", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.DotNet.Native.Runtime", + "Name": "Microsoft .NET Native Runtime", + "Version": "2.2.28604.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.Edge", + "Name": "Microsoft Edge", + "Version": "149.0.4022.52", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.Office", + "Name": "Microsoft 365 Apps for enterprise", + "Version": "16.0.20026.20112", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.OpenJDK.25", + "Name": "Microsoft Build of OpenJDK with Hotspot 25", + "Version": "25.0.3.9", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.PowerShell", + "Name": "PowerShell", + "Version": "7.6.2.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.PowerToys", + "Name": "PowerToys", + "Version": "0.99.1", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.Sysinternals.Suite", + "Name": "Sysinternals Suite", + "Version": "2026-05-07", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.Teams", + "Name": "Microsoft Teams", + "Version": "26120.3106.4722.3411", + "Source": "winget", + "ManagerName": "winget", + "InstallationOptions": { + "OverridesNextLevelOpts": true + } + }, + { + "Id": "Microsoft.UI.Xaml.2.7", + "Name": "Microsoft.UI.Xaml", + "Version": "7.2409.9001.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.UI.Xaml.2.8", + "Name": "Microsoft.UI.Xaml", + "Version": "8.2511.26001.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.VCLibs.14", + "Name": "Microsoft Visual C\u002B\u002B 2015 UWP Runtime Package", + "Version": "14.0.33519.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.VCLibs.Desktop.14", + "Name": "Microsoft Visual C\u002B\u002B 2015 UWP Desktop Runtime Package", + "Version": "14.0.33728.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.VCRedist.2015\u002B.x64", + "Name": "Microsoft Visual C\u002B\u002B 2015-2022 Redistributable (x64)", + "Version": "14.51.36231.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.VCRedist.2015\u002B.x86", + "Name": "Microsoft Visual C\u002B\u002B 2015-2022 Redistributable (x86)", + "Version": "14.51.36231.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.VisualStudio.Community", + "Name": "Visual Studio Community 2026", + "Version": "18.6.2", + "Source": "winget", + "ManagerName": "winget", + "Updates": { + "IgnoredVersion": "18.6.0" + } + }, + { + "Id": "Microsoft.VisualStudioCode", + "Name": "Microsoft Visual Studio Code", + "Version": "1.123.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.WSL", + "Name": "Windows Subsystem for Linux", + "Version": "2.7.3.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.WebDeploy", + "Name": "Microsoft Web Deploy", + "Version": "10.0.9419", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.WinGet.Client", + "Name": "Microsoft.WinGet.Client", + "Version": "1.28.240", + "Source": "PSGallery", + "ManagerName": "pwsh" + }, + { + "Id": "Microsoft.WinGet.Client", + "Name": "Microsoft.WinGet.Client", + "Version": "1.12.440", + "Source": "PSGallery", + "ManagerName": "pwsh" + }, + { + "Id": "Microsoft.WinGet.CommandNotFound", + "Name": "Microsoft.WinGet.CommandNotFound", + "Version": "1.0.6", + "Source": "PSGallery", + "ManagerName": "pwsh" + }, + { + "Id": "Microsoft.WindowsAppRuntime.1.5", + "Name": "Windows App Runtime 1.5", + "Version": "\u003E 1.5.8", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.WindowsAppRuntime.1.6", + "Name": "Windows App Runtime 1.6", + "Version": "1.6.9", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.WindowsAppRuntime.1.7", + "Name": "Windows App Runtime 1.7", + "Version": "1.7.9", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.WindowsAppRuntime.1.8", + "Name": "Windows App Runtime 1.8", + "Version": "1.8.8", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.WindowsTerminal", + "Name": "Windows Terminal", + "Version": "1.24.11321.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Microsoft.msodbcsql.17", + "Name": "Microsoft ODBC Driver 17 for SQL Server", + "Version": "17.11.1.1", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "MongoDB.Compass.Full", + "Name": "MongoDB Compass", + "Version": "1.49.8.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Mozilla.Firefox", + "Name": "Mozilla Firefox (en-US)", + "Version": "151.0.3", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Mozilla.Thunderbird", + "Name": "Mozilla Thunderbird (en-US)", + "Version": "151.0.1", + "Source": "winget", + "ManagerName": "winget", + "Updates": { + "IgnoredVersion": "150.0.2" + } + }, + { + "Id": "Neovim.Neovim", + "Name": "Neovim", + "Version": "0.12.2", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Ninja-build.Ninja", + "Name": "ninja", + "Version": "1.13.2", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Notepad\u002B\u002B.Notepad\u002B\u002B", + "Name": "Notepad\u002B\u002B", + "Version": "8.9.6.4", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Nvidia.PhysX", + "Name": "NVIDIA PhysX System Software", + "Version": "9.23.1019", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "OBSProject.OBSStudio", + "Name": "OBS Studio", + "Version": "32.1.2", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "PDFgear.PDFgear", + "Name": "PDFgear", + "Version": "2.1.15", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "PrismLauncher.PrismLauncher", + "Name": "Prism Launcher", + "Version": "11.0.2", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "PuTTY.PuTTY", + "Name": "PuTTY", + "Version": "0.84.0.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "PySocks", + "Name": "PySocks", + "Version": "1.7.1", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "Python.PythonInstallManager", + "Name": "Python Install Manager", + "Version": "26.2.240.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "REALiX.HWiNFO", + "Name": "HWiNFO\u00AE", + "Version": "8.48", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Rainmeter.Rainmeter", + "Name": "Rainmeter", + "Version": "4.5.26", + "Source": "winget", + "ManagerName": "winget", + "Updates": { + "IgnoredVersion": "4.5.25" + } + }, + { + "Id": "RamenSoftware.Windhawk", + "Name": "Windhawk", + "Version": "1.7.3", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Roblox.Roblox", + "Name": "Roblox Player", + "Version": "0.702.2.7020633", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Rufus.Rufus", + "Name": "Rufus", + "Version": "4.14", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Rustlang.Rustup", + "Name": "Rustup: the Rust toolchain installer", + "Version": "1.29.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Spotify.Spotify", + "Name": "Spotify", + "Version": "1.2.90.451.gb094aab0", + "Source": "winget", + "ManagerName": "winget", + "InstallationOptions": { + "OverridesNextLevelOpts": true + } + }, + { + "Id": "Starship.Starship", + "Name": "starship", + "Version": "1.25.1", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "StrawberryPerl.StrawberryPerl", + "Name": "Strawberry Perl", + "Version": "5.42.2.1", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Stremio.Stremio", + "Name": "Stremio", + "Version": "4.4.181", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "SumatraPDF.SumatraPDF", + "Name": "SumatraPDF", + "Version": "3.6.1", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Tailscale.Tailscale", + "Name": "Tailscale", + "Version": "1.98.4", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "TechPowerUp.NVCleanstall", + "Name": "NVCleanstall", + "Version": "1.19.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "TheDocumentFoundation.LibreOffice", + "Name": "LibreOffice", + "Version": "26.2.3.2", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Valve.Steam", + "Name": "Steam", + "Version": "2.10.91.91", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "ViRb3.wgcf", + "Name": "wgcf", + "Version": "2.2.31", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "VideoLAN.VLC", + "Name": "VLC media player", + "Version": "3.0.23", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Volta.Volta", + "Name": "Volta", + "Version": "2.0.2", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "VoodooSoft.DefenderUI", + "Name": "DefenderUI", + "Version": "2.05", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "WinMerge.WinMerge", + "Name": "WinMerge", + "Version": "2.16.56.2", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "WinSCP.WinSCP", + "Name": "WinSCP", + "Version": "6.5.6", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "WireGuard.WireGuard", + "Name": "WireGuard", + "Version": "1.1", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "XnSoft.XnViewMP", + "Name": "XnView MP", + "Version": "1.11.2.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "ZedIndustries.Zed", + "Name": "Zed", + "Version": "1.4.4", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "Zellij.Zellij", + "Name": "Zellij", + "Version": "0.44.3", + "Source": "winget", + "ManagerName": "winget", + "Updates": { + "IgnoredVersion": "0.44.2" + } + }, + { + "Id": "amir1376.ABDownloadManager", + "Name": "ABDownloadManager", + "Version": "1.8.8", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "beautifulsoup4", + "Name": "Beautifulsoup4", + "Version": "4.14.3", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "calibre.calibre", + "Name": "calibre", + "Version": "9.9.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "cargo-binstall", + "Name": "Cargo Binstall", + "Version": "1.19.1", + "Source": "crates.io", + "ManagerName": "cargo" + }, + { + "Id": "cargo-update", + "Name": "Cargo Update", + "Version": "20.0.0", + "Source": "crates.io", + "ManagerName": "cargo" + }, + { + "Id": "certifi", + "Name": "Certifi", + "Version": "2026.5.20", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "charset-normalizer", + "Name": "Charset Normalizer", + "Version": "3.4.7", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "chrisant996.Clink", + "Name": "Clink", + "Version": "1.9.25", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "colorama", + "Name": "Colorama", + "Version": "0.4.6", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "dandavison.delta", + "Name": "delta", + "Version": "0.19.2", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "dorssel.usbipd-win", + "Name": "usbipd-win", + "Version": "5.3.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "ente-io.auth-desktop", + "Name": "Ente Auth", + "Version": "4.4.22", + "Source": "winget", + "ManagerName": "winget", + "InstallationOptions": { + "OverridesNextLevelOpts": true + } + }, + { + "Id": "et_xmlfile", + "Name": "Et Xmlfile", + "Version": "2.0.0", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "filelock", + "Name": "Filelock", + "Version": "3.29.1", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "gdown", + "Name": "Gdown", + "Version": "6.1.0", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "getzola.zola", + "Name": "zola", + "Version": "0.22.1", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "idna", + "Name": "Idna", + "Version": "3.18", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "lin-ycv.EverythingCmdPal3", + "Name": "EverythingCmdPal", + "Version": "0.2.0.0", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "lxml", + "Name": "Lxml", + "Version": "6.1.1", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "openpyxl", + "Name": "Openpyxl", + "Version": "3.1.5", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "pillow", + "Name": "Pillow", + "Version": "12.2.0", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "pip", + "Name": "Pip", + "Version": "26.1.2", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "python-pptx", + "Name": "Python Pptx", + "Version": "1.0.2", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "qBittorrent.qBittorrent", + "Name": "qBittorrent", + "Version": "5.2.1", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "requests", + "Name": "Requests", + "Version": "2.34.2", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "sharkdp.fd", + "Name": "fd", + "Version": "10.4.2", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "soupsieve", + "Name": "Soupsieve", + "Version": "2.8.4", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "tqdm", + "Name": "Tqdm", + "Version": "4.68.1", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "typing_extensions", + "Name": "Typing Extensions", + "Version": "4.15.0", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "urllib3", + "Name": "Urllib3", + "Version": "2.7.0", + "Source": "pip", + "ManagerName": "pip" + }, + { + "Id": "voidtools.Everything.Alpha", + "Name": "Everything (Alpha)", + "Version": "1.5.0.1409", + "Source": "winget", + "ManagerName": "winget" + }, + { + "Id": "xlsxwriter", + "Name": "Xlsxwriter", + "Version": "3.2.9", + "Source": "pip", + "ManagerName": "pip" + } + ], + "incompatible_packages_info": "Incompatible packages cannot be installed from UniGetUI, either because they came from a local source (for example Local PC) or because the package manager was unavailable. Nevertheless, they have been listed here for logging purposes.", + "incompatible_packages": [ + { + "Id": "ARP\\Machine\\X64\\Android Studio", + "Name": "Android Studio", + "Version": "2025.3", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X64\\MozillaMaintenanceService", + "Name": "Mozilla Maintenance Service", + "Version": "151.0.1", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X64\\Riot Vanguard", + "Name": "Riot Vanguard", + "Version": "Unknown", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X64\\RustDesk", + "Name": "RustDesk", + "Version": "1.4.6.29544831", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X64\\Steam App 2767030", + "Name": "Marvel Rivals", + "Version": "Unknown", + "Source": "Steam" + }, + { + "Id": "ARP\\Machine\\X64\\Steam App 291550", + "Name": "Brawlhalla", + "Version": "Unknown", + "Source": "Steam" + }, + { + "Id": "ARP\\Machine\\X64\\Steam App 322170", + "Name": "Geometry Dash", + "Version": "Unknown", + "Source": "Steam" + }, + { + "Id": "ARP\\Machine\\X64\\Steam App 431960", + "Name": "Wallpaper Engine", + "Version": "Unknown", + "Source": "Steam" + }, + { + "Id": "ARP\\Machine\\X64\\Steam App 837350", + "Name": "King of the Hat", + "Version": "Unknown", + "Source": "Steam" + }, + { + "Id": "ARP\\Machine\\X64\\{552ED017-461C-4DE5-8739-E04466E938FB}", + "Name": "RustDesk", + "Version": "1.4.6.29544831", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X64\\{572A0073-40AE-4866-8138-AE60C3D90EF3}", + "Name": "VMware Workstation", + "Version": "25.0.1", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X64\\{6F320B93-EE3C-4826-85E0-ADF79F8D4C61}", + "Name": "Microsoft Visual Studio Installer", + "Version": "4.5.35.35368", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X64\\{725E471E-63CB-4E02-ABB3-265267B936B8}", + "Name": "Microsoft .NET SDK 10.0.300 (x64) from Visual Studio", + "Version": "40.11.2206", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X64\\{A7AB73A3-CB10-4AA5-9D38-6AEFFBDE4C91}", + "Name": "Microsoft Teams Meeting Add-in for Microsoft Office", + "Version": "1.26.08901", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X64\\{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8}_Display.Driver", + "Name": "NVIDIA Graphics Driver 596.49", + "Version": "596.49", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X64\\{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8}_HDAudio.Driver", + "Name": "NVIDIA HD Audio Driver 1.4.5.7", + "Version": "1.4.5.7", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X64\\{C21221FC-C5DD-488F-AA88-9C936DB25907}", + "Name": "IIS 10.0 Express", + "Version": "10.0.11304", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X64\\{E9279A3D-A613-4CA7-8B09-A6C4C5C5AB5A}", + "Name": "Microsoft SQL Server 2025 LocalDB ", + "Version": "17.0.4025.3", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X86\\FreeFileSync_is1", + "Name": "FreeFileSync", + "Version": "14.9", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X86\\{13D2A7A2-1B42-4C03-8F0F-697991259AEE}", + "Name": "Windows SDK AddOn", + "Version": "10.1.0.0", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X86\\{1851460E-0E63-4117-B5BA-25A2F045801B}", + "Name": "vs_CoreEditorFonts", + "Version": "17.7.40001", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X86\\{204d0387-6d9a-48cf-bb7d-93d49ec0141c}", + "Name": "Windows Software Development Kit - Windows 10.0.26100.8249", + "Version": "10.1.26100.8249", + "Source": "Local PC" + }, + { + "Id": "ARP\\Machine\\X86\\{6300A8E0-851B-4638-ADBB-1385DCF1248D}", + "Name": "Epic Online Services", + "Version": "4.3.1", + "Source": "Local PC" + }, + { + "Id": "ARP\\User\\X64\\63bbf0cc7b6c24ec34fd82081e7704a2", + "Name": "YouTube", + "Version": "1.0", + "Source": "Local PC" + }, + { + "Id": "ARP\\User\\X64\\Riot Game Riot_Client.", + "Name": "Riot Client ", + "Version": "Unknown", + "Source": "Local PC" + }, + { + "Id": "ARP\\User\\X64\\Riot Game valorant.live", + "Name": "VALORANT", + "Version": "Unknown", + "Source": "Local PC" + }, + { + "Id": "ARP\\User\\X64\\a223f8361ace19a6d109b880df9421a4", + "Name": "Gemini", + "Version": "1.0", + "Source": "Local PC" + }, + { + "Id": "ARP\\User\\X64\\pymanager-pythoncore-3.14-64", + "Name": "Python 3.14.4", + "Version": "3.14-64", + "Source": "Local PC" + }, + { + "Id": "MSIX\\5319275A.WhatsAppDesktop_2.2620.102.0_x64__cv1g1gvanyjgm", + "Name": "WhatsApp", + "Version": "2.2620.102.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\AdvancedMicroDevicesInc-2.AMDRadeonSoftware_10.22.40043.0_x64__0a9344xs7nr4m", + "Name": "AMD Radeon Software", + "Version": "10.22.40043.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\DolbyLaboratories.DolbyAccess_3.27.10030.0_x64__rz1tebttyb220", + "Name": "Dolby Access", + "Version": "3.27.10030.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\DolbyLaboratories.DolbyDigitalPlusDecoderOEM_1.2.588.0_x64__rz1tebttyb220", + "Name": "Dolby Digital Plus decoder for PC OEMs", + "Version": "1.2.588.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\DongleInsovaki.MicaForEveryone_2.0.6.0_x64__t8299cmby5bjr", + "Name": "Mica For Everyone", + "Version": "2.0.6.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.AV1VideoExtension_2.0.7.0_x64__8wekyb3d8bbwe", + "Name": "AV1 Video Extension", + "Version": "2.0.7.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.AVCEncoderVideoExtension_1.1.23.0_x64__8wekyb3d8bbwe", + "Name": "AVC Encoder Video Extension", + "Version": "1.1.23.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.ApplicationCompatibilityEnhancements_1.2511.9.0_x64__8wekyb3d8bbwe", + "Name": "Windows Application Compatibility Enhancements", + "Version": "1.2511.9.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.CommandPalette_0.10.11181.0_x64__8wekyb3d8bbwe", + "Name": "Command Palette", + "Version": "0.10.11181.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.GamingApp_2605.1001.14.0_x64__8wekyb3d8bbwe", + "Name": "Xbox", + "Version": "2605.1001.14.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.HEIFImageExtension_1.2.30.0_x64__8wekyb3d8bbwe", + "Name": "HEIF Image Extension", + "Version": "1.2.30.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.HEVCVideoExtension_2.4.43.0_x64__8wekyb3d8bbwe", + "Name": "HEVC Video Extensions from Device Manufacturer", + "Version": "2.4.43.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.Ink.Handwriting.Main.en-US.1.0.1_0.1121.1848.0_x64__8wekyb3d8bbwe", + "Name": "Ink.Handwriting.Main.en-US.1.0", + "Version": "0.1121.1848.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.Ink.Handwriting.en-US.1.0_0.1248.2215.0_x64__8wekyb3d8bbwe", + "Name": "Ink.Handwriting.en-US.1.0", + "Version": "0.1248.2215.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.Ink.Handwriting.en-US.1.0_0.1248.2215.0_x86__8wekyb3d8bbwe", + "Name": "Ink.Handwriting.en-US.1.0", + "Version": "0.1248.2215.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.MPEG2VideoExtension_1.2.13.0_x64__8wekyb3d8bbwe", + "Name": "MPEG-2 Video Extension", + "Version": "1.2.13.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.MicrosoftEdge.Stable_140.0.3485.66_neutral__8wekyb3d8bbwe", + "Name": "Microsoft Edge", + "Version": "140.0.3485.66", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe", + "Name": "Microsoft .Net Native Framework Package 2.2", + "Version": "2.2.29512.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x86__8wekyb3d8bbwe", + "Name": "Microsoft .Net Native Framework Package 2.2", + "Version": "2.2.29512.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.Office.ActionsServer_16.0.20026.20112_neutral__8wekyb3d8bbwe", + "Name": "Microsoft.Office.ActionsServer", + "Version": "16.0.20026.20112", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.Office.OneNoteVirtualPrinter_1.0.0.0_x64__8wekyb3d8bbwe", + "Name": "OneNote Virtual Printer", + "Version": "1.0.0.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.OfficePushNotificationUtility_16.0.20026.20112_neutral__8wekyb3d8bbwe", + "Name": "OfficePushNotificationsUtility", + "Version": "16.0.20026.20112", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.OutlookForWindows_1.2026.504.100_x64__8wekyb3d8bbwe", + "Name": "Outlook for Windows", + "Version": "1.2026.504.100", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.Paint_11.2603.251.0_x64__8wekyb3d8bbwe", + "Name": "Paint", + "Version": "11.2603.251.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.PowerToys.FileLocksmithContextMenu_0.99.1.0_neutral__8wekyb3d8bbwe", + "Name": "PowerToys FileLocksmith Context Menu", + "Version": "0.99.1.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.PowerToys.ImageResizerContextMenu_0.99.1.0_neutral__8wekyb3d8bbwe", + "Name": "PowerToys ImageResizer Context Menu", + "Version": "0.99.1.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.PowerToys.PowerRenameContextMenu_0.99.1.0_neutral__8wekyb3d8bbwe", + "Name": "PowerToys PowerRename Context Menu", + "Version": "0.99.1.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.PowerToys.SparseApp_0.99.1.0_neutral__8wekyb3d8bbwe", + "Name": "PowerToys.SparseApp", + "Version": "0.99.1.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.RawImageExtension_2.5.7.0_x64__8wekyb3d8bbwe", + "Name": "Raw Image Extension", + "Version": "2.5.7.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.ScreenSketch_11.2602.47.0_x64__8wekyb3d8bbwe", + "Name": "Snipping Tool", + "Version": "11.2602.47.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.SecHealthUI_1000.29554.1001.0_x64__8wekyb3d8bbwe", + "Name": "Windows Security", + "Version": "1000.29554.1001.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.Services.Store.Engagement_10.0.23012.0_x64__8wekyb3d8bbwe", + "Name": "Microsoft Engagement Framework", + "Version": "10.0.23012.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.Services.Store.Engagement_10.0.23012.0_x86__8wekyb3d8bbwe", + "Name": "Microsoft Engagement Framework", + "Version": "10.0.23012.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.StorePurchaseApp_22604.1401.2.0_x64__8wekyb3d8bbwe", + "Name": "Store Experience Host", + "Version": "22604.1401.2.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.VP9VideoExtensions_1.2.13.0_x64__8wekyb3d8bbwe", + "Name": "VP9 Video Extensions", + "Version": "1.2.13.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.VisualStudioCode_1.0.123.0_neutral__8wekyb3d8bbwe", + "Name": "Visual Studio Code", + "Version": "1.0.123.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.WebMediaExtensions_2.1.26.0_x64__8wekyb3d8bbwe", + "Name": "Web Media Extensions", + "Version": "2.1.26.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.WebpImageExtension_1.2.14.0_x64__8wekyb3d8bbwe", + "Name": "WebP Image Extension", + "Version": "1.2.14.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.Windows.DevHome_0.2101.858.0_x64__8wekyb3d8bbwe", + "Name": "Windows Advanced Settings", + "Version": "0.2101.858.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.Windows.Photos_2026.11050.1001.0_x64__8wekyb3d8bbwe", + "Name": "Microsoft Photos", + "Version": "2026.11050.1001.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.WindowsAppRuntime.2_2.1.3.0_x64__8wekyb3d8bbwe", + "Name": "WindowsAppRuntime.2", + "Version": "2.1.3.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.WindowsAppRuntime.2_2.1.3.0_x86__8wekyb3d8bbwe", + "Name": "WindowsAppRuntime.2", + "Version": "2.1.3.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.WindowsCalculator_11.2508.4.0_x64__8wekyb3d8bbwe", + "Name": "Windows Calculator", + "Version": "11.2508.4.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.WindowsCamera_2025.2510.2.0_x64__8wekyb3d8bbwe", + "Name": "Windows Camera", + "Version": "2025.2510.2.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.WindowsNotepad_11.2604.5.0_x64__8wekyb3d8bbwe", + "Name": "Windows Notepad", + "Version": "11.2604.5.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.WindowsStore_22604.1401.8.0_x64__8wekyb3d8bbwe", + "Name": "Microsoft Store", + "Version": "22604.1401.8.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.Winget.Fonts.Source_2025.1016.311.49_neutral__8wekyb3d8bbwe", + "Name": "Windows Package Manager Source (winget-font) V2", + "Version": "2025.1016.311.49", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.Winget.Source_2026.606.1725.30_neutral__8wekyb3d8bbwe", + "Name": "Windows Package Manager Source (winget) V2", + "Version": "2026.606.1725.30", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.Xbox.TCUI_1.24.10001.0_x64__8wekyb3d8bbwe", + "Name": "Xbox TCUI", + "Version": "1.24.10001.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.XboxGamingOverlay_7.326.5041.0_x64__8wekyb3d8bbwe", + "Name": "Game Bar", + "Version": "7.326.5041.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.XboxIdentityProvider_12.130.16001.0_x64__8wekyb3d8bbwe", + "Name": "Xbox Identity Provider", + "Version": "12.130.16001.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.XboxSpeechToTextOverlay_1.111.30001.0_x64__8wekyb3d8bbwe", + "Name": "Game Speech Window", + "Version": "1.111.30001.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\Microsoft.YourPhone_0.26032.102.0_x64__8wekyb3d8bbwe", + "Name": "Phone Link", + "Version": "0.26032.102.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\MicrosoftCorporationII.WinAppRuntime.Main.1.8_8000.836.2153.0_x64__8wekyb3d8bbwe", + "Name": "WinAppRuntime.Main.1.8", + "Version": "8000.836.2153.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\MicrosoftWindows.CrossDevice_0.26032.83.0_x64__cw5n1h2txyewy", + "Name": "Cross Device Experience Host", + "Version": "0.26032.83.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\MicrosoftWindows.WindowsSandbox_0.5.3.0_x64__cw5n1h2txyewy", + "Name": "Windows Sandbox", + "Version": "0.5.3.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\NVIDIACorp.NVIDIAControlPanel_8.1.969.0_x64__56jybvy8sckqj", + "Name": "NVIDIA Control Panel", + "Version": "8.1.969.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\NearbyShare_1.0.2600.1_x64__21hpf16v5xp10", + "Name": "Quick Share", + "Version": "1.0.2600.1", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\NotepadPlusPlus_1.0.0.0_neutral__2247w0b46hfww", + "Name": "Notepad\u002B\u002B", + "Version": "1.0.0.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\RealtekSemiconductorCorp.RealtekAudioControl_1.1.137.0_x64__dt26b99r8h8gj", + "Name": "Realtek Audio Control", + "Version": "1.1.137.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\WinMerge_1.0.8.0_neutral__f62ztx9ss5ed4", + "Name": "WinMerge", + "Version": "1.0.8.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\ZedIndustries.Zed_1.0.0.0_neutral__japxn1gcva8rg", + "Name": "Zed", + "Version": "1.0.0.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\aimgr_0.20.52.0_x64__8wekyb3d8bbwe", + "Name": "Local AI Manager for Microsoft 365", + "Version": "0.20.52.0", + "Source": "Microsoft Store" + }, + { + "Id": "MSIX\\ngrok.ngrok_3.39.1.0_x64__1g87z0zv29zzc", + "Name": "ngrok", + "Version": "3.39.1.0", + "Source": "Microsoft Store" + } + ] +} +\ No newline at end of file diff --git a/windows/powertoys/settings_134221974307868093.ptb b/files/windows/powertoys/settings_134221974307868093.ptb Binary files differ. diff --git a/windows/scripts/clipboard.ahk b/files/windows/scripts/clipboard.ahk diff --git a/windows/scripts/keybinds.ahk b/files/windows/scripts/keybinds.ahk diff --git a/windows/starship.toml b/files/windows/starship.toml diff --git a/windows/windhawk.zip b/files/windows/windhawk.zip diff --git a/windows/wsl/.zsh_plugins.txt b/files/windows/wsl/.zsh_plugins.txt diff --git a/windows/wsl/.zshrc b/files/windows/wsl/.zshrc diff --git a/windows/yasb/config.yaml b/files/windows/yasb/config.yaml diff --git a/windows/yasb/styles.css b/files/windows/yasb/styles.css diff --git a/windows/zellij.kdl b/files/windows/zellij.kdl diff --git a/files/wlogout.css b/files/wlogout.css @@ -0,0 +1,32 @@ +* { + background: none; +} + +window { + background-color: rgba(0, 0, 0, 0.7); +} + +button { + background: rgba(0, 0, 0, 0.05); + border-radius: 8px; + box-shadow: + inset 0 0 0 1px rgba(255, 255, 255, 0.1), + 0 0 rgba(0, 0, 0, 0.5); + transition: background-color 0.2s ease-in-out; + margin: 1rem; +} + +button:focus, +button:hover { + background-color: rgba(255, 255, 255, 0.2); +} + +button:active { + background-color: rgba(255, 255, 255, 0.5); +} + +label { + font-size: 10rem; + margin: 5rem; + color: #@base05; +} diff --git a/files/ytmusic.json b/files/ytmusic.json @@ -0,0 +1,56 @@ +{ + "window-size": { + "width": 800, + "height": 800 + }, + "window-maximized": true, + "window-position": { + "x": 0, + "y": 0 + }, + "url": "https://music.youtube.com", + "options": { + "tray": true, + "appVisible": true, + "autoUpdates": false, + "alwaysOnTop": false, + "hideMenu": true, + "hideMenuWarned": true, + "startAtLogin": false, + "disableHardwareAcceleration": false, + "removeUpgradeButton": false, + "restartOnConfigChanges": false, + "trayClickPlayPause": false, + "autoResetAppCache": false, + "resumeOnStart": true, + "likeButtons": "", + "proxy": "", + "startingPage": "", + "overrideUserAgent": false, + "usePodcastParticipantAsArtist": false, + "themes": ["@theme"] + }, + "plugins": { + "notifications": {}, + "video-toggle": { + "mode": "custom" + }, + "precise-volume": { + "globalShortcuts": {} + }, + "discord": { + "listenAlong": true + }, + "album-color-theme": { + "enabled": false + }, + "crossfade": { + "enabled": true + } + }, + "__internal__": { + "migrations": { + "version": "3.9.0" + } + } +} diff --git a/flake.lock b/flake.lock @@ -0,0 +1,2272 @@ +{ + "nodes": { + "aquamarine": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1763922789, + "narHash": "sha256-XnkWjCpeXfip9tqYdL0b0zzBDjq+dgdISvEdSVGdVyA=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "a20a0e67a33b6848378a91b871b89588d3a12573", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.10.0", + "repo": "aquamarine", + "type": "github" + } + }, + "aquamarine_2": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprpwcenter", + "hyprutils" + ], + "hyprwayland-scanner": "hyprwayland-scanner", + "nixpkgs": [ + "hyprland", + "hyprpwcenter", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprpwcenter", + "systems" + ] + }, + "locked": { + "lastModified": 1770166889, + "narHash": "sha256-ffxABFykweSQHhSZvL2iKWKVA2rqfgw8kAHIqs1fDRQ=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "35fa4a965e0fa725fe21c289703680fd75e61211", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, + "aquamarine_3": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprshutdown", + "hyprutils" + ], + "hyprwayland-scanner": "hyprwayland-scanner_2", + "nixpkgs": [ + "hyprland", + "hyprshutdown", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprshutdown", + "systems" + ] + }, + "locked": { + "lastModified": 1772460678, + "narHash": "sha256-NYaWs8fYJ38IgFld0hGSdT2LEVhrgO8SiRReBjIH7YY=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "5d2cb726b16ee349df443f84b64cff53221b6983", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1755819240, + "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1765809053, + "narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1776754714, + "narHash": "sha256-E3OAK27smtATTmX45uoTSRsVD+Y+ZiVVfgM/tjpbtYg=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "4d508123037e7851ad36ebf7d9c48b0e9e1eb581", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1732806396, + "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + } + }, + "boot": { + "inputs": { + "crane": "crane", + "nixpkgs": [ + "nixpkgs" + ], + "pre-commit": "pre-commit", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1765382359, + "narHash": "sha256-RJmgVDzjRI18BWVogG6wpsl1UCuV6ui8qr4DJ1LfWZ8=", + "owner": "nix-community", + "repo": "lanzaboote", + "rev": "e8c096ade12ec9130ff931b0f0e25d2f1bc63607", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "v1.0.0", + "repo": "lanzaboote", + "type": "github" + } + }, + "catppuccin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1780143400, + "narHash": "sha256-jN9RJ4OeuLdCxZ1G0d4zqy0HuHnqODxxgN6pQoYfAH8=", + "owner": "catppuccin", + "repo": "nix", + "rev": "096f4670cf078d810a931fae59b57db4cc3fb4d3", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "ref": "release-26.05", + "repo": "nix", + "type": "github" + } + }, + "crane": { + "locked": { + "lastModified": 1765145449, + "narHash": "sha256-aBVHGWWRzSpfL++LubA0CwOOQ64WNLegrYHwsVuVN7A=", + "owner": "ipetkov", + "repo": "crane", + "rev": "69f538cdce5955fcd47abfed4395dc6d5194c1c5", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_2": { + "locked": { + "lastModified": 1780099841, + "narHash": "sha256-EVZd2RsbpreRUDSi9rBwPY+ZxoyMaiEBbZxxhljbaS4=", + "owner": "ipetkov", + "repo": "crane", + "rev": "0532eb17955225173906d671fb36306bdeb1e2dc", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "filters": { + "locked": { + "lastModified": 1757882181, + "narHash": "sha256-+cCxYIh2UNalTz364p+QYmWHs0P+6wDhiWR4jDIKQIU=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "59c44d1909c72441144b93cf0f054be7fe764de5", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "nix-filter", + "type": "github" + } + }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1779670703, + "narHash": "sha256-UdfMivNMwCCqQsYDg5pSz8X2IOaOrIZLIIy+Bg3CO2o=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "942159e73e40bf785816f7f1f5feed9ef3d7c8f9", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1761588595, + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_5": { + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "revCount": 69, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_6": { + "flake": false, + "locked": { + "lastModified": 1777728799, + "narHash": "sha256-z7jjYQqhkFKab92VQ3duB7QVO7f7Y62qTFrJYXO/lyo=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "4b2287113c2f9a2331c04899b2e2e5ab92dea9c5", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1778716662, + "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flatpak": { + "locked": { + "lastModified": 1767983141, + "narHash": "sha256-7ZCulYUD9RmJIDULTRkGLSW1faMpDlPKcbWJLYHoXcs=", + "owner": "gmodena", + "repo": "nix-flatpak", + "rev": "440818969ac2cbd77bfe025e884d0aa528991374", + "type": "github" + }, + "original": { + "owner": "gmodena", + "ref": "latest", + "repo": "nix-flatpak", + "type": "github" + } + }, + "formatter": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1780220602, + "narHash": "sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "db947814a175b7ca6ded66e21383d938df01c227", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, + "gaming": { + "inputs": { + "flake-parts": [ + "flake-parts" + ], + "git-hooks": "git-hooks", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1781064751, + "narHash": "sha256-KLhF1KXXGNFXQBLEZWoeMSbxHimMTYZfEilMs6azeY4=", + "owner": "fufexan", + "repo": "nix-gaming", + "rev": "7149d77f66536aaf02c845a9c2a08eb7e57a04c3", + "type": "github" + }, + "original": { + "owner": "fufexan", + "repo": "nix-gaming", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat_2", + "gitignore": "gitignore_2", + "nixpkgs": [ + "gaming", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1778507602, + "narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "boot", + "pre-commit", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_2": { + "inputs": { + "nixpkgs": [ + "gaming", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_3": { + "inputs": { + "nixpkgs": [ + "hyprland", + "hyprland", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1767737596, + "narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "ef02db02bf0ff342734d525b5767814770d85b49", + "type": "github" + }, + "original": { + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "ef02db02bf0ff342734d525b5767814770d85b49", + "type": "github" + } + }, + "hardware": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1781168557, + "narHash": "sha256-LOnLQ2tpYF9gqIDDr3+j3DbpJJr/QCH6zPRT2GzEUOE=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "6358ff76821101c178e3ab4919a62799bfe3652e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixos-hardware", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1781184346, + "narHash": "sha256-cZRlW47U6A2nWvAmnZeeO6Xvq23gxYbVLel4KxqOrcQ=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "ea6d221d7aa85652d014b6f719dddf036037515b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-26.05", + "repo": "home-manager", + "type": "github" + } + }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1753964049, + "narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.1.13", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprcursors": { + "inputs": { + "hyprland": [ + "hyprland" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1780484690, + "narHash": "sha256-G3VOjqBgsnwaYQicqC4zjaUVCdsnzZ5sMPoUOPPnfXQ=", + "owner": "VirtCode", + "repo": "hypr-dynamic-cursors", + "rev": "da447486c84e0be81f2cdd208af1ef92469f0a88", + "type": "github" + }, + "original": { + "owner": "VirtCode", + "repo": "hypr-dynamic-cursors", + "rev": "da447486c84e0be81f2cdd208af1ef92469f0a88", + "type": "github" + } + }, + "hyprgraphics": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1775430856, + "narHash": "sha256-48DubZbx8PDfuJkksNgi5aWFnX/Rq1OUaLsUvsdf2Bo=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "482d4b7ec36ffdaf3573086aa586b178fd5404be", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.5.1", + "repo": "hyprgraphics", + "type": "github" + } + }, + "hyprgraphics_2": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprpwcenter", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "hyprpwcenter", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprpwcenter", + "systems" + ] + }, + "locked": { + "lastModified": 1769284023, + "narHash": "sha256-xG34vwYJ79rA2wVC8KFuM8r36urJTG6/csXx7LiiSYU=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "13c536659d46893596412d180449353a900a1d31", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, + "hyprgraphics_3": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprshutdown", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "hyprshutdown", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprshutdown", + "systems" + ] + }, + "locked": { + "lastModified": 1772461523, + "narHash": "sha256-mI6A51do+hEUzeJKk9YSWfVHdI/SEEIBi2tp5Whq5mI=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "7d63c04b4a2dd5e59ef943b4b143f46e713df804", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, + "hypridle": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1756291201, + "narHash": "sha256-YzRWE3rCnsY0WDRJcn4KvyWUoe+5zdkUYNIaHGP9BZ4=", + "owner": "hyprwm", + "repo": "hypridle", + "rev": "5430b73ddf148651bcf35fa39ed4d757c7534028", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.1.7", + "repo": "hypridle", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprgraphics": "hyprgraphics", + "hypridle": "hypridle", + "hyprland": "hyprland_2", + "hyprland-guiutils": "hyprland-guiutils", + "hyprland-protocols": "hyprland-protocols", + "hyprland-qt-support": "hyprland-qt-support", + "hyprlang": "hyprlang", + "hyprlauncher": "hyprlauncher", + "hyprlock": "hyprlock", + "hyprpaper": "hyprpaper", + "hyprpicker": "hyprpicker", + "hyprpolkitagent": "hyprpolkitagent", + "hyprpwcenter": "hyprpwcenter", + "hyprshutdown": "hyprshutdown", + "hyprsunset": "hyprsunset", + "hyprtoolkit": "hyprtoolkit", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner_3", + "hyprwire": "hyprwire", + "nixpkgs": [ + "nixpkgs" + ], + "systems": [ + "systems" + ], + "xdph": "xdph" + }, + "locked": { + "lastModified": 1781201916, + "narHash": "sha256-AyhlQwC42O1bQWJxuM4L+sWXEt/Y9322jp3ync5wtmw=", + "owner": "hyprwm", + "repo": "hyprnix", + "rev": "f1de130218102f3b1bd252a6a115fdf350c00a0a", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprnix", + "type": "github" + } + }, + "hyprland-guiutils": { + "inputs": { + "aquamarine": [ + "hyprland", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprtoolkit": [ + "hyprland", + "hyprtoolkit" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1767023960, + "narHash": "sha256-R2HgtVS1G3KSIKAQ77aOZ+Q0HituOmPgXW9nBNkpp3Q=", + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "rev": "c2e906261142f5dd1ee0bfc44abba23e2754c660", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.2.1", + "repo": "hyprland-guiutils", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1759610243, + "narHash": "sha256-+KEVnKBe8wz+a6dTLq8YDcF3UrhQElwsYJaVaHXJtoI=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "bd153e76f751f150a09328dbdeb5e4fab9d23622", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.7.0", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprland-qt-support": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1736373635, + "narHash": "sha256-+uZovj+X0a28172y0o0BvgGXyZLpKPbG03sVlCiSrWc=", + "owner": "hyprwm", + "repo": "hyprland-qt-support", + "rev": "9d4437011b4f02e60e98a3e36c7fa14bb053b502", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.1.0", + "repo": "hyprland-qt-support", + "type": "github" + } + }, + "hyprland_2": { + "inputs": { + "aquamarine": [ + "hyprland", + "aquamarine" + ], + "hyprcursor": [ + "hyprland", + "hyprcursor" + ], + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], + "hyprland-guiutils": [ + "hyprland", + "hyprland-guiutils" + ], + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "hyprwire": [ + "hyprland", + "hyprwire" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "pre-commit-hooks": "pre-commit-hooks", + "systems": [ + "hyprland", + "systems" + ], + "xdph": [ + "hyprland", + "xdph" + ] + }, + "locked": { + "lastModified": 1781197804, + "narHash": "sha256-JbXqVzLlFp4hVD8AMl9vk3vJRN40o2DVOcZLPqGvBOk=", + "owner": "hyprwm", + "repo": "hyprland", + "rev": "a0136d8c04687bb36eb8a28eb9d1ff92aea99704", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.55.4", + "repo": "hyprland", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1767628570, + "narHash": "sha256-ZGzcH3gKD9nj8oDLV1+o6ice6kMHZRXkNx24cfyPkRs=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "3a1c1b25b059dae2c6bbc46991562ba1158d125c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.6.8", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlauncher": { + "inputs": { + "aquamarine": [ + "hyprland", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprtoolkit": [ + "hyprland", + "hyprtoolkit" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "hyprwire": [ + "hyprland", + "hyprwire" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1777159923, + "narHash": "sha256-FHw6S2rz716ZwuF661aT5HYN1b6qyyBDkwhEL5hzHUk=", + "owner": "hyprwm", + "repo": "hyprlauncher", + "rev": "c682906a0836447c27c8d974f35493d3baa79d64", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.1.6", + "repo": "hyprlauncher", + "type": "github" + } + }, + "hyprlock": { + "inputs": { + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1776505445, + "narHash": "sha256-VFlM1cN4jmUAbfmZbeg7vL+AN9miXEUqqpk5EkHNq2c=", + "owner": "hyprwm", + "repo": "hyprlock", + "rev": "d75e93f8ee1721d70549d96f4d14bf2948aab70c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.9.5", + "repo": "hyprlock", + "type": "github" + } + }, + "hyprpaper": { + "inputs": { + "aquamarine": [ + "hyprland", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprtoolkit": [ + "hyprland", + "hyprtoolkit" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "hyprwire": [ + "hyprland", + "hyprwire" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1777494113, + "narHash": "sha256-/4eWbt5XtOHzw3C9U0XPtoy8io03GxrEBd9znWMacbY=", + "owner": "hyprwm", + "repo": "hyprpaper", + "rev": "20fc0fa6c2056c388a4cd69cb394a9f989dd27c0", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.8.4", + "repo": "hyprpaper", + "type": "github" + } + }, + "hyprpicker": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1777937674, + "narHash": "sha256-ABumeksE8Bvtdb6g4vJ2jA9BLlYHnXU86VAuKJhBPoY=", + "owner": "hyprwm", + "repo": "hyprpicker", + "rev": "8c163ce9b8a40f85babe4dd6e23a238787351164", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.4.7", + "repo": "hyprpicker", + "type": "github" + } + }, + "hyprpolkitagent": { + "inputs": { + "hyprland-qt-support": [ + "hyprland", + "hyprland-qt-support" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1753969989, + "narHash": "sha256-39xQ6iitVz9KVJz6PPRR+pkS5hBogq25BDd24eUDOQg=", + "owner": "hyprwm", + "repo": "hyprpolkitagent", + "rev": "7e4054410f6d6331b239fea1c659ad6a917fbf6a", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.1.3", + "repo": "hyprpolkitagent", + "type": "github" + } + }, + "hyprpwcenter": { + "inputs": { + "aquamarine": "aquamarine_2", + "hyprgraphics": "hyprgraphics_2", + "hyprtoolkit": [ + "hyprland", + "hyprtoolkit" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1770734469, + "narHash": "sha256-HrmLl4Laizh4zd55H6ETNdxrYQvUB4n1/OC6mxwD+D0=", + "owner": "hyprwm", + "repo": "hyprpwcenter", + "rev": "2ce8f3d174f2ae1c50c7dcc182d809a5ab33cad2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.1.2", + "repo": "hyprpwcenter", + "type": "github" + } + }, + "hyprshell": { + "inputs": { + "crane": "crane_2", + "flake-parts": [ + "flake-parts" + ], + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1781132855, + "narHash": "sha256-GXegc0W2xiRuSCjMpVc5mmKP5YFCYn87M/POTalISCA=", + "owner": "H3rmt", + "repo": "hyprshell", + "rev": "61ddaa30563c1f091ca5fbe5d7203c19f42b519c", + "type": "github" + }, + "original": { + "owner": "H3rmt", + "repo": "hyprshell", + "type": "github" + } + }, + "hyprshutdown": { + "inputs": { + "aquamarine": "aquamarine_3", + "hyprgraphics": "hyprgraphics_3", + "hyprtoolkit": [ + "hyprland", + "hyprtoolkit" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1778610771, + "narHash": "sha256-msCMXV9k9+1siOPaxSzNJwx/o8pn2srCR4h0pxyW/WE=", + "owner": "hyprwm", + "repo": "hyprshutdown", + "rev": "db1f38b03b173984ae9ed3abeb9750583c9bbd91", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.1.1", + "repo": "hyprshutdown", + "type": "github" + } + }, + "hyprsplit": { + "inputs": { + "hyprland": [ + "hyprland" + ], + "nix-filter": [ + "filters" + ] + }, + "locked": { + "lastModified": 1780344895, + "narHash": "sha256-jnCF4+i/WITrySyR8U3yklZpijtZmjACoV7GVG8RnKc=", + "owner": "zjeffer", + "repo": "split-monitor-workspaces", + "rev": "6cff8cfffecf4729d1f5bacf82d96c5987f230f3", + "type": "github" + }, + "original": { + "owner": "zjeffer", + "ref": "v0.55.4", + "repo": "split-monitor-workspaces", + "type": "github" + } + }, + "hyprsunset": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1759530592, + "narHash": "sha256-Yk6nDzCXrOehX3At8qdZ0cLr1kPySqACsihMYuP6T8w=", + "owner": "hyprwm", + "repo": "hyprsunset", + "rev": "057feb7a724b7fc0f3a406d6db08b59734db006a", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.3.3", + "repo": "hyprsunset", + "type": "github" + } + }, + "hyprtoolkit": { + "inputs": { + "aquamarine": [ + "hyprland", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1777750773, + "narHash": "sha256-gJSBj4Pd4e9nERAKo/qiHqDMpS2hBfyOI0uGCbbiML4=", + "owner": "hyprwm", + "repo": "hyprtoolkit", + "rev": "795d06e76434a951855762104f2b0c8c3842e052", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.5.4", + "repo": "hyprtoolkit", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1778234770, + "narHash": "sha256-jAcsogZwWMfXT9MfXxZzkwliAqIuZUV0p71h6Ba9ReE=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "a2dbd8a4cc51f7cbe4224732668392bb1aa79df2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.13.1", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "hyprpwcenter", + "aquamarine", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprpwcenter", + "aquamarine", + "systems" + ] + }, + "locked": { + "lastModified": 1751897909, + "narHash": "sha256-FnhBENxihITZldThvbO7883PdXC/2dzW4eiNvtoV5Ao=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "fcca0c61f988a9d092cbb33e906775014c61579d", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "hyprwayland-scanner_2": { + "inputs": { + "nixpkgs": [ + "hyprland", + "hyprshutdown", + "aquamarine", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprshutdown", + "aquamarine", + "systems" + ] + }, + "locked": { + "lastModified": 1772459835, + "narHash": "sha256-978jRz/y/9TKmZb/qD4lEYHCQGHpEXGqy+8X2lFZsak=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "0a692d4a645165eebd65f109146b8861e3a925e7", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "hyprwayland-scanner_3": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1751897909, + "narHash": "sha256-FnhBENxihITZldThvbO7883PdXC/2dzW4eiNvtoV5Ao=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "fcca0c61f988a9d092cbb33e906775014c61579d", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.4.5", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "hyprwire": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1777159802, + "narHash": "sha256-AKPaKeLDy0QXRBk/XzR7RktX7CV63ejYsTUgsPdXKvg=", + "owner": "hyprwm", + "repo": "hyprwire", + "rev": "3e6865ce5fd9237b58f5b2ce5de18814df3baff5", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v0.3.1", + "repo": "hyprwire", + "type": "github" + } + }, + "impermanence": { + "inputs": { + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769548169, + "narHash": "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y=", + "owner": "nix-community", + "repo": "impermanence", + "rev": "7b1d382faf603b6d264f58627330f9faa5cba149", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "impermanence", + "type": "github" + } + }, + "import-tree": { + "locked": { + "lastModified": 1778781969, + "narHash": "sha256-Jjuz5CmSkur8KvLDoGa+vylEp+RkQtv4mt/qcMznpH0=", + "owner": "denful", + "repo": "import-tree", + "rev": "d321337efd0f23a9eb14a42adb7b2c29313ab274", + "type": "github" + }, + "original": { + "owner": "denful", + "repo": "import-tree", + "type": "github" + } + }, + "index": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1780816331, + "narHash": "sha256-0BYqs8yKWkOz2Q7+SP18N5E5gmDKSo6LSxIVIa0wWes=", + "owner": "Mic92", + "repo": "nix-index-database", + "rev": "1a2ea89c917781e88508d9fd2b507f2d2a0e173c", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "nix-index-database", + "type": "github" + } + }, + "minecraft": { + "inputs": { + "flake-compat": "flake-compat_4", + "nixpkgs": [ + "nixpkgs" + ], + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1780375694, + "narHash": "sha256-TznzgYVONg28KiSFB2rVdf/eLVIMtEQOxKt13Kzyrp8=", + "owner": "Infinidoge", + "repo": "nix-minecraft", + "rev": "e6f8bec35104ca5955efe73742da58d2823684f7", + "type": "github" + }, + "original": { + "owner": "Infinidoge", + "repo": "nix-minecraft", + "type": "github" + } + }, + "nixcord": { + "inputs": { + "flake-compat": "flake-compat_5", + "flake-parts": [ + "flake-parts" + ], + "nixpkgs": [ + "unstable" + ], + "nixpkgs-nixcord": "nixpkgs-nixcord" + }, + "locked": { + "lastModified": 1781227396, + "narHash": "sha256-NQ6e3Bsu6M0+x9R1MH+Z8GMTIu5XgSKVUkoCOS/rm0E=", + "owner": "FlameFlag", + "repo": "nixcord", + "rev": "ed326497dcdb974fcab4102e93556b2d5f9a5ba5", + "type": "github" + }, + "original": { + "owner": "FlameFlag", + "repo": "nixcord", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1780747962, + "narHash": "sha256-IX7G1dlKrOqPOImfbo7ADDfV5yU1+j+MRChI3TL4tAA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cbb5cf358f50aa6acc9efd6113b7bcfbc352cd73", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-nixcord": { + "locked": { + "lastModified": 1780453794, + "narHash": "sha256-bXMRa9VTsHSPXL4Cw8R6JJLQeY3Y/IP4+YJCYVmQ7FY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6b316287bae2ee04c9b93c8c858d930fd07d7338", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-26.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1767892417, + "narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=", + "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" + } + }, + "nur": { + "inputs": { + "flake-parts": [ + "stylix", + "flake-parts" + ], + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1779766384, + "narHash": "sha256-P7Ohnlq8b8b2fU+Sgkrej7LBTM60LBTkHleLuYzmLmU=", + "owner": "nix-community", + "repo": "NUR", + "rev": "57800b7ab648725ccd33551d01484ee14952ad3f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, + "pre-commit": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "boot", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1765016596, + "narHash": "sha256-rhSqPNxDVow7OQKi4qS5H8Au0P4S3AYbawBSmJNUtBQ=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "548fc44fca28a5e81c5d6b846e555e6b9c2a5a3c", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_3", + "gitignore": "gitignore_3", + "nixpkgs": [ + "hyprland", + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1778507602, + "narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "proprietary": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1766166768, + "narHash": "sha256-hUyn/oT50XUW6v/l4heLAUm5C4nc+YQCROad+4J1pik=", + "owner": "maydayv7", + "repo": "proprietary", + "rev": "79906e2fdeb88354f1565ce9d44b76e415052022", + "type": "github" + }, + "original": { + "owner": "maydayv7", + "repo": "proprietary", + "type": "github" + } + }, + "root": { + "inputs": { + "boot": "boot", + "catppuccin": "catppuccin", + "filters": "filters", + "flake-parts": "flake-parts", + "flatpak": "flatpak", + "formatter": "formatter", + "gaming": "gaming", + "hardware": "hardware", + "home-manager": "home-manager", + "hyprcursors": "hyprcursors", + "hyprland": "hyprland", + "hyprshell": "hyprshell", + "hyprsplit": "hyprsplit", + "impermanence": "impermanence", + "import-tree": "import-tree", + "index": "index", + "minecraft": "minecraft", + "nixcord": "nixcord", + "nixpkgs": [ + "stable" + ], + "proprietary": "proprietary", + "sops": "sops", + "spicetify": "spicetify", + "stable": "stable", + "stagit": "stagit", + "stylix": "stylix", + "systems": "systems_2", + "unstable": "unstable", + "utils": "utils_2", + "vscode": "vscode", + "windows": "windows" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "boot", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1765075567, + "narHash": "sha256-KFDCdQcHJ0hE3Nt5Gm5enRIhmtEifAjpxgUQ3mzSJpA=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "769156779b41e8787a46ca3d7d76443aaf68be6f", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "sops": { + "inputs": { + "nixpkgs": [ + "unstable" + ] + }, + "locked": { + "lastModified": 1780547341, + "narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=", + "owner": "Mic92", + "repo": "sops-nix", + "rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "sops-nix", + "type": "github" + } + }, + "spicetify": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1781101834, + "narHash": "sha256-gNVY6SYglFe37FpD+NnOjTipsqvVMM2vh/uc22KDEsA=", + "owner": "Gerg-L", + "repo": "spicetify-nix", + "rev": "0243dd6707c969fc8440216c811b3f2e4a4cceb7", + "type": "github" + }, + "original": { + "owner": "Gerg-L", + "repo": "spicetify-nix", + "type": "github" + } + }, + "stable": { + "locked": { + "lastModified": 1780902259, + "narHash": "sha256-q8yYEC5f1mFlQO9RGna4LTc9QrcvWunX6FYp83munkQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "bd0ff2d3eac24699c3664d5966b9ef36f388e2ca", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-26.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "stagit": { + "inputs": { + "nixpkgs": [ + "stable" + ], + "utils": [ + "utils" + ] + }, + "locked": { + "lastModified": 1767557231, + "narHash": "sha256-cXLrl1XCf3Mhz9UhCQxt0eZNcAOtejReiMAi/fTWn6s=", + "owner": "maydayv7", + "repo": "stagit", + "rev": "62010429c33b33ef1239638b202a745ea29e43a1", + "type": "github" + }, + "original": { + "owner": "maydayv7", + "repo": "stagit", + "type": "github" + } + }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "firefox-gnome-theme": "firefox-gnome-theme", + "flake-parts": [ + "flake-parts" + ], + "gnome-shell": "gnome-shell", + "nixpkgs": [ + "nixpkgs" + ], + "nur": "nur", + "systems": [ + "systems" + ], + "tinted-kitty": "tinted-kitty", + "tinted-schemes": "tinted-schemes", + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" + }, + "locked": { + "lastModified": 1780702455, + "narHash": "sha256-+srjPGNy67nKytYwdlepycL51IG6S34sS4MKRZXK8G0=", + "owner": "nix-community", + "repo": "stylix", + "rev": "54fa19702f4f2c7f6a981a92850678933588af9a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-26.05", + "repo": "stylix", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "flake": false, + "locked": { + "lastModified": 1707463813, + "narHash": "sha256-qUyPFG6yjwI4b3wya7aEFDYSIxf1fZeapi0dF46+pAk=", + "owner": "maydayv7", + "repo": "dotfiles", + "rev": "5d24bade1fb3e0186e28a33908519f65ec774c2d", + "type": "github" + }, + "original": { + "owner": "maydayv7", + "ref": "systems", + "repo": "dotfiles", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1735730497, + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "type": "github" + } + }, + "tinted-schemes": { + "flake": false, + "locked": { + "lastModified": 1777806186, + "narHash": "sha256-PDF0/wObw4nIsSBeXVYLsloXOiphXCgIdsrNcVXguKs=", + "owner": "tinted-theming", + "repo": "schemes", + "rev": "0c94645546f4f3ddac77a1a5fce54eb95bf50795", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "schemes", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1778379944, + "narHash": "sha256-wPDFzMGSlARlw0Sfsn48Q2+jPSfk6N0Ng6BC/d+7Q24=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "fe0203a198690e71a5ff11e08812a4673de3678d", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1778378178, + "narHash": "sha256-OXPXRIQgGwV77HjYRryOHguh4ALX96jkg+tseLkGgHA=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "9cd816033ff969415b190722cddf134e78a5665f", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" + } + }, + "unstable": { + "locked": { + "lastModified": 1781074563, + "narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_2": { + "inputs": { + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "vscode": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1781151998, + "narHash": "sha256-1DbxdcsxzTq143bDph1ueqlcmbSfbBPdiPoxY65oCGU=", + "owner": "nix-community", + "repo": "nix-vscode-extensions", + "rev": "0affb83e82ab2f7b34f3a2e4789a32190fe870e4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-vscode-extensions", + "type": "github" + } + }, + "windows": { + "inputs": { + "flake-compat": "flake-compat_6", + "nixpkgs": [ + "unstable" + ] + }, + "locked": { + "lastModified": 1780842632, + "narHash": "sha256-/k7fIVU+pDqVlr+31XF62iQRcrv8IF7x7jeo+3kOcI4=", + "owner": "emmanuelrosa", + "repo": "erosanix", + "rev": "b74371ca0e945bc772d98c75111aa42d16666645", + "type": "github" + }, + "original": { + "owner": "emmanuelrosa", + "repo": "erosanix", + "type": "github" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1777160134, + "narHash": "sha256-B7nwX0PE0KBo1/ZtuwJtA7dBG6gdPW5tSBb0skY8DHA=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "01e13c0a027a2d177df4dead76ac9d069e2cc8e6", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "ref": "v1.3.12", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix @@ -0,0 +1,274 @@ +############################################### +# ▗▄▄▄ ▗▄▄▄▄ ▄▄▄▖ # +# ▜███▙ ▜███▙ ▟███▛ # +# ▜███▙ ▜███▙▟███▛ # +# ▜███▙ ▜██████▛ # +# ▟█████████████████▙ ▜████▛ ▟▙ # +# ▟███████████████████▙ ▜███▙ ▟██▙ # +# ▄▄▄▄▖ ▜███▙ ▟███▛ # +# ▟███▛ ▜██▛ ▟███▛ # +# ▟███▛ ▜▛ ▟███▛ # +# ▟███████████▛ ▟██████████▙ # +# ▜██████████▛ ▟███████████▛ # +# ▟███▛ ▟▙ ▟███▛ # +# ▟███▛ ▟██▙ ▟███▛ # +# ▟███▛ ▜███▙ ▝▀▀▀▀ # +# ▜██▛ ▜███▙ ▜██████████████████▛ # +# ▜▛ ▟████▙ ▜████████████████▛ # +# ▟██████▙ ▜███▙ # +# ▟███▛▜███▙ ▜███▙ # +# ▟███▛ ▜███▙ ▜███▙ # +# ▝▀▀▀ ▀▀▀▀▘ ▀▀▀▘ # +# --------------------------------------- # +# Author -> V 7 <mail@maydayv7.cc> # +# License -> MIT # +# URL -> github:maydayv7/dotfiles # +# --------------------------------------- # +############################################### +{ + description = '' + My declarative, hermetic, reproducible, automated, extensible, multi-PC + NixOS Configuration and 'dotfiles' + ''; + + ## Repositories ## + inputs = { + ## Package Repositories ## + # NixOS Packages Repository + nixpkgs.follows = "stable"; + stable.url = "github:NixOS/nixpkgs?ref=nixos-26.05"; + + # Unstable Packages Repository + unstable.url = "github:NixOS/nixpkgs?ref=nixos-unstable"; + + # Packaged Games + gaming = { + url = "github:fufexan/nix-gaming"; + inputs.flake-parts.follows = "flake-parts"; + }; + + # Proprietary Software + proprietary = { + url = "github:maydayv7/proprietary"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # Personal Stagit Fork + stagit = { + url = "github:maydayv7/stagit"; + inputs = { + nixpkgs.follows = "stable"; + utils.follows = "utils"; + }; + }; + + # VS Code Extensions + vscode = { + url = "github:nix-community/nix-vscode-extensions"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + ## Configuration Modules ## + ## Language Addendum + # Supported Architectures + systems = { + url = "github:maydayv7/dotfiles?ref=systems"; + flake = false; + }; + + # Flakes Framework + flake-parts = { + url = "github:hercules-ci/flake-parts"; + inputs.nixpkgs-lib.follows = "nixpkgs"; + }; + + # Module Tree Import Functions + import-tree.url = "github:denful/import-tree"; + + # Flake Utility Functions + utils = { + url = "github:numtide/flake-utils"; + inputs.systems.follows = "systems"; + }; + + # Source Filter Functions + filters.url = "github:numtide/nix-filter"; + + # Syntax Formatter + formatter = { + url = "github:numtide/treefmt-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + ## Feature Modules + # Hardware Support + hardware.url = "github:NixOS/nixos-hardware"; + + # User Home Manager + home-manager = { + url = "github:nix-community/home-manager?ref=release-26.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # Secure Boot + boot = { + url = "github:nix-community/lanzaboote/v1.0.0"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # Authentication Credentials Manager + sops = { + url = "github:Mic92/sops-nix"; + inputs.nixpkgs.follows = "unstable"; + }; + + # Filesystem State Handler + impermanence = { + url = "github:nix-community/impermanence"; + inputs = { + nixpkgs.follows = "nixpkgs"; + home-manager.follows = "home-manager"; + }; + }; + + # Nix Index Database + index = { + url = "github:Mic92/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # Declarative Flatpak Wrapper + flatpak.url = "github:gmodena/nix-flatpak?ref=latest"; + + # Discord Module + nixcord = { + url = "github:FlameFlag/nixcord"; + inputs = { + nixpkgs.follows = "unstable"; + flake-parts.follows = "flake-parts"; + }; + }; + + # Minecraft Server + minecraft = { + url = "github:Infinidoge/nix-minecraft"; + inputs = { + nixpkgs.follows = "nixpkgs"; + systems.follows = "systems"; + }; + }; + + # Windows Apps Wrapper + windows = { + url = "github:emmanuelrosa/erosanix"; + inputs.nixpkgs.follows = "unstable"; + }; + + ## Theming + # Base16 Theming Module + stylix = { + url = "github:nix-community/stylix?ref=release-26.05"; + inputs = { + nixpkgs.follows = "nixpkgs"; + systems.follows = "systems"; + flake-parts.follows = "flake-parts"; + }; + }; + + # Spicetify Module + spicetify = { + url = "github:Gerg-L/spicetify-nix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + systems.follows = "systems"; + }; + }; + + # Catppuccin Theme + catppuccin = { + url = "github:catppuccin/nix?ref=release-26.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + ## Hyprland + # Core + hyprland = { + url = "github:hyprwm/hyprnix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + systems.follows = "systems"; + }; + }; + + # Plugins + hyprsplit = { + url = "github:zjeffer/split-monitor-workspaces/v0.55.4"; + inputs = { + hyprland.follows = "hyprland"; + nix-filter.follows = "filters"; + }; + }; + + hyprcursors = { + url = "github:VirtCode/hypr-dynamic-cursors/da447486c84e0be81f2cdd208af1ef92469f0a88"; + inputs = { + nixpkgs.follows = "nixpkgs"; + hyprland.follows = "hyprland"; + }; + }; + + # Launcher + hyprshell = { + url = "github:H3rmt/hyprshell"; + inputs = { + nixpkgs.follows = "nixpkgs"; + home-manager.follows = "home-manager"; + flake-parts.follows = "flake-parts"; + }; + }; + }; + + ## Configuration ## + outputs = inputs: + inputs.flake-parts.lib.mkFlake {inherit inputs;} + # Auto-import all flake-parts modules from ./modules + { + imports = [ + (inputs.import-tree ./modules) + ./files/_module.nix + ./lib/_module.nix + ./packages/_module.nix + ./secrets/_module.nix + ./site/_module.nix + ]; + }; + + ## Nix Configuration ## + nixConfig = { + commit-lockfile-summary = "chore(flake): Update `inputs`"; + + # Binary Caches + trusted-substituters = [ + "https://maydayv7-dotfiles.cachix.org" + "https://cache.nixos.org" + "https://nixpkgs-unfree.cachix.org" + "https://nix-community.cachix.org" + "https://cache.flox.dev" + "https://nix-gaming.cachix.org" + "https://hyprland.cachix.org" + "https://catppuccin.cachix.org" + ]; + + # Public Keys + trusted-public-keys = [ + "maydayv7-dotfiles.cachix.org-1:dpECO0Z2ZMttY6JgWHuAR5M7cqeyfFjUsvHdnMz+j6U=" + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs=" + "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + "catppuccin.cachix.org-1:noG/4HkbhJb+lUAdKrph6LaozJvAeEEZj4N732IysmU=" + ]; + }; +} diff --git a/lib/README.md b/lib/README.md @@ -0,0 +1,24 @@ +### Custom Library Functions + +The `lib` directory contains custom-made utility functions (exposed as the `util` [`flake-parts`](https://flake.parts/) option), created in order to simplify the configuration and conveniently define and support multiple use-cases. The following is a summary of all the present functions: + +[`util`](./_module.nix) - + +- [`build`](./build.nix): Configuration building functions for efficient system management and declaration - + - `mime`: Builds and sets `mimetype` values for specified application + - `script`: Builds script from specified file by removing `shebangs` and exporting as a _string_ + - `theme`: Builds specified file by replacing placeholders with provided theming elements + +- [`map`](./map.nix): Mapping functions primarily aimed at shortening code complexity - + - `array`: Maps required parameter to all elements present in `list` + - `filter`: Filters out unneeded `attrs` and maps required ones to specified function + - `files`: Maps all files with a particular extension adhering to a particular condition stored in a directory as an `attrset` acted upon by specified function. Enable `recursive` in order to recursively search inside directories + - `folder`: Maps all files with a particular extension stored in a directory to a given path as an `attrset` acted upon by specified function. Use `replace` in order to modify placeholder text + - `modules`: Maps all configuration modules stored in a directory as an `attrset` acted upon by specified function + - `list`: Maps all configuration files stored in a directory into a list for easy import + - `name`: Same as `list`, but maps file names instead of paths + - `patches`: Maps all file patches stored in a directory, if available + - `secrets`: Maps binary `sops` encrypted secrets stored in a directory + +- [`types`](./types.nix): Custom module option types - + - `configuration`: A `submodule` describing a buildable configuration, used to declare `configurations.nixos` and `configurations.homeManager` diff --git a/lib/_mime.nix b/lib/_mime.nix @@ -0,0 +1,296 @@ +{ + appimage = ["application/x-executable"]; + + archive = [ + "application/x-7z-compressed" + "application/x-7z-compressed-tar" + "application/x-bzip" + "application/x-bzip-compressed-tar" + "application/x-compress" + "application/x-compressed-tar" + "application/x-cpio" + "application/x-gzip" + "application/x-lha" + "application/x-lzip" + "application/x-lzip-compressed-tar" + "application/x-lzma" + "application/x-lzma-compressed-tar" + "application/x-tar" + "application/x-tarz" + "application/x-xar" + "application/x-xz" + "application/x-xz-compressed-tar" + "application/zip" + "application/gzip" + "application/bzip2" + "application/vnd.rar" + ]; + + audio = [ + "audio/aac" + "audio/flac" + "audio/mp3" + "audio/mpeg" + "audio/ogg" + "audio/opus" + "audio/wav" + "audio/webm" + "audio/x-aac" + "audio/x-aiff" + "audio/x-ape" + "audio/x-flac" + "audio/x-m4a" + "audio/x-m4b" + "audio/x-matroska" + "audio/x-mp1" + "audio/x-mp2" + "audio/x-mp3" + "audio/x-mpeg" + "audio/x-mpegurl" + "audio/x-mpg" + "audio/x-opus+ogg" + "audio/x-pn-aiff" + "audio/x-pn-au" + "audio/x-pn-wav" + "audio/x-speex" + "audio/x-vorbis" + "audio/x-vorbis+ogg" + "audio/x-wavpack" + ]; + + browser = [ + "application/x-extension-htm" + "application/x-extension-html" + "application/x-extension-shtml" + "application/x-extension-xht" + "application/x-extension-xhtml" + "application/xhtml+xml" + "text/html" + "x-scheme-handler/about" + "x-scheme-handler/ftp" + "x-scheme-handler/http" + "x-scheme-handler/https" + "x-scheme-handler/unknown" + ]; + + calendar = [ + "text/calendar" + "x-scheme-handler/webcal" + ]; + + code = [ + "application/json" + "application/toml" + "application/x-shellscript" + "application/x-yaml" + "text/x-c" + "text/x-c++" + "text/x-c++src" + "text/x-chdr" + "text/x-cmake" + "text/x-java" + "text/x-lua" + "text/x-makefile" + "text/x-markdown" + "text/x-nix" + "text/x-python" + "text/x-rust" + "text/x-scala" + "text/x-shellscript" + "text/x-toml" + "text/x-yaml" + ]; + + directory = ["inode/directory"]; + + document = [ + "application/illustrator" + "application/oxps" + "application/postscript" + "application/vnd.comicbook-rar" + "application/vnd.comicbook+zip" + "application/vnd.ms-xpsdocument" + "application/x-bzpdf" + "application/x-bzpostscript" + "application/x-cb7" + "application/x-cbr" + "application/x-cbt" + "application/x-cbz" + "application/x-ext-cb7" + "application/x-ext-cbr" + "application/x-ext-cbt" + "application/x-ext-cbz" + "application/x-ext-djv" + "application/x-ext-djvu" + "application/x-ext-eps" + "application/x-ext-pdf" + "application/x-ext-ps" + "application/x-gzpdf" + "application/x-gzpostscript" + "application/x-xzpdf" + "image/vnd.djvu" + "image/x-bzeps" + "image/x-eps" + "image/x-gzeps" + ]; + + font = [ + "application/vnd.ms-opentype" + "application/x-font-ttf" + "font/otf" + "font/ttf" + "font/woff" + "font/woff2" + ]; + + image = [ + "image/avif" + "image/bmp" + "image/gif" + "image/heic" + "image/heif" + "image/jpeg" + "image/jpg" + "image/jxl" + "image/png" + "image/svg+xml-compressed" + "image/svg+xml" + "image/tiff" + "image/vnd-ms.dds" + "image/vnd.microsoft.icon" + "image/vnd.microsoft.icon" + "image/vnd.radiance" + "image/webp" + "image/x-dds" + "image/x-exr" + "image/x-icon" + "image/x-portable-anymap" + "image/x-portable-bitmap" + "image/x-portable-graymap" + "image/x-portable-pixmap" + "image/x-qoi;image/svg+xml" + "image/x-tga" + ]; + + latex = ["text/x-tex"]; + + magnet = ["x-scheme-handler/magnet"]; + + mail = ["x-scheme-handler/mailto"]; + + markdown = ["text/markdown"]; + + office = [ + "application/rtf" + "application/vnd.oasis.opendocument.text" + "application/vnd.oasis.opendocument.spreadsheet" + "application/vnd.oasis.opendocument.presentation" + "application/vnd.openxmlformats-officedocument.wordprocessingml.document" + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + "application/vnd.openxmlformats-officedocument.presentationml.presentation" + "application/msword" + "application/vnd.ms-excel" + "application/vnd.ms-powerpoint" + ]; + + password = [ + "application/x-keepass2" + "application/x-keepass" + ]; + + pdf = ["application/pdf"]; + + text = [ + "text/plain" + "text/css" + "text/ecmascript" + "text/javascript" + "text/x-script.python" + "text/x-script.sh" + "text/x-script.zsh" + "text/xml" + ]; + + video = [ + "application/mxf" + "application/ogg" + "application/ram" + "application/sdp" + "application/smil" + "application/smil+xml" + "application/vnd.apple.mpegurl" + "application/vnd.ms-asf" + "application/vnd.ms-wpl" + "application/vnd.rn-realmedia-vbr" + "application/vnd.rn-realmedia" + "application/x-extension-mp4" + "application/x-flash-video" + "application/x-matroska" + "application/x-netshow-channel" + "application/x-ogg" + "application/x-quicktime-media-link" + "application/x-quicktimeplayer" + "application/x-shorten" + "application/x-smil" + "application/xspf+xml" + "video/3gp" + "video/3gpp" + "video/3gpp2" + "video/divx" + "video/dv" + "video/fli" + "video/mp2t" + "video/mp4" + "video/mp4v-es" + "video/mpeg-system" + "video/mpeg" + "video/msvideo" + "video/ogg" + "video/quicktime" + "video/vivo" + "video/vnd.divx" + "video/vnd.rn-realvideo" + "video/vnd.vivo" + "video/webm" + "video/x-anim" + "video/x-avi" + "video/x-flc" + "video/x-fli" + "video/x-flic" + "video/x-flv" + "video/x-m4v" + "video/x-matroska" + "video/x-mpeg" + "video/x-mpeg2" + "video/x-ms-asf-plugin" + "video/x-ms-asf" + "video/x-ms-asx" + "video/x-ms-wm" + "video/x-ms-wmv" + "video/x-ms-wmx" + "video/x-ms-wvx" + "video/x-msvideo" + "video/x-nsv" + "video/x-ogm+ogg" + "video/x-theora" + "video/x-theora+ogg" + "video/x-totem-stream" + "x-content/video-dvd" + "x-content/video-svcd" + "x-content/video-vcd" + "x-scheme-handler/icy" + "x-scheme-handler/icyx" + "x-scheme-handler/mmsh" + "x-scheme-handler/net" + "x-scheme-handler/pnm" + "x-scheme-handler/rtmp" + "x-scheme-handler/uvox" + ]; + + virtualization = [ + "application/x-cd-image" + "application/x-qemu-disk" + "application/x-virtualbox-hdd" + "application/x-virtualbox-vbox" + ]; +} diff --git a/lib/_module.nix b/lib/_module.nix @@ -0,0 +1,14 @@ +## Custom Library Functions ## +{lib, ...}: { + options.util = lib.mkOption { + type = lib.types.anything; + readOnly = true; + description = "Custom utility library functions"; + }; + + config.util = { + map = import ./map.nix lib; + build = import ./build.nix lib; + types = import ./types.nix lib; + }; +} diff --git a/lib/build.nix b/lib/build.nix @@ -0,0 +1,108 @@ +## Builder Functions ## +lib: let + inherit + (builtins) + concatStringsSep + filter + hasAttr + listToAttrs + map + readFile + ; + + inherit + (lib) + flatten + hasPrefix + mapAttrsToList + nameValuePair + replaceStrings + splitString + ; +in { + # Mime Types Handler + mime = option: + listToAttrs ( + flatten ( + mapAttrsToList ( + name: types: + if hasAttr name option + then map (type: nameValuePair type option."${name}") types + else [] + ) (import ./_mime.nix) + ) + ); + + # Script Builder + script = file: + concatStringsSep "\n" ( + (filter (line: line != "" && !(hasPrefix "#!" line))) (splitString "\n" (readFile file)) + ); + + # Theme Substituter + theme = { + accent ? "base0D", + colors ? null, + fonts ? null, + file, + }: let + color = [ + "@accent" + "@white" + "@base00" + "@base01" + "@base02" + "@base03" + "@base04" + "@base05" + "@base06" + "@base07" + "@base08" + "@base09" + "@base0A" + "@base0B" + "@base0C" + "@base0D" + "@base0E" + "@base0F" + ]; + + color' = with colors; [ + colors."${accent}" + "FFFFFF" + base00 + base01 + base02 + base03 + base04 + base05 + base06 + base07 + base08 + base09 + base0A + base0B + base0C + base0D + base0E + base0F + ]; + + font = [ + "@font" + "@monospace" + ]; + + font' = with fonts; [ + sansSerif.name + monospace.name + ]; + in + if (colors != null && fonts != null) + then replaceStrings (color ++ font) (color' ++ font') file + else if (colors != null) + then replaceStrings color color' file + else if (fonts != null) + then replaceStrings font font' file + else throw "One of 'colors' or 'fonts' must be declared"; +} diff --git a/lib/map.nix b/lib/map.nix @@ -0,0 +1,140 @@ +## Mapping Functions ## +lib: let + inherit + (builtins) + attrNames + attrValues + isPath + pathExists + readDir + readFile + toString + typeOf + ; + + inherit + (lib) + flatten + filterAttrs + forEach + getAttrFromPath + hasPrefix + hasSuffix + id + mapAttrs' + mapAttrsToList + nameValuePair + removeSuffix + replaceStrings + ; + + # Import Checks + checkName = name: _: !(hasPrefix "_" name); + checkAttr = name: let + type = typeOf (import name); + in + type == "set" || type == "lambda"; +in rec { + array = list: func: forEach list (name: getAttrFromPath [name] func); + filter = name: func: attrs: + filterAttrs (_: type: type != null) (mapAttrs' func (filterAttrs name attrs)); + + ## Files Map + files = { + directory, + recursive ? false, + apply ? id, + extension, + check ? (_: true), + }: + filter checkName ( + name: type: let + path = "${toString directory}/${name}"; + in + if (type == "directory" || type == "symlink") && recursive + then + nameValuePair name (files { + inherit path apply; + }) + else if + (type == "directory" || type == "symlink") + && ( + if (extension == ".nix") + then pathExists "${path}/default.nix" + else true + ) + then nameValuePair name (apply path) + else if + type + == "regular" + && ( + if (extension == ".nix") + then name != "default.nix" && name != "flake.nix" + else true + ) + && hasSuffix extension name + && (check path) + then nameValuePair (removeSuffix extension name) (apply path) + else nameValuePair "" null + ) (readDir directory); + + # Module Imports + modules = { + __functor = _: directory: apply: + files { + inherit directory apply; + extension = ".nix"; + check = checkAttr; + }; + + list = path: attrValues (modules path id); + name = path: attrNames (modules path id); + }; + + # Configuration Folder Creation + folder = { + directory, + path, + extension ? "", + apply, + replace ? { + placeholders = {}; + values = {}; + }, + }: + mapAttrs' (name: value: nameValuePair "${path}/${name}${extension}" (apply value)) (files { + inherit directory extension; + apply = file: with replace; replaceStrings placeholders values (readFile file); + }); + + # Package Patches + patches = patch: + if isPath patch + then + flatten ( + mapAttrsToList ( + name: type: + if type == "regular" && (hasSuffix ".diff" name || hasSuffix ".patch" name) + then patch + "/${name}" + else null + ) (readDir patch) + ) + else patch; + + # 'sops' Encrypted Secrets + secrets = { + directory, + neededForUsers ? false, + }: + filter checkName ( + name: type: + if type == "regular" && hasSuffix ".secret" name + then + nameValuePair name { + sopsFile = directory + "/${name}"; + format = "binary"; + inherit neededForUsers; + } + else nameValuePair "" null + ) (readDir directory); +} diff --git a/lib/types.nix b/lib/types.nix @@ -0,0 +1,15 @@ +## Custom Types ## +lib: { + # Flake configurations + configuration = lib.types.submodule { + options = { + module = lib.mkOption { + type = lib.types.deferredModule; + }; + system = lib.mkOption { + type = lib.types.str; + default = "x86_64-linux"; + }; + }; + }; +} diff --git a/modules/README.md b/modules/README.md @@ -0,0 +1,177 @@ +# Configuration Modules + +The `modules` directory contains the custom configuration modules that form the very core of my configuration for multiple PCs and various use-cases, that follows the [dendritic](https://github.com/mightyiam/dendritic) pattern: + +- Directories are purely organizational +- Files prefixed with `_` are not auto-imported +- [`core`](./core): `flake-parts` plumbing that wires everything together +- [`hosts`](./hosts): per-device configuration, declared as `configurations.nixos.<host>` and `configurations.homeManager.<user@host>`, composing the modules below +- [`users`](./users/): user-specific Home Manager configurations + +## Module List + +An overview of every configuration module in this repository. + +**Type** indicates whether a module extends `flake.modules.nixos`, `flake.modules.homeManager`, or both. + +**★** marks modules imported by default + +### [`apps`](./apps) + +| Module | Type | Description | +| ------------- | ------------ | ---------------------------------- | +| `auth` | Home Manager | Authentication credential managers | +| `discord` | Home Manager | Discord chat client | +| `firefox` | Home Manager | Firefox browser | +| `internet` | Home Manager | Internet apps | +| `notes` | Home Manager | Logseq note-taking | +| `spotify` | Home Manager | Spotify music client | +| `stream` | Home Manager | Streaming tools | +| `syncthing` | Home Manager | Syncthing file sync | +| `youtube` | Home Manager | YouTube Music & TUI | +| `vscode` | Home Manager | Visual Studio Code editor | +| `flatpak` | Both | Flatpak app sandboxing | +| `latex` | Both | LaTeX typesetting | +| `office` | Both | Office suite environment | +| `tools` | Both | General CLI/GUI tools | +| `wine` | Both | Wine Windows compatibility | +| `git` | Both | `git` version control | +| `git-hosting` | NixOS | Gitea code hosting | +| `git-runner` | NixOS | GitHub/GitLab CI runner | + +### [`desktop`](./desktop) + +| Module | Type | Description | +| ---------- | ---- | ------------------------- | +| `gnome` | Both | GNOME desktop environment | +| `hyprland` | Both | Hyprland window manager | + +### [`games`](./games) + +| Module | Type | Description | +| ----------- | ------------ | ---------------------------------- | +| `games` | Both | Gaming environment (Lutris, Steam) | +| `minecraft` | Home Manager | Minecraft client | +| `osu` | Home Manager | osu! rhythm game | +| `mc-server` | NixOS | Minecraft server | +| `roblox` | NixOS | Roblox client | + +### [`gui`](./gui) + +| Module | Type | Description | +| --------- | ----- | ------------------- | +| `theme` ★ | Both | System-wide theming | +| `fonts` ★ | NixOS | System fonts | +| `gtk` | Both | GTK theming | +| `qt` | Both | Qt theming | + +### [`hardware`](./hardware) + +| Module | Type | Description | +| ------------ | ----- | ------------------- | +| `cpu` ★ | NixOS | CPU configuration | +| `gpu` ★ | NixOS | GPU configuration | +| `laptop` | Both | Laptop tweaks | +| `mouse` | Both | Mouse configuration | +| `mobile` | NixOS | Mobile firmware | +| `printer` | NixOS | Printer firmware | +| `blockchain` | NixOS | Blockchain support | + +### [`shell`](./shell) + +| Module | Type | Description | +| ------------- | ----- | ------------------- | +| `shell` ★ | Both | Shell configuration | +| `shell-utils` | Both | Shell utilities | +| `prompt` | NixOS | Shell prompt | + +### [`system`](./system) + +| Module | Type | Description | +| ------------ | ----- | ----------------------------------- | +| `base` ★ | Both | Base system configuration | +| `nix` ★ | Both | Nix daemon & settings | +| `user` ★ | Both | User accounts & Home Manager wiring | +| `filesystem` | Both | File system layout | +| `base-ext` | NixOS | Extended base configuration | +| `boot` | NixOS | Boot loader configuration | +| `security` | NixOS | Security & hardening | + +### [`virt`](./virt) + +| Module | Type | Description | +| --------- | ----- | --------------------------- | +| `libvirt` | Both | Libvirt/QEMU virtualisation | +| `android` | NixOS | Android virtualisation | +| `docker` | NixOS | Docker containers | +| `vfio` | NixOS | VFIO GPU passthrough | + +### [`secrets`](../secrets) + +| Module | Type | Description | +| ----------- | ----- | ------------------ | +| `secrets` ★ | NixOS | Secrets management | + +## Options + +The following are the custom configuration options exposed by the modules above: + +- [`apps`](./apps) - + - `git` - + - `hosting` - + - `enable`: Enable Gitea Code Hosting - `true / false` + - `domain`: Website Domain Name - Ex. `maydayv7.cc` + - `secret`: Path to Cloudflare Authentication Credentials + - `runner` - + - `support`: Enable Support for `git` Runners - `null / "github" / "gitlab"` + - `secret`: Path to Secret for `git` Runner + - `wine` - + - `utilities`: Install Utility Windows apps - `true / false` + - `package`: Package to use for `wine` - Ex. `pkgs.wineWow64Packages.stagingFull` + +- [`games`](./games) - + - `mc-servers`: List of Minecraft Servers - + - `name`: Unique server name + - `type`: Server Type - `"fabric" / "skyblock"` + - `memory`: Memory (GB) allocated to server - Ex. `12` + - `config`: Server Properties (See [here](https://minecraft.fandom.com/wiki/Server.properties)) + - `port`: Main server TCP port - Ex. `25565` + - `vc-port`: Port for [Simple Voice Chat](https://modrinth.com/plugin/simple-voice-chat) - Ex. `24454` + +- [`gui`](./gui) - + - `enable`: Enable Graphical Desktop Session - `true / false` + - `fancy`: Enable Fancy GUI Effects - `true / false` + - `display`: Main GUI Display - Ex. `"HDMI-A-1"` + - `wallpaper`: Desktop Wallpaper Choice (taken from `files.wallpapers`) + +- [`hardware`](./hardware) - + - `cpu` - + - `model`: CPU Model - `"" / "amd" / "intel"` + - `cores`: Number of CPU Cores - Ex. `4` + - `mode`: CPU Frequency Governor Mode - `"ondemand" / "performance" / "powersave"` + - `gpu` - + - `enable`: Discrete GPU Support - `true / false` + - `model`: Discrete GPU Model - `null / "nvidia"` + +- [`system`](./system) - + - `kernel`: Linux Kernel Variant to be used - `"lts" / "variant"` + - `kernelModules`: Linux Kernel Modules to load + - `scheme`: Supported Boot Firmware Scheme - `null / "mbr" / "efi" / "secure"` + - `fs` - + - `scheme`: Disk Filesystem Scheme - `null / "simple" / "advanced"` + - `persist`: System Files to preserve across reboots (while using the `advanced` File System Layout) + - `nix` - + - `index`: Enable Package Indexer - `true / false` + - `tools`: Enable Additional Nix Tools - `true / false` + +- [`virt`](./virt) - + - `vfio` - + - `setup`: Enable VFIO Setup Mode - `true / false` + - `passthrough`: PCI Device IDs for VFIO - Ex. `[ "10de:28e0" "10de:22be" ]` + +- [`user`](./system/user) - + - `credentials`: Individual User Credentials - + - `name`: Alternative (Work) User Name + - `fullname`: Full User Name + - `mail`: User Mail ID - Ex. `"user@email.com"` + - `key`: User GPG Key - Ex. `"CF616EB19C2765E4"` diff --git a/modules/apps/auth.nix b/modules/apps/auth.nix @@ -0,0 +1,22 @@ +## Auth Credential Programs ## +{config, ...}: let + inherit (config) util; +in { + flake.modules.homeManager.auth = {pkgs, ...}: { + home.packages = [pkgs.ente-auth]; + programs.keepassxc = { + enable = true; + autostart = false; + }; + + xdg.mimeApps.defaultApplications = util.build.mime { + password = ["org.keepassxc.KeePassXC.desktop"]; + }; + + home.persist.directories = [ + ".config/keepassxc" + ".cache/keepassxc" + ".local/share/io.ente.auth" + ]; + }; +} diff --git a/modules/apps/discord.nix b/modules/apps/discord.nix @@ -0,0 +1,87 @@ +## Discord Configuration ## +{inputs, ...}: { + flake.modules.homeManager.discord = { + pkgs, + lib, + osConfig ? {}, + ... + }: let + isGnome = osConfig.services.desktopManager.gnome.enable or false; + in { + imports = [inputs.nixcord.homeModules.nixcord]; + home.persist.directories = [".config/vesktop"]; + programs.nixcord = { + enable = true; + discord.enable = false; + vesktop = { + enable = true; + package = pkgs.vesktop; + }; + + # Theming + quickCss = + lib.mkIf isGnome + ''@import url("https://raw.githubusercontent.com/ricewind012/discord-gnome-theme/master/gnome.theme.css");''; + + config = { + useQuickCss = true; + frameless = false; + transparent = false; + + # Vencord Plugins + plugins = { + betterFolders = { + enable = true; + showFolderIcon = 2; + closeAllHomeButton = true; + }; + betterGifAltText.enable = true; + betterGifPicker.enable = true; + betterRoleContext.enable = true; + betterSessions.enable = true; + betterSettings.enable = true; + biggerStreamPreview.enable = true; + blurNsfw.enable = true; + copyEmojiMarkdown.enable = true; + copyFileContents.enable = true; + copyUserUrls.enable = true; + crashHandler.enable = true; + decor.enable = true; + expressionCloner.enable = true; + favoriteEmojiFirst.enable = true; + favoriteGifSearch.enable = true; + fixImagesQuality.enable = true; + fixSpotifyEmbeds.enable = true; + friendsSince.enable = true; + fullSearchContext.enable = true; + imageZoom.enable = true; + memberCount.enable = true; + mentionAvatars.enable = true; + messageClickActions.enable = true; + messageLinkEmbeds.enable = true; + pinDms.enable = true; + platformIndicators.enable = true; + previewMessage.enable = true; + quickMention.enable = true; + readAllNotificationsButton.enable = true; + relationshipNotifier.enable = true; + replyTimestamp.enable = true; + serverInfo.enable = true; + serverListIndicators.enable = true; + showHiddenChannels.enable = true; + showHiddenThings.enable = true; + showMeYourName.enable = true; + showTimeoutDuration.enable = true; + typingTweaks.enable = true; + validUser.enable = true; + voiceChatDoubleClick.enable = true; + voiceDownload.enable = true; + voiceMessages.enable = true; + volumeBooster.enable = true; + webKeybinds.enable = true; + webScreenShareFixes.enable = true; + }; + }; + }; + }; +} diff --git a/modules/apps/firefox.nix b/modules/apps/firefox.nix @@ -0,0 +1,121 @@ +## Firefox Browser Configuration ## +{config, ...}: let + inherit (config) util; +in { + flake.modules.homeManager.firefox = {pkgs, ...}: { + xdg.mimeApps.defaultApplications = util.build.mime { + browser = ["firefox.desktop"]; + }; + + home = { + sessionVariables."MOZ_USE_XINPUT2" = "1"; + persist.directories = [ + ".cache/mozilla/firefox" + ".config/mozilla/firefox" + ]; + }; + + programs.firefox = { + enable = true; + package = pkgs.firefox; + + # Policies + policies = { + DisableTelemetry = true; + DisableFirefoxStudies = true; + DisablePocket = true; + EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + + # Extensions + ExtensionSettings = let + extension = shortId: uuid: { + name = uuid; + value = { + installation_mode = "normal_installed"; + install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi"; + }; + }; + in + builtins.listToAttrs [ + (extension "clearurls" "{74145f27-f039-47ce-a470-a662b129930a}") + (extension "darkreader" "addon@darkreader.org") + (extension "setupvpn" "@setupvpncom") + (extension "stylus" "{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}") + (extension "tabliss" "extension@tabliss.io") + (extension "uaswitcher" "user-agent-switcher@ninetailed.ninja") + (extension "ublock-origin" "uBlock0@raymondhill.net") + ]; + }; + + profiles.default = { + isDefault = true; + containersForce = true; + + ## Flags + settings = { + # General + "browser.disableResetPrompt" = true; + "browser.onboarding.enabled" = false; + "browser.aboutConfig.showWarning" = false; + "browser.shell.checkDefaultBrowser" = false; + "browser.sessionstore.interval" = "1800000"; + "browser.toolbars.bookmarks.visibility" = "always"; + "browser.urlbar.showSearchSuggestionsFirst" = false; + "browser.urlbar.speculativeConnect.enabled" = false; + "browser.urlbar.dnsResolveSingleWordsAfterSearch" = 0; + "browser.search.openintab" = true; + + # Features + "layout.spellcheckDefault" = 2; + + # New Tab + "browser.newtabpage.activity-stream.feeds.section.highlights" = false; + "browser.newtabpage.activity-stream.feeds.section.topstories" = false; + "browser.newtabpage.activity-stream.feeds.topsites" = false; + "browser.newtabpage.activity-stream.showSearch" = true; + "browser.newtabpage.activity-stream.showSponsored" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; + "browser.newtabpage.activity-stream.feeds.section.highlights.includePocket" = false; + + # Theming + "browser.uidensity" = 0; + "devtools.theme" = "dark"; + "layers.acceleration.force-enabled" = true; + "mozilla.widget.use-argb-visuals" = true; + "svg.context-properties.content.enabled" = true; + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + + # Passwords + "signon.autofillForms" = false; + "signon.rememberSignons" = false; + "signon.generation.enabled" = false; + "signon.management.page.breach-alerts.enabled" = false; + + # Extensions + "extensions.pocket.enabled" = false; + "extensions.htmlaboutaddons.inline-options.enabled" = false; + "extensions.htmlaboutaddons.recommendations.enabled" = false; + + # Security + "security.family_safety.mode" = 0; + "security.pki.sha1_enforcement_level" = 1; + "security.tls.enable_0rtt_data" = false; + + # Reports + "breakpad.reportURL" = ""; + "browser.crashReports.unsubmittedCheck.autoSubmit2" = false; + "browser.tabs.crashReporting.sendReport" = false; + "datareporting.healthreport.service.enabled" = false; + "datareporting.healthreport.uploadEnabled" = false; + "datareporting.policy.dataSubmissionEnabled" = false; + }; + }; + }; + }; +} diff --git a/modules/apps/flatpak.nix b/modules/apps/flatpak.nix @@ -0,0 +1,80 @@ +## Flatpak Configuration ## +{inputs, ...}: { + flake.modules = { + nixos.flatpak = { + config, + lib, + pkgs, + ... + }: let + isGnome = config.services.desktopManager.gnome.enable or false; + in { + imports = [inputs.flatpak.nixosModules.nix-flatpak]; + + xdg.portal.enable = true; + environment.persist.directories = ["/var/lib/flatpak"]; + system.activationScripts.updateDesktopDatabase.text = "${pkgs.desktop-file-utils}/bin/update-desktop-database /var/lib/flatpak/exports/share/applications"; + + services.flatpak = { + enable = true; + uninstallUnmanaged = true; + + remotes = + [ + { + name = "flathub"; + location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; + } + { + name = "flathub-beta"; + location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo"; + } + ] + ++ lib.optionals isGnome [ + { + name = "gnome-nightly"; + location = "https://nightly.gnome.org/gnome-nightly.flatpakrepo"; + } + ]; + + packages = [ + { + appId = "com.github.tchx84.Flatseal"; + origin = "flathub"; + } + ]; + + overrides.global = { + Context = { + filesystems = [ + "~/.config/dconf:ro" + "/run/current-system/sw/share/themes:ro" + ]; + sockets = [ + "wayland" + "!x11" + "fallback-x11" + ]; + }; + Environment = { + "DCONF_USER_CONFIG_DIR" = ".config/dconf"; + "GTK_THEME" = config.gui.gtk.theme.name or ""; + }; + }; + + update = { + onActivation = false; + auto.enable = false; + }; + }; + }; + + homeManager.flatpak = _: { + home.persist.directories = [ + ".cache/flatpak" + ".local/share/flatpak" + ".var/app" + ]; + }; + }; +} diff --git a/modules/apps/git/git-hosting.nix b/modules/apps/git/git-hosting.nix @@ -0,0 +1,130 @@ +## Gitea Code Hosting ## +_: { + flake.modules.nixos.git-hosting = { + config, + options, + lib, + ... + }: let + inherit + (lib) + mkEnableOption + mkIf + mkOption + types + ; + inherit (config.apps.git.hosting) enable domain secret; + opt = options.apps.git.hosting; + in { + options.apps.git.hosting = { + enable = mkEnableOption "Enable Gitea Code Hosting"; + domain = mkOption { + description = "Website Domain Name"; + type = types.str; + default = ""; + example = "maydayv7.net"; + }; + secret = mkOption { + description = "Path to Cloudfare Authentication Credentials"; + type = types.str; + default = ""; + }; + }; + + config = mkIf enable { + assertions = [ + { + assertion = domain != ""; + message = opt.domain.description + " must be set"; + } + { + assertion = secret != ""; + message = opt.secret.description + " must be set"; + } + ]; + + # User Configuration + users.users.git = { + useDefaultShell = true; + home = "/var/lib/gitea"; + group = "gitea"; + isSystemUser = true; + }; + + # Gitea Settings + services.gitea = { + enable = true; + lfs.enable = true; + + # Security + user = "git"; + database.user = "git"; + cookieSecure = true; + disableRegistration = true; + + # Repository + inherit domain; + appName = "Code Hosting"; + rootUrl = "https://${domain}"; + httpPort = 7000; + settings.ui.DEFAULT_THEME = "arc-green"; + }; + + # NGINX Secured Reverse Proxy + environment.persist.directories = ["/srv"]; + networking.firewall = { + allowedUDPPorts = [7000]; + allowedTCPPorts = [ + 80 + 443 + 7000 + ]; + }; + + security.acme = { + acceptTerms = true; + email = "accounts+acme@${domain}"; + certs."${domain}" = { + group = "nginx"; + email = "admin@${domain}"; + dnsProvider = "cloudflare"; + credentialsFile = secret; + extraLegoFlags = ["--dns.resolvers=8.8.8.8:53"]; + }; + }; + + services.nginx = { + enable = true; + + # Security + clientMaxBodySize = "1g"; + commonHttpConfig = '' + client_body_buffer_size 4k; + large_client_header_buffers 2 4k; + map $sent_http_content_type $expires { + default off; + text/html 10m; + text/css max; + application/javascript max; + application/pdf max; + ~image/ max; + } + ''; + + # Recommended Defaults + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + + # Code Hosting + virtualHosts."${domain}" = { + forceSSL = true; + useACMEHost = "${domain}"; + root = "/srv/www/${domain}"; + locations."/".proxyPass = "http://127.0.0.1:7000"; + }; + }; + }; + }; +} diff --git a/modules/apps/git/git-runner.nix b/modules/apps/git/git-runner.nix @@ -0,0 +1,74 @@ +## GitHub/GitLab CI Runner Configuration ## +{config, ...}: let + inherit (config.flake) files; +in { + flake.modules.nixos.git-runner = { + config, + lib, + pkgs, + ... + }: let + inherit + (lib) + mkIf + mkMerge + mkOption + types + ; + inherit (config.apps.git) runner; + in { + options.apps.git.runner = { + support = mkOption { + description = "Support for 'git' Runners"; + type = types.nullOr ( + types.enum [ + "github" + "gitlab" + ] + ); + default = null; + }; + secret = mkOption { + description = "Path to Secret for 'git' Runner"; + type = types.str; + default = ""; + }; + }; + + config = mkIf (runner.support != null) (mkMerge [ + { + assertions = [ + { + assertion = runner.secret != ""; + message = "Path to Secret for 'git' Runner must be set"; + } + ]; + } + (mkIf (runner.support == "github") { + # GitHub Runner + environment.systemPackages = [pkgs.act]; + services.github-runners.runner = { + enable = true; + url = files.path.repo; + extraLabels = ["self"]; + tokenFile = runner.secret; + }; + }) + + (mkIf (runner.support == "gitlab") { + # Docker Support + virtualisation.docker.enable = true; + + # GitLab Runner + services.gitlab-runner = { + enable = true; + services.default = { + dockerImage = "alpine"; + tagList = ["self"]; + authenticationTokenConfigFile = runner.secret; + }; + }; + }) + ]); + }; +} diff --git a/modules/apps/git/git.nix b/modules/apps/git/git.nix @@ -0,0 +1,183 @@ +## 'git' Configuration ## +{config, ...}: let + inherit (config.flake) files; +in { + flake.modules = { + nixos.git = {pkgs, ...}: { + # Utilities + environment.systemPackages = with pkgs; [ + gitFull + git-crypt + git-lfs + gh + tig + treefmt + ]; + }; + + homeManager.git = { + config, + lib, + ... + }: let + cfg = config.credentials; + in { + # User Credentials + assertions = [ + { + assertion = cfg.mail != ""; + message = "User Mail ID must be set"; + } + ]; + + home = { + persist.directories = [ + ".git-hooks" + ".config/gh" + ]; + + # Hooks + file.".git-hooks" = { + source = files.git.hooks; + recursive = true; + }; + }; + + # GitHub CLI + programs = { + gh = { + enable = true; + gitCredentialHelper.enable = true; + settings = { + prompt = "enabled"; + git_protocol = "https"; + aliases = rec { + a = "alias list"; + b = "browse"; + cfg = "config"; + ci = "run"; + co = "${p} checkout"; + g = "gpg-key"; + i = "issue"; + ic = "${i} close"; + is = "${i} status"; + iv = "${i} view"; + p = "pr"; + pm = "${p} merge"; + pv = "${p} view"; + r = "repo"; + rd = "${rl} download"; + rl = "release"; + rv = "${rl} view"; + s = "secret"; + w = "workflow"; + }; + }; + }; + + # Pager + delta = { + enable = true; + enableGitIntegration = true; + options = { + line-numbers = true; + theme = "Monokai Extended"; + conflictstyle = "diff3"; + }; + }; + + # 'git' Settings + git = { + enable = true; + lfs.enable = true; + + signing = { + format = "openpgp"; + signByDefault = lib.mkIf (cfg.key != "") true; + key = lib.mkIf (cfg.key != "") (builtins.substring 24 30 cfg.key); + }; + + # Globally Ignored Files + ignores = [ + "*~*" + "*.bak" + ".direnv" + ".vscode" + "result" + "result-*" + "tags.*" + ]; + + settings = { + color.ui = "auto"; + core.hooksPath = "~/.git-hooks"; + credential.helper = ["libsecret"]; + diff.colorMoved = "default"; + init.defaultBranch = "main"; + pull.rebase = "true"; + safe.directory = files.path.system; + + # User Identity + user.name = cfg.name; + user.email = cfg.mail; + github.user = cfg.name; + + # Command Aliases + alias = rec { + a = "add"; + ad = "${a} -A ."; + ai = "${a} -i"; + ap = "${a} -p"; + b = "branch"; + bc = "${b} --show-current"; + bd = "${b} -D"; + backup = "!CURRENT=$(git ${bc}) && git ${st} && git ${co} -B backup && git ${st} apply && git ${ad} && git ${cam} \"backup\" && git ${pf} $1 && git ${co} $CURRENT && git ${stp} && git ${bd} backup && :"; + cfg = "config"; + ci = "commit -v"; + cam = "${ci} -am"; + cia = "${ci} -a"; + cmx = "log -1 --pretty=%s"; + co = "checkout"; + cp = "cherry-pick"; + cpp = "!CURRENT=$(git ${bc}) && git ${st} && git ${co} -B $2 $3 && git ${cp} $1 && git ${pf} $4 && git ${co} $CURRENT && git ${stp} && :"; + d = "diff"; + df = "${d} HEAD"; + dx = "${d} --color-words"; + dc = "${d} --cached"; + dcx = "${dc} --color-words"; + l = "log --graph --decorate --abbrev-commit"; + l1 = "${l} --pretty=oneline --all"; + lf = "log -p --follow"; + lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%n' --abbrev-commit --date=relative --branches"; + ll = "${l} -p"; + m = "merge"; + ms = "${m} --squash"; + p = "push"; + pf = "${p} --force"; + pl = "!git pull && git fetch -p"; + pt = "${p} --tag"; + pu = "${p} --set-upstream"; + rb = "rebase"; + record = ''!f() { (git ${a} -p -- "$@" && git ${ci}) || git ${r}; }; f''; + ro = "restore"; + r = "reset"; + rs = "${r} --soft"; + rh = "${r} --hard"; + rsh = "${rs} HEAD^"; + s = "!git --no-pager status"; + sm = "submodule"; + st = "stash"; + std = "${st} drop"; + sti = "${st} --keep-index"; + stp = "${st} pop"; + sync = "${pf} --mirror"; + t = "tag"; + td = "!git ${t} -d $1 && git ${p} origin :$1 && :"; + tl = "${t} -l"; + }; + }; + }; + }; + }; + }; +} diff --git a/modules/apps/internet.nix b/modules/apps/internet.nix @@ -0,0 +1,60 @@ +## Internet Apps Configuration ## +{config, ...}: let + inherit (config) util; +in { + flake.modules.homeManager.internet = {pkgs, ...}: { + programs = { + # Browser + brave = { + enable = true; + extensions = [ + "cjpalhdlnbpafiamejdnhcphjbkeiagm" # UBlock Origin + "djflhoibgkdhkhhcedjiklpkjnoahfmg" # User Agent Switcher + "lckanjgmijmafbedllaakclkaicjfmnk" # ClearURLs + "oofgbpoabipfcfjapgnbbjjaenockbdp" # SetupVPN + "jghecgabfgfdldnmbfkhmffcabddioke" # Volume Booster + "jaioibhbkffompljnnipmpkeafhpicpd" # Tab Auto Refresh + "eimadpbcbfnmbkopoojfekhnkhdbieeh" # Dark Reader + "clngdbkpkpeebahjckkjfobafhncgmne" # Stylus + ]; + }; + + # Mail Client + thunderbird = { + enable = true; + profiles.default = { + isDefault = true; + extensions = [pkgs.custom.thunderbird-tools-ng]; + settings."extensions.autoDisableScopes" = 0; + }; + }; + }; + + xdg.mimeApps.defaultApplications = util.build.mime { + mail = ["thunderbird.desktop"]; + }; + + home.packages = with pkgs; [ + karere + linux-wifi-hotspot + openfortivpn + teams-for-linux + zoom-us + ]; + + home.persist = { + files = [".config/zoomus.conf"]; + directories = [ + ".config/BraveSoftware" + ".cache/BraveSoftware" + ".thunderbird" + ".cache/thunderbird" + ".config/karere" + ".local/share/karere" + ".cache/karere" + ".zoom" + ".cache/zoom" + ]; + }; + }; +} diff --git a/modules/apps/latex.nix b/modules/apps/latex.nix @@ -0,0 +1,20 @@ +## LaTeX Configuration ## +{config, ...}: let + inherit (config) util; +in { + flake.modules = { + nixos.latex = {pkgs, ...}: { + environment.systemPackages = with pkgs; [ + texliveFull + setzer + ]; + }; + + homeManager.latex = _: { + home.persist.directories = [".config/setzer"]; + xdg.mimeApps.defaultApplications = util.build.mime { + latex = ["org.cvfosammmm.Setzer.desktop"]; + }; + }; + }; +} diff --git a/modules/apps/notes.nix b/modules/apps/notes.nix @@ -0,0 +1,55 @@ +## Logseq Configuration ## +{config, ...}: let + inherit (config) util; + inherit (config.flake) files; +in { + flake.modules.homeManager.notes = { + config, + lib, + pkgs, + osConfig ? {}, + ... + }: let + mutable = { + mutable = true; + force = true; + }; + + isGnome = osConfig.services.desktopManager.gnome.enable or false; + isHyprland = osConfig.programs.hyprland.enable or false; + style = + if isGnome + then "url('https://cdn.jsdelivr.net/gh/sansui233/logseq-bonofix-theme/custom.css')" + else if isHyprland + then "url('https://logseq.catppuccin.com/ctp-${config.catppuccin.flavor}.css')" + else ""; + in { + config.home = { + packages = [pkgs.logseq]; + persist.directories = [ + ".logseq" + ".config/Logseq" + ]; + + file = with files.logseq; + { + ".config/logseq/configs.edn".text = "{:window/native-titlebar? true}"; + ".logseq/preferences.json" = {text = prefs;} // mutable; + ".logseq/config/config.edn".text = + if style != "" + then ''{:custom-css-url "@import ${style};"}'' + else lib.mkDefault ""; + } + // util.map.folder { + directory = settings; + path = ".logseq/settings"; + extension = ".json"; + apply = text: {inherit text;} // mutable; + replace = { + placeholders = ["@bg"]; + values = [config.lib.stylix.colors.base00]; + }; + }; + }; + }; +} diff --git a/modules/apps/office.nix b/modules/apps/office.nix @@ -0,0 +1,76 @@ +## Office Environment Configuration ## +{config, ...}: let + inherit (config) util; + inherit (config.flake) files; +in { + flake.modules = { + nixos.office = {pkgs, ...}: { + # Dictionaries + environment = { + systemPackages = with pkgs; [ + hunspell + hunspellDicts.en_US-large + hyphen + ]; + variables."DICPATH" = "/run/current-system/sw/share/hunspell:/run/current-system/sw/share/hyphen"; + pathsToLink = [ + "/share/hunspell" + "/share/myspell" + "/share/hyphen" + ]; + }; + }; + + homeManager.office = {pkgs, ...}: { + home.packages = with pkgs; [ + calibre + gscan2pdf + libreoffice + onlyoffice-desktopeditors + pdfarranger + simple-scan + gimp3 + handbrake + inkscape + xournalpp + ]; + + xdg.mimeApps.defaultApplications = util.build.mime { + office = ["onlyoffice-desktopeditors.desktop"]; + }; + + home = { + persist = { + files = [".config/gscan2pdfrc"]; + directories = [ + ".calibre" + ".config/calibre" + ".config/GIMP" + ".cache/gimp" + ".config/inkscape" + ".config/libreoffice" + ".config/onlyoffice" + ".local/share/onlyoffice" + ".local/share/data" + ]; + }; + + file = { + "Templates" = rec { + source = files.templates; + target = ".init-templates"; + onChange = '' + rm -rf ~/Templates + cp -rL ~/${target} ~/Templates + chmod -R 0777 ~/Templates + ''; + }; + ".local/share/fonts" = { + source = "${pkgs.custom.fonts}/share/fonts"; + recursive = true; + }; + }; + }; + }; + }; +} diff --git a/modules/apps/spotify.nix b/modules/apps/spotify.nix @@ -0,0 +1,32 @@ +## Spotify Configuration ## +{inputs, ...}: { + flake.modules.homeManager.spotify = {pkgs, ...}: { + imports = [inputs.spicetify.homeManagerModules.default]; + home.persist.directories = [ + ".config/spotify" + ".cache/spotify" + ]; + + programs.spicetify = { + enable = true; + + # Player Improvements + enabledCustomApps = with pkgs.spicetify.apps; [ + betterLibrary + localFiles + newReleases + ]; + + enabledExtensions = with pkgs.spicetify.extensions; [ + goToSong + history + loopyLoop + playNext + popupLyrics + seekSong + showQueueDuration + volumePercentage + ]; + }; + }; +} diff --git a/modules/apps/stream.nix b/modules/apps/stream.nix @@ -0,0 +1,10 @@ +## Streaming Configuration ## +_: { + flake.modules.homeManager.stream = {pkgs, ...}: { + home.packages = [pkgs.stremio-linux-shell]; + home.persist.directories = [ + ".stremio-server" + ".local/share/stremio" + ]; + }; +} diff --git a/modules/apps/syncthing.nix b/modules/apps/syncthing.nix @@ -0,0 +1,11 @@ +## Syncthing Configuration ## +# ? # Configure via Web UI: http://localhost:8384 +{ + flake.modules.homeManager.syncthing = { + services.syncthing.enable = true; + home.persist.directories = [ + ".config/syncthing" + ".local/state/syncthing" + ]; + }; +} diff --git a/modules/apps/tools.nix b/modules/apps/tools.nix @@ -0,0 +1,58 @@ +## Tools Configuration ## +{config, ...}: let + inherit (config) util; +in { + flake.modules = { + nixos.tools = {pkgs, ...}: { + # Screen Record + programs.obs-studio = { + enable = true; + enableVirtualCamera = true; + plugins = with pkgs.obs-studio-plugins; [ + obs-mute-filter + obs-source-switcher + ]; + }; + }; + + homeManager.tools = {pkgs, ...}: { + home.packages = with pkgs; [ + # Utilities + clapgrep + gearlever + popsicle + + # Graphics + drawing + identity + pitivi + vipsdisp + + # Audio + pwvucontrol + qpwgraph + ]; + + # AppImage Manager + dconf.settings."it/mijorus/gearlever".appimages-default-folder = "~/.appimages"; + xdg.mimeApps.defaultApplications = util.build.mime { + appimage = ["it.mijorus.gearlever.desktop"]; + }; + + # Audio Effects + services.easyeffects.enable = true; + + home.persist = { + files = [".config/rncbc.org/qpwgraph"]; + directories = [ + ".appimages" + ".config/de.leopoldluley.Clapgrep" + ".config/easyeffects" + ".config/obs-studio" + ".config/pitivi" + ".local/share/easyeffects" + ]; + }; + }; + }; +} diff --git a/modules/apps/vscode/_mutable.nix b/modules/apps/vscode/_mutable.nix @@ -0,0 +1,36 @@ +# https://gist.github.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa +{ + config, + lib, + ... +}: let + configDir = + { + "vscode" = "Code"; + "vscode-insiders" = "Code - Insiders"; + "vscodium" = "VSCodium"; + } + .${ + config.programs.vscode.package.pname + }; + userDir = "${config.xdg.configHome}/${configDir}/User"; + + configFilePath = "${userDir}/settings.json"; + tasksFilePath = "${userDir}/tasks.json"; + keybindingsFilePath = "${userDir}/keybindings.json"; + snippetDir = "${userDir}/snippets"; + + cfg = config.programs.vscode.profiles.default; + pathsToMakeWritable = lib.flatten [ + (lib.optional (cfg.userTasks != {}) tasksFilePath) + (lib.optional (cfg.userSettings != {}) configFilePath) + (lib.optional (cfg.keybindings != []) keybindingsFilePath) + (lib.optional (cfg.globalSnippets != {}) "${snippetDir}/global.code-snippets") + (lib.mapAttrsToList (language: _: "${snippetDir}/${language}.json") cfg.languageSnippets) + ]; +in { + home.file = lib.genAttrs pathsToMakeWritable (_: { + force = true; + mutable = true; + }); +} diff --git a/modules/apps/vscode/default.nix b/modules/apps/vscode/default.nix @@ -0,0 +1,99 @@ +## Visual Studio Code Editor Configuration ## +{config, ...}: let + inherit (config) util; + inherit (config.flake) files; +in { + flake.modules.homeManager.vscode = { + config, + lib, + pkgs, + osConfig ? {}, + ... + }: let + font = builtins.head config.fonts.fontconfig.defaultFonts.monospace; + isGnome = osConfig.services.desktopManager.gnome.enable or false; + isHyprland = osConfig.programs.hyprland.enable or false; + in { + # Environment + imports = [./_mutable.nix]; + xdg.mimeApps.defaultApplications = util.build.mime { + code = ["code.desktop"]; + markdown = ["code.desktop"]; + text = ["code.desktop"]; + }; + + home = { + persist.directories = [ + ".config/Code" + ".vscode" + ]; + packages = with pkgs; [ + nil + alejandra + ]; + }; + + programs.vscode = { + enable = true; + package = pkgs.vscode; + profiles.default = with files.vscode; { + # Keyboard Shortcuts + inherit keybindings; + + # Settings + userSettings = lib.mkMerge [ + (settings + // { + "workbench.colorTheme" = lib.mkDefault "Dark 2026"; + "editor.fontFamily" = "'${font}', 'monospace', monospace"; + }) + (lib.mkIf isGnome { + "workbench.productIconTheme" = "adwaita"; + "terminal.external.linuxExec" = "ghostty"; + }) + (lib.mkIf isHyprland { + "workbench.iconTheme" = "catppuccin-${config.catppuccin.flavor or "mocha"}"; + "terminal.external.linuxExec" = "kitty"; + }) + ]; + + ## Editor Extensions + extensions = with pkgs.vscode-extensions; + [ + aaron-bond.better-comments # Annotations + editorconfig.editorconfig # .editorconfig + esbenp.prettier-vscode # Formatter + file-icons.file-icons # File Icons + naumovs.color-highlight # Color Viewer + johnpapa.vscode-peacock # Workspace Color + + github.vscode-pull-request-github # GitHub + github.copilot # Copilot AI + dart-code.flutter # Flutter + divyanshuagrawal.competitive-programming-helper # CP + jnoortheen.nix-ide # Nix + ms-python.python # Python + ms-vscode.cpptools # C/C++ + redhat.java # Java + rust-lang.rust-analyzer # Rust + tomoki1207.pdf # PDF Viewer + yzhang.markdown-all-in-one # Markdown + + # HTML/CSS/XML + ecmel.vscode-html-css + formulahendry.auto-rename-tag + redhat.vscode-xml + + # JS + dbaeumer.vscode-eslint + ritwickdey.liveserver + ] + ++ (with pkgs.vscode-marketplace; [ + kisstkondoros.vscode-gutter-preview # Image Preview + ]) + ++ lib.optionals isGnome [pkgs.vscode-extensions.piousdeer.adwaita-theme] + ++ lib.optionals isHyprland [pkgs.vscode-extensions.catppuccin.catppuccin-vsc-icons]; + }; + }; + }; +} diff --git a/modules/apps/wine.nix b/modules/apps/wine.nix @@ -0,0 +1,83 @@ +## Wine Configuration ## +{config, ...}: let + inherit (config) util; +in { + flake.modules = { + nixos.wine = { + config, + lib, + pkgs, + ... + }: let + inherit (builtins) attrValues map; + inherit + (lib) + mkEnableOption + mkOption + optionals + types + ; + cfg = config.apps.wine; + in { + options.apps.wine = { + utilities = mkEnableOption "Install Utility Windows apps"; + package = mkOption { + description = "Package to use for 'wine'"; + type = types.package; + default = pkgs.wineWow64Packages.stagingFull; + }; + }; + + config = { + services.samba.enable = true; + hardware.xpadneo.enable = true; + hardware.graphics.enable32Bit = true; + + environment.systemPackages = with pkgs.wine // pkgs; ( + map + ( + name: + if (name.override.__functionArgs ? wine) + then name.override {wine = cfg.package;} + else name + ) + ( + [ + cfg.package + winetricks + mkwindowsapp-tools + playonlinux + ] + # Wrapped Packages + ++ optionals cfg.utilities ( + attrValues ( + util.map.modules ../../packages/wine ( + name: + callPackage name { + inherit lib pkgs; + wine = cfg.package; + build = winelib; + } + ) + ) + ) + ) + ); + }; + }; + + homeManager.wine = { + config, + lib, + ... + }: { + home.persist.directories = + [ + ".wine" + ".cache/wine" + ".cache/winetricks" + ] + ++ lib.optionals (config.apps.wine.utilities or false) [".config/notepad++"]; + }; + }; +} diff --git a/modules/apps/youtube.nix b/modules/apps/youtube.nix @@ -0,0 +1,38 @@ +## YT Configuration ## +{config, ...}: let + inherit (config.flake) files; +in { + flake.modules.homeManager.youtube = { + config, + lib, + pkgs, + osConfig ? {}, + ... + }: let + isHyprland = osConfig.programs.hyprland.enable or false; + style = + if isHyprland + then "@import url('https://youtubemusic.catppuccin.com/src/${config.catppuccin.flavor}.css');" + else ""; + in { + config.home = { + packages = with pkgs; [ + pear-desktop + youtube-tui + yt-dlp + ]; + + persist.directories = [ + ".config/pear-desktop" + ".config/youtube-tui" + ".local/share/youtube-tui" + ]; + + file.".config/pear-desktop/config.json" = { + text = lib.replaceStrings ["@theme"] [(builtins.toFile "style.css" style)] files.youtube; + mutable = true; + force = true; + }; + }; + }; +} diff --git a/modules/core/checks.nix b/modules/core/checks.nix @@ -0,0 +1,33 @@ +## Code Formatting & Checks ## +{inputs, ...}: { + imports = [inputs.formatter.flakeModule]; + + perSystem = {config, ...}: { + treefmt.config = { + projectRootFile = "flake.nix"; + settings.global.excludes = [ + "_*" + "result/**" + "flake.lock" + ]; + + programs = { + alejandra.enable = true; + statix.enable = true; + shellcheck.enable = false; + stylua.enable = true; + deadnix = { + enable = true; + no-lambda-arg = true; + }; + + prettier = { + enable = true; + settings.bracketSameLine = true; + }; + }; + }; + + devShells.format = config.treefmt.build.devShell; + }; +} diff --git a/modules/core/flake-parts.nix b/modules/core/flake-parts.nix @@ -0,0 +1,5 @@ +{inputs, ...}: { + imports = [ + inputs.flake-parts.flakeModules.modules + ]; +} diff --git a/modules/core/home-manager.nix b/modules/core/home-manager.nix @@ -0,0 +1,52 @@ +{ + lib, + config, + inputs, + ... +}: let + inherit (config) util; + inherit (config.flake) files modules; +in { + options.configurations.homeManager = lib.mkOption { + type = lib.types.lazyAttrsOf util.types.configuration; + default = {}; + }; + + config.flake.homeConfigurations = + lib.mapAttrs ( + name: { + module, + system, + }: + inputs.home-manager.lib.homeManagerConfiguration { + pkgs = config.flake.legacyPackages.${system}; + modules = + [ + module + + # Compatibility + inputs.stylix.homeModules.stylix + ( + {lib, ...}: { + config.stylix.base16Scheme = lib.mkDefault files.colors.catppuccin; + options.home.persistence = lib.mkOption { + type = lib.types.attrsOf lib.types.anything; + default = {}; + }; + } + ) + ] + ++ + # Default Modules + util.map.array [ + "base" + "user" + "nix" + "shell" + "theme" + ] + modules.homeManager; + } + ) + config.configurations.homeManager; +} diff --git a/modules/core/nixos.nix b/modules/core/nixos.nix @@ -0,0 +1,59 @@ +{ + lib, + config, + ... +}: let + inherit (config) util flake; +in { + options.configurations.nixos = lib.mkOption { + type = lib.types.lazyAttrsOf util.types.configuration; + default = {}; + }; + + config.flake = { + nixosConfigurations = + lib.mapAttrs ( + name: { + module, + system, + }: + lib.nixosSystem { + modules = + [ + module + { + networking.hostName = name; + nixpkgs.pkgs = flake.legacyPackages.${system}; + } + ] + ++ + # Default Modules + util.map.array [ + "base" + "cpu" + "gpu" + "nix" + "user" + "secrets" + "shell" + "theme" + "fonts" + ] + flake.modules.nixos; + } + ) + config.configurations.nixos; + + checks = lib.mkMerge ( + lib.mapAttrsToList ( + name: {system, ...}: { + ${system} = { + "configurations:nixos:${name}" = + flake.nixosConfigurations.${name}.config.system.build.toplevel; + }; + } + ) + config.configurations.nixos + ); + }; +} diff --git a/modules/core/shells.nix b/modules/core/shells.nix @@ -0,0 +1,12 @@ +## Developer Shells ## +{config, ...}: let + inherit (config) util; +in { + perSystem = {pkgs, ...}: { + devShells = + util.map.modules ../../shells (file: pkgs.mkShell (import file pkgs)) + // { + default = import ../../shells {inherit pkgs;}; + }; + }; +} diff --git a/modules/core/systems.nix b/modules/core/systems.nix @@ -0,0 +1,7 @@ +## Supported Architectures ## +_: { + systems = [ + "x86_64-linux" + "aarch64-linux" + ]; +} diff --git a/modules/core/templates.nix b/modules/core/templates.nix @@ -0,0 +1,15 @@ +## Flake Template ## +{inputs, ...}: { + flake.templates.default = with inputs.filters.lib; { + description = "My NixOS Configuration"; + path = filter { + root = ../../.; + exclude = [ + ../../site + (matchExt "md") + (matchExt "gpg") + (matchExt "secret") + ]; + }; + }; +} diff --git a/modules/desktop/_base.nix b/modules/desktop/_base.nix @@ -0,0 +1,43 @@ +# Shared desktop configuration +_: { + nixos = _: { + gui.enable = true; + + # Utilities + services = { + gvfs.enable = true; + gnome.gnome-keyring.enable = true; + }; + + programs = { + xwayland.enable = true; + seahorse.enable = true; + }; + + # Environment Setup + environment.sessionVariables = { + "NIXOS_OZONE_WL" = "1"; + "QT_QPA_PLATFORM" = "wayland;xcb"; + "MOZ_ENABLE_WAYLAND" = "1"; + "CLUTTER_BACKEND" = "wayland"; + }; + + xdg.portal = { + enable = true; + xdgOpenUsePortal = true; + wlr.enable = true; + }; + }; + + home = _: { + services = { + poweralertd.enable = true; # Power Alerts + mpris-proxy.enable = true; # BT Controls + }; + + home.persist.directories = [ + ".config/autostart" + ".local/share/gvfs-metadata" + ]; + }; +} diff --git a/modules/desktop/_install.nix b/modules/desktop/_install.nix @@ -0,0 +1,75 @@ +## Install Media Desktop Configuration ## +_: { + lib, + pkgs, + ... +}: let + inherit (lib) mkForce; +in { + imports = [(import ./gnome/_common.nix {})]; + + services = { + displayManager.gdm = { + banner = "Install Media"; + autoSuspend = false; + }; + + desktopManager.gnome = { + extraGSettingsOverridePackages = [pkgs.gnome-settings-daemon]; + favoriteAppsOverride = '' + [org.gnome.shell] + favorite-apps=[ 'org.gnome.Epiphany.desktop', 'nixos-manual.desktop', 'org.gnome.Console.desktop', 'org.gnome.Nautilus.desktop', 'gparted.desktop' ] + ''; + + extraGSettingsOverrides = '' + [org.gnome.shell] + welcome-dialog-last-shown-version='9999999999' + + [org.gnome.desktop.session] + idle-delay=0 + + [org.gnome.settings-daemon.plugins.power] + sleep-inactive-ac-type='nothing' + sleep-inactive-battery-type='nothing' + ''; + }; + }; + + # Essential Utilities + environment.systemPackages = with pkgs; [ + gparted + epiphany + gnome-console + gnome-system-monitor + gnome-text-editor + nautilus + ]; + + # Excluded Packages + services.gnome = { + core-apps.enable = mkForce false; + gnome-browser-connector.enable = mkForce false; + gnome-remote-desktop.enable = mkForce false; + gnome-user-share.enable = mkForce false; + rygel.enable = mkForce false; + }; + + environment.gnome.excludePackages = with pkgs; [ + gnome-backgrounds + gnome-tour + gnome-user-docs + orca + ]; + + # Disable suspension + security.polkit.extraConfig = '' + polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.login1.suspend" || + action.id == "org.freedesktop.login1.suspend-multiple-sessions" || + action.id == "org.freedesktop.login1.hibernate" || + action.id == "org.freedesktop.login1.hibernate-multiple-sessions") { + return polkit.Result.NO; + } + }); + ''; +} diff --git a/modules/desktop/gnome/_common.nix b/modules/desktop/gnome/_common.nix @@ -0,0 +1,43 @@ +_: { + config, + lib, + pkgs, + ... +}: let + inherit + (lib) + gvariant + mkForce + ; +in { + services = { + # Session + desktopManager.gnome.enable = true; + displayManager = { + defaultSession = "gnome"; + gdm.enable = true; + }; + + # Initial Setup + gnome.gnome-initial-setup.enable = mkForce false; + }; + + # Excluded Packages + environment.gnome.excludePackages = with pkgs; [ + gnome-music + showtime + ]; + + # Dconf Settings + programs.dconf.profiles.gdm.databases = [ + { + settings = { + "org/gnome/desktop/peripherals/touchpad".tap-to-click = true; + "org/gnome/desktop/interface" = { + cursor-theme = config.stylix.cursor.name; + cursor-size = gvariant.mkInt32 config.stylix.cursor.size; + }; + }; + } + ]; +} diff --git a/modules/desktop/gnome/_main.nix b/modules/desktop/gnome/_main.nix @@ -0,0 +1,185 @@ +{ + util ? null, + files ? null, + ... +}: { + nixos = {pkgs, ...}: { + # Desktop Integration + gui = { + gtk.theme = { + name = "adw-gtk3-dark"; + package = pkgs.adw-gtk3; + }; + + qt = { + style = "kvantum"; + theme = { + name = "KvLibadwaitaDark"; + package = pkgs.custom.kvlibadwaita; + }; + }; + }; + + # Color Scheme + stylix = { + base16Scheme = files.colors.adwaita; + targets.gnome.enable = false; + }; + + # Essential Utilities + services = { + udev.packages = [pkgs.gnome-settings-daemon]; + telepathy.enable = true; + switcherooControl.enable = true; + gnome = { + core-developer-tools.enable = true; + gnome-remote-desktop.enable = true; + sushi.enable = true; + }; + }; + + programs = { + gnupg.agent.pinentryPackage = pkgs.lib.mkForce pkgs.pinentry-gnome3; + + kdeconnect = { + enable = true; + package = pkgs.gnomeExtensions.gsconnect; + }; + + firefox = { + nativeMessagingHosts.packages = [pkgs.gnomeExtensions.gsconnect]; + policies.ExtensionSettings = { + name = "gnome-shell-integration"; + value = { + installation_mode = "normal_installed"; + install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/chrome-gnome-shell@gnome.org/latest.xpi"; + }; + }; + }; + }; + + # Screen Brightness + hardware.i2c.enable = true; + + ## Package List + environment.systemPackages = with pkgs; [ + ghostty + gnome-boxes + gnome-sound-recorder + gnome-tweaks + papers + + # Games + gnome-chess + gnome-mines + quadrapassel + + # Circle + apostrophe + curtail + deja-dup + dialect + fractal + fragments + gnome-decoder + gnome-secrets + gthumb + lollypop + resources + upscaler + video-trimmer + wike + wordbook + + # Utilities + celluloid + ddcutil + gnuchess + ]; + }; + + home = _: { + config = { + stylix.targets = { + gnome.enable = true; + ghostty.enable = true; + }; + + # Default Applications + xdg.mimeApps.defaultApplications = util.build.mime { + archive = ["org.gnome.FileRoller.desktop"]; + audio = ["org.gnome.Lollypop.desktop"]; + calendar = ["org.gnome.Calendar.desktop"]; + document = ["org.gnome.Papers.desktop"]; + directory = ["org.gnome.Nautilus.desktop"]; + image = ["org.gnome.Loupe.desktop"]; + magnet = ["de.haeckerfelix.Fragments.desktop"]; + markdown = ["org.gnome.gitlab.somas.Apostrophe.desktop"]; + password = ["org.gnome.World.Secrets.desktop"]; + pdf = ["org.gnome.Papers.desktop"]; + text = ["org.gnome.TextEditor.desktop"]; + video = ["io.github.celluloid_player.Celluloid.desktop"]; + virtualization = ["org.gnome.Boxes.desktop"]; + }; + + # Persisted Files + home.persist.directories = [ + ".config/evolution" + ".config/ghostty" + ".config/gnome-boxes" + ".config/gnome-builder" + ".local/share/epiphany" + ".local/share/evolution" + ".local/share/gnome-boxes" + ".local/share/gnome-builder" + ".local/share/lollypop" + ".local/share/nautilus" + ".local/share/sounds" + ".local/share/telepathy" + ".local/share/webkitgtk" + ".cache/evolution" + ".cache/fractal" + ".cache/gnome-builder" + ]; + + ## Terminal + programs.ghostty = { + enable = true; + settings = { + # Features + clipboard-paste-protection = true; + clipboard-trim-trailing-spaces = true; + copy-on-select = false; + mouse-hide-while-typing = true; + quit-after-last-window-closed = true; + scrollback-limit = 4200; + shell-integration-features = true; + window-vsync = true; + + # Keybindings + keybind = [ + "ctrl+h=goto_split:left" + "ctrl+j=goto_split:bottom" + "ctrl+k=goto_split:top" + "ctrl+l=goto_split:right" + "ctrl+shift+h=new_split:left" + "ctrl+shift+j=new_split:down" + "ctrl+shift+k=new_split:up" + "ctrl+shift+l=new_split:right" + "ctrl+shift+enter=new_split:auto" + "ctrl+shift+i=inspector:toggle" + "ctrl+shift+r=reload_config" + "ctrl+t=new_tab" + ]; + }; + }; + + # Firefox GNOME Theme + stylix.targets.firefox = { + enable = true; + profileNames = ["default"]; + firefoxGnomeTheme.enable = true; + }; + }; + }; +} diff --git a/modules/desktop/gnome/_settings/apps.nix b/modules/desktop/gnome/_settings/apps.nix @@ -0,0 +1,276 @@ +_: { + lib, + osConfig ? null, + ... +}: +lib.mkIf (osConfig != null) ( + with lib.hm.gvariant; let + inherit (builtins) head; + fonts = osConfig.fonts.fontconfig.defaultFonts; + in { + dconf.settings = { + # GTK+ Apps + "org/gnome/desktop/calendar".show-weekdate = true; + "ca/desrt/dconf-editor".show-warning = false; + "org/gnome/shell/world-clocks".locations = "[<(uint32 2, <('Coordinated Universal Time (UTC)', '@UTC', false, @a(dd) [], @a(dd) [])>)>]"; + + "org/gnome/desktop/search-providers" = { + sort-order = [ + "org.gnome.Contacts.desktop" + "org.gnome.Documents.desktop" + "org.gnome.Nautilus.desktop" + ]; + }; + + "org/gnome/epiphany/sync".sync-device-name = osConfig.networking.hostName; + "org/gnome/epiphany/web" = { + default-zoom-level = 1.0; + enable-mouse-gestures = true; + }; + + "org/gnome/epiphany" = { + active-clear-data-items = 391; + ask-for-default = false; + default-search-engine = "Google"; + restore-session-policy = "crashed"; + use-google-search-suggestions = true; + }; + + "org/gtk/gtk4/settings/file-chooser".sort-directories-first = true; + "org/gnome/nautilus/icon-view" = { + captions = [ + "size" + "date_modified" + "none" + ]; + default-zoom-level = "medium"; + }; + + "org/gnome/nautilus/preferences" = { + click-policy = "single"; + default-folder-viewer = "icon-view"; + fts-enabled = true; + search-filter-time-type = "last_modified"; + search-view = "list-view"; + show-create-link = true; + show-delete-permanently = true; + }; + + "org/gnome/TextEditor" = { + highlight-current-line = true; + indent-style = "tab"; + show-line-numbers = true; + show-map = false; + tab-width = mkUint32 4; + }; + + "org/gnome/builder/editor" = { + auto-hide-map = true; + auto-save-timeout = 60; + completion-n-rows = 7; + draw-spaces = ["tab"]; + highlight-current-line = true; + highlight-matching-brackets = true; + overscroll = 7; + show-map = false; + style-scheme-name = "builder-dark"; + }; + + "com/github/hugolabe/Wike" = { + custom-font = true; + dark-mode = true; + font-family = head fonts.sansSerif; + }; + + # App Grid + "org/gnome/shell" = { + favorite-apps = [ + "brave-browser.desktop" + "thunderbird.desktop" + "org.gnome.Nautilus.desktop" + "com.mitchellh.ghostty.desktop" + "org.gnome.TextEditor.desktop" + "org.gnome.Settings.desktop" + ]; + }; + + "org/gnome/desktop/app-folders" = { + folder-children = [ + "1c3e59e4-a571-4ada-af1d-ed1ced384cfb" + "4bfbecbd-804e-4359-b1c2-00daef4c009e" + "4f9e09f6-cbd8-4a4a-beb3-9ec7b3e672ff" + "a136187d-1d93-4d35-8423-082f15957be9" + "b79e9b82-2127-459b-9e82-11bd3be09d04" + "cb1c8797-b52e-4df5-80d6-2c46e8f7ef22" + "e57a32e8-8e5d-4808-aad7-b1f9152d01ee" + "3ef67acf-9b33-4087-9a9b-52bf7bfb7e55" + "5931d8a1-7532-4ae1-b21a-ab22ef6ee516" + "7464f88f-e282-4cd7-b4ec-956276e9f709" + "9293f22d-8d4f-466d-ac3e-9fc76731c2c9" + "fba50444-598d-4e14-b7d3-f6bb0f03232c" + ]; + }; + + "org/gnome/desktop/app-folders/folders/4f9e09f6-cbd8-4a4a-beb3-9ec7b3e672ff" = { + name = "Games"; + apps = [ + "org.gnome.Chess.desktop" + "org.gnome.Sudoku.desktop" + "org.gnome.Mines.desktop" + "org.gnome.Quadrapassel.desktop" + "osu!.desktop" + "org.prismlauncher.PrismLauncher.desktop" + "steam.desktop" + "Steam Linux Runtime 1.0 (scout).desktop" + "Steam Linux Runtime 2.0 (soldier).desktop" + "Steam Linux Runtime 3.0 (sniper).desktop" + "Proton Hotfix.desktop" + ]; + }; + + "org/gnome/desktop/app-folders/folders/3ef67acf-9b33-4087-9a9b-52bf7bfb7e55" = { + name = "Social"; + apps = [ + "Zoom.desktop" + "io.github.tobagin.karere.desktop" + "teams-for-linux.desktop" + "org.gnome.Fractal.desktop" + "vesktop.desktop" + ]; + }; + + "org/gnome/desktop/app-folders/folders/a136187d-1d93-4d35-8423-082f15957be9" = { + name = "Office"; + apps = [ + "base.desktop" + "calc.desktop" + "Code.desktop" + "draw.desktop" + "impress.desktop" + "math.desktop" + "net.sourceforge.gscan2pdf.desktop" + "onlyoffice-desktopeditors.desktop" + "startcenter.desktop" + "virt-manager.desktop" + "writer.desktop" + ]; + }; + + "org/gnome/desktop/app-folders/folders/b79e9b82-2127-459b-9e82-11bd3be09d04" = { + name = "Utilities"; + apps = [ + "cups.desktop" + "kvantummanager.desktop" + "micro.desktop" + "nixos-manual.desktop" + "org.gnome.baobab.desktop" + "org.gnome.Console.desktop" + "org.gnome.Devhelp.desktop" + "org.gnome.dspy.desktop" + "org.gnome.Logs.desktop" + "org.gnome.Sysprof.desktop" + "org.gnome.Tour.desktop" + "xterm.desktop" + "yelp.desktop" + ]; + }; + + "org/gnome/desktop/app-folders/folders/e57a32e8-8e5d-4808-aad7-b1f9152d01ee" = { + name = "Accessories"; + apps = [ + "calibre-ebook-edit.desktop" + "calibre-ebook-viewer.desktop" + "calibre-lrfviewer.desktop" + "qt5ct.desktop" + "qt6ct.desktop" + ]; + }; + + "org/gnome/desktop/app-folders/folders/5931d8a1-7532-4ae1-b21a-ab22ef6ee516" = { + name = "Internet"; + apps = [ + "de.haeckerfelix.Fragments.desktop" + "firefox.desktop" + "wihotspot.desktop" + "org.gnome.Epiphany.desktop" + "com.cloudflare.WarpTaskbar.desktop" + ]; + }; + + "org/gnome/desktop/app-folders/folders/7464f88f-e282-4cd7-b4ec-956276e9f709" = { + name = "Writing"; + apps = [ + "Logseq.desktop" + "org.cvfosammmm.Setzer.desktop" + "com.github.xournalpp.xournalpp.desktop" + "org.gnome.gitlab.somas.Apostrophe.desktop" + "com.github.jeromerobert.pdfarranger.desktop" + "dev.mufeed.Wordbook.desktop" + "app.drey.Dialect.desktop" + ]; + }; + + "org/gnome/desktop/app-folders/folders/9293f22d-8d4f-466d-ac3e-9fc76731c2c9" = { + name = "Graphics"; + apps = [ + "org.inkscape.Inkscape.desktop" + "gimp.desktop" + "fr.handbrake.ghb.desktop" + "com.obsproject.Studio.desktop" + "org.libvips.vipsdisp.desktop" + ]; + }; + + "org/gnome/desktop/app-folders/folders/fba50444-598d-4e14-b7d3-f6bb0f03232c" = { + name = "Sound & Video"; + apps = [ + "spotify.desktop" + "org.rncbc.qpwgraph.desktop" + "com.stremio.Stremio.desktop" + ]; + }; + + "org/gnome/desktop/app-folders/folders/4bfbecbd-804e-4359-b1c2-00daef4c009e" = { + name = "System"; + apps = [ + "nvidia-settings.desktop" + "rog-control-center.desktop" + ]; + }; + + "org/gnome/desktop/app-folders/folders/1c3e59e4-a571-4ada-af1d-ed1ced384cfb" = { + name = "Wine"; + apps = [ + "7zip.desktop" + "com.usebottles.bottles.desktop" + "net.lutris.Lutris.desktop" + "Notepad++.desktop" + "winetricks.desktop" + "protontricks.desktop" + ]; + }; + + "org/gnome/desktop/app-folders/folders/cb1c8797-b52e-4df5-80d6-2c46e8f7ef22" = { + name = "Android"; + apps = [ + "waydroid.com.android.inputmethod.latin.desktop" + "waydroid.org.lineageos.jelly.desktop" + "waydroid.com.android.calculator2.desktop" + "waydroid.org.lineageos.etar.desktop" + "waydroid.com.android.camera2.desktop" + "waydroid.com.android.deskclock.desktop" + "waydroid.com.android.contacts.desktop" + "waydroid.com.android.documentsui.desktop" + "waydroid.com.android.gallery3d.desktop" + "waydroid.com.android.vending.desktop" + "waydroid.org.lineageos.eleven.desktop" + "waydroid.org.lineageos.recorder.desktop" + "waydroid.com.android.settings.desktop" + "Waydroid.desktop" + "scrcpy.desktop" + "scrcpy-console.desktop" + ]; + }; + }; + } +) diff --git a/modules/desktop/gnome/_settings/extensions.nix b/modules/desktop/gnome/_settings/extensions.nix @@ -0,0 +1,578 @@ +{files ? null, ...}: { + config, + lib, + pkgs, + osConfig ? null, + ... +}: +lib.mkIf (osConfig != null) ( + let + inherit + (builtins) + filter + genList + hasAttr + map + toString + ; + + inherit + (lib) + foldr + getExe + hm + listToAttrs + mkForce + nameValuePair + optionals + recursiveUpdate + ; + + inherit (osConfig.lib.stylix) colors; + + # Shell Extensions + extensions = with pkgs.gnomeExtensions // hm.gvariant; ( + [ + {package = appindicator;} + {package = arrange-windows;} + {package = disconnect-wifi;} + {package = display-configuration-switcher;} + {package = gsconnect;} + {package = guillotine;} + {package = hide-minimized;} + {package = media-progress;} + {package = night-light-slider-updated;} + {package = notification-counter;} + {package = overview-hover;} + {package = removable-drive-menu;} + {package = screenshot-window-sizer;} + {package = unmess;} + {package = window-state-manager;} + { + package = workspace-indicator; + disable = true; + } + { + package = gpu-supergfxctl-switch; + disable = !osConfig.services.supergfxd.enable; + } + { + package = solaar-extension; + disable = !osConfig.hardware.logitech.wireless.enableGraphical; + } + { + package = syncthing-indicator; + name = "syncthing"; + disable = !config.services.syncthing.enable; + settings.auto-start = false; + } + { + package = top-bar-organizer; + settings = { + center-box-order = ["dateMenu"]; + left-box-order = [ + "activities" + "arrange-menu" + "tilingshell@ferrarodomenico.com" + "guillotine" + "guillotine@fopdoodle.net" + "appMenu" + ]; + + right-box-order = [ + "emoji-copy@felipeftn" + "a11y" + "aggregateMenu" + "drive-menu" + "copyous@boerdereinar.dev" + "vitalsMenu" + "dwellClick" + "color-picker@tuberry" + "gamemodeshellextension@trsnaqe.com" + "lockkeys" + "keyboard" + "screenSharing" + "screenRecording" + "quickSettings" + ]; + }; + } + {package = app-name-indicator;} + { + package = status-area-horizontal-spacing; + settings.hpadding = 4; + } + { + package = autohide-battery; + settings.hide-on = 80; + } + { + package = color-picker; + settings.enable-format = true; + } + { + package = focus-follows-workspace; + settings.move-cursor = true; + } + { + package = fullscreen-avoider; + settings = { + move-hot-corners = true; + move-notifications = true; + }; + } + { + package = gamemode-shell-extension; + name = "gamemodeshellextension"; + settings.show-icon-only-when-active = true; + } + { + package = lock-keys; + name = "lockkeys"; + settings.always-show-icon = false; + } + { + package = user-themes; + name = "user-theme"; + settings.name = mkForce "custom"; + } + { + package = bluetooth-battery-meter; + name = "Bluetooth-Battery-Meter"; + settings = { + disable-level-in-icon = true; + enable-battery-indicator-text = false; + enable-battery-level-icon = false; + enable-battery-level-text = false; + enable-multi-indicator-mode = false; + enable-sony-device = true; + enable-upower-level-icon = true; + hide-bluetooth-indicator = 0; + indicator-type = 1; + level-indicator-color = 0; + level-indicator-type = 0; + popup-in-quick-settings = false; + swap-icon-text = false; + }; + } + { + package = brightness-control-using-ddcutil; + disable = true; + settings = { + button-location = 1; + ddcutil-binary-path = getExe pkgs.ddcutil; + hide-system-indicator = true; + increase-brightness-shortcut = ["<Shift>XF86MonBrightnessUp"]; + decrease-brightness-shortcut = ["<Shift>XF86MonBrightnessDown"]; + }; + } + { + package = caffeine; + settings = { + indicator-position = 0; + nightlight-control = "never"; + show-indicator = "always"; + show-notifications = false; + inhibit-apps = [ + "startcenter.desktop" + "virt-manager.desktop" + ]; + }; + } + { + package = copyous; + settings = { + auto-hide-search = false; + clipboard-orientation = "horizontal"; + clipboard-position-horizontal = "fill"; + clipboard-position-vertical = "bottom"; + clipboard-history = "keep-all"; + clipboard-size = 700; + disable-hljs-dialog = false; + header-controls-visibility = "visible-on-hover"; + history-length = 250; + open-clipboard-dialog-shortcut = ["<Super>v"]; + show-at-cursor = false; + show-at-pointer = false; + show-indicator = true; + toggle-incognito-mode-shortcut = ["<Control><Super>v"]; + wiggle-indicator = true; + }; + } + { + package = coverflow-alt-tab; + name = "coverflowalttab"; + settings = { + hide-panel = false; + highlight-mouse-over = false; + icon-style = "Classic"; + position = "Bottom"; + raise-mouse-over = true; + switch-per-monitor = true; + switcher-looping-method = "Flip Stack"; + switcher-style = "Coverflow"; + }; + } + { + package = emoji-copy; + settings = { + active-keybind = true; + always-show = false; + emoji-keybind = ["<Super><Shift>e"]; + paste-on-select = true; + }; + } + { + package = focus-changer; + settings = { + focus-down = ["<Super>s"]; + focus-left = ["<Super>a"]; + focus-right = ["<Super>d"]; + focus-up = ["<Super>w"]; + }; + } + { + package = notification-configurator; + settings = { + notification-position = "center"; + block-list = "[]"; + app-themes = '' + {"poweralertd":{"appNameColor":[0.9647058844566345,0.3803921639919281,0.3176470696926117,1],"timeColor":[0.6,0.6,0.607843137,1],"backgroundColor":[0.329411765,0.329411765,0.352941176,1],"titleColor":[0.992156863,0.992156863,0.992156863,1],"bodyColor":[0.992156863,0.992156863,0.992156863,1],"appNameFontSize":18,"timeFontSize":14,"titleFontSize":14,"bodyFontSize":18}} + ''; + }; + } + { + package = shortcuts; + settings = { + maxcolumns = 3; + shortcuts-file = files.gnome.shortcuts; + shortcuts-toggle-overview = ["<Super>slash"]; + show-icon = false; + use-custom-shortcuts = true; + use-transparency = true; + visibility = 55; + }; + } + { + package = tiling-shell; + name = "tilingshell"; + settings = { + enable-blur-selected-tilepreview = false; + enable-blur-snap-assistant = false; + enable-snap-assist = false; + enable-tiling-system = true; + enable-tiling-system-windows-suggestions = true; + enable-window-border = false; + override-window-menu = true; + restore-window-original-size = true; + tiling-system-activation-key = ["0"]; + top-edge-maximize = true; + window-border-width = mkUint32 2; + inner-gaps = mkUint32 5; + outer-gaps = mkUint32 5; + move-window-down = ["<Shift><Super>s"]; + move-window-left = ["<Shift><Super>a"]; + move-window-right = ["<Shift><Super>d"]; + move-window-up = ["<Shift><Super>w"]; + }; + } + { + package = user-avatar-in-quick-settings; + name = "quick-settings-avatar"; + settings = { + avatar-position = 1; + avatar-realname = false; + avatar-size = 56; + }; + } + { + package = vitals; + settings = { + hot-sensors = ["_default_icon_"]; + show-battery = true; + show-storage = false; + show-gpu = true; + include-static-gpu-info = false; + }; + } + { + package = window-gestures; + name = "windowgestures"; + settings = { + fn-fullscreen = true; + fn-maximized-snap = true; + fn-move = true; + fn-move-snap = true; + fn-resize = true; + pinch-enable = true; + pinch3-in = 0; + pinch3-out = 0; + pinch4-in = 14; + pinch4-out = 3; + swipe3-down = 1; + swipe4-updown = 22; + taphold-move = true; + three-finger = false; + use-active-window = true; + }; + } + { + package = workspace-switcher-manager; + settings = { + active-show-win-title = false; + active-show-ws-name = true; + inactive-show-ws-name = true; + modifiers-hide-popup = true; + monitor = 0; + popup-mode = 0; + popup-opacity = 100; + vertical = 5; + ws-ignore-last = false; + ws-wraparound = true; + }; + } + { + package = wsp-windows-search-provider; + name = "windows-search-provider"; + settings = { + custom-prefixes = "`"; + results-order = 1; + search-commands = false; + search-method = 1; + }; + } + { + package = ddterm; + path = "com/github/amezin/ddterm"; + settings = + { + ddterm-activate-hotkey = ["<Super>space"]; + hide-window-on-esc = true; + panel-icon-type = "none"; + shortcut-find = ["<Control>f"]; + shortcut-page-close = ["<Control>w"]; + shortcut-win-new-tab = ["<Control>t"]; + show-animation = "ease-in-sine"; + show-animation-duration = 0.2; + hide-animation = "ease-out-sine"; + hide-animation-duration = 0.1; + window-skip-taskbar = false; + } + // (listToAttrs ( + genList ( + n: let + num = toString (n + 1); + in + nameValuePair "shortcut-switch-to-tab-${num}" ["<Control>${num}"] + ) + 9 + )); + } + { + package = vertical-workspaces; + settings = { + aaa-loading-profile = true; + always-activate-selected-window = false; + animation-speed-factor = 100; + app-display-module = true; + app-favorites-module = true; + app-folder-order = 1; + app-folder-remove-button = 0; + app-grid-active-preview = false; + app-grid-animation = 4; + app-grid-bg-blur-sigma = 40; + app-grid-columns = 0; + app-grid-content = 2; + app-grid-folder-center = true; + app-grid-folder-columns = 0; + app-grid-folder-icon-grid = 2; + app-grid-folder-icon-size = -1; + app-grid-folder-rows = 0; + app-grid-icon-size = -1; + app-grid-incomplete-pages = false; + app-grid-names = 0; + app-grid-order = 1; + app-grid-page-width-scale = 80; + app-grid-performance = true; + app-grid-remember-page = true; + app-grid-rows = 0; + app-grid-spacing = 12; + center-app-grid = true; + center-dash-to-ws = false; + center-search = true; + close-ws-button-mode = 2; + dash-bg-color = 0; + dash-bg-gs3-style = false; + dash-bg-opacity = 50; + dash-bg-radius = 0; + dash-icon-scroll = 1; + dash-isolate-workspaces = true; + dash-max-icon-size = 64; + dash-module = true; + dash-position = 2; + dash-position-adjust = 0; + dash-show-extensions-icon = 0; + dash-show-recent-files-icon = 0; + dash-show-windows-before-activation = 3; + enable-page-shortcuts = false; + favorites-notify = 1; + highlighting-style = 1; + hot-corner-action = 1; + hot-corner-fullscreen = false; + hot-corner-position = 1; + hot-corner-ripples = true; + layout-module = true; + message-tray-module = true; + new-window-focus-fix = false; + new-window-monitor-fix = false; + notification-position = 1; + osd-position = 2; + osd-window-module = true; + overlay-key-module = true; + overlay-key-primary = 1; + overlay-key-secondary = 1; + overview-bg-blur-sigma = 50; + overview-bg-brightness = 50; + overview-esc-behavior = 1; + overview-mode = 0; + panel-module = true; + panel-overview-style = 1; + panel-position = 0; + panel-visibility = 0; + recent-files-search-provider-module = false; + running-dot-style = 1; + search-bg-brightness = 30; + search-controller-module = true; + search-fuzzy = true; + search-icon-size = 96; + search-max-results-rows = 5; + search-module = true; + search-view-animation = 1; + search-width-scale = 105; + search-windows-icon-scroll = 1; + search-windows-order = 1; + sec-wst-position-adjust = 0; + secondary-ws-preview-scale = 100; + secondary-ws-preview-shift = false; + secondary-ws-thumbnail-scale = 5; + secondary-ws-thumbnails-position = 2; + show-app-icon-position = 0; + show-bg-in-overview = true; + show-search-entry = false; + show-ws-preview-bg = false; + show-ws-switcher-bg = false; + show-wst-labels = 1; + show-wst-labels-on-hover = true; + smooth-blur-transitions = true; + startup-state = 2; + swipe-tracker-module = true; + win-attention-handler-module = true; + win-preview-icon-size = 1; + win-preview-mid-mouse-btn-action = 1; + win-preview-sec-mouse-btn-action = 0; + win-preview-show-close-button = true; + win-title-position = 0; + window-attention-mode = 0; + window-icon-click-action = 1; + window-manager-module = true; + window-preview-module = true; + workspace-animation = 1; + workspace-animation-module = true; + workspace-module = true; + workspace-switcher-animation = 1; + workspace-switcher-popup-module = true; + ws-max-spacing = 350; + ws-preview-bg-radius = 30; + ws-preview-scale = 100; + ws-sw-popup-h-position = 50; + ws-sw-popup-mode = 0; + ws-sw-popup-v-position = 50; + ws-switcher-ignore-last = false; + ws-switcher-mode = 0; + ws-switcher-wraparound = false; + ws-thumbnail-scale = 10; + ws-thumbnail-scale-appgrid = 20; + ws-thumbnails-full = false; + ws-thumbnails-position = 5; + wst-position-adjust = 0; + }; + } + ] + ++ optionals osConfig.gui.fancy [ + { + package = rounded-window-corners-reborn; + settings = { + skip-libadwaita-app = false; + skip-libhandy-app = false; + border-width = -1; + border-color = with colors; + mkTuple [ + (mkDouble base0D-dec-r) + (mkDouble base0D-dec-g) + (mkDouble base0D-dec-b) + 1.0 + ]; + global-rounded-corner-settings = "{'padding': <{'left': 1, 'right': 1, 'top': 1, 'bottom': 1}>, 'keepRoundedCorners': <{'maximized': true, 'fullscreen': false}>, 'borderRadius': <uint32 12>, 'smoothing': <0.0>, 'enabled': <true>}"; + blacklist = ["com.github.amezin.ddterm"]; + }; + } + { + package = panel-corners; + settings.panel-corners = true; + } + { + package = transparent-window-moving; + settings.window-opacity = 200; + } + ] + ); + in { + dconf.settings = + { + "org/gnome/shell" = let + list = enabled: + map (ext: ext.package.extensionUuid) ( + filter (ext: + if enabled + then (!(ext.disable or false)) + else (ext.disable or false)) + extensions + ); + in { + disable-user-extensions = false; + disable-extension-version-validation = true; + disabled-extensions = list false; + enabled-extensions = list true; + }; + } + // foldr recursiveUpdate {} ( + map ( + ext: + if (hasAttr "settings" ext) + then + ( + if (hasAttr "path" ext) + then {"${ext.path}" = ext.settings;} + else if (hasAttr "name" ext) + then {"org/gnome/shell/extensions/${ext.name}" = ext.settings;} + else {"org/gnome/shell/extensions/${ext.package.extensionPortalSlug}" = ext.settings;} + ) + else {} + ) + extensions + ); + + home = { + packages = [pkgs.dconf2nix] ++ builtins.map (ext: ext.package) extensions; + file.".config/guillotine.json".source = files.gnome.menu; # Action Menu + persist.directories = [ + ".local/share/gnome-shell/extensions" + + # Clipboard + ".cache/copyous@boerdereinar.dev" + ".config/copyous@boerdereinar.dev" + ".local/share/copyous@boerdereinar.dev" + ]; + }; + } +) diff --git a/modules/desktop/gnome/_settings/main.nix b/modules/desktop/gnome/_settings/main.nix @@ -0,0 +1,202 @@ +_: { + lib, + osConfig ? null, + ... +}: +lib.mkIf (osConfig != null) ( + with lib.hm.gvariant; let + fonts = osConfig.fonts.fontconfig.defaultFonts; + in { + ## Dconf Keys ## + # Generated via nix-community/dconf2nix + # Use 'dconf watch /' to record changes + dconf.settings = { + # Keyboard Shortcuts + "org/gnome/desktop/wm/keybindings" = { + always-on-top = ["<Super>p"]; + begin-move = []; + begin-resize = []; + close = [ + "<Super>q" + "<Alt>F4" + ]; + cycle-group = []; + cycle-group-backward = []; + maximize = ["<Super>Up"]; + minimize = ["<Super>Down"]; + move-to-center = ["<Super>c"]; + move-to-monitor-down = []; + move-to-monitor-left = ["<Primary><Super>Left"]; + move-to-monitor-right = ["<Primary><Super>Right"]; + move-to-monitor-up = []; + move-to-workspace-1 = []; + move-to-workspace-down = []; + move-to-workspace-last = []; + move-to-workspace-left = ["<Shift><Super>Left"]; + move-to-workspace-right = ["<Shift><Super>Right"]; + move-to-workspace-up = []; + panel-main-menu = []; + panel-run-dialog = ["<Super>F2"]; + switch-applications = ["<Alt>Tab"]; + switch-applications-backward = ["<Shift><Alt>Tab"]; + switch-group = ["<Super>Tab"]; + switch-group-backward = ["<Shift><Super>Tab"]; + switch-to-workspace-down = []; + switch-to-workspace-left = ["<Super>Left"]; + switch-to-workspace-right = ["<Super>Right"]; + switch-to-workspace-up = []; + toggle-fullscreen = ["<Shift><Super>f"]; + toggle-maximized = ["<Super>m"]; + unmaximize = []; + }; + + "org/gnome/mutter/keybindings" = { + toggle-tiled-left = []; + toggle-tiled-right = []; + }; + + "org/gnome/shell/keybindings" = { + focus-active-notification = []; + open-application-menu = []; + switch-to-application-1 = ["<Super>1"]; + switch-to-application-2 = ["<Super>2"]; + switch-to-application-3 = ["<Super>3"]; + switch-to-application-4 = ["<Super>4"]; + switch-to-application-5 = ["<Super>5"]; + switch-to-application-6 = ["<Super>6"]; + switch-to-application-7 = ["<Super>7"]; + switch-to-application-8 = ["<Super>8"]; + switch-to-application-9 = ["<Super>9"]; + toggle-application-view = []; + toggle-message-tray = ["<Super><Shift>n"]; + toggle-overview = []; + toggle-quick-settings = []; + }; + + "org/gnome/settings-daemon/plugins/media-keys" = { + area-screenshot = ["Print"]; + area-screenshot-clip = []; + control-center = ["<Super><Shift>grave"]; + email = ["<Super>e"]; + home = ["<Super>f"]; + magnifier = ["<Super>x"]; + magnifier-zoom-in = ["<Super>equal"]; + magnifier-zoom-out = ["<Super>minus"]; + rotate-video-lock-static = []; + screencast = ["<Alt>Print"]; + screenreader = []; + screenshot = ["<Shift>Print"]; + screenshot-clip = []; + screensaver = ["<Super>l"]; + terminal = []; + volume-down = ["AudioLowerVolume"]; + volume-up = ["AudioRaiseVolume"]; + window-screenshot = ["<Primary>Print"]; + window-screenshot-clip = []; + www = ["<Super>grave"]; + custom-keybindings = [ + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/" + ]; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { + binding = "<Super>Return"; + command = "resources"; + name = "Task Manager"; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = { + binding = "<Super>t"; + command = "ghostty"; + name = "Terminal"; + }; + + "org/gnome/desktop/wm/preferences" = { + button-layout = "appmenu:minimize,maximize,close"; + focus-mode = "click"; + titlebar-font = "${builtins.head fonts.sansSerif} Bold 11"; + visual-bell = false; + }; + + # Core Settings + "org/gnome/desktop/a11y".always-show-universal-access-status = true; + "org/gnome/desktop/a11y/applications".screen-magnifier-enabled = false; + + "org/gnome/mutter" = { + attach-modal-dialogs = true; + center-new-windows = true; + dynamic-workspaces = true; + edge-tiling = false; + focus-change-on-pointer-rest = true; + overlay-key = "Super"; + workspaces-only-on-primary = true; + experimental-features = [ + "scale-monitor-framebuffer" + "xwayland-native-scaling" + ]; + }; + + "org/gnome/desktop/interface" = { + accent-color = "blue"; + clock-show-weekday = true; + enable-animations = true; + enable-hot-corners = true; + font-antialiasing = "grayscale"; + font-hinting = "slight"; + gtk-im-module = "gtk-im-context-simple"; + locate-pointer = true; + show-battery-percentage = true; + toolkit-accessibility = false; + }; + + "org/gnome/desktop/peripherals/touchpad" = { + click-method = "areas"; + tap-to-click = true; + two-finger-scrolling-enabled = true; + }; + + "org/gnome/settings-daemon/plugins/power" = { + power-button-action = "interactive"; + sleep-inactive-ac-type = "nothing"; + sleep-inactive-battery-timeout = 1800; + }; + + "org/gnome/settings-daemon/plugins/color" = { + night-light-enabled = true; + night-light-schedule-automatic = false; + night-light-schedule-from = 19.0; + night-light-schedule-to = 7.0; + night-light-temperature = mkUint32 3700; + }; + + "org/gnome/desktop/a11y/magnifier" = { + mouse-tracking = "proportional"; + show-cross-hairs = false; + }; + + "org/gnome/desktop/privacy" = { + disable-microphone = false; + old-files-age = mkUint32 7; + remember-recent-files = false; + remove-old-temp-files = true; + remove-old-trash-files = true; + }; + + "org/gnome/desktop/sound" = { + allow-volume-above-100-percent = true; + event-sounds = true; + theme-name = "__custom"; + }; + + "org/gnome/desktop/screensaver" = { + color-shading-type = "solid"; + lock-delay = mkUint32 0; + lock-enabled = false; + picture-options = "zoom"; + primary-color = "#000000000000"; + secondary-color = "#000000000000"; + }; + }; + } +) diff --git a/modules/desktop/gnome/default.nix b/modules/desktop/gnome/default.nix @@ -0,0 +1,29 @@ +## GNOME DE ## +{config, ...}: let + inherit (config) util; + inherit (config.flake) files; + inherit (config.flake.modules) nixos homeManager; + + base = import ../_base.nix {}; + main = import ./_main.nix {inherit util files;}; +in { + flake.modules = { + nixos.gnome.imports = [ + (base.nixos or {}) + (import ./_common.nix {}) + (main.nixos or {}) + nixos.qt + nixos.gtk + ]; + + homeManager.gnome.imports = + [ + (base.home or {}) + (main.home or {}) + homeManager.qt + homeManager.gtk + ] + ++ # Desktop Settings + builtins.map (p: import p {inherit util files;}) (util.map.modules.list ./_settings); + }; +} diff --git a/modules/desktop/hyprland/_features/browser.nix b/modules/desktop/hyprland/_features/browser.nix @@ -0,0 +1,18 @@ +_: { + home = _: { + home.file.".config/mozilla/firefox/default/chrome/userChrome.css".text = '' + #TabsToolbar { + -moz-window-dragging: no-drag; + } + ''; + + # Theme + programs.firefox.policies.ExtensionSettings = { + name = "catppuccin-macchiato-blue"; + value = { + installation_mode = "normal_installed"; + install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/{d49033ac-8969-488c-afb0-5cdb73957f41}/latest.xpi"; + }; + }; + }; +} diff --git a/modules/desktop/hyprland/_features/files.nix b/modules/desktop/hyprland/_features/files.nix @@ -0,0 +1,125 @@ +{ + util ? null, + files ? null, + inputs ? null, + ... +}: { + nixos = {pkgs, ...}: let + nemo = pkgs.nemo-with-extensions; + in { + services.dbus.packages = [nemo]; + environment.systemPackages = + [ + nemo + ] + ++ (with pkgs; [ + cinnamon-desktop + bulky + file-roller + lxqt.pcmanfm-qt + ]); + }; + + home = { + config, + pkgs, + ... + }: let + inherit (pkgs.lib) getExe getExe' replaceStrings; + inherit (inputs.home-manager.lib) hm; + terminal = "kitty"; + in { + xdg.mimeApps.defaultApplications = util.build.mime { + archive = ["org.gnome.FileRoller.desktop"]; + directory = ["nemo.desktop"]; + }; + + # Settings + dconf.settings = { + "org/gtk/gtk4/settings/file-chooser".sort-directories-first = true; + "org/nemo/search".search-reverse-sort = false; + "org/nemo/desktop".show-desktop-icons = false; + "org/nemo/plugins".disabled-actions = ["change-background.nemo_action"]; + "org/nemo/icon-view".captions = [ + "size" + "type" + "date_modified" + ]; + + "org/nemo/preferences" = { + click-policy = "double"; + date-format = "informal"; + inherit-folder-viewer = true; + quick-renames-with-pause-in-between = true; + show-advanced-permissions = true; + show-new-folder-icon-toolbar = false; + show-show-thumbnails-toolbar = true; + tooltips-in-icon-view = true; + tooltips-in-list-view = false; + tooltips-show-access-date = true; + tooltips-show-birth-date = true; + tooltips-show-file-type = true; + tooltips-show-mod-date = true; + }; + + "org/nemo/preferences/menu-config" = { + background-menu-open-in-terminal = false; + selection-menu-open-in-terminal = false; + }; + }; + + home = { + persist.directories = [ + ".config/nemo" + ".local/share/nemo" + ".config/pcmanfm-qt" + ]; + + # Bulk Renamer + activation.nemo-rename = hm.dag.entryAfter ["writeBoundary"] '' + if [[ -v DBUS_SESSION_BUS_ADDRESS ]] + then + export DCONF_DBUS_RUN_SESSION="" + else + export DCONF_DBUS_RUN_SESSION="${getExe' pkgs.dbus "dbus-run-session"} --dbus-daemon=${getExe' pkgs.dbus "dbus-daemon"}" + fi + + run $DCONF_DBUS_RUN_SESSION ${getExe pkgs.dconf} write /org/nemo/preferences/bulk-rename-tool "b'bulky'" + unset DCONF_DBUS_RUN_SESSION + ''; + + file = { + # Open in Terminal + ".local/share/nemo/actions/terminal.nemo_action".text = '' + [Nemo Action] + Name=Open in Terminal + Comment=Opens ${terminal} in the selected folder + Exec=${terminal} --working-directory=%F + Icon-Name=${terminal} + Selection=any + Extensions=dir; + EscapeSpaces=true + ''; + + # Desktop Icons + ".config/pcmanfm-qt/default/settings.conf".text = + replaceStrings + [ + "@icon" + "@font" + "@terminal" + "@wallpaper" + "@archiver" + ] + [ + config.stylix.icons.dark + config.stylix.fonts.sansSerif.name + terminal + (builtins.toString files.images.transparent) + "file-roller" + ] + files.pcmanfm; + }; + }; + }; +} diff --git a/modules/desktop/hyprland/_features/hyprutils.nix b/modules/desktop/hyprland/_features/hyprutils.nix @@ -0,0 +1,80 @@ +{ + util ? null, + files ? null, + ... +}: { + nixos = {pkgs, ...}: { + environment.systemPackages = with pkgs; [ + # Apps + custom.kebihelp + nwg-displays + + # Utilities + custom.hyprutils + grim + grimblast + hyprkeys + hyprshade + unstable.pyprland + slurp + waycorner + ]; + }; + + home = { + config, + pkgs, + ... + }: let + inherit (pkgs.lib) getExe mkForce; + inherit (config.lib.stylix) colors; + in { + # Wallpaper Daemon + services.hyprpaper = { + enable = true; + settings = { + ipc = false; + splash = mkForce true; + }; + }; + + # Hot Corners + systemd.user.services.waycorner = let + target = ["graphical-session.target"]; + in { + Install.WantedBy = target; + Unit = { + Description = "Hot Corners"; + After = target; + }; + Service.ExecStart = getExe pkgs.waycorner; + }; + + home = { + persist.directories = [".config/nwg-displays"]; + file = with files.hyprland; { + # Application Drawer + ".config/nwg-drawer/drawer.css".text = drawer; + + # Pyprland + ".config/hypr/pyprland.toml".text = pypr; + + # Hot Corners + ".config/waycorner/config.toml".text = waycorner; + + # Keybinds Viewer + ".config/kebihelp.json".text = util.build.theme { + inherit colors; + inherit (config.stylix) fonts; + file = kebihelp; + }; + + # Shaders + ".config/hypr/shaders" = { + source = shaders; + recursive = true; + }; + }; + }; + }; +} diff --git a/modules/desktop/hyprland/_features/idle.nix b/modules/desktop/hyprland/_features/idle.nix @@ -0,0 +1,33 @@ +_: { + home = { + lib, + pkgs, + osConfig ? null, + ... + }: + lib.mkIf (osConfig != null) ( + let + inherit (lib) getExe getExe'; + idle = import ../_idle.nix lib pkgs; + shader = getExe pkgs.hyprshade; + dpms = "${getExe' osConfig.programs.hyprland.package "hyprctl"} dispatch dpms"; + in { + services.swayidle.timeouts = with idle; [ + { + timeout = 240; # Dim display + command = audio "${shader} on dim"; + resumeCommand = "${shader} off"; + } + { + timeout = 300; # Turn off display + command = audio "${dpms} off"; + resumeCommand = "${dpms} on"; + } + { + timeout = 500; # Suspend device + command = audio "${dpms} on && ${lock "" ""} && ${getExe' pkgs.systemd "systemctl"} suspend"; + } + ]; + } + ); +} diff --git a/modules/desktop/hyprland/_features/launcher.nix b/modules/desktop/hyprland/_features/launcher.nix @@ -0,0 +1,78 @@ +{ + util ? null, + files ? null, + inputs ? null, + ... +}: { + home = {config, ...}: { + imports = [inputs.hyprshell.homeModules.default]; + home.persist.directories = [ + ".local/share/hyprshell" + ".cache/hyprshell" + ]; + + programs.hyprshell = { + enable = true; + systemd.enable = true; + styleFile = util.build.theme { + inherit (config.lib.stylix) colors; + file = files.hyprland.hyprshell; + }; + + settings.windows = { + enable = true; + scale = 9.0; + items_per_row = 3; + + overview = { + enable = true; + modifier = "super"; + key = "tab"; + + launcher = { + launch_modifier = "alt"; + default_terminal = "kitty"; + width = 700; + max_items = 4; + show_when_empty = true; + plugins = { + applications = { + run_cache_weeks = 4; + show_execs = true; + show_actions_submenu = true; + }; + calc.enable = true; + path.enable = true; + terminal.enable = true; + websearch.engines = [ + { + url = "https://www.google.com/search?q={}"; + name = "Google"; + key = "g"; + } + { + url = "https://en.wikipedia.org/wiki/Special:Search?search={}"; + name = "Wikipedia"; + key = "w"; + } + ]; + }; + }; + }; + + switch = { + enable = true; + modifier = "alt"; + filter_by = ["current_workspace"]; + }; + + switch_2 = { + enable = true; + modifier = "alt"; + key = "grave"; + filter_by = ["same_class"]; + }; + }; + }; + }; +} diff --git a/modules/desktop/hyprland/_features/login.nix b/modules/desktop/hyprland/_features/login.nix @@ -0,0 +1,35 @@ +_: { + nixos = { + config, + lib, + pkgs, + ... + }: let + inherit (lib) mkForce; + in { + stylix.targets.regreet.enable = true; + environment.persist.directories = ["/var/lib/regreet"]; + programs.regreet = { + enable = true; + package = pkgs.regreet; + settings.commands = { + reboot = [ + "systemctl" + "reboot" + ]; + poweroff = [ + "systemctl" + "poweroff" + ]; + }; + + extraCss = mkForce ""; + theme = mkForce config.gui.gtk.theme; + iconTheme = with config.stylix.icons; + mkForce { + name = dark; + inherit package; + }; + }; + }; +} diff --git a/modules/desktop/hyprland/_features/main.nix b/modules/desktop/hyprland/_features/main.nix @@ -0,0 +1,48 @@ +{ + util ? null, + files ? null, + ... +}: { + nixos = { + config, + lib, + pkgs, + ... + }: let + inherit + (lib) + getExe + getExe' + mkForce + replaceStrings + ; + in { + # WM + programs.hyprland = { + enable = true; + withUWSM = true; + xwayland.enable = true; + package = pkgs.hyprworld.hyprland; + portalPackage = pkgs.hyprworld.xdg-desktop-portal-hyprland; + }; + + # Greeter + services.greetd.settings.default_session.command = mkForce "${getExe' config.programs.hyprland.package "start-hyprland"} -- --config ${ + pkgs.writeText "greeter.conf" ( + replaceStrings ["@greeter"] [(getExe config.programs.regreet.package)] ( + util.build.theme { + inherit (config.lib.stylix) colors; + file = files.hyprland.greeter; + } + ) + ) + } &> /dev/null"; + + # App Environment + xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk]; + }; + + home = _: { + home.persist.directories = [".config/hypr"]; + }; +} diff --git a/modules/desktop/hyprland/_features/media.nix b/modules/desktop/hyprland/_features/media.nix @@ -0,0 +1,41 @@ +{util ? null, ...}: { + nixos = {pkgs, ...}: { + environment.systemPackages = with pkgs; [ + celluloid + lollypop + papers + playerctl + shotwell + transmission_4-gtk + ]; + }; + + home = {pkgs, ...}: { + # Default Applications + xdg.mimeApps.defaultApplications = util.build.mime { + audio = ["org.gnome.Lollypop.desktop"]; + document = ["org.gnome.Papers.desktop"]; + image = ["org.gnome.Shotwell-Viewer.desktop"]; + magnet = ["transmission-gtk.desktop"]; + pdf = ["org.gnome.Papers.desktop"]; + video = ["io.github.celluloid_player.Celluloid.desktop"]; + }; + + # Persisted Files + home.persist.directories = [ + ".config/mpv" + ".config/shotwell" + ".local/share/lollypop" + ".local/share/shotwell" + ".cache/shotwell" + ]; + + # Media Player + services.playerctld.enable = true; + programs.mpv = { + enable = true; + defaultProfiles = ["gpu-hq"]; + scripts = [pkgs.mpvScripts.mpris]; + }; + }; +} diff --git a/modules/desktop/hyprland/_features/notify.nix b/modules/desktop/hyprland/_features/notify.nix @@ -0,0 +1,92 @@ +{ + util ? null, + files ? null, + ... +}: { + nixos = _: { + # Phone Connect + programs.kdeconnect.enable = true; + }; + + home = { + config, + lib, + ... + }: let + inherit (lib) mkDefault; + in { + home.persist.directories = [".config/kdeconnect"]; + services.kdeconnect = { + enable = true; + indicator = true; + }; + + # Notifications Daemon + stylix.targets.swaync.enable = false; + services.swaync = { + enable = true; + style = util.build.theme { + inherit (config.stylix) fonts; + inherit (config.lib.stylix) colors; + file = files.swaync; + }; + + settings = { + # Notification + positionX = mkDefault "right"; + positionY = mkDefault "top"; + layer = "overlay"; + layer-shell = true; + cssPriority = "user"; + + image-visibility = "when-available"; + timeout = 10; + timeout-critical = 0; + timeout-low = 5; + notification-2fa-action = true; + notification-grouping = true; + notification-inline-replies = true; + + # Control Center + control-center-layer = "top"; + fit-to-screen = false; + control-center-height = -1; + control-center-margin-top = 3; + control-center-margin-left = 3; + control-center-margin-bottom = 3; + control-center-margin-right = 3; + + widgets = [ + "inhibitors" + "title" + "dnd" + "notifications" + ]; + + widget-config = { + title = { + text = "Notifications"; + clear-all-button = true; + button-text = "Clear"; + }; + dnd.text = "Do Not Disturb"; + }; + + notification-visibility = { + utility = { + app-name = "utility"; + state = "transient"; + }; + upower = { + app-name = "poweralertd"; + state = "transient"; + }; + hyprland = { + app-name = "grimblast"; + state = "transient"; + }; + }; + }; + }; + }; +} diff --git a/modules/desktop/hyprland/_features/panel.nix b/modules/desktop/hyprland/_features/panel.nix @@ -0,0 +1,426 @@ +{files ? null, ...}: { + home = { + config, + lib, + pkgs, + osConfig ? null, + ... + }: let + inherit (lib) mkDefault mkIf mkMerge; + in { + stylix.targets.waybar = { + enable = true; + font = "sansSerif"; + addCss = false; + }; + + home.packages = [pkgs.wttrbar]; + programs.waybar = { + enable = true; + systemd.enable = true; + package = pkgs.waybar; + style = files.hyprland.waybar; + settings = mkIf (osConfig != null) (let + inherit (osConfig.gui) display; + shared = { + layer = "top"; + position = "top"; + height = 40; + spacing = 3; + margin-top = 2; + margin-right = 5; + margin-bottom = 1; + margin-left = 5; + + "custom/logo" = { + format = "󱄅"; + tooltip = false; + on-click = "nwg-drawer"; + }; + + "group/users" = { + orientation = "horizontal"; + modules = [ + "user" + "custom/power" + ]; + drawer.transition-left-to-right = true; + }; + + user = { + format = "{user}"; + open-on-click = true; + icon = true; + height = 22; + width = 22; + }; + + "custom/user" = { + exec = "sh -c 'getent passwd $USER | cut -d : -f 5'"; + format = "{}"; + rotate = 270; + tooltip = false; + on-click = "sh -c 'nemo ~'"; + }; + + "custom/power" = { + format = "⏻"; + tooltip = false; + on-click = "wlogout -p layer-shell"; + }; + + "hyprland/submap" = { + always-on = false; + tooltip = false; + format = " {}"; + on-click = "hyprctl dispatch submap reset"; + }; + + "hyprland/window" = { + format = "{class}"; + icon = false; + separate-outputs = true; + }; + + "hyprland/workspaces" = { + all-outputs = false; + show-special = true; + format = "<small>{name}</small>{windows}"; + on-scroll-up = "hyprctl dispatch workspace m+1"; + on-scroll-down = "hyprctl dispatch workspace m-1"; + ignore-workspaces = [ + "special:S-.*" + "special:minimized" + ]; + + workspace-taskbar = { + enable = true; + format = "{icon}"; + icon-size = 22; + icon-theme = config.stylix.icons.dark; + on-click-window = "hyprutils click {button} {address}"; + ignore-list = [ + "kitty-clip" + "kitty-dropterm" + ]; + }; + }; + + "custom/minimized" = { + format = ""; + on-click = "hyprutils toggle minimized"; + }; + + "group/menu" = { + modules = [ + "custom/hide" + "keyboard-state" + "tray" + ]; + orientation = "horizontal"; + drawer = { + click-to-reveal = true; + transition-left-to-right = true; + }; + }; + + "custom/hide" = { + format = mkDefault ""; + tooltip = false; + }; + + keyboard-state = { + numlock = true; + capslock = true; + format = { + numlock = mkDefault " N {icon}"; + capslock = mkDefault "󰪛 {icon}"; + }; + format-icons = { + locked = ""; + unlocked = ""; + }; + }; + + bluetooth = { + format = ""; + format-disabled = "󰂳"; + format-connected = "󰂱 {num_connections}"; + tooltip-format = " {status}"; + tooltip-format-connected = "{device_enumerate}"; + tooltip-format-enumerate-connected = " {device_alias} 󰂄 {device_battery_percentage}%"; + on-click = "overskride"; + }; + + network = let + tooltip = "Strength: <b>{signaldBm}dBm ({signalStrength}%)</b>\nFrequency: <b>{frequency}MHz</b>\nInterface: <b>{ifname}</b>\nIP: <b>{ipaddr}/{cidr}</b>\nGateway: <b>{gwaddr}</b>\nNetmask: <b>{netmask}</b>"; + in { + format = "?"; + format-disconnected = "󰌙"; + format-wifi = "{icon}"; + format-ethernet = "󰌘"; + format-icons = [ + "󰤯" + "󰤟" + "󰤢" + "󰤥" + "󰤨" + ]; + format-linked = "󰈁"; + tooltip-format-wifi = "Network: <big><b>{essid}</b></big>\n${tooltip}"; + tooltip-format-ethernet = "Network: <big><b>Wired</b></big>\n${tooltip}"; + tooltip-format-disconnected = "󰌙 Disconnected"; + on-click = "sh -c 'env XDG_CURRENT_DESKTOP=GNOME gnome-control-center wifi'"; + }; + + "group/media" = { + modules = [ + "wireplumber" + "mpris" + ]; + orientation = "horizontal"; + drawer = { + click-to-reveal = true; + transition-left-to-right = true; + transition-duration = 1000; + }; + }; + + wireplumber = { + max-volume = 150; + scroll-step = 1; + reverse-scrolling = 1; + format = "{icon}"; + tooltip-format = "Volume: {volume}%\nDevice: {node_name}"; + format-icons = [ + "󰕿" + "󰖀" + "󰕾" + ]; + format-muted = ""; + on-click = "pwvucontrol"; + }; + + mpris = { + dynamic-len = 20; + dynamic-order = [ + "title" + "artist" + "length" + ]; + dynamic-separator = " - "; + format = mkDefault " {player}"; + format-paused = mkDefault "󰏤 <i>{player}</i>"; + format-stopped = ""; + tooltip-format-stopped = "Not Playing"; + on-click = "sysutils media toggle"; + on-click-right = "sysutils media next"; + on-click-middle = "sysutils media previous"; + }; + + "group/display" = { + modules = [ + "backlight" + "custom/temperature" + ]; + orientation = "horizontal"; + drawer.transition-left-to-right = true; + }; + + backlight = { + format = "{icon}"; + tooltip-format = "Backlight: {percent}%"; + format-icons = [ + "" + "" + "" + "" + "" + "" + "" + "" + "" + ]; + on-scroll-up = "sysutils brightness down"; + on-scroll-down = "sysutils brightness up"; + on-click = "nwg-displays"; + }; + + "custom/temperature" = { + format = ""; + tooltip = false; + on-click = "sysutils temperature"; + }; + + "group/power" = { + modules = [ + "battery" + "power-profiles-daemon" + ]; + orientation = "horizontal"; + drawer.transition-left-to-right = false; + }; + + battery = { + interval = 5; + align = 0; + rotate = 0; + format = "{icon}"; + on-click-right = "hyprutils toggle fancy"; + tooltip-format = "Battery: {capacity}%"; + format-charging = ""; + format-icons = [ + "" + "" + "" + "" + "" + ]; + states = { + good = 80; + warning = 20; + critical = 10; + }; + }; + + power-profiles-daemon = { + format = "{icon}"; + tooltip = true; + tooltip-format = "Power Profile: {profile}"; + format-icons = { + default = ""; + performance = "󱄟"; + balanced = ""; + power-saver = ""; + }; + }; + + "custom/weather" = { + format = mkDefault "{}°"; + return-type = "json"; + exec = mkDefault "wttrbar --date-format %d/%m --nerd"; + tooltip = true; + interval = 600; + signal = 7; + on-click = "pkill -RTMIN+7 waybar"; + }; + + clock = { + interval = 1; + format = mkDefault "󰅐 {:%H:%M:%S} "; + format-alt = mkDefault "󰅐 {:%I:%M %A, %d %B %Y} "; + tooltip-format = "<tt><small>{calendar}</small></tt>"; + calendar = { + mode = "year"; + mode-mon-col = 3; + weeks-pos = "left"; + on-scroll = 1; + format = with config.lib.stylix.colors; { + months = "<span color='#${base06}'><b>{}</b></span>"; + days = "<span color='#${base05}'><b>{}</b></span>"; + weeks = "<span color='#${base0C}'><b>W{}</b></span>"; + weekdays = "<span color='#${base0A}'><b>{}</b></span>"; + today = "<span color='#${base08}'><b><u>{}</u></b></span>"; + }; + }; + + actions = { + on-click-right = "mode"; + on-click-forward = "tz_up"; + on-click-backward = "tz_down"; + on-scroll-up = "shift_down"; + on-scroll-down = "shift_up"; + }; + }; + + "group/notify" = { + modules = [ + "custom/notify" + "idle_inhibitor" + ]; + orientation = "horizontal"; + drawer.transition-left-to-right = false; + }; + + "custom/notify" = { + exec = "swaync-client -swb"; + exec-if = "which swaync-client"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + return-type = "json"; + escape = true; + tooltip = false; + format = "{icon}"; + format-icons = { + none = ""; + notification = ""; + dnd-none = ""; + dnd-notification = ""; + inhibited-none = ""; + inhibited-notification = ""; + dnd-inhibited-none = ""; + dnd-inhibited-notification = ""; + }; + }; + + idle_inhibitor = { + format = "{icon}"; + on-click = "sysutils toggle service swayidle"; + tooltip-format-activated = "Idle Inhibitor: On"; + tooltip-format-deactivated = "Idle Inhibitor: Off"; + format-icons = { + activated = ""; + deactivated = ""; + }; + }; + + modules-left = [ + "custom/logo" + "group/users" + "hyprland/workspaces" + "custom/minimized" + ]; + + modules-center = [ + "hyprland/window" + "hyprland/submap" + ]; + }; + in [ + (mkMerge [ + shared + { + output = display; + modules-right = [ + "group/menu" + "bluetooth" + "network" + "group/media" + "group/display" + "group/power" + "custom/weather" + "clock" + "group/notify" + ]; + } + ]) + (mkMerge [ + shared + { + output = "!" + display; + modules-right = [ + "group/menu" + "bluetooth" + "network" + "group/media" + "group/power" + "custom/weather" + "clock" + "group/notify" + ]; + } + ]) + ]); + }; + }; +} diff --git a/modules/desktop/hyprland/_features/security.nix b/modules/desktop/hyprland/_features/security.nix @@ -0,0 +1,103 @@ +{ + util ? null, + files ? null, + ... +}: { + nixos = _: { + # User Authentication + security = { + soteria.enable = true; + pam.services.swaylock.text = "auth include login"; + }; + }; + + home = { + config, + lib, + pkgs, + ... + }: let + idle = import ../_idle.nix lib pkgs; + inherit (idle) locker; + in { + # Locker + stylix.targets.swaylock = { + enable = true; + useWallpaper = true; + }; + + programs.swaylock = { + enable = true; + package = locker; + settings = { + clock = true; + indicator = true; + font = config.stylix.fonts.sansSerif.name; + effect-vignette = "0.3:1"; + }; + }; + + # Idle Daemon + services.swayidle = with idle; { + enable = true; + extraArgs = ["-w"]; + events = { + before-sleep = lock pause ""; + lock = lock pause "--fade-in 0.2 --grace 15 --grace-no-mouse"; + }; + }; + + # Logout + programs.wlogout = { + enable = true; + style = util.build.theme { + inherit (config.lib.stylix) colors; + file = files.wlogout; + }; + + layout = [ + { + label = "lock"; + action = "loginctl lock-session"; + text = ""; + keybind = "l"; + } + { + label = "logout"; + action = "loginctl terminate-user $USER"; + text = "↶"; + keybind = "e"; + } + { + label = "shutdown"; + action = "systemctl poweroff"; + text = "⏻"; + keybind = "s"; + } + { + label = "reboot"; + action = "systemctl reboot"; + text = "↺"; + keybind = "r"; + } + { + label = "suspend"; + action = "systemctl suspend"; + text = ""; + keybind = "u"; + } + { + label = "hibernate"; + action = "systemctl hibernate"; + text = ""; + keybind = "h"; + } + ]; + }; + + home.file.".config/kwalletrc".text = '' + [Wallet] + Enabled=false + ''; + }; +} diff --git a/modules/desktop/hyprland/_features/style.nix b/modules/desktop/hyprland/_features/style.nix @@ -0,0 +1,61 @@ +{ + inputs, + files ? null, + ... +}: { + nixos = {pkgs, ...}: { + environment.systemPackages = [pkgs.custom.cursors]; + stylix = { + base16Scheme = files.colors.catppuccin; + icons.package = pkgs.catppuccin-papirus-folders.override { + accent = "blue"; + flavor = "macchiato"; + }; + }; + + gui = { + gtk.theme = { + name = "catppuccin-macchiato-blue-standard"; + package = pkgs.catppuccin-gtk.override { + accents = ["blue"]; + variant = "macchiato"; + }; + }; + + qt = { + style = "kvantum"; + theme = { + name = "catppuccin-macchiato-blue"; + package = pkgs.catppuccin-kvantum.override { + accent = "blue"; + variant = "macchiato"; + }; + }; + }; + }; + }; + + home = {config, ...}: { + imports = [inputs.catppuccin.homeModules.catppuccin]; + + config = { + # Theme + catppuccin = { + accent = "blue"; + flavor = "macchiato"; + + brave.enable = config.programs.brave.enable or false; + thunderbird.enable = config.programs.thunderbird.enable or false; + obs.enable = config.programs.obs-studio.enable or false; + vesktop.enable = config.programs.nixcord.vesktop.enable or false; + vscode.profiles.default.enable = config.programs.vscode.enable or false; + }; + + # GTK Apps + dconf.settings."org/gnome/desktop/wm/preferences" = { + action-double-click-titlebar = "none"; + button-layout = "appmenu"; + }; + }; + }; +} diff --git a/modules/desktop/hyprland/_features/sysutils.nix b/modules/desktop/hyprland/_features/sysutils.nix @@ -0,0 +1,99 @@ +{ + util ? null, + files ? null, + ... +}: { + nixos = {pkgs, ...}: { + environment.systemPackages = with pkgs; [ + # Apps + clipse + font-manager + gnome-clocks + gnome-disk-utility + nwg-drawer + overskride + qalculate-gtk + remmina + resources + smile + + # Utilities + custom.sysutils + hyprpicker + pwvucontrol + sunsetr + wev + wl-clipboard + wl-screenrec + wlclock + wlr-randr + + # Network Settings + (gnome-control-center.overrideAttrs (old: { + postInstall = + old.postInstall + + '' + dir=$out/share/applications + for panel in $dir/* + do + [ "$panel" = "$dir/gnome-network-panel.desktop" ] && continue + [ "$panel" = "$dir/gnome-wifi-panel.desktop" ] && continue + [ "$panel" = "$dir/gnome-wwan-panel.desktop" ] && continue + [ "$panel" = "$dir/gnome-sharing-panel.desktop" ] && continue + [ "$panel" = "$dir/gnome-wacom-panel.desktop" ] && continue + rm "$panel" + done + ''; + })) + ]; + + ## Essential Utilities + # Power + services = { + power-profiles-daemon.enable = true; + upower.enable = true; + }; + + # Backlight + hardware.brillo.enable = true; + }; + + home = { + config, + lib, + pkgs, + ... + }: let + inherit (lib) getExe; + inherit (config.lib.stylix) colors; + in { + xdg.mimeApps.defaultApplications = util.build.mime { + font = ["com.github.FontManager.FontViewer.desktop"]; + }; + + # Display Temperature + home.file.".config/sunsetr".source = files.sunsetr; + + # Desktop Clock + systemd.user.services.wlclock = let + target = ["graphical-session.target"]; + in { + Install.WantedBy = target; + Unit = { + Description = "Desktop Clock"; + After = target; + }; + Service.ExecStart = with colors; "${getExe pkgs.wlclock} --layer bottom --exclusive-zone true --position top-right --margin 10 --size 300 --corner-radius 10 --border-size 2 --hand-width 7 --marking-width 3 --background-colour #${base00}4d --clock-colour #${base0D} --border-colour #${base00}"; + }; + + # Network Settings + xdg.desktopEntries."org.gnome.Settings" = { + name = "Network Settings"; + comment = "Gnome Control Center"; + icon = "org.gnome.Settings"; + exec = "env XDG_CURRENT_DESKTOP=gnome gnome-control-center"; + categories = ["X-Preferences"]; + terminal = false; + }; + }; +} diff --git a/modules/desktop/hyprland/_features/terminal.nix b/modules/desktop/hyprland/_features/terminal.nix @@ -0,0 +1,34 @@ +_: { + home = {pkgs, ...}: { + programs.kitty = { + enable = true; + themeFile = "Catppuccin-Macchiato"; + keybindings = { + "ctrl+c" = "copy_or_interrupt"; + "kitty_mod+f" = "launch --allow-remote-control kitty +kitten search/search.py @active-kitty-window-id"; + }; + + settings = { + kitty_mod = "ctrl+shift"; + confirm_os_window_close = 2; + copy_on_select = "clipboard"; + placement_strategy = "center"; + scrollback_lines = 10000; + enable_audio_bell = "no"; + visual_bell_duration = "0.1"; + + cursor_shape = "beam"; + cursor_shape_unfocused = "underline"; + tab_bar_style = "powerline"; + tab_powerline_style = "round"; + window_padding_width = 10; + }; + }; + + home.file.".config/kitty/search".source = pkgs.custom.kitty-search; + stylix.targets.kitty = { + enable = true; + variant256Colors = true; + }; + }; +} diff --git a/modules/desktop/hyprland/_features/text.nix b/modules/desktop/hyprland/_features/text.nix @@ -0,0 +1,58 @@ +{ + util ? null, + files ? null, + ... +}: { + nixos = {pkgs, ...}: { + environment.systemPackages = [pkgs.geany]; + }; + + home = { + config, + pkgs, + ... + }: { + # Text Editor + xdg.mimeApps.defaultApplications = util.build.mime { + markdown = ["geany.desktop"]; + text = ["geany.desktop"]; + }; + + home = { + persist.directories = [ + ".config/clipse" + ".config/geany" + ]; + + file = with files.geany; { + ".config/geany/geany.conf".text = settings; + ".config/geany/keybindings.conf".text = keybindings; + ".config/geany/colorschemes/theme.conf".source = "${pkgs.custom.geany-catppuccin}/share/geany/colorschemes/catppuccin-macchiato.conf"; + }; + }; + + # Clipboard Manager + services.clipse = { + enable = true; + allowDuplicates = false; + historySize = 150; + imageDisplay.type = "kitty"; + theme = with config.lib.stylix.colors; { + useCustomTheme = true; + DimmedDesc = "#${base07}"; + DimmedTitle = "#${base07}"; + FilteredMatch = "#${base08}"; + NormalTitle = "#${base08}"; + NormalDesc = "#${base0B}"; + SelectedDesc = "#${base0D}"; + SelectedTitle = "#${base0D}"; + SelectedBorder = "#${base0D}"; + SelectedDescBorder = "#${base0D}"; + TitleFore = "#${base05}"; + Titleback = "#${base01}"; + StatusMsg = "#${base0E}"; + PinIndicatorColor = "#${base0F}"; + }; + }; + }; +} diff --git a/modules/desktop/hyprland/_idle.nix b/modules/desktop/hyprland/_idle.nix @@ -0,0 +1,15 @@ +# Shared Idle scripts +lib: pkgs: let + inherit (lib) getExe getExe'; + locker = pkgs.swaylock-effects; +in { + inherit locker; + lock = pre: flag: "sh -c 'if ! ${getExe' pkgs.procps "pgrep"} -x swaylock; then ${pre} ${getExe locker} -f ${flag}; fi'"; + + # Check if audio is playing + pause = "${getExe pkgs.playerctl} pause -a;"; + audio = command: "${pkgs.writeShellScript "audio" '' + ${getExe pkgs.playerctl} status | ${getExe pkgs.gnugrep} Playing + if [ $? == 1 ]; then ${command}; fi + ''}"; +} diff --git a/modules/desktop/hyprland/_settings/apps.nix b/modules/desktop/hyprland/_settings/apps.nix @@ -0,0 +1,166 @@ +_: { + config, + lib, + pkgs, + osConfig ? null, + ... +}: +lib.mkIf (osConfig != null) ( + let + inherit (builtins) map toString; + inherit (lib) flatten getExe head splitString; + + inherit (osConfig.gui) display; + inherit (config.stylix) cursor; + hyprcursor = "${cursor.name}-Hyprcursor"; + + unit = command: head (splitString " " command); + in { + ## App Environment + # Cursor + xdg.dataFile."icons/${hyprcursor}".source = "${cursor.package}/share/icons/${hyprcursor}"; + wayland.windowManager.hyprland.settings = { + env = [ + "HYPRCURSOR_THEME, ${hyprcursor}" + "HYPRCURSOR_SIZE, ${toString cursor.size}" + + # QT Apps + "QT_WAYLAND_DISABLE_WINDOWDECORATION, 1" + + # Screenshot + "SLURP_ARGS, -dc ${osConfig.lib.stylix.colors.base0D}" + ]; + + # Window Swallowing + misc.swallow_regex = "^(kitty)$"; + + ## Autostart + exec-once = + [ + "uwsm finalize" + "hyprctl setcursor ${hyprcursor} ${toString cursor.size}" + ] + ++ (map (app: "uwsm app -t service -u ${unit app}.service -- " + app) [ + "hyprutils daemon" + + # Pyprland + "pypr" + + # Application Drawer + "nwg-drawer -r" + + # Desktop Icons + "pcmanfm-qt --desktop" + + # Display Temperature + "sunsetr -b" + ]); + + ## Shortcuts + bind = let + toggle = app: "pkill ${app} || uwsm app -u ${app}.scope -- ${app}"; + runOnce = app: "pgrep ${app} || uwsm app -u ${app}.scope -- ${app}"; + in [ + # Applications + "$mod, F, exec, nemo" + "$mod, T, exec, kitty" + "$mod, W, exec, firefox" + "$mod, Return, exec, ${runOnce "resources"}" + "$mod SHIFT, equal, exec, pypr toggle calc" + ", XF86Calculator, exec, qalculate-gtk" + + # Utilities + "$mod, A, exec, nwg-drawer" + "$mod, slash, exec, ${toggle "kebihelp"} show -a" + "$mod SHIFT, C, exec, ${runOnce "hyprpicker"} -arf hex" + "$mod SHIFT, B, exec, ${runOnce "overskride"}" + "$mod, D, exec, ${runOnce "nwg-displays"}" + "$mod SHIFT, P, exec, pwvucontrol" + "$mod SHIFT, N, exec, sh -c 'env XDG_CURRENT_DESKTOP=GNOME gnome-control-center wifi'" + "$mod, Escape, exec, ${toggle "wlogout"} -p layer-shell" + + # Tools + "$mod SHIFT, A, exec, sysutils toggle service waybar" + "$mod SHIFT, D, exec, hyprutils toggle monitor ${display}" + "$mod, N, exec, swaync-client -t -sw" + "$mod, S, exec, hyprutils toggle shader" + "$mod SHIFT, T, exec, pypr toggle term" + "$mod, V, exec, pypr show clip" + "$mod, backslash, exec, pypr toggle emoji" + ]; + + ## Permissions + permission = [ + "${osConfig.programs.hyprland.portalPackage}/libexec/.xdg-desktop-portal-hyprland-wrapped, screencopy, allow" + "${getExe pkgs.grim}, screencopy, allow" + "${getExe pkgs.wl-screenrec}, screencopy, allow" + ]; + + ## Layer Rules + layerrule = [ + "no_anim on, match:namespace ^(hyprpicker)$" + "dim_around on, match:namespace ^(hyprshell_overview)$" + + "blur on, animation fade, match:namespace ^(logout_dialog)$" + "blur on, dim_around on, animation popin, match:namespace ^(nwg-drawer)$" + + "blur on, ignore_alpha 0, animation slide right, match:namespace ^(swaync-control-center)$" + "blur on, ignore_alpha 0, animation slide right, match:namespace ^(swaync-notification-window)$" + + "blur on, ignore_alpha 0, match:namespace ^(waybar)$" + "blur on, ignore_alpha 0, match:namespace ^(wlclock)$" + ]; + + ## Window Rules + windowrule = flatten ( + [ + # Settings + "stay_focused on, match:class ^(gnome-control-center)$" + + # Keybinds Viewer + "pin on, stay_focused on, opacity 0.9 override, match:title ^(Kebihelp)$" + + # Browser Windows + "float on, match:title ^(Picture-in-[P|p]icture)$" + "workspace special silent, match:title ^(Sharing Indicator)$" + "workspace special silent, match:title ^(.*is sharing (your screen|a window).)$" + + # Media Consumption + "idle_inhibit focus, match:class ^(mpv|.*celluloid.*|.+exe)$" + "idle_inhibit focus, match:class ^(firefox|brave-browser)$, match:title ^(.*YouTube.*)$" + "idle_inhibit fullscreen, match:class ^(firefox|brave-browser)$" + + # Screen Tearing + "immediate on, match:class ^(.+exe)$" + + # Prompt Windows + "float on, dim_around on, match:class ^(xdg-desktop-portal-gtk)$" + ] + ++ (map (class: ["pin on, dim_around on, stay_focused on, match:class ^(${class})$"]) [ + # Authentication + "pinentry-" + "gay.vaskel.Soteria" + "gcr-prompter" + ]) + ++ (map (class: ["float on, pin on, persistent_size on, match:class ^(${class})$"]) [ + # Utilities + "com.saivert.pwvucontrol" + "io.github.kaii_lb.Overskride" + "nwg-displays" + "gnome-control-center" + "org.gnome.Settings" + ]) + ++ (map (title: ["float on, match:title ^(${title})(.*)$"]) [ + # Dialogs + "Library" + "Open File" + "Open Folder" + "Save As" + "Save File" + "Select a File" + ".*Properties" + ]) + ); + }; + } +) diff --git a/modules/desktop/hyprland/_settings/keybinds.nix b/modules/desktop/hyprland/_settings/keybinds.nix @@ -0,0 +1,207 @@ +## Compositor Binds +_: _: let + inherit (builtins) concatLists genList toString; +in { + wayland.windowManager.hyprland = { + ## Keybindings + settings = { + "$mod" = "SUPER"; + bind = + [ + # Compositor Commands + "ALT, F4, killactive," + "$mod, Q, killactive," + "$mod SHIFT, Q, forcekillactive," + "$mod SHIFT, E, fullscreen," + "$mod, C, centerwindow" + "$mod, C, movecursortocorner, 2" + "$mod, E, fullscreen, 1" + "$mod, P, pin" + "$mod, Space, layoutmsg, togglesplit" + "$mod SHIFT, S, toggleswallow" + + # Window Focus + "$mod, left, movefocus, l" + "$mod, right, movefocus, r" + "$mod, up, movefocus, u" + "$mod, down, movefocus, d" + "ALT, A, focusurgentorlast" + "ALT, A, alterzorder, top" + + # Window Swap + "$mod SHIFT, left, swapwindow, l" + "$mod SHIFT, right, swapwindow, r" + "$mod SHIFT, up, swapwindow, u" + "$mod SHIFT, down, swapwindow, d" + + # Window Groups + "$mod SHIFT, space, togglegroup" + "ALT, grave, changegroupactive, f" + "ALT SHIFT, grave, changegroupactive, b" + "$mod CTRL, left, moveintogroup, l" + "$mod CTRL, right, moveintogroup, r" + "$mod CTRL, up, moveintogroup, u" + "$mod CTRL, down, moveintogroup, d" + + # Floating Mode + "$mod, semicolon, togglefloating," + "$mod, apostrophe, exec, hyprutils toggle float" + + # Cycle Workspaces + "$mod, comma, split-cycleworkspaces, prev" + "$mod, period, split-cycleworkspaces, next" + "$mod CTRL, comma, split-cycleworkspaces, prev" + "$mod CTRL, period, split-cycleworkspaces, next" + "$mod, mouse_up, split-cycleworkspaces, prev" + "$mod, mouse_down, split-cycleworkspaces, next" + + # Special Workspace + "$mod, 0, togglespecialworkspace, Stash" + "$mod SHIFT, 0, exec, pypr toggle_special Stash" + + # Move Window to Workspace + "$mod SHIFT, comma, split-movetoworkspace, -1" + "$mod SHIFT, period, split-movetoworkspace, +1" + + # Cycle Monitors + "$mod ALT, comma, focusmonitor, l" + "$mod ALT, period, focusmonitor, r" + + # Move Window to Monitor + "$mod SHIFT ALT, comma, movewindow, mon:-1" + "$mod SHIFT ALT, period, movewindow, mon:+1" + + # Screen Lock + "$mod, L, exec, loginctl lock-session" + + # Window Minimization + "ALT, Q, movetoworkspacesilent, special:minimized" + "ALT SHIFT, Q, exec, hyprutils toggle minimized" + + # Screenshot + '', Print, exec, sh -c "pgrep slurp || grimblast --notify --freeze copysave area"'' + "CTRL, Print, exec, grimblast --notify --cursor copysave active" + "SHIFT, Print, exec, grimblast --notify --cursor copysave output" + + # Submaps + "$mod SHIFT, Escape, exec, sysutils toggle service waycorner" + "$mod SHIFT, Escape, submap, Inhibit" + "$mod, R, submap, Resize" + "$mod, M, submap, Move" + ] + ++ + # Workspaces + (concatLists ( + genList ( + n: let + num = toString (n + 1); + in [ + "$mod, ${num}, split-workspace, ${num}" + "$mod SHIFT, ${num}, split-movetoworkspace, ${num}" + ] + ) + 9 + )); + + # Mouse + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; + + # Ignore Locked State + bindl = [ + # Media Controls + ", XF86AudioPlay, exec, sysutils media toggle" + ", XF86AudioPrev, exec, sysutils media previous" + ", XF86AudioNext, exec, sysutils media next" + + # Volume + ", XF86AudioMute, exec, sysutils volume mute" + + # Keyboard Backlight + ", XF86KbdBrightnessUp, exec, sysutils backlight up" + ", XF86KbdBrightnessDown, exec, sysutils backlight down" + + # Touchpad + ", XF86TouchpadToggle, exec, hyprutils toggle touchpad" + ]; + + # Repeat on Hold + bindle = [ + # Volume + ", XF86AudioRaiseVolume, exec, sysutils volume up" + ", XF86AudioLowerVolume, exec, sysutils volume down" + + # Backlight + ", XF86MonBrightnessUp, exec, sysutils brightness up" + ", XF86MonBrightnessDown, exec, sysutils brightness down" + + # Magnifier + "$mod, equal, exec, pypr zoom ++0.5" + "$mod, minus, exec, pypr zoom --0.5" + "$mod SHIFT, minus, exec, pypr zoom" + ]; + }; + + ## Submaps + submaps = { + # Inhibit Keybinds + Inhibit.settings.bind = [ + "$mod SHIFT, Escape, exec, sysutils toggle service waycorner" + "$mod SHIFT, Escape, submap, reset" + ]; + + # Window Resize + Resize.settings = { + binde = [ + ", right, resizeactive, 10 0" + ", left, resizeactive, -10 0" + ", up, resizeactive, 0 -10" + ", down, resizeactive, 0 10" + ]; + bindm = [", mouse:272, resizewindow"]; + bind = [ + ", escape, submap, reset" + "$mod, R, submap, reset" + ]; + }; + + # Window Movement + Move.settings = { + bind = [ + ", C, centerwindow" + ", P, pin" + ", left, movewindoworgroup, l" + ", right, movewindoworgroup, r" + ", up, movewindoworgroup, u" + ", down, movewindoworgroup, d" + "SHIFT, left, moveactive, -30 0" + "SHIFT, right, moveactive, 30 0" + "SHIFT, up, moveactive, 0 -30" + "SHIFT, down, moveactive, 0 30" + ", comma, split-movetoworkspace, -1" + ", period, split-movetoworkspace, +1" + ", escape, submap, reset" + "$mod, M, submap, reset" + ]; + bindm = [", mouse:272, movewindow"]; + }; + + # Window Minimization + Minimized.settings.bind = [ + ", left, movefocus, l" + ", right, movefocus, r" + ", up, movefocus, u" + ", down, movefocus, d" + ", Q, killactive," + ", Return, movetoworkspace, +0" + ", Return, submap, reset" + ", mouse:272, movetoworkspace, +0" + ", mouse:272, submap, reset" + ", escape, togglespecialworkspace, minimized" + ", escape, submap, reset" + ]; + }; + }; +} diff --git a/modules/desktop/hyprland/_settings/main.nix b/modules/desktop/hyprland/_settings/main.nix @@ -0,0 +1,220 @@ +## Compositor Settings +_: { + lib, + osConfig ? null, + ... +}: +lib.mkIf (osConfig != null) ( + let + inherit (lib) mkForce mkIf; + inherit (osConfig.gui) display fancy; + inherit (osConfig.lib.stylix.colors) base03 base05 base0D; + in { + stylix.targets.hyprland.enable = true; + wayland.windowManager.hyprland = { + inherit (osConfig.programs.hyprland) enable package portalPackage; + + # ! # TODO + configType = "hyprlang"; + + # Use 'nwg-displays' to configure monitors + extraConfig = '' + source = ~/.config/hypr/monitors.conf + source = ~/.config/hypr/workspaces.conf + ''; + + settings = { + # Display + monitor = ", preferred, auto, 1"; + xwayland = { + enabled = true; + force_zero_scaling = true; + }; + + input = { + follow_mouse = 1; # Focus on cursor move + follow_mouse_threshold = 15; + focus_on_close = 1; + + # Keyboard + kb_layout = "us"; + numlock_by_default = true; + + # Mouse + accel_profile = "flat"; + touchpad = { + tap-to-click = true; + tap-and-drag = true; + natural_scroll = true; + disable_while_typing = false; + drag_3fg = 1; # 3-finger window drag + }; + }; + + # Workspace Behaviour + binds = { + workspace_center_on = 1; + movefocus_cycles_fullscreen = true; + workspace_back_and_forth = true; + drag_threshold = 30; + }; + + gesture = [ + "3, horizontal, workspace" + ]; + + # Touchpad Gestures + gestures = { + workspace_swipe_use_r = false; + workspace_swipe_create_new = true; + }; + + # Cursor Settings + cursor = { + default_monitor = display; + hide_on_key_press = true; + sync_gsettings_theme = true; + warp_on_change_workspace = true; + }; + + # Tiling Layout + dwindle = { + preserve_split = true; + smart_split = true; + }; + + # Smart Gaps + workspace = [ + "w[tv1]s[false], gapsout:0, gapsin:0" + "f[1]s[false], gapsout:0, gapsin:0" + ]; + windowrule = [ + "border_size 0, rounding 0, match:float 0, match:workspace w[tv1]s[false]" + "border_size 0, rounding 0, match:float 0, match:workspace f[1]s[false]" + ]; + + misc = { + disable_autoreload = true; # Disable configuration Polling + enable_swallow = true; # Window Swallowing + + focus_on_activate = true; + initial_workspace_tracking = 1; + middle_click_paste = false; + on_focus_under_fullscreen = 2; + + # Interfere with wallpaper daemons + force_default_wallpaper = 0; + disable_hyprland_logo = true; + + # Graphics + vrr = 1; + }; + render.direct_scanout = 1; + + general = { + allow_tearing = !fancy; + resize_on_border = true; + + # Floating Layout + snap = { + enabled = true; + border_overlap = true; + respect_gaps = true; + monitor_gap = 10; + window_gap = 15; + }; + + # Visuals + gaps_in = 3; + gaps_out = 3; + float_gaps = 3; + border_size = 2; + "col.active_border" = mkForce "rgb(${base0D}) rgb(${base05}) 90deg"; + }; + + group = { + auto_group = true; + insert_after_current = true; + drag_into_group = 2; + merge_groups_on_drag = true; + merge_groups_on_groupbar = true; + merge_floated_into_tiled_on_groupbar = false; + group_on_movetoworkspace = false; + "col.border_active" = mkForce "rgb(${base05}) rgb(${base0D}) 90deg"; + "col.border_inactive" = mkForce "rgb(${base05}) rgb(${base03}) 90deg"; + + groupbar = { + enabled = true; + scrolling = true; + gradients = true; + blur = true; + height = 15; + render_titles = true; + font_size = 10; + font_weight_active = "bold"; + keep_upper_gap = false; + middle_click_close = true; + indicator_height = 0; + gradient_rounding = 5; + gradient_round_only_edges = false; + "col.active" = mkForce "rgba(${base0D}99)"; + "col.inactive" = mkForce "rgb(${base03})"; + }; + }; + + animation = mkIf fancy { + bezier = [ + "accelerate, 0.3, 0, 0.8, 0.15" + "decelerate, 0.05, 0.7, 0.1, 1" + "zoom, 0.38, 0.04, 1, 0.07" + "crash, 0.1, 1, 0, 1" + ]; + + animation = [ + "border, 1, 10, default" + "fade, 1, 3, decelerate" + "fadeLayersIn, 1, 2, crash" + "fadeLayersOut, 1, 0.5, zoom" + "layersIn, 1, 3, crash, slide" + "layersOut, 1, 1.6, zoom" + "specialWorkspace, 1, 3, decelerate, slidevert" + "windows, 1, 3, decelerate, popin 60%" + "windowsIn, 1, 3, decelerate, popin 60%" + "windowsOut, 1, 3, accelerate, popin 60%" + "workspaces, 1, 7, crash, slide" + ]; + }; + + decoration = mkIf fancy { + rounding = 10; + rounding_power = 3.0; + dim_special = 0.3; + + shadow = { + enabled = true; + offset = "0 2"; + range = 20; + }; + + blur = { + enabled = true; + brightness = 1.0; + contrast = 1.0; + passes = 2; + input_methods = true; + }; + }; + + debug = { + disable_logs = false; + error_position = 1; + }; + + ecosystem = { + no_update_news = true; + no_donation_nag = true; + }; + }; + }; + } +) diff --git a/modules/desktop/hyprland/_settings/plugins.nix b/modules/desktop/hyprland/_settings/plugins.nix @@ -0,0 +1,42 @@ +## Compositor Plugins +_: { + lib, + pkgs, + osConfig ? null, + ... +}: +lib.mkIf (osConfig != null) { + wayland.windowManager.hyprland = { + plugins = with pkgs.hyprworld; [ + split-monitor-workspaces + hypr-dynamic-cursors + ]; + + settings.plugin = { + # Workspaces per Monitor + split-monitor-workspaces.count = 9; + + # Cursor Effects + dynamic-cursors = { + enabled = true; + mode = + if osConfig.gui.fancy + then "tilt" + else "none"; + + hyprcursor = { + enabled = true; + nearest = true; + }; + + shake = { + enabled = true; + effects = false; + ipc = false; + }; + + tilt.activation = "negative_quadratic"; + }; + }; + }; +} diff --git a/modules/desktop/hyprland/default.nix b/modules/desktop/hyprland/default.nix @@ -0,0 +1,33 @@ +## Hyprland WM ## +{ + config, + inputs, + ... +}: let + inherit (config) util; + inherit (config.flake) files; + inherit (config.flake.modules) nixos homeManager; + + base = import ../_base.nix {}; + args = {inherit util files inputs;}; + features = builtins.map (p: import p args) (util.map.modules.list ./_features); +in { + flake.modules = { + nixos.hyprland.imports = + [ + (base.nixos or {}) + nixos.qt + nixos.gtk + ] + ++ builtins.map (f: f.nixos or {}) features; + + homeManager.hyprland.imports = + [ + (base.home or {}) + homeManager.qt + homeManager.gtk + ] + ++ builtins.map (f: f.home or {}) features + ++ builtins.map (p: import p args) (util.map.modules.list ./_settings); + }; +} diff --git a/modules/games/games.nix b/modules/games/games.nix @@ -0,0 +1,60 @@ +## Games Configuration ## +_: { + flake.modules = { + nixos.games = { + lib, + pkgs, + ... + }: { + # Packages + environment.systemPackages = with pkgs; [ + bottles + lutris + ]; + + # Steam + programs.steam = { + enable = true; + protontricks.enable = true; + localNetworkGameTransfers.openFirewall = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + }; + + # Game Mode + hardware.cpu.mode = lib.mkOverride 51 "performance"; # Use 'gamemoderun %command%' + programs.gamemode.enable = true; + hardware.steam-hardware.enable = true; + }; + + homeManager.games = { + config, + lib, + ... + }: { + # Runner + xdg.dataFile."lutris/runners/wine/wine-system" = + lib.mkIf (config.apps.wine.package or null != null) + { + source = config.apps.wine.package; + }; + + # Directories + home.persist.directories = [ + "Games" + ".local/share/bottles" + + # Lutris + ".cache/lutris" + ".config/lutris" + ".local/share/lutris" + + # Steam + ".local/share/applications" + ".local/share/icons/hicolor" + ".steam" + ".local/share/Steam" + ]; + }; + }; +} diff --git a/modules/games/mc-server.nix b/modules/games/mc-server.nix @@ -0,0 +1,221 @@ +## Minecraft Server Configuration ## +# ? # Run 'systemctl start minecraft-server-NAME' to start the server +# ? # Run 'echo COMMAND > /run/minecraft/NAME.stdin' to run commands +{inputs, ...}: { + flake.modules.nixos.mc-server = { + config, + lib, + pkgs, + ... + }: let + inherit + (builtins) + attrValues + listToAttrs + toString + ; + inherit + (lib) + concatMap + mkIf + mkMerge + mkOption + types + ; + inherit (pkgs) fetchurl fetchzip linkFarmFromDrvs; + + cfg = config.games.mc-servers; + dataDir = "/srv/minecraft"; + in { + imports = [inputs.minecraft.nixosModules.minecraft-servers]; + + options.games.mc-servers = mkOption { + description = "List of Minecraft Servers"; + default = []; + type = types.listOf ( + types.submodule ( + {config, ...}: { + options = { + name = mkOption { + description = "Unique server name"; + type = types.str; + default = config.type; + }; + + type = mkOption { + description = "Server Type"; + type = types.enum [ + "fabric" + "skyblock" + ]; + default = "fabric"; + }; + + memory = mkOption { + description = "Memory (GB) allocated to server"; + type = types.int; + default = 12; + }; + + config = mkOption { + description = "Server Properties"; + type = types.attrs; + default = {}; + }; + + port = mkOption { + description = "Main server TCP port"; + type = types.int; + default = 25565; + }; + + vc-port = mkOption { + description = "Port for Simple Voice Chat"; + type = with types; nullOr int; + default = null; + }; + }; + } + ) + ); + }; + + config = mkIf (cfg != []) { + system.fs.persist.directories = [dataDir]; + networking.firewall = { + allowedTCPPorts = map (srv: srv.port) cfg; + allowedUDPPorts = concatMap (srv: + if (srv.vc-port != null) + then [srv.vc-port] + else []) + cfg; + }; + + services.minecraft-servers = { + enable = true; + inherit dataDir; + eula = true; + openFirewall = true; + managementSystem = { + tmux.enable = false; + systemd-socket.enable = true; + }; + + servers = listToAttrs ( + map (srv: { + inherit (srv) name; + value = mkMerge [ + { + enable = true; + autoStart = false; + serverProperties = + srv.config + // { + server-port = srv.port; + }; + jvmOpts = let + mem = toString srv.memory; + in "-Xms${mem}G -Xmx${mem}G --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=15"; + } + + ## Fabric Server + (mkIf (srv.type == "fabric") { + package = pkgs.fabricServers.fabric-1_21_10; + symlinks.mods = linkFarmFromDrvs "mods" ( + attrValues ( + { + # Server + FabricAPI = fetchurl { + url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/lxeiLRwe/fabric-api-0.136.0%2B1.21.10.jar"; + sha256 = "sha256-ADKAQNMSXhDUF/Fviupkr3JxmH6RFVRLuwvjK7PQV5c="; + }; + Lithium = fetchurl { + url = "https://cdn.modrinth.com/data/gvQqBUqZ/versions/oGKQMdyZ/lithium-fabric-0.20.0%2Bmc1.21.10.jar"; + sha256 = "sha256-567yN1D2eJgsAMQhjWIFljqZRVRFfCoWvZgY41IQAEs="; + }; + Krypton = fetchurl { + url = "https://cdn.modrinth.com/data/fQEb0iXm/versions/O9LmWYR7/krypton-0.2.10.jar"; + sha256 = "sha256-lCkdVpCgztf+fafzgP29y+A82sitQiegN4Zrp0Ve/4s="; + }; + FerriteCore = fetchurl { + url = "https://cdn.modrinth.com/data/uXXizFIs/versions/CtMpt7Jr/ferritecore-8.0.0-fabric.jar"; + sha256 = "sha256-K5C/AMKlgIw8U5cSpVaRGR+HFtW/pu76ujXpxMWijuo="; + }; + ScalableLux = fetchurl { + url = "https://cdn.modrinth.com/data/Ps1zyz6x/versions/PV9KcrYQ/ScalableLux-0.1.6%2Bfabric.c25518a-all.jar"; + sha256 = "sha256-ekpzcThhg8dVUjtWtVolHXWsLCP0Cvik8PijNbBdT8I="; + }; + C2ME = fetchurl { + url = "https://cdn.modrinth.com/data/VSNURh3q/versions/eY3dbqLu/c2me-fabric-mc1.21.10-0.3.5.0.0.jar"; + sha256 = "sha256-PZxX7IE3Zc+zsQrMc/LdI1jpUC9l/ov7z334OucWpgA="; + }; + + PlayerRoles = fetchurl { + url = "https://cdn.modrinth.com/data/Rt1mrUHm/versions/Qi5eDlej/player-roles-1.7.0.jar"; + sha256 = "sha256-+0nk/J2W3hVDdkKlZRHY4dBde3aF8e8Y1SPFOgDWNb0="; + }; + SkinRestorer = fetchurl { + url = "https://cdn.modrinth.com/data/ghrZDhGW/versions/MKWfnXfO/skinrestorer-2.4.3%2B1.21.9-fabric.jar"; + sha256 = "sha256-ypyDuX94HyUPlUI4CrFc0Pc01lUQXgYPqP/axaCi6Hc="; + }; + Silk = fetchurl { + url = "https://cdn.modrinth.com/data/aTaCgKLW/versions/2OisNxPN/silk-all-1.11.4.jar"; + sha256 = "sha256-C2VcLfFGweGOO+Xi1mOTkETX3NpoEdSz+9kYmEIDDv0="; + }; + FabricKotlin = fetchurl { + url = "https://cdn.modrinth.com/data/Ha28R6CL/versions/LcgnDDmT/fabric-language-kotlin-1.13.7%2Bkotlin.2.2.21.jar"; + sha256 = "sha256-d5UZY+3V19N+5PF0431GqHHkW5c0JvO0nWclyBm0uPI="; + }; + Veinminer = fetchurl { + url = "https://cdn.modrinth.com/data/OhduvhIc/versions/lCVEKyxE/veinminer-fabric-2.5.0.jar"; + sha256 = "sha256-13PbmxgTfM+WkQht7hsHrkEImXgTeBUpeKOcGtE/cOI="; + }; + VeinminerEnchant = fetchurl { + url = "https://cdn.modrinth.com/data/4sP0LXxp/versions/h5oKcjvq/veinminer-enchant-2.3.0.jar"; + sha256 = "sha256-NvGnsY9nfI+IMy2+Ljr1IahMqim9xOsRgojaFKWk/xQ="; + }; + + # Client and Server + Jade = fetchurl { + url = "https://cdn.modrinth.com/data/nvQzSEkH/versions/qC0qUqL5/Jade-1.21.9-Fabric-20.0.5.jar"; + sha256 = "sha256-HZfvnnYeRgbgQROdq6v9U7fnx1MhNaseaedNJPJpNxE="; + }; + } + // ( + if (srv.vc-port != null) + then { + SimpleVC = fetchurl { + url = "https://cdn.modrinth.com/data/9eGKb6K1/versions/BjR2lc4k/voicechat-fabric-1.21.10-2.6.6.jar"; + sha256 = "sha256-yC5pMBLsi4BnUq4CxTfwe4MGTqoBg04ZaRrsBC3Ds3Y="; + }; + } + else {} + ) + ) + ); + }) + + ## Modded Skyblock Server + (mkIf (srv.type == "skyblock") ( + let + inherit (inputs.minecraft.lib) collectFilesAt; + + # Ozone Skyblock Reborn 2 + modpack = fetchzip { + url = "https://mediafilez.forgecdn.net/files/7243/245/OSR2%201.2.1%20-%20Server.zip"; + sha256 = "sha256-G7qUQ2ZKKsBUKugTcsv7RppAZVrNgsncrYYWzusTSF0="; + }; + in { + package = pkgs.neoforgeServers.neoforge-1_21_1; + files = (collectFilesAt modpack "config") // (collectFilesAt modpack "kubejs"); + symlinks = collectFilesAt modpack "mods"; + } + )) + ]; + }) + cfg + ); + }; + }; + }; +} diff --git a/modules/games/minecraft.nix b/modules/games/minecraft.nix @@ -0,0 +1,7 @@ +## Minecraft ## +_: { + flake.modules.homeManager.minecraft = {pkgs, ...}: { + home.packages = [pkgs.prismlauncher]; + home.persist.directories = [".local/share/PrismLauncher"]; + }; +} diff --git a/modules/games/osu.nix b/modules/games/osu.nix @@ -0,0 +1,7 @@ +## OSU! ## +_: { + flake.modules.homeManager.osu = {pkgs, ...}: { + home.packages = [pkgs.osu-lazer-bin]; + home.persist.directories = [".local/share/osu"]; + }; +} diff --git a/modules/games/roblox.nix b/modules/games/roblox.nix @@ -0,0 +1,11 @@ +## Roblox ## +_: { + flake.modules.nixos.roblox = _: { + services.flatpak.packages = [ + { + appId = "org.vinegarhq.Sober"; + origin = "flathub"; + } + ]; + }; +} diff --git a/modules/gui/fonts.nix b/modules/gui/fonts.nix @@ -0,0 +1,79 @@ +## Font Configuration ## +_: { + flake.modules.nixos.fonts = { + config, + pkgs, + ... + }: { + fonts = { + enableDefaultPackages = true; + fontDir.enable = true; + + ## Render Settings + fontconfig = { + enable = true; + hinting = { + enable = true; + autohint = false; + style = "slight"; + }; + subpixel = { + rgba = "rgb"; + lcdfilter = "default"; + }; + + # Emoji Support + defaultFonts = let + emoji = [config.stylix.fonts.emoji.name]; + in { + monospace = emoji; + sansSerif = emoji; + serif = emoji; + }; + }; + }; + + # Font Sizes + stylix.fonts = { + sansSerif = { + package = pkgs.adwaita-fonts; + name = "Adwaita Sans"; + }; + serif = { + package = pkgs.eb-garamond; + name = "EB Garamond"; + }; + monospace = { + package = pkgs.custom.fonts; + name = "Iosvmata"; + }; + emoji = { + package = pkgs.twitter-color-emoji; + name = "Twitter Color Emoji"; + }; + sizes = { + applications = 11; + desktop = 11; + popups = 10; + terminal = 12; + }; + }; + + # Font Packages + fonts.packages = with pkgs; [ + font-awesome + nerd-fonts.symbols-only + noto-fonts + symbola + fira + fira-code + fira-mono + ibm-plex + roboto + roboto-mono + roboto-slab + source-code-pro + ubuntu-classic + ]; + }; +} diff --git a/modules/gui/gtk.nix b/modules/gui/gtk.nix @@ -0,0 +1,79 @@ +## GTK Configuration ## +{config, ...}: let + inherit (config.flake) files; +in { + flake.modules = { + nixos.gtk = { + config, + lib, + pkgs, + ... + }: let + cfg = config.gui.gtk; + in { + options.gui.gtk.theme = { + name = lib.mkOption { + description = "GTK+ Application Theme"; + type = lib.types.str; + }; + + package = lib.mkOption { + description = "GTK+ Theme Package"; + type = lib.types.package; + }; + }; + + config = { + # Environment Setup + programs.dconf.enable = true; + services.dbus.packages = [pkgs.dconf]; + environment = { + systemPackages = [cfg.theme.package]; + variables."GTK_THEME" = cfg.theme.name; + }; + }; + }; + + homeManager.gtk = { + config, + lib, + osConfig ? null, + ... + }: + lib.mkIf (osConfig != null) { + home = { + # Configuration + persist.directories = [ + ".config/dconf" + ".config/gtk-3.0" + ".config/gtk-4.0" + ]; + + # Bookmarks + file.".config/gtk-3.0/bookmarks" = { + text = files.bookmarks; + force = true; + }; + }; + + # Theming + stylix.targets.gtk.enable = false; + dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; + gtk = { + enable = true; + inherit (osConfig.gui.gtk) theme; + cursorTheme = config.stylix.cursor; + font = with config.stylix.fonts; { + inherit (sansSerif) package name; + size = sizes.applications; + }; + + gtk3.extraConfig.gtk-application-prefer-dark-theme = 1; + gtk4 = { + inherit (osConfig.gui.gtk) theme; + extraConfig.gtk-application-prefer-dark-theme = 1; + }; + }; + }; + }; +} diff --git a/modules/gui/qt.nix b/modules/gui/qt.nix @@ -0,0 +1,163 @@ +## QT Configuration ## +_: { + flake.modules = { + nixos.qt = { + config, + lib, + pkgs, + ... + }: let + inherit + (lib) + mkDefault + mkIf + mkMerge + mkOption + types + ; + inherit (config.gui) qt icons; + inherit (config.stylix) fonts; + in { + options.gui.qt = { + style = mkOption { + description = "QT Application Style"; + type = types.nullOr ( + types.enum [ + "gtk" + "kvantum" + "qtct" + ] + ); + default = null; + }; + + theme = { + name = mkOption { + description = "QT Application Theme"; + type = types.str; + default = ""; + }; + + package = mkOption { + description = "QT Theme Package"; + type = types.package; + default = pkgs.adwaita-qt; + }; + }; + }; + + config = with qt.theme; + mkMerge [ + { + stylix.targets.qt.enable = false; + qt = { + enable = true; + platformTheme = mkDefault "gtk2"; + }; + } + + (mkIf (qt.style == "gtk") { + qt = { + platformTheme = "gnome"; + style = "adwaita-dark"; + }; + }) + + (mkIf (qt.style == "kvantum") { + qt = { + platformTheme = "qt5ct"; + style = "kvantum"; + }; + + environment = { + systemPackages = [package]; + etc."xdg/Kvantum/kvantum.kvconfig".text = '' + [General] + Theme=${name} + ''; + }; + }) + + (mkIf (qt.style == "qtct") ( + let + pkg = with pkgs; [ + darkly + darkly-qt5 + ]; + + conf = version: + lib.generators.toINI {} { + Appearance = { + style = "Lightly"; + standard_dialogs = "default"; + icon_theme = icons.name; + custom_palette = true; + color_scheme_path = "${package}/share/${version}/colors/${name}.conf"; + }; + + Fonts = let + size = fonts.sizes.applications; + in { + fixed = "\"${fonts.monospace.name},${size},-1,5,50,0,0,0,0,0,Regular\""; + general = "\"${fonts.sansSerif.name},${size},-1,5,50,0,0,0,0,0,Regular\""; + }; + }; + in { + qt.platformTheme = "qt5ct"; + environment = { + systemPackages = pkg; + etc = { + "xdg/qt5ct/qt5ct.conf".text = conf "qt5ct"; + "xdg/qt6ct/qt6ct.conf".text = conf "qt6ct"; + }; + }; + } + )) + ]; + }; + + homeManager.qt = {config, ...}: let + inherit (builtins) concatStringsSep map; + in { + stylix.targets.qt.enable = false; + + # KDE Apps + home.file.".config/kdeglobals".text = with config.lib.stylix.colors; + '' + [Colors:Selection] + BackgroundNormal=${base0D-rgb-r},${base0D-rgb-g},${base0D-rgb-b} + BackgroundAlternate=${base0D-rgb-r},${base0D-rgb-g},${base0D-rgb-b} + ForegroundNormal=${base00-rgb-r},${base00-rgb-g},${base00-rgb-b} + ForegroundActive=${base00-rgb-r},${base00-rgb-g},${base00-rgb-b} + ForegroundInactive=${base00-rgb-r},${base00-rgb-g},${base00-rgb-b} + ForegroundLink=${base00-rgb-r},${base00-rgb-g},${base00-rgb-b} + ForegroundVisited=${base00-rgb-r},${base00-rgb-g},${base00-rgb-b} + '' + + (concatStringsSep "\n" ( + map + (name: '' + [Colors:${name}] + BackgroundNormal=${base00-rgb-r},${base00-rgb-g},${base00-rgb-b} + BackgroundAlternate=${base01-rgb-r},${base01-rgb-g},${base01-rgb-b} + DecorationFocus=${base0D-rgb-r},${base0D-rgb-g},${base0D-rgb-b} + DecorationHover=${base0D-rgb-r},${base0D-rgb-g},${base0D-rgb-b} + ForegroundNormal=${base05-rgb-r},${base05-rgb-g},${base05-rgb-b} + ForegroundActive=${base05-rgb-r},${base05-rgb-g},${base05-rgb-b} + ForegroundInactive =${base05-rgb-r},${base05-rgb-g},${base05-rgb-b} + ForegroundLink=${base05-rgb-r},${base05-rgb-g},${base05-rgb-b} + ForegroundVisited=${base05-rgb-r},${base05-rgb-g},${base05-rgb-b} + ForegroundNegative=${base08-rgb-r},${base08-rgb-g},${base08-rgb-b} + ForegroundNeutral=${base0D-rgb-r},${base0D-rgb-g},${base0D-rgb-b} + ForegroundPositive=${base0B-rgb-r},${base0B-rgb-g},${base0B-rgb-b} + '') + [ + "View" + "Window" + "Button" + "Tooltip" + "Complementary" + ] + )); + }; + }; +} diff --git a/modules/gui/theme.nix b/modules/gui/theme.nix @@ -0,0 +1,100 @@ +## System Theming ## +{ + config, + inputs, + ... +}: let + inherit (config.flake) files; +in { + flake.modules = { + nixos.theme = { + config, + lib, + pkgs, + ... + }: let + cfg = config.gui; + stl = config.stylix; + inherit (cfg) enable; + in { + imports = [inputs.stylix.nixosModules.stylix]; + + options.gui = { + enable = lib.mkEnableOption "Graphical Desktop Session"; + fancy = lib.mkEnableOption "Enable Fancy GUI Effects"; + display = lib.mkOption { + description = "Main GUI Display"; + type = lib.types.str; + default = "eDP-1"; + example = "HDMI-A-1"; + }; + wallpaper = lib.mkOption { + type = lib.types.enum (lib.attrNames files.wallpapers); + default = "Beauty"; + apply = image: files.wallpapers."${image}"; + }; + }; + + config = { + stylix = { + inherit enable; + autoEnable = true; + homeManagerIntegration = { + autoImport = true; + followSystem = true; + }; + + image = cfg.wallpaper; + polarity = "dark"; + + icons = { + enable = true; + package = lib.mkDefault pkgs.papirus-icon-theme; + light = "Papirus-Dark"; + dark = "Papirus-Dark"; + }; + + cursor = { + name = "Bibata-Original-Classic"; + package = pkgs.bibata-cursors; + size = 28; + }; + + opacity = { + popups = 0.9; + terminal = 0.9; + }; + + targets = { + console.enable = true; + plymouth.enable = false; + chromium.enable = false; + }; + }; + + home-manager.sharedModules = lib.optionals (!enable) [ + config.stylix.homeManagerIntegration.module + ]; + + environment.systemPackages = lib.optionals enable [ + stl.icons.package + stl.cursor.package + ]; + + programs.gnupg.agent.pinentryPackage = pkgs.pinentry-gtk2; + }; + }; + + homeManager.theme = {lib, ...}: { + config.stylix = { + enable = lib.mkDefault true; + targets = { + firefox.enable = lib.mkDefault false; + gnome.enable = lib.mkDefault false; + spicetify.enable = false; + vscode.enable = false; + }; + }; + }; + }; +} diff --git a/modules/hardware/README.md b/modules/hardware/README.md @@ -0,0 +1,40 @@ +### Boot + +To boot into a different build generation, hold down the Spacebar (for `efi`) or the `Shift`/`Esc` key (for `mbr`) upon startup to access the boot menu + +To access recovery settings, open the boot menu and select the `recovery` Specialisation + +#### Secure Boot + +Set `system.scheme` to `secure` to enable [Secure Boot](https://en.wikipedia.org/wiki/UEFI#Secure_Boot) + +The setup should occur automatically on first boot, consult the [docs](https://nix-community.github.io/lanzaboote/) in case of any issue + +> [!NOTE] +> Secure Boot is only supported in EFI Mode + +### File System + +The system may be set up using either a `simple` or `advanced` filesystem scheme. The advanced ZFS encrypted opt-in state filesystem configuration allows for a vastly improved experience, preventing formation of cruft and exerting total control over the device state, by erasing the system at every boot, keeping only what's required + +#### Data Storage + +All important persisted files are stored at `/data` (declared using either `system.fs.persist`, or `home.persist` for user files), while persisted system files are stored at `/nix/state` (declared using `environment.persist`). +Personal files and media are stored at `/data/files` + +### Virtualisation + +Configuration has been provided to run VMs using `qemu-kvm` and `libvirt`, along with support for VFIO PCI Passthrough. This can be used to create high-performance VMs, especially useful for virtualising Windows + +#### PCI Passthrough + +Use [`scripts/pci.sh`](../../scripts/pci.sh) in order to determine the PCI Device IDs which must be added to `virt.vfio.passthrough` + +#### Windows Virtualisation + +In order to create a highly performant Windows VM using the `virt-manager` GUI and [Virtio](https://wiki.libvirt.org/Virtio.html) drivers, follow the instructions given on [this](https://sysguides.com/install-a-windows-11-virtual-machine-on-kvm) page. To configure GPU passthrough, add the relevant GPU and audio IDs to `virt.vfio.passthrough` (See the [Arch Wiki](https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF) for additional information). Confirm that the GPU is recognized within the Windows VM, and download the relevant drivers. In order to utilize full graphical bandwidth, one of the following must be done: + +1. Connect an external monitor to the GPU +2. Use a dummy monitor plug or fake a display using [`Virtual Display Driver`](https://github.com/itsmikethetech/Virtual-Display-Driver), then use [Looking Glass](https://looking-glass.io/) to extract video output onto the main monitor. The configuration for Looking Glass on the Linux (client) side is already implemented, and only the Windows (host) needs to be configured by following instructions on [this](https://looking-glass.io/docs/stable/install/) page (Follow the section titled 'IVSHMEM with shared memory') + +The `vfio` and `no-vfio` Specialisations can be selected in the boot menu to toggle GPU passthrough as required diff --git a/modules/hardware/blockchain.nix b/modules/hardware/blockchain.nix @@ -0,0 +1,9 @@ +## Blockchain Support ## +_: { + flake.modules.nixos.blockchain = {pkgs, ...}: { + environment.systemPackages = with pkgs; [ + custom.fabric-ca + hyperledger-fabric + ]; + }; +} diff --git a/modules/hardware/cpu.nix b/modules/hardware/cpu.nix @@ -0,0 +1,52 @@ +## CPU Configuration ## +_: { + flake.modules.nixos.cpu = { + config, + options, + lib, + ... + }: let + inherit (lib) mkOption optional types; + cfg = config.hardware.cpu; + opt = options.hardware.cpu; + in { + options.hardware.cpu = { + model = mkOption { + description = "CPU Model"; + type = types.enum [ + "" + "amd" + "intel" + ]; + default = ""; + }; + + cores = mkOption { + description = "Number of CPU Cores"; + type = types.int; + default = 4; + }; + + mode = mkOption { + description = "CPU Frequency Governor Mode"; + type = types.enum [ + "ondemand" + "performance" + "powersave" + ]; + default = "performance"; + }; + }; + + config = { + warnings = optional (cfg.model == "") (opt.model.description + " is unset"); + powerManagement.cpuFreqGovernor = cfg.mode; + nix.settings.max-jobs = cfg.cores; + + specialisation.powersave.configuration = lib.mkIf (cfg.model != "") { + system.nixos.label = "special.powersave"; + hardware.cpu.mode = lib.mkForce "powersave"; + }; + }; + }; +} diff --git a/modules/hardware/gpu.nix b/modules/hardware/gpu.nix @@ -0,0 +1,102 @@ +## GPU Configuration ## +_: { + flake.modules.nixos.gpu = { + config, + lib, + pkgs, + ... + }: let + inherit + (lib) + mkForce + mkIf + mkEnableOption + mkMerge + mkOption + types + ; + cfg = config.hardware.gpu; + mode = config.hardware.cpu.mode != "powersave"; + gamemode = config.programs.gamemode.enable; + in { + options.hardware.gpu = { + enable = mkEnableOption "Discrete GPU Support"; + model = mkOption { + description = "Discrete GPU Model"; + type = with types; nullOr (enum ["nvidia"]); + default = null; + }; + }; + + config = mkMerge [ + (mkIf cfg.enable { + assertions = [ + { + assertion = cfg.model != null; + message = "GPU model must be set when GPU is enabled"; + } + ]; + }) + + (mkIf (cfg.model == "nvidia") ( + let + hybrid = with config.hardware.nvidia.prime; (amdgpuBusId != "" || intelBusId != ""); + in { + services.xserver.videoDrivers = mkForce ["nvidia"]; + environment = { + systemPackages = [pkgs.btop-cuda]; + variables = mkIf mode { + "__GLX_VENDOR_LIBRARY_NAME" = "nvidia"; + "LIBVA_DRIVER_NAME" = "nvidia"; + }; + sessionVariables = { + "GAMEMODERUNEXEC" = mkIf (hybrid && gamemode && !mode) "nvidia-offload"; + }; + }; + + boot = { + blacklistedKernelModules = ["nouveau"]; + kernelModules = [ + "nvidia" + "nvidia_drm" + "nvidia_modeset" + "nvidia_uvm" + ]; + kernelParams = ["nvidia-drm.fbdev=1"]; + extraModprobeConfig = '' + # PAT Support + options nvidia NVreg_UsePageAttributeTable=1 + + # DDC/CI Support + options nvidia NVreg_RegistryDwords=RMUseSwI2c=0x01;RMI2cSpeed=100 + ''; + }; + + # Wayland Support + hardware.nvidia = { + modesetting.enable = mkForce true; + nvidiaSettings = mkForce true; + dynamicBoost.enable = true; + powerManagement.enable = true; + prime = mkIf hybrid { + sync.enable = mkForce mode; + offload = { + enable = mkForce (!mode); + enableOffloadCmd = mkForce (!mode); + }; + }; + }; + } + )) + + (mkIf (!cfg.enable && cfg.model == "nvidia") { + boot.blacklistedKernelModules = [ + "nvidia" + "nvidia_drm" + "nvidia_modeset" + "nvidia_uvm" + ]; + }) + ]; + }; +} diff --git a/modules/hardware/laptop.nix b/modules/hardware/laptop.nix @@ -0,0 +1,59 @@ +## Laptop Configuration ## +{config, ...}: let + inherit (config.flake) files; +in { + flake.modules = { + nixos.laptop = _: { + services.logind.settings.Login = { + KillUserProcesses = true; + + # Power Button + HandlePowerKey = "poweroff"; + HandlePowerKeyLongPress = "reboot"; + + # Lid + HandleLidSwitch = "lock"; + HandleLidSwitchDocked = "ignore"; + }; + + # Touchpad + services.libinput = { + enable = true; + touchpad = { + tapping = true; + tappingDragLock = true; + middleEmulation = true; + naturalScrolling = false; + disableWhileTyping = true; + scrollMethod = "twofinger"; + accelSpeed = "0.7"; + }; + }; + + # Battery + powerManagement = { + enable = true; + powertop.enable = true; + }; + }; + + homeManager.laptop = {pkgs, ...}: { + # Audio + home.file.".config/autostart/audio-tweaks.desktop".text = '' + [Desktop Entry] + Type=Application + Name=audio-tweaks + Exec=${ + pkgs.writeShellApplication { + name = "audio"; + text = files.scripts.audio; + runtimeInputs = with pkgs; [ + glib + playerctl + ]; + } + }/bin/audio + ''; + }; + }; +} diff --git a/modules/hardware/mobile.nix b/modules/hardware/mobile.nix @@ -0,0 +1,12 @@ +## Device Firmware ## +_: { + flake.modules.nixos.mobile = {pkgs, ...}: { + users.groups.adbusers = {}; + services.usbmuxd.enable = true; + environment.systemPackages = with pkgs; [ + android-tools + libimobiledevice + scrcpy + ]; + }; +} diff --git a/modules/hardware/mouse.nix b/modules/hardware/mouse.nix @@ -0,0 +1,14 @@ +## Mouse Firmware ## +_: { + flake.modules = { + nixos.mouse = _: { + hardware.logitech.wireless = { + enable = true; + enableGraphical = true; + }; + }; + homeManager.mouse = _: { + home.persist.directories = [".config/solaar"]; + }; + }; +} diff --git a/modules/hardware/printer.nix b/modules/hardware/printer.nix @@ -0,0 +1,24 @@ +## Printer Firmware ## +_: { + flake.modules.nixos.printer = {pkgs, ...}: { + hardware.sane.enable = true; + + services.printing = { + enable = true; + drivers = with pkgs; [ + gutenprint + brlaser + cnijfilter2 + ]; + extraConf = '' + DefaultPaperSize A4 + ''; + }; + + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + }; +} diff --git a/modules/hosts/futura.nix b/modules/hosts/futura.nix @@ -0,0 +1,106 @@ +# Futura - Dell Inspiron 11 3000 +{ + config, + inputs, + ... +}: let + inherit (config.flake.modules) nixos homeManager; + inherit (config) util; + + sharedHmModules = + util.map.array [ + "filesystem" + "laptop" + "firefox" + "office" + ] + homeManager; +in { + configurations.nixos.futura = { + system = "x86_64-linux"; + module = {pkgs, ...}: { + imports = + util.map.array [ + "boot" + "security" + "filesystem" + "laptop" + "office" + "flatpak" + "gnome" + ] + nixos + ++ util.map.array [ + "common-pc" + "common-pc-laptop" + "common-cpu-intel" + ] + inputs.hardware.nixosModules; + + networking.hostId = builtins.substring 0 8 (builtins.hashString "md5" "futura"); + + time.timeZone = "Asia/Kolkata"; + i18n.defaultLocale = "en_IN"; + environment.variables."LC_ALL" = "en_IN.UTF-8"; + + system = { + kernel = "lts"; + scheme = "efi"; + fs.scheme = "simple"; + }; + + hardware.cpu = { + model = "intel"; + cores = 4; + }; + + # Auto-upgrade + system.autoUpgrade = { + enable = true; + dates = "weekly"; + flake = "github:maydayv7/dotfiles"; + }; + + users.users.navya = { + isNormalUser = true; + description = "Navya"; + uid = 1000; + group = "users"; + shell = pkgs.zsh; + extraGroups = [ + "wheel" + "networkmanager" + ]; + initialHashedPassword = ""; + }; + + home-manager.users.navya.imports = + sharedHmModules + ++ [ + homeManager.navya + homeManager.gnome + ]; + + services.displayManager.autoLogin = { + enable = true; + user = "navya"; + }; + }; + }; + + configurations.homeManager."navya@futura" = { + module = { + imports = + sharedHmModules + ++ [ + homeManager.navya + homeManager.gnome + ]; + home = { + username = "navya"; + homeDirectory = "/home/navya"; + }; + }; + system = "x86_64-linux"; + }; +} diff --git a/modules/hosts/install.nix b/modules/hosts/install.nix @@ -0,0 +1,70 @@ +# Install Media +{ + config, + inputs, + ... +}: let + inherit (config) util; + inherit (config.flake) files; +in { + configurations.nixos.install = { + system = "x86_64-linux"; + module = { + lib, + pkgs, + ... + }: { + imports = [ + (import ../desktop/_install.nix {inherit util files inputs;}) + + # Disabled Modules + ( + {lib, ...}: { + options = { + environment.persist = lib.mkOption { + type = lib.types.attrsOf lib.types.anything; + default = {}; + }; + system.fs.persist = lib.mkOption { + type = lib.types.attrsOf lib.types.anything; + default = {}; + }; + }; + config = { + sops.secrets = lib.mkForce {}; + home-manager.sharedModules = lib.mkForce []; + }; + } + ) + ]; + + # Environment + system.kernel = "lts"; + boot.loader.grub.device = lib.mkDefault "nodev"; + fileSystems."/".fsType = "tmpfs"; + environment.systemPackages = [pkgs.custom.install]; + image.modules.iso = { + image.baseName = lib.mkForce "install"; + system.switch.enable = false; + }; + + # Localization + time.timeZone = "Asia/Kolkata"; + i18n.defaultLocale = "en_IN"; + + # Default User + users.users.nixos = { + isNormalUser = true; + description = "Default User"; + extraGroups = ["wheel"]; + initialHashedPassword = lib.fileContents ../../secrets/passwords/default; + }; + + # Automatic Login + services.displayManager.autoLogin = { + enable = true; + user = "nixos"; + }; + }; + }; +} diff --git a/modules/hosts/valkyrie/_minecraft.nix b/modules/hosts/valkyrie/_minecraft.nix @@ -0,0 +1,46 @@ +{config, ...}: { + ## Minecraft Server + specialisation.minecraft.configuration = { + system.nixos.label = "special.minecraft"; + games.mc-servers = let + shared = { + gamemode = "survival"; + difficulty = "normal"; + online-mode = false; + server-ip = "0.0.0.0"; + spawn-protection = 0; + }; + in [ + { + type = "fabric"; + memory = 16; + port = 25565; + vc-port = 24454; + config = + shared + // { + motd = "My World"; + }; + } + { + type = "skyblock"; + memory = 10; + port = 25567; + config = + shared + // { + motd = "Modded Skyblock"; + allow-flight = true; + }; + } + ]; + + # VPN Tunnel + environment.persist.directories = ["/var/lib/tailscale"]; + services.tailscale = { + enable = true; + openFirewall = true; + authKeyFile = config.sops.secrets."tailscale.secret".path; + }; + }; +} diff --git a/modules/hosts/valkyrie/_settings/asusd.ron b/modules/hosts/valkyrie/_settings/asusd.ron @@ -0,0 +1,15 @@ +( + boot_sound: false, + change_throttle_policy_on_ac: true, + change_throttle_policy_on_battery: true, + charge_control_end_threshold: 95, + disable_nvidia_powerd_on_battery: true, + mini_led_mode: false, + panel_od: false, + throttle_balanced_epp: BalancePower, + throttle_performance_epp: Performance, + throttle_policy_linked_epp: true, + throttle_policy_on_ac: Performance, + throttle_policy_on_battery: Quiet, + throttle_quiet_epp: Power, +) +\ No newline at end of file diff --git a/modules/hosts/valkyrie/_settings/aura.ron b/modules/hosts/valkyrie/_settings/aura.ron @@ -0,0 +1,99 @@ +( + config_name: "Keyboard Aura", + brightness: Med, + current_mode: Static, + builtins: { + Static: ( + mode: Static, + zone: None, + colour1: ( + r: 255, + g: 255, + b: 255, + ), + colour2: ( + r: 0, + g: 0, + b: 0, + ), + speed: Med, + direction: Right, + ), + Breathe: ( + mode: Breathe, + zone: None, + colour1: ( + r: 255, + g: 255, + b: 255, + ), + colour2: ( + r: 0, + g: 0, + b: 0, + ), + speed: Med, + direction: Right, + ), + RainbowCycle: ( + mode: RainbowCycle, + zone: None, + colour1: ( + r: 255, + g: 255, + b: 255, + ), + colour2: ( + r: 0, + g: 0, + b: 0, + ), + speed: Med, + direction: Right, + ), + RainbowWave: ( + mode: RainbowWave, + zone: None, + colour1: ( + r: 255, + g: 255, + b: 255, + ), + colour2: ( + r: 0, + g: 0, + b: 0, + ), + speed: Med, + direction: Right, + ), + Pulse: ( + mode: Pulse, + zone: None, + colour1: ( + r: 255, + g: 255, + b: 255, + ), + colour2: ( + r: 0, + g: 0, + b: 0, + ), + speed: Med, + direction: Right, + ), + }, + multizone_on: false, + enabled: ( + states: [ + ( + zone: Keyboard, + boot: true, + awake: true, + sleep: false, + shutdown: false, + ), + ], + ), +) diff --git a/modules/hosts/valkyrie/_settings/default.nix b/modules/hosts/valkyrie/_settings/default.nix @@ -0,0 +1,82 @@ +_: { + nixos = { + config, + lib, + pkgs, + ... + }: { + # ! # https://gitlab.freedesktop.org/drm/amd/-/issues/3388 + boot.kernelParams = lib.mkIf (config.hardware.cpu.mode == "performance") [ + "amdgpu.dcdebugmask=0x10" + "usbcore.autosuspend=-1" + ]; + + services = { + fwupd.enable = true; + + # Remap Keys + udev.extraHwdb = '' + evdev:name:Asus Keyboard:* + KEYBOARD_KEY_7003f=print # F6 -> PrtSc Key + ''; + }; + + # ASUS Software + services.asusd = { + enable = true; + asusdConfig.text = builtins.readFile ./asusd.ron; + auraConfigs."19b6".text = builtins.readFile ./aura.ron; + }; + + # VPN + services.cloudflare-warp = { + enable = true; + openFirewall = true; + }; + + ## Development + environment = { + persist.directories = [config.services.cloudflare-warp.rootDir]; + systemPackages = with pkgs; [ + cloudflared + gcc + github-copilot-cli + + # Node + nodejs + npm-check-updates + pnpm + ]; + }; + + networking.firewall = { + allowedUDPPorts = [7777]; + allowedTCPPorts = [7777]; + }; + }; + + home = _: { + home.persist.directories = [ + ".copilot" + ".npm" + ".config/rog" + ".local/share/cloudflare-warp-gui" + ]; + + # Keybinds + wayland.windowManager.hyprland.settings.bindl = [ + ", XF86Launch3, exec, asusctl aura -n" + ", XF86Launch4, exec, asusctl profile -n" + ]; + + # Development + home = { + sessionPath = ["$HOME/.npm/packages/bin"]; + file.".npmrc".text = '' + prefix=''${HOME}/.npm/packages + cache=''${HOME}/.npm/cache + ''; + }; + programs.ssh.settings."ssh.codingclub.in".ProxyCommand = "cloudflared access ssh --hostname %h"; + }; +} diff --git a/modules/hosts/valkyrie/default.nix b/modules/hosts/valkyrie/default.nix @@ -0,0 +1,175 @@ +# Valkyrie - ASUS ROG Zephyrus G14 +{ + config, + inputs, + ... +}: let + inherit (config.flake.modules) nixos homeManager; + inherit (config) util; + + nixosModules = [ + "base-ext" + "boot" + "security" + "prompt" + "mobile" + "printer" + "docker" + #"mc-server" + #"roblox" + ]; + + hmModules = [ + "auth" + "discord" + "firefox" + "internet" + "notes" + "spotify" + "stream" + "syncthing" + "vscode" + "minecraft" + "osu" + ]; + + mixedModules = [ + "filesystem" + "laptop" + "mouse" + "shell-utils" + "git" + "office" + "tools" + #"flatpak" + "latex" + #"wine" + "games" + "gnome" + ]; + + hmImports = + util.map.array hmModules homeManager + ++ util.map.array mixedModules homeManager; + + settings = import ./_settings {}; +in { + configurations.nixos.valkyrie = { + system = "x86_64-linux"; + module = { + config, + pkgs, + ... + }: { + imports = + util.map.array nixosModules nixos + ++ util.map.array mixedModules nixos + ++ [ + (settings.nixos or {}) + # ./_minecraft.nix + ] + ++ util.map.array ["asus-zephyrus-ga402x-nvidia"] inputs.hardware.nixosModules; + + networking.hostId = builtins.substring 0 8 (builtins.hashString "md5" "valkyrie"); + + # Localization + time.timeZone = "Asia/Kolkata"; + i18n.defaultLocale = "en_IN"; + environment.variables."LC_ALL" = "en_IN.UTF-8"; + + system = { + scheme = "secure"; + fs.scheme = "advanced"; + + # Kernel + kernel = "xanmod"; + kernelModules = [ + "nvme" + "thunderbolt" + ]; + + # Nix Tools + nix = { + index = true; + tools = true; + }; + }; + + # Hardware + hardware = { + cpu = { + model = "amd"; + cores = 8; + mode = "performance"; + }; + gpu = { + enable = true; + model = "nvidia"; + }; + }; + + # GUI + gui = { + display = "eDP-1"; + wallpaper = "Bluewatch"; + fancy = true; + }; + + # Virtualisation + # virt.vfio = { + # setup = true; + # passthrough = [ + # "10de:28e0" # Graphics + # "10de:22be" # Audio + # ]; + # }; + + # Wine utilities + # apps.wine.utilities = true; + + # User V7 + users.users.v7 = { + isNormalUser = true; + description = "V 7"; + uid = 1000; + group = "users"; + shell = pkgs.zsh; + hashedPasswordFile = config.sops.secrets."v7.secret".path; + extraGroups = [ + "wheel" + "keys" + "adbusers" + "docker" + "i2c" + "input" + "lp" + "networkmanager" + "scanner" + "systemd-journal" + "video" + "minecraft" + #"kvm" + #"libvirtd" + ]; + }; + + home-manager.users.v7.imports = + hmImports + ++ [ + homeManager.v7 + (settings.home or {}) + ]; + }; + }; + + configurations.homeManager."v7@valkyrie" = { + module = { + imports = hmImports ++ [homeManager.v7]; + home = { + username = "v7"; + homeDirectory = "/home/v7"; + }; + }; + system = "x86_64-linux"; + }; +} diff --git a/modules/hosts/vortex.nix b/modules/hosts/vortex.nix @@ -0,0 +1,121 @@ +# Vortex - Dell Inspiron 15 5000 +{ + config, + inputs, + ... +}: let + inherit (config) util; + inherit (config.flake.modules) nixos homeManager; + + hmModules = + util.map.array [ + "shell-utils" + "filesystem" + "laptop" + "discord" + "firefox" + "internet" + "office" + "wine" + "hyprland" + ] + homeManager; +in { + configurations.nixos.vortex = { + system = "x86_64-linux"; + module = { + config, + pkgs, + ... + }: { + imports = + util.map.array + [ + "security" + "boot" + "filesystem" + "laptop" + "mobile" + "printer" + "libvirt" + "shell-utils" + "prompt" + "office" + "wine" + "hyprland" + ] + nixos + ++ util.map.array ["dell-inspiron-5509"] inputs.hardware.nixosModules; + + networking.hostId = builtins.substring 0 8 (builtins.hashString "md5" "vortex"); + + time.timeZone = "Asia/Kolkata"; + i18n.defaultLocale = "en_IN"; + environment.variables."LC_ALL" = "en_IN.UTF-8"; + + services.fwupd.enable = true; + + system = { + scheme = "secure"; + fs.scheme = "advanced"; + kernel = "xanmod"; + kernelModules = [ + "nvme" + "thunderbolt" + ]; + + nix = { + index = true; + tools = true; + }; + }; + + hardware.cpu = { + model = "intel"; + cores = 8; + }; + + gui = { + display = "eDP-1"; + wallpaper = "Thread"; + fancy = true; + }; + + apps.wine.utilities = true; + + users.users.v7 = { + isNormalUser = true; + description = "V 7"; + uid = 1000; + group = "users"; + shell = pkgs.zsh; + hashedPasswordFile = config.sops.secrets."v7.secret".path; + extraGroups = [ + "wheel" + "keys" + "networkmanager" + "adbusers" + "lp" + "scanner" + "kvm" + "libvirtd" + "input" + "video" + ]; + }; + + home-manager.users.v7.imports = hmModules ++ [homeManager.v7]; + }; + }; + + configurations.homeManager."v7@vortex" = { + module = { + imports = hmModules ++ [homeManager.v7]; + home = { + username = "v7"; + homeDirectory = "/home/v7"; + }; + }; + system = "x86_64-linux"; + }; +} diff --git a/modules/shell/prompt.nix b/modules/shell/prompt.nix @@ -0,0 +1,186 @@ +## Shell Prompt Configuration ## +_: { + flake.modules.nixos.prompt = {config, ...}: { + programs.starship = let + open = ""; + close = ""; + char = "⮞"; + + build = a: b: c: + build' { + icon = a; + var = b; + color = c; + }; + + build' = { + icon, + var, + color, + style ? "fg:white", + end ? "[${close}](fg:base03)", + ... + }: "[─](fg:base04)[${open}](fg:${color})[${icon}](fg:base01 bg:${color})[${close}](fg:${color} bg:base03)[ ${var}](${style} bg:base03)${end}"; + in { + enable = true; + settings = { + add_newline = true; + continuation_prompt = "${char} "; + format = "[╭](fg:base04)$os$directory$git_branch$git_status$fill$c$python$java$nodejs$dotnet$status$cmd_duration$shell$username$hostname$time$line_break$character"; + character = { + format = "[╰─$symbol](fg:base04) "; + success_symbol = "[${char}](fg:bold white)"; + error_symbol = "[${char}](fg:bold red)"; + }; + + os = { + disabled = false; + format = "(fg:base04)[${open}](fg:white)[$symbol](fg:base01 bg:white)[${close}](fg:white)"; + symbols = { + Android = ""; + Arch = ""; + Fedora = ""; + Linux = ""; + Macos = ""; + NixOS = ""; + Ubuntu = ""; + Windows = ""; + Unknown = ""; + }; + }; + + directory = { + disabled = false; + format = build "󰉋" "$read_only$truncation_symbol$path" "blue"; + home_symbol = "~"; + truncation_symbol = "…/"; + truncation_length = 4; + truncate_to_repo = false; + read_only = ""; + }; + + git_branch = { + disabled = false; + format = build' { + icon = ""; + var = "$branch"; + color = "green"; + end = ""; + }; + }; + + git_status = { + disabled = false; + format = "[$ahead_behind$all_status](fg:green bg:base03)[${close}](fg:base03)"; + ahead = " ⇡$count"; + behind = " ⇣$count"; + diverged = " ⇡$ahead_count ⇣$behind_count"; + conflicted = " =$count"; + deleted = " ×$count"; + modified = " !$count"; + renamed = " »$count"; + staged = " +$count"; + stashed = " *$count"; + untracked = " ?$count"; + up_to_date = ""; + }; + + c.format = build " C" "$version" "bright-white"; + python.format = build " Python" "$version" "bright-white"; + java.format = build " Java" "$version" "bright-white"; + nodejs.format = build "󰎙 Node.js" "$version" "bright-white"; + dotnet.format = build "󰪮 .NET" "$version" "bright-white"; + + fill = { + symbol = "─"; + style = "fg:base04"; + }; + + status = { + disabled = false; + format = build "" "$status" "red"; + }; + + cmd_duration = { + min_time = 500; + format = build "󰦖" "$duration" "orange"; + }; + + shell = { + disabled = false; + format = build "" "$indicator" "purple"; + bash_indicator = "bash"; + fish_indicator = "fish"; + zsh_indicator = "zsh"; + unknown_indicator = "shell"; + }; + + username = { + show_always = true; + style_user = "fg:white"; + style_root = "bold fg:red"; + format = build' { + icon = ""; + var = "$user"; + color = "yellow"; + style = "$style"; + }; + }; + + hostname = { + disabled = false; + format = build "" "$hostname" "cyan"; + ssh_only = false; + }; + + time = { + disabled = false; + format = build "" "$time" "blue"; + time_format = "%H:%M"; + }; + + palette = "base16"; + palettes.base16 = with config.lib.stylix.colors.withHashtag; { + black = base00; + bright-black = base03; + white = base05; + bright-white = base07; + purple = magenta; + bright-purple = bright-magenta; + inherit + blue + brown + cyan + green + magenta + orange + red + yellow + bright-blue + bright-cyan + bright-green + bright-magenta + bright-red + bright-yellow + base00 + base01 + base02 + base03 + base04 + base05 + base06 + base07 + base08 + base09 + base0A + base0B + base0C + base0D + base0E + base0F + ; + }; + }; + }; + }; +} diff --git a/modules/shell/shell-utils.nix b/modules/shell/shell-utils.nix @@ -0,0 +1,138 @@ +## Shell Utilities ## +{config, ...}: let + inherit (config.flake) files; +in { + flake.modules = { + nixos.shell-utils = { + config, + pkgs, + ... + }: { + config = { + environment = { + # Utilities + systemPackages = with pkgs; [ + bat + btop + eza + fastfetch + fd + hstr + lolcat + micro + tree + yazi + ]; + + # Fetch + etc."fastfetch/config.jsonc".text = files.fetch; + + # Command Aliases + shellAliases = { + hi = "echo 'Hi there. How are you?'"; + bye = "exit"; + dotfiles = "cd ${files.path.system}"; + c = "bat"; + l = "eza -b -h -l -F --octal-permissions --time-style iso"; + grep = "grep --color"; + colors = "${files.scripts.colors}"; + sike = "fastfetch"; + }; + }; + + ## Program Configuration + services.lorri.enable = true; + + # Programs + programs = { + yazi.enable = true; # File Manager + + # Command Correction Helper + pay-respects = { + enable = true; + alias = "fix"; + }; + + # DirENV Support + direnv = { + enable = true; + nix-direnv.enable = true; + }; + + # Bat Configuration + bat = { + enable = true; + settings = { + style = "full"; + italic-text = "always"; + }; + }; + + # Terminal Multiplexer + tmux = with config.lib.stylix.colors; { + plugins = with pkgs.tmuxPlugins; [ + open + yank + minimal-tmux-status + ]; + extraConfigBeforePlugins = '' + set -g @minimal-tmux-bg "#${base02}" + set -g @minimal-tmux-fg "#${base05}" + set -g @minimal-tmux-use-arrow true + set -g @minimal-tmux-right-arrow "" + set -g @minimal-tmux-left-arrow "" + ''; + }; + }; + }; + }; + + homeManager.shell-utils = _: { + home.persist = { + files = [".hstr_favorites"]; + directories = [ + ".config/micro" + ".local/share/direnv" + ]; + }; + + programs = { + btop.enable = true; # Resource Monitor + hstr.enable = true; # Command History Manager + + # File Lister + eza = { + enable = true; + colors = "auto"; + icons = "auto"; + git = true; + extraOptions = ["--group-directories-first"]; + }; + + # Text Editor + micro = { + enable = true; + settings = { + autoindent = true; + backup = true; + clipboard = "external"; + cursorline = true; + eofnewline = false; + helpsplit = "vsplit"; + hltrailingws = true; + infobar = true; + matchbrace = true; + keymenu = true; + mouse = true; + reload = "prompt"; + ruler = true; + saveundo = true; + smartpaste = true; + statusline = true; + syntax = true; + }; + }; + }; + }; + }; +} diff --git a/modules/shell/shell.nix b/modules/shell/shell.nix @@ -0,0 +1,104 @@ +## Shell Configuration ## +{config, ...}: let + inherit (config.flake) files; +in { + flake.modules = { + nixos.shell = {pkgs, ...}: { + config = { + # Text Editor + environment.variables."EDITOR" = "nano"; + programs = { + nano = { + enable = true; + syntaxHighlight = true; + nanorc = files.nano; + }; + + # Terminal Multiplexer + tmux = { + enable = true; + keyMode = "emacs"; + shortcut = "Space"; + aggressiveResize = true; + baseIndex = 1; + clock24 = true; + escapeTime = 0; + historyLimit = 50000; + terminal = "tmux-256color"; + extraConfig = files.tmux; + }; + + # Bourne Shell + bash = { + vteIntegration = true; + promptInit = '' + shopt -s autocd + shopt -s cdspell + shopt -s checkjobs + shopt -s checkwinsize + shopt -s cmdhist + shopt -s extglob + shopt -s globstar + shopt -s histappend + + HISTCONTROL=erasedups:ignoredups:ignorespace + HISTFILESIZE=100000 + HISTIGNORE=rm:killall + HISTSIZE=100000 + ''; + }; + + # Z Shell + zsh = { + enable = true; + autosuggestions.enable = true; + enableCompletion = false; + syntaxHighlighting.enable = true; + vteIntegration = true; + setOptions = [ + "autocd" + "EXTENDED_HISTORY" + "HIST_EXPIRE_DUPS_FIRST" + ]; + + promptInit = '' + bindkey '^[[1;5C' forward-word + bindkey '^[[1;5D' backward-word + bindkey '^[[3;5~' kill-word + bindkey '^[[3~' delete-char + bindkey "^[[5~" beginning-of-history + bindkey "^[[6~" end-of-history + bindkey '^[[A' up-line-or-search + bindkey '^[[B' down-line-or-search + bindkey '^[[C' forward-char + bindkey '^[[D' backward-char + bindkey '^[[F' end-of-linegestures + bindkey '^[[H' beginning-of-line + bindkey '^J' backward-kill-line + ''; + + interactiveShellInit = '' + source ${pkgs.zsh-autopair}/share/zsh/zsh-autopair/autopair.zsh + ''; + }; + }; + + environment.shells = [pkgs.bashInteractive]; + system.userActivationScripts.zshrc = "touch .zshrc"; + }; + }; + + homeManager.shell = _: { + home.persist = { + files = [ + ".bash_history" + ".zsh_history" + ]; + directories = [ + ".local/share/bash" + ".cache/zsh" + ]; + }; + }; + }; +} diff --git a/modules/system/base-ext.nix b/modules/system/base-ext.nix @@ -0,0 +1,29 @@ +## Extended Base Configuration ## +{inputs, ...}: { + flake.modules = { + nixos.base-ext = _: { + imports = [inputs.gaming.nixosModules.pipewireLowLatency]; + + config = { + # AppImage Support + programs.appimage = { + enable = true; + binfmt = true; + }; + + # Documentation + documentation = { + dev.enable = true; + man.enable = true; + }; + + # Low Latency Audio + services.pipewire.lowLatency = { + enable = true; + quantum = 64; + rate = 48000; + }; + }; + }; + }; +} diff --git a/modules/system/base.nix b/modules/system/base.nix @@ -0,0 +1,195 @@ +## Base Configuration ## +_: { + flake.modules = { + nixos.base = { + config, + options, + pkgs, + lib, + ... + }: let + inherit (builtins) attrNames map; + inherit + (lib) + hasPrefix + mkIf + mkOption + optionals + removePrefix + types + ; + cfg = config.system; + in { + options.system = { + kernel = mkOption { + description = "Linux Kernel Variant to be used"; + default = "lts"; + type = types.enum ( + ["lts"] ++ (map (name: removePrefix "linux_" name) (attrNames pkgs.linuxKernel.kernels)) + ); + }; + + kernelModules = mkOption { + description = "Linux Kernel Modules to load"; + type = with types; listOf str; + default = []; + }; + }; + + config = { + # System version + system.stateVersion = lib.mkDefault lib.trivial.release; + + # Kernel Configuration + boot = { + kernelPackages = + if (cfg.kernel == "lts") + then options.boot.kernelPackages.default + else pkgs.linuxKernel.packages."${"linux_" + cfg.kernel}"; + + initrd.availableKernelModules = optionals (cfg.kernelModules != []) ( + cfg.kernelModules + ++ [ + "ahci" + "sd_mod" + "usbhid" + "usb_storage" + "xhci_pci" + ] + ); + }; + + environment = { + variables."NIXOS_SPECIALISATION" = with config.system.nixos; + mkIf (hasPrefix "special." label) (removePrefix "special." label); + + # Essential Utilities + systemPackages = with pkgs; [ + custom.nixos + cryptsetup + file + inxi + killall + man-pages + mkpasswd + ntfsprogs + parted + pciutils + rsync + sdparm + smartmontools + unrar + unzip + usbutils + wget + alsa-utils + ]; + }; + + # Console + console = { + earlySetup = true; + packages = [pkgs.terminus_font]; + font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz"; + }; + + # Drivers + security.rtkit.enable = true; + hardware = { + graphics.enable = true; + enableRedistributableFirmware = true; + }; + + services.pulseaudio.enable = lib.mkForce false; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + networking = { + networkmanager.enable = true; + firewall.enable = true; + }; + + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + settings.General.Experimental = true; + }; + + # Memory + systemd.oomd.enable = false; + services.earlyoom = { + enable = true; + enableNotifications = true; + freeMemThreshold = 5; + freeSwapThreshold = 15; + }; + + # GPG & SSH + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + services.openssh = { + enable = true; + settings = { + PasswordAuthentication = true; + PermitRootLogin = lib.mkForce "no"; + }; + + hostKeys = [ + { + comment = "Host SSH Key"; + bits = 4096; + type = "ed25519"; + path = "/etc/ssh/ssh_key"; + } + ]; + }; + + environment.persist.directories = [ + "/etc/NetworkManager" + "/etc/ssh" + "/var/lib/alsa" + "/var/lib/bluetooth" + ]; + }; + }; + + homeManager.base = {lib, ...}: { + home = { + stateVersion = lib.mkDefault lib.trivial.release; + persist.directories = [ + { + directory = ".gnupg"; + mode = "0700"; + } + { + directory = ".ssh"; + mode = "0700"; + } + ]; + }; + + programs.ssh = { + enable = true; + settings."*" = { + ForwardAgent = false; + AddKeysToAgent = "no"; + Compression = false; + ServerAliveInterval = 0; + ServerAliveCountMax = 3; + HashKnownHosts = false; + UserKnownHostsFile = "~/.ssh/known_hosts"; + ControlMaster = "no"; + ControlPath = "~/.ssh/master-%r@%n:%p"; + ControlPersist = "no"; + }; + }; + }; + }; +} diff --git a/modules/system/boot.nix b/modules/system/boot.nix @@ -0,0 +1,115 @@ +## Boot Configuration ## +{inputs, ...}: { + flake.modules.nixos.boot = { + config, + lib, + pkgs, + ... + }: let + inherit + (lib) + mkDefault + mkForce + mkIf + mkMerge + mkOption + optional + types + ; + scheme = config.system.scheme; + in { + imports = [inputs.boot.nixosModules.lanzaboote]; + + options.system.scheme = mkOption { + description = "Supported Boot Firmware Scheme"; + type = types.nullOr ( + types.enum [ + "mbr" + "efi" + "secure" + ] + ); + default = "efi"; + }; + + config = + {warnings = optional (scheme == null) "Boot firmware is unknown";} + // mkIf (scheme != null) (mkMerge [ + { + boot = { + tmp.cleanOnBoot = true; + + # Debug + consoleLogLevel = 3; + initrd.verbose = false; + # Plymouth + plymouth.enable = true; + kernelParams = [ + "quiet" + "splash" + "boot.shell_on_fail" + "rd.systemd.show_status=false" + "rd.udev.log_level=3" + "udev.log_priority=3" + ]; + + loader = { + timeout = mkDefault 0; + efi.canTouchEfiVariables = true; + grub.enable = mkDefault false; + systemd-boot.enable = mkDefault false; + }; + }; + + specialisation.recovery.configuration = { + system.nixos.label = "special.recovery"; + boot = { + initrd.verbose = mkForce true; + plymouth.enable = mkForce false; + }; + }; + } + + ## GRUB MBR Boot Loader ## + (mkIf (scheme == "mbr") { + boot.loader.grub = { + enable = mkForce true; + device = "nodev"; + efiSupport = true; + zfsSupport = true; + useOSProber = true; + splashImage = null; + extraConfig = "set timeout_style=hidden"; + }; + }) + + ## SYSTEMD EFI Boot Loader ## + (mkIf (scheme == "efi") { + boot.loader.systemd-boot = { + enable = mkForce true; + editor = false; + configurationLimit = 15; + }; + }) + + ## EFI Secure Boot ## + (mkIf (scheme == "secure") rec { + boot.lanzaboote = { + enable = true; + configurationLimit = 15; + pkiBundle = "/etc/secureboot"; + autoGenerateKeys.enable = true; + autoEnrollKeys = { + enable = true; + autoReboot = true; + }; + }; + + environment = { + systemPackages = [pkgs.sbctl]; + persist.directories = [boot.lanzaboote.pkiBundle]; + }; + }) + ]); + }; +} diff --git a/modules/system/filesystem.nix b/modules/system/filesystem.nix @@ -0,0 +1,281 @@ +## File System Configuration ## +{ + config, + inputs, + ... +}: let + inherit (config.flake) files; +in { + flake.modules = { + nixos.filesystem = { + config, + lib, + pkgs, + ... + }: let + inherit + (lib) + filterAttrs + hasPrefix + mkAliasOptionModule + mkDefault + mkIf + mkMerge + mkOption + nameValuePair + optional + types + ; + inherit (builtins) listToAttrs map; + inherit (config.system.fs) scheme; + in { + imports = [ + inputs.impermanence.nixosModule + ( + mkAliasOptionModule + ["environment" "persist"] + [ + "environment" + "persistence" + files.path.persist + ] + ) + ( + mkAliasOptionModule + ["system" "fs" "persist"] + [ + "environment" + "persistence" + files.path.data + ] + ) + ]; + + options.system.fs.scheme = mkOption { + description = "Disk Filesystem Scheme"; + type = with types; + nullOr (enum [ + "simple" + "advanced" + ]); + default = null; + }; + + config = mkMerge [ + { + warnings = optional (scheme == null) "Disk Filesystem Scheme is unset"; + boot = { + supportedFilesystems = { + ntfs = true; + vfat = true; + zfs = true; + }; + zfs.forceImportRoot = false; + }; + } + + ## Common Partitions + (mkIf (scheme != null) { + programs.fuse.userAllowOther = true; + + # EFI System Partition + fileSystems."/boot" = { + device = "/dev/disk/by-partlabel/ESP"; + fsType = "vfat"; + }; + + # SWAP Partition + swapDevices = [{device = "/dev/disk/by-partlabel/swap";}]; + boot.kernel.sysctl."vm.swappiness" = 1; + + system.activationScripts.dotfiles = with files.path; let + path = + if scheme == "advanced" + then "${persist}/" + else ""; + dir = "${path}${system}"; + in '' + chown root:keys ${dir} + chmod 774 -R ${dir} + ''; + }) + + ## Simple File System Configuration using EXT4 ## + (mkIf (scheme == "simple") { + # ROOT Partition + fileSystems."/" = { + device = "/dev/disk/by-partlabel/System"; + fsType = "ext4"; + }; + }) + + { + environment.persist.enable = mkDefault false; + system.fs.persist.enable = mkDefault false; + } + + ## Advanced File System Configuration using ZFS ## + (mkIf (scheme == "advanced") ( + let + rollback = '' + zfs rollback -r fspool/system/root@blank && echo "Rollback Complete!" + ''; + in { + fileSystems = + { + # ROOT Partition + "/" = { + device = "fspool/system/root"; + fsType = "zfs"; + }; + # NIX Partition + "/nix" = { + device = "fspool/system/nix"; + fsType = "zfs"; + }; + # PERSISTENT Partition + "${files.path.data}" = { + device = "fspool/data"; + fsType = "zfs"; + neededForBoot = true; + }; + } + // filterAttrs (name: _: hasPrefix "/etc" name) ( + listToAttrs ( + map ( + item: + nameValuePair item.directory { + device = "${files.path.persist}${item.directory}"; + fsType = "none"; + options = ["bind"]; + neededForBoot = true; + } + ) + config.environment.persist.directories + ) + ); + + # Early Boot Requirements + boot = { + resumeDevice = "/dev/disk/by-partlabel/swap"; + # Boot Settings + kernelParams = ["elevator=none"]; + zfs = { + forceImportAll = false; + unsafeAllowHibernation = true; + devNodes = "/dev/disk/by-partlabel/System"; + }; + + initrd.systemd = { + enable = true; + services.rollback = { + description = "Wipe ZFS partition for Opt-In State Configuration"; + wantedBy = ["initrd.target"]; + after = ["zfs-import-fspool.service"]; + before = ["sysroot.mount"]; + path = [pkgs.zfs]; + unitConfig.DefaultDependencies = "no"; + serviceConfig.Type = "oneshot"; + script = rollback; + }; + }; + }; + + # Maintainence + services.zfs = { + trim.enable = true; + autoScrub.enable = true; + autoSnapshot = { + enable = true; + hourly = 12; + daily = 7; + weekly = 3; + monthly = 1; + }; + }; + + # Persisted Files + system.fs.persist.enable = true; + environment.persistence."${files.path.persist}" = { + enable = true; + files = ["/etc/machine-id"]; + directories = [ + files.path.system + "/var/log" + "/var/lib/AccountsService" + "/var/lib/nixos" + "/var/lib/systemd/coredump" + ]; + }; + } + )) + ]; + }; + + homeManager.filesystem = { + lib, + pkgs, + osConfig ? null, + ... + }: let + advanced = osConfig != null && osConfig.system.fs.scheme == "advanced"; + in { + imports = [(lib.mkAliasOptionModule ["home" "persist"] ["home" "persistence" files.path.data])]; + + home.persistence."${files.path.data}" = { + enable = advanced; + allowTrash = true; + hideMounts = true; + directories = [ + "Desktop" + "Documents" + "Downloads" + "Music" + "Pictures" + "Public" + "Videos" + { + directory = ".local/share/keyrings"; + mode = "0700"; + } + ]; + }; + + # Persist Trash Folder + systemd.user.services.persist-trash = lib.mkIf advanced { + Unit.Description = "Persist Trash Folder"; + Install.WantedBy = ["default.target"]; + Service = let + run = script: + lib.getExe ( + pkgs.writeShellApplication { + name = "script"; + runtimeInputs = [pkgs.coreutils]; + text = '' + LOCAL="$HOME/.local/share/Trash" + PERSIST="${files.path.data}/home/$USER/Trash" + mkdir -p "$LOCAL" + ${script} + ''; + } + ); + in { + Type = "oneshot"; + RemainAfterExit = true; + StandardOutput = "journal"; + ExecStart = run '' + if [ -d "$PERSIST" ] + then + cp -r "$PERSIST"/. "$LOCAL" + rm -rf "$PERSIST" + fi + ''; + ExecStop = run '' + mkdir -p "$PERSIST" + cp -r "$LOCAL"/. "$PERSIST" + ''; + }; + }; + }; + }; +} diff --git a/modules/system/nix.nix b/modules/system/nix.nix @@ -0,0 +1,124 @@ +## Nix Configuration ## +{inputs, ...}: { + flake.modules = { + nixos.nix = { + config, + lib, + pkgs, + ... + }: let + inherit (lib) mkEnableOption mkIf; + in { + options.system.nix = { + tools = mkEnableOption "Enable Additional Nix Tools"; + index = mkEnableOption "Enable Package Indexer"; + }; + + config = { + nix = { + # Version + package = pkgs.nixFlakes; + + settings = { + sandbox = true; + auto-optimise-store = true; + + # User Permissions + allowed-users = [ + "root" + "@wheel" + ]; + trusted-users = [ + "root" + "@wheel" + ]; + + # Binary Cache + inherit ((import ../../flake.nix).nixConfig) trusted-substituters trusted-public-keys; + }; + + # Garbage Collection + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + + extraOptions = '' + accept-flake-config = true + warn-dirty = false + experimental-features = nix-command flakes recursive-nix + min-free = ${builtins.toString (1024 * 1024 * 1024)} + max-free = ${builtins.toString (10 * 1024 * 1024 * 1024)} + ''; + + ## Nix Registry ## + # Registry + nixPath = ["/etc/nix/inputs"]; + registry = builtins.mapAttrs (_: value: {flake = value;}) ( + lib.filterAttrs (_: value: value ? outputs) inputs + ); + }; + + nixpkgs.flake = { + setNixPath = false; + setFlakeRegistry = false; + }; + + environment.etc = + lib.mapAttrs' (name: value: { + name = "nix/inputs/${name}"; + value = { + source = value.outPath; + }; + }) + inputs; + + ## Nix Tools ## + # Nix Tools + nix.settings.system-features = mkIf config.system.nix.tools [ + "kvm" + "big-parallel" + "recursive-nix" + ]; + + environment.systemPackages = mkIf config.system.nix.tools ( + with pkgs; [ + cachix + dix + manix + alejandra + nix-output-monitor + prettier + shellcheck + statix + ] + ); + }; + }; + + ## Package Indexer ## + homeManager.nix = { + lib, + osConfig ? null, + ... + }: let + enable = + if osConfig != null + then osConfig.system.nix.index + else false; + in { + imports = [inputs.index.homeModules.nix-index]; + + home.persist.directories = [ + ".cache/nix" + ".cache/manix" + ]; + + programs = { + nix-index.enable = lib.mkForce enable; + nix-index-database.comma.enable = lib.mkForce enable; + }; + }; + }; +} diff --git a/modules/system/security.nix b/modules/system/security.nix @@ -0,0 +1,127 @@ +## Security & Hardening Settings ## +{config, ...}: let + inherit (config.flake) files; +in { + flake.modules.nixos.security = { + lib, + pkgs, + ... + }: { + config = { + security = { + protectKernelImage = false; + + # Sandbox + apparmor = { + enable = true; + killUnconfinedConfinables = true; + packages = [pkgs.apparmor-profiles]; + }; + + # Sudo + sudo = { + execWheelOnly = true; + extraConfig = '' + Defaults pwfeedback + Defaults lecture = always, lecture_file = ${files.ascii.groot} + ''; + }; + }; + + # Recovery Account + specialisation.recovery.configuration = { + home-manager.verbose = true; + security.sudo.extraConfig = lib.mkAfter "recovery ALL=(ALL:ALL) NOPASSWD:ALL"; + users.extraUsers.recovery = { + name = "recovery"; + description = "Recovery Account"; + isNormalUser = true; + uid = 1100; + group = "users"; + extraGroups = ["wheel"]; + useDefaultShell = true; + initialHashedPassword = lib.mkDefault (lib.fileContents ../../secrets/passwords/default); + }; + }; + + # Block Junk Sites + networking.stevenblack.enable = true; + programs.firejail.enable = true; + + # Hardening + boot = { + # Kernel + kernelParams = [ + "page_alloc.shuffle=1" + "page_poison=1" + "slub_debug=FZP" + ]; + + # Network + kernel.sysctl = { + "kernel.ftrace_enabled" = false; + "kernel.kexec_load_disabled" = true; + "kernel.kptr_restrict" = lib.mkOverride 500 2; + "kernel.sysrq" = 176; + "kernel.yama.ptrace_scope" = lib.mkOverride 500 1; + + "net.core.bpf_jit_enable" = true; + "net.core.default_qdisc" = "cake"; + "net.ipv4.conf.all.accept_redirects" = false; + "net.ipv4.conf.all.accept_source_route" = 0; + "net.ipv4.conf.all.log_martians" = true; + "net.ipv4.conf.all.rp_filter" = 1; + "net.ipv4.conf.all.secure_redirects" = false; + "net.ipv4.conf.all.send_redirects" = false; + "net.ipv4.conf.default.accept_redirects" = false; + "net.ipv4.conf.default.log_martians" = true; + "net.ipv4.conf.default.rp_filter" = 1; + "net.ipv4.conf.default.secure_redirects" = false; + "net.ipv4.conf.default.send_redirects" = false; + "net.ipv4.icmp_echo_ignore_broadcasts" = true; + "net.ipv4.icmp_ignore_bogus_error_responses" = 1; + "net.ipv4.tcp_congestion_control" = "bbr"; + "net.ipv4.tcp_fastopen" = 3; + "net.ipv4.tcp_rfc1337" = 1; + "net.ipv4.tcp_syncookies" = 1; + "net.ipv6.conf.all.accept_redirects" = false; + "net.ipv6.conf.all.accept_source_route" = 0; + "net.ipv6.conf.default.accept_redirects" = false; + }; + + # Secure Modules + kernelModules = ["tcp_bbr"]; + + # Old & Obscure Modules + blacklistedKernelModules = [ + # Network Protocols + "ax25" + "netrom" + "rose" + + # Filesystems + "adfs" + "affs" + "befs" + "bfs" + "cramfs" + "efs" + "erofs" + "exofs" + "f2fs" + "freevxfs" + "hfs" + "hpfs" + "jfs" + "minix" + "nilfs2" + "omfs" + "qnx4" + "qnx6" + "sysv" + "ufs" + ]; + }; + }; + }; +} diff --git a/modules/system/user/_mutable.nix b/modules/system/user/_mutable.nix @@ -0,0 +1,104 @@ +# https://gist.github.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa +{ + config, + lib, + ... +}: let + inherit + (builtins) + attrValues + concatLists + filter + foldl' + map + ; + + inherit + (lib) + assertMsg + concatLines + escapeShellArg + getAttrFromPath + hm + mkOption + recursiveUpdate + setAttrByPath + types + ; + + fileOptionAttrPaths = [ + [ + "home" + "file" + ] + [ + "xdg" + "configFile" + ] + [ + "xdg" + "dataFile" + ] + ]; +in { + options = let + mergeAttrsList = foldl' recursiveUpdate {}; + fileAttrsType = types.attrsOf ( + types.submodule (_: { + options.mutable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to copy the file without the read-only attribute instead of + symlinking. If you set this to `true`, you must also set `force` to + `true`. Mutable files are not removed when you remove them from your + configuration. + This option is useful for programs that don't have a very good + support for read-only configurations. + ''; + }; + }) + ); + in + mergeAttrsList ( + map ( + attrPath: + setAttrByPath attrPath (mkOption { + type = fileAttrsType; + }) + ) + fileOptionAttrPaths + ); + + config = { + home.activation.mutableFileGeneration = let + allFiles = concatLists ( + map (attrPath: attrValues (getAttrFromPath attrPath config)) fileOptionAttrPaths + ); + + filterMutableFiles = filter ( + file: + (file.mutable or false) + && assertMsg file.force "if you specify `mutable` to `true` on a file, you must also set `force` to `true`" + ); + + mutableFiles = filterMutableFiles allFiles; + + toCommand = file: let + source = escapeShellArg file.source; + target = escapeShellArg file.target; + in '' + $VERBOSE_ECHO "${source} -> ${target}" + $DRY_RUN_CMD cp --remove-destination --no-preserve=mode ${source} ${target} + ''; + + command = + '' + + echo "Copying mutable home files for $HOME" + '' + + concatLines (map toCommand mutableFiles); + in + hm.dag.entryAfter ["linkGeneration"] command; + }; +} diff --git a/modules/system/user/default.nix b/modules/system/user/default.nix @@ -0,0 +1,182 @@ +## User Configuration ## +{ + config, + inputs, + ... +}: let + inherit (config.flake) files modules; + inherit (config) util; +in { + flake.modules = { + # Base User Configuration + nixos.user = { + config, + lib, + ... + }: let + inherit (lib) mkIf; + in { + imports = [inputs.home-manager.nixosModules.home-manager]; + + config = { + users.mutableUsers = false; + users.extraUsers.root = { + isNormalUser = false; + extraGroups = ["wheel"]; + hashedPasswordFile = + mkIf ( + config.sops.secrets ? "root.secret" + ) + config.sops.secrets."root.secret".path; + }; + + # User Passwords + sops.secrets = util.map.secrets { + directory = ../../../secrets/passwords; + neededForUsers = true; + }; + + # Home Manager settings + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + backupFileExtension = "bak"; + + # Default Modules + sharedModules = + util.map.array [ + "base" + "user" + "nix" + "shell" + "theme" + ] + modules.homeManager; + }; + + # XDG directories + environment.sessionVariables = { + "XDG_CACHE_HOME" = "$HOME/.cache"; + "XDG_CONFIG_HOME" = "$HOME/.config"; + "XDG_DATA_HOME" = "$HOME/.local/share"; + "XDG_BIN_HOME" = "$HOME/.local/bin"; + }; + }; + }; + + # Global Home Manager Configuration + homeManager.user = { + config, + lib, + ... + }: let + inherit (lib) mkIf mkOption types; + cfg = config.credentials; + in { + # Mutable file support + imports = [(import ./_mutable.nix)]; + + # User Identity + options.credentials = { + name = mkOption { + description = "Work User Name"; + type = types.str; + default = config.home.username; + }; + + fullname = mkOption { + description = "Full User Name"; + type = types.str; + default = "Default User"; + }; + + mail = mkOption { + description = "User Mail ID"; + type = types.str; + default = ""; + example = "user@email.com"; + }; + + key = mkOption { + description = "User GPG Key"; + type = types.str; + default = ""; + example = "Use 'gpg --list-signatures --keyid-format short'"; + }; + }; + + config = { + # Update News + news.display = "show"; + + # User Services + systemd.user = { + enable = true; + startServices = true; + }; + + # Environment Settings + home.file = { + ".local/share/backgrounds".source = files.wallpapers.path; + ".config/gtk-3.0/bookmarks" = { + text = lib.mkBefore '' + file://${config.home.homeDirectory}/Downloads Downloads + file://${config.home.homeDirectory}/Pictures Pictures + file://${config.home.homeDirectory}/Documents Documents + ''; + force = true; + }; + }; + + # GPG Keys + programs.gpg = { + settings = mkIf (cfg.key != "") { + default-key = cfg.key; + default-recipient-self = true; + auto-key-locate = "local,wkd,keyserver"; + keyserver = "hkps://keys.openpgp.org"; + auto-key-retrieve = true; + auto-key-import = true; + keyserver-options = "honor-keyserver-url"; + }; + + publicKeys = + builtins.map + (source: { + inherit source; + trust = "ultimate"; + }) + ( + builtins.attrValues ( + util.map.files { + directory = ../../../secrets/keys; + extension = ".gpg"; + } + ) + ); + }; + + # User Directories + xdg = { + enable = true; + mime.enable = true; + mimeApps.enable = true; + configFile."mimeapps.list".force = true; + userDirs = { + enable = true; + createDirectories = true; + desktop = "$HOME/Desktop"; + documents = "$HOME/Documents"; + download = "$HOME/Downloads"; + music = "$HOME/Music"; + pictures = "$HOME/Pictures"; + publicShare = "$HOME/Public"; + templates = "$HOME/Templates"; + videos = "$HOME/Videos"; + extraConfig."SCREENSHOTS" = "$HOME/Pictures/Screenshots"; + }; + }; + }; + }; + }; +} diff --git a/modules/users/navya.nix b/modules/users/navya.nix @@ -0,0 +1,4 @@ +_: { + flake.modules.homeManager.navya = _: { + }; +} diff --git a/modules/users/v7/accounts.conf b/modules/users/v7/accounts.conf @@ -0,0 +1,11 @@ +[Account account_1635317848_0] +Provider=google +Identity=maydayv7@gmail.com +PresentationIdentity=maydayv7@gmail.com +MailEnabled=true +CalendarEnabled=true +ContactsEnabled=true +DocumentsEnabled=true +PhotosEnabled=true +FilesEnabled=false +PrintersEnabled=false diff --git a/modules/users/v7/default.nix b/modules/users/v7/default.nix @@ -0,0 +1,37 @@ +{config, ...}: let + inherit (config.flake) files; +in { + flake.modules.homeManager.v7 = { + config, + lib, + pkgs, + ... + }: let + homeDir = config.home.homeDirectory; + in { + credentials = { + name = "maydayv7"; + fullname = "V7"; + mail = "maydayv7@gmail.com"; + key = "8C240C0C11293EE56260601CCF616EB19C2765E4"; + }; + + home = { + packages = [pkgs.home-manager]; + persist.directories = [ + "TBD" + "Projects" + ]; + + file = { + ".face".source = ./profile.png; + ".config/goa-1.0/accounts.conf".text = builtins.readFile ./accounts.conf; + "Projects/dotfiles".source = config.lib.file.mkOutOfStoreSymlink files.path.system; + ".config/gtk-3.0/bookmarks".text = lib.mkBefore '' + file://${homeDir}/TBD TBD + file://${homeDir}/Projects Projects + ''; + }; + }; + }; +} diff --git a/nixos/users/v7/profile.png b/modules/users/v7/profile.png Binary files differ. diff --git a/modules/virt/android.nix b/modules/virt/android.nix @@ -0,0 +1,36 @@ +## Android Virtualisation ## +# ? # Run 'waydroid init -s GAPPS -f' to install system image +_: { + flake.modules.nixos.android = { + config, + options, + lib, + pkgs, + ... + }: { + config = { + warnings = lib.optional (config.boot.kernelPackages != options.boot.kernelPackages.default) '' + Android Virtualisation may not work + - Kernel may not have requisite 'binder' module + - Use the mainline/LTS kernel for assured support + ''; + + virtualisation.waydroid.enable = true; + environment.systemPackages = [pkgs.wl-clipboard]; + + # Environment Setup + users.groups.android = { + name = "android"; + gid = 1000; + }; + + environment.persist.directories = [ + { + directory = "/var/lib/waydroid"; + group = "android"; + mode = "774"; + } + ]; + }; + }; +} diff --git a/modules/virt/docker.nix b/modules/virt/docker.nix @@ -0,0 +1,16 @@ +## Docker Containers ## +_: { + flake.modules.nixos.docker = {pkgs, ...}: { + virtualisation.docker.enable = true; + environment = { + persist.directories = ["/var/lib/docker"]; + systemPackages = [pkgs.docker-compose]; + }; + + # ? # Use '--add-host=host.docker.internal:host-gateway' to create containers + networking = { + firewall.trustedInterfaces = ["docker0"]; + extraHosts = "127.0.0.1 host.docker.internal"; + }; + }; +} diff --git a/modules/virt/libvirt.nix b/modules/virt/libvirt.nix @@ -0,0 +1,50 @@ +## Libvirt Settings ## +_: { + flake.modules = { + nixos.libvirt = { + config, + pkgs, + ... + }: let + inherit (config.hardware.cpu) model; + in { + environment.persist.directories = ["/var/lib/libvirt"]; + + # Environment Setup + security.virtualisation.flushL1DataCache = "cond"; + boot = { + kernelModules = ["kvm-${model}"]; + extraModprobeConfig = "options kvm_${model} nested=1"; + }; + + # VM Utilities + programs.virt-manager.enable = true; + + # VM Packages + environment.systemPackages = [pkgs.libguestfs]; + + virtualisation = { + kvmgt.enable = true; + spiceUSBRedirection.enable = true; + libvirtd = { + enable = true; + onBoot = "ignore"; + onShutdown = "shutdown"; + qemu = { + package = pkgs.qemu_kvm; + runAsRoot = false; + swtpm.enable = true; + vhostUserPackages = [pkgs.virtiofsd]; + }; + }; + }; + }; + + homeManager.libvirt = _: { + home.persist.directories = [ + ".config/libvirt" + ".local/share/libvirt" + ]; + }; + }; +} diff --git a/modules/virt/vfio.nix b/modules/virt/vfio.nix @@ -0,0 +1,116 @@ +## VFIO Configuration ## +_: { + flake.modules.nixos.vfio = { + config, + lib, + pkgs, + ... + }: let + inherit (builtins) concatStringsSep; + inherit + (lib) + generators + mkEnableOption + mkForce + mkIf + mkMerge + mkOption + types + ; + cfg = config.virt.vfio; + inherit (config.hardware.cpu) model; + in { + options.virt.vfio = { + setup = mkEnableOption "VFIO Setup Mode"; + passthrough = mkOption { + description = "PCI Device IDs for VFIO Passthrough"; + type = types.listOf types.str; + default = []; + example = [ + "10de:28e0" # Graphics + "10de:22be" # Audio + ]; + }; + }; + + config = mkMerge [ + { + specialisation.vfio.configuration = { + system.nixos.label = "special.vfio"; + virt.vfio.setup = true; + hardware.cpu.mode = mkForce "performance"; + }; + } + + (mkIf (!cfg.setup) { + specialisation.no-vfio.configuration = { + system.nixos.label = "special.no-vfio"; + virt.vfio.setup = false; + }; + + # Disable GPU + hardware.gpu.enable = mkForce false; + + boot = { + kernelParams = [ + "iommu=pt" + "${model}_iommu=on" + "kvm.ignore_msrs=1" + "kvm.report_ignored_msrs=0" + ("vfio-pci.ids=" + concatStringsSep "," cfg.passthrough) + ]; + + initrd.kernelModules = [ + "vfio" + "vfio_pci" + "vfio_iommu_type1" + ]; + }; + + # Looking Glass + systemd.tmpfiles.rules = ["f /dev/shm/looking-glass 0660 root qemu-libvirtd -"]; + environment = { + systemPackages = [pkgs.looking-glass-client]; + etc."looking-glass-client.ini".text = generators.toINI {} { + app.renderer = "egl"; + win = { + title = "Virtual Machine"; + autoResize = "yes"; + borderless = "no"; + dontUpscale = "yes"; + fullScreen = "no"; + keepAspect = "yes"; + maximize = "no"; + noScreensaver = "yes"; + quickSplash = "yes"; + uiSize = 16; + }; + + egl = { + scale = 2; + multisample = "yes"; + vsync = "yes"; + }; + + input = { + autoCapture = "yes"; + grabKeyboardOnFocus = "yes"; + rawMouse = "yes"; + releaseKeysOnFocusLoss = "yes"; + }; + + spice = { + enable = "yes"; + clipboard = "yes"; + }; + + wayland = { + warpSupport = "yes"; + fractionScale = "no"; + }; + }; + }; + }) + ]; + }; +} diff --git a/nixos/.gitignore b/nixos/.gitignore @@ -1 +0,0 @@ -result diff --git a/nixos/README.md b/nixos/README.md @@ -1,468 +0,0 @@ -> [!CAUTION] -> I have switched to Windows, and do not use this configuration anymore - -[![NixOS](https://img.shields.io/badge/NixOS-25.11-9cf.svg?style=flat-square&logo=NixOS&logoColor=white)](https://nixos.org) -![License](https://img.shields.io/github/license/maydayv7/dotfiles?color=dgreen&style=flat-square) -![Size](https://img.shields.io/github/repo-size/maydayv7/dotfiles?color=red&label=size&style=flat-square) - -This directory contains the configuration and `dotfiles` for my continuously evolving multi-PC setup (using [Nix](https://nixos.org/)). -All the devices I own, controlled by code. -It also builds and deploys my website to [maydayv7.cc](https://maydayv7.cc). - -<details> -<summary><b>Pictures</b></summary> - -**_Note:_** These may be outdated - -| ![Hyprland](./files/images/desktop/hyprland.jpg) | -| :----------------------------------------------: | -| _Hyprland_ | - -| ![GNOME Desktop](./files/images/desktop/gnome.jpg) | -| :------------------------------------------------: | -| _GNOME Desktop_ | - -| ![Pantheon Desktop](./files/images/desktop/pantheon.jpg) | -| :------------------------------------------------------: | -| _Pantheon Desktop_ | - -<details> -<summary>Theming</summary> - -- [Starship](https://starship.rs/) Prompt Theme: Minimal, blazing-fast, and infinitely customizable prompt for any shell -- [Bibata Cursor](https://github.com/ful1e5/Bibata_Cursor): Compact and material designed cursor set -- [Papirus Icon Theme](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme): Pixel perfect icon theme for Linux -- [Catppuccin](https://github.com/catppuccin) Theme: A community-driven Pastel Theme consisting of 4 soothing warm Flavors with 26 eye-candy Colors each - -- [Adwaita GTK3](https://github.com/lassekongo83/adw-gtk3): Theme from `libadwaita` ported to GTK3 -- [KvLibadwaita](https://github.com/GabePoel/KvLibadwaita) Kvantum Theme: Integrates QT Apps with GNOME Desktop -- Firefox [GNOME Theme](https://github.com/rafaelmardojai/firefox-gnome-theme): GNOME Theme for the Mozilla Firefox Browser, used for better desktop integration -- VS Code [Adwaita Theme](https://github.com/piousdeer/vscode-adwaita): Integrates Visual Studio Code with GNOME Desktop -- Discord [GNOME Theme](https://github.com/ricewind012/discord-gnome-theme): A GNOME theme for Discord, following the Adwaita style & GNOME HIG - -- Firefox [Elementary Theme](https://github.com/Zonnev/elementaryos-firefox-theme): Elementary OS Theme for the Mozilla Firefox Browser, used for better desktop integration -- VS Code [Elementary Theme](https://github.com/sixpounder/vscode-elementary-theme): Integrates Visual Studio Code with Pantheon Desktop -- Logseq [Bonofix Theme](https://github.com/Sansui233/logseq-bonofix-theme): A clean Logseq theme with focus on long-time writing experience - -</details> - -<details> -<summary><i>Older...</i></summary> - -| [![XFCE Desktop](./files/images/desktop/xfce.jpg)](https://www.reddit.com/r/unixporn/comments/19efxry/xfce_functional_and_beautiful/) | -| :-----------------------------------------------------------------------------------------------------------------------------------: | -| _XFCE Desktop_ | - -| ![GNOME 45](./files/images/desktop/old/gnome_45.jpg) | -| :--------------------------------------------------: | -| _GNOME 45_ | - -| ![GNOME 44](./files/images/desktop/old/gnome_44.jpg) | -| :--------------------------------------------------: | -| _GNOME 44_ | - -| [![GNOME 41](./files/images/desktop/old/gnome_41.jpg)](https://www.reddit.com/r/unixporn/comments/ssb7mf/gnome_my_dream/) | -| :-----------------------------------------------------------------------------------------------------------------------: | -| _GNOME 41_ | - -</details> - -</details> - -## Features - -<img alt="Built with Nix" src="https://raw.githubusercontent.com/nix-community/builtwithnix.org/62897617ceefe428f135e82c3a87ea093e29e045/img/built_with_nix.svg" width="130" height="50"/> - -- Device-Agnostic -- Convenient and Automated -- Hermetically Reproducible -- Declarative and Derivational -- Atomic, Generational and Immutable - -#### Notable Features - -- Supports multiple users and devices -- Configuration for multiple DEs and Compositors -- Incorporates PipeWire, Wayland, ...! -- Automatically builds and deploys my [Website](./site) -- Credentials management using the [`sops-nix`](https://github.com/Mic92/sops-nix) module and [`gnupg`](https://gnupg.org/) keys -- Comprehensive User Configuration using the [`home-manager`](https://github.com/nix-community/home-manager) module, with [support](./modules/user/default.nix) for setting global conditionals and shared/user-specific configuration -- Ephemeral, Opt-In filesystem state using the [`impermanence`](https://github.com/nix-community/impermanence) module and [ZFS](https://zfsonlinux.org/) -- Support for Secure Boot using [`lanzaboote`](https://github.com/nix-community/lanzaboote) -- Multiple development [`shells`](./shells) integrated with [`direnv`](https://direnv.net/) and [`lorri`](https://github.com/nix-community/lorri) -- Automatic `packages` updates using [`update.sh`](./packages/update.sh) -- Syntax [formatting](./modules/nix/format.nix) using [`treefmt`](https://github.com/numtide/treefmt) -- Support for `source` filters with [`nix-filter`](https://github.com/numtide/nix-filter) -- Support for Base16 color theming using [`stylix`](https://github.com/danth/stylix) -- Support for declaratively installing [Flatpak](./modules/apps/flatpak.nix) applications using [`nix-flatpak`](https://github.com/gmodena/nix-flatpak) -- Wrapped `wine` [Applications](./packages/wine) using Emmanuel's [Wrapper](https://github.com/emmanuelrosa/erosanix/tree/0dabea58d483e13d2de141517cb4ff1cb230b2aa/pkgs/mkwindowsapp) -- Support for Android Virtualisation using [Waydroid](https://waydro.id/) -- Support for VFIO PCI Device Passthrough along with [Looking Glass](https://looking-glass.io/) for high-performance VMs - -## Programs - -| Type | Programs | -| :---------- | :--------------------------------------------------------------------------------------------------------------------------: | -| Editors | [`nano`](https://www.nano-editor.org/), [`micro`](https://micro-editor.github.io), [VS Code](https://code.visualstudio.com/) | -| Shells | [`bash`](https://www.gnu.org/software/bash/), [`zsh`](https://www.zsh.org) | -| Terminal | [Ghostty](https://ghostty.org/), [Kitty](https://sw.kovidgoyal.net/kitty/) | -| Browser | [Firefox](https://www.mozilla.org/en-US/firefox/) | -| Desktops | [GNOME](https://www.gnome.org), [Pantheon](https://elementary.io/) | -| Compositors | [Hyprland](https://hypr.land/), [Niri](https://github.com/YaLTeR/niri) | - -## Structure - -**_Overview of File Hierarchy_** - -<details> -<summary><b>Outputs</b></summary> - -```shellsession -$ nix flake show -github:maydayv7/dotfiles -├───apps -│ └───x86_64-linux -│ ├───sysutils: app -│ ├───hyprutils: app -│ ├───install: app -│ └───nixos: app -├───checks -│ └───x86_64-linux -│ ├───Device-iso: derivation 'nixos-rebuild' -│ └───treefmt: derivation 'treefmt-check' -├───devShells -│ └───x86_64-linux -│ ├───cc: development environment 'C' -│ ├───default: development environment 'devShell' -│ ├───format: development environment 'nix-shell' -│ ├───java: development environment 'Java' -│ ├───lua: development environment 'Lua' -│ ├───python: development environment 'Python' -│ ├───rust: development environment 'Rust' -│ ├───sql: development environment 'SQL' -│ ├───video: development environment 'Video' -│ └───website: development environment 'Website' -├───files: 'dotfiles' and program configuration -├───formatter -│ └───x86_64-linux: package 'treefmt' -├───legacyPackages -│ └───x86_64-linux (Default package channel) -├───lib: utility library functions -├───nixosConfigurations -│ ├───futura: NixOS configuration -│ ├───valkyrie: NixOS configuration -│ └───vortex: NixOS configuration -├───overlays -├───packages -│ └───x86_64-linux -│ ├───install: package 'os-install' -│ ├───nixos: package 'nixos' -│ └───website: package 'website-stable' -├───patchedPkgs: patched package source -├───systems: supported architectures -└───templates - └───default: template: My NixOS Configuration -``` - -</details> - -``` -┌── flake.nix -├── flake.lock -├── files -├── site -├── devices -├── users -│ └── passwords -├── secrets -├── shells -├── checks -├── lib -│ ├── build.nix -│ ├── map.nix -│ └── pack.nix -├── scripts -│ ├── install.nix -│ └── nixos.nix -├── packages -│ └── overlays -└── modules - ├── configuration.nix - ├── apps - ├── base - ├── gui - ├── hardware - ├── nix - ├── shell - └── user -``` - -- `flake.nix`: toplevel configuration file and repository version control - [`flake-parts`](https://github.com/hercules-ci/flake-parts) is used for modularization - -- [`files`](./files/README.md): `dotfiles` and program configuration -- [`site`](./site/README.md): personal website generated using [`zola`](https://www.getzola.org/) -- [`devices`](./devices/README.md): system configuration for various devices -- [`users`](./users/README.md): individual user-specific configuration -- [`secrets`](./secrets/README.md): authentication credentials management using [`sops-nix`](https://github.com/Mic92/sops-nix) -- `shells`: sand-boxed shells for development purposes -- `checks`: configuration checks and continuous integration -- [`lib`](./lib/README.md): custom functions designed for conveniently defining configuration -- [`scripts`](./scripts/README.md): useful system management scripts -- [`packages`](./packages/README.md): locally built custom packages -- `overlays`: overrides for pre-built packages -- [`modules`](./modules/README.md): custom configuration modules for additional functionality -- `configuration.nix`: builds system configuration - -## Installation - -<details> -<summary><b>Already Installed</b></summary> - -To use my configuration as-is for a fresh NixOS installation, you can try the following steps: - -**_Note:_** Run `nix develop` in the repository to install all required dependencies - -1. Prepare `/etc/nixos`: - <pre><code>sudo mkdir /etc/nixos - sudo chown $USER /etc/nixos && sudo chmod ugo+rw /etc/nixos - cd /etc/nixos - </code></pre> - -2. Clone this repository (and preferably initialize it using `git`): - <pre><code>nix flake init -t github:maydayv7/dotfiles - git init - </code></pre> - -3. Install `gnupg` and generate a GPG Key for yourself (if you don't already have one), and include it in the [`secrets.yaml`](./secrets/secrets.yaml) file (using `gpg --list-keys`). You can use the following commands to generate the GPG key (Ultimate trust and w/o passphrase is preferred): - _Replace_ **_USER_** _,_ **_EMAIL_** _and_ **_COMMENT_** - <pre><code>gpg --full-generate-key - 1 - 4096 - 0 - y - <b><i>USER - EMAIL - COMMENT</i></b> - O - gpg --output public.pgp --armor --export <b><i>USER</i></b>@<b><i>EMAIL</i></b> - gpg --output private.pgp --armor --export-secret-key <b><i>USER</i></b>@<b><i>EMAIL</i></b> - </code></pre> - - _Save the keys `public.gpg` and `private.gpg` in a secure location_ - -4. Import all required GPG Keys into a convenient location (like `/etc/gpg`) using <code>gpg --homedir <i>DIR</i> import</code> and specify it at `config.sops.gnupg.home` (Required for decryption of `secrets` on boot, can also be on an external drive) - -5. Make new `secrets` and `passwords` in the desired directories by appending the paths to `secrets.yaml` and then using the following command (The [`nixos`](./scripts/README.md) script can be used to simplify the process): - _Replace_ **_PATH_** _with the path to the `secret`_ - <pre><code>sops --config <i>/path/to/<b>secrets.yaml</b></i> -i <b><i>PATH</i></b></code></pre> - -6. Add device-specific configuration by creating a new file in [`devices`](./devices). Do keep in mind that the filesystems must be appropriately created and labeled as defined [here](./modules/hardware/filesystem.nix). - -7. Finally, run `nixos-rebuild switch --flake /etc/nixos#HOSTNAME` (as `root`) to switch to the configuration! - -</details> - -<details> -<summary><b>Minimal Configuration</b></summary> - -The `lib.build.device` function can be used to generate the full configuration minimally -Read [this](./devices/README.md) for definition information - -Example `flake.nix`: - -```nix -{ - description = "Minimal NixOS Configuration"; - - ## System Repositories ## - inputs = { - ## Package Repositories ## - # NixOS Package Repository - nixpkgs.follows = "dotfiles/nixpkgs"; - - ## Configuration Modules ## - # My PC Dotfiles - dotfiles.url = "github:maydayv7/dotfiles"; - }; - - ## System Configuration ## - outputs = inputs: let - lib = with inputs; nixpkgs.lib // dotfiles.lib; - in { - nixosConfigurations.host = lib.build.device { - name = "HOST_NAME"; - system = "x86_64-linux"; - - imports = [ - # Generate using 'nixos-generate-config' - ./hardware-configuration.nix - - # Passwords - { - users.extraUsers = { - root.hashedPassword = "HASHED_PASSWORD"; - recovery.initialHashedPassword = "HASHED_PASSWORD"; - }; - } - ]; - - timezone = "Continent/City"; - locale = "US"; - - kernel = "lts"; - kernelModules = ["nvme"]; - - gui = {}; - hardware = { - boot = "efi"; - cores = 4; - fs.scheme = "simple"; - modules = [ /* Imported from 'nixos-hardware' */]; - }; - - # Default User - user = { - name = "nixos"; - description = "Default User"; - minimal = true; - password = "HASHED_PASSWORD"; # Generate using 'mkpasswd -m sha-512' - }; - }; - }; -} -``` - -</details> - -<details> -<summary><b>From Scratch</b></summary> - -> [!IMPORTANT] -> These instructions are mainly intended for personal use - -To download the Install Media, click on the latest successsful run listed [here](../../actions/workflows/install.yml) and download the image artifact. Burn it to a USB using a flashing utility such as [Etcher](https://www.balena.io/etcher/) - -> [!TIP] -> In order to directly use the configuration, you must first create a clone of this repository and follow steps 2 to 6 from the first section, and preferably create your own install media - -<details> -<summary><i>Build</i></summary> -If Nix is already installed on your system, you may run the following command to build the Install Media image: - -<pre><code>nix build github:maydayv7/dotfiles#nixosConfigurations.install.config.system.build.images.iso</code></pre> - -To build and run the `install` script, use the following commands: - -``` -nix build github:maydayv7/dotfiles#install -sudo ./result/bin/os-install -``` - -If you want to create an `.iso` image of the entire system, run the following command: -_Replace_ **_DEVICE_** _with the name of Device to build_ - -<pre><code>nix build github:maydayv7/dotfiles#nixosConfigurations.<b><i>DEVICE</i></b>.config.system.build.images.iso</code></pre> - -</details> - -#### Partition Scheme - -_The `install` script handles partition creation and labeling, so it is recommended to create only the partition table and ensure sufficient free space_ - -| Name | Label | Format | Size (minimum) | -| :------------- | :----: | :----: | :------------: | -| BOOT Partition | ESP | vfat | 500M | -| ROOT Partition | System | ZFS | 25G | -| SWAP Area | swap | swap | 4G | -| DATA Partition | Files | ZFS | 10G | - -> [!NOTE] -> For the `advanced` filesystem scheme only - -#### Procedure - -To install the OS, just boot the Live USB and run `sudo os-install` -_If the image doesn't boot, try disabling the `secure boot` and `RAID` options from `BIOS`_ -After the reboot, run `nixos setup` to finish the install -_In case you are using the `advanced` filesystem scheme, you may need to set the boot flag `zfs_force=1` on first boot_ - -</details> - -<details> -<summary><b>Build It Yourself</b></summary> - -If you really want to get dirty with Nix and decide to invest oodles of your time into building your own configuration, this repository can be used as inspiration. -Follow along with my [NixOS Desktop](https://maydayv7.cc/series/nixos-desktop/) Series - -**Welcome** to the Nix Community! ;) - -</details> - -## Notes - -### Caution - -This repository contains my personal configuration, and may cause undesirable effects on other systems. -It may also be subject to rapid undocumented changes, and uses Nix [Flakes](https://wiki.nixos.org/wiki/Flakes), an experimental feature. - -> [!NOTE] -> Required Nix Version >= 2.19 - -It is not recommended to use NixOS if you are a beginner just starting out, without acquaintance with either the command-line or functional programming languages, since the learning curve is steep, debugging issues is difficult, documentation is shallow, and the effort required/time spent isn't worth the hassle for a novice/casual user. - -### Platform - -_May change according to available hardware_ - -This configuration works well with an Intel CPU + iGPU, and is currently being improved to support an AMD APU + Nvidia GPU. Any other setup is untested. -The `hardware.modules` option can be used to load relevant configuration from [`nixos-hardware`](https://github.com/nixos/nixos-hardware). - -See [this](./modules/hardware/README.md) for additional information - -### Cache - -The system build cache is publicly hosted using [Cachix](https://www.cachix.org) at [maydayv7-dotfiles](https://app.cachix.org/cache/maydayv7-dotfiles), and can be used while building the system to prevent rebuilding from scratch - -### Continuous Integration - -This repository makes use of [`GitHub Actions`](./checks/github/workflows) in order to automatically check the configuration syntax on every commit and format it (using [`treefmt-nix`](https://github.com/numtide/treefmt-nix)), update the `inputs` and build the Install Media `.iso` every month, and upload the build cache to [Cachix](https://app.cachix.org/cache/maydayv7-dotfiles) (You can also find `GitLab CI/CD` configuration [here](./checks/gitlab/.gitlab-ci.yml)). -A `git` [hook](./files/git/hooks) is used to check the commit message to adhere to the [`Conventional Commits`](https://www.conventionalcommits.org) specification - -##### Variables - -- [`ACCESS_TOKEN`](./secrets/github-token.secret): Personal Access Token - (To create one - [GitHub](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token), [GitLab](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html)) -- [`CACHIX_TOKEN`](./secrets/cachix-token.secret): Cachix Authentication Token - -### Home Manager - -The [`home-manager`](https://github.com/nix-community/home-manager) module is used in tandem with the system configuration in order to define user-specific configuration. -The `config.user.homeConfig` option, from which the final user configuration is built, has been declared in [`modules/user/default.nix`](./modules/user/default.nix) in order to effortlessly configure shared configuration for all users of the system. -The system `config` can be accessed using the `sys` parameter in `home-manager` modules - ---- - -<details> -<summary><b>Known Limitations</b></summary> - -- Home Configuration isn't decoupled from System - -### Manual Intervention - -- [Wine](./packages/wine) Applications have to be manually updated -- Minecraft [Server](./modules/apps/games/mc-server.nix) has to be manually updated -- Logseq Plugins have to be manually installed -- Cannot automatically hibernate on NVIDIA due to upstream [issue](https://forums.developer.nvidia.com/t/systemds-suspend-then-hibernate-not-working-in-nvidia-optimus-laptop/213690) - -### To Do - -- Remove `pkgs.custom.copyous` after [merge](https://github.com/NixOS/nixpkgs/pull/469919) -- Update Niri Configuration after [merge](https://github.com/sodiboo/niri-flake/pull/1548) -- Remove `stremio.patch` after [merge](https://github.com/NixOS/nixpkgs/pull/468728) - -</details> - -> Last Updated: **February** 2026 - -If you like this project, consider leaving a [star](https://github.com/maydayv7/dotfiles) diff --git a/nixos/checks/flake.nix b/nixos/checks/flake.nix @@ -1,42 +0,0 @@ -{ - config, - inputs, - ... -}: -{ - ## Configuration Checks ## - imports = [ inputs.formatter.flakeModule ]; - - perSystem = - { system, ... }: - { - ## Code Formatter - treefmt.config = { - projectRootFile = "flake.nix"; - settings.global.excludes = [ - "_*" - "result/**" - "flake.lock" - ]; - - programs = { - nixfmt.enable = true; - statix.enable = true; - shellcheck.enable = false; - stylua.enable = true; - deadnix = { - enable = true; - no-lambda-arg = true; - }; - - prettier = { - enable = true; - settings.bracketSameLine = true; - }; - }; - }; - - # Formatting Shell - devShells.format = config.allSystems."${system}".treefmt.build.devShell; - }; -} diff --git a/nixos/checks/github/ISSUE_TEMPLATE/bug-report.md b/nixos/checks/github/ISSUE_TEMPLATE/bug-report.md @@ -1,40 +0,0 @@ ---- -name: Bug Report -about: Create a report to help improve the configuration -title: "" -labels: bug -assignees: maydayv7 ---- - -### Describe the bug - -A clear and concise description of what the bug is - -### Steps To Reproduce - -Steps to reproduce the behavior: - -1. ... -2. ... -3. ... - -### Expected behavior - -A clear and concise description of what you expected to happen - -### Screenshots - -If applicable, add screenshots to help explain your problem - -### Additional context - -Add any other context about the problem - -### Metadata - -Please run `nix shell nixpkgs#nix-info --command sh -c "nix-info -m"` and paste the result - -```console -[user@system:~]$ nix shell nixpkgs#nix-info --command sh -c "nix-info -m" -output here -``` diff --git a/nixos/checks/github/ISSUE_TEMPLATE/feature-request.md b/nixos/checks/github/ISSUE_TEMPLATE/feature-request.md @@ -1,19 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: "" -labels: enhancement -assignees: maydayv7 ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is - -**Describe the solution you'd like** -A clear and concise description of what you want to happen - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered, if applicable - -**Additional context** -Add any other context or screenshots diff --git a/nixos/checks/github/ISSUE_TEMPLATE/help-request.md b/nixos/checks/github/ISSUE_TEMPLATE/help-request.md @@ -1,32 +0,0 @@ ---- -name: Help Request -about: Request for help or clarification on anything related to this project -title: "" -labels: help wanted, question -assignees: maydayv7 ---- - -### Description - -A clear and concise description of what problem you're facing or any area where clarification is required - -### Expected behavior - -A clear and concise description of what you expect to happen - -### Screenshots - -If applicable, add screenshots to help explain your problem - -### Additional context - -Add any other context about the problem - -### Metadata - -Please run `nix shell nixpkgs#nix-info --command sh -c "nix-info -m"` and paste the result. - -```console -[user@system:~]$ nix shell nixpkgs#nix-info --command sh -c "nix-info -m" -output here -``` diff --git a/nixos/checks/github/workflows/build.yml b/nixos/checks/github/workflows/build.yml @@ -1,54 +0,0 @@ -name: "ci: Build `nixosConfigurations`" -on: - workflow_dispatch: - workflow_call: - push: - tags: - - "*" - paths: - - "**.lock" - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - paths: - - "**.lock" - - "**.nix" -env: - NIX_SHOW_STATS: 1 -jobs: - build: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - strategy: - max-parallel: 1 - fail-fast: false - matrix: - device: [valkyrie, vortex, futura] - steps: - - name: Maximize Build Space - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - name: Clone Repo - uses: actions/checkout@v6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 - - name: Install Nix - uses: cachix/install-nix-action@v31 - with: - extra_nix_config: | - experimental-features = nix-command flakes - accept-flake-config = true - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - name: Setup Cachix - uses: cachix/cachix-action@v16 - with: - name: maydayv7-dotfiles - authToken: "${{ secrets.CACHIX_TOKEN }}" - - name: Build Configuration - run: | - export LC_ALL=C.UTF-8 - ulimit -n 2048 - nix build .#nixosConfigurations.${{ matrix.device }}.config.system.build.toplevel -L --show-trace diff --git a/nixos/checks/github/workflows/check.yml b/nixos/checks/github/workflows/check.yml @@ -1,33 +0,0 @@ -name: "ci: Check Syntax" -on: - workflow_dispatch: - push: - paths: - - "**.lock" - - "**.nix" -env: - NIX_SHOW_STATS: 1 -jobs: - check: - runs-on: ubuntu-latest - steps: - - name: Maximize Build Space - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - name: Clone Repo - uses: actions/checkout@v6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 - - name: Install Nix - uses: cachix/install-nix-action@v31 - with: - extra_nix_config: | - experimental-features = nix-command flakes - accept-flake-config = true - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - name: Check Syntax - run: nix flake check . --keep-going diff --git a/nixos/checks/github/workflows/shell.yml b/nixos/checks/github/workflows/shell.yml @@ -1,33 +0,0 @@ -name: "ci: Check `devShells`" -on: - push: - paths: - - "shells/**" -env: - NIX_SHOW_STATS: 1 -jobs: - shell: - runs-on: ubuntu-latest - strategy: - matrix: - shell: [android, cc, java, js, lua, python, rust, sql, video, website] - steps: - - name: Clone Repo - uses: actions/checkout@v6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 - - name: Install Nix - uses: cachix/install-nix-action@v31 - with: - extra_nix_config: | - experimental-features = nix-command flakes - accept-flake-config = true - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - name: Setup Cachix - uses: cachix/cachix-action@v16 - with: - name: maydayv7-dotfiles - authToken: "${{ secrets.CACHIX_TOKEN }}" - - name: Check Shells - run: nix develop .#${{ matrix.shell }} diff --git a/nixos/checks/github/workflows/update.yml b/nixos/checks/github/workflows/update.yml @@ -1,60 +0,0 @@ -name: "chore: Automatic Scheduled Updates" -on: - workflow_dispatch: - schedule: - - cron: "0 0 1 * *" -env: - NIX_SHOW_STATS: 1 -jobs: - update: - runs-on: ubuntu-latest - steps: - - name: Clone Repo - uses: actions/checkout@v6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 - - name: Install Nix - uses: cachix/install-nix-action@v31 - with: - nix_path: nixpkgs=channel:nixos-unstable - extra_nix_config: | - experimental-features = nix-command flakes - accept-flake-config = true - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - name: Update Flake Lock File - uses: DeterminateSystems/update-flake-lock@v28 - with: - branch: update_flake - pr-labels: dependencies - pr-title: > - chore(flake): Update `inputs` - - name: Update Packages - env: - GIT_AUTHOR_NAME: github-actions[bot] - GIT_AUTHOR_EMAIL: <github-actions[bot]@users.noreply.github.com> - GIT_COMMITTER_NAME: github-actions[bot] - GIT_COMMITTER_EMAIL: <github-actions[bot]@users.noreply.github.com> - run: | - git checkout stable - cd packages && ./update.sh - - name: Create PR - uses: peter-evans/create-pull-request@v8 - with: - branch: update_packages - delete-branch: true - title: > - chore(packages): Automatic Updates - labels: dependencies - body: | - Automated package updates using `packages/update.sh`. - ### Running GitHub Actions on this PR - GitHub Actions will not run workflows on pull requests which are opened by a GitHub Action. - To run GitHub Actions workflows on this PR, run: - ```sh - git branch -D update_packages - git fetch origin - git checkout update_packages - git commit --amend --no-edit - git push origin update_packages --force - ``` diff --git a/nixos/checks/gitlab/.gitlab-ci.yml b/nixos/checks/gitlab/.gitlab-ci.yml @@ -1,16 +0,0 @@ -# Default Image for latest Nix -default: - image: nixpkgs/cachix-flakes:latest - -# CI Variables -variables: - PACKAGE_REGISTRY: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic" - -# CI Job Priority -stages: - - check - - build - - publish - -# CI Imports -include: "checks/gitlab/pipelines/*.yml" diff --git a/nixos/checks/gitlab/.gitlab-webide.yml b/nixos/checks/gitlab/.gitlab-webide.yml @@ -1,4 +0,0 @@ -terminal: - image: nixpkgs/cachix-flakes:latest - before_script: - - nix develop diff --git a/nixos/checks/gitlab/issue_templates/Bug.md b/nixos/checks/gitlab/issue_templates/Bug.md @@ -1,32 +0,0 @@ -### Describe the bug - -A clear and concise description of what the bug is - -### Steps To Reproduce - -Steps to reproduce the behavior: - -1. ... -2. ... -3. ... - -### Expected behavior - -A clear and concise description of what you expected to happen - -### Screenshots - -If applicable, add screenshots to help explain your problem - -### Additional context - -Add any other context about the problem - -### Metadata - -Please run `nix shell nixpkgs#nix-info --command sh -c "nix-info -m"` and paste the result - -```console -[user@system:~]$ nix shell nixpkgs#nix-info --command sh -c "nix-info -m" -output here -``` diff --git a/nixos/checks/gitlab/issue_templates/Feature.md b/nixos/checks/gitlab/issue_templates/Feature.md @@ -1,11 +0,0 @@ -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is - -**Describe the solution you'd like** -A clear and concise description of what you want to happen - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered, if applicable - -**Additional context** -Add any other context or screenshots diff --git a/nixos/checks/gitlab/issue_templates/Help.md b/nixos/checks/gitlab/issue_templates/Help.md @@ -1,24 +0,0 @@ -### Description - -A clear and concise description of what problem you're facing or any area where clarification is required - -### Expected behavior - -A clear and concise description of what you expect to happen - -### Screenshots - -If applicable, add screenshots to help explain your problem - -### Additional context - -Add any other context about the problem - -### Metadata - -Please run `nix shell nixpkgs#nix-info --command sh -c "nix-info -m"` and paste the result. - -```console -[user@system:~]$ nix shell nixpkgs#nix-info --command sh -c "nix-info -m" -output here -``` diff --git a/nixos/checks/gitlab/pipelines/build.yml b/nixos/checks/gitlab/pipelines/build.yml @@ -1,27 +0,0 @@ -# Build Device Configuration -device: - stage: build - only: - - tags - except: - - /^(?!stable).+@/ - allow_failure: true - variables: - CACHIX_AUTH_TOKEN: $CACHIX_TOKEN - CACHIX_CACHE_NAME: maydayv7-dotfiles - parallel: - matrix: - - DEVICE: [valkyrie, vortex, futura] - script: cachix watch-exec $CACHIX_CACHE_NAME nix build .#nixosConfigurations.$DEVICE.config.system.build.toplevel -- -L --show-trace - -# Build and Upload Install Media Image -iso: - stage: build - only: - - tags - except: - - /^(?!stable).+@/ - script: nix build .#nixosConfigurations.install.config.system.build.images.iso -L --show-trace - after_script: - - nix profile install .#curl - - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./result/iso/install.iso ${PACKAGE_REGISTRY}/installMedia/${CI_COMMIT_TAG}/NixOS.iso' diff --git a/nixos/checks/gitlab/pipelines/check.yml b/nixos/checks/gitlab/pipelines/check.yml @@ -1,11 +0,0 @@ -# Check Nix Syntax -check: - stage: check - only: - changes: - - "*.nix" - - "**/*.nix" - except: - - tags - - schedules - script: nix flake check --keep-going diff --git a/nixos/checks/gitlab/pipelines/release.yml b/nixos/checks/gitlab/pipelines/release.yml @@ -1,20 +0,0 @@ -# Release Install Media Image -release: - stage: publish - image: registry.gitlab.com/gitlab-org/release-cli:latest - only: - - tags - except: - - /^(?!stable).+@/ - needs: - - job: iso - script: echo "Creating Release..." - release: - name: $CI_COMMIT_TAG - description: "Draft Release" - tag_name: $CI_COMMIT_TAG - ref: $CI_COMMIT_SHA - assets: - links: - - name: NixOS.iso - url: "${PACKAGE_REGISTRY}/installMedia/${CI_COMMIT_TAG}/NixOS.iso" diff --git a/nixos/checks/gitlab/pipelines/shell.yml b/nixos/checks/gitlab/pipelines/shell.yml @@ -1,18 +0,0 @@ -# Check Nix Developer Shells -shell: - stage: check - only: - changes: - - "shells/*" - except: - - tags - - schedules - allow_failure: true - variables: - CACHIX_AUTH_TOKEN: $CACHIX_TOKEN - CACHIX_CACHE_NAME: maydayv7-dotfiles - parallel: - matrix: - - DEVSHELL: - [android, cc, java, js, lua, python, rust, sql, video, website] - script: cachix watch-exec $CACHIX_CACHE_NAME nix develop .#$DEVSHELL diff --git a/nixos/checks/gitlab/pipelines/update.yml b/nixos/checks/gitlab/pipelines/update.yml @@ -1,18 +0,0 @@ -# Automatic Scheduled Updates -update: - stage: publish - only: - - schedules - except: - - /^(?!stable).+@/ - before_script: - - export GIT_SSL_CAINFO="$CI_SERVER_TLS_CA_FILE" - - git config --global user.email "${GITLAB_USER_EMAIL}" - - git config --global user.name "${GITLAB_USER_NAME}" - - git branch update-$CI_JOB_ID - - git checkout update-$CI_JOB_ID - script: - - nix flake update --commit-lock-file - - cd packages && ./update.sh - after_script: - - git push "https://${CI_PROJECT_NAMESPACE}:${ACCESS_TOKEN}@gitlab.com/${CI_PROJECT_PATH}.git" HEAD:update-$CI_JOB_ID -o merge_request.create -o merge_request.target=stable -o merge_request.remove_source_branch diff --git a/nixos/devices/README.md b/nixos/devices/README.md @@ -1,20 +0,0 @@ -### Devices - -The `devices` directory contains the core definitions for multiple PCs and various other devices. -To add a device, create a configuration file matching the device's `hostname`. -Define the configuration using options from the [`modules`](../modules/README.md) directory, or add your own modules using the `imports` keyword. -Optionally, add user-specific configuration in [`users`](../users/README.md). -Then, run the command `nixos-rebuild switch --flake .#HOSTNAME` and let Nix do all the work for you! - -#### Additional Options - -These are the options that can be used in addition to the ones exposed by the [`modules`](../modules/README.md): - -- `imports`: Additional Configuration Files to import - Ex. `[ ./hardware-configuration.nix ]` -- `description`: System Description (to add to `config.system.name`) -- `timezone`: System Time Zone - Ex. `"Asia/Kolkata"` -- `locale`: Default Locale - Ex. `"IN"` -- `kernel`: Linux Kernel to use (from `pkgs.linuxKernel.packages.linux_${kernel}`) - Ex. `zfs` -- `kernelModules`: Additional Kernel Modules (added to `config.boot.initrd.availableKernelModules`) - Ex. `[ "nvme" ]` -- `user` or `users` (--> `config.user.settings`): Used to specify Device User/Multiple Users per Device - Ex. `users = [ { name "1"; } { name = "2"; } ]` -- `update`: Enable Automatic System Upgrades - Ex. `weekly` diff --git a/nixos/devices/flake.nix b/nixos/devices/flake.nix @@ -1,8 +0,0 @@ -{ util, ... }: -let - inherit (util) build map; -in -{ - ## Device Configuration ## - flake.nixosConfigurations = map.modules ./. (name: build.device (import name)); -} diff --git a/nixos/devices/futura.nix b/nixos/devices/futura.nix @@ -1,40 +0,0 @@ -{ - system = "x86_64-linux"; - name = "futura"; - description = "PC - Dell Inspiron 11 3000"; - - timezone = "Asia/Kolkata"; - locale = "IN"; - update = "weekly"; - - kernel = "lts"; - hardware = { - boot = "efi"; - fs.scheme = "simple"; - cpu = { - model = "intel"; - cores = 4; - }; - - support = [ "laptop" ]; - modules = [ - "common-pc" - "common-pc-laptop" - "common-cpu-intel" - ]; - }; - - gui.desktop = "pantheon"; - apps.list = [ - "firefox" - "office" - ]; - - # User Navya - user = { - name = "navya"; - groups = [ "wheel" ]; - description = "Navya"; - shell = "zsh"; - }; -} diff --git a/nixos/devices/install/default.nix b/nixos/devices/install/default.nix @@ -1,17 +0,0 @@ -{ - description = "Install Media"; - imports = [ ./image.nix ]; - - timezone = "Asia/Kolkata"; - locale = "IN"; - - kernel = "lts"; - gui.desktop = "install"; - user = { - name = "nixos"; - description = "Default User"; - minimal = true; - shells = null; - password = builtins.readFile ../../users/passwords/default; - }; -} diff --git a/nixos/devices/install/image.nix b/nixos/devices/install/image.nix @@ -1,13 +0,0 @@ -{ lib, pkgs, ... }: -{ - fileSystems."/".fsType = "tmpfs"; - environment.systemPackages = [ pkgs.custom.install ]; - image.modules.iso = { - image.baseName = lib.mkForce "install"; - system.switch.enable = false; - }; - - # Disabled Modules - user.homeConfig = lib.mkForce { }; - sops.secrets = lib.mkForce { }; -} diff --git a/nixos/devices/valkyrie/default.nix b/nixos/devices/valkyrie/default.nix @@ -1,107 +0,0 @@ -{ - system = "x86_64-linux"; - name = "valkyrie"; - description = "PC - ASUS ROG Zephyrus G14"; - - timezone = "Asia/Kolkata"; - locale = "IN"; - - kernel = "xanmod"; - kernelModules = [ - "nvme" - "thunderbolt" - ]; - - imports = [ - ./settings - ./minecraft.nix - ]; - - hardware = { - boot = "secure"; - fs.scheme = "advanced"; - modules = [ "asus-zephyrus-ga402x-nvidia" ]; - cpu = { - model = "amd"; - cores = 8; - mode = "performance"; - }; - - gpu = { - enable = true; - model = "nvidia"; - }; - - support = [ - "laptop" - "mobile" - "printer" - "virtualisation" - ]; - - vm = { - android.enable = false; - vfio = "setup"; - passthrough = [ - "10de:28e0" - "10de:22be" - ]; - }; - }; - - apps = { - wine.utilities = true; - list = [ - "discord" - "firefox" - "flatpak" - "games" - "git" - "internet" - "latex" - "notes" - "office" - "stream" - "tools" - "vscode" - "youtube" - ]; - games = [ - "minecraft" - "osu" - "roblox" - ]; - }; - - shell = { - prompt = true; - utilities = true; - }; - - nix = { - index = true; - tools = true; - }; - - gui = { - desktop = "hyprland"; - display = "eDP-1"; - wallpaper = "Quasar"; - fancy = true; - }; - - # User V7 - user = { - name = "v7"; - description = "V 7"; - uid = 1000; - shell = "zsh"; - shells = [ "bash" ]; - groups = [ - "wheel" - "keys" - "systemd-journal" - "minecraft" - ]; - }; -} diff --git a/nixos/devices/valkyrie/minecraft.nix b/nixos/devices/valkyrie/minecraft.nix @@ -1,48 +0,0 @@ -{ config, ... }: -{ - ## Minecraft Server - specialisation.minecraft.configuration = { - system.nixos.label = "special.minecraft"; - apps = { - games = [ "mc-server" ]; - mc-servers = - let - shared = { - gamemode = "survival"; - difficulty = "normal"; - online-mode = false; - server-ip = "0.0.0.0"; - spawn-protection = 0; - }; - in - [ - { - type = "fabric"; - memory = 16; - port = 25565; - vc-port = 24454; - config = shared // { - motd = "My World"; - }; - } - { - type = "skyblock"; - memory = 10; - port = 25567; - config = shared // { - motd = "Modded Skyblock"; - allow-flight = true; - }; - } - ]; - }; - - # VPN Tunnel - environment.persist.directories = [ "/var/lib/tailscale" ]; - services.tailscale = { - enable = true; - openFirewall = true; - authKeyFile = config.sops.secrets."tailscale.secret".path; - }; - }; -} diff --git a/nixos/devices/valkyrie/settings/asusd.ron b/nixos/devices/valkyrie/settings/asusd.ron @@ -1,15 +0,0 @@ -( - boot_sound: false, - change_throttle_policy_on_ac: true, - change_throttle_policy_on_battery: true, - charge_control_end_threshold: 95, - disable_nvidia_powerd_on_battery: true, - mini_led_mode: false, - panel_od: false, - throttle_balanced_epp: BalancePower, - throttle_performance_epp: Performance, - throttle_policy_linked_epp: true, - throttle_policy_on_ac: Performance, - throttle_policy_on_battery: Quiet, - throttle_quiet_epp: Power, -) -\ No newline at end of file diff --git a/nixos/devices/valkyrie/settings/aura.ron b/nixos/devices/valkyrie/settings/aura.ron @@ -1,99 +0,0 @@ -( - config_name: "Keyboard Aura", - brightness: Med, - current_mode: Static, - builtins: { - Static: ( - mode: Static, - zone: None, - colour1: ( - r: 255, - g: 255, - b: 255, - ), - colour2: ( - r: 0, - g: 0, - b: 0, - ), - speed: Med, - direction: Right, - ), - Breathe: ( - mode: Breathe, - zone: None, - colour1: ( - r: 255, - g: 255, - b: 255, - ), - colour2: ( - r: 0, - g: 0, - b: 0, - ), - speed: Med, - direction: Right, - ), - RainbowCycle: ( - mode: RainbowCycle, - zone: None, - colour1: ( - r: 255, - g: 255, - b: 255, - ), - colour2: ( - r: 0, - g: 0, - b: 0, - ), - speed: Med, - direction: Right, - ), - RainbowWave: ( - mode: RainbowWave, - zone: None, - colour1: ( - r: 255, - g: 255, - b: 255, - ), - colour2: ( - r: 0, - g: 0, - b: 0, - ), - speed: Med, - direction: Right, - ), - Pulse: ( - mode: Pulse, - zone: None, - colour1: ( - r: 255, - g: 255, - b: 255, - ), - colour2: ( - r: 0, - g: 0, - b: 0, - ), - speed: Med, - direction: Right, - ), - }, - multizone_on: false, - enabled: ( - states: [ - ( - zone: Keyboard, - boot: true, - awake: true, - sleep: false, - shutdown: false, - ), - ], - ), -) diff --git a/nixos/devices/valkyrie/settings/default.nix b/nixos/devices/valkyrie/settings/default.nix @@ -1,32 +0,0 @@ -{ - config, - lib, - ... -}: -{ - imports = [ ./network.nix ]; - - # ! # https://gitlab.freedesktop.org/drm/amd/-/issues/3388 - boot.kernelParams = lib.mkIf (config.hardware.cpu.mode == "performance") [ - "amdgpu.dcdebugmask=0x10" - ]; - - services = { - fwupd.enable = true; - - # Remap Keys - udev.extraHwdb = '' - evdev:name:Asus Keyboard:* - KEYBOARD_KEY_7003f=print # F6 -> PrtSc Key - ''; - }; - - # ASUS Software - user.homeConfig.imports = [ ./home.nix ]; - services.asusd = { - enable = true; - enableUserService = true; - asusdConfig.text = builtins.readFile ./asusd.ron; - auraConfigs."19b6".text = builtins.readFile ./aura.ron; - }; -} diff --git a/nixos/devices/valkyrie/settings/home.nix b/nixos/devices/valkyrie/settings/home.nix @@ -1,62 +0,0 @@ -{ - sys, - config, - lib, - ... -}: -let - inherit (lib) hasPrefix mkIf mkMerge; - desktop = name: hasPrefix name sys.gui.desktop; - control = { - keyboard = "asusctl aura -n"; - profile = "asusctl profile -n"; - }; -in -mkMerge [ - { - # ROG Control Center - home.persist.directories = [ ".config/rog" ]; - } - - # Keybinds - (mkIf (desktop "hyprland") { - wayland.windowManager.hyprland.settings.bindl = [ - ", XF86Launch3, exec, ${control.keyboard}" - ", XF86Launch4, exec, ${control.profile}" - ]; - }) - - (mkIf (desktop "niri") { - programs.niri.settings.binds = - let - run = command: config.lib.niri.actions.spawn "sh" "-c" command; - in - { - "XF86Launch3".action = run control.keyboard; - "XF86Launch4".action = run control.profile; - }; - }) - - (mkIf (desktop "gnome") { - dconf.settings = { - "org/gnome/settings-daemon/plugins/media-keys" = { - custom-keybindings = [ - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/" - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/" - ]; - }; - - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3" = { - binding = "Launch3"; - command = control.keyboard; - name = "Keyboard Mode"; - }; - - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4" = { - binding = "Launch4"; - command = control.profile; - name = "Platform Profile"; - }; - }; - }) -] diff --git a/nixos/devices/valkyrie/settings/network.nix b/nixos/devices/valkyrie/settings/network.nix @@ -1,18 +0,0 @@ -{ config, ... }: -{ - ## VPN - # ? # Run 'warp-cli registration new' for initial setup - services.cloudflare-warp = { - enable = true; - openFirewall = true; - }; - - environment.persist.directories = [ config.services.cloudflare-warp.rootDir ]; - user.homeConfig.home.persist.directories = [ ".local/share/cloudflare-warp-gui" ]; - - # Development - networking.firewall = { - allowedUDPPorts = [ 7777 ]; - allowedTCPPorts = [ 7777 ]; - }; -} diff --git a/nixos/devices/vortex.nix b/nixos/devices/vortex.nix @@ -1,74 +0,0 @@ -{ - system = "x86_64-linux"; - name = "vortex"; - description = "PC - Dell Inspiron 15 5000"; - - timezone = "Asia/Kolkata"; - locale = "IN"; - - kernel = "xanmod"; - kernelModules = [ - "nvme" - "thunderbolt" - ]; - - imports = [ { services.fwupd.enable = true; } ]; - hardware = { - boot = "secure"; - fs.scheme = "advanced"; - modules = [ "dell-inspiron-5509" ]; - cpu = { - model = "intel"; - cores = 8; - }; - - support = [ - "laptop" - "mobile" - "printer" - "virtualisation" - ]; - }; - - apps = { - wine.utilities = true; - list = [ - "discord" - "firefox" - "git" - "internet" - "office" - "vscode" - "wine" - ]; - }; - - shell = { - prompt = true; - utilities = true; - }; - - nix = { - index = true; - tools = true; - }; - - gui = { - desktop = "hyprland"; - display = "eDP-1"; - wallpaper = "Thread"; - fancy = true; - }; - - # User V7 - user = { - name = "v7"; - description = "V 7"; - shell = "zsh"; - shells = [ "bash" ]; - groups = [ - "wheel" - "keys" - ]; - }; -} diff --git a/nixos/files/README.md b/nixos/files/README.md @@ -1,6 +0,0 @@ -### Dotfiles - -The `files` directory is used to store all my plain-text program configuration files -_(or as we all love to call it, the `dotfiles`)_ - -Read [`flake.nix`](./flake.nix) to understand how they are used diff --git a/nixos/files/ascii/groot b/nixos/files/ascii/groot @@ -1,10 +0,0 @@ -  \^V// -  |. .|  I AM (G)ROOT! - - \ - / _ -  \_| |_/ -  \ \ -  __/_/__ - |_______|  With Great Power Comes Great Responsibility -  \ /  Use it Wisely -  \___/ - diff --git a/nixos/files/ascii/lol b/nixos/files/ascii/lol @@ -1,6 +0,0 @@ -██╗░░░░░░█████╗░██╗░░░░░ -██║░░░░░██╔══██╗██║░░░░░ -██║░░░░░██║░░██║██║░░░░░ -██║░░░░░██║░░██║██║░░░░░ -███████╗╚█████╔╝███████╗ -╚══════╝░╚════╝░╚══════╝ -\ No newline at end of file diff --git a/nixos/files/ascii/pacman b/nixos/files/ascii/pacman @@ -1,11 +0,0 @@ -================================================. - .-. .-. .--. | - | OO| | OO| / _.-' .-. .-. .-. .''. | - | | | | \ '-. '-' '-' '-' '..' | - '^^^' '^^^' '--' | -===============. .-. .================. .-. | - | | | | | '-' | - | | | | | | - | ':-:' | | .-. | - | '-' | | '-' | -===============' '================' | -\ No newline at end of file diff --git a/nixos/files/ascii/tux b/nixos/files/ascii/tux @@ -1,18 +0,0 @@ - .-"""-. - ' \ - |,. ,-. | - |()L( ()| | - |,' `".| | - |.___.',| ` - .j `--"' ` `. - / ' ' \ - / / ` `. - / / ` . - / / l | - . , | | - ,"`. .| | - _.' ``. | `..-'l -| `.`, | `. -| `. __.j ) -|__ |--""___| ,-' - `"--...,+"""" `._,.-' -\ No newline at end of file diff --git a/nixos/files/colors/README.md b/nixos/files/colors/README.md @@ -1,26 +0,0 @@ -### Base16 Color Schemes - -The color schemes are specified according to the following format - - -```yaml -scheme: Name -author: Maker -base00: Base -base01: Mantle -base02: Surface0 -base03: Surface1 -base04: Surface2 -base05: Text -base06: Rosewater -base07: Lavender -base08: Red -base09: Peach -base0A: Yellow -base0B: Green -base0C: Teal -base0D: Blue -base0E: Mauve -base0F: Flamingo -``` - -(_or other equivalent colors_) diff --git a/nixos/files/colors/adwaita.yaml b/nixos/files/colors/adwaita.yaml @@ -1,18 +0,0 @@ -scheme: "Adwaita" -author: "maydayv7" -base00: "#1c1c1f" -base01: "#222226" -base02: "#3d3846" -base03: "#5e5c64" -base04: "#c0bfbc" -base05: "#f6f5f4" -base06: "#cdab8f" -base07: "#62a0ea" -base08: "#ed333b" -base09: "#ffa348" -base0A: "#f5c211" -base0B: "#57e389" -base0C: "#0ab9dc" -base0D: "#1e78e4" -base0E: "#9841bb" -base0F: "#c061cb" diff --git a/nixos/files/colors/catppuccin.yaml b/nixos/files/colors/catppuccin.yaml @@ -1,18 +0,0 @@ -scheme: "Catppuccin Macchiato" -author: "Catppuccin" -base00: "#24273a" -base01: "#1e2030" -base02: "#363a4f" -base03: "#494d64" -base04: "#5b6078" -base05: "#cad3f5" -base06: "#f4dbd6" -base07: "#b7bdf8" -base08: "#ed8796" -base09: "#f5a97f" -base0A: "#eed49f" -base0B: "#a6da95" -base0C: "#8bd5ca" -base0D: "#8aadf4" -base0E: "#c6a0f6" -base0F: "#f0c6c6" diff --git a/nixos/files/colors/elementary.yaml b/nixos/files/colors/elementary.yaml @@ -1,18 +0,0 @@ -scheme: "Elementary OS" -author: "maydayv7" -base00: "#2d363a" -base01: "#073642" -base02: "#073642" -base03: "#94a3a5" -base04: "#94a3a5" -base05: "#c0bfbc" -base06: "#deddda" -base07: "#eeeeee" -base08: "#dc322f" -base09: "#cb4b16" -base0A: "#b58900" -base0B: "#859900" -base0C: "#2aa198" -base0D: "#268bd2" -base0E: "#d33682" -base0F: "#ec0048" diff --git a/nixos/files/fastfetch.jsonc b/nixos/files/fastfetch.jsonc @@ -1,160 +0,0 @@ -{ - "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", - "logo": { - "type": "auto", - "padding": { - "top": 6, - "left": 3 - }, - "color": { - "1": "blue", - "2": "white" - } - }, - "display": { - "separator": " : " - }, - "modules": [ - { - "type": "custom", - "format": "┌─⮞ {#1}Hardware{#}" - }, - { - "type": "host", - "key": " ", - "keyColor": "cyan" - }, - { - "type": "cpu", - "key": " ", - "keyColor": "cyan", - "showPeCoreCount": true - }, - { - "type": "gpu", - "key": " ", - "keyColor": "cyan", - "driverSpecific": true - }, - { - "type": "display", - "key": " 󰹑", - "keyColor": "cyan" - }, - { - "type": "memory", - "key": " ", - "keyColor": "green" - }, - { - "type": "disk", - "key": " ", - "keyColor": "green" - }, - { - "type": "custom", - "format": "└─" - }, - "break", - { - "type": "custom", - "format": "┌─⮞ {#1}Software{#}" - }, - { - "type": "os", - "key": " ", - "keyColor": "yellow" - }, - { - "type": "kernel", - "key": " ", - "keyColor": "yellow" - }, - { - "type": "bios", - "key": " ", - "keyColor": "yellow" - }, - { - "type": "packages", - "key": " 󰏖", - "keyColor": "yellow" - }, - { - "type": "shell", - "key": " ", - "keyColor": "blue" - }, - { - "type": "de", - "key": " ", - "keyColor": "blue" - }, - { - "type": "wm", - "key": " ", - "keyColor": "blue" - }, - { - "type": "lm", - "key": " ", - "keyColor": "blue" - }, - { - "type": "wmtheme", - "key": " 󰉼", - "keyColor": "blue" - }, - { - "type": "terminal", - "key": " ", - "keyColor": "blue" - }, - { - "type": "terminalfont", - "key": " ", - "keyColor": "light_red" - }, - { - "type": "theme", - "key": " 󰃣", - "keyColor": "light_red", - "format": "{2}" - }, - { - "type": "icons", - "key": " 󱢈", - "keyColor": "light_red" - }, - { - "type": "cursor", - "key": " ", - "keyColor": "light_red" - }, - { - "type": "custom", - "format": "└─" - }, - "break", - { - "type": "custom", - "format": "┌─⮞ {#1}Uptime{#}" - }, - { - "type": "command", - "key": " ", - "keyColor": "magenta", - "text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days" - }, - { - "type": "uptime", - "key": " ", - "keyColor": "magenta" - }, - { - "type": "custom", - "format": "└─" - }, - "break" - ] -} diff --git a/nixos/files/flake.nix b/nixos/files/flake.nix @@ -1,169 +0,0 @@ -{ - util, - inputs, - ... -}: -{ - ## Program Configuration and 'dotfiles' ## - flake.files = - let - inherit (util) build map; - inherit (builtins) fromJSON readFile; - in - rec { - # File Paths - path = { - toplevel = ./.; - - system = "/etc/nixos"; # Configuration Directory - persist = "/nix/state"; # Persisted Files - data = "/data"; # Data Directory - - gpg = "/etc/gpg"; # GPG Keys Directory - sops = ../secrets/secrets.yaml; # Encrypted Secrets - - cache = "maydayv7-dotfiles"; - flake = "github:maydayv7/dotfiles"; - repo = "https://github.com/maydayv7/dotfiles"; - }; - - # Interactive Nix Shell - # To explore syntax and configuration - repl = ./repl.nix; - - # ASCII Art - ascii = map.files { - directory = ./ascii; - extension = ""; - recursive = true; - }; - - # Directory Bookmarks - bookmarks = '' - file://${path.data}/files Files - file:/// Computer - ''; - - # Base16 Color Schemes - colors = map.files { - directory = ./colors; - extension = ".yaml"; - }; - - # Fastfetch - fetch = readFile ./fastfetch.jsonc; - - # Geany Text Editor - geany = map.files { - directory = ./geany; - apply = readFile; - extension = ".conf"; - }; - - # 'git' Version Control - git.hooks = ./git/hooks; - - # Gitea Code Hosting - gitea = map.files { - directory = ./gitea; - apply = readFile; - extension = ".css"; - }; - - # GNOME Desktop - gnome = map.files { - directory = ./gnome; - extension = ".json"; - }; - - # Hyprland WM - hyprland = { - # Custom Shaders - shaders = ./hyprland/shaders; - - # Pyprland - pypr = readFile ./hyprland/pypr.toml; - - # Hot Corners - waycorner = readFile ./hyprland/waycorner.toml; - - # Keybinds Viewer - kebihelp = readFile ./hyprland/kebihelp.json; - - # Greeter Configuration - greeter = readFile ./hyprland/greeter.conf; - } - // map.files { - directory = ./hyprland/theme; - apply = readFile; - extension = ".css"; - }; - - # Pictures - images = map.files { - directory = ./images; - extension = ".png"; - }; - - # Logseq Notes - logseq = { - settings = ./logseq/settings; - prefs = readFile ./logseq/preferences.json; - }; - - # Nano Text Editor - nano = readFile ./nanorc; - - # Niri WM - niri = { - rofi = readFile ./niri/rofi.rasi; - } - // map.files { - directory = ./niri/theme; - apply = readFile; - extension = ".css"; - }; - - # PcmanFM File Manager - pcmanfm = readFile ./pcmanfm.conf; - - # Custom Proprietary Files - proprietary = inputs.proprietary.files; - inherit (proprietary) wallpapers; - - # Bash Scripts - scripts = map.files { - directory = ../scripts; - apply = build.script; - extension = ".sh"; - }; - - # Display Temperature Control - sunsetr = ./sunsetr; - - # Notifications Daemon - swaync = readFile ./swaync.css; - - # Document Templates - templates = ./templates; - - # Terminal Multiplexer - tmux = readFile ./tmuxrc.tmux; - - # Visual Studio Code Editor - vscode = map.files { - directory = ./vscode; - apply = file: fromJSON (readFile file); - extension = ".json"; - }; - - # My Personal Website - website = ../site; - - # Logout Menu - wlogout = readFile ./wlogout.css; - - # YouTube - youtube = readFile ./ytmusic.json; - }; -} diff --git a/nixos/files/geany/keybindings.conf b/nixos/files/geany/keybindings.conf @@ -1,152 +0,0 @@ -[Bindings] -popup_gototagdefinition= -edit_transposeline=<Primary>t -edit_movelineup= -edit_movelinedown= -move_tableft=<Alt>Page_Up -move_tabright=<Alt>Page_Down -menu_new=<Primary>n -menu_open=<Primary>o -menu_open_selected=<Primary><Shift>o -menu_save=<Primary>s -menu_saveas= -menu_saveall=<Primary><Shift>s -file_properties=<Primary><Shift>v -menu_print=<Primary>p -menu_close=<Primary>w -menu_closeall=<Primary><Shift>w -menu_reloadfile=<Primary>r -menu_reloadall= -file_openlasttab= -menu_quit=<Primary>q -menu_undo=<Primary>z -menu_redo=<Primary>y -edit_duplicateline=<Primary>k -edit_deleteline=<Primary>d -edit_deletelinetoend=<Primary><Shift>Delete -edit_deletelinetobegin=<Primary><Shift>BackSpace -edit_scrolltoline=<Primary><Shift>l -edit_scrolllineup=<Alt>Up -edit_scrolllinedown=<Alt>Down -edit_completesnippet=Tab -move_snippetnextcursor= -edit_suppresssnippetcompletion= -popup_contextaction= -edit_autocomplete=<Primary>space -edit_calltip=<Primary><Shift>space -edit_wordpartcompletion=Tab -menu_cut=<Primary>x -menu_copy=<Primary>c -menu_paste=<Primary>v -edit_copyline=<Primary><Shift>c -edit_cutline=<Primary><Shift>x -menu_selectall=<Primary>a -edit_selectword=<Shift><Alt>w -edit_selectline=<Shift><Alt>l -edit_selectparagraph=<Shift><Alt>p -edit_selectwordpartleft= -edit_selectwordpartright= -edit_togglecase=<Primary><Alt>u -edit_commentlinetoggle=<Primary>e -edit_commentline= -edit_uncommentline= -edit_increaseindent=<Primary>i -edit_decreaseindent=<Primary>u -edit_increaseindentbyspace= -edit_decreaseindentbyspace= -edit_autoindent= -edit_sendtocmd1=<Primary>1 -edit_sendtocmd2=<Primary>2 -edit_sendtocmd3=<Primary>3 -edit_sendtocmd4= -edit_sendtocmd5= -edit_sendtocmd6= -edit_sendtocmd7= -edit_sendtocmd8= -edit_sendtocmd9= -edit_sendtovte= -format_reflowparagraph=<Primary>j -edit_joinlines= -menu_insert_date=<Shift><Alt>d -edit_insertwhitespace= -edit_insertlinebefore= -edit_insertlineafter= -menu_preferences=<Primary><Alt>p -menu_pluginpreferences= -menu_find=<Primary>f -menu_findnext=<Primary>g -menu_findprevious=<Primary><Shift>g -menu_findnextsel= -menu_findprevsel= -menu_replace=<Primary>h -menu_findinfiles=<Primary><Shift>f -menu_nextmessage= -menu_previousmessage= -popup_findusage=<Primary><Shift>e -popup_finddocumentusage=<Primary><Shift>d -find_markall=<Primary><Shift>m -nav_back=<Alt>Left -nav_forward=<Alt>Right -menu_gotoline=<Primary>l -edit_gotomatchingbrace=<Primary>b -edit_togglemarker=<Primary>m -edit_gotonextmarker=<Primary>period -edit_gotopreviousmarker=<Primary>comma -popup_gototagdeclaration=<Primary><Shift>t -edit_gotolinestart=Home -edit_gotolineend=End -edit_gotolinestartvisual=<Alt>Home -edit_gotolineendvisual=<Alt>End -edit_prevwordstart=<Primary>slash -edit_nextwordstart=<Primary>backslash -menu_toggleall= -menu_fullscreen=F11 -menu_messagewindow= -toggle_sidebar= -menu_zoomin=<Primary>plus -menu_zoomout=<Primary>minus -normal_size=<Primary>0 -menu_linewrap= -menu_linebreak= -menu_clone= -menu_strip_trailing_spaces= -menu_replacetabs= -menu_replacespaces= -menu_togglefold= -menu_foldall= -menu_unfoldall= -reloadtaglist=<Primary><Shift>r -remove_markers= -remove_error_indicators= -remove_markers_and_indicators= -project_new= -project_new_from_folder= -project_open= -project_properties= -project_close= -build_compile=F8 -build_link=F9 -build_make=<Shift>F9 -build_makeowntarget=<Primary><Shift>F9 -build_makeobject=<Shift>F8 -build_nexterror= -build_previouserror= -build_run=F5 -build_options= -menu_opencolorchooser= -menu_help=F1 -switch_editor=F2 -switch_search_bar=F7 -switch_message_window= -switch_compiler= -switch_messages= -switch_scribble=F6 -switch_vte=F4 -switch_sidebar= -switch_sidebar_symbol_list= -switch_sidebar_doc_list= -switch_tableft=<Primary>Page_Up -switch_tabright=<Primary>Page_Down -switch_tablastused=<Primary>Tab -move_tabfirst= -move_tablast= diff --git a/nixos/files/geany/settings.conf b/nixos/files/geany/settings.conf @@ -1,188 +0,0 @@ -[geany] -pref_main_load_session=true -pref_main_project_file_in_basedir=true -pref_main_save_winpos=true -pref_main_save_wingeom=true -pref_main_confirm_exit=false -pref_main_suppress_status_messages=false -switch_msgwin_pages=false -beep_on_errors=true -auto_focus=false -sidebar_symbol_visible=true -sidebar_openfiles_visible=true -editor_font=Monospace 10 -tagbar_font=Sans 9 -msgwin_font=Monospace 9 -show_notebook_tabs=true -show_tab_cross=true -tab_order_ltr=true -tab_order_beside=false -tab_pos_editor=2 -tab_pos_msgwin=0 -tab_label_length=1000 -show_indent_guide=false -show_white_space=false -show_line_endings=false -show_line_endings_only_when_differ=false -show_markers_margin=true -show_linenumber_margin=true -long_line_enabled=true -long_line_type=0 -long_line_column=72 -long_line_color=#C2EBC2 -symbolcompletion_max_height=10 -symbolcompletion_min_chars=4 -use_folding=true -unfold_all_children=false -use_indicators=true -line_wrapping=false -auto_close_xml_tags=true -complete_snippets=true -auto_complete_symbols=true -pref_editor_disable_dnd=false -pref_editor_smart_home_key=true -pref_editor_newline_strip=false -line_break_column=72 -auto_continue_multiline=true -comment_toggle_mark=~ -scroll_stop_at_last_line=true -autoclose_chars=0 -pref_editor_default_new_encoding=UTF-8 -pref_editor_default_open_encoding=none -default_eol_character=2 -pref_editor_new_line=true -pref_editor_ensure_convert_line_endings=false -pref_editor_replace_tabs=false -pref_editor_trail_space=false -pref_toolbar_show=true -pref_toolbar_append_to_menu=false -pref_toolbar_use_gtk_default_style=true -pref_toolbar_use_gtk_default_icon=true -pref_toolbar_icon_style=0 -pref_toolbar_icon_size=0 -pref_template_developer=V 7 -pref_template_company= -pref_template_mail=v7@vortex -pref_template_initial=V7 -pref_template_version=1.0 -pref_template_year=%Y -pref_template_date=%Y-%m-%d -pref_template_datetime=%d.%m.%Y %H:%M:%S %Z -context_action_cmd= -sidebar_visible=true -statusbar_visible=true -msgwindow_visible=true -fullscreen=false -symbols_group_by_type=true -color_picker_palette= -scribble_text=Type here what you want, use it as a notice/scratch board -scribble_pos=57 -custom_date_format= -default_open_path= -cmdline_new_files=true -notebook_double_click_hides_widgets=false -tab_close_switch_to_mru=false -tab_pos_sidebar=2 -openfiles_path_mode=2 -sidebar_pos=0 -symbols_sort_mode=0 -msgwin_orientation=1 -highlighting_invert_all=false -pref_main_search_use_current_word=true -check_detect_indent=false -detect_indent_width=false -use_tab_to_indent=true -backspace_unindent=true -pref_editor_tab_width=4 -indent_mode=2 -indent_type=1 -virtualspace=1 -change_history_markers=false -change_history_indicators=false -autocomplete_doc_words=false -completion_drops_rest_of_word=false -autocompletion_max_entries=30 -autocompletion_update_freq=250 -color_scheme=theme.conf -scroll_lines_around_cursor=0 -mru_length=10 -disk_check_timeout=30 -show_editor_scrollbars=true -brace_match_ltgt=false -use_gtk_word_boundaries=true -complete_snippets_whilst_editing=false -indent_hard_tab_width=8 -editor_ime_interaction=0 -use_atomic_file_saving=false -gio_unsafe_save_backup=false -use_gio_unsafe_file_saving=true -keep_edit_history_on_reload=true -show_keep_edit_history_on_reload_msg=true -reload_clean_doc_on_file_change=false -save_config_on_file_change=true -extract_filetype_regex=-\\*-\\s*([^\\s]+)\\s*-\\*- -allow_always_save=false -find_selection_type=0 -replace_and_find_by_default=true -show_symbol_list_expanders=true -compiler_tab_autoscroll=true -statusbar_template=line: %l / %L col: %c sel: %s %w %t %mEOL: %M encoding: %e filetype: %f scope: %S -new_document_after_close=false -msgwin_status_visible=true -msgwin_compiler_visible=true -msgwin_messages_visible=true -msgwin_scribble_visible=true -warn_on_project_close=true - -[tools] -terminal_cmd=xterm -e "/bin/sh %c" -browser_cmd= -grep_cmd=grep - -[printing] -print_cmd=lpr '%f' -use_gtk_printing=true -print_line_numbers=true -print_page_numbers=true -print_page_header=true -page_header_basename=false -page_header_datefmt=%c - -[VTE] -load_vte=true -send_cmd_prefix= -send_selection_unsafe=false - -[build-menu] -number_ft_menu_items=0 -number_non_ft_menu_items=0 -number_exec_menu_items=0 - -[search] -pref_search_hide_find_dialog=false -pref_search_always_wrap=false -pref_search_current_file_dir=true -fif_regexp=false -fif_case_sensitive=true -fif_match_whole_word=false -fif_invert_results=false -fif_recursive=false -fif_extra_options= -fif_use_extra_options=false -fif_files= -fif_files_mode=0 -find_regexp=false -find_regexp_multiline=false -find_case_sensitive=false -find_escape_sequences=false -find_match_whole_word=false -find_match_word_start=false -find_close_dialog=true -replace_regexp=false -replace_regexp_multiline=false -replace_case_sensitive=false -replace_escape_sequences=false -replace_match_whole_word=false -replace_match_word_start=false -replace_search_backwards=false -replace_close_dialog=true diff --git a/nixos/files/git/hooks/commit-msg b/nixos/files/git/hooks/commit-msg @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -error() { echo -e "\033[0;31merror:\033[0m $1"; exit 7; } - -## Commit Message ## - -# 1. Structure -if ! head -n 1 "$1" | grep -qE '^(feat|fix|ci|blog|chore|docs|test|style|refactor)(\([^)]+\))?!?: .+$' -then - error "Commit Message header is invalid\nFormat -> type(scope): subject" -fi - -# 2. Length -if ! head -n 1 "$1" | grep -qE '^.{1,50}$' -then - error "Commit Message header is too long\nGreater than 50 characters" -fi diff --git a/nixos/files/git/hooks/pre-commit b/nixos/files/git/hooks/pre-commit @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -error() { echo -e "\033[0;31merror:\033[0m $1"; exit 7; } - -## Pre-Commit Checks ## - -# Nix Syntax -if [ "$(find . -name 'flake.nix' 2>/dev/null | wc -l)" != 0 ] -then - nix flake check || error "Invalid Nix Flakes Configuration" -fi diff --git a/nixos/files/gitea/theme-black.css b/nixos/files/gitea/theme-black.css @@ -1,61 +0,0 @@ -:root { - --is-dark-theme: true; - --site-accent: rgb(123, 123, 123); - --site-accent-alpha: rgba(123, 123, 123, 0.2); - --site-secondary: rgba(229, 156, 25); - --site-bg: rgb(29, 29, 29); - --site-border: rgba(255, 255, 255, 0.1); - --site-text: whitesmoke; - - --color-primary: var(--site-secondary); - --color-primary-dark-1: rgb(209, 136, 5); - --color-primary-light-1: var(--site-secondary); - - /* Backgrounds */ - --color-body: var(--site-bg); - --color-footer: var(--site-bg); - --color-navbar: var(--site-bg); - --color-menu: var(--site-bg); - --color-box-header: rgb(35, 35, 35); - --color-box-body: var(--site-bg); - --color-secondary-bg: rgba(0, 0, 0, 0.2); - - /* Text & Links */ - --color-text: var(--site-text); - --color-text-light: #bbbbbb; - --color-link: #e0e0e0; - --color-link-hover: var(--site-secondary); - - /* Borders & Inputs */ - --color-border: var(--site-border); - --color-input-background: rgba(0, 0, 0, 0.3); - --color-input-border: var(--site-border); - - /* Code Highlights */ - --color-code-bg: rgba(0, 0, 0, 0.5); - --color-diff-added-row-bg: rgba(229, 156, 25, 0.15); - --color-diff-added-word-bg: rgba(229, 156, 25, 0.35); - --color-diff-removed-row-bg: rgba(123, 123, 123, 0.25); - --color-diff-removed-word-bg: rgba(123, 123, 123, 0.45); -} - -/* UI Overrides */ -.ui.secondary.menu .active.item { - color: var(--site-secondary) !important; - border-bottom-color: var(--site-secondary) !important; -} -.ui.green.button, -.ui.green.buttons .button { - background-color: var(--site-secondary) !important; - border-color: var(--site-secondary) !important; - color: #fff !important; -} -.ui.green.button:hover { - filter: brightness(90%); -} -a { - color: var(--site-accent); -} -a:hover { - color: var(--site-secondary); -} diff --git a/nixos/files/gitea/theme-blue.css b/nixos/files/gitea/theme-blue.css @@ -1,58 +0,0 @@ -:root { - --is-dark-theme: true; - --site-accent: rgb(35, 176, 255); - --site-accent-alpha: rgba(35, 176, 255, 0.2); - --site-secondary: rgb(238, 114, 241); - --site-bg: rgba(29, 30, 40); - --site-border: rgba(255, 255, 255, 0.1); - --site-text: whitesmoke; - - --color-primary: var(--site-accent); - --color-primary-dark-1: rgb(15, 156, 235); - --color-primary-light-1: var(--site-accent); - - /* Backgrounds */ - --color-body: var(--site-bg); - --color-footer: var(--site-bg); - --color-navbar: var(--site-bg); - --color-menu: var(--site-bg); - --color-box-header: rgba(29, 30, 40, 0.95); - --color-box-body: var(--site-bg); - --color-secondary-bg: rgba(0, 0, 0, 0.2); - - /* Text & Links */ - --color-text: var(--site-text); - --color-text-light: #d0d0d0; - --color-link: var(--site-accent); - --color-link-hover: var(--site-secondary); - - /* Borders & Inputs */ - --color-border: var(--site-border); - --color-input-background: rgba(0, 0, 0, 0.2); - --color-input-border: var(--site-border); - - /* Code Highlights */ - --color-code-bg: rgba(0, 0, 0, 0.3); - --color-diff-added-row-bg: rgba(35, 176, 255, 0.15); - --color-diff-added-word-bg: rgba(35, 176, 255, 0.35); - --color-diff-removed-row-bg: rgba(238, 114, 241, 0.15); - --color-diff-removed-word-bg: rgba(238, 114, 241, 0.35); -} - -/* UI Overrides */ -.ui.secondary.menu .active.item { - color: var(--site-accent) !important; - border-bottom-color: var(--site-accent) !important; -} -.ui.green.button, -.ui.green.buttons .button { - background-color: var(--site-accent) !important; - border-color: var(--site-accent) !important; - color: #fff !important; -} -.ui.green.button:hover { - filter: brightness(90%); -} -a { - color: var(--site-accent); -} diff --git a/nixos/files/gitea/theme-red.css b/nixos/files/gitea/theme-red.css @@ -1,58 +0,0 @@ -:root { - --is-dark-theme: true; - --site-accent: rgb(255, 98, 102); - --site-accent-alpha: rgba(255, 98, 102, 0.2); - --site-secondary: rgba(35, 176, 255); - --site-bg: rgba(34, 31, 41); - --site-border: rgba(255, 255, 255, 0.1); - --site-text: whitesmoke; - - --color-primary: var(--site-accent); - --color-primary-dark-1: rgb(235, 78, 82); - --color-primary-light-1: var(--site-accent); - - /* Backgrounds */ - --color-body: var(--site-bg); - --color-footer: var(--site-bg); - --color-navbar: var(--site-bg); - --color-menu: var(--site-bg); - --color-box-header: rgba(34, 31, 41, 0.95); - --color-box-body: var(--site-bg); - --color-secondary-bg: rgba(0, 0, 0, 0.2); - - /* Text & Links */ - --color-text: var(--site-text); - --color-text-light: #d0d0d0; - --color-link: var(--site-accent); - --color-link-hover: #fff; - - /* Borders & Inputs */ - --color-border: var(--site-border); - --color-input-background: rgba(0, 0, 0, 0.2); - --color-input-border: var(--site-border); - - /* Code Highlights */ - --color-code-bg: rgba(0, 0, 0, 0.3); - --color-diff-removed-row-bg: rgba(255, 98, 102, 0.15); - --color-diff-removed-word-bg: rgba(255, 98, 102, 0.35); - --color-diff-added-row-bg: rgba(35, 176, 255, 0.15); - --color-diff-added-word-bg: rgba(35, 176, 255, 0.35); -} - -/* UI Overrides */ -.ui.secondary.menu .active.item { - color: var(--site-accent) !important; - border-bottom-color: var(--site-accent) !important; -} -.ui.green.button, -.ui.green.buttons .button { - background-color: var(--site-accent) !important; - border-color: var(--site-accent) !important; - color: #fff !important; -} -.ui.green.button:hover { - filter: brightness(90%); -} -a { - color: var(--site-accent); -} diff --git a/nixos/files/gnome/menu.json b/nixos/files/gnome/menu.json @@ -1,102 +0,0 @@ -{ - "settings": { - "icon": "open-menu-symbolic", - "loglevel": "warning" - }, - "menu": [ - { - "type": "submenu", - "title": "Audio", - "icon": "audio-headset-symbolic", - "items": [ - { - "type": "command", - "title": "Test Sound", - "command": "find /run/current-system/sw/share/sounds/alsa/ -name '*_*' -exec aplay {} \\;", - "instancing": "singleInstance", - "icon": "sound-symbolic", - "killOnDisable": false - }, - { - "type": "command", - "title": "Microphone Boost", - "command": "sh -c \"CARD=$(arecord -l | grep card | awk '{print $3}'); VALUE=$(zenity --scale --text='Select Microphone Boost value' --value=0 --min-value=0 --max-value=100 --step=5); amixer -c $CARD sset 'Mic Boost' $VALUE\"", - "instancing": "singleInstance", - "icon": "microphone-symbolic", - "killOnDisable": false - } - ] - }, - { - "type": "submenu", - "title": "Phone", - "icon": "smartphone-symbolic", - "items": [ - { - "type": "command", - "title": "iPhone File Transfer", - "command": "systemctl restart usbmuxd.service", - "instancing": "singleInstance", - "icon": "fileopen", - "killOnDisable": false - }, - { - "type": "command", - "title": "ADB Screen Mirror", - "command": "scrcpy --video-codec=h265 --keyboard=uhid --stay-awake --turn-screen-off --power-off-on-close --shortcut-mod=rctrl", - "instancing": "singleInstance", - "icon": "display-projector-symbolic", - "killOnDisable": false - } - ] - }, - { - "type": "submenu", - "title": "Virtualisation", - "icon": "computer-symbolic", - "items": [ - { - "type": "switch", - "title": "Android", - "icon": "im-google-symbolic", - "start": "sh -c 'nohup waydroid session start > /dev/null 2>&1&'", - "stop": "waydroid session stop", - "check": "sh -c 'waydroid status | grep RUNNING'", - "interval_s": 10 - }, - { - "type": "switch", - "title": "Windows", - "icon": "im-msn-symbolic", - "start": "virsh -c qemu:///system start Windows", - "stop": "virsh -c qemu:///system shutdown Windows", - "check": "sh -c 'virsh -c qemu:///system list | grep Windows'", - "interval_s": 10 - } - ] - }, - { - "type": "submenu", - "title": "Settings", - "icon": "application-menu-symbolic", - "items": [ - { - "type": "command", - "title": "Configuration", - "command": "xdg-open .config/guillotine.json", - "instancing": "singleInstance", - "icon": "preferences-other-symbolic", - "killOnDisable": true - }, - { - "type": "command", - "title": "Log Desktop", - "command": "kgx -e 'sudo journalctl /run/current-system/sw/bin/gnome-shell -f -o cat'", - "instancing": "singleInstance", - "icon": "emblem-documents-symbolic", - "killOnDisable": false - } - ] - } - ] -} diff --git a/nixos/files/gnome/shortcuts.json b/nixos/files/gnome/shortcuts.json @@ -1,308 +0,0 @@ -[ - { - "name": "Window Navigation", - "shortcuts": [ - { - "key": "ALT + F4 / Super + Q", - "description": "Close active window" - }, - { - "key": "ALT + Space", - "description": "Activate window menu" - }, - { - "key": "Super + ↑/↓", - "description": "Maximize/Minimize window" - }, - { - "key": "Super + M", - "description": "Toggle maximized window" - }, - { - "key": "Super + SHIFT + F", - "description": "Toggle fullscreen window" - }, - { - "key": "Super + W/A/S/D", - "description": "Focus window in specified direction" - }, - { - "key": "Super + SHIFT + W/A/S/D", - "description": "Move window to specified tile" - }, - { - "key": "Super + Mouse Drag", - "description": "Move window" - }, - { - "key": "Super + CTRL + Mouse Drag", - "description": "Tile window ('ALT' to span)" - }, - { - "key": "Super + P", - "description": "Pin window above all others" - }, - { - "key": "ALT + Tab", - "description": "Switch between applications" - }, - { - "key": "Super + Tab", - "description": "Switch between windows of current app" - } - ] - }, - { - "name": "Desktop Actions", - "shortcuts": [ - { - "key": "Super", - "description": "Enter Overview" - }, - { - "key": "Super * 2", - "description": "Enter App Grid" - }, - { - "key": "Super + 1,2,3...", - "description": "Run app by position in launcher" - }, - { - "key": "Super + ←/→", - "description": "Switch workspaces" - }, - { - "key": "Super + Home/End", - "description": "Switch to first/last workspace" - }, - { - "key": "Super + SHIFT + ←/→", - "description": "Move window between workspaces" - }, - { - "key": "Super + CTRL + ←/→", - "description": "Move window between monitors" - }, - { - "key": "Super + F2", - "description": "Run Dialog" - }, - { - "key": "Super + SHIFT + N", - "description": "Show notification tray" - }, - { - "key": "CTRL + ALT + S", - "description": "Resize window to pre-defined sizes" - }, - { - "key": "CTRL + ALT + Del", - "description": "Open shutdown menu" - }, - { - "key": "Super + L", - "description": "Lock the screen" - }, - { - "key": "Super + X", - "description": "Toggle zoom" - }, - { - "key": "Super + =", - "description": "Zoom in" - }, - { - "key": "Super + -", - "description": "Zoom out" - }, - { - "key": "Super + I", - "description": "Invert window colors" - } - ] - }, - { - "name": "Application Shortcuts", - "shortcuts": [ - { - "key": "Super + ~", - "description": "Open Settings" - }, - { - "key": "Super + F", - "description": "Open Files" - }, - { - "key": "Super + T", - "description": "Open Terminal" - }, - { - "key": "Super + Space", - "description": "Open Dropdown Terminal" - }, - { - "key": "Super + `", - "description": "Open Browser" - }, - { - "key": "Super + V", - "description": "Open Clipboard ('CTRL' for incognito)" - }, - { - "key": "Super + Enter", - "description": "Open Task Manager" - }, - { - "key": "Super + SHIFT + E", - "description": "Open Emoji Picker" - }, - { - "key": "Super + /", - "description": "Show this shortcuts menu" - }, - { - "key": "CTRL + W", - "description": "Close tab in tabbed apps" - }, - { - "key": "CTRL + T", - "description": "Opens new tab in tabbed apps" - }, - { - "key": "CTRL + SHIFT + T", - "description": "Reopen last closed tab in browser" - }, - { - "key": "CTRL + /", - "description": "Code Editor command palette" - }, - { - "key": "F5", - "description": "Document Viewer presentation mode" - }, - { - "key": "F9", - "description": "LibreOffice presentation mode" - } - ] - }, - { - "name": "Screenshots", - "shortcuts": [ - { - "key": "Print", - "description": "Take region screenshot" - }, - { - "key": "SHIFT + Print", - "description": "Take full screenshot" - }, - { - "key": "CTRL + Print", - "description": "Take window screenshot" - }, - { - "key": "ALT + Print", - "description": "Video capture desktop" - } - ] - }, - { - "name": "Overview Actions", - "shortcuts": [ - { - "key": "Tab", - "description": "Focus next window" - }, - { - "key": "Super + Tab", - "description": "Focus next monitor" - }, - { - "key": "Super + ←/→", - "description": "Switch between workspaces" - }, - { - "key": "ALT + Tab", - "description": "Focus dash icons" - }, - { - "key": "PgUp/PgDown or CTRL + Tab", - "description": "Switch between workspaces" - }, - { - "key": "SHIFT + PgUp/PgDown or Scroll", - "description": "Reorder workspaces" - }, - { - "key": "SHIFT + ←/→", - "description": "Move window between workspaces ('CTRL' for new)" - }, - { - "key": "Delete", - "description": "Close window" - }, - { - "key": "SHIFT + CTRL + Delete", - "description": "Close all windows on workspace" - }, - { - "key": "SHIFT + Enter", - "description": "Move window between monitors" - }, - { - "key": "Space or `", - "description": "Show open application windows" - }, - { - "key": "..", - "description": "Show system actions" - } - ] - }, - { - "name": "Navigation Gestures", - "shortcuts": [ - { - "key": "4F ↑ Swipe (←/→)", - "description": "Maximize/fullscreen/restore(/snap) a window" - }, - { - "key": "3F ↑ Swipe", - "description": "Show overview/apps grid" - }, - { - "key": "3F ↓ Swipe", - "description": "Minimize window" - }, - { - "key": "3F ←/→ Swipe", - "description": "Switch workspaces" - }, - { - "key": "4F Hold then Swipe", - "description": "Move window" - }, - { - "key": "3F ↓ Swipe then ←/→", - "description": "Switch to previous/next window" - }, - { - "key": "4F ↓ Swipe", - "description": "Show notification center" - }, - { - "key": "4F Pinch Out", - "description": "Show desktop" - }, - { - "key": "4F Pinch In", - "description": "Mute audio" - }, - { - "key": "2F ←/→ Swipe", - "description": "Switch pages or move backward/forward" - } - ] - } -] diff --git a/nixos/files/hyprland/greeter.conf b/nixos/files/hyprland/greeter.conf @@ -1,20 +0,0 @@ -exec-once = @greeter; hyprctl dispatch exit - -windowrule = fullscreen on, stay_focused on, match:class ^(.*)$ -monitor = , preferred, auto, 1 - -animations:enabled = false -misc { - background_color = rgb(@base00) - disable_autoreload = true - disable_hyprland_logo = true - disable_splash_rendering = true - disable_hyprland_guiutils_check = true - enable_anr_dialog = false - force_default_wallpaper = 0 -} - -ecosystem { - no_update_news = true - no_donation_nag = true -} diff --git a/nixos/files/hyprland/kebihelp.json b/nixos/files/hyprland/kebihelp.json @@ -1,1640 +0,0 @@ -{ - "Parameters": { - "cmd_focused_window": "hyprctl activewindow", - "importer": { - "match_line": ".*@@(.+?)@@(.+?)@@(.+?)@@.*", - "position_group": 1, - "position_keybinding": 2, - "position_label": 3 - }, - "keys": { - "tab_previous": "Backtab", - "tab_next": "Tab", - "scroll_down": "Down", - "scroll_up": "Up", - "quit": "Esc" - }, - "layout": { - "n_columns": 3, - "spacing": 3, - "width": 1100, - "height": 900, - "background_color": "#@base00", - "opacity": 0.9, - "tabs": { - "background_color": "#@base02", - "background_color_current": "#@base04", - "color": "#@white", - "font": "@font", - "font_size": 10, - "padding": 1 - }, - "group_name": { - "background_color": "#@accent", - "color": "#@base00", - "bold": true, - "stretched": false, - "padding": "0px 5px 0px 2px", - "font": "@font", - "font_size": 11 - }, - "shortcut": { - "label": { - "color": "#@white", - "bold": false, - "font": "@font", - "font_size": 10 - }, - "value": { - "color": "#@base05", - "bold": true, - "font": "@monospace", - "font_size": 10 - }, - "spacing": 10 - } - } - }, - "Rules": { - "default": "Desktop", - "kitty": "Terminal", - "code": "Code", - "firefox": "Firefox" - }, - "Keybindings": { - "Desktop": { - "_hidden": false, - "Legend": { - "_hidden": false, - "keybindings": [ - { - "value": "SUPER", - "label": "$mod" - }, - { - "value": "L' / R'", - "label": "Left/Right Mouse Click" - } - ] - }, - "Compositor": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod Q or ALT F4", - "label": "Quit application" - }, - { - "value": "$mod SHIFT Q", - "label": "Force Quit application" - }, - { - "value": "ALT A", - "label": "Activate urgent/last window" - }, - { - "value": "$mod E", - "label": "Maximize window" - }, - { - "value": "$mod SHIFT E", - "label": "Fullscreen window" - }, - { - "value": "ALT Q", - "label": "Minimize window" - }, - { - "value": "ALT SHIFT Q", - "label": "Show all minimized windows" - }, - { - "value": "$mod <ARROW>", - "label": "Switch focus to window in desired direction" - }, - { - "value": "$mod SHIFT <ARROW>", - "label": "Swap windows in desired direction" - }, - { - "value": "$mod Space", - "label": "Change window split direction" - }, - { - "value": "$mod SHIFT Space", - "label": "Toggle application grouping" - }, - { - "value": "$mod CTRL <ARROW>", - "label": "Move window into desired group" - }, - { - "value": "$mod ; or :", - "label": "Toggle window float for one/all window(s)" - }, - { - "value": "$mod C", - "label": "Center floating window and/or move cursor to top right corner" - }, - { - "value": "$mod P", - "label": "Pin floating window on all workspaces" - } - ] - }, - "Switcher": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod Tab", - "label": "Application Launcher and Overview" - }, - { - "value": "$mod `", - "label": "Show workspace overview" - }, - { - "value": "ALT [SHIFT] Tab", - "label": "Cycle [backwards] through open windows on current workspace" - }, - { - "value": "ALT [SHIFT] `", - "label": "Cycle [backwards] through grouped windows" - } - ] - }, - "Workspaces": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod <NUM>", - "label": "Create workspace 'NUM' {1 to 9}" - }, - { - "value": "$mod SHIFT <NUM>", - "label": "Move window to workspace 'NUM' {1 to 9}" - }, - { - "value": "$mod , or . (3F Swipe Left/Right)", - "label": "Move across non-empty workspaces" - }, - { - "value": "$mod CTRL , or .", - "label": "Move across workspaces" - }, - { - "value": "$mod 0", - "label": "Toggle special workspace to stash windows" - }, - { - "value": "$mod SHIFT 0", - "label": "Move window to/from stash" - }, - { - "value": "$mod SHIFT , or .", - "label": "Move window to previous/next workspace" - }, - { - "value": "$mod ALT , or .", - "label": "Move focus to left/right monitor" - }, - { - "value": "$mod SHIFT ALT , or .", - "label": "Move window to left/right monitor" - } - ] - }, - "Utility": { - "_hidden": false, - "keybindings": [ - { - "value": "Print", - "label": "Take Screenshot of area" - }, - { - "value": "CTRL Print", - "label": "Take Screenshot of window" - }, - { - "value": "SHIFT Print", - "label": "Take Screenshot of screen" - }, - { - "value": "$mod = or -", - "label": "Zoom in/out" - }, - { - "value": "$mod SHIFT -", - "label": "Zoom out fully" - }, - { - "value": "$mod L or Esc", - "label": "Lock screen / System Logoff" - }, - { - "value": "$mod S", - "label": "Toggle Compositor Shader" - }, - { - "value": "$mod SHIFT S", - "label": "Toggle window swallowing" - }, - { - "value": "$mod SHIFT D", - "label": "Toggle main Display" - } - ] - }, - "Applications": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod /", - "label": "Show this page" - }, - { - "value": "$mod A", - "label": "Application Drawer" - }, - { - "value": "$mod SHIFT A", - "label": "Toggle top Panel" - }, - { - "value": "$mod SHIFT C", - "label": "Color Picker" - }, - { - "value": "$mod D", - "label": "Monitor Configuration" - }, - { - "value": "$mod F", - "label": "File Manager" - }, - { - "value": "$mod T", - "label": "Terminal" - }, - { - "value": "$mod SHIFT T", - "label": "Toggle Terminal in Quake mode" - }, - { - "value": "$mod V", - "label": "Toggle Clipboard" - }, - { - "value": "$mod W", - "label": "Web Browser" - }, - { - "value": "$mod Enter", - "label": "Task Manager" - }, - { - "value": "$mod +", - "label": "Calculator" - }, - { - "value": "$mod SHIFT B", - "label": "Bluetooth Settings" - }, - { - "value": "$mod SHIFT P", - "label": "Volume Control" - }, - { - "value": "$mod SHIFT N", - "label": "Network Settings" - }, - { - "value": "$mod N", - "label": "Show notification panel" - }, - { - "value": "$mod SHIFT Esc", - "label": "Inhibit all keybindings" - } - ] - }, - "Mouse": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod L'", - "label": "Move window" - }, - { - "value": "$mod R'", - "label": "Window resize" - }, - { - "value": "$mod Scroll", - "label": "Move across workspaces" - }, - { - "value": "", - "label": "" - }, - { - "value": "R' (in overview)", - "label": "Move windows across workspaces" - }, - { - "value": "L' (in overview)", - "label": "Switch workspaces" - } - ] - }, - "Submap": { - "_hidden": false, - "keybindings": [ - { - "value": "esc", - "label": "Exit Submap" - }, - { - "value": "", - "label": "" - }, - { - "value": "$mod R", - "label": "Resize Submap" - }, - { - "value": "<ARROW> or L' (Mouse Drag)", - "label": "Resize window" - }, - { - "value": "", - "label": "" - }, - { - "value": "$mod M", - "label": "Move Submap" - }, - { - "value": "L' (Mouse Drag)", - "label": "Move window" - }, - { - "value": "<ARROW>", - "label": "Move window (into group)" - }, - { - "value": "SHIFT <ARROW>", - "label": "Move floating window" - }, - { - "value": ", or .", - "label": "Move window across workspaces" - }, - { - "value": "C", - "label": "Center floating window" - }, - { - "value": "P", - "label": "Pin floating window" - }, - { - "value": "", - "label": "" - }, - { - "value": "ALT SHIFT Q", - "label": "Minimized Submap" - }, - { - "value": "Return or L'", - "label": "Unminimize selected window" - }, - { - "value": "<ARROW>", - "label": "Focus window in desired direction" - }, - { - "value": "Q", - "label": "Close selected window" - } - ] - } - }, - "Code": { - "_hidden": false, - "General": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL /", - "label": "Show Command Palette" - }, - { - "value": "CTRL P", - "label": "Quick Open, Go to File..." - }, - { - "value": "CTRL SHIFT N", - "label": "New window/instance" - }, - { - "value": "CTRL SHIFT W", - "label": "Close window/instance" - }, - { - "value": "CTRL ,", - "label": "User Settings" - }, - { - "value": "CTRL K + CTRL S", - "label": "Keyboard Shortcuts" - } - ] - }, - "Editing": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL X", - "label": "Cut line (empty selection)" - }, - { - "value": "CTRL C", - "label": "Copy line (empty selection)" - }, - { - "value": "ALT Up / Down", - "label": "Move line up/down" - }, - { - "value": "SHIFT ALT Up / Down", - "label": "Copy line up/down" - }, - { - "value": "CTRL D", - "label": "Delete line" - }, - { - "value": "CTRL Return", - "label": "Insert line below" - }, - { - "value": "CTRL SHIFT Return", - "label": "Insert line above" - }, - { - "value": "CTRL SHIFT \\", - "label": "Jump to matching bracket" - }, - { - "value": "CTRL ] / [", - "label": "Indent/outdent line" - }, - { - "value": "Home / End", - "label": "Go to beginning/end of line" - }, - { - "value": "CTRL Home", - "label": "Go to beginning of file" - }, - { - "value": "CTRL End", - "label": "Go to end of file" - }, - { - "value": "CTRL Up / Down", - "label": "Scroll line up/down" - }, - { - "value": "ALT PgUp / PgDown", - "label": "Scroll page up/down" - }, - { - "value": "CTRL SHIFT [", - "label": "Fold (collapse) region" - }, - { - "value": "CTRL SHIFT ]", - "label": "Unfold (uncollapse) region" - }, - { - "value": "CTRL K + CTRL [", - "label": "Fold (collapse) all subregions" - }, - { - "value": "CTRL K + CTRL ]", - "label": "Unfold (uncollapse) all subregions" - }, - { - "value": "CTRL K + CTRL 0", - "label": "Fold (collapse) all regions" - }, - { - "value": "CTRL K + CTRL J", - "label": "Unfold (uncollapse) all regions" - }, - { - "value": "CTRL K + CTRL C", - "label": "Add line comment" - }, - { - "value": "CTRL K + CTRL U", - "label": "Remove line comment" - }, - { - "value": "SHIFT ALT A", - "label": "Toggle block comment" - }, - { - "value": "ALT Z", - "label": "Toggle word wrap" - } - ] - }, - "Navigation": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL T", - "label": "Show all Symbols" - }, - { - "value": "CTRL G", - "label": "Go to Line..." - }, - { - "value": "CTRL P", - "label": "Go to File..." - }, - { - "value": "CTRL SHIFT O", - "label": "Go to Symbol..." - }, - { - "value": "CTRL SHIFT M", - "label": "Show Problems panel" - }, - { - "value": "F8", - "label": "Go to next error or warning" - }, - { - "value": "SHIFT F8", - "label": "Go to previous error or warning" - }, - { - "value": "CTRL SHIFT TAB", - "label": "Navigate editor group history" - }, - { - "value": "ALT Left / Right", - "label": "Go back/forward" - }, - { - "value": "CTRL M", - "label": "Toggle Tab moves focus" - } - ] - }, - "Search": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL F", - "label": "Find" - }, - { - "value": "CTRL H", - "label": "Replace" - }, - { - "value": "F3", - "label": "Find next" - }, - { - "value": "SHIFT F3", - "label": "Find previous" - }, - { - "value": "ALT Return", - "label": "Select all occurences of Find match" - }, - { - "value": "CTRL K + CTRL D", - "label": "Move last selection to next Find match" - }, - { - "value": "ALT C / R / W", - "label": "Toggle case-sensitive/regex/whole word" - } - ] - }, - "Selection": { - "_hidden": false, - "keybindings": [ - { - "value": "ALT Click", - "label": "Insert cursor" - }, - { - "value": "CTRL ALT Up / Down", - "label": "Insert cursor above/below" - }, - { - "value": "CTRL U", - "label": "Undo last cursor operation" - }, - { - "value": "SHIFT ALT I", - "label": "Insert cursor at end of each line selected" - }, - { - "value": "CTRL I", - "label": "Select current line" - }, - { - "value": "CTRL SHIFT L", - "label": "Select all occurrences of current selection" - }, - { - "value": "CTRL F2", - "label": "Select all occurrences of current word" - }, - { - "value": "SHIFT ALT Right", - "label": "Expand selection" - }, - { - "value": "SHIFT ALT Left", - "label": "Shrink selection" - }, - { - "value": "SHIFT ALT (Mouse Drag) or <ARROW>", - "label": "Column (box) selection" - } - ] - }, - "Editor": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL F4", - "label": "Close editor" - }, - { - "value": "CTRL W", - "label": "Close editor" - }, - { - "value": "CTRL K + F", - "label": "Close folder" - }, - { - "value": "CTRL \\", - "label": "Split editor" - }, - { - "value": "CTRL 1 / 2 / 3", - "label": "Focus into 1st, 2nd, or 3rd editor group" - }, - { - "value": "CTRL K + CTRL Left / Right", - "label": "Focus into previous/next editor group" - }, - { - "value": "CTRL SHIFT PgUp / PgDown", - "label": "Move editor left/right" - }, - { - "value": "CTRL K + Left / Right", - "label": "Move active editor group" - } - ] - }, - "File": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL N", - "label": "New File" - }, - { - "value": "CTRL O", - "label": "Open File..." - }, - { - "value": "CTRL S", - "label": "Save" - }, - { - "value": "CTRL SHIFT S", - "label": "Save As..." - }, - { - "value": "CTRL K + S", - "label": "Save All" - }, - { - "value": "CTRL F4", - "label": "Close" - }, - { - "value": "CTRL K + CTRL W", - "label": "Close All" - }, - { - "value": "CTRL SHIFT T", - "label": "Reopen closed editor" - }, - { - "value": "CTRL K + Return", - "label": "Keep preview mode editor open" - }, - { - "value": "CTRL TAB", - "label": "Open next" - }, - { - "value": "CTRL SHIFT TAB", - "label": "Open previous" - }, - { - "value": "CTRL K + P", - "label": "Copy path of active file" - }, - { - "value": "CTRL K + R", - "label": "Reveal active file in Explorer" - }, - { - "value": "CTRL K + O", - "label": "Show active file in new window/instance" - } - ] - }, - "Display": { - "_hidden": false, - "keybindings": [ - { - "value": "F11", - "label": "Toggle full screen" - }, - { - "value": "SHIFT ALT 0", - "label": "Toggle editor layout" - }, - { - "value": "CTRL =/-", - "label": "Zoom in/out" - }, - { - "value": "CTRL B", - "label": "Toggle Sidebar visibility" - }, - { - "value": "CTRL SHIFT E", - "label": "Show Explorer/Toggle focus" - }, - { - "value": "CTRL SHIFT F", - "label": "Show Search" - }, - { - "value": "CTRL SHIFT G", - "label": "Show Source Control" - }, - { - "value": "CTRL SHIFT D", - "label": "Show Debug" - }, - { - "value": "CTRL SHIFT X", - "label": "Show Extensions" - }, - { - "value": "CTRL SHIFT H", - "label": "Replace in files" - }, - { - "value": "CTRL SHIFT J", - "label": "Toggle Search details" - }, - { - "value": "CTRL SHIFT U", - "label": "Show Output panel" - }, - { - "value": "CTRL SHIFT V", - "label": "Open Markdown preview" - }, - { - "value": "CTRL K + V", - "label": "Open Markdown preview to the side" - }, - { - "value": "CTRL K + Z", - "label": "Zen Mode (Esc to exit)" - } - ] - }, - "Debug": { - "_hidden": false, - "keybindings": [ - { - "value": "F9", - "label": "Toggle breakpoint" - }, - { - "value": "F5", - "label": "Start/Continue" - }, - { - "value": "SHIFT F5", - "label": "Stop" - }, - { - "value": "F11", - "label": "Step into" - }, - { - "value": "SHIFT F11", - "label": "Step out" - }, - { - "value": "F10", - "label": "Step over" - }, - { - "value": "CTRL K + CTRL I", - "label": "Show hover" - } - ] - }, - "Terminal": { - "_hidden": false, - "keybindings": [ - { - "value": "ALT T", - "label": "Show terminal" - }, - { - "value": "CTRL C", - "label": "Copy selection" - }, - { - "value": "CTRL V", - "label": "Paste into active terminal" - }, - { - "value": "CTRL Up / Down", - "label": "Scroll up/down" - }, - { - "value": "SHIFT PgUp / PgDown", - "label": "Scroll page up/down" - }, - { - "value": "CTRL Home / End", - "label": "Scroll to top/bottom" - } - ] - } - }, - "Terminal": { - "_hidden": false, - "Legend": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL SHIFT", - "label": "$mod" - } - ] - }, - "Scrolling": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod Up", - "label": "Scroll line up" - }, - { - "value": "$mod Down", - "label": "Scroll line down" - }, - { - "value": "$mod PgUp", - "label": "Scroll page up" - }, - { - "value": "$mod PgDown", - "label": "Scroll page down" - }, - { - "value": "$mod Home", - "label": "Scroll to beginning" - }, - { - "value": "$mod End", - "label": "Scroll to end" - }, - { - "value": "$mod Z", - "label": "Scroll to prompt -1" - }, - { - "value": "$mod X", - "label": "Scroll to prompt 1" - }, - { - "value": "$mod H", - "label": "Show scrollback" - }, - { - "value": "$mod G", - "label": "Show last command output" - } - ] - }, - "Tabs": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod Right", - "label": "Next tab" - }, - { - "value": "CTRL TAB", - "label": "Next tab" - }, - { - "value": "$mod Left", - "label": "Previous tab" - }, - { - "value": "CTRL SHIFT TAB", - "label": "Previous tab" - }, - { - "value": "$mod T", - "label": "New tab" - }, - { - "value": "$mod Q", - "label": "Close tab" - }, - { - "value": "$mod .", - "label": "Move tab forward" - }, - { - "value": "$mod ,", - "label": "Move tab backward" - }, - { - "value": "$mod ALT T", - "label": "Set tab title" - } - ] - }, - "Window": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod Return", - "label": "New window" - }, - { - "value": "$mod N", - "label": "New OS window" - }, - { - "value": "$mod W", - "label": "Close window" - }, - { - "value": "$mod ]", - "label": "Next window" - }, - { - "value": "$mod [", - "label": "Previous window" - }, - { - "value": "$mod B", - "label": "Move window backward" - }, - { - "value": "$mod `", - "label": "Move window to top" - }, - { - "value": "$mod R", - "label": "Resize window" - }, - { - "value": "$mod <N>", - "label": "'N'th window" - }, - { - "value": "$mod F7", - "label": "Focus visible window" - }, - { - "value": "$mod F8", - "label": "Swap with window" - }, - { - "value": "$mod L", - "label": "Next layout" - } - ] - }, - "Actions": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod F", - "label": "Find occurrences of entered text" - }, - { - "value": "$mod C", - "label": "Copy to clipboard" - }, - { - "value": "$mod V", - "label": "Paste from clipboard" - }, - { - "value": "$mod S or SHIFT Insert", - "label": "Paste from selection" - }, - { - "value": "CTRL C", - "label": "Copy or Interrupt" - }, - { - "value": "$mod O", - "label": "Pass selection to program" - }, - { - "value": "$mod U", - "label": "Unicode input" - }, - { - "value": "$mod = / + / -", - "label": "Change font size" - }, - { - "value": "$mod E", - "label": "Open URL with hints" - } - ] - }, - "Debug": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod F1", - "label": "Show help" - }, - { - "value": "$mod F2", - "label": "Edit config file" - }, - { - "value": "$mod Esc", - "label": "Shell window" - }, - { - "value": "$mod Del", - "label": "Clear terminal reset active" - }, - { - "value": "$mod F5", - "label": "Load config file" - }, - { - "value": "$mod F6", - "label": "Debug config" - } - ] - } - }, - "Firefox": { - "_hidden": false, - "Navigation": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + Left", - "label": "Back" - }, - { - "value": "CTRL + Right", - "label": "Forward" - }, - { - "value": "ALT + Home", - "label": "Home" - }, - { - "value": "CTRL + O", - "label": "Open File" - }, - { - "value": "CTRL + R", - "label": "Reload" - }, - { - "value": "CTRL + SHIFT + R", - "label": "Reload (override cache)" - }, - { - "value": "CTRL + .", - "label": "Stop" - } - ] - }, - "Current Page": { - "_hidden": false, - "keybindings": [ - { - "value": "Tab", - "label": "Focus Next Link or Input Field" - }, - { - "value": "SHIFT + Tab", - "label": "Focus Previous Link or Input Field" - }, - { - "value": "Space", - "label": "Go Down a Screen" - }, - { - "value": "SHIFT + Space", - "label": "Go Up a Screen" - }, - { - "value": "CTRL + Down", - "label": "Go to Bottom of Page" - }, - { - "value": "CTRL + Up", - "label": "Go to Top of Page" - }, - { - "value": "F6", - "label": "Move to Next Frame" - }, - { - "value": "SHIFT + F6", - "label": "Move to Previous Frame" - }, - { - "value": "CTRL + P", - "label": "Print" - }, - { - "value": "CTRL + S", - "label": "Save Page As" - }, - { - "value": "CTRL + +", - "label": "Zoom In" - }, - { - "value": "CTRL + -", - "label": "Zoom Out" - }, - { - "value": "CTRL + 0", - "label": "Zoom Reset" - } - ] - }, - "Editing": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + C", - "label": "Copy" - }, - { - "value": "CTRL + X", - "label": "Cut" - }, - { - "value": "Backspace", - "label": "Delete" - }, - { - "value": "Home", - "label": "Go to Beginning of Line" - }, - { - "value": "End", - "label": "Go to End of Line" - }, - { - "value": "CTRL + V", - "label": "Paste" - }, - { - "value": "CTRL + SHIFT + V", - "label": "Paste (as plain text)" - }, - { - "value": "CTRL + SHIFT + Z", - "label": "Redo" - }, - { - "value": "CTRL + A", - "label": "Select All" - }, - { - "value": "CTRL + Z", - "label": "Undo" - } - ] - }, - "Search": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + F", - "label": "Find" - }, - { - "value": "CTRL + G", - "label": "Find Again" - }, - { - "value": "CTRL + SHIFT + G", - "label": "Find Previous" - }, - { - "value": "'", - "label": "Quick Find within link-text only" - }, - { - "value": "/", - "label": "Quick Find" - }, - { - "value": "Esc", - "label": "Close the Find or Quick Find bar" - }, - { - "value": "CTRL + K", - "label": "Focus Search bar" - }, - { - "value": "CTRL + Up / Down", - "label": "Change the Default Search Engine" - }, - { - "value": "ALT + Up / Down", - "label": "View menu to switch, add, or manage search engines" - }, - { - "value": "CTRL + W", - "label": "Close Tab" - }, - { - "value": "CTRL + SHIFT + W", - "label": "Close Window" - }, - { - "value": "CTRL + Tab", - "label": "Cycle through Tabs in Recently Used Order" - }, - { - "value": "CTRL + Q", - "label": "Quit" - }, - { - "value": "CTRL + ALT + Left", - "label": "Go one Tab to the Left" - }, - { - "value": "CTRL + ALT + Right", - "label": "Go one Tab to the Right" - }, - { - "value": "CTRL + SHIFT + PgUp", - "label": "Move Tab Left" - }, - { - "value": "CTRL + SHIFT + PgDown", - "label": "Move Tab Right" - }, - { - "value": "CTRL + SHIFT + Home", - "label": "Move Tab in focus to start" - }, - { - "value": "CTRL + SHIFT + End", - "label": "Move Tab in focus to end" - }, - { - "value": "CTRL + M", - "label": "Mute/Unmute Audio" - }, - { - "value": "CTRL + T", - "label": "New Tab" - }, - { - "value": "CTRL + N", - "label": "New Window" - }, - { - "value": "CTRL + SHIFT + P", - "label": "New Private Window" - }, - { - "value": "ALT + Enter", - "label": "Open Address in New Foreground Tab" - }, - { - "value": "Enter", - "label": "Open Focused Bookmark or Link in Current Tab" - }, - { - "value": "CTRL + Enter", - "label": "Open Focused Link in New Background Tab" - }, - { - "value": "CTRL + SHIFT + Enter", - "label": "Open Focused Bookmark in New Background Tab" - }, - { - "value": "SHIFT + Enter", - "label": "Open Focused Bookmark or Link in New Window" - }, - { - "value": "CTRL + SHIFT + T", - "label": "Undo Close Tab" - }, - { - "value": "CTRL + SHIFT + N", - "label": "Undo Close Window" - }, - { - "value": "CTRL + 1-8", - "label": "Select Tab 1-8" - }, - { - "value": "CTRL + 9", - "label": "Select Last Tab" - }, - { - "value": "CTRL + SHIFT + X", - "label": "Moves the URL left or right" - } - ] - }, - "History": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + SHIFT + H", - "label": "History sidebar" - }, - { - "value": "CTRL + SHIFT + Delete", - "label": "Clear Recent History" - } - ] - }, - "Bookmarks": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + SHIFT + D", - "label": "Bookmark All Tabs" - }, - { - "value": "CTRL + D", - "label": "Bookmark This Page" - }, - { - "value": "CTRL + B", - "label": "Bookmarks sidebar" - }, - { - "value": "CTRL + SHIFT + S", - "label": "Library window (Bookmarks)" - }, - { - "value": "(search field in Library) + Space", - "label": "Search for all Bookmarks" - } - ] - }, - "Tools": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + J", - "label": "Downloads" - }, - { - "value": "CTRL + SHIFT + A", - "label": "Add-ons" - }, - { - "value": "CTRL + ALT + I", - "label": "Toggle Developer Tools" - }, - { - "value": "CTRL + ALT + K", - "label": "Web Console" - }, - { - "value": "CTRL + ALT + C", - "label": "Inspector" - }, - { - "value": "CTRL + ALT + S", - "label": "Debugger" - }, - { - "value": "SHIFT + F7", - "label": "Style Editor" - }, - { - "value": "SHIFT + F5", - "label": "Profiler" - }, - { - "value": "CTRL + ALT + E", - "label": "Network" - }, - { - "value": "SHIFT + F2", - "label": "Developer Toolbar" - }, - { - "value": "CTRL + ALT + M", - "label": "Responsive Design View" - }, - { - "value": "SHIFT + F4", - "label": "Scratchpad" - }, - { - "value": "CTRL + U", - "label": "Page Source" - }, - { - "value": "CTRL + SHIFT + J", - "label": "Browser Console" - }, - { - "value": "CTRL + I", - "label": "Page Info" - } - ] - }, - "PDF Viewer": { - "_hidden": false, - "keybindings": [ - { - "value": "N / J / Right", - "label": "Next page" - }, - { - "value": "P / K / Left", - "label": "Previous page" - }, - { - "value": "CTRL + +", - "label": "Zoom in" - }, - { - "value": "CTRL + -", - "label": "Zoom out" - }, - { - "value": "CTRL + 0", - "label": "Automatic Zoom" - }, - { - "value": "R", - "label": "Rotate the document clockwise" - }, - { - "value": "CTRL + R", - "label": "Rotate counterclockwise" - }, - { - "value": "CTRL + ALT + P", - "label": "Switch to Presentation Mode" - }, - { - "value": "S", - "label": "Choose Text Selection Tool" - }, - { - "value": "H", - "label": "Choose Hand Tool" - }, - { - "value": "CTRL + ALT + G", - "label": "Focus the Page Number input box" - } - ] - }, - "Miscellaneous": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + Enter", - "label": "Complete .com address" - }, - { - "value": "SHIFT + Enter", - "label": "Complete .net address" - }, - { - "value": "CTRL + SHIFT + Enter", - "label": "Complete .org address" - }, - { - "value": "SHIFT + Delete", - "label": "Delete Selected Autocomplete Entry" - }, - { - "value": "CTRL + SHIFT + F", - "label": "Toggle Full Screen" - }, - { - "value": "CTRL + ALT + R", - "label": "Toggle Reader Mode" - }, - { - "value": "F7", - "label": "Caret Browsing" - }, - { - "value": "CTRL + L", - "label": "Select Location Bar" - } - ] - }, - "Media": { - "_hidden": false, - "keybindings": [ - { - "value": "Space", - "label": "Toggle Play/Pause" - }, - { - "value": "Down", - "label": "Decrease volume" - }, - { - "value": "Up", - "label": "Increase volume" - }, - { - "value": "CTRL + Down", - "label": "Mute audio" - }, - { - "value": "CTRL + Up", - "label": "Unmute audio" - }, - { - "value": "Left", - "label": "Seek back 15 seconds" - }, - { - "value": "CTRL + Left", - "label": "Seek back 10%" - }, - { - "value": "Right", - "label": "Seek forward 15 seconds" - }, - { - "value": "CTRL + Right", - "label": "Seek forward 10%" - }, - { - "value": "Home", - "label": "Seek to the beginning" - }, - { - "value": "End", - "label": "Seek to the end" - } - ] - } - } - } -} diff --git a/nixos/files/hyprland/pypr.toml b/nixos/files/hyprland/pypr.toml @@ -1,40 +0,0 @@ -[pyprland] -plugins = [ - "magnify", - "scratchpads", - "toggle_special" -] - -[scratchpads.top] -animation = "fromTop" -lazy = true -size = "75% 60%" - -[scratchpads.bottom] -animation = "fromBottom" -size = "75% 60%" -margin = 30 -lazy = true - -[scratchpads.calc] -command = "qalculate-gtk" -class = "qalculate-gtk" -use = "top" -unfocus = "hide" - -[scratchpads.term] -command = "kitty --class kitty-dropterm" -class = "kitty-dropterm" -use = "top" -unfocus = "hide" - -[scratchpads.clip] -use = "bottom" -command = "kitty --class kitty-clip 'clipse'" -class = "kitty-clip" - -[scratchpads.emoji] -use = "bottom" -command = "smile" -class = "it.mijorus.smile" -unfocus = "hide" diff --git a/nixos/files/hyprland/shaders/dim.frag b/nixos/files/hyprland/shaders/dim.frag @@ -1,14 +0,0 @@ -// Screen Dimming - -#version 300 es -precision highp float; - -in vec2 v_texcoord; -uniform sampler2D tex; - -out vec4 fragColor; - -void main() -{ - fragColor = texture(tex, v_texcoord) * 0.3; -} diff --git a/nixos/files/hyprland/shaders/invert.frag b/nixos/files/hyprland/shaders/invert.frag @@ -1,15 +0,0 @@ -// Invert Colors - -#version 300 es -precision highp float; - -in vec2 v_texcoord; -uniform sampler2D tex; - -out vec4 fragColor; - -void main() -{ - vec4 pixColor = texture(tex, v_texcoord); - fragColor = vec4(1.0 - pixColor.r, 1.0 - pixColor.g, 1.0 - pixColor.b, pixColor.a); -} diff --git a/nixos/files/hyprland/shaders/monochrome.frag b/nixos/files/hyprland/shaders/monochrome.frag @@ -1,21 +0,0 @@ -// Monochrome filter - -#version 300 es -precision mediump float; - -in vec2 v_texcoord; -uniform sampler2D tex; - -out vec4 fragColor; - -void main() -{ - vec4 pixColor = texture(tex, v_texcoord); - - // Check https://en.wikipedia.org/wiki/Grayscale#Luma_coding_in_video_systems for which one to choose - float lum = dot(pixColor.rgb, vec3(0.299, 0.587, 0.114)); // BT.601 - // float lum = dot(pixColor.rgb, vec3(0.2126, 0.7152, 0.0722)); // BT.709 - // float lum = dot(pixColor.rgb, vec3(0.2627, 0.6780, 0.0593)); // BT.2100 - - fragColor = vec4(vec3(lum), pixColor.a); -} diff --git a/nixos/files/hyprland/theme/drawer.css b/nixos/files/hyprland/theme/drawer.css @@ -1,26 +0,0 @@ -/* nwg-drawer Styling */ - -window { - background-color: transparent; -} - -button, -image { - background: none; - border: none; -} - -button:hover { - background-color: rgba (255, 255, 255, 0.1); -} - -#pinned-box { - padding-bottom: 5px; - border-bottom: 1px dotted gray; -} - -#files-box { - padding: 5px; - border: 1px dotted gray; - border-radius: 10px; -} diff --git a/nixos/files/hyprland/theme/hyprshell.css b/nixos/files/hyprland/theme/hyprshell.css @@ -1,49 +0,0 @@ -:root { - --text-color: #@white; - --bg-color: alpha(#@base00, 0.5); - --bg-window-color: alpha(#@base00, 0.7); - --bg-color-active: rgba(255, 255, 255, 0.2); - --bg-color-hover: rgba(255, 255, 255, 0.4); - --border-radius: 10px; - --border-size: 2px; - --border-color: #@base04; - --border-color-active: #@base05; - --border-style: solid; - --border-style-secondary: dashed; - --window-padding: 2px; -} - -.workspace.active { - border-color: var(--border-color-active); -} - -.workspace.special { - box-shadow: inset 0 0 9px #@base0D; -} - -.client.active { - background: var(--bg-color-active); - border-color: var(--border-color-active); -} - -.launch { - animation: pulse 0.7s normal infinite; -} - -@keyframes pulse { - 0% { - background: var(--bg-color); - } - 5% { - background: alpha(var(--border-color-active), 0.4); - } - 15% { - background: alpha(var(--border-color-active), 0.6); - } - 60% { - background: alpha(var(--border-color-active), 0.9); - } - 100% { - background: var(--bg-color); - } -} diff --git a/nixos/files/hyprland/theme/waybar.css b/nixos/files/hyprland/theme/waybar.css @@ -1,226 +0,0 @@ -* { - font-size: 16px; - font-weight: 500; - border-radius: 10px; - min-height: 0; -} -window#waybar { - background-color: alpha(@base00, 0.3); - border: 2px solid @base00; -} -tooltip { - background: alpha(@base00, 0.9); - color: @base05; - border: 1px solid @base0D; -} - -#custom-logo { - color: #ffffff; -} - -#user { - background-color: @base0F; - color: @base00; -} -#user > image { - padding-right: 5px; -} -#users .drawer box { - margin-left: 2px; -} -#custom-power { - color: @base08; -} - -#workspaces button { - color: @base00; - background-color: @base07; - border: 2px solid @base00; - padding: 4px 6px; -} -#workspaces button.active { - background-color: @base05; -} -#workspaces button.empty { - color: @base07; - background-color: transparent; -} -#workspaces button.empty .workspace-label { - padding-left: 4px; -} -#workspaces button.hosting-monitor.visible { - border: 2px solid @base04; -} -#workspaces button.special { - opacity: 0.8; - padding-right: 8px; - margin-left: 5px; -} -#workspaces .taskbar-window { - padding-left: 4px; -} - -#custom-dropdown { - color: #ffffff; -} - -#window { - color: @base0C; - background-color: transparent; -} - -#submap { - color: @base00; - background-color: @base08; -} - -#tray { - color: #ffffff; - margin: 0; - padding: 0; -} -#tray * { - margin-left: 8px; -} -#keyboard-state { - color: @base05; - opacity: 0.8; - border: 2px solid @base04; -} - -#bluetooth { - color: #ffffff; - background-color: transparent; -} -#bluetooth.disabled { - background-color: transparent; -} - -#network { - background-color: @base0B; - color: @base00; -} -#network.disconnected { - background-color: @base06; -} - -#wireplumber { - background-color: @base09; - color: @base00; -} -#wireplumber.muted { - background-color: @base06; -} -#mpris { - color: @base05; -} - -#backlight { - background-color: @base0E; - color: @base00; -} -#custom-temperature { - color: @base07; -} - -#battery { - background-color: @base0A; - color: @base00; -} -@keyframes blink { - to { - background-color: #ffffff; - } -} -#battery.critical:not(.charging) { - background-color: @base08; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; -} -#power-profiles-daemon.performance { - color: @base08; -} -#power-profiles-daemon.balanced { - color: @base0A; -} -#power-profiles-daemon.power-saver { - color: @base0B; -} - -#custom-weather { - color: @base00; - background-color: @base05; -} - -#clock { - background-color: @base0D; - color: @base00; -} - -#custom-notify { - color: @base0A; -} - -#idle_inhibitor { - color: @base09; - background-color: transparent; -} - -/* Area */ -#backlight, -#battery, -#bluetooth, -#clock, -#custom-dropdown, -#custom-logo, -#custom-notify, -#custom-minimized, -#custom-power, -#custom-temperature, -#custom-weather, -#idle_inhibitor, -#keyboard-state, -#network, -#power-profiles-daemon, -#window, -#wireplumber { - padding: 0 5px; - margin: 4px 2px; -} - -#workspaces { - margin: 3px 1px; -} -#user, -#submap { - padding: 0 5px; - margin: 5px 2px; -} - -#taskbar { - margin: 4px 2px; -} - -#mpris { - padding: 0; - margin: 0; -} -#mpris.playing { - margin-left: 2px; - margin-right: 6px; -} -#mpris.paused { - margin-left: 2px; - margin-right: 6px; -} - -#custom-power { - margin-right: 0; -} - -#power-profiles-daemon { - margin-right: 5px; -} diff --git a/nixos/files/hyprland/waycorner.toml b/nixos/files/hyprland/waycorner.toml @@ -1,11 +0,0 @@ -[overview] -command = [ "hyprctl", "dispatch", "hyprexpo:expo", "on" ] -locations = [ "top_left" ] -size = 10 -timeout_ms = 200 - -[workspace] -command = [ "hyprctl", "dispatch", "split:workspace", "empty" ] -locations = [ "top_right" ] -size = 10 -timeout_ms = 200 diff --git a/nixos/files/logseq/preferences.json b/nixos/files/logseq/preferences.json @@ -1,22 +0,0 @@ -{ - "theme": null, - "themes": { - "mode": "dark", - "light": null, - "dark": { - "name": "Default Dark Theme", - "url": null, - "description": "Logseq default dark theme.", - "mode": "dark", - "selected": true, - "group-first": true, - "group-desc": "dark themes" - } - }, - "externals": [], - "pinnedToolbarItems": [ - "logseq-git:git", - "logseq-tocgen:open-toc", - "logseq-journals-calendar:open-calendar" - ] -} diff --git a/nixos/files/logseq/settings/logseq-awesome-ui.json b/nixos/files/logseq/settings/logseq-awesome-ui.json @@ -1,23 +0,0 @@ -{ - "disabled": false, - "alwaysShowNewBlockBullet": true, - "compactSidebarMenu": true, - "contentHeading": null, - "headerHeading": null, - "headerVariant": "Wide", - "hideAddNewPage": false, - "hideHomeButton": true, - "hideRightSidebarToolbar": false, - "hideSidebarPageIcons": false, - "killAnimations": false, - "leftSidebarHeading": null, - "menuCalendar": true, - "navigationPosition": "Left", - "otherHeading": null, - "rightSidebarHeading": null, - "searchStyle": "Wide", - "tabsHeading": null, - "tabsPosition": "TopPanel", - "tabsStyle": "Awesome", - "vaultButtonToBottom": true -} diff --git a/nixos/files/logseq/settings/logseq-bullet-threading.json b/nixos/files/logseq/settings/logseq-bullet-threading.json @@ -1,6 +0,0 @@ -{ - "disabled": false, - "color": "", - "customColor": false, - "width": "2px" -} diff --git a/nixos/files/logseq/settings/logseq-git.json b/nixos/files/logseq/settings/logseq-git.json @@ -1,9 +0,0 @@ -{ - "disabled": false, - "autoCheckSynced": true, - "autoPush": false, - "checkWhenDBChanged": true, - "customCommitMessage": "feat: Notes", - "typeCommitMessage": "Custom Message With Date", - "buttons": ["Check Status", "Show Log", "Pull Rebase", "Commit & Push"] -} diff --git a/nixos/files/logseq/settings/logseq-journals-calendar.json b/nixos/files/logseq/settings/logseq-journals-calendar.json @@ -1,10 +0,0 @@ -{ - "disabled": false, - "backgroundColorOfContainerDark": "#@bg", - "backgroundColorOfContainerLight": "#@bg", - "firstDayOfWeek": 1, - "hotkey": null, - "keepOpenOnSelect": false, - "showTodayBtn": false, - "showWeekNumbers": true -} diff --git a/nixos/files/logseq/settings/logseq-move-block.json b/nixos/files/logseq/settings/logseq-move-block.json @@ -1,7 +0,0 @@ -{ - "disabled": false, - "settingsVersion": "v1", - "keyBindings": { - "moveBlock": "mod+shift+m" - } -} diff --git a/nixos/files/logseq/settings/logseq-pdf-export-plugin.json b/nixos/files/logseq/settings/logseq-pdf-export-plugin.json @@ -1,14 +0,0 @@ -{ - "disabled": false, - "blockExportHandling": "Keep title as heading of block", - "retainedOptions": "", - "template1CSS": "", - "template1Choice": "Bullets for non top level elements", - "template1Options": ["Inherit logseq CSS"], - "template2CSS": "", - "template2Choice": "Bullets througout the document", - "template2Options": ["Inherit logseq CSS"], - "template3CSS": "", - "template3Choice": "", - "template3Options": ["Inherit logseq CSS"] -} diff --git a/nixos/files/logseq/settings/logseq-tabs.json b/nixos/files/logseq/settings/logseq-tabs.json @@ -1,11 +0,0 @@ -{ - "disabled": false, - "tabs:close-button-left": false, - "tabs:close": "mod+shift+w", - "tabs:hide-close-all-button": false, - "tabs:inherit-custom-css": true, - "tabs:select-next": "ctrl+tab", - "tabs:select-prev": "ctrl+shift+tab", - "tabs:show-single-tab": true, - "tabs:toggle-pin": "" -} diff --git a/nixos/files/logseq/settings/logseq-tocgen.json b/nixos/files/logseq/settings/logseq-tocgen.json @@ -1,13 +0,0 @@ -{ - "disabled": false, - "defaultExpansionLevel": 1, - "defaultHeadingType": "h", - "defaultLevels": 6, - "hideBackTop": false, - "hideGoDown": false, - "maxScrollTryCount": 20, - "noPageJump": false, - "openShortcut": "", - "pageScrollBehavior": "top", - "showTags": false -} diff --git a/nixos/files/nanorc b/nixos/files/nanorc @@ -1,9 +0,0 @@ -set autoindent -set indicator -set linenumbers -set locking -set matchbrackets "(<[{)>]}" -set minibar -set mouse -set nonewlines -set smarthome diff --git a/nixos/files/niri/rofi.rasi b/nixos/files/niri/rofi.rasi @@ -1,315 +0,0 @@ -/** - * Rofi Configuration - * Source: https://github.com/adi1090x/rofi - **/ - -configuration { - modi: "drun,filebrowser,window,calc,emoji"; - show-icons: true; - eh: 2; - display-drun: " Apps"; - display-filebrowser: " Files"; - display-window: " Windows"; - display-calc: " Calc"; - display-emoji: " Emoji"; - drun-display-format: "{name} [<span weight='light' size='small'>({generic})</span>]\n<i><span weight='light' size='small'>{exec}</span></i>"; - window-format: "{c} · {t}"; - cache-dir: "~/.cache/rofi"; -} - -/* Global Properties */ -* { - background: #@base01; - background-alt: #@base02; - foreground: #@base05; - selected: #@base0D; - active: #@base0C; - urgent: #@base08; - - border-colour: var(selected); - handle-colour: var(selected); - background-colour: var(background); - foreground-colour: var(foreground); - alternate-background: var(background-alt); - normal-background: var(background); - normal-foreground: var(foreground); - urgent-background: var(urgent); - urgent-foreground: var(background); - active-background: var(active); - active-foreground: var(background); - selected-normal-background: var(selected); - selected-normal-foreground: var(background); - selected-urgent-background: var(active); - selected-urgent-foreground: var(background); - selected-active-background: var(urgent); - selected-active-foreground: var(background); - alternate-normal-background: var(background); - alternate-normal-foreground: var(foreground); - alternate-urgent-background: var(urgent); - alternate-urgent-foreground: var(background); - alternate-active-background: var(active); - alternate-active-foreground: var(background); -} - -/* Main Window */ -window { - /* Properties for 'window' widget */ - transparency: "real"; - location: center; - anchor: center; - fullscreen: false; - width: 800px; - x-offset: 0px; - y-offset: 0px; - - /* Properties for all widgets */ - enabled: true; - margin: 0px; - padding: 0px; - border: 0px solid; - border-radius: 10px; - border-color: @border-colour; - cursor: "default"; - background-color: @background-colour; -} - -/* Main Box */ -mainbox { - enabled: true; - spacing: 10px; - margin: 0px; - padding: 20px; - border: 0px solid; - border-radius: 0px 0px 0px 0px; - border-color: @border-colour; - background-color: transparent; - children: [ "inputbar", "message", "custombox" ]; -} - -/* Custom Box */ -custombox { - spacing: 10px; - background-color: @background-colour; - text-color: @foreground-colour; - orientation: horizontal; - children: [ "mode-switcher", "listview" ]; -} - -/* Input Bar */ -inputbar { - enabled: true; - spacing: 10px; - margin: 0px; - padding: 8px 12px; - border: 0px solid; - border-radius: 8px; - border-color: @border-colour; - background-color: @alternate-background; - text-color: @foreground-colour; - children: [ "textbox-prompt-colon", "entry" ]; -} - -prompt { - enabled: true; - background-color: inherit; - text-color: inherit; -} -textbox-prompt-colon { - enabled: true; - padding: 5px 0px; - expand: false; - str: ""; - background-color: inherit; - text-color: inherit; -} -entry { - enabled: true; - padding: 5px 0px; - background-color: inherit; - text-color: inherit; - cursor: text; - placeholder: "Search..."; - placeholder-color: inherit; -} -num-filtered-rows { - enabled: true; - expand: false; - background-color: inherit; - text-color: inherit; -} -textbox-num-sep { - enabled: true; - expand: false; - str: "/"; - background-color: inherit; - text-color: inherit; -} -num-rows { - enabled: true; - expand: false; - background-color: inherit; - text-color: inherit; -} -case-indicator { - enabled: true; - background-color: inherit; - text-color: inherit; -} - -/* List View */ -listview { - enabled: true; - columns: 1; - lines: 8; - cycle: true; - dynamic: true; - scrollbar: true; - layout: vertical; - reverse: false; - fixed-height: true; - fixed-columns: true; - - spacing: 5px; - margin: 0px; - padding: 0px; - border: 0px solid; - border-radius: 0px; - border-color: @border-colour; - background-color: transparent; - text-color: @foreground-colour; - cursor: "default"; -} -scrollbar { - handle-width: 5px ; - handle-color: @handle-colour; - border-radius: 10px; - background-color: @alternate-background; -} - -/* Elements */ -element { - enabled: true; - spacing: 10px; - margin: 0px; - padding: 10px; - border: 0px solid; - border-radius: 8px; - border-color: @border-colour; - background-color: transparent; - text-color: @foreground-colour; - cursor: pointer; -} -element normal.normal { - background-color: var(normal-background); - text-color: var(normal-foreground); -} -element normal.urgent { - background-color: var(urgent-background); - text-color: var(urgent-foreground); -} -element normal.active { - background-color: var(active-background); - text-color: var(active-foreground); -} -element selected.normal { - background-color: var(selected-normal-background); - text-color: var(selected-normal-foreground); -} -element selected.urgent { - background-color: var(selected-urgent-background); - text-color: var(selected-urgent-foreground); -} -element selected.active { - background-color: var(selected-active-background); - text-color: var(selected-active-foreground); -} -element alternate.normal { - background-color: var(alternate-normal-background); - text-color: var(alternate-normal-foreground); -} -element alternate.urgent { - background-color: var(alternate-urgent-background); - text-color: var(alternate-urgent-foreground); -} -element alternate.active { - background-color: var(alternate-active-background); - text-color: var(alternate-active-foreground); -} -element-icon { - background-color: transparent; - text-color: inherit; - size: 24px; - cursor: inherit; -} -element-text { - background-color: transparent; - text-color: inherit; - highlight: inherit; - cursor: inherit; - vertical-align: 0.5; - horizontal-align: 0.0; -} - -/* Mode Switcher */ -mode-switcher{ - enabled: true; - expand: false; - orientation: vertical; - spacing: 10px; - margin: 0px; - padding: 0px 0px; - border: 0px solid; - border-radius: 0px; - border-color: @border-colour; - background-color: transparent; - text-color: @foreground-colour; -} -button { - padding: 0px 20px 0px 20px; - border: 0px solid; - border-radius: 8px; - border-color: @border-colour; - background-color: @alternate-background; - text-color: inherit; - vertical-align: 0.5; - horizontal-align: 0.0; - cursor: pointer; -} -button selected { - background-color: var(selected-normal-background); - text-color: var(selected-normal-foreground); -} - -/* Message */ -message { - enabled: true; - margin: 0px; - padding: 0px; - border: 0px solid; - border-radius: 0px 0px 0px 0px; - border-color: @border-colour; - background-color: transparent; - text-color: @foreground-colour; -} -textbox { - padding: 12px; - border: 0px solid; - border-radius: 8px; - border-color: @border-colour; - background-color: @alternate-background; - text-color: @foreground-colour; - vertical-align: 0.5; - horizontal-align: 0.0; - highlight: none; - placeholder-color: @foreground-colour; - blink: true; - markup: true; -} -error-message { - padding: 10px; - border: 2px solid; - border-radius: 8px; - border-color: @border-colour; - background-color: @background-colour; - text-color: @foreground-colour; -} diff --git a/nixos/files/niri/theme/drawer.css b/nixos/files/niri/theme/drawer.css @@ -1,26 +0,0 @@ -/* nwg-drawer Styling */ - -window { - background-color: alpha(#@base00, 0.8); -} - -button, -image { - background: none; - border: none; -} - -button:hover { - background-color: rgba(255, 255, 255, 0.5); -} - -#pinned-box { - padding-bottom: 5px; - border-bottom: 1px dotted gray; -} - -#files-box { - padding: 5px; - border: 1px dotted gray; - border-radius: 10px; -} diff --git a/nixos/files/niri/theme/waybar.css b/nixos/files/niri/theme/waybar.css @@ -1,202 +0,0 @@ -* { - font-size: 16px; - font-weight: 500; - border-radius: 10px; - min-height: 0; - min-width: 0; -} -window#waybar { - background-color: alpha(@base00, 0.9); - border: 2px solid @base00; - border-radius: 0; -} -tooltip { - background: alpha(@base00, 0.9); - color: @base05; - border: 1px solid @base0D; -} - -#custom-logo { - color: #ffffff; -} - -#custom-user { - background-color: @base0F; - color: @base00; -} -#custom-power { - color: @base08; -} - -#workspaces button { - color: @base00; - background-color: @base07; - border: 2px solid @base00; - padding: 3px; - margin: 1px 0; -} -#workspaces button.current_output { - border: 2px solid @base02; -} -#workspaces button.active { - background-color: @base05; - border: 2px solid @base04; -} -#workspaces button.empty { - color: @base07; - background-color: transparent; -} - -#window { - background-color: @base0C; -} -#window * { - padding-left: 0.5em; -} -#window label { - padding: 0; - margin: 0; -} -window#waybar.empty #window { - background-color: transparent; -} - -#custom-dropdown { - color: #ffffff; -} -#tray { - color: #ffffff; - margin: 0; - padding: 0; -} -#tray * { - margin-bottom: 8px; -} -#keyboard-state { - color: @base05; - opacity: 0.8; - border: 2px solid @base04; -} - -#bluetooth { - color: #ffffff; - background-color: transparent; -} -#bluetooth.disabled { - background-color: transparent; -} - -#network { - background-color: @base0B; - color: @base00; -} -#network.disconnected { - background-color: @base06; -} - -#media .drawer box { - margin-right: 0px; -} -#wireplumber { - background-color: @base09; - color: @base00; -} -#wireplumber.muted { - background-color: @base06; -} -#mpris { - color: @base05; -} - -#backlight { - background-color: @base0E; - color: @base00; -} -#custom-temperature { - color: @base07; -} - -#battery { - background-color: @base0A; - color: @base00; -} -@keyframes blink { - to { - background-color: #ffffff; - } -} -#battery.critical:not(.charging) { - background-color: @base08; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; -} -#power-profiles-daemon.performance { - color: @base08; -} -#power-profiles-daemon.balanced { - color: @base0A; -} -#power-profiles-daemon.power-saver { - color: @base0B; -} - -#custom-weather { - color: @base00; - background-color: @base05; -} - -#clock { - background-color: @base0D; - color: @base00; -} - -#custom-notify { - color: @base0A; -} - -#idle_inhibitor { - color: @base09; - background-color: transparent; -} - -#backlight, -#battery, -#bluetooth, -#clock, -#custom-dropdown, -#custom-logo, -#custom-notify, -#custom-power, -#custom-temperature, -#custom-user, -#custom-weather, -#idle_inhibitor, -#keyboard-state, -#mpris, -#network, -#power-profiles-daemon, -#wireplumber { - padding: 3px; - margin: 2px; -} - -#clock { - padding-left: 0.4em; -} - -#keyboard-state { - margin-bottom: 10px; -} - -#window { - margin: 2px; - padding-top: 3px; - padding-bottom: 3px; -} - -#workspaces { - margin: 3px 2px; -} diff --git a/nixos/files/pcmanfm.conf b/nixos/files/pcmanfm.conf @@ -1,116 +0,0 @@ -[Behavior] -AutoSelectionDelay=600 -BookmarkOpenMethod=current_tab -ConfirmDelete=true -ConfirmTrash=false -CtrlRightClick=false -NoUsbTrash=false -QuickExec=false -RecentFilesNumber=0 -SelectNewFiles=false -SingleClick=false -SingleWindowMode=true -UseTrash=true - -[Desktop] -AllSticky=true -BgColor=#000000 -DesktopCellMargins=@Size(3 1) -DesktopIconSize=48 -DesktopShortcuts=@Invalid() -FgColor=#ffffff -Font="@font,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular" -HideItems=false -LastSlide= -OpenWithDefaultFileManager=true -PerScreenWallpaper=false -ShadowColor=#000000 -ShowHidden=false -SlideShowInterval=0 -SortColumn=name -SortFolderFirst=true -SortHiddenLast=false -SortOrder=ascending -TransformWallpaper=false -Wallpaper=@wallpaper -WallpaperDialogSize=@Size(700 500) -WallpaperDialogSplitterPos=200 -WallpaperDirectory= -WallpaperMode=stretch -WallpaperRandomize=false -WorkAreaMargins=15, 60, 15, 30 - -[FolderView] -BackupAsHidden=false -BigIconSize=48 -CustomColumnWidths=@Invalid() -FolderViewCellMargins=@Size(3 3) -HiddenColumns=@Invalid() -Mode=icon -NoItemTooltip=false -ScrollPerPixel=true -ShadowHidden=true -ShowFilter=false -ShowFullNames=true -ShowHidden=false -SidePaneIconSize=24 -SmallIconSize=24 -SortCaseSensitive=false -SortColumn=name -SortFolderFirst=true -SortHiddenLast=false -SortOrder=ascending -ThumbnailIconSize=128 - -[Places] -HiddenPlaces=@Invalid() - -[Search] -ContentPatterns=@Invalid() -MaxSearchHistory=0 -NamePatterns=@Invalid() -searchContentCaseInsensitive=false -searchContentRegexp=true -searchNameCaseInsensitive=true -searchNameRegexp=false -searchRecursive=true -searchhHidden=true - -[System] -Archiver=@archiver -FallbackIconThemeName=@icon -OnlyUserTemplates=true -SIUnit=false -SuCommand=lxqt-sudo %s -TemplateRunApp=false -TemplateTypeOnce=false -Terminal=@terminal - -[Thumbnail] -MaxExternalThumbnailFileSize=-1 -MaxThumbnailFileSize=4096 -ShowThumbnails=true -ThumbnailLocalFilesOnly=true - -[Volume] -AutoRun=true -CloseOnUnmount=true -MountOnStartup=false -MountRemovable=false - -[Window] -AlwaysShowTabs=false -FixedHeight=480 -FixedWidth=640 -PathBarButtons=true -RememberWindowSize=false -ReopenLastTabs=false -ShowMenuBar=true -ShowTabClose=true -SidePaneMode=places -SidePaneVisible=true -SplitView=false -SplitViewTabsNum=0 -SplitterPos=150 -SwitchToNewTab=false -TabPaths=@Invalid() diff --git a/nixos/files/repl.nix b/nixos/files/repl.nix @@ -1,47 +0,0 @@ -{ - path ? /etc/nixos, - host ? false, -}: -let - inherit (builtins) - currentSystem - getFlake - head - match - pathExists - readFile - removeAttrs - toString - ; - - flake = - if pathExists "${path}/flake.nix" then getFlake "${toString path}" else getFlake "/etc/nixos"; - - pkgs = - if (flake.inputs ? nixpkgs) then - import flake.inputs.nixpkgs.outPath { } - else if (flake.legacyPackages ? currentSystem) then - import flake.legacyPackages."${currentSystem}" - else - import <nixpkgs> { }; -in -{ - inherit flake; -} -// builtins -// (removeAttrs (pkgs // pkgs.lib) [ - "options" - "config" -]) -// flake -// (flake.nixosConfigurations or { }) -// ( - if host then - flake.nixosConfigurations."${head ( - match '' - ([a-zA-Z0-9\-]+) - '' (readFile "/etc/hostname") - )}" - else - { } -) diff --git a/nixos/files/sunsetr/presets/3000/sunsetr.toml b/nixos/files/sunsetr/presets/3000/sunsetr.toml @@ -1,3 +0,0 @@ -transition_mode = "static" -static_temp = 3000 -static_gamma = 100 diff --git a/nixos/files/sunsetr/presets/4000/sunsetr.toml b/nixos/files/sunsetr/presets/4000/sunsetr.toml @@ -1,3 +0,0 @@ -transition_mode = "static" -static_temp = 4000 -static_gamma = 100 diff --git a/nixos/files/sunsetr/presets/5000/sunsetr.toml b/nixos/files/sunsetr/presets/5000/sunsetr.toml @@ -1,3 +0,0 @@ -transition_mode = "static" -static_temp = 5000 -static_gamma = 100 diff --git a/nixos/files/sunsetr/presets/6000/sunsetr.toml b/nixos/files/sunsetr/presets/6000/sunsetr.toml @@ -1,3 +0,0 @@ -transition_mode = "static" -static_temp = 6000 -static_gamma = 100 diff --git a/nixos/files/sunsetr/presets/7000/sunsetr.toml b/nixos/files/sunsetr/presets/7000/sunsetr.toml @@ -1,3 +0,0 @@ -transition_mode = "static" -static_temp = 7000 -static_gamma = 100 diff --git a/nixos/files/sunsetr/presets/8000/sunsetr.toml b/nixos/files/sunsetr/presets/8000/sunsetr.toml @@ -1,3 +0,0 @@ -transition_mode = "static" -static_temp = 8000 -static_gamma = 100 diff --git a/nixos/files/sunsetr/sunsetr.toml b/nixos/files/sunsetr/sunsetr.toml @@ -1,16 +0,0 @@ -backend = "auto" -transition_mode = "start_at" - -smoothing = true -startup_duration = 0.5 -shutdown_duration = 0.5 -adaptive_interval = 1 - -sunset = "19:00:00" -sunrise = "06:00:00" -transition_duration = 15 -night_temp = 4000 -day_temp = 6500 -night_gamma = 90 -day_gamma = 100 -update_interval = 60 diff --git a/nixos/files/swaync.css b/nixos/files/swaync.css @@ -1,251 +0,0 @@ -* { - all: unset; - transition: 200ms; - font-family: @font; - font-size: 16px; - font-weight: 500; -} - -/* -- Notification -- */ -.notification-background { - background: alpha(#@base01, 0.9); - color: #@base05; - margin: 6px 12px; - border-radius: 7px; - border: solid 0.5px #@base05; - padding: 0; -} - -.notification { - padding: 7px; - border-radius: 7px; -} - -.notification.critical { - box-shadow: inset 0 0 7px #@base08; -} - -.notification-content { - margin: 7px; -} - -/* Icon */ -.notification-content overlay { - margin-right: 10px; -} - -.notification-content image { - -gtk-icon-size: 48px; - min-width: 48px; - min-height: 48px; - margin-right: 6px; -} - -.notification .app-icon { - -gtk-icon-size: 24px; - -gtk-icon-shadow: 0 1px 4px black; -} - -/* Text */ -.notification-content .summary { - color: #@base05; - margin-bottom: 4px; -} - -.notification-content .time { - color: #@base04; -} - -.notification-content .body { - color: #@base05; - font-size: 14px; -} - -/* Buttons */ -.close-button { - margin: 7px; - padding: 4px; - border-radius: 7px; - background: #@base08; - color: #@base00; -} - -.close-button:hover { - background: #@base09; -} - -.notification-action { - background: #@base02; - color: #@base05; - margin: 3px; - padding: 6px; - border-radius: 7px; - box-shadow: inset 0 0 0 1px #@base03; - font-size: 12px; -} - -.notification-action:hover { - background: #@base03; -} - -/* Progress Bar */ -.notification progress, -.notification trough, -.notification progressbar { - border-radius: 7px; - padding: 3px 0; -} - -.notification.low progress, -.notification.normal progress { - background: #@base0D; -} - -.notification.critical progress { - background: #@base08; -} - -/* -- Control Center -- */ -.control-center { - background: alpha(#@base00, 0.9); - color: #@base05; - padding: 14px; - border-radius: 7px; - box-shadow: inset 0 0 0 2px #@base02; -} - -/* Title */ -.widget-title { - margin-bottom: 10px; -} - -.widget-title > label { - font-size: 1.3em; -} - -.widget-title button { - background: #@base02; - color: #@base05; - padding: 7px; - border-radius: 7px; - box-shadow: inset 0 0 0 1px #@base03; -} - -.widget-title button:hover { - background: #@base03; -} - -/* DND */ -.widget-dnd { - padding: 10px; -} - -.widget-dnd > switch { - min-width: 30px; - min-height: 15px; - border-radius: 999px; - background: #@base02; -} - -.widget-dnd > switch:checked { - background: #@base0D; -} - -.widget-dnd > switch slider { - min-width: 15px; - min-height: 15px; - margin: 2px; - border-radius: 999px; - background: #@base05; -} - -/* Notifications */ -.widget-notifications { - min-height: 400px; -} - -.notification-group { - margin-top: 12px; - padding: 0 4px; -} - -.notification-group-headers { - margin-bottom: 5px; -} - -.notification-group-icon { - margin-left: 5px; - margin-right: 12px; -} - -.notification-group-header { - margin-left: 4px; -} - -.notification-group-buttons { - margin-right: 7px; -} - -/* Volume/Backlight */ -.widget-volume, -.widget-backlight { - padding: 10px; -} - -.widget-volume trough highlight { - background: #@base0C; -} - -.widget-backlight trough highlight { - background: #@base0A; -} - -/* Sliders */ -scale { - margin: 0 7px; -} - -scale trough { - margin: 0rem 1rem; - min-height: 10px; - min-width: 70px; - border-radius: 7px; -} - -trough { - background-color: #@base02; -} - -trough highlight { - background: #@base0D; -} - -trough slider { - margin: -10px; - border-radius: 7px; - background-color: #@base0D; - box-shadow: 0 0 2px rgba(0, 0, 0, 0.8); -} - -trough slider:hover { - box-shadow: - 0 0 2px rgba(0, 0, 0, 0.8), - 0 0 8px #@base0D; -} - -/* Scrollbar */ -scrollbar slider { - min-width: 3px; - margin: 0 1px; - border-radius: 99px; - background-color: #@base0D; - opacity: 0.4; - box-shadow: none; - border: none; -} - -scrollbar:hover slider { - min-width: 5px; - opacity: 0.8; - box-shadow: none; -} diff --git a/nixos/files/tmuxrc.tmux b/nixos/files/tmuxrc.tmux @@ -1,11 +0,0 @@ -set -g default-command "${SHELL}" -set-option -g mouse on -set-option -g focus-events on -set -g set-clipboard on -set-option -g automatic-rename on -set-option -g status-style bg=default -set-option -ga terminal-overrides ",xterm*:Tc" - -# Split with same directory -bind | split-window -h -c "#{pane_current_path}" -bind - split-window -v -c "#{pane_current_path}" diff --git a/nixos/files/vscode/keybindings.json b/nixos/files/vscode/keybindings.json @@ -1,28 +0,0 @@ -[ - { - "key": "ctrl+/", - "command": "workbench.action.showCommands" - }, - { - "key": "ctrl+d", - "command": "editor.action.deleteLines" - }, - { - "key": "alt+t", - "command": "workbench.action.terminal.focus" - }, - { - "key": "ctrl+shift+t", - "command": "workbench.action.createTerminalEditor" - }, - { - "key": "ctrl+'", - "command": "editor.action.addCommentLine", - "when": "editorTextFocus && !editorReadonly" - }, - { - "key": "ctrl+shift+'", - "command": "editor.action.removeCommentLine", - "when": "editorTextFocus && !editorReadonly" - } -] diff --git a/nixos/files/vscode/settings.json b/nixos/files/vscode/settings.json @@ -1,94 +0,0 @@ -{ - "chat.disableAIFeatures": true, - "editor.cursorBlinking": "expand", - "editor.cursorSmoothCaretAnimation": "on", - "editor.cursorStyle": "line-thin", - "editor.formatOnSave": true, - "editor.smoothScrolling": true, - "editor.suggest.preview": true, - "editor.suggest.showStatusBar": true, - "editor.unfoldOnClickAfterEndOfLine": true, - "explorer.confirmDelete": false, - "explorer.incrementalNaming": "smart", - "explorer.openEditors.visible": 7, - "extensions.autoCheckUpdates": false, - "extensions.autoUpdate": false, - "extensions.ignoreRecommendations": true, - "files.autoSave": "onWindowChange", - "files.trimFinalNewlines": true, - "search.showLineNumbers": true, - "search.smartCase": true, - "search.useGlobalIgnoreFiles": true, - "search.useParentIgnoreFiles": true, - "terminal.integrated.cursorStyle": "line", - "terminal.integrated.enableVisualBell": true, - "terminal.integrated.tabs.separator": " / ", - "update.mode": "none", - "window.autoDetectColorScheme": false, - "window.closeWhenEmpty": true, - "window.commandCenter": true, - "window.dialogStyle": "custom", - "window.doubleClickIconToClose": true, - "window.menuBarVisibility": "toggle", - "window.titleSeparator": " / ", - "workbench.commandPalette.preserveInput": true, - "workbench.editor.highlightModifiedTabs": true, - "workbench.list.horizontalScrolling": true, - "workbench.list.smoothScrolling": true, - "workbench.startupEditor": "readme", - - "editor.defaultFormatter": "esbenp.prettier-vscode", - "better-comments.highlightPlainText": true, - "gitlens.advanced.commitOrdering": "date", - "gitlens.advanced.fileHistoryFollowsRenames": true, - "scm.repositories.visible": 7, - "todohighlight.isCaseSensitive": true, - "todohighlight.keywords": [ - { - "text": "TODO", - "color": "#333", - "backgroundColor": "#2ecc71" - }, - { - "text": "FIXME", - "color": "#333", - "backgroundColor": "#e67e22" - }, - { - "text": "BUG", - "color": "#333", - "backgroundColor": "#e74c3c" - }, - { - "text": "HACK", - "color": "#333", - "backgroundColor": "#f1c40f" - }, - { - "text": "WONTFIX", - "color": "#333", - "backgroundColor": "#3498db" - } - ], - "nix.enableLanguageServer": true, - "nix.serverPath": "nil", - "nix.serverSettings": { - "nil": { - "formatting": { - "command": ["nixfmt"] - } - } - }, - "[nix]": { - "editor.defaultFormatter": "jnoortheen.nix-ide" - }, - "[cpp]": { - "editor.defaultFormatter": "ms-vscode.cpptools" - }, - "[python]": { - "editor.defaultFormatter": "ms-python.black-formatter" - }, - "[xml]": { - "editor.defaultFormatter": "DotJoshJohnson.xml" - } -} diff --git a/nixos/files/wlogout.css b/nixos/files/wlogout.css @@ -1,32 +0,0 @@ -* { - background: none; -} - -window { - background-color: rgba(0, 0, 0, 0.7); -} - -button { - background: rgba(0, 0, 0, 0.05); - border-radius: 8px; - box-shadow: - inset 0 0 0 1px rgba(255, 255, 255, 0.1), - 0 0 rgba(0, 0, 0, 0.5); - transition: background-color 0.2s ease-in-out; - margin: 1rem; -} - -button:focus, -button:hover { - background-color: rgba(255, 255, 255, 0.2); -} - -button:active { - background-color: rgba(255, 255, 255, 0.5); -} - -label { - font-size: 10rem; - margin: 5rem; - color: #@base05; -} diff --git a/nixos/files/ytmusic.json b/nixos/files/ytmusic.json @@ -1,56 +0,0 @@ -{ - "window-size": { - "width": 800, - "height": 800 - }, - "window-maximized": true, - "window-position": { - "x": 0, - "y": 0 - }, - "url": "https://music.youtube.com", - "options": { - "tray": true, - "appVisible": true, - "autoUpdates": false, - "alwaysOnTop": false, - "hideMenu": true, - "hideMenuWarned": true, - "startAtLogin": false, - "disableHardwareAcceleration": false, - "removeUpgradeButton": false, - "restartOnConfigChanges": false, - "trayClickPlayPause": false, - "autoResetAppCache": false, - "resumeOnStart": true, - "likeButtons": "", - "proxy": "", - "startingPage": "", - "overrideUserAgent": false, - "usePodcastParticipantAsArtist": false, - "themes": ["@theme"] - }, - "plugins": { - "notifications": {}, - "video-toggle": { - "mode": "custom" - }, - "precise-volume": { - "globalShortcuts": {} - }, - "discord": { - "listenAlong": true - }, - "album-color-theme": { - "enabled": false - }, - "crossfade": { - "enabled": true - } - }, - "__internal__": { - "migrations": { - "version": "3.9.0" - } - } -} diff --git a/nixos/flake.lock b/nixos/flake.lock @@ -1,2068 +0,0 @@ -{ - "nodes": { - "aquamarine": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1763922789, - "narHash": "sha256-XnkWjCpeXfip9tqYdL0b0zzBDjq+dgdISvEdSVGdVyA=", - "owner": "hyprwm", - "repo": "aquamarine", - "rev": "a20a0e67a33b6848378a91b871b89588d3a12573", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.10.0", - "repo": "aquamarine", - "type": "github" - } - }, - "base16": { - "inputs": { - "fromYaml": "fromYaml" - }, - "locked": { - "lastModified": 1755819240, - "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=", - "owner": "SenchoPens", - "repo": "base16.nix", - "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6", - "type": "github" - }, - "original": { - "owner": "SenchoPens", - "repo": "base16.nix", - "type": "github" - } - }, - "base16-fish": { - "flake": false, - "locked": { - "lastModified": 1765809053, - "narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=", - "owner": "tomyun", - "repo": "base16-fish", - "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", - "type": "github" - }, - "original": { - "owner": "tomyun", - "repo": "base16-fish", - "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", - "type": "github" - } - }, - "base16-helix": { - "flake": false, - "locked": { - "lastModified": 1760703920, - "narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=", - "owner": "tinted-theming", - "repo": "base16-helix", - "rev": "d646af9b7d14bff08824538164af99d0c521b185", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-helix", - "type": "github" - } - }, - "base16-vim": { - "flake": false, - "locked": { - "lastModified": 1732806396, - "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", - "owner": "tinted-theming", - "repo": "base16-vim", - "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-vim", - "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", - "type": "github" - } - }, - "boot": { - "inputs": { - "crane": "crane", - "nixpkgs": [ - "nixpkgs" - ], - "pre-commit": "pre-commit", - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1766146127, - "narHash": "sha256-6bA+9FNE7bWOUanW6Mujcbzhm9A74dCTUBX5/bA0RVQ=", - "owner": "nix-community", - "repo": "lanzaboote", - "rev": "b8c5ab2bd227f840bc8e1944631fe718b19c3336", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "v1.0.0", - "repo": "lanzaboote", - "type": "github" - } - }, - "catppuccin": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1768256610, - "narHash": "sha256-IyL6nZo242nDLoLQVwkqAZXp8FO5kBfjL6Fuh+gZO10=", - "owner": "catppuccin", - "repo": "nix", - "rev": "0734ad8c91342df34f1a1e5c183d053d70ba87c7", - "type": "github" - }, - "original": { - "owner": "catppuccin", - "ref": "release-25.11", - "repo": "nix", - "type": "github" - } - }, - "crane": { - "locked": { - "lastModified": 1765739568, - "narHash": "sha256-gQYx35Of4UDKUjAYvmxjUEh/DdszYeTtT6MDin4loGE=", - "owner": "ipetkov", - "repo": "crane", - "rev": "67d2baff0f9f677af35db61b32b5df6863bcc075", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "crane_2": { - "locked": { - "lastModified": 1767461147, - "narHash": "sha256-TH/xTeq/RI+DOzo+c+4F431eVuBpYVwQwBxzURe7kcI=", - "owner": "ipetkov", - "repo": "crane", - "rev": "7d59256814085fd9666a2ae3e774dc5ee216b630", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "filters": { - "locked": { - "lastModified": 1757882181, - "narHash": "sha256-+cCxYIh2UNalTz364p+QYmWHs0P+6wDhiWR4jDIKQIU=", - "owner": "numtide", - "repo": "nix-filter", - "rev": "59c44d1909c72441144b93cf0f054be7fe764de5", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "nix-filter", - "type": "github" - } - }, - "firefox-gnome-theme": { - "flake": false, - "locked": { - "lastModified": 1764873433, - "narHash": "sha256-1XPewtGMi+9wN9Ispoluxunw/RwozuTRVuuQOmxzt+A=", - "owner": "rafaelmardojai", - "repo": "firefox-gnome-theme", - "rev": "f7ffd917ac0d253dbd6a3bf3da06888f57c69f92", - "type": "github" - }, - "original": { - "owner": "rafaelmardojai", - "repo": "firefox-gnome-theme", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_4": { - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "revCount": 69, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" - } - }, - "flake-compat_5": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flatpak": { - "locked": { - "lastModified": 1767983141, - "narHash": "sha256-7ZCulYUD9RmJIDULTRkGLSW1faMpDlPKcbWJLYHoXcs=", - "owner": "gmodena", - "repo": "nix-flatpak", - "rev": "440818969ac2cbd77bfe025e884d0aa528991374", - "type": "github" - }, - "original": { - "owner": "gmodena", - "ref": "latest", - "repo": "nix-flatpak", - "type": "github" - } - }, - "formatter": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769691507, - "narHash": "sha256-8aAYwyVzSSwIhP2glDhw/G0i5+wOrren3v6WmxkVonM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "28b19c5844cc6e2257801d43f2772a4b4c050a1b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "framework": { - "inputs": { - "nixpkgs-lib": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1768135262, - "narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "fromYaml": { - "flake": false, - "locked": { - "lastModified": 1731966426, - "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", - "owner": "SenchoPens", - "repo": "fromYaml", - "rev": "106af9e2f715e2d828df706c386a685698f3223b", - "type": "github" - }, - "original": { - "owner": "SenchoPens", - "repo": "fromYaml", - "type": "github" - } - }, - "gaming": { - "inputs": { - "flake-parts": [ - "framework" - ], - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1769826495, - "narHash": "sha256-jyfGSLu7TjgwaZb7wgUJnAEtcoksqG4f0LORh4JBcdM=", - "owner": "fufexan", - "repo": "nix-gaming", - "rev": "84471e0ca212961bd297a2b9017582041c903ddd", - "type": "github" - }, - "original": { - "owner": "fufexan", - "repo": "nix-gaming", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "boot", - "pre-commit", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gitignore_2": { - "inputs": { - "nixpkgs": [ - "hyprland", - "hyprland", - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gnome-shell": { - "flake": false, - "locked": { - "host": "gitlab.gnome.org", - "lastModified": 1767737596, - "narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=", - "owner": "GNOME", - "repo": "gnome-shell", - "rev": "ef02db02bf0ff342734d525b5767814770d85b49", - "type": "gitlab" - }, - "original": { - "host": "gitlab.gnome.org", - "owner": "GNOME", - "ref": "gnome-49", - "repo": "gnome-shell", - "type": "gitlab" - } - }, - "hardware": { - "locked": { - "lastModified": 1769302137, - "narHash": "sha256-QEDtctEkOsbx8nlFh4yqPEOtr4tif6KTqWwJ37IM2ds=", - "owner": "NixOS", - "repo": "nixos-hardware", - "rev": "a351494b0e35fd7c0b7a1aae82f0afddf4907aa8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixos-hardware", - "type": "github" - } - }, - "home": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769580047, - "narHash": "sha256-tNqCP/+2+peAXXQ2V8RwsBkenlfWMERb+Uy6xmevyhM=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "366d78c2856de6ab3411c15c1cb4fb4c2bf5c826", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-25.11", - "repo": "home-manager", - "type": "github" - } - }, - "hyprcursor": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1753964049, - "narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=", - "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.1.13", - "repo": "hyprcursor", - "type": "github" - } - }, - "hyprcursors": { - "inputs": { - "hyprland": [ - "hyprland" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1766947518, - "narHash": "sha256-DbwPyVo9zoMMg0F3KkPalcLaGi5xyUsbc7Xg1kYHYxA=", - "owner": "VirtCode", - "repo": "hypr-dynamic-cursors", - "rev": "7e9b7bc9fbcbb2f7f8985ec1f435b43021609639", - "type": "github" - }, - "original": { - "owner": "VirtCode", - "repo": "hypr-dynamic-cursors", - "type": "github" - } - }, - "hyprgraphics": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1766946335, - "narHash": "sha256-MRD+Jr2bY11MzNDfenENhiK6pvN+nHygxdHoHbZ1HtE=", - "owner": "hyprwm", - "repo": "hyprgraphics", - "rev": "4af02a3925b454deb1c36603843da528b67ded6c", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.5.0", - "repo": "hyprgraphics", - "type": "github" - } - }, - "hypridle": { - "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1756291201, - "narHash": "sha256-YzRWE3rCnsY0WDRJcn4KvyWUoe+5zdkUYNIaHGP9BZ4=", - "owner": "hyprwm", - "repo": "hypridle", - "rev": "5430b73ddf148651bcf35fa39ed4d757c7534028", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.1.7", - "repo": "hypridle", - "type": "github" - } - }, - "hyprland": { - "inputs": { - "aquamarine": "aquamarine", - "hyprcursor": "hyprcursor", - "hyprgraphics": "hyprgraphics", - "hypridle": "hypridle", - "hyprland": "hyprland_2", - "hyprland-guiutils": "hyprland-guiutils", - "hyprland-plugins": "hyprland-plugins", - "hyprland-protocols": "hyprland-protocols", - "hyprland-qt-support": "hyprland-qt-support", - "hyprlang": "hyprlang", - "hyprlauncher": "hyprlauncher", - "hyprlock": "hyprlock", - "hyprpaper": "hyprpaper", - "hyprpicker": "hyprpicker", - "hyprpolkitagent": "hyprpolkitagent", - "hyprsunset": "hyprsunset", - "hyprtoolkit": "hyprtoolkit", - "hyprutils": "hyprutils", - "hyprwayland-scanner": "hyprwayland-scanner", - "hyprwire": "hyprwire", - "nixpkgs": [ - "nixpkgs" - ], - "systems": [ - "systems" - ], - "xdph": "xdph" - }, - "locked": { - "lastModified": 1769174640, - "narHash": "sha256-LUZFhTiwCDhjMQ+FrCoHdsAI/QsyDieZbykjQajAEQk=", - "owner": "hyprwm", - "repo": "hyprnix", - "rev": "cf92f3f0e105ac3541fe07b43df21b1da3bb317d", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprnix", - "type": "github" - } - }, - "hyprland-guiutils": { - "inputs": { - "aquamarine": [ - "hyprland", - "aquamarine" - ], - "hyprgraphics": [ - "hyprland", - "hyprgraphics" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprtoolkit": [ - "hyprland", - "hyprtoolkit" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1767023960, - "narHash": "sha256-R2HgtVS1G3KSIKAQ77aOZ+Q0HituOmPgXW9nBNkpp3Q=", - "owner": "hyprwm", - "repo": "hyprland-guiutils", - "rev": "c2e906261142f5dd1ee0bfc44abba23e2754c660", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.2.1", - "repo": "hyprland-guiutils", - "type": "github" - } - }, - "hyprland-plugins": { - "inputs": { - "hyprland": [ - "hyprland", - "hyprland" - ], - "nixpkgs": [ - "hyprland", - "hyprland-plugins", - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "hyprland-plugins", - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1767020608, - "narHash": "sha256-BSRT1Uu1ot4WfMfZc6KW0nwpmt2xl9wpUqmH/JoMTfk=", - "owner": "hyprwm", - "repo": "hyprland-plugins", - "rev": "d7b67e8f4ba8ebeee4ce899348fcee6291512169", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.53.0", - "repo": "hyprland-plugins", - "type": "github" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1759610243, - "narHash": "sha256-+KEVnKBe8wz+a6dTLq8YDcF3UrhQElwsYJaVaHXJtoI=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "bd153e76f751f150a09328dbdeb5e4fab9d23622", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.7.0", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "hyprland-qt-support": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1736373635, - "narHash": "sha256-+uZovj+X0a28172y0o0BvgGXyZLpKPbG03sVlCiSrWc=", - "owner": "hyprwm", - "repo": "hyprland-qt-support", - "rev": "9d4437011b4f02e60e98a3e36c7fa14bb053b502", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.1.0", - "repo": "hyprland-qt-support", - "type": "github" - } - }, - "hyprland_2": { - "inputs": { - "aquamarine": [ - "hyprland", - "aquamarine" - ], - "hyprcursor": [ - "hyprland", - "hyprcursor" - ], - "hyprgraphics": [ - "hyprland", - "hyprgraphics" - ], - "hyprland-guiutils": [ - "hyprland", - "hyprland-guiutils" - ], - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "hyprwire": [ - "hyprland", - "hyprwire" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "pre-commit-hooks": "pre-commit-hooks", - "systems": [ - "hyprland", - "systems" - ], - "xdph": [ - "hyprland", - "xdph" - ] - }, - "locked": { - "lastModified": 1769174135, - "narHash": "sha256-VoUp2XDWSDxW1RZlpGg7eFoE7SUGP8Rf2DaC0tHf6+8=", - "owner": "hyprwm", - "repo": "hyprland", - "rev": "39f3feddbee4a66be9608ed1eb7e73878d596b50", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.53.2", - "repo": "hyprland", - "type": "github" - } - }, - "hyprlang": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1764612430, - "narHash": "sha256-54ltTSbI6W+qYGMchAgCR6QnC1kOdKXN6X6pJhOWxFg=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "0d00dc118981531aa731150b6ea551ef037acddd", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.6.7", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprlauncher": { - "inputs": { - "aquamarine": [ - "hyprland", - "aquamarine" - ], - "hyprgraphics": [ - "hyprland", - "hyprgraphics" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprtoolkit": [ - "hyprland", - "hyprtoolkit" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "hyprwire": [ - "hyprland", - "hyprwire" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1767531738, - "narHash": "sha256-nu3pMtkMwKsEhpBE4XMpayXDGdnrXVXrscSsxp7qf1I=", - "owner": "hyprwm", - "repo": "hyprlauncher", - "rev": "086cfaa33541a347d040f8448ec4e4aff8f7f9bb", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.1.5", - "repo": "hyprlauncher", - "type": "github" - } - }, - "hyprlock": { - "inputs": { - "hyprgraphics": [ - "hyprland", - "hyprgraphics" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1759399385, - "narHash": "sha256-ucJ5C83hJy8XFO8Y+PL9hVcwdrQnj63BjXcO5A4qyNU=", - "owner": "hyprwm", - "repo": "hyprlock", - "rev": "c48279d1e0f0a4399b5a2d56c16f2ec677ba18f8", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.9.2", - "repo": "hyprlock", - "type": "github" - } - }, - "hyprpaper": { - "inputs": { - "aquamarine": [ - "hyprland", - "aquamarine" - ], - "hyprgraphics": [ - "hyprland", - "hyprgraphics" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprtoolkit": [ - "hyprland", - "hyprtoolkit" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "hyprwire": [ - "hyprland", - "hyprwire" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1767388640, - "narHash": "sha256-RDeDDRgmMnmEKJalIovpXKu9urHuCvH8tHP4RsplyXs=", - "owner": "hyprwm", - "repo": "hyprpaper", - "rev": "8e649e8901ba8478ab2450db97483dce21936457", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.8.1", - "repo": "hyprpaper", - "type": "github" - } - }, - "hyprpicker": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1746060866, - "narHash": "sha256-ta3eCdXyKTVKhCU2/zC+XljU1Tq5huIyuFBtzOcUU4c=", - "owner": "hyprwm", - "repo": "hyprpicker", - "rev": "980ebd486b8a4c2ac1670286f38d163db1e38cd9", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.4.5", - "repo": "hyprpicker", - "type": "github" - } - }, - "hyprpolkitagent": { - "inputs": { - "hyprland-qt-support": [ - "hyprland", - "hyprland-qt-support" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1753969989, - "narHash": "sha256-39xQ6iitVz9KVJz6PPRR+pkS5hBogq25BDd24eUDOQg=", - "owner": "hyprwm", - "repo": "hyprpolkitagent", - "rev": "7e4054410f6d6331b239fea1c659ad6a917fbf6a", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.1.3", - "repo": "hyprpolkitagent", - "type": "github" - } - }, - "hyprshell": { - "inputs": { - "crane": "crane_2", - "flake-parts": [ - "framework" - ], - "home-manager": [ - "home" - ], - "hyprland": [ - "hyprland" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1767665436, - "narHash": "sha256-1nt+/cAtIsS/3O790W2aMUuPiMV6JEjC334Sw0SD804=", - "owner": "H3rmt", - "repo": "hyprshell", - "rev": "281fbc13fd7f0954863d92ab3396ca46829698a1", - "type": "github" - }, - "original": { - "owner": "H3rmt", - "repo": "hyprshell", - "type": "github" - } - }, - "hyprsplit": { - "inputs": { - "hyprland": [ - "hyprland" - ] - }, - "locked": { - "lastModified": 1769928064, - "narHash": "sha256-nx0no9qP8D0kxflY1BrSP+VGT3Ae80phWv3qsb13vhQ=", - "owner": "shezdy", - "repo": "hyprsplit", - "rev": "64348624e6a8d0d3aeb28400c5549a09fce8f1f6", - "type": "github" - }, - "original": { - "owner": "shezdy", - "repo": "hyprsplit", - "type": "github" - } - }, - "hyprsunset": { - "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1759530592, - "narHash": "sha256-Yk6nDzCXrOehX3At8qdZ0cLr1kPySqACsihMYuP6T8w=", - "owner": "hyprwm", - "repo": "hyprsunset", - "rev": "057feb7a724b7fc0f3a406d6db08b59734db006a", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.3.3", - "repo": "hyprsunset", - "type": "github" - } - }, - "hyprtoolkit": { - "inputs": { - "aquamarine": [ - "hyprland", - "aquamarine" - ], - "hyprgraphics": [ - "hyprland", - "hyprgraphics" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1769112842, - "narHash": "sha256-kf7Q31BXRZsiNuQjkvRbGkM1aGj9u8HwyOCIUtwKS0o=", - "owner": "hyprwm", - "repo": "hyprtoolkit", - "rev": "71515e83eb7ad0ec921c913e1d5772e5fe55daa9", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.5.3", - "repo": "hyprtoolkit", - "type": "github" - } - }, - "hyprutils": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1764962281, - "narHash": "sha256-rGbEMhTTyTzw4iyz45lch5kXseqnqcEpmrHdy+zHsfo=", - "owner": "hyprwm", - "repo": "hyprutils", - "rev": "fe686486ac867a1a24f99c753bb40ffed338e4b0", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.11.0", - "repo": "hyprutils", - "type": "github" - } - }, - "hyprwayland-scanner": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1751897909, - "narHash": "sha256-FnhBENxihITZldThvbO7883PdXC/2dzW4eiNvtoV5Ao=", - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "fcca0c61f988a9d092cbb33e906775014c61579d", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.4.5", - "repo": "hyprwayland-scanner", - "type": "github" - } - }, - "hyprwire": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1764872015, - "narHash": "sha256-INI9AVrQG5nJZFvGPSiUZ9FEUZJLfGdsqjF1QSak7Gc=", - "owner": "hyprwm", - "repo": "hyprwire", - "rev": "7997451dcaab7b9d9d442f18985d514ec5891608", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v0.2.1", - "repo": "hyprwire", - "type": "github" - } - }, - "impermanence": { - "inputs": { - "home-manager": [ - "home" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769548169, - "narHash": "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y=", - "owner": "nix-community", - "repo": "impermanence", - "rev": "7b1d382faf603b6d264f58627330f9faa5cba149", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "impermanence", - "type": "github" - } - }, - "index": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1765267181, - "narHash": "sha256-d3NBA9zEtBu2JFMnTBqWj7Tmi7R5OikoU2ycrdhQEws=", - "owner": "Mic92", - "repo": "nix-index-database", - "rev": "82befcf7dc77c909b0f2a09f5da910ec95c5b78f", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "nix-index-database", - "type": "github" - } - }, - "minecraft": { - "inputs": { - "flake-compat": "flake-compat_3", - "nixpkgs": [ - "nixpkgs" - ], - "systems": [ - "systems" - ] - }, - "locked": { - "lastModified": 1770000653, - "narHash": "sha256-QO/twGynxjOSUDtxbqJLshc/Q5/wImLH5O6KV2p9eoE=", - "owner": "Infinidoge", - "repo": "nix-minecraft", - "rev": "6a2ddb643aaf7949caa6158e718c5efc3dda7dc1", - "type": "github" - }, - "original": { - "owner": "Infinidoge", - "repo": "nix-minecraft", - "type": "github" - } - }, - "niri": { - "inputs": { - "niri-stable": "niri-stable", - "niri-unstable": "niri-unstable", - "nixpkgs": [ - "unstable" - ], - "nixpkgs-stable": [ - "stable" - ], - "xwayland-satellite-stable": "xwayland-satellite-stable", - "xwayland-satellite-unstable": "xwayland-satellite-unstable" - }, - "locked": { - "lastModified": 1766933753, - "narHash": "sha256-y3n6F2uKE9UTO8ue0BAPw7LEbGHYxIX8XboctP64p3I=", - "owner": "maydayv7", - "repo": "niri-flake", - "rev": "12ead9f3c8ccb77b4cabf8795f8d42f3551c9c51", - "type": "github" - }, - "original": { - "owner": "maydayv7", - "repo": "niri-flake", - "type": "github" - } - }, - "niri-stable": { - "flake": false, - "locked": { - "lastModified": 1756556321, - "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", - "owner": "YaLTeR", - "repo": "niri", - "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", - "type": "github" - }, - "original": { - "owner": "YaLTeR", - "ref": "v25.08", - "repo": "niri", - "type": "github" - } - }, - "niri-unstable": { - "flake": false, - "locked": { - "lastModified": 1766751930, - "narHash": "sha256-83/YSW6c58i/iwGzAFApuMy6MCgoIaROeCcoIGh+ViU=", - "owner": "YaLTeR", - "repo": "niri", - "rev": "b5640d5293ad8dca06cb447692ea7cbb21680eb1", - "type": "github" - }, - "original": { - "owner": "YaLTeR", - "repo": "niri", - "type": "github" - } - }, - "nixcord": { - "inputs": { - "flake-compat": "flake-compat_4", - "flake-parts": [ - "framework" - ], - "nixpkgs": [ - "unstable" - ] - }, - "locked": { - "lastModified": 1769847318, - "narHash": "sha256-dtn4DcXRekEowv87x1LtDTpRvsCIwc473ViL3sRpZIc=", - "owner": "FlameFlag", - "repo": "nixcord", - "rev": "c7d3828af413799cffb3d312cb5c427124e892d6", - "type": "github" - }, - "original": { - "owner": "FlameFlag", - "repo": "nixcord", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1769268028, - "narHash": "sha256-mAdJpV0e5IGZjnE4f/8uf0E4hQR7ptRP00gnZKUOdMo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ab9fbbcf4858bd6d40ba2bbec37ceb4ab6e1f562", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nur": { - "inputs": { - "flake-parts": [ - "stylix", - "flake-parts" - ], - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1767886815, - "narHash": "sha256-pB2BBv6X9cVGydEV/9Y8+uGCvuYJAlsprs1v1QHjccA=", - "owner": "nix-community", - "repo": "NUR", - "rev": "4ff84374d77ff62e2e13a46c33bfeb73590f9fef", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, - "pre-commit": { - "inputs": { - "flake-compat": "flake-compat", - "gitignore": "gitignore", - "nixpkgs": [ - "boot", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1765464257, - "narHash": "sha256-dixPWKiHzh80PtD0aLuxYNQ0xP+843dfXG/yM3OzaYQ=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "09e45f2598e1a8499c3594fe11ec2943f34fe509", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat_2", - "gitignore": "gitignore_2", - "nixpkgs": [ - "hyprland", - "hyprland", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769069492, - "narHash": "sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W+xc49RL/U=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "a1ef738813b15cf8ec759bdff5761b027e3e1d23", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "proprietary": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "utils": "utils" - }, - "locked": { - "lastModified": 1766166768, - "narHash": "sha256-hUyn/oT50XUW6v/l4heLAUm5C4nc+YQCROad+4J1pik=", - "owner": "maydayv7", - "repo": "proprietary", - "rev": "79906e2fdeb88354f1565ce9d44b76e415052022", - "type": "github" - }, - "original": { - "owner": "maydayv7", - "repo": "proprietary", - "type": "github" - } - }, - "root": { - "inputs": { - "boot": "boot", - "catppuccin": "catppuccin", - "filters": "filters", - "flatpak": "flatpak", - "formatter": "formatter", - "framework": "framework", - "gaming": "gaming", - "hardware": "hardware", - "home": "home", - "hyprcursors": "hyprcursors", - "hyprland": "hyprland", - "hyprshell": "hyprshell", - "hyprsplit": "hyprsplit", - "impermanence": "impermanence", - "index": "index", - "minecraft": "minecraft", - "niri": "niri", - "nixcord": "nixcord", - "nixpkgs": [ - "stable" - ], - "proprietary": "proprietary", - "sops": "sops", - "spicetify": "spicetify", - "stable": "stable", - "stagit": "stagit", - "stylix": "stylix", - "systems": "systems_2", - "unstable": "unstable", - "utils": "utils_2", - "vscode": "vscode", - "windows": "windows" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "boot", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1765680428, - "narHash": "sha256-fyPmRof9SZeI14ChPk5rVPOm7ISiiGkwGCunkhM+eUg=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "eb3898d8ef143d4bf0f7f2229105fc51c7731b2f", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "sops": { - "inputs": { - "nixpkgs": [ - "unstable" - ] - }, - "locked": { - "lastModified": 1769469829, - "narHash": "sha256-wFcr32ZqspCxk4+FvIxIL0AZktRs6DuF8oOsLt59YBU=", - "owner": "Mic92", - "repo": "sops-nix", - "rev": "c5eebd4eb2e3372fe12a8d70a248a6ee9dd02eff", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "sops-nix", - "type": "github" - } - }, - "spicetify": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "systems": [ - "systems" - ] - }, - "locked": { - "lastModified": 1769316930, - "narHash": "sha256-4EOGHYLpIscwr+6drHE28Qj7NDjjowp2Vd8QkXjdBBE=", - "owner": "Gerg-L", - "repo": "spicetify-nix", - "rev": "b2ce438f386943ef611e196a178af2d79042903b", - "type": "github" - }, - "original": { - "owner": "Gerg-L", - "repo": "spicetify-nix", - "type": "github" - } - }, - "stable": { - "locked": { - "lastModified": 1769598131, - "narHash": "sha256-e7VO/kGLgRMbWtpBqdWl0uFg8Y2XWFMdz0uUJvlML8o=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "fa83fd837f3098e3e678e6cf017b2b36102c7211", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "stagit": { - "inputs": { - "nixpkgs": [ - "stable" - ], - "utils": [ - "utils" - ] - }, - "locked": { - "lastModified": 1767557231, - "narHash": "sha256-cXLrl1XCf3Mhz9UhCQxt0eZNcAOtejReiMAi/fTWn6s=", - "owner": "maydayv7", - "repo": "stagit", - "rev": "62010429c33b33ef1239638b202a745ea29e43a1", - "type": "github" - }, - "original": { - "owner": "maydayv7", - "repo": "stagit", - "type": "github" - } - }, - "stylix": { - "inputs": { - "base16": "base16", - "base16-fish": "base16-fish", - "base16-helix": "base16-helix", - "base16-vim": "base16-vim", - "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": [ - "framework" - ], - "gnome-shell": "gnome-shell", - "nixpkgs": [ - "nixpkgs" - ], - "nur": "nur", - "systems": [ - "systems" - ], - "tinted-foot": "tinted-foot", - "tinted-kitty": "tinted-kitty", - "tinted-schemes": "tinted-schemes", - "tinted-tmux": "tinted-tmux", - "tinted-zed": "tinted-zed" - }, - "locked": { - "lastModified": 1769885983, - "narHash": "sha256-jLS7410B58f+3WfZ4PQ28aaaTONnmxlfAbDPdNuciLc=", - "owner": "nix-community", - "repo": "stylix", - "rev": "fe06391a1e1905fc7e6c13443ea439a89695ca69", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-25.11", - "repo": "stylix", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "flake": false, - "locked": { - "lastModified": 1707463813, - "narHash": "sha256-qUyPFG6yjwI4b3wya7aEFDYSIxf1fZeapi0dF46+pAk=", - "owner": "maydayv7", - "repo": "dotfiles", - "rev": "5d24bade1fb3e0186e28a33908519f65ec774c2d", - "type": "github" - }, - "original": { - "owner": "maydayv7", - "ref": "systems", - "repo": "dotfiles", - "type": "github" - } - }, - "tinted-foot": { - "flake": false, - "locked": { - "lastModified": 1726913040, - "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", - "owner": "tinted-theming", - "repo": "tinted-foot", - "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "tinted-foot", - "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", - "type": "github" - } - }, - "tinted-kitty": { - "flake": false, - "locked": { - "lastModified": 1735730497, - "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", - "owner": "tinted-theming", - "repo": "tinted-kitty", - "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "tinted-kitty", - "type": "github" - } - }, - "tinted-schemes": { - "flake": false, - "locked": { - "lastModified": 1767817087, - "narHash": "sha256-eGE8OYoK6HzhJt/7bOiNV2cx01IdIrHL7gXgjkHRdNo=", - "owner": "tinted-theming", - "repo": "schemes", - "rev": "bd99656235aab343e3d597bf196df9bc67429507", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "schemes", - "type": "github" - } - }, - "tinted-tmux": { - "flake": false, - "locked": { - "lastModified": 1767489635, - "narHash": "sha256-e6nnFnWXKBCJjCv4QG4bbcouJ6y3yeT70V9MofL32lU=", - "owner": "tinted-theming", - "repo": "tinted-tmux", - "rev": "3c32729ccae99be44fe8a125d20be06f8d7d8184", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "tinted-tmux", - "type": "github" - } - }, - "tinted-zed": { - "flake": false, - "locked": { - "lastModified": 1767488740, - "narHash": "sha256-wVOj0qyil8m+ouSsVZcNjl5ZR+1GdOOAooAatQXHbuU=", - "owner": "tinted-theming", - "repo": "base16-zed", - "rev": "11abb0b282ad3786a2aae088d3a01c60916f2e40", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-zed", - "type": "github" - } - }, - "tiny-audio-player": { - "inputs": { - "nixpkgs": [ - "windows", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769797635, - "narHash": "sha256-ENwjbVYOks9bkBAIpfwQg5uCHrU8iG7zq/5toKmdoZk=", - "owner": "emmanuelrosa", - "repo": "tiny_audio_player", - "rev": "350c1697d0a0181d55bda191b10a75cfcb8c9c50", - "type": "github" - }, - "original": { - "owner": "emmanuelrosa", - "repo": "tiny_audio_player", - "type": "github" - } - }, - "unstable": { - "locked": { - "lastModified": 1769461804, - "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_2": { - "inputs": { - "systems": [ - "systems" - ] - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "vscode": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769826952, - "narHash": "sha256-8CpJxXwRyN8gSzjT0e4QjWPwVs/W0uHRJ6fEPGaTk7I=", - "owner": "nix-community", - "repo": "nix-vscode-extensions", - "rev": "2b93cd3f310d6a9d24ccfc154740d591288d6754", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-vscode-extensions", - "type": "github" - } - }, - "windows": { - "inputs": { - "flake-compat": "flake-compat_5", - "nixpkgs": [ - "unstable" - ], - "tiny-audio-player": "tiny-audio-player" - }, - "locked": { - "lastModified": 1769804015, - "narHash": "sha256-8H3MdyasR79PHSpDKAmTu//U/X0X9yak1/jRafSWx8A=", - "owner": "emmanuelrosa", - "repo": "erosanix", - "rev": "76ea3845f596899886d61949400fcd801f50582b", - "type": "github" - }, - "original": { - "owner": "emmanuelrosa", - "repo": "erosanix", - "type": "github" - } - }, - "xdph": { - "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1760713634, - "narHash": "sha256-5HXelmz2x/uO26lvW7MudnadbAfoBnve4tRBiDVLtOM=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "753bbbdf6a052994da94062e5b753288cef28dfb", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "ref": "v1.3.11", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } - }, - "xwayland-satellite-stable": { - "flake": false, - "locked": { - "lastModified": 1755491097, - "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", - "owner": "Supreeeme", - "repo": "xwayland-satellite", - "rev": "388d291e82ffbc73be18169d39470f340707edaa", - "type": "github" - }, - "original": { - "owner": "Supreeeme", - "ref": "v0.7", - "repo": "xwayland-satellite", - "type": "github" - } - }, - "xwayland-satellite-unstable": { - "flake": false, - "locked": { - "lastModified": 1766429945, - "narHash": "sha256-9Kv4gWagx/u4RfZJzBMAoagW9ava5waxd+XoTkzqF7E=", - "owner": "Supreeeme", - "repo": "xwayland-satellite", - "rev": "0dde7ca1d3a8e8c5082533d76084e2aa02bef70e", - "type": "github" - }, - "original": { - "owner": "Supreeeme", - "repo": "xwayland-satellite", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/nixos/flake.nix b/nixos/flake.nix @@ -1,307 +0,0 @@ -############################################### -# ▗▄▄▄ ▗▄▄▄▄ ▄▄▄▖ # -# ▜███▙ ▜███▙ ▟███▛ # -# ▜███▙ ▜███▙▟███▛ # -# ▜███▙ ▜██████▛ # -# ▟█████████████████▙ ▜████▛ ▟▙ # -# ▟███████████████████▙ ▜███▙ ▟██▙ # -# ▄▄▄▄▖ ▜███▙ ▟███▛ # -# ▟███▛ ▜██▛ ▟███▛ # -# ▟███▛ ▜▛ ▟███▛ # -# ▟███████████▛ ▟██████████▙ # -# ▜██████████▛ ▟███████████▛ # -# ▟███▛ ▟▙ ▟███▛ # -# ▟███▛ ▟██▙ ▟███▛ # -# ▟███▛ ▜███▙ ▝▀▀▀▀ # -# ▜██▛ ▜███▙ ▜██████████████████▛ # -# ▜▛ ▟████▙ ▜████████████████▛ # -# ▟██████▙ ▜███▙ # -# ▟███▛▜███▙ ▜███▙ # -# ▟███▛ ▜███▙ ▜███▙ # -# ▝▀▀▀ ▀▀▀▀▘ ▀▀▀▘ # -# --------------------------------------- # -# Author -> V 7 <mail@maydayv7.cc> # -# License -> MIT # -# URL -> github:maydayv7/dotfiles # -# --------------------------------------- # -############################################### -{ - description = '' - My declarative, hermetic, reproducible, automated, extensible, multi-PC - NixOS Configuration and 'dotfiles' - ''; - - ## Repositories ## - inputs = { - ## Package Repositories ## - # NixOS Packages Repository - nixpkgs.follows = "stable"; - stable.url = "github:NixOS/nixpkgs?ref=nixos-25.11"; - - # Unstable Packages Repository - unstable.url = "github:NixOS/nixpkgs?ref=nixos-unstable"; - - # Packaged Games - gaming = { - url = "github:fufexan/nix-gaming"; - inputs.flake-parts.follows = "framework"; - }; - - # Proprietary Software - proprietary = { - url = "github:maydayv7/proprietary"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - # Peronal Stagit Fork - stagit = { - url = "github:maydayv7/stagit"; - inputs = { - nixpkgs.follows = "stable"; - utils.follows = "utils"; - }; - }; - - # VS Code Extensions - vscode = { - url = "github:nix-community/nix-vscode-extensions"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - ## Configuration Modules ## - ## Language Addendum - # Supported Architectures - systems = { - url = "github:maydayv7/dotfiles?ref=systems"; - flake = false; - }; - - # Flakes Framework - framework = { - url = "github:hercules-ci/flake-parts"; - inputs.nixpkgs-lib.follows = "nixpkgs"; - }; - - # Flake Utility Functions - utils = { - url = "github:numtide/flake-utils"; - inputs.systems.follows = "systems"; - }; - - # Source Filter Functions - filters.url = "github:numtide/nix-filter"; - - # Syntax Formatter - formatter = { - url = "github:numtide/treefmt-nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - ## Feature Modules - # Hardware Support - hardware.url = "github:NixOS/nixos-hardware"; - - # User Home Manager - home = { - url = "github:nix-community/home-manager?ref=release-25.11"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - # Secure Boot - boot = { - url = "github:nix-community/lanzaboote/v1.0.0"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - # Authentication Credentials Manager - sops = { - url = "github:Mic92/sops-nix"; - inputs.nixpkgs.follows = "unstable"; - }; - - # Filesystem State Handler - impermanence = { - url = "github:nix-community/impermanence"; - inputs = { - nixpkgs.follows = "nixpkgs"; - home-manager.follows = "home"; - }; - }; - - # Nix Index Database - index = { - url = "github:Mic92/nix-index-database"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - # Declarative Flatpak Wrapper - flatpak.url = "github:gmodena/nix-flatpak?ref=latest"; - - # Discord Module - nixcord = { - url = "github:FlameFlag/nixcord"; - inputs = { - nixpkgs.follows = "unstable"; - flake-parts.follows = "framework"; - }; - }; - - # Minecraft Server - minecraft = { - url = "github:Infinidoge/nix-minecraft"; - inputs = { - nixpkgs.follows = "nixpkgs"; - systems.follows = "systems"; - }; - }; - - # Windows Apps Wrapper - windows = { - url = "github:emmanuelrosa/erosanix"; - inputs.nixpkgs.follows = "unstable"; - }; - - ## Theming - # Base16 Theming Module - stylix = { - url = "github:nix-community/stylix?ref=release-25.11"; - inputs = { - nixpkgs.follows = "nixpkgs"; - systems.follows = "systems"; - flake-parts.follows = "framework"; - }; - }; - - # Spicetify Module - spicetify = { - url = "github:Gerg-L/spicetify-nix"; - inputs = { - nixpkgs.follows = "nixpkgs"; - systems.follows = "systems"; - }; - }; - - # Catppuccin Theme - catppuccin = { - url = "github:catppuccin/nix?ref=release-25.11"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - ## Niri - niri = { - url = "github:maydayv7/niri-flake"; - inputs = { - nixpkgs.follows = "unstable"; - nixpkgs-stable.follows = "stable"; - }; - }; - - ## Hyprland - # Core - hyprland = { - url = "github:hyprwm/hyprnix"; - inputs = { - nixpkgs.follows = "nixpkgs"; - systems.follows = "systems"; - }; - }; - - # Plugins - hyprsplit = { - url = "github:shezdy/hyprsplit"; - inputs.hyprland.follows = "hyprland"; - }; - - hyprcursors = { - url = "github:VirtCode/hypr-dynamic-cursors"; - inputs = { - nixpkgs.follows = "nixpkgs"; - hyprland.follows = "hyprland"; - }; - }; - - # Launcher - hyprshell = { - url = "github:H3rmt/hyprshell"; - inputs = { - nixpkgs.follows = "nixpkgs"; - hyprland.follows = "hyprland"; - home-manager.follows = "home"; - flake-parts.follows = "framework"; - }; - }; - }; - - ## Configuration ## - outputs = - { self, ... }@inputs: - let - inherit (inputs.nixpkgs) lib; - map = import ./lib/map.nix lib; - in - inputs.framework.lib.mkFlake { inherit inputs; } { - inherit (self) systems; - debug = false; - - imports = map.flake ./.; - _module.args = { - util = self.lib; - }; - - flake = { - # Supported Architectures - systems = import inputs.systems; - - ## Custom Library Functions ## - lib = lib.recursiveUpdate (map.modules ./lib (file: import file lib)) { - nixpkgs = lib; - build.device = import ./modules/configuration.nix inputs; - }; - - ## Configuration Template ## - templates.default = with inputs.filters.lib; { - description = "My NixOS Configuration"; - path = filter { - root = ./.; - exclude = [ - ./checks - ./site - (matchExt "md") - (matchExt "secret") - ]; - }; - }; - }; - }; - - ## Nix Configuration ## - nixConfig = { - commit-lockfile-summary = "chore(flake): Update `inputs`"; - - # Binary Caches - trusted-substituters = [ - "https://maydayv7-dotfiles.cachix.org" - "https://cache.nixos.org" - "https://nixpkgs-unfree.cachix.org" - "https://nix-community.cachix.org" - "https://cache.flox.dev" - "https://nix-gaming.cachix.org" - "https://hyprland.cachix.org" - "https://niri.cachix.org" - "https://catppuccin.cachix.org" - ]; - - # Public Keys - trusted-public-keys = [ - "maydayv7-dotfiles.cachix.org-1:dpECO0Z2ZMttY6JgWHuAR5M7cqeyfFjUsvHdnMz+j6U=" - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs=" - "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" - "catppuccin.cachix.org-1:noG/4HkbhJb+lUAdKrph6LaozJvAeEEZj4N732IysmU=" - ]; - }; -} diff --git a/nixos/lib/README.md b/nixos/lib/README.md @@ -1,29 +0,0 @@ -### Custom Library Functions - -The `lib` directory contains custom-made utility functions (exposed as `util`), created in order to simplify the configuration and conveniently define and support multiple use-cases (If you have a working NixOS install, you can check it out using `github:maydayv7/dotfiles#lib`). The following is a summary of all the present functions: - -[`util`](./default.nix) - - -- [`build`](./build.nix): Configuration building functions for efficient system management and declaration - - - `device`: Main system configuration building function, used to build the entire configuration for devices (`nixosConfigurations`) as per provided parameters - - `mime`: Builds and sets `mimetype` values for specified application - - `script`: Builds script from specified file by removing `shebangs` and exporting as a _string_ - - `theme`: Builds specified file by replacing placeholders with provided theming elements - - `until`: Returns part of _string_ before specified character, or entire _string_ if character is not present - -- [`map`](./map.nix): Mapping functions primarily aimed at shortening code complexity - - - `array`: Maps required parameter to all elements present in `list` - - `filter`: Filters out unneeded `attrs` and maps required ones to specified function - - `list`: Lists all toplevel `attrs` of `attrset` and returns a space-separated string - - `file`: Maps all files with a particular extension adhering to a particular condition stored in a directory as an `attrset` acted upon by specified function. Enable `recursive` in order to recursively search inside directories - - `folder`: Maps all files with a particular extension stored in a directory to a given path as an `attrset` acted upon by specified function. Use `replace` in order to modify placeholder text - - `modules`: Maps all configuration modules stored in a directory as an `attrset` acted upon by specified function - - `list`: Maps all configuration files stored in a directory into a list for easy import - - `name`: Same as `list`, but maps file names instead of paths - - `flake`: Maps all subflakes stored in a directory into a list for easy import - - `patches`: Maps all file patches stored in a directory, if available - - `secrets`: Maps binary `sops` encrypted secrets stored in a directory - -- [`pack`](./pack.nix): Utility packager functions used to conveniently perform package management functions - - - `device`: Pack desired system derivations into individual packages - - `user`: Pack `self.homeConfigurations` derivations into individual packages diff --git a/nixos/lib/_mime.nix b/nixos/lib/_mime.nix @@ -1,296 +0,0 @@ -{ - appimage = [ "application/x-executable" ]; - - archive = [ - "application/x-7z-compressed" - "application/x-7z-compressed-tar" - "application/x-bzip" - "application/x-bzip-compressed-tar" - "application/x-compress" - "application/x-compressed-tar" - "application/x-cpio" - "application/x-gzip" - "application/x-lha" - "application/x-lzip" - "application/x-lzip-compressed-tar" - "application/x-lzma" - "application/x-lzma-compressed-tar" - "application/x-tar" - "application/x-tarz" - "application/x-xar" - "application/x-xz" - "application/x-xz-compressed-tar" - "application/zip" - "application/gzip" - "application/bzip2" - "application/vnd.rar" - ]; - - audio = [ - "audio/aac" - "audio/flac" - "audio/mp3" - "audio/mpeg" - "audio/ogg" - "audio/opus" - "audio/wav" - "audio/webm" - "audio/x-aac" - "audio/x-aiff" - "audio/x-ape" - "audio/x-flac" - "audio/x-m4a" - "audio/x-m4b" - "audio/x-matroska" - "audio/x-mp1" - "audio/x-mp2" - "audio/x-mp3" - "audio/x-mpeg" - "audio/x-mpegurl" - "audio/x-mpg" - "audio/x-opus+ogg" - "audio/x-pn-aiff" - "audio/x-pn-au" - "audio/x-pn-wav" - "audio/x-speex" - "audio/x-vorbis" - "audio/x-vorbis+ogg" - "audio/x-wavpack" - ]; - - browser = [ - "application/x-extension-htm" - "application/x-extension-html" - "application/x-extension-shtml" - "application/x-extension-xht" - "application/x-extension-xhtml" - "application/xhtml+xml" - "text/html" - "x-scheme-handler/about" - "x-scheme-handler/ftp" - "x-scheme-handler/http" - "x-scheme-handler/https" - "x-scheme-handler/unknown" - ]; - - calendar = [ - "text/calendar" - "x-scheme-handler/webcal" - ]; - - code = [ - "application/json" - "application/toml" - "application/x-shellscript" - "application/x-yaml" - "text/x-c" - "text/x-c++" - "text/x-c++src" - "text/x-chdr" - "text/x-cmake" - "text/x-java" - "text/x-lua" - "text/x-makefile" - "text/x-markdown" - "text/x-nix" - "text/x-python" - "text/x-rust" - "text/x-scala" - "text/x-shellscript" - "text/x-toml" - "text/x-yaml" - ]; - - directory = [ "inode/directory" ]; - - document = [ - "application/illustrator" - "application/oxps" - "application/postscript" - "application/vnd.comicbook-rar" - "application/vnd.comicbook+zip" - "application/vnd.ms-xpsdocument" - "application/x-bzpdf" - "application/x-bzpostscript" - "application/x-cb7" - "application/x-cbr" - "application/x-cbt" - "application/x-cbz" - "application/x-ext-cb7" - "application/x-ext-cbr" - "application/x-ext-cbt" - "application/x-ext-cbz" - "application/x-ext-djv" - "application/x-ext-djvu" - "application/x-ext-eps" - "application/x-ext-pdf" - "application/x-ext-ps" - "application/x-gzpdf" - "application/x-gzpostscript" - "application/x-xzpdf" - "image/vnd.djvu" - "image/x-bzeps" - "image/x-eps" - "image/x-gzeps" - ]; - - font = [ - "application/vnd.ms-opentype" - "application/x-font-ttf" - "font/otf" - "font/ttf" - "font/woff" - "font/woff2" - ]; - - image = [ - "image/avif" - "image/bmp" - "image/gif" - "image/heic" - "image/heif" - "image/jpeg" - "image/jpg" - "image/jxl" - "image/png" - "image/svg+xml-compressed" - "image/svg+xml" - "image/tiff" - "image/vnd-ms.dds" - "image/vnd.microsoft.icon" - "image/vnd.microsoft.icon" - "image/vnd.radiance" - "image/webp" - "image/x-dds" - "image/x-exr" - "image/x-icon" - "image/x-portable-anymap" - "image/x-portable-bitmap" - "image/x-portable-graymap" - "image/x-portable-pixmap" - "image/x-qoi;image/svg+xml" - "image/x-tga" - ]; - - latex = [ "text/x-tex" ]; - - magnet = [ "x-scheme-handler/magnet" ]; - - mail = [ "x-scheme-handler/mailto" ]; - - markdown = [ "text/markdown" ]; - - office = [ - "application/rtf" - "application/vnd.oasis.opendocument.text" - "application/vnd.oasis.opendocument.spreadsheet" - "application/vnd.oasis.opendocument.presentation" - "application/vnd.openxmlformats-officedocument.wordprocessingml.document" - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" - "application/vnd.openxmlformats-officedocument.presentationml.presentation" - "application/msword" - "application/vnd.ms-excel" - "application/vnd.ms-powerpoint" - ]; - - password = [ - "application/x-keepass2" - "application/x-keepass" - ]; - - pdf = [ "application/pdf" ]; - - text = [ - "text/plain" - "text/css" - "text/ecmascript" - "text/javascript" - "text/x-script.python" - "text/x-script.sh" - "text/x-script.zsh" - "text/xml" - ]; - - video = [ - "application/mxf" - "application/ogg" - "application/ram" - "application/sdp" - "application/smil" - "application/smil+xml" - "application/vnd.apple.mpegurl" - "application/vnd.ms-asf" - "application/vnd.ms-wpl" - "application/vnd.rn-realmedia-vbr" - "application/vnd.rn-realmedia" - "application/x-extension-mp4" - "application/x-flash-video" - "application/x-matroska" - "application/x-netshow-channel" - "application/x-ogg" - "application/x-quicktime-media-link" - "application/x-quicktimeplayer" - "application/x-shorten" - "application/x-smil" - "application/xspf+xml" - "video/3gp" - "video/3gpp" - "video/3gpp2" - "video/divx" - "video/dv" - "video/fli" - "video/mp2t" - "video/mp4" - "video/mp4v-es" - "video/mpeg-system" - "video/mpeg" - "video/msvideo" - "video/ogg" - "video/quicktime" - "video/vivo" - "video/vnd.divx" - "video/vnd.rn-realvideo" - "video/vnd.vivo" - "video/webm" - "video/x-anim" - "video/x-avi" - "video/x-flc" - "video/x-fli" - "video/x-flic" - "video/x-flv" - "video/x-m4v" - "video/x-matroska" - "video/x-mpeg" - "video/x-mpeg2" - "video/x-ms-asf-plugin" - "video/x-ms-asf" - "video/x-ms-asx" - "video/x-ms-wm" - "video/x-ms-wmv" - "video/x-ms-wmx" - "video/x-ms-wvx" - "video/x-msvideo" - "video/x-nsv" - "video/x-ogm+ogg" - "video/x-theora" - "video/x-theora+ogg" - "video/x-totem-stream" - "x-content/video-dvd" - "x-content/video-svcd" - "x-content/video-vcd" - "x-scheme-handler/icy" - "x-scheme-handler/icyx" - "x-scheme-handler/mmsh" - "x-scheme-handler/net" - "x-scheme-handler/pnm" - "x-scheme-handler/rtmp" - "x-scheme-handler/uvox" - ]; - - virtualization = [ - "application/x-cd-image" - "application/x-qemu-disk" - "application/x-virtualbox-hdd" - "application/x-virtualbox-vbox" - ]; -} diff --git a/nixos/lib/build.nix b/nixos/lib/build.nix @@ -1,120 +0,0 @@ -lib: -let - inherit (builtins) - concatStringsSep - filter - hasAttr - listToAttrs - map - match - readFile - ; - - inherit (lib) - flatten - hasPrefix - mapAttrsToList - nameValuePair - replaceStrings - splitString - ; -in -{ - ## Builder Functions ## - # Mime Types Handler - mime = - option: - listToAttrs ( - flatten ( - mapAttrsToList ( - name: types: - if hasAttr name option then map (type: nameValuePair type option."${name}") types else [ ] - ) (import ./_mime.nix) - ) - ); - - # Script Builder - script = - file: - concatStringsSep "\n" ( - (filter (line: line != "" && !(hasPrefix "#!" line))) (splitString "\n" (readFile file)) - ); - - # Theme Substituter - theme = - { - accent ? "base0D", - colors ? null, - fonts ? null, - file, - }: - let - color = [ - "@accent" - "@white" - "@base00" - "@base01" - "@base02" - "@base03" - "@base04" - "@base05" - "@base06" - "@base07" - "@base08" - "@base09" - "@base0A" - "@base0B" - "@base0C" - "@base0D" - "@base0E" - "@base0F" - ]; - - color' = with colors; [ - colors."${accent}" - "FFFFFF" - base00 - base01 - base02 - base03 - base04 - base05 - base06 - base07 - base08 - base09 - base0A - base0B - base0C - base0D - base0E - base0F - ]; - - font = [ - "@font" - "@monospace" - ]; - - font' = with fonts; [ - sansSerif.name - monospace.name - ]; - in - if (colors != null && fonts != null) then - replaceStrings (color ++ font) (color' ++ font') file - else if (colors != null) then - replaceStrings color color' file - else if (fonts != null) then - replaceStrings font font' file - else - throw "One of 'colors' or 'fonts' must be declared"; - - # String Extractor - until = - check: string: - let - value = match "([^ ]+)${check}.*" string; - in - if (value == null) then string else concatStringsSep "" value; -} diff --git a/nixos/lib/map.nix b/nixos/lib/map.nix @@ -1,161 +0,0 @@ -lib: -let - inherit (builtins) - attrNames - attrValues - foldl' - isPath - pathExists - readDir - readFile - toString - typeOf - ; - - inherit (lib) - flatten - filterAttrs - forEach - getAttrFromPath - hasPrefix - hasSuffix - id - mapAttrs' - mapAttrsToList - nameValuePair - removeSuffix - replaceStrings - ; - - # Import Checks - checkName = name: _: !(hasPrefix "_" name); - checkAttr = - name: - let - type = typeOf (import name); - in - type == "set" || type == "lambda"; -in -rec { - ## Mapping Functions ## - array = list: func: forEach list (name: getAttrFromPath [ name ] func); - list = func: foldl' (x: y: x + y + " ") "" (attrNames func); - filter = - name: func: attrs: - filterAttrs (_: type: type != null) (mapAttrs' func (filterAttrs name attrs)); - - ## Files Map - files = - { - directory, - recursive ? false, - apply ? id, - extension, - check ? (_: true), - }: - filter checkName ( - name: type: - let - path = "${toString directory}/${name}"; - in - if (type == "directory" || type == "symlink") && recursive then - nameValuePair name (files { - inherit path apply; - }) - else if - (type == "directory" || type == "symlink") - && (if (extension == ".nix") then pathExists "${path}/default.nix" else true) - then - nameValuePair name (apply path) - else if - type == "regular" - && (if (extension == ".nix") then name != "default.nix" && name != "flake.nix" else true) - && hasSuffix extension name - && (check path) - then - nameValuePair (removeSuffix extension name) (apply path) - else - nameValuePair "" null - ) (readDir directory); - - # Module Imports - modules = { - __functor = - _: directory: apply: - files { - inherit directory apply; - extension = ".nix"; - check = checkAttr; - }; - - list = path: attrValues (modules path id); - name = path: attrNames (modules path id); - }; - - # Flake Imports - flake = - directory: - attrValues ( - filter checkName ( - name: type: - let - path = "${toString directory}/${name}"; - in - if (type == "directory" || type == "symlink") && (pathExists "${path}/flake.nix") then - nameValuePair name "${path}/flake.nix" - else - nameValuePair "" null - ) (readDir directory) - ); - - # Configuration Folder Creation - folder = - { - directory, - path, - extension ? "", - apply, - replace ? { - placeholders = { }; - values = { }; - }, - }: - mapAttrs' (name: value: nameValuePair "${path}/${name}${extension}" (apply value)) (files { - inherit directory extension; - apply = file: with replace; replaceStrings placeholders values (readFile file); - }); - - # Package Patches - patches = - patch: - if isPath patch then - flatten ( - mapAttrsToList ( - name: type: - if type == "regular" && (hasSuffix ".diff" name || hasSuffix ".patch" name) then - patch + "/${name}" - else - null - ) (readDir patch) - ) - else - patch; - - # 'sops' Encrypted Secrets - secrets = - { - directory, - neededForUsers ? false, - }: - filter checkName ( - name: type: - if type == "regular" && hasSuffix ".secret" name then - nameValuePair name { - sopsFile = directory + "/${name}"; - format = "binary"; - inherit neededForUsers; - } - else - nameValuePair "" null - ) (readDir directory); -} diff --git a/nixos/lib/pack.nix b/nixos/lib/pack.nix @@ -1,23 +0,0 @@ -lib: -let - inherit (builtins) attrNames; - inherit (lib) genAttrs id mapAttrs'; -in -{ - ## Packager Functions ## - # Device Configurations - device = - attrs: - mapAttrs' (_: name: { - name = "Device-${name}"; - value = attrs."${name}".config.system.build."nixos-rebuild"; - }) (genAttrs (attrNames attrs) id); - - # User Home Configurations - user = - attrs: user: - mapAttrs' (_: name: { - name = "User-${name}"; - value = attrs."${user}".activationPackage; - }) (genAttrs (attrNames attrs) id); -} diff --git a/nixos/modules/README.md b/nixos/modules/README.md @@ -1,100 +0,0 @@ -### Custom Configuration Modules - -The `modules` directory contains custom-made pure Flakes-compatible configuration modules, which form the very core of my configuration for multiple PCs and various use-cases. -The following is a summary of all the present configuration options exposed by the particular module: - -Configuration [Builder](./configuration.nix) - -- [`apps`](./apps): Module that configures various apps and/or environments - - - `list`: List of enabled applications - `[ "discord" "firefox" "flatpak" "games" "git" "internet" "latex" "notes" "office" "spotify" "stream" "tools" "vscode" "wine" "youtube" ]` - - `git` - - - `hosting` - - - `enable`: Enable Gitea Code Hosting - `true / false` - - `domain`: Website Domain Name - Ex. `maydayv7.net` - - `secret`: Path to Cloudfare Authentication Credentials - - `runner` - - - `support`: Enable Support for `git` Runners - `"github" / "gitlab"` - - `secret`: Path to Secret for `git` Runner - - `wine` - - - `utilities`: Install Utility Windows apps - `true / false` - - `package`: Package to use for `wine` - Ex. `pkgs.wineWowPackages.stable` - - `logseq.style`: Path to Logseq Notes CSS - - `ytmusic.style`: YouTube Music CSS - - `games`: List of installed games - `[ "minecraft" "mc-server" "osu" "roblox" ]` - - `mc-servers`: List of Minecraft Servers - - - `name`: Unique server name - - `type`: Server Type - `[ "fabric" "skyblock" ]` - - `memory`: Memory (GB) allocated to server - Ex. `12` - - `config`: Server Properties (See [here](https://minecraft.fandom.com/wiki/Server.properties)) - - `port`: Main server TCP port - Ex. `25565` - - `vc-port`: Port for [Simple Voice Chat](https://modrinth.com/plugin/simple-voice-chat) - Ex. `24454` - -- [`base`](./base): Module that contains the base common/shared configuration - - - `kernel`: Linux Kernel Variant to be used - `"lts" / "variant"` - - `kernelModules`: Linux Kernel Modules to load - -- [`gui`](./gui): Module that configures GUI Desktops/Environments and the like - - - `desktop`: Choice of GUI Desktop - `"hyprland" / "gnome" / "pantheon"` - - `display`: Main GUI Display - Ex. `"HDMI-A-1"` - - `wallpaper`: Desktop Wallpaper Choice (taken from `files.wallpapers`) - - `fancy`: Enable Fancy GUI Effects - `true / false` - - `fonts.enable`: Enable Fonts Configuration - `true / false` - - `icons` - - - `name`: Application Icons Theme - Ex. `Papirus` - - `package`: Icons Package - Ex. `pkgs.papirus-icon-theme` - - `cursors` - - - `name`: GUI Cursors Theme - Ex. `Bibata` - - `package`: Cursors Package - Ex. `pkgs.bibata-cursors` - - `size`: Cursors Size - Ex. `28` - - `gtk` - - - `enable`: Enable GTK Configuration - `true / false` - - `theme` - - - `name`: GTK+ Application Theme - - `package`: GTK+ Theme Package - - `qt` - - - `enable`: Enable QT Configuration - `true / false` - - `style`: QT Application Style - `null / "gtk" / "kvantum" / "qtct"` - - `theme` - - - `name`: QT Application Theme - - `package`: QT Theme Package - -- [`hardware`](./hardware): Module that configures device and additional hardware - - - `boot`: Supported Boot Firmware - `"mbr" / "efi" / "secure"` - - `fs`: File System Configuration - - - `scheme`: Disk Filesystem Scheme - `"simple" / "advanced"` - - `persist`: System Files to Preserve across Reboots (while using `advanced` File System Layout) - - `cpu` - - - `model`: CPU Model - `"amd" / "intel"` - - `cores`: Number of CPU Cores - Ex. `4` - - `mode`: CPU Frequency Governor Mode - `"ondemand" / "performance" / "powersave"` - - `gpu` - - - `enable`: Discrete GPU Support - `"true" / "false"` - - `model`: Discrete GPU Model - `null / "nvidia"` - - `modules`: List of Hardware Configuration Modules imported from [`inputs.hardware`](https://github.com/nixos/nixos-hardware) - Ex. `[ "common-pc" ]` - - `support`: List of Additional Supported Hardware - `[ "laptop" "mobile" "printer" "virtualisation" "blockchain" ]` - - `vm`: Configure Virtualisation Support - - - `android`: Enable Android Virtualisation - `true / false` - - `vfio`: Configure VFIO PCI passthrough - `"on" / "setup" / "off"` - - `passthrough`: PCI Device IDs for VFIO - Ex. `[ "10de:28e0" "10de:22be" ]` - -- [`nix`](./nix): Module that configures the Nix Package Manager - - - `index`: Enable Package Indexer - `"true" / "false"` - - `tools`: Enable Additional Nix Tools - `"true" / "false"` - -- [`user`](./user): Module that controls User Creation and Security Settings - - - `groups`: Additional User Groups - Ex. `[ "wheel" ]` - - `homeConfig`: Shared User Home Configuration (Alias for `home-manager.users.${username}`) - - - `credentials`: Individual User Credentials - - - `name`: Alternative (Work) User Name - - `fulname`: Full User Name - - `mail`: User Mail ID - Ex. `"nixos@localhost.org"` - - `key`: User GPG Key - Ex. `"CF616EB19C2765E4"` - - `settings`: User Settings (Alias for `users.users.${username}`) - - - `autologin`: Enable Automatic User Login - `"true" / "false"` - - `minimal`: Enable Minimal User Configuration - `"true" / "false"` - - `homeConfig`: User Specific Home Configuration - - `shells`: List of Additional Supported Shells - Ex. `[ "zsh" ]` - -- [`shell`](./shell): Module that contains User Shell Environment Configuration - - - `utilities`: Enable Additional Shell Utilities - `true / false` - - `prompt`: Enable Fancy Shell Prompt - `true / false` diff --git a/nixos/modules/apps/default.nix b/nixos/modules/apps/default.nix @@ -1,25 +0,0 @@ -{ - lib, - util, - ... -}: -let - inherit (util.map) modules; - inherit (lib) mkOption types; -in -{ - ## APPS Configuration ## - imports = modules.list ./.; - - options.apps.list = mkOption { - description = "List of Enabled Applications"; - type = types.listOf (types.enum (modules.name ./.)); - default = [ ]; - }; - - # AppImage Support - config.programs.appimage = { - enable = true; - binfmt = true; - }; -} diff --git a/nixos/modules/apps/discord.nix b/nixos/modules/apps/discord.nix @@ -1,90 +0,0 @@ -{ - config, - lib, - inputs, - pkgs, - ... -}: -let - enable = builtins.elem "discord" config.apps.list; - package = pkgs.vesktop; -in -{ - ## Discord Configuration ## - config = lib.mkIf enable { - environment.systemPackages = [ package ]; - user.homeConfig = { - imports = [ inputs.nixcord.homeModules.nixcord ]; - home.persist.directories = [ ".config/vesktop" ]; - programs.nixcord = { - enable = true; - discord.enable = false; - vesktop = { - enable = true; - inherit package; - }; - - config = { - # Theming - useQuickCss = true; - frameless = false; - transparent = false; - - # Vencord Plugins - plugins = { - betterFolders = { - enable = true; - showFolderIcon = 2; - closeAllHomeButton = true; - }; - betterGifAltText.enable = true; - betterGifPicker.enable = true; - betterRoleContext.enable = true; - betterSessions.enable = true; - betterSettings.enable = true; - biggerStreamPreview.enable = true; - BlurNSFW.enable = true; - copyEmojiMarkdown.enable = true; - copyFileContents.enable = true; - CopyUserURLs.enable = true; - crashHandler.enable = true; - decor.enable = true; - expressionCloner.enable = true; - favoriteEmojiFirst.enable = true; - favoriteGifSearch.enable = true; - fixImagesQuality.enable = true; - fixSpotifyEmbeds.enable = true; - friendsSince.enable = true; - fullSearchContext.enable = true; - imageZoom.enable = true; - memberCount.enable = true; - mentionAvatars.enable = true; - messageClickActions.enable = true; - messageLinkEmbeds.enable = true; - PinDMs.enable = true; - platformIndicators.enable = true; - previewMessage.enable = true; - quickMention.enable = true; - readAllNotificationsButton.enable = true; - relationshipNotifier.enable = true; - replyTimestamp.enable = true; - serverInfo.enable = true; - serverListIndicators.enable = true; - showHiddenChannels.enable = true; - showHiddenThings.enable = true; - showMeYourName.enable = true; - showTimeoutDuration.enable = true; - typingTweaks.enable = true; - validUser.enable = true; - voiceChatDoubleClick.enable = true; - voiceDownload.enable = true; - voiceMessages.enable = true; - volumeBooster.enable = true; - webKeybinds.enable = true; - webScreenShareFixes.enable = true; - }; - }; - }; - }; - }; -} diff --git a/nixos/modules/apps/firefox.nix b/nixos/modules/apps/firefox.nix @@ -1,132 +0,0 @@ -{ - config, - lib, - util, - pkgs, - ... -}: -let - enable = builtins.elem "firefox" config.apps.list; - package = pkgs.firefox; -in -{ - ## Firefox Browser Configuration ## - config = lib.mkIf enable { - environment = { - systemPackages = [ package ]; - sessionVariables."MOZ_USE_XINPUT2" = "1"; - }; - - user.homeConfig = { - xdg.mimeApps.defaultApplications = util.build.mime { - browser = [ "firefox.desktop" ]; - }; - - home.persist.directories = [ - ".cache/mozilla/firefox" - ".mozilla/firefox" - ]; - - programs.firefox = { - enable = true; - inherit package; - policies = { - # Policies - DisableTelemetry = true; - DisableFirefoxStudies = true; - DisablePocket = true; - EnableTrackingProtection = { - Value = true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; - }; - - # Extensions - ExtensionSettings = - let - extension = shortId: uuid: { - name = uuid; - value = { - installation_mode = "normal_installed"; - install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi"; - }; - }; - in - builtins.listToAttrs [ - (extension "clearurls" "{74145f27-f039-47ce-a470-a662b129930a}") - (extension "setupvpn" "@setupvpncom") - (extension "stylus" "{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}") - (extension "tabliss" "extension@tabliss.io") - (extension "uaswitcher" "user-agent-switcher@ninetailed.ninja") - (extension "ublock-origin" "uBlock0@raymondhill.net") - ]; - }; - - profiles.default = { - isDefault = true; - containersForce = true; - settings = { - ## Flags - # General - "browser.disableResetPrompt" = true; - "browser.onboarding.enabled" = false; - "browser.aboutConfig.showWarning" = false; - "browser.shell.checkDefaultBrowser" = false; - "browser.sessionstore.interval" = "1800000"; - "browser.toolbars.bookmarks.visibility" = "always"; - "browser.urlbar.showSearchSuggestionsFirst" = false; - "browser.urlbar.speculativeConnect.enabled" = false; - "browser.urlbar.dnsResolveSingleWordsAfterSearch" = 0; - - # Features - "browser.search.openintab" = true; - "layout.spellcheckDefault" = 2; - - # New Tab - "browser.newtabpage.activity-stream.feeds.section.highlights" = false; - "browser.newtabpage.activity-stream.feeds.section.topstories" = false; - "browser.newtabpage.activity-stream.feeds.topsites" = false; - "browser.newtabpage.activity-stream.showSearch" = true; - "browser.newtabpage.activity-stream.showSponsored" = false; - "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; - "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; - "browser.newtabpage.activity-stream.feeds.section.highlights.includePocket" = false; - - # Theming - "browser.uidensity" = 0; - "devtools.theme" = "dark"; - "layers.acceleration.force-enabled" = true; - "mozilla.widget.use-argb-visuals" = true; - "svg.context-properties.content.enabled" = true; - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - - # Passwords - "signon.autofillForms" = false; - "signon.rememberSignons" = false; - "signon.generation.enabled" = false; - "signon.management.page.breach-alerts.enabled" = false; - - # Extensions - "extensions.pocket.enabled" = false; - "extensions.htmlaboutaddons.inline-options.enabled" = false; - "extensions.htmlaboutaddons.recommendations.enabled" = false; - - # Security - "security.family_safety.mode" = 0; - "security.pki.sha1_enforcement_level" = 1; - "security.tls.enable_0rtt_data" = false; - - # Reports - "breakpad.reportURL" = ""; - "browser.crashReports.unsubmittedCheck.autoSubmit2" = false; - "browser.tabs.crashReporting.sendReport" = false; - "datareporting.healthreport.service.enabled" = false; - "datareporting.healthreport.uploadEnabled" = false; - "datareporting.policy.dataSubmissionEnabled" = false; - }; - }; - }; - }; - }; -} diff --git a/nixos/modules/apps/flatpak.nix b/nixos/modules/apps/flatpak.nix @@ -1,91 +0,0 @@ -{ - config, - lib, - inputs, - pkgs, - ... -}: -let - enable = builtins.elem "flatpak" config.apps.list; - theme = config.gui.gtk.theme.name; -in -{ - ## Flatpak Configuration ## - imports = [ inputs.flatpak.nixosModules.nix-flatpak ]; - - config = lib.mkIf enable { - warnings = [ - '' - Flatpak support is enabled - - App install isn't generational (Changes in configuration will result in downloading them anew) - - Updates must be managed manually - '' - ]; - - xdg.portal.enable = true; - system.activationScripts.updateDesktopDatabase.text = "${pkgs.desktop-file-utils}/bin/update-desktop-database /var/lib/flatpak/exports/share/applications"; - - environment.persist.directories = [ "/var/lib/flatpak" ]; - user.homeConfig.home.persist.directories = [ - ".cache/flatpak" - ".local/share/flatpak" - ".var/app" - ]; - - services.flatpak = { - enable = true; - uninstallUnmanaged = true; - - # Repositories - remotes = [ - { - name = "flathub"; - location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; - } - { - name = "flathub-beta"; - location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo"; - } - ]; - - # Package List - # Use 'flatpak remote-info --log' to find commit revisions - packages = [ - /* - { - appId = ""; - origin = ""; - commit = ""; - } - */ - ]; - - # Platform Integration - overrides.global = { - Context = { - filesystems = [ - "~/.config/dconf:ro" - "/run/current-system/sw/share/themes:ro" - ]; - - sockets = [ - "wayland" - "!x11" - "fallback-x11" - ]; - }; - - Environment = { - "DCONF_USER_CONFIG_DIR" = ".config/dconf"; - "GTK_THEME" = theme; - }; - }; - - # Package Updates - update = { - onActivation = false; - auto.enable = false; - }; - }; - }; -} diff --git a/nixos/modules/apps/games/default.nix b/nixos/modules/apps/games/default.nix @@ -1,73 +0,0 @@ -{ - config, - lib, - util, - pkgs, - ... -}: -let - inherit (lib) - mkIf - mkOption - mkOverride - types - ; - - inherit (util.map) modules; - enable = builtins.elem "games" config.apps.list; - wine = builtins.elem "wine" config.apps.list; -in -{ - imports = modules.list ./.; - - options.apps.games = mkOption { - description = "List of Installed Games"; - type = types.listOf (types.enum (modules.name ./.)); - default = [ ]; - }; - - ## Games Configuration ## - config = mkIf enable { - # Packages - environment.systemPackages = with pkgs; [ - bottles - lutris - ]; - - # Steam - programs.steam = { - enable = true; - protontricks.enable = true; - localNetworkGameTransfers.openFirewall = true; - }; - - # Game Mode - hardware.cpu.mode = mkOverride 51 "performance"; - gui.fancy = mkOverride 999 false; - programs.gamemode.enable = true; # Use 'gamemoderun %command%' - - user.homeConfig = { - # Runner - xdg.dataFile."lutris/runners/wine/wine-system" = mkIf wine { - source = config.apps.wine.package; - }; - - # Directories - home.persist.directories = [ - "Games" - ".local/share/bottles" - - # Lutris - ".cache/lutris" - ".config/lutris" - ".local/share/lutris" - - # Steam - ".local/share/applications" - ".local/share/icons/hicolor" - ".steam" - ".local/share/Steam" - ]; - }; - }; -} diff --git a/nixos/modules/apps/games/mc-server.nix b/nixos/modules/apps/games/mc-server.nix @@ -1,218 +0,0 @@ -# ? # Run 'systemctl start minecraft-server-NAME' to start the server -# ? # Run 'echo COMMAND > /run/minecraft/NAME.stdin' to run commands -{ - config, - lib, - inputs, - pkgs, - ... -}: -let - inherit (builtins) - attrValues - elem - listToAttrs - toString - ; - inherit (lib) - concatMap - mkIf - mkMerge - mkOption - types - ; - inherit (pkgs) fetchurl fetchzip linkFarmFromDrvs; - - cfg = config.apps.mc-servers; - dataDir = "/srv/minecraft"; -in -{ - imports = [ inputs.minecraft.nixosModules.minecraft-servers ]; - - options.apps.mc-servers = mkOption { - description = "List of Minecraft Servers"; - default = [ ]; - type = types.listOf ( - types.submodule ( - { config, ... }: - { - options = { - name = mkOption { - description = "Unique server name"; - type = types.str; - default = config.type; - }; - - type = mkOption { - description = "Server Type"; - type = types.enum [ - "fabric" - "skyblock" - ]; - default = "fabric"; - }; - - memory = mkOption { - description = "Memory (GB) allocated to server"; - type = types.int; - default = 12; - }; - - config = mkOption { - description = "Server Properties"; - type = types.attrs; - default = { }; - }; - - port = mkOption { - description = "Main server TCP port"; - type = types.int; - default = 25565; - }; - - vc-port = mkOption { - description = "Port for Simple Voice Chat"; - type = with types; nullOr int; - default = null; - }; - }; - } - ) - ); - }; - - config = mkIf (elem "mc-server" config.apps.games) { - hardware.fs.persist.directories = [ dataDir ]; - networking.firewall = { - allowedTCPPorts = map (srv: srv.port) cfg; - allowedUDPPorts = concatMap (srv: if (srv.vc-port != null) then [ srv.vc-port ] else [ ]) cfg; - }; - - services.minecraft-servers = { - enable = true; - inherit dataDir; - eula = true; - openFirewall = true; - managementSystem = { - tmux.enable = false; - systemd-socket.enable = true; - }; - - servers = listToAttrs ( - map (srv: { - inherit (srv) name; - value = mkMerge [ - { - enable = true; - autoStart = false; - serverProperties = srv.config // { - server-port = srv.port; - }; - jvmOpts = - let - mem = toString srv.memory; - in - "-Xms${mem}G -Xmx${mem}G --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=15"; - } - - ## Fabric Server - (mkIf (srv.type == "fabric") { - package = pkgs.fabricServers.fabric-1_21_10; - symlinks.mods = linkFarmFromDrvs "mods" ( - attrValues ( - { - # Server - FabricAPI = fetchurl { - url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/lxeiLRwe/fabric-api-0.136.0%2B1.21.10.jar"; - sha256 = "sha256-ADKAQNMSXhDUF/Fviupkr3JxmH6RFVRLuwvjK7PQV5c="; - }; - Lithium = fetchurl { - url = "https://cdn.modrinth.com/data/gvQqBUqZ/versions/oGKQMdyZ/lithium-fabric-0.20.0%2Bmc1.21.10.jar"; - sha256 = "sha256-567yN1D2eJgsAMQhjWIFljqZRVRFfCoWvZgY41IQAEs="; - }; - Krypton = fetchurl { - url = "https://cdn.modrinth.com/data/fQEb0iXm/versions/O9LmWYR7/krypton-0.2.10.jar"; - sha256 = "sha256-lCkdVpCgztf+fafzgP29y+A82sitQiegN4Zrp0Ve/4s="; - }; - FerriteCore = fetchurl { - url = "https://cdn.modrinth.com/data/uXXizFIs/versions/CtMpt7Jr/ferritecore-8.0.0-fabric.jar"; - sha256 = "sha256-K5C/AMKlgIw8U5cSpVaRGR+HFtW/pu76ujXpxMWijuo="; - }; - ScalableLux = fetchurl { - url = "https://cdn.modrinth.com/data/Ps1zyz6x/versions/PV9KcrYQ/ScalableLux-0.1.6%2Bfabric.c25518a-all.jar"; - sha256 = "sha256-ekpzcThhg8dVUjtWtVolHXWsLCP0Cvik8PijNbBdT8I="; - }; - C2ME = fetchurl { - url = "https://cdn.modrinth.com/data/VSNURh3q/versions/eY3dbqLu/c2me-fabric-mc1.21.10-0.3.5.0.0.jar"; - sha256 = "sha256-PZxX7IE3Zc+zsQrMc/LdI1jpUC9l/ov7z334OucWpgA="; - }; - - PlayerRoles = fetchurl { - url = "https://cdn.modrinth.com/data/Rt1mrUHm/versions/Qi5eDlej/player-roles-1.7.0.jar"; - sha256 = "sha256-+0nk/J2W3hVDdkKlZRHY4dBde3aF8e8Y1SPFOgDWNb0="; - }; - SkinRestorer = fetchurl { - url = "https://cdn.modrinth.com/data/ghrZDhGW/versions/MKWfnXfO/skinrestorer-2.4.3%2B1.21.9-fabric.jar"; - sha256 = "sha256-ypyDuX94HyUPlUI4CrFc0Pc01lUQXgYPqP/axaCi6Hc="; - }; - Silk = fetchurl { - url = "https://cdn.modrinth.com/data/aTaCgKLW/versions/2OisNxPN/silk-all-1.11.4.jar"; - sha256 = "sha256-C2VcLfFGweGOO+Xi1mOTkETX3NpoEdSz+9kYmEIDDv0="; - }; - FabricKotlin = fetchurl { - url = "https://cdn.modrinth.com/data/Ha28R6CL/versions/LcgnDDmT/fabric-language-kotlin-1.13.7%2Bkotlin.2.2.21.jar"; - sha256 = "sha256-d5UZY+3V19N+5PF0431GqHHkW5c0JvO0nWclyBm0uPI="; - }; - Veinminer = fetchurl { - url = "https://cdn.modrinth.com/data/OhduvhIc/versions/lCVEKyxE/veinminer-fabric-2.5.0.jar"; - sha256 = "sha256-13PbmxgTfM+WkQht7hsHrkEImXgTeBUpeKOcGtE/cOI="; - }; - VeinminerEnchant = fetchurl { - url = "https://cdn.modrinth.com/data/4sP0LXxp/versions/h5oKcjvq/veinminer-enchant-2.3.0.jar"; - sha256 = "sha256-NvGnsY9nfI+IMy2+Ljr1IahMqim9xOsRgojaFKWk/xQ="; - }; - - # Client and Server - Jade = fetchurl { - url = "https://cdn.modrinth.com/data/nvQzSEkH/versions/qC0qUqL5/Jade-1.21.9-Fabric-20.0.5.jar"; - sha256 = "sha256-HZfvnnYeRgbgQROdq6v9U7fnx1MhNaseaedNJPJpNxE="; - }; - } - // ( - if (srv.vc-port != null) then - { - SimpleVC = fetchurl { - url = "https://cdn.modrinth.com/data/9eGKb6K1/versions/BjR2lc4k/voicechat-fabric-1.21.10-2.6.6.jar"; - sha256 = "sha256-yC5pMBLsi4BnUq4CxTfwe4MGTqoBg04ZaRrsBC3Ds3Y="; - }; - } - else - { } - ) - ) - ); - }) - - ## Modded Skyblock Server - (mkIf (srv.type == "skyblock") ( - let - inherit (inputs.minecraft.lib) collectFilesAt; - - # Ozone Skyblock Reborn 2 - modpack = fetchzip { - url = "https://mediafilez.forgecdn.net/files/7243/245/OSR2%201.2.1%20-%20Server.zip"; - sha256 = "sha256-G7qUQ2ZKKsBUKugTcsv7RppAZVrNgsncrYYWzusTSF0="; - }; - in - { - package = pkgs.neoforgeServers.neoforge-1_21_1; - files = (collectFilesAt modpack "config") // (collectFilesAt modpack "kubejs"); - symlinks = collectFilesAt modpack "mods"; - } - )) - ]; - }) cfg - ); - }; - }; -} diff --git a/nixos/modules/apps/games/minecraft.nix b/nixos/modules/apps/games/minecraft.nix @@ -1,13 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -{ - ## Minecraft ## - config = lib.mkIf (builtins.elem "minecraft" config.apps.games) { - environment.systemPackages = [ pkgs.prismlauncher ]; - user.homeConfig.home.persist.directories = [ ".local/share/PrismLauncher" ]; - }; -} diff --git a/nixos/modules/apps/games/osu.nix b/nixos/modules/apps/games/osu.nix @@ -1,13 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -{ - ## OSU! ## - config = lib.mkIf (builtins.elem "osu" config.apps.games) { - environment.systemPackages = [ pkgs.osu-lazer-bin ]; - user.homeConfig.home.persist.directories = [ ".local/share/osu" ]; - }; -} diff --git a/nixos/modules/apps/games/roblox.nix b/nixos/modules/apps/games/roblox.nix @@ -1,18 +0,0 @@ -{ - config, - lib, - ... -}: -{ - ## Roblox ## - config = lib.mkIf (builtins.elem "roblox" config.apps.games) { - warnings = [ "Flatpak support is required to run Roblox" ]; - apps.list = [ "flatpak" ]; - services.flatpak.packages = [ - { - appId = "org.vinegarhq.Sober"; - origin = "flathub"; - } - ]; - }; -} diff --git a/nixos/modules/apps/git/default.nix b/nixos/modules/apps/git/default.nix @@ -1,169 +0,0 @@ -{ - config, - lib, - pkgs, - files, - ... -}: -{ - imports = [ - ./hosting.nix - ./runner.nix - ]; - - ## 'git' Configuration ## - config = lib.mkIf (builtins.elem "git" config.apps.list) { - # Utilities - environment.systemPackages = with pkgs; [ - gitFull - git-crypt - git-lfs - gh - tig - treefmt - ]; - - # Settings - user.homeConfig = { - imports = [ ./user.nix ]; - - home = { - persist.directories = [ - ".git-hooks" - ".config/gh" - ]; - - # Hooks - file.".git-hooks" = { - source = files.git.hooks; - recursive = true; - }; - }; - - # GitHub CLI - programs = { - gh = { - enable = true; - gitCredentialHelper.enable = true; - settings = { - prompt = "enabled"; - git_protocol = "https"; - aliases = rec { - a = "alias list"; - b = "browse"; - cfg = "config"; - ci = "run"; - co = "${p} checkout"; - g = "gpg-key"; - i = "issue"; - ic = "${i} close"; - is = "${i} status"; - iv = "${i} view"; - p = "pr"; - pm = "${p} merge"; - pv = "${p} view"; - r = "repo"; - rd = "${rl} download"; - rl = "release"; - rv = "${rl} view"; - s = "secret"; - w = "workflow"; - }; - }; - }; - - # Pager - delta = { - enable = true; - enableGitIntegration = true; - options = { - line-numbers = true; - theme = "Monokai Extended"; - conflictstyle = "diff3"; - }; - }; - - # 'git' Settings - git = { - enable = true; - lfs.enable = true; - - # Globally Ignored Files - ignores = [ - "*~*" - "*.bak" - ".direnv" - ".vscode" - "result" - "result-*" - "tags.*" - ]; - - settings = { - color.ui = "auto"; - core.hooksPath = "~/.git-hooks"; - credential.helper = [ "libsecret" ]; - diff.colorMoved = "default"; - init.defaultBranch = "main"; - pull.rebase = "true"; - safe.directory = files.path.system; - - # Command Aliases - alias = rec { - a = "add"; - ad = "${a} -A ."; - ai = "${a} -i"; - ap = "${a} -p"; - b = "branch"; - bc = "${b} --show-current"; - bd = "${b} -D"; - backup = ''!sh -c 'CURRENT=$(git ${bc}) && git ${st} && git ${co} -B backup && git ${st} apply && git ${ad} && git ${cam} "backup" && git ${pf} $1 && git ${co} $CURRENT && git ${stp} && git ${bd} backup' -''; - cfg = "config"; - ci = "commit -v"; - cam = "${ci} -am"; - cia = "${ci} -a"; - cmx = ''!sh -c 'msg=$(cat ./.git/COMMIT_EDITMSG); echo "''${msg%%#*}"' -''; - co = "checkout"; - cp = "cherry-pick"; - cpp = "!sh -c 'CURRENT=$(git ${bc}) && git ${st} && git ${co} -B $2 $3 && git ${cp} $1 && git ${pf} $4 && git ${co} $CURRENT && git ${stp}' -"; - d = "diff"; - df = "${d} HEAD"; - dx = "${d} --color-words"; - dc = "${d} --cached"; - dcx = "${dc} --color-words"; - l = "log --graph --decorate --abbrev-commit"; - l1 = "${l} --pretty=oneline --all"; - lf = "log -p --follow"; - lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%n' --abbrev-commit --date=relative --branches"; - ll = "${l} -p"; - m = "merge"; - ms = "${m} --squash"; - p = "push"; - pf = "${p} --force"; - pl = "!sh -c 'git pull && git fetch -p' -"; - pt = "${p} --tag"; - pu = "${p} --set-upstream"; - rb = "rebase"; - record = "!sh -c '(git ${a} -p -- $@ && git ${ci}) || git ${r}' --"; - ro = "restore"; - r = "reset"; - rs = "${r} --soft"; - rh = "${r} --hard"; - rsh = "${rs} HEAD^"; - s = "!git --no-pager status"; - sm = "submodule"; - st = "stash"; - std = "${st} drop"; - sti = "${st} --keep-index"; - stp = "${st} pop"; - sync = "${pf} --mirror"; - t = "tag"; - td = "!sh -c 'git ${t} -d $1 && git ${p} origin :$1' -"; - tl = "${t} -l"; - }; - }; - }; - }; - }; - }; -} diff --git a/nixos/modules/apps/git/hosting.nix b/nixos/modules/apps/git/hosting.nix @@ -1,130 +0,0 @@ -{ - config, - options, - lib, - ... -}: -let - inherit (lib) - mkEnableOption - mkIf - mkOption - types - ; - - inherit (config.apps.git.hosting) enable domain secret; - opt = options.apps.git.hosting; -in -{ - options.apps.git.hosting = { - enable = mkEnableOption "Enable Gitea Code Hosting"; - domain = mkOption { - description = "Website Domain Name"; - type = types.str; - default = ""; - example = "maydayv7.net"; - }; - secret = mkOption { - description = "Path to Cloudfare Authentication Credentials"; - type = types.str; - default = ""; - }; - }; - - config = mkIf enable { - assertions = [ - { - assertion = domain != ""; - message = opt.domain.description + " must be set"; - } - { - assertion = secret != ""; - message = opt.secret.description + " must be set"; - } - ]; - - # User Configuration - user.groups = [ "gitea" ]; - users.users.git = { - useDefaultShell = true; - home = "/var/lib/gitea"; - group = "gitea"; - isSystemUser = true; - }; - - # Gitea Settings - services.gitea = { - enable = true; - lfs.enable = true; - - # Security - user = "git"; - database.user = "git"; - cookieSecure = true; - disableRegistration = true; - - # Repository - inherit domain; - appName = "Code Hosting"; - rootUrl = "https://${domain}"; - httpPort = 7000; - settings.ui.DEFAULT_THEME = "arc-green"; - }; - - # NGINX Secured Reverse Proxy - environment.persist.directories = [ "/srv" ]; - networking.firewall = { - allowedUDPPorts = [ 7000 ]; - allowedTCPPorts = [ - 80 - 443 - 7000 - ]; - }; - - security.acme = { - acceptTerms = true; - email = "accounts+acme@${domain}"; - certs."${domain}" = { - group = "nginx"; - email = "admin@${domain}"; - dnsProvider = "cloudflare"; - credentialsFile = secret; - extraLegoFlags = [ "--dns.resolvers=8.8.8.8:53" ]; - }; - }; - - services.nginx = { - enable = true; - - # Security - clientMaxBodySize = "1g"; - commonHttpConfig = '' - client_body_buffer_size 4k; - large_client_header_buffers 2 4k; - map $sent_http_content_type $expires { - default off; - text/html 10m; - text/css max; - application/javascript max; - application/pdf max; - ~image/ max; - } - ''; - - # Recommended Defaults - recommendedGzipSettings = true; - recommendedOptimisation = true; - recommendedProxySettings = true; - recommendedTlsSettings = true; - - # Code Hosting - virtualHosts."${domain}" = { - forceSSL = true; - useACMEHost = "${domain}"; - root = "/srv/www/${domain}"; - locations."/".proxyPass = "http://127.0.0.1:7000"; - }; - }; - }; -} diff --git a/nixos/modules/apps/git/runner.nix b/nixos/modules/apps/git/runner.nix @@ -1,75 +0,0 @@ -{ - config, - options, - lib, - pkgs, - files, - ... -}: -let - inherit (lib) - mkIf - mkMerge - mkOption - types - ; - - inherit (config.apps.git) runner; -in -{ - options.apps.git.runner = { - support = mkOption { - description = "Support for 'git' Runners"; - type = types.nullOr ( - types.enum [ - "github" - "gitlab" - ] - ); - default = null; - }; - secret = mkOption { - description = "Path to Secret for 'git' Runner"; - type = types.str; - default = ""; - }; - }; - - ## Runner Configuration ## - config = mkIf (runner.support != null) (mkMerge [ - { - assertions = [ - { - assertion = runner.secret != ""; - message = options.apps.git.runner.secret.description + " must be set"; - } - ]; - } - (mkIf (runner.support == "github") { - # GitHub Runner - environment.systemPackages = [ pkgs.act ]; - services.github-runners.runner = { - enable = true; - url = files.path.repo; - extraLabels = [ "self" ]; - tokenFile = runner.secret; - }; - }) - - (mkIf (runner.support == "gitlab") { - # Docker Support - boot.kernel.sysctl."net.ipv4.ip_forward" = true; - virtualisation.docker.enable = true; - - # GitLab Runner - services.gitlab-runner = { - enable = true; - services.default = { - dockerImage = "alpine"; - tagList = [ "self" ]; - authenticationTokenConfigFile = runner.secret; - }; - }; - }) - ]); -} diff --git a/nixos/modules/apps/git/user.nix b/nixos/modules/apps/git/user.nix @@ -1,34 +0,0 @@ -{ - config, - options, - lib, - ... -}: -let - cfg = config.credentials; - opt = options.credentials.mail.description; -in -{ - ## User Credentials ## - # Warnings - assertions = [ - { - assertion = cfg.mail != ""; - message = opt + " must be set"; - } - ]; - - programs.git = { - settings = { - user.name = cfg.name; - user.email = cfg.mail; - github.user = cfg.name; - }; - - signing = { - format = "openpgp"; - signByDefault = lib.mkIf (cfg.key != "") true; - key = lib.mkIf (cfg.key != "") (builtins.substring 24 30 cfg.key); - }; - }; -} diff --git a/nixos/modules/apps/internet.nix b/nixos/modules/apps/internet.nix @@ -1,52 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - enable = builtins.elem "internet" config.apps.list; -in -{ - ## Internet Apps Configuration ## - config = lib.mkIf enable { - programs.chromium = { - enable = true; - extensions = [ - "cjpalhdlnbpafiamejdnhcphjbkeiagm" # UBlock Origin - "djflhoibgkdhkhhcedjiklpkjnoahfmg" # User Agent Switcher - "lckanjgmijmafbedllaakclkaicjfmnk" # ClearURLs - "oofgbpoabipfcfjapgnbbjjaenockbdp" # SetupVPN - "jghecgabfgfdldnmbfkhmffcabddioke" # Volume Booster - "jaioibhbkffompljnnipmpkeafhpicpd" # Tab Auto Refresh - "eimadpbcbfnmbkopoojfekhnkhdbieeh" # Dark Reader - "clngdbkpkpeebahjckkjfobafhncgmne" # Stylus - ]; - }; - - environment.systemPackages = with pkgs; [ - brave - linux-wifi-hotspot - openfortivpn - teams-for-linux - thunderbird - wasistlos - zoom-us - ]; - - user.homeConfig.home.persist = { - files = [ ".config/zoomus.conf" ]; - directories = [ - ".config/BraveSoftware" - ".cache/BraveSoftware" - ".thunderbird" - ".cache/thunderbird" - ".config/wasistlos" - ".local/share/wasistlos" - ".cache/wasistlos" - ".zoom" - ".cache/zoom" - ]; - }; - }; -} diff --git a/nixos/modules/apps/latex.nix b/nixos/modules/apps/latex.nix @@ -1,26 +0,0 @@ -{ - config, - lib, - util, - pkgs, - ... -}: -let - enable = builtins.elem "latex" config.apps.list; -in -{ - ## LaTeX Configuration ## - config = lib.mkIf enable { - environment.systemPackages = with pkgs; [ - texliveFull - setzer - ]; - - user.homeConfig = { - home.persist.directories = [ ".config/setzer" ]; - xdg.mimeApps.defaultApplications = util.build.mime { - latex = [ "org.cvfosammmm.Setzer.desktop" ]; - }; - }; - }; -} diff --git a/nixos/modules/apps/notes.nix b/nixos/modules/apps/notes.nix @@ -1,60 +0,0 @@ -{ - config, - lib, - util, - pkgs, - files, - ... -}: -let - inherit (lib) mkIf mkOption types; - mutable = { - mutable = true; - force = true; - }; - - enable = builtins.elem "notes" config.apps.list; - cfg = config.apps.logseq; -in -{ - ## Logseq Configuration ## - options.apps.logseq.style = mkOption { - description = "Path to Logseq Notes CSS"; - type = types.str; - default = ""; - }; - - config = mkIf enable { - environment.systemPackages = [ pkgs.logseq ]; - - user.homeConfig.home = { - persist.directories = [ - ".logseq" - ".config/Logseq" - ]; - - file = - with files.logseq; - { - ".config/logseq/configs.edn".text = "{:window/native-titlebar? true}"; - ".logseq/preferences.json" = { - text = prefs; - } - // mutable; - ".logseq/config/config.edn".text = mkIf ( - cfg.style != "" - ) ''{:custom-css-url "@import ${cfg.style};"}''; - } - // util.map.folder { - directory = settings; - path = ".logseq/settings"; - extension = ".json"; - apply = text: { inherit text; } // mutable; - replace = { - placeholders = [ "@bg" ]; - values = [ config.lib.stylix.colors.base00 ]; - }; - }; - }; - }; -} diff --git a/nixos/modules/apps/office.nix b/nixos/modules/apps/office.nix @@ -1,94 +0,0 @@ -{ - config, - lib, - util, - pkgs, - files, - ... -}: -let - enable = builtins.elem "office" config.apps.list; -in -{ - ## Office Environment Configuration ## - config = lib.mkIf enable { - environment = { - systemPackages = with pkgs; [ - # Productivity - calibre - gscan2pdf - keepassxc - libreoffice - onlyoffice-desktopeditors - pdfarranger - simple-scan - - # Graphics - gimp3 - handbrake - inkscape - xournalpp - - # Dictionary - hunspell - hunspellDicts.en_US-large - hyphen - ]; - - variables."DICPATH" = "/run/current-system/sw/share/hunspell:/run/current-system/sw/share/hyphen"; - pathsToLink = [ - "/share/hunspell" - "/share/myspell" - "/share/hyphen" - ]; - }; - - user.homeConfig = { - xdg.mimeApps.defaultApplications = util.build.mime { - office = [ "onlyoffice-desktopeditors.desktop" ]; - password = [ "org.keepassxc.KeePassXC.desktop" ]; - }; - - # Password Manager - programs.keepassxc.enable = true; - - home = { - persist = { - files = [ ".config/gscan2pdfrc" ]; - directories = [ - ".calibre" - ".config/calibre" - ".config/GIMP" - ".cache/gimp" - ".config/inkscape" - ".config/keepassxc" - ".cache/keepassxc" - ".config/libreoffice" - ".config/onlyoffice" - ".local/share/onlyoffice" - ".local/share/data" - ]; - }; - - file = { - # Document Templates - "Templates" = rec { - source = files.templates; - target = ".init-templates"; - onChange = '' - rm -rf ~/Templates - cp -rL ~/${target} ~/Templates - chmod -R 0777 ~/Templates - ''; - }; - - # Font Rendering - ".local/share/fonts" = { - source = "${pkgs.custom.fonts}/share/fonts"; - recursive = true; - }; - }; - }; - }; - }; -} diff --git a/nixos/modules/apps/spotify.nix b/nixos/modules/apps/spotify.nix @@ -1,52 +0,0 @@ -{ - config, - lib, - inputs, - pkgs, - ... -}: -let - enable = builtins.elem "spotify" config.apps.list; -in -{ - ## Spotify Configuration ## - config = lib.mkIf enable { - environment.systemPackages = with pkgs; [ - spotify - spot - spicetify-cli - ]; - - user.homeConfig = { - imports = [ inputs.spicetify.homeManagerModules.default ]; - home.persist.directories = [ - ".config/spotify" - ".cache/spotify" - ".cache/spot" - ]; - - programs.spicetify = { - enable = true; - - # Player Improvements - enabledCustomApps = with pkgs.spicetify.apps; [ - betterLibrary - localFiles - newReleases - ]; - - enabledExtensions = with pkgs.spicetify.extensions; [ - beautifulLyrics - goToSong - history - loopyLoop - playNext - popupLyrics - seekSong - showQueueDuration - volumePercentage - ]; - }; - }; - }; -} diff --git a/nixos/modules/apps/stream.nix b/nixos/modules/apps/stream.nix @@ -1,19 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - enable = builtins.elem "stream" config.apps.list; -in -{ - ## Streaming Configuration ## - config = lib.mkIf enable { - environment.systemPackages = [ pkgs.stremio-linux-shell ]; - user.homeConfig.home.persist.directories = [ - ".stremio-server" - ".local/share/stremio" - ]; - }; -} diff --git a/nixos/modules/apps/tools.nix b/nixos/modules/apps/tools.nix @@ -1,62 +0,0 @@ -{ - config, - lib, - util, - pkgs, - ... -}: -let - enable = builtins.elem "tools" config.apps.list; -in -{ - ## Tools Configuration ## - config = lib.mkIf enable { - environment.systemPackages = with pkgs; [ - # Utilities - clapgrep - gearlever - popsicle - - # Graphics - drawing - identity - pitivi - vipsdisp - - # Audio - pwvucontrol - qpwgraph - ]; - - # Screen Record - programs.obs-studio = { - enable = true; - enableVirtualCamera = true; - plugins = with pkgs.obs-studio-plugins; [ - obs-mute-filter - obs-source-switcher - ]; - }; - - user.homeConfig = { - # AppImage Manager - dconf.settings."it/mijorus/gearlever".appimages-default-folder = "~/.appimages"; - xdg.mimeApps.defaultApplications = util.build.mime { - appimage = [ "it.mijorus.gearlever.desktop" ]; - }; - - # Audio Effects - services.easyeffects.enable = true; - - home.persist = { - files = [ ".config/rncbc.org/qpwgraph" ]; - directories = [ - ".appimages" - ".config/de.leopoldluley.Clapgrep" - ".config/obs-studio" - ".config/pitivi" - ]; - }; - }; - }; -} diff --git a/nixos/modules/apps/vscode/default.nix b/nixos/modules/apps/vscode/default.nix @@ -1,97 +0,0 @@ -{ - config, - lib, - util, - pkgs, - files, - ... -}: -let - inherit (builtins) elem head; - enable = elem "vscode" config.apps.list; - font = head config.fonts.fontconfig.defaultFonts.monospace; - package = pkgs.vscode; -in -{ - ## Visual Studio Code Editor Configuration ## - config = lib.mkIf enable { - environment.systemPackages = [ - package - ] - ++ (with pkgs; [ - nil - nixfmt - ]); - - user.homeConfig = { - # Mutable Configuration File - imports = [ ./mutable.nix ]; - - # Environment - xdg.mimeApps.defaultApplications = util.build.mime { - code = [ "code.desktop" ]; - markdown = [ "code.desktop" ]; - text = [ "code.desktop" ]; - }; - - home.persist.directories = [ - ".config/Code" - ".vscode" - ]; - - programs.vscode = { - enable = true; - inherit package; - profiles.default = with files.vscode; { - # Keyboard Shortcuts - inherit keybindings; - - # Settings - userSettings = settings // { - "editor.fontFamily" = "'${font}', 'monospace', monospace"; - }; - - ## Editor Extensions - extensions = - with pkgs.vscode-extensions; - [ - aaron-bond.better-comments # Annotations - editorconfig.editorconfig # .editorconfig - esbenp.prettier-vscode # Formatter - file-icons.file-icons # File Icons - naumovs.color-highlight # Color Viewer - johnpapa.vscode-peacock # Workspace Color - - # Git - eamodio.gitlens - github.vscode-pull-request-github - - github.copilot # Copilot AI - dart-code.flutter # Flutter - divyanshuagrawal.competitive-programming-helper # CP - jnoortheen.nix-ide # Nix - ms-python.python # Python - ms-vscode.cpptools # C/C++ - redhat.java # Java - rust-lang.rust-analyzer # Rust - tomoki1207.pdf # PDF Viewer - yzhang.markdown-all-in-one # Markdown - - # HTML+CSS+XML - ecmel.vscode-html-css - formulahendry.auto-rename-tag - redhat.vscode-xml - - # JS - dbaeumer.vscode-eslint - ritwickdey.liveserver - ] - ++ (with pkgs.vscode-marketplace; [ - kisstkondoros.vscode-gutter-preview # Image Preview - fwcd.kotlin # Kotlin - ]); - }; - }; - }; - }; -} diff --git a/nixos/modules/apps/vscode/mutable.nix b/nixos/modules/apps/vscode/mutable.nix @@ -1,36 +0,0 @@ -# https://gist.github.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa -{ - config, - lib, - ... -}: -let - configDir = - { - "vscode" = "Code"; - "vscode-insiders" = "Code - Insiders"; - "vscodium" = "VSCodium"; - } - .${config.programs.vscode.package.pname}; - userDir = "${config.xdg.configHome}/${configDir}/User"; - - configFilePath = "${userDir}/settings.json"; - tasksFilePath = "${userDir}/tasks.json"; - keybindingsFilePath = "${userDir}/keybindings.json"; - snippetDir = "${userDir}/snippets"; - - cfg = config.programs.vscode.profiles.default; - pathsToMakeWritable = lib.flatten [ - (lib.optional (cfg.userTasks != { }) tasksFilePath) - (lib.optional (cfg.userSettings != { }) configFilePath) - (lib.optional (cfg.keybindings != [ ]) keybindingsFilePath) - (lib.optional (cfg.globalSnippets != { }) "${snippetDir}/global.code-snippets") - (lib.mapAttrsToList (language: _: "${snippetDir}/${language}.json") cfg.languageSnippets) - ]; -in -{ - home.file = lib.genAttrs pathsToMakeWritable (_: { - force = true; - mutable = true; - }); -} diff --git a/nixos/modules/apps/wine.nix b/nixos/modules/apps/wine.nix @@ -1,76 +0,0 @@ -{ - config, - lib, - util, - pkgs, - ... -}: -let - inherit (builtins) attrValues elem map; - inherit (lib) - mkIf - mkEnableOption - mkOption - optionals - types - ; - - cfg = config.apps.wine; - enable = elem "wine" config.apps.list; -in -{ - ## Wine Configuration ## - options.apps.wine = { - utilities = mkEnableOption "Install Utility Windows apps"; - package = mkOption { - description = "Package to use for 'wine'"; - type = types.package; - default = pkgs.wineWowPackages.stagingFull; - example = pkgs.gaming.wine-ge; - }; - }; - - config = mkIf enable { - # Firmware - services.samba.enable = true; - hardware.xpadneo.enable = true; - hardware.graphics.enable32Bit = true; - - # Utilities - user.homeConfig.home.persist.directories = [ - ".wine" - ".cache/wine" - ".cache/winetricks" - ] - ++ optionals cfg.utilities [ ".config/notepad++" ]; - - environment.systemPackages = - with pkgs.wine // pkgs; - (map - ( - name: if (name.override.__functionArgs ? wine) then name.override { wine = cfg.package; } else name - ) - ( - [ - cfg.package - winetricks - mkwindowsapp-tools - playonlinux - ] - # Wrapped Packages - ++ optionals cfg.utilities ( - attrValues ( - util.map.modules ../../packages/wine ( - name: - callPackage name { - inherit lib pkgs; - wine = cfg.package; - build = winelib; - } - ) - ) - ) - ) - ); - }; -} diff --git a/nixos/modules/apps/youtube.nix b/nixos/modules/apps/youtube.nix @@ -1,54 +0,0 @@ -{ - config, - lib, - pkgs, - files, - ... -}: -let - inherit (builtins) elem toFile; - inherit (lib) - mkIf - mkOption - replaceStrings - types - ; - - enable = elem "youtube" config.apps.list; -in -{ - ## YT Configuration ## - options.apps.ytmusic.style = mkOption { - description = "YouTube Music CSS"; - type = types.str; - default = ""; - }; - - config = mkIf enable { - environment.systemPackages = with pkgs; [ - youtube-music - youtube-tui - yt-dlp - ]; - - user.homeConfig.home = { - persist.directories = [ - ".config/YouTube Music" - ".config/youtube-tui" - ".local/share/youtube-tui" - ]; - - file.".config/YouTube Music/config.json" = { - text = - replaceStrings - [ "@theme" ] - [ - (toFile "style.css" config.apps.ytmusic.style) - ] - files.youtube; - mutable = true; - force = true; - }; - }; - }; -} diff --git a/nixos/modules/base/default.nix b/nixos/modules/base/default.nix @@ -1,103 +0,0 @@ -{ - config, - options, - lib, - util, - pkgs, - ... -}: -let - inherit (builtins) attrNames map; - inherit (lib) - hasPrefix - mkIf - mkOption - optionals - removePrefix - types - ; - - cfg = config.base; -in -{ - ## BASE Configuration ## - imports = util.map.modules.list ./.; - - options.base = { - kernel = mkOption { - description = "Linux Kernel Variant to be used"; - default = "lts"; - type = types.enum ( - [ "lts" ] ++ (map (name: removePrefix "linux_" name) (attrNames pkgs.linuxKernel.kernels)) - ); - }; - - kernelModules = mkOption { - description = "Linux Kernel Modules to load"; - type = with types; listOf str; - default = [ ]; - }; - }; - - config = { - # Kernel Configuration - boot = { - kernelPackages = - if (cfg.kernel == "lts") then - options.boot.kernelPackages.default - else - pkgs.linuxKernel.packages."${"linux_" + cfg.kernel}"; - - initrd.availableKernelModules = optionals (cfg.kernelModules != [ ]) ( - cfg.kernelModules - ++ [ - "ahci" - "sd_mod" - "usbhid" - "usb_storage" - "xhci_pci" - ] - ); - }; - - # Documentation - documentation = { - dev.enable = true; - man.enable = true; - }; - - # Console - console = { - earlySetup = true; - packages = [ pkgs.terminus_font ]; - font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz"; - }; - - # Essential Utilities - environment = { - variables."NIXOS_SPECIALISATION" = - with config.system.nixos; - mkIf (hasPrefix "special." label) (removePrefix "special." label); - - systemPackages = with pkgs; [ - custom.nixos - cryptsetup - file - inxi - killall - man-pages - mkpasswd - ntfsprogs - parted - pciutils - rsync - sdparm - smartmontools - unrar - unzip - usbutils - wget - ]; - }; - }; -} diff --git a/nixos/modules/base/firmware.nix b/nixos/modules/base/firmware.nix @@ -1,99 +0,0 @@ -{ - lib, - inputs, - pkgs, - ... -}: -let - inherit (lib) mkForce; -in -{ - imports = [ inputs.gaming.nixosModules.pipewireLowLatency ]; - - ## Device Firmware ## - config = { - # Drivers - security.rtkit.enable = true; - hardware = { - graphics.enable = true; - enableRedistributableFirmware = true; - }; - - # Audio - environment.systemPackages = [ pkgs.alsa-utils ]; - services.pulseaudio.enable = mkForce false; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - lowLatency = { - enable = true; - quantum = 64; - rate = 48000; - }; - }; - - # Network Settings - user.groups = [ "networkmanager" ]; - networking = { - networkmanager.enable = true; - firewall.enable = true; - }; - - hardware.bluetooth = { - enable = true; - powerOnBoot = true; - settings.General.Experimental = true; - }; - - # Memory - systemd.oomd.enable = false; - services.earlyoom = { - enable = true; - enableNotifications = true; - freeMemThreshold = 5; - freeSwapThreshold = 15; - }; - - ## Encryption - # GPG - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - - # SSH - services.openssh = { - enable = true; - settings = { - PasswordAuthentication = true; - PermitRootLogin = mkForce "no"; - }; - - hostKeys = [ - { - comment = "Host SSH Key"; - bits = 4096; - type = "ed25519"; - path = "/etc/ssh/ssh_key"; - } - ]; - }; - - # Persisted Files - user.homeConfig.home.persist.directories = [ - { - directory = ".gnupg"; - mode = "0700"; - } - ]; - - environment.persist.directories = [ - "/etc/NetworkManager" - "/etc/ssh" - "/var/lib/alsa" - "/var/lib/bluetooth" - ]; - }; -} diff --git a/nixos/modules/base/security.nix b/nixos/modules/base/security.nix @@ -1,101 +0,0 @@ -{ - lib, - pkgs, - ... -}: -{ - ## Security & Hardening Settings ## - config = { - security = { - protectKernelImage = false; # To enable Hibernation - - # Security Module - apparmor = { - enable = true; - killUnconfinedConfinables = true; - packages = [ pkgs.apparmor-profiles ]; - }; - }; - - # Block Junk Sites - networking.stevenblack.enable = true; - - # Sandbox - programs.firejail.enable = true; - - boot = { - # Hardening - kernelParams = [ - "page_alloc.shuffle=1" - "page_poison=1" - "slub_debug=FZP" - ]; - - kernel.sysctl = { - # Kernel - "kernel.ftrace_enabled" = false; - "kernel.kexec_load_disabled" = true; - "kernel.kptr_restrict" = lib.mkOverride 500 2; - "kernel.sysrq" = 176; - "kernel.yama.ptrace_scope" = lib.mkOverride 500 1; - - # Network - "net.core.bpf_jit_enable" = true; - "net.core.default_qdisc" = "cake"; - "net.ipv4.conf.all.accept_redirects" = false; - "net.ipv4.conf.all.accept_source_route" = 0; - "net.ipv4.conf.all.log_martians" = true; - "net.ipv4.conf.all.rp_filter" = 1; - "net.ipv4.conf.all.secure_redirects" = false; - "net.ipv4.conf.all.send_redirects" = false; - "net.ipv4.conf.default.accept_redirects" = false; - "net.ipv4.conf.default.log_martians" = true; - "net.ipv4.conf.default.rp_filter" = 1; - "net.ipv4.conf.default.secure_redirects" = false; - "net.ipv4.conf.default.send_redirects" = false; - "net.ipv4.icmp_echo_ignore_broadcasts" = true; - "net.ipv4.icmp_ignore_bogus_error_responses" = 1; - "net.ipv4.tcp_congestion_control" = "bbr"; - "net.ipv4.tcp_fastopen" = 3; - "net.ipv4.tcp_rfc1337" = 1; - "net.ipv4.tcp_syncookies" = 1; - "net.ipv6.conf.all.accept_redirects" = false; - "net.ipv6.conf.all.accept_source_route" = 0; - "net.ipv6.conf.default.accept_redirects" = false; - }; - - # Secure Modules - kernelModules = [ "tcp_bbr" ]; - - # Old & Obscure Modules - blacklistedKernelModules = [ - # Network Protocols - "ax25" - "netrom" - "rose" - - # Filesystems - "adfs" - "affs" - "befs" - "bfs" - "cramfs" - "efs" - "erofs" - "exofs" - "f2fs" - "freevxfs" - "hfs" - "hpfs" - "jfs" - "minix" - "nilfs2" - "omfs" - "qnx4" - "qnx6" - "sysv" - "ufs" - ]; - }; - }; -} diff --git a/nixos/modules/configuration.nix b/nixos/modules/configuration.nix @@ -1,142 +0,0 @@ -inputs: -let - inherit (inputs) self nixpkgs; - util = self.lib; - inherit (self) files; - - inherit (nixpkgs) lib; - inherit (lib) fileContents mkIf; - inherit (builtins) - attrValues - hashString - map - removeAttrs - replaceStrings - substring - ; -in -## Configuration Build Function ## -{ - system ? "x86_64-linux", - name ? "nixos", - description ? "", - imports ? [ ], - timezone, - locale, - update ? "", - kernel, - kernelModules ? [ ], - apps ? { }, - gui ? { }, - hardware ? { }, - nix ? { }, - shell ? { }, - user ? null, - users ? null, -}: -let - # Package Channel - pkgs = self.legacyPackages."${system}"; - - # User Build Function - user' = - { - name, - description, - uid ? 1000, - groups ? [ "wheel" ], - password ? "", - autologin ? false, - shell ? "bash", - shells ? [ ], - homeConfig ? { }, - minimal ? false, - }: - { - user.settings."${name}" = { - inherit - name - description - uid - autologin - minimal - homeConfig - ; - extraGroups = groups; - hashedPassword = mkIf (password != "") password; - initialHashedPassword = mkIf (password == "") ""; - shell = pkgs."${shell}"; - shells = if (shells == null) then [ ] else shells ++ [ shell ]; - }; - }; -in -## Device Configuration ## -assert (user == null) -> (users != null); # User must be defined -import ((self.patchedPkgs system) + "/nixos/lib/eval-config.nix") { - system = null; - specialArgs = { - inherit util inputs files; - lib = lib // { - inherit (inputs.home.lib) hm; - }; - }; - - modules = [ - { - # Modulated Configuration Imports - imports = - imports - ++ attrValues (removeAttrs (util.map.modules ./. import) [ "configuration" ]) - ++ map user' (if (user != null) then [ user ] else users) - ++ util.map.array (hardware.modules or [ ]) inputs.hardware.nixosModules; - - inherit - apps - gui - hardware - nix - shell - ; - - base = { inherit kernel kernelModules; }; - - # Device Name - networking = { - hostName = name; - hostId = substring 0 8 (hashString "md5" name); - }; - - # Localization - time.timeZone = timezone; - i18n.defaultLocale = "en_${locale}"; - environment.variables."LC_ALL" = "en_${locale}.UTF-8"; - - # Package Configuration - nixpkgs = { - inherit pkgs; - hostPlatform = system; - }; - - system = { - name = "${name}-${replaceStrings [ " " ] [ "_" ] description}"; - - # Updates - autoUpgrade = { - enable = mkIf (update != "") true; - dates = mkIf (update != "") update; - inherit (files.path) flake; - }; - - # Version - stateVersion = fileContents "${nixpkgs}/lib/.version"; - configurationRevision = - if (self ? rev) then - "${substring 0 8 self.lastModifiedDate}.${self.shortRev}" - else if (self ? dirtyRev) then - self.dirtyShortRev - else - "dirty"; - }; - } - ]; -} diff --git a/nixos/modules/gui/default.nix b/nixos/modules/gui/default.nix @@ -1,85 +0,0 @@ -{ - config, - options, - lib, - util, - ... -}: -let - inherit (util.map.modules) list name; - inherit (lib) - mkEnableOption - mkIf - mkMerge - mkOption - optional - types - ; - - inherit (config.gui) desktop; -in -{ - ## GUI Configuration ## - imports = list ./. ++ list ./desktop; - - options.gui = { - fancy = mkEnableOption "Enable Fancy GUI Effects"; - display = mkOption { - description = "Main GUI Display"; - type = types.str; - default = "eDP-1"; - example = "HDMI-A-1"; - }; - - desktop = mkOption { - description = "GUI Desktop Choice"; - type = types.enum ((name ./desktop) ++ [ "" ]); - default = ""; - }; - }; - - config = mkMerge [ - { warnings = optional (desktop == "") (options.gui.desktop.description + " is unset"); } - - ## Desktop Environment - (mkIf (desktop != "" && desktop != "install") { - # Utilities - gui.fonts.enable = true; - services = { - gvfs.enable = true; - gnome.gnome-keyring.enable = true; - }; - - programs = { - xwayland.enable = true; - seahorse.enable = true; - }; - - user.homeConfig = { - home.persist.directories = [ - ".config/autostart" - ".local/share/gvfs-metadata" - ]; - - services = { - poweralertd.enable = true; # Power alerts - mpris-proxy.enable = true; # Audio devices - }; - }; - - # Environment Setup - environment.sessionVariables = { - "NIXOS_OZONE_WL" = "1"; - "QT_QPA_PLATFORM" = "wayland;xcb"; - "MOZ_ENABLE_WAYLAND" = "1"; - "CLUTTER_BACKEND" = "wayland"; - }; - - xdg.portal = { - enable = true; - xdgOpenUsePortal = true; - wlr.enable = true; - }; - }) - ]; -} diff --git a/nixos/modules/gui/desktop/_shared/browser.nix b/nixos/modules/gui/desktop/_shared/browser.nix @@ -1,30 +0,0 @@ -{ - config, - lib, - ... -}: -let - inherit (config._shared) enable theme; -in -{ - ## Browser Configuration - config = lib.mkIf enable { - apps.list = [ "firefox" ]; - user.homeConfig = { - home.file.".mozilla/firefox/default/chrome/userChrome.css".text = '' - #TabsToolbar { - -moz-window-dragging: no-drag; - } - ''; - - # Theme - programs.firefox.policies.ExtensionSettings = { - name = with theme; "${name}-${variant}-${accent}"; - value = { - installation_mode = "normal_installed"; - install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/{d49033ac-8969-488c-afb0-5cdb73957f41}/latest.xpi"; - }; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/_shared/default.nix b/nixos/modules/gui/desktop/_shared/default.nix @@ -1,5 +0,0 @@ -{ lib, util, ... }: -{ - options._shared.enable = lib.mkEnableOption "INTERNAL: Enable Shared Configuration"; - imports = util.map.modules.list ./.; -} diff --git a/nixos/modules/gui/desktop/_shared/files.nix b/nixos/modules/gui/desktop/_shared/files.nix @@ -1,131 +0,0 @@ -{ - config, - lib, - util, - pkgs, - files, - ... -}: -let - inherit (lib) - hm - getExe - getExe' - mkIf - replaceStrings - ; - - inherit (config.gui) icons; - terminal = "kitty"; - nemo = pkgs.nemo-with-extensions; -in -{ - ## File Manager Configuration - config = mkIf config._shared.enable { - services.dbus.packages = [ nemo ]; - environment.systemPackages = [ - nemo - ] - ++ (with pkgs; [ - cinnamon-desktop - bulky - file-roller - lxqt.pcmanfm-qt - ]); - - user.homeConfig = { - xdg.mimeApps.defaultApplications = util.build.mime { - archive = [ "org.gnome.FileRoller.desktop" ]; - directory = [ "nemo.desktop" ]; - }; - - # Settings - dconf.settings = { - "org/gtk/gtk4/settings/file-chooser".sort-directories-first = true; - "org/nemo/search".search-reverse-sort = false; - "org/nemo/desktop".show-desktop-icons = false; - "org/nemo/plugins".disabled-actions = [ "change-background.nemo_action" ]; - "org/nemo/icon-view".captions = [ - "size" - "type" - "date_modified" - ]; - - "org/nemo/preferences" = { - click-policy = "double"; - date-format = "informal"; - inherit-folder-viewer = true; - quick-renames-with-pause-in-between = true; - show-advanced-permissions = true; - show-new-folder-icon-toolbar = false; - show-show-thumbnails-toolbar = true; - tooltips-in-icon-view = true; - tooltips-in-list-view = false; - tooltips-show-access-date = true; - tooltips-show-birth-date = true; - tooltips-show-file-type = true; - tooltips-show-mod-date = true; - }; - - "org/nemo/preferences/menu-config" = { - background-menu-open-in-terminal = false; - selection-menu-open-in-terminal = false; - }; - }; - - home = { - persist.directories = [ - ".config/nemo" - ".local/share/nemo" - ".config/pcmanfm-qt" - ]; - - # Bulk Renamer - activation.nemo-rename = hm.dag.entryAfter [ "writeBoundary" ] '' - if [[ -v DBUS_SESSION_BUS_ADDRESS ]] - then - export DCONF_DBUS_RUN_SESSION="" - else - export DCONF_DBUS_RUN_SESSION="${getExe' pkgs.dbus "dbus-run-session"} --dbus-daemon=${getExe' pkgs.dbus "dbus-daemon"}" - fi - - run $DCONF_DBUS_RUN_SESSION ${getExe pkgs.dconf} write /org/nemo/preferences/bulk-rename-tool "b'bulky'" - unset DCONF_DBUS_RUN_SESSION - ''; - - file = { - # Open in Terminal - ".local/share/nemo/actions/terminal.nemo_action".text = '' - [Nemo Action] - Name=Open in Terminal - Comment=Opens ${terminal} in the selected folder - Exec=${terminal} --working-directory=%F - Icon-Name=${terminal} - Selection=any - Extensions=dir; - EscapeSpaces=true - ''; - - # Desktop Icons - ".config/pcmanfm-qt/default/settings.conf".text = - replaceStrings - [ - "@icon" - "@font" - "@terminal" - "@wallpaper" - "@archiver" - ] - [ - icons.name - config.stylix.fonts.sansSerif.name - terminal - (builtins.toString files.images.transparent) - "file-roller" - ] - files.pcmanfm; - }; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/_shared/login.nix b/nixos/modules/gui/desktop/_shared/login.nix @@ -1,35 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - inherit (lib) mkForce mkIf; - inherit (config._shared) enable theme; -in -{ - ## Login Configuration - config = mkIf enable { - stylix.targets.regreet.enable = true; - environment.persist.directories = [ "/var/lib/regreet" ]; - programs.regreet = { - enable = true; - package = pkgs.regreet; - settings.commands = { - reboot = [ - "systemctl" - "reboot" - ]; - poweroff = [ - "systemctl" - "poweroff" - ]; - }; - - extraCss = mkForce ""; - theme = mkForce theme.gtk; - iconTheme = mkForce theme.icons; - }; - }; -} diff --git a/nixos/modules/gui/desktop/_shared/media.nix b/nixos/modules/gui/desktop/_shared/media.nix @@ -1,49 +0,0 @@ -{ - config, - lib, - util, - pkgs, - ... -}: -{ - ## Media Configuration - config = lib.mkIf config._shared.enable { - environment.systemPackages = with pkgs; [ - celluloid - lollypop - papers - playerctl - shotwell - transmission_4-gtk - ]; - - user.homeConfig = { - # Default Applications - xdg.mimeApps.defaultApplications = util.build.mime { - audio = [ "org.gnome.Lollypop.desktop" ]; - document = [ "org.gnome.Papers.desktop" ]; - image = [ "org.gnome.Shotwell-Viewer.desktop" ]; - magnet = [ "transmission-gtk.desktop" ]; - pdf = [ "org.gnome.Papers.desktop" ]; - video = [ "io.github.celluloid_player.Celluloid.desktop" ]; - }; - - # Persisted Files - home.persist.directories = [ - ".config/mpv" - ".config/shotwell" - ".local/share/lollypop" - ".local/share/shotwell" - ".cache/shotwell" - ]; - - # Media Player - services.playerctld.enable = true; - programs.mpv = { - enable = true; - defaultProfiles = [ "gpu-hq" ]; - scripts = [ pkgs.mpvScripts.mpris ]; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/_shared/misc.nix b/nixos/modules/gui/desktop/_shared/misc.nix @@ -1,96 +0,0 @@ -{ - config, - lib, - inputs, - pkgs, - ... -}: -let - inherit (lib) mkIf; - inherit (builtins) concatStringsSep elem map; - inherit (config._shared) enable theme; - inherit (theme) name variant accent; - exists = app: elem app config.apps.list; -in -{ - ## 3rd Party Apps Configuration - config = mkIf enable { - apps = { - # Logseq Notes - logseq.style = "url('https://logseq.${name}.com/ctp-${variant}.css')"; - - # YouTube Music - ytmusic.style = "@import url('https://youtubemusic.${name}.com/src/${variant}.css');"; - }; - - user.homeConfig = { - # Theme - imports = [ inputs.catppuccin.homeModules.catppuccin ]; - catppuccin = { - inherit accent; - flavor = variant; - - brave.enable = exists "office"; - obs.enable = exists "office"; - thunderbird.enable = exists "office"; - vesktop.enable = exists "discord"; - vscode.profiles.default.enable = exists "vscode"; - }; - - # Code Editor - programs.vscode.profiles.default = mkIf (exists "vscode") { - extensions = [ pkgs.vscode-extensions.catppuccin.catppuccin-vsc-icons ]; - userSettings = { - "workbench.iconTheme" = "${name}-${variant}"; - "terminal.external.linuxExec" = "kitty"; - }; - }; - - # KDE Apps - home.file = { - ".config/kwalletrc".text = '' - [Wallet] - Enabled=false - ''; - - ".config/kdeglobals".text = - with config.lib.stylix.colors; - '' - [Colors:Selection] - BackgroundNormal=${base0D-rgb-r},${base0D-rgb-g},${base0D-rgb-b} - BackgroundAlternate=${base0D-rgb-r},${base0D-rgb-g},${base0D-rgb-b} - ForegroundNormal=${base00-rgb-r},${base00-rgb-g},${base00-rgb-b} - ForegroundActive=${base00-rgb-r},${base00-rgb-g},${base00-rgb-b} - ForegroundInactive=${base00-rgb-r},${base00-rgb-g},${base00-rgb-b} - ForegroundLink=${base00-rgb-r},${base00-rgb-g},${base00-rgb-b} - ForegroundVisited=${base00-rgb-r},${base00-rgb-g},${base00-rgb-b} - '' - + (concatStringsSep "\n" ( - map - (name: '' - [Colors:${name}] - BackgroundNormal=${base00-rgb-r},${base00-rgb-g},${base00-rgb-b} - BackgroundAlternate=${base01-rgb-r},${base01-rgb-g},${base01-rgb-b} - DecorationFocus=${base0D-rgb-r},${base0D-rgb-g},${base0D-rgb-b} - DecorationHover=${base0D-rgb-r},${base0D-rgb-g},${base0D-rgb-b} - ForegroundNormal=${base05-rgb-r},${base05-rgb-g},${base05-rgb-b} - ForegroundActive=${base05-rgb-r},${base05-rgb-g},${base05-rgb-b} - ForegroundInactive =${base05-rgb-r},${base05-rgb-g},${base05-rgb-b} - ForegroundLink=${base05-rgb-r},${base05-rgb-g},${base05-rgb-b} - ForegroundVisited=${base05-rgb-r},${base05-rgb-g},${base05-rgb-b} - ForegroundNegative=${base08-rgb-r},${base08-rgb-g},${base08-rgb-b} - ForegroundNeutral=${base0D-rgb-r},${base0D-rgb-g},${base0D-rgb-b} - ForegroundPositive=${base0B-rgb-r},${base0B-rgb-g},${base0B-rgb-b} - '') - [ - "View" - "Window" - "Button" - "Tooltip" - "Complementary" - ] - )); - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/_shared/notify.nix b/nixos/modules/gui/desktop/_shared/notify.nix @@ -1,96 +0,0 @@ -{ - config, - lib, - util, - files, - ... -}: -let - inherit (lib) mkDefault mkIf; -in -{ - ## Notifications Configuration - config = mkIf config._shared.enable { - # Phone Connect - programs.kdeconnect.enable = true; - user.homeConfig = { - home.persist.directories = [ ".config/kdeconnect" ]; - services.kdeconnect = { - enable = true; - indicator = true; - }; - - # Notifications Daemon - stylix.targets.swaync.enable = false; - services.swaync = { - enable = true; - style = util.build.theme { - inherit (config.stylix) fonts; - inherit (config.lib.stylix) colors; - file = files.swaync; - }; - - settings = { - # Notification - positionX = mkDefault "right"; - positionY = mkDefault "top"; - layer = "overlay"; - layer-shell = true; - cssPriority = "user"; - - image-visibility = "when-available"; - timeout = 10; - timeout-critical = 0; - timeout-low = 5; - notification-2fa-action = true; - notification-grouping = true; - notification-inline-replies = true; - - # Control Center - control-center-layer = "top"; - fit-to-screen = false; - control-center-height = -1; - control-center-margin-top = 3; - control-center-margin-left = 3; - control-center-margin-bottom = 3; - control-center-margin-right = 3; - - widgets = [ - "inhibitors" - "title" - "dnd" - "notifications" - ]; - - widget-config = { - title = { - text = "Notifications"; - clear-all-button = true; - button-text = "Clear"; - }; - dnd.text = "Do Not Disturb"; - }; - - notification-visibility = { - utility = { - app-name = "utility"; - state = "transient"; - }; - upower = { - app-name = "poweralertd"; - state = "transient"; - }; - hyprland = { - app-name = "grimblast"; - state = "transient"; - }; - niri = { - app-name = "niri"; - state = "transient"; - }; - }; - }; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/_shared/panel.nix b/nixos/modules/gui/desktop/_shared/panel.nix @@ -1,309 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - inherit (lib) - mkDefault - mkIf - mkOption - types - ; -in -{ - ## Panel Configuration - options._shared.panel = mkOption { - description = "INTERNAL: Shared Panel Configuration"; - type = types.attrs; - }; - - config = mkIf config._shared.enable { - user.homeConfig = { - stylix.targets.waybar = { - enable = true; - font = "sansSerif"; - addCss = false; - }; - - home.packages = [ pkgs.wttrbar ]; - programs.waybar = { - enable = true; - systemd.enable = true; - package = pkgs.waybar; - }; - }; - - _shared.panel = { - layer = "top"; - - "custom/logo" = { - format = "󱄅"; - tooltip = false; - on-click = "nwg-drawer"; - }; - - user = { - format = "{user}"; - icon = true; - open-on-click = true; - }; - - "custom/user" = { - exec = "sh -c 'getent passwd $USER | cut -d : -f 5'"; - format = "{}"; - rotate = 270; - tooltip = false; - on-click = "sh -c 'nemo ~'"; - }; - - "custom/power" = { - format = "⏻"; - tooltip = false; - on-click = "wlogout -p layer-shell"; - }; - - "group/menu" = { - modules = [ - "custom/hide" - "keyboard-state" - "tray" - ]; - drawer.click-to-reveal = true; - }; - - "custom/hide" = { - format = mkDefault ""; - tooltip = false; - }; - - keyboard-state = { - numlock = true; - capslock = true; - format = { - numlock = mkDefault " N {icon}"; - capslock = mkDefault "󰪛 {icon}"; - }; - format-icons = { - locked = ""; - unlocked = ""; - }; - }; - - bluetooth = { - format = ""; - format-disabled = "󰂳"; - format-connected = "󰂱 {num_connections}"; - tooltip-format = " {status}"; - tooltip-format-connected = "{device_enumerate}"; - tooltip-format-enumerate-connected = " {device_alias} 󰂄 {device_battery_percentage}%"; - on-click = "overskride"; - }; - - network = - let - tooltip = "Strength: <b>{signaldBm}dBm ({signalStrength}%)</b>\nFrequency: <b>{frequency}MHz</b>\nInterface: <b>{ifname}</b>\nIP: <b>{ipaddr}/{cidr}</b>\nGateway: <b>{gwaddr}</b>\nNetmask: <b>{netmask}</b>"; - in - { - format = "?"; - format-disconnected = "󰌙"; - format-wifi = "{icon}"; - format-ethernet = "󰌘"; - format-icons = [ - "󰤯" - "󰤟" - "󰤢" - "󰤥" - "󰤨" - ]; - format-linked = "󰈁"; - tooltip-format-wifi = "Network: <big><b>{essid}</b></big>\n${tooltip}"; - tooltip-format-ethernet = "Network: <big><b>Wired</b></big>\n${tooltip}"; - tooltip-format-disconnected = "󰌙 Disconnected"; - on-click = "sh -c 'env XDG_CURRENT_DESKTOP=GNOME gnome-control-center wifi'"; - }; - - "group/media" = { - modules = [ - "wireplumber" - "mpris" - ]; - drawer.transition-duration = 1000; - }; - - wireplumber = { - max-volume = 150; - scroll-step = 1; - reverse-scrolling = 1; - format = "{icon}"; - tooltip-format = "Volume: {volume}%\nDevice: {node_name}"; - format-icons = [ - "󰕿" - "󰖀" - "󰕾" - ]; - format-muted = ""; - on-click = "pwvucontrol"; - }; - - mpris = { - dynamic-len = 20; - dynamic-order = [ - "title" - "artist" - "length" - ]; - dynamic-separator = " - "; - format = mkDefault " {player}"; - format-paused = mkDefault "󰏤 <i>{player}</i>"; - format-stopped = ""; - tooltip-format-stopped = "Not Playing"; - on-click = "sysutils media toggle"; - on-click-right = "sysutils media next"; - on-click-middle = "sysutils media previous"; - }; - - "group/display".modules = [ - "backlight" - "custom/temperature" - ]; - - backlight = { - format = "{icon}"; - tooltip-format = "Backlight: {percent}%"; - format-icons = [ - "" - "" - "" - "" - "" - "" - "" - "" - "" - ]; - on-scroll-up = "sysutils brightness down"; - on-scroll-down = "sysutils brightness up"; - }; - - "custom/temperature" = { - format = ""; - tooltip = false; - on-click = "sysutils temperature"; - }; - - "group/power".modules = [ - "battery" - "power-profiles-daemon" - ]; - - battery = { - interval = 5; - rotate = 0; - format = "{icon}"; - tooltip-format = "Battery: {capacity}%"; - format-charging = ""; - format-icons = [ - "" - "" - "" - "" - "" - ]; - states = { - good = 80; - warning = 20; - critical = 10; - }; - }; - - power-profiles-daemon = { - format = "{icon}"; - tooltip = true; - tooltip-format = "Power Profile: {profile}"; - format-icons = { - default = ""; - performance = "󱄟"; - balanced = ""; - power-saver = ""; - }; - }; - - "custom/weather" = { - format = mkDefault "{}°"; - return-type = "json"; - exec = mkDefault "wttrbar --date-format %d/%m --nerd"; - tooltip = true; - interval = 600; - signal = 7; - on-click = "pkill -RTMIN+7 waybar"; - }; - - clock = { - interval = 1; - format = mkDefault "󰅐 {:%H:%M:%S} "; - format-alt = mkDefault "󰅐 {:%I:%M  %A, %d %B %Y} "; - tooltip-format = "<tt><small>{calendar}</small></tt>"; - calendar = { - mode = "year"; - mode-mon-col = 3; - weeks-pos = "left"; - on-scroll = 1; - format = with config.lib.stylix.colors; { - months = "<span color='#${base06}'><b>{}</b></span>"; - days = "<span color='#${base05}'><b>{}</b></span>"; - weeks = "<span color='#${base0C}'><b>W{}</b></span>"; - weekdays = "<span color='#${base0A}'><b>{}</b></span>"; - today = "<span color='#${base08}'><b><u>{}</u></b></span>"; - }; - }; - - actions = { - on-click-right = "mode"; - on-click-forward = "tz_up"; - on-click-backward = "tz_down"; - on-scroll-up = "shift_down"; - on-scroll-down = "shift_up"; - }; - }; - - "group/notify".modules = [ - "custom/notify" - "idle_inhibitor" - ]; - - "custom/notify" = { - exec = "swaync-client -swb"; - exec-if = "which swaync-client"; - on-click = "swaync-client -t -sw"; - on-click-right = "swaync-client -d -sw"; - return-type = "json"; - escape = true; - tooltip = false; - format = "{icon}"; - format-icons = { - none = ""; - notification = ""; - dnd-none = ""; - dnd-notification = ""; - inhibited-none = ""; - inhibited-notification = ""; - dnd-inhibited-none = ""; - dnd-inhibited-notification = ""; - }; - }; - - idle_inhibitor = { - format = "{icon}"; - on-click = "sysutils toggle service swayidle"; - tooltip-format-activated = "Idle Inhibitor: On"; - tooltip-format-deactivated = "Idle Inhibitor: Off"; - format-icons = { - activated = ""; - deactivated = ""; - }; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/_shared/security.nix b/nixos/modules/gui/desktop/_shared/security.nix @@ -1,132 +0,0 @@ -{ - config, - lib, - util, - pkgs, - files, - ... -}: -let - inherit (lib) - getExe - getExe' - mkIf - mkOption - types - ; - - locker = pkgs.swaylock-effects; -in -{ - ## Security Configuration - options._shared.idle = mkOption { - description = "INTERNAL: Shared Idle Configuration"; - type = types.attrs; - }; - - config = mkIf config._shared.enable rec { - # User Authentication - security = { - soteria.enable = true; - pam.services.swaylock.text = "auth include login"; - }; - - # Idle Scripts - _shared.idle = { - lock = - pre: flag: - "sh -c 'if ! ${getExe' pkgs.procps "pgrep"} -x swaylock; then ${pre} ${getExe locker} -f ${flag}; fi'"; - - pause = "${getExe pkgs.playerctl} pause -a;"; - audio = - command: - "${pkgs.writeShellScript "audio" '' - ${getExe pkgs.playerctl} status | ${getExe pkgs.gnugrep} Playing - if [ $? == 1 ]; then ${command}; fi - ''}"; # Check if audio is playing - }; - - user.homeConfig = { - # Locker - stylix.targets.swaylock = { - enable = true; - useWallpaper = true; - }; - - programs.swaylock = { - enable = true; - package = locker; - settings = { - clock = true; - indicator = true; - font = config.stylix.fonts.sansSerif.name; - effect-vignette = "0.3:1"; - }; - }; - - # Idle Daemon - services.swayidle = with _shared.idle; { - enable = true; - extraArgs = [ "-w" ]; - events = [ - { - event = "before-sleep"; - command = lock pause ""; - } - { - event = "lock"; - command = lock pause "--fade-in 0.2 --grace 15 --grace-no-mouse"; - } - ]; - }; - - # Logout - programs.wlogout = { - enable = true; - style = util.build.theme { - inherit (config.lib.stylix) colors; - file = files.wlogout; - }; - - layout = [ - { - label = "lock"; - action = "loginctl lock-session"; - text = ""; - keybind = "l"; - } - { - label = "logout"; - action = "loginctl terminate-user $USER"; - text = "↶"; - keybind = "e"; - } - { - label = "shutdown"; - action = "systemctl poweroff"; - text = "⏻"; - keybind = "s"; - } - { - label = "reboot"; - action = "systemctl reboot"; - text = "↺"; - keybind = "r"; - } - { - label = "suspend"; - action = "systemctl suspend"; - text = ""; - keybind = "u"; - } - { - label = "hibernate"; - action = "systemctl hibernate"; - text = ""; - keybind = "h"; - } - ]; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/_shared/style.nix b/nixos/modules/gui/desktop/_shared/style.nix @@ -1,38 +0,0 @@ -{ - config, - lib, - pkgs, - files, - ... -}: -let - inherit (config._shared) enable theme; - inherit (theme) icons gtk qt; -in -{ - ## Desktop Integration - config = lib.mkIf enable { - stylix.base16Scheme = files.colors.catppuccin; - environment.systemPackages = [ pkgs.custom.cursors ]; - gui = { - inherit icons; - - gtk = { - enable = true; - theme = gtk; - }; - - qt = { - enable = true; - theme = qt; - style = "kvantum"; - }; - }; - - # GTK Apps - user.homeConfig.dconf.settings."org/gnome/desktop/wm/preferences" = { - action-double-click-titlebar = "none"; - button-layout = "appmenu"; - }; - }; -} diff --git a/nixos/modules/gui/desktop/_shared/terminal.nix b/nixos/modules/gui/desktop/_shared/terminal.nix @@ -1,47 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - inherit (config._shared) enable theme; -in -{ - ## Terminal Configuration - config = lib.mkIf enable { - user.homeConfig = { - programs.kitty = { - enable = true; - themeFile = with theme; "${name-alt}-${variant-alt}"; - keybindings = { - "ctrl+c" = "copy_or_interrupt"; - "kitty_mod+f" = - "launch --allow-remote-control kitty +kitten search/search.py @active-kitty-window-id"; - }; - - settings = { - kitty_mod = "ctrl+shift"; - confirm_os_window_close = 2; - copy_on_select = "clipboard"; - placement_strategy = "center"; - scrollback_lines = 10000; - enable_audio_bell = "no"; - visual_bell_duration = "0.1"; - - cursor_shape = "beam"; - cursor_shape_unfocused = "underline"; - tab_bar_style = "powerline"; - tab_powerline_style = "round"; - window_padding_width = 10; - }; - }; - - home.file.".config/kitty/search".source = pkgs.custom.kitty-search; - stylix.targets.kitty = { - enable = true; - variant256Colors = true; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/_shared/text.nix b/nixos/modules/gui/desktop/_shared/text.nix @@ -1,63 +0,0 @@ -{ - config, - lib, - util, - pkgs, - files, - ... -}: -let - inherit (config._shared) enable theme; -in -{ - ## Text Configuration - config = lib.mkIf enable { - environment.systemPackages = [ pkgs.geany ]; - user.homeConfig = { - # Text Editor - xdg.mimeApps.defaultApplications = util.build.mime { - markdown = [ "geany.desktop" ]; - text = [ "geany.desktop" ]; - }; - - home = { - persist.directories = [ - ".config/clipse" - ".config/geany" - ]; - - file = with files.geany; { - ".config/geany/geany.conf".text = settings; - ".config/geany/keybindings.conf".text = keybindings; - ".config/geany/colorschemes/theme.conf".source = - with theme; - "${pkgs.custom.geany-catppuccin}/share/geany/colorschemes/${name}-${variant}.conf"; - }; - }; - - # Clipboard Manager - services.clipse = { - enable = true; - allowDuplicates = false; - historySize = 150; - imageDisplay.type = "kitty"; - theme = with config.lib.stylix.colors; { - useCustomTheme = true; - DimmedDesc = "#${base07}"; - DimmedTitle = "#${base07}"; - FilteredMatch = "#${base08}"; - NormalTitle = "#${base08}"; - NormalDesc = "#${base0B}"; - SelectedDesc = "#${base0D}"; - SelectedTitle = "#${base0D}"; - SelectedBorder = "#${base0D}"; - SelectedDescBorder = "#${base0D}"; - TitleFore = "#${base05}"; - Titleback = "#${base01}"; - StatusMsg = "#${base0E}"; - PinIndicatorColor = "#${base0F}"; - }; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/_shared/theme.nix b/nixos/modules/gui/desktop/_shared/theme.nix @@ -1,40 +0,0 @@ -{ lib, pkgs, ... }: -{ - ## Theming - options._shared.theme = lib.mkOption { - description = "INTERNAL: Shared Theme Configuration"; - type = lib.types.attrs; - }; - - config._shared.theme = rec { - name = "catppuccin"; - name-alt = "Catppuccin"; - - accent = "blue"; - variant = "macchiato"; - variant-alt = "Macchiato"; - - gtk = { - name = "${name}-${variant}-${accent}-standard"; - package = pkgs.catppuccin-gtk.override { - accents = [ accent ]; - inherit variant; - }; - }; - - qt = { - name = "${name}-${variant}-${accent}"; - package = pkgs.catppuccin-kvantum.override { - inherit accent variant; - }; - }; - - icons = { - name = "Papirus-Dark"; - package = pkgs.catppuccin-papirus-folders.override { - inherit accent; - flavor = variant; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/_shared/utilities.nix b/nixos/modules/gui/desktop/_shared/utilities.nix @@ -1,105 +0,0 @@ -{ - config, - lib, - util, - pkgs, - files, - ... -}: -let - inherit (lib) getExe mkIf; - inherit (config.lib.stylix) colors; -in -{ - config = mkIf config._shared.enable { - environment.systemPackages = with pkgs; [ - # Apps - clipse - font-manager - gnome-clocks - gnome-disk-utility - nwg-drawer - overskride - qalculate-gtk - remmina - resources - smile - - # Utilities - custom.sysutils - hyprpicker - pwvucontrol - sunsetr - wev - wl-clipboard - wl-screenrec - wlclock - wlr-randr - - # Network Settings - (gnome-control-center.overrideAttrs (old: { - postInstall = old.postInstall + '' - dir=$out/share/applications - for panel in $dir/* - do - [ "$panel" = "$dir/gnome-network-panel.desktop" ] && continue - [ "$panel" = "$dir/gnome-wifi-panel.desktop" ] && continue - [ "$panel" = "$dir/gnome-wwan-panel.desktop" ] && continue - [ "$panel" = "$dir/gnome-sharing-panel.desktop" ] && continue - [ "$panel" = "$dir/gnome-wacom-panel.desktop" ] && continue - rm "$panel" - done - ''; - })) - ]; - - ## Essential Utilities - # Power - services = { - power-profiles-daemon.enable = true; - upower.enable = true; - }; - - # Backlight - hardware.brillo.enable = true; - user.groups = [ - "input" - "video" - ]; - - user.homeConfig = { - xdg.mimeApps.defaultApplications = util.build.mime { - font = [ "com.github.FontManager.FontViewer.desktop" ]; - }; - - # Display Temperature - home.file.".config/sunsetr".source = files.sunsetr; - - # Desktop Clock - systemd.user.services.wlclock = - let - target = [ "graphical-session.target" ]; - in - { - Install.WantedBy = target; - Unit = { - Description = "Desktop Clock"; - After = target; - }; - Service.ExecStart = - with colors; - "${getExe pkgs.wlclock} --layer bottom --exclusive-zone true --position top-right --margin 10 --size 300 --corner-radius 10 --border-size 2 --hand-width 7 --marking-width 3 --background-colour #${base00}4d --clock-colour #${base0D} --border-colour #${base00}"; - }; - - # Network Settings - xdg.desktopEntries."org.gnome.Settings" = { - name = "Network Settings"; - comment = "Gnome Control Center"; - icon = "org.gnome.Settings"; - exec = "env XDG_CURRENT_DESKTOP=gnome gnome-control-center"; - categories = [ "X-Preferences" ]; - terminal = false; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/gnome/common.nix b/nixos/modules/gui/desktop/gnome/common.nix @@ -1,44 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - inherit (lib) - gvariant - mkForce - ; -in -{ - services = { - # Session - desktopManager.gnome.enable = true; - displayManager = { - defaultSession = "gnome"; - gdm.enable = true; - }; - - # Initial Setup - gnome.gnome-initial-setup.enable = mkForce false; - }; - - # Excluded Packages - environment.gnome.excludePackages = with pkgs; [ - totem - gnome-music - ]; - - # Dconf Settings - programs.dconf.profiles.gdm.databases = [ - { - settings = { - "org/gnome/desktop/peripherals/touchpad".tap-to-click = true; - "org/gnome/desktop/interface" = { - cursor-theme = config.stylix.cursor.name; - cursor-size = gvariant.mkInt32 config.stylix.cursor.size; - }; - }; - } - ]; -} diff --git a/nixos/modules/gui/desktop/gnome/default.nix b/nixos/modules/gui/desktop/gnome/default.nix @@ -1,258 +0,0 @@ -{ - config, - lib, - util, - pkgs, - files, - ... -}@args: -let - inherit (lib) - mkIf - mkForce - mkMerge - ; - - exists = app: builtins.elem app config.apps.list; -in -{ - ## GNOME Configuration ## - config = mkIf (config.gui.desktop == "gnome") (mkMerge [ - (import ./common.nix args) - - { - # Desktop Integration - gui = { - gtk = { - enable = true; - theme = { - name = "adw-gtk3-dark"; - package = pkgs.adw-gtk3; - }; - }; - - qt = { - enable = true; - style = "kvantum"; - theme = { - name = "KvLibadwaitaDark"; - package = pkgs.custom.kvlibadwaita; - }; - }; - }; - - # Color Scheme - stylix = { - base16Scheme = files.colors.adwaita; - targets.gnome.enable = false; - }; - - # Essential Utilities - services = { - udev.packages = [ pkgs.gnome-settings-daemon ]; - telepathy.enable = true; - switcherooControl.enable = true; - gnome = { - core-developer-tools.enable = true; - gnome-remote-desktop.enable = true; - sushi.enable = true; - }; - }; - - apps.list = [ "firefox" ]; - programs = { - gnupg.agent.pinentryPackage = mkForce pkgs.pinentry-gnome3; - nautilus-open-any-terminal = { - enable = true; - terminal = "ghostty"; - }; - - kdeconnect = { - enable = true; - package = pkgs.gnomeExtensions.gsconnect; - }; - - firefox = { - nativeMessagingHosts.gsconnect = true; - policies.ExtensionSettings = { - name = "gnome-shell-integration"; - value = { - installation_mode = "normal_installed"; - install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/chrome-gnome-shell@gnome.org/latest.xpi"; - }; - }; - }; - }; - - # Screen Brightness - user.groups = [ "i2c" ]; - hardware.i2c.enable = true; - - ## Package List - environment.systemPackages = with pkgs; [ - ghostty - gnome-boxes - gnome-sound-recorder - gnome-tweaks - papers - zenity - - # Games - gnome-chess - gnome-mines - quadrapassel - - # Circle - apostrophe - curtail - deja-dup - dialect - fractal - fragments - gnome-decoder - gnome-secrets - gthumb - lollypop - resources - upscaler - video-trimmer - wike - wordbook - - # Utilities - celluloid - ddcutil - gnuchess - ]; - - user.homeConfig = { - ## Desktop Settings - imports = [ ./settings ]; - stylix.targets = { - gnome.enable = true; - ghostty.enable = true; - }; - - # Default Applications - xdg.mimeApps.defaultApplications = util.build.mime { - archive = [ "org.gnome.FileRoller.desktop" ]; - audio = [ "org.gnome.Lollypop.desktop" ]; - calendar = [ "org.gnome.Calendar.desktop" ]; - document = [ "org.gnome.Papers.desktop" ]; - directory = [ "org.gnome.Nautilus.desktop" ]; - image = [ "org.gnome.Loupe.desktop" ]; - magnet = [ "de.haeckerfelix.Fragments.desktop" ]; - mail = [ "org.gnome.Geary.desktop" ]; - markdown = [ "org.gnome.gitlab.somas.Apostrophe.desktop" ]; - password = [ "org.gnome.World.Secrets.desktop" ]; - pdf = [ "org.gnome.Papers.desktop" ]; - text = [ "org.gnome.TextEditor.desktop" ]; - video = [ "io.github.celluloid_player.Celluloid.desktop" ]; - virtualization = [ "org.gnome.Boxes.desktop" ]; - }; - - # Persisted Files - home.persist.directories = [ - ".config/evolution" - ".config/ghostty" - ".config/gnome-boxes" - ".config/gnome-builder" - ".local/share/epiphany" - ".local/share/evolution" - ".local/share/geary" - ".local/share/gnome-boxes" - ".local/share/gnome-builder" - ".local/share/lollypop" - ".local/share/nautilus" - ".local/share/sounds" - ".local/share/telepathy" - ".local/share/webkitgtk" - ".cache/evolution" - ".cache/fractal" - ".cache/gnome-builder" - ]; - - ## Terminal - programs.ghostty = { - enable = true; - settings = { - # Features - clipboard-paste-protection = true; - clipboard-trim-trailing-spaces = true; - copy-on-select = false; - mouse-hide-while-typing = true; - quit-after-last-window-closed = true; - scrollback-limit = 4200; - shell-integration-features = true; - window-vsync = true; - - # Keybindings - keybind = [ - "ctrl+h=goto_split:left" - "ctrl+j=goto_split:bottom" - "ctrl+k=goto_split:top" - "ctrl+l=goto_split:right" - "ctrl+shift+h=new_split:left" - "ctrl+shift+j=new_split:down" - "ctrl+shift+k=new_split:up" - "ctrl+shift+l=new_split:right" - "ctrl+shift+enter=new_split:auto" - "ctrl+shift+i=inspector:toggle" - "ctrl+shift+r=reload_config" - "ctrl+t=new_tab" - "ctrl+f=write_scrollback_file:open" - ]; - }; - }; - }; - } - - ## 3rd Party Apps Configuration - { - user.homeConfig = { - # Firefox GNOME Theme - stylix.targets.firefox = { - enable = mkForce true; - profileNames = [ "default" ]; - firefoxGnomeTheme.enable = true; - }; - - programs = { - # Discord GNOME Theme - nixcord.quickCss = mkIf (exists "discord") ''@import url("https://raw.githubusercontent.com/ricewind012/discord-gnome-theme/master/gnome.theme.css");''; - - # Code Editor - vscode.profiles.default = mkIf (exists "vscode") { - extensions = [ pkgs.vscode-extensions.piousdeer.adwaita-theme ]; - userSettings = { - "workbench.colorTheme" = "Adwaita Dark"; - "workbench.productIconTheme" = "adwaita"; - "window.titleBarStyle" = "custom"; - "terminal.external.linuxExec" = "ghostty"; - }; - }; - }; - }; - - # Logseq Bonofix Theme - apps.logseq.style = "url('https://cdn.jsdelivr.net/gh/sansui233/logseq-bonofix-theme/custom.css')"; - - # Flatpak Apps - services.flatpak = mkIf config.services.flatpak.enable { - remotes = [ - { - name = "gnome-nightly"; - location = "https://nightly.gnome.org/gnome-nightly.flatpakrepo"; - } - ]; - - packages = [ - { - appId = "com.github.tchx84.Flatseal"; - origin = "flathub"; - } - ]; - }; - } - ]); -} diff --git a/nixos/modules/gui/desktop/gnome/settings/apps.nix b/nixos/modules/gui/desktop/gnome/settings/apps.nix @@ -1,229 +0,0 @@ -{ - sys, - lib, - ... -}: -with lib.hm.gvariant; -let - inherit (builtins) head; - fonts = sys.fonts.fontconfig.defaultFonts; -in -{ - dconf.settings = { - # GTK+ Apps - "org/gnome/desktop/calendar".show-weekdate = true; - "ca/desrt/dconf-editor".show-warning = false; - "org/gnome/shell/world-clocks".locations = - "[<(uint32 2, <('Coordinated Universal Time (UTC)', '@UTC', false, @a(dd) [], @a(dd) [])>)>]"; - - "org/gnome/desktop/search-providers" = { - sort-order = [ - "org.gnome.Contacts.desktop" - "org.gnome.Documents.desktop" - "org.gnome.Nautilus.desktop" - ]; - }; - - "org/gnome/Geary" = { - ask-open-attachment = true; - compose-as-html = true; - formatting-toolbar-visible = false; - migrated-config = true; - optional-plugins = [ - "email-templates" - "sent-sound" - "mail-merge" - ]; - startup-notifications = true; - }; - - "org/gnome/epiphany/sync".sync-device-name = sys.networking.hostName; - "org/gnome/epiphany/web" = { - default-zoom-level = 1.0; - enable-mouse-gestures = true; - }; - - "org/gnome/epiphany" = { - active-clear-data-items = 391; - ask-for-default = false; - default-search-engine = "Google"; - restore-session-policy = "crashed"; - use-google-search-suggestions = true; - }; - - "org/gtk/gtk4/settings/file-chooser".sort-directories-first = true; - "org/gnome/nautilus/icon-view" = { - captions = [ - "size" - "date_modified" - "none" - ]; - default-zoom-level = "medium"; - }; - - "org/gnome/nautilus/preferences" = { - click-policy = "single"; - default-folder-viewer = "icon-view"; - fts-enabled = true; - search-filter-time-type = "last_modified"; - search-view = "list-view"; - show-create-link = true; - show-delete-permanently = true; - }; - - "org/gnome/TextEditor" = { - highlight-current-line = true; - indent-style = "tab"; - show-line-numbers = true; - show-map = false; - tab-width = mkUint32 4; - }; - - "org/gnome/builder/editor" = { - auto-hide-map = true; - auto-save-timeout = 60; - completion-n-rows = 7; - draw-spaces = [ "tab" ]; - highlight-current-line = true; - highlight-matching-brackets = true; - overscroll = 7; - show-map = false; - style-scheme-name = "builder-dark"; - }; - - "com/github/hugolabe/Wike" = { - custom-font = true; - dark-mode = true; - font-family = head fonts.sansSerif; - }; - - # App Grid - "org/gnome/shell" = { - favorite-apps = [ - "brave-browser.desktop" - "org.gnome.Geary.desktop" - "org.gnome.Nautilus.desktop" - "com.mitchellh.ghostty.desktop" - "org.gnome.TextEditor.desktop" - "org.gnome.Settings.desktop" - ]; - }; - - "org/gnome/desktop/app-folders" = { - folder-children = [ - "1c3e59e4-a571-4ada-af1d-ed1ced384cfb" - "4bfbecbd-804e-4359-b1c2-00daef4c009e" - "4f9e09f6-cbd8-4a4a-beb3-9ec7b3e672ff" - "a136187d-1d93-4d35-8423-082f15957be9" - "b79e9b82-2127-459b-9e82-11bd3be09d04" - "cb1c8797-b52e-4df5-80d6-2c46e8f7ef22" - "e57a32e8-8e5d-4808-aad7-b1f9152d01ee" - ]; - }; - - "org/gnome/desktop/app-folders/folders/4f9e09f6-cbd8-4a4a-beb3-9ec7b3e672ff" = { - name = "Games"; - apps = [ - "org.gnome.Chess.desktop" - "org.gnome.Sudoku.desktop" - "org.gnome.Mines.desktop" - "org.gnome.Quadrapassel.desktop" - "osu!.desktop" - "org.prismlauncher.PrismLauncher.desktop" - "steam.desktop" - "Steam Linux Runtime 1.0 (scout).desktop" - "Steam Linux Runtime 2.0 (soldier).desktop" - "Steam Linux Runtime 3.0 (sniper).desktop" - "Proton Hotfix.desktop" - ]; - }; - - "org/gnome/desktop/app-folders/folders/a136187d-1d93-4d35-8423-082f15957be9" = { - name = "Office"; - apps = [ - "base.desktop" - "calc.desktop" - "Code.desktop" - "draw.desktop" - "impress.desktop" - "math.desktop" - "net.sourceforge.gscan2pdf.desktop" - "onlyoffice-desktopeditors.desktop" - "startcenter.desktop" - "virt-manager.desktop" - "writer.desktop" - ]; - }; - - "org/gnome/desktop/app-folders/folders/b79e9b82-2127-459b-9e82-11bd3be09d04" = { - name = "Utilities"; - apps = [ - "cups.desktop" - "kvantummanager.desktop" - "micro.desktop" - "nixos-manual.desktop" - "org.gnome.baobab.desktop" - "org.gnome.Console.desktop" - "org.gnome.Devhelp.desktop" - "org.gnome.dspy.desktop" - "org.gnome.Logs.desktop" - "org.gnome.Sysprof.desktop" - "org.gnome.Tour.desktop" - "xterm.desktop" - "yelp.desktop" - ]; - }; - - "org/gnome/desktop/app-folders/folders/e57a32e8-8e5d-4808-aad7-b1f9152d01ee" = { - name = "Accessories"; - apps = [ - "calibre-ebook-edit.desktop" - "calibre-ebook-viewer.desktop" - "calibre-lrfviewer.desktop" - "qt5ct.desktop" - "qt6ct.desktop" - ]; - }; - - "org/gnome/desktop/app-folders/folders/4bfbecbd-804e-4359-b1c2-00daef4c009e" = { - name = "System"; - apps = [ - "nvidia-settings.desktop" - "rog-control-center.desktop" - ]; - }; - - "org/gnome/desktop/app-folders/folders/1c3e59e4-a571-4ada-af1d-ed1ced384cfb" = { - name = "Wine"; - apps = [ - "7zip.desktop" - "com.usebottles.bottles.desktop" - "net.lutris.Lutris.desktop" - "Notepad++.desktop" - "winetricks.desktop" - ]; - }; - - "org/gnome/desktop/app-folders/folders/cb1c8797-b52e-4df5-80d6-2c46e8f7ef22" = { - name = "Android"; - apps = [ - "waydroid.com.android.inputmethod.latin.desktop" - "waydroid.org.lineageos.jelly.desktop" - "waydroid.com.android.calculator2.desktop" - "waydroid.org.lineageos.etar.desktop" - "waydroid.com.android.camera2.desktop" - "waydroid.com.android.deskclock.desktop" - "waydroid.com.android.contacts.desktop" - "waydroid.com.android.documentsui.desktop" - "waydroid.com.android.gallery3d.desktop" - "waydroid.com.android.vending.desktop" - "waydroid.org.lineageos.eleven.desktop" - "waydroid.org.lineageos.recorder.desktop" - "waydroid.com.android.settings.desktop" - "Waydroid.desktop" - "scrcpy.desktop" - "scrcpy-console.desktop" - ]; - }; - }; -} diff --git a/nixos/modules/gui/desktop/gnome/settings/default.nix b/nixos/modules/gui/desktop/gnome/settings/default.nix @@ -1,205 +0,0 @@ -{ - sys, - lib, - util, - ... -}: -with lib.hm.gvariant; -let - fonts = sys.fonts.fontconfig.defaultFonts; -in -{ - imports = util.map.modules.list ./.; - - ## Dconf Keys ## - # Generated via nix-community/dconf2nix - # Use 'dconf watch /' to record changes - dconf.settings = { - # Keyboard Shortcuts - "org/gnome/desktop/wm/keybindings" = { - always-on-top = [ "<Super>p" ]; - begin-move = [ ]; - begin-resize = [ ]; - close = [ - "<Super>q" - "<Alt>F4" - ]; - cycle-group = [ ]; - cycle-group-backward = [ ]; - maximize = [ "<Super>Up" ]; - minimize = [ "<Super>Down" ]; - move-to-center = [ "<Super>c" ]; - move-to-monitor-down = [ ]; - move-to-monitor-left = [ "<Primary><Super>Left" ]; - move-to-monitor-right = [ "<Primary><Super>Right" ]; - move-to-monitor-up = [ ]; - move-to-workspace-1 = [ ]; - move-to-workspace-down = [ ]; - move-to-workspace-last = [ ]; - move-to-workspace-left = [ "<Shift><Super>Left" ]; - move-to-workspace-right = [ "<Shift><Super>Right" ]; - move-to-workspace-up = [ ]; - panel-main-menu = [ ]; - panel-run-dialog = [ "<Super>F2" ]; - switch-applications = [ "<Alt>Tab" ]; - switch-applications-backward = [ "<Shift><Alt>Tab" ]; - switch-group = [ "<Super>Tab" ]; - switch-group-backward = [ "<Shift><Super>Tab" ]; - switch-to-workspace-down = [ ]; - switch-to-workspace-left = [ "<Super>Left" ]; - switch-to-workspace-right = [ "<Super>Right" ]; - switch-to-workspace-up = [ ]; - toggle-fullscreen = [ "<Shift><Super>f" ]; - toggle-maximized = [ "<Super>m" ]; - unmaximize = [ ]; - }; - - "org/gnome/mutter/keybindings" = { - toggle-tiled-left = [ ]; - toggle-tiled-right = [ ]; - }; - - "org/gnome/shell/keybindings" = { - focus-active-notification = [ ]; - open-application-menu = [ ]; - switch-to-application-1 = [ "<Super>1" ]; - switch-to-application-2 = [ "<Super>2" ]; - switch-to-application-3 = [ "<Super>3" ]; - switch-to-application-4 = [ "<Super>4" ]; - switch-to-application-5 = [ "<Super>5" ]; - switch-to-application-6 = [ "<Super>6" ]; - switch-to-application-7 = [ "<Super>7" ]; - switch-to-application-8 = [ "<Super>8" ]; - switch-to-application-9 = [ "<Super>9" ]; - toggle-application-view = [ ]; - toggle-message-tray = [ "<Super><Shift>n" ]; - toggle-overview = [ ]; - toggle-quick-settings = [ ]; - }; - - "org/gnome/settings-daemon/plugins/media-keys" = { - area-screenshot = [ "Print" ]; - area-screenshot-clip = [ ]; - control-center = [ "<Super><Shift>grave" ]; - email = [ "<Super>e" ]; - home = [ "<Super>f" ]; - magnifier = [ "<Super>x" ]; - magnifier-zoom-in = [ "<Super>equal" ]; - magnifier-zoom-out = [ "<Super>minus" ]; - rotate-video-lock-static = [ ]; - screencast = [ "<Alt>Print" ]; - screenreader = [ ]; - screenshot = [ "<Shift>Print" ]; - screenshot-clip = [ ]; - screensaver = [ "<Super>l" ]; - terminal = [ ]; - volume-down = [ "AudioLowerVolume" ]; - volume-up = [ "AudioRaiseVolume" ]; - window-screenshot = [ "<Primary>Print" ]; - window-screenshot-clip = [ ]; - www = [ "<Super>grave" ]; - custom-keybindings = [ - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/" - ]; - }; - - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { - binding = "<Super>Return"; - command = "resources"; - name = "Task Manager"; - }; - - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = { - binding = "<Super>t"; - command = "ghostty"; - name = "Terminal"; - }; - - "org/gnome/desktop/wm/preferences" = { - button-layout = "appmenu:minimize,maximize,close"; - focus-mode = "click"; - titlebar-font = "${builtins.head fonts.sansSerif} Bold 11"; - visual-bell = false; - }; - - # Core Settings - "org/gnome/desktop/a11y".always-show-universal-access-status = true; - "org/gnome/desktop/a11y/applications".screen-magnifier-enabled = false; - - "org/gnome/mutter" = { - attach-modal-dialogs = true; - center-new-windows = true; - dynamic-workspaces = true; - edge-tiling = false; - focus-change-on-pointer-rest = true; - overlay-key = "Super"; - workspaces-only-on-primary = true; - experimental-features = [ - "scale-monitor-framebuffer" - "xwayland-native-scaling" - ]; - }; - - "org/gnome/desktop/interface" = { - accent-color = "blue"; - clock-show-weekday = true; - enable-animations = true; - enable-hot-corners = true; - font-antialiasing = "grayscale"; - font-hinting = "slight"; - gtk-im-module = "gtk-im-context-simple"; - locate-pointer = true; - show-battery-percentage = true; - toolkit-accessibility = false; - }; - - "org/gnome/desktop/peripherals/touchpad" = { - click-method = "areas"; - tap-to-click = true; - two-finger-scrolling-enabled = true; - }; - - "org/gnome/settings-daemon/plugins/power" = { - power-button-action = "interactive"; - sleep-inactive-ac-type = "nothing"; - sleep-inactive-battery-timeout = 1800; - }; - - "org/gnome/settings-daemon/plugins/color" = { - night-light-enabled = true; - night-light-schedule-automatic = false; - night-light-schedule-from = 19.0; - night-light-schedule-to = 7.0; - night-light-temperature = mkUint32 3700; - }; - - "org/gnome/desktop/a11y/magnifier" = { - mouse-tracking = "proportional"; - show-cross-hairs = false; - }; - - "org/gnome/desktop/privacy" = { - disable-microphone = false; - old-files-age = mkUint32 7; - remember-recent-files = false; - remove-old-temp-files = true; - remove-old-trash-files = true; - }; - - "org/gnome/desktop/sound" = { - allow-volume-above-100-percent = true; - event-sounds = true; - theme-name = "__custom"; - }; - - "org/gnome/desktop/screensaver" = { - color-shading-type = "solid"; - lock-delay = mkUint32 0; - lock-enabled = false; - picture-options = "zoom"; - primary-color = "#000000000000"; - secondary-color = "#000000000000"; - }; - }; -} diff --git a/nixos/modules/gui/desktop/gnome/settings/extensions.nix b/nixos/modules/gui/desktop/gnome/settings/extensions.nix @@ -1,599 +0,0 @@ -{ - sys, - lib, - pkgs, - files, - ... -}: -let - inherit (builtins) - filter - genList - hasAttr - map - toString - ; - - inherit (lib) - foldr - getExe - hm - listToAttrs - mkForce - nameValuePair - optionals - recursiveUpdate - ; - - inherit (sys.lib.stylix) colors; - - # Shell Extensions - extensions = - with pkgs.gnomeExtensions // hm.gvariant; - ( - [ - { package = appindicator; } - { package = arrange-windows; } - { package = disconnect-wifi; } - { package = display-configuration-switcher; } - { package = gsconnect; } - { package = guillotine; } - { package = hide-minimized; } - { package = invert-window-color; } - { package = media-progress; } - { package = night-light-slider-updated; } - { package = notification-counter; } - { package = overview-hover; } - { package = removable-drive-menu; } - { package = screenshot-window-sizer; } - { package = unmess; } - { package = window-state-manager; } - { - package = workspace-indicator; - disable = true; - } - { - package = gpu-supergfxctl-switch; - disable = !sys.services.supergfxd.enable; - } - { - package = top-bar-organizer; - settings = { - center-box-order = [ "dateMenu" ]; - left-box-order = [ - "activities" - "guillotine" - "guillotine@fopdoodle.net" - "appMenu" - "arrange-menu" - "tilingshell@ferrarodomenico.com" - ]; - - right-box-order = [ - "emoji-copy@felipeftn" - "a11y" - "aggregateMenu" - "drive-menu" - "copyous@boerdereinar.dev" - "vitalsMenu" - "dwellClick" - "color-picker@tuberry" - "gamemodeshellextension@trsnaqe.com" - "lockkeys" - "keyboard" - "screenSharing" - "screenRecording" - "quickSettings" - ]; - }; - } - { - package = status-area-horizontal-spacing; - settings.hpadding = 4; - } - { - package = autohide-battery; - settings.hide-on = 80; - } - { - package = color-picker; - settings.enable-format = true; - } - { - package = focus-follows-workspace; - settings.move-cursor = true; - } - { - package = fullscreen-avoider; - settings = { - move-hot-corners = true; - move-notifications = true; - }; - } - { - package = gamemode-shell-extension; - name = "gamemodeshellextension"; - settings.show-icon-only-when-active = true; - } - { - package = lock-keys; - name = "lockkeys"; - settings.always-show-icon = false; - } - { - package = power-profile-indicator-2; - name = "power-profile"; - settings.colored-icon = false; - } - { - package = user-themes; - name = "user-theme"; - settings.name = mkForce "custom"; - } - { - package = bluetooth-battery-meter; - name = "Bluetooth-Battery-Meter"; - settings = { - disable-level-in-icon = true; - enable-battery-indicator-text = false; - enable-battery-level-icon = false; - enable-battery-level-text = false; - enable-multi-indicator-mode = false; - enable-upower-level-icon = true; - hide-bluetooth-indicator = 0; - indicator-type = 1; - level-indicator-color = 0; - level-indicator-type = 0; - popup-in-quick-settings = false; - swap-icon-text = false; - }; - } - { - package = brightness-control-using-ddcutil; - settings = { - button-location = 1; - ddcutil-binary-path = getExe pkgs.ddcutil; - hide-system-indicator = true; - increase-brightness-shortcut = [ "<Shift>XF86MonBrightnessUp" ]; - decrease-brightness-shortcut = [ "<Shift>XF86MonBrightnessDown" ]; - }; - } - { - package = caffeine; - settings = { - indicator-position = 0; - nightlight-control = "never"; - show-indicator = "always"; - show-notifications = false; - inhibit-apps = [ - "startcenter.desktop" - "virt-manager.desktop" - ]; - }; - } - { - package = pkgs.custom.copyous; - settings = { - auto-hide-search = false; - clipboard-orientation = "horizontal"; - clipboard-position-horizontal = "fill"; - clipboard-position-vertical = "bottom"; - clipboard-history = "keep-all"; - clipboard-size = 700; - disable-hljs-dialog = false; - header-controls-visibility = "visible-on-hover"; - history-length = 250; - open-clipboard-dialog-shortcut = [ "<Super>v" ]; - show-at-cursor = false; - show-at-pointer = false; - show-indicator = true; - toggle-incognito-mode-shortcut = [ "<Control><Super>v" ]; - wiggle-indicator = true; - }; - } - { - package = coverflow-alt-tab; - name = "coverflowalttab"; - settings = { - hide-panel = false; - highlight-mouse-over = false; - icon-style = "Classic"; - position = "Bottom"; - raise-mouse-over = true; - switch-per-monitor = true; - switcher-looping-method = "Flip Stack"; - switcher-style = "Coverflow"; - }; - } - { - package = emoji-copy; - settings = { - active-keybind = true; - always-show = false; - emoji-keybind = [ "<Super><Shift>e" ]; - paste-on-select = true; - }; - } - { - package = focus-changer; - settings = { - focus-down = [ "<Super>s" ]; - focus-left = [ "<Super>a" ]; - focus-right = [ "<Super>d" ]; - focus-up = [ "<Super>w" ]; - }; - } - { - package = notification-configurator; - settings = { - notification-position = "center"; - block-list = "[]"; - app-themes = '' - {"poweralertd":{"appNameColor":[0.9647058844566345,0.3803921639919281,0.3176470696926117,1],"timeColor":[0.6,0.6,0.607843137,1],"backgroundColor":[0.329411765,0.329411765,0.352941176,1],"titleColor":[0.992156863,0.992156863,0.992156863,1],"bodyColor":[0.992156863,0.992156863,0.992156863,1],"appNameFontSize":18,"timeFontSize":14,"titleFontSize":14,"bodyFontSize":18}} - ''; - }; - } - { - package = shortcuts; - settings = { - maxcolumns = 3; - shortcuts-file = files.gnome.shortcuts; - shortcuts-toggle-overview = [ "<Super>slash" ]; - show-icon = false; - use-custom-shortcuts = true; - use-transparency = true; - visibility = 55; - }; - } - { - package = tasks-in-panel; - settings = { - accent-panel = false; - light-style = false; - move-date = false; - scroll-panel = false; - show-active-workspace = true; - show-activities = true; - show-favorites-menu = false; - show-focused-window = true; - show-power-profile = false; - show-recent-apps-menu = false; - show-user-id = false; - show-window-icon = false; - show-window-title = true; - show-workspaces-bar = false; - yaru-panel = false; - }; - } - { - package = tiling-shell; - name = "tilingshell"; - settings = { - enable-blur-selected-tilepreview = false; - enable-blur-snap-assistant = false; - enable-snap-assist = false; - enable-tiling-system = true; - enable-tiling-system-windows-suggestions = true; - enable-window-border = false; - override-window-menu = true; - restore-window-original-size = true; - tiling-system-activation-key = [ "0" ]; - top-edge-maximize = true; - window-border-width = mkUint32 2; - inner-gaps = mkUint32 5; - outer-gaps = mkUint32 5; - move-window-down = [ "<Shift><Super>s" ]; - move-window-left = [ "<Shift><Super>a" ]; - move-window-right = [ "<Shift><Super>d" ]; - move-window-up = [ "<Shift><Super>w" ]; - }; - } - { - package = user-avatar-in-quick-settings; - name = "quick-settings-avatar"; - settings = { - avatar-position = 1; - avatar-realname = false; - avatar-size = 56; - }; - } - { - package = vitals; - settings = { - hot-sensors = [ "_default_icon_" ]; - show-battery = true; - show-storage = false; - show-gpu = true; - include-static-gpu-info = false; - }; - } - { - package = window-gestures; - name = "windowgestures"; - settings = { - fn-fullscreen = true; - fn-maximized-snap = true; - fn-move = true; - fn-move-snap = true; - fn-resize = true; - pinch-enable = true; - pinch3-in = 0; - pinch3-out = 0; - pinch4-in = 14; - pinch4-out = 3; - swipe3-down = 1; - swipe4-updown = 22; - taphold-move = true; - three-finger = false; - use-active-window = true; - }; - } - { - package = workspace-switcher-manager; - settings = { - active-show-win-title = false; - active-show-ws-name = true; - inactive-show-ws-name = true; - modifiers-hide-popup = true; - monitor = 0; - popup-mode = 0; - popup-opacity = 100; - vertical = 5; - ws-ignore-last = false; - ws-wraparound = true; - }; - } - { - package = wsp-windows-search-provider; - name = "windows-search-provider"; - settings = { - custom-prefixes = "`"; - results-order = 1; - search-commands = false; - search-method = 1; - }; - } - { - package = ddterm; - path = "com/github/amezin/ddterm"; - settings = { - ddterm-activate-hotkey = [ "<Super>space" ]; - hide-window-on-esc = true; - panel-icon-type = "none"; - shortcut-find = [ "<Control>f" ]; - shortcut-page-close = [ "<Control>w" ]; - shortcut-win-new-tab = [ "<Control>t" ]; - show-animation = "ease-in-sine"; - show-animation-duration = 0.2; - hide-animation = "ease-out-sine"; - hide-animation-duration = 0.1; - window-skip-taskbar = false; - } - // (listToAttrs ( - genList ( - n: - let - num = toString (n + 1); - in - nameValuePair "shortcut-switch-to-tab-${num}" [ "<Control>${num}" ] - ) 9 - )); - } - { - package = vertical-workspaces; - settings = { - aaa-loading-profile = true; - always-activate-selected-window = false; - animation-speed-factor = 100; - app-display-module = true; - app-favorites-module = true; - app-folder-order = 1; - app-folder-remove-button = 0; - app-grid-active-preview = false; - app-grid-animation = 4; - app-grid-bg-blur-sigma = 40; - app-grid-columns = 0; - app-grid-content = 2; - app-grid-folder-center = true; - app-grid-folder-columns = 0; - app-grid-folder-icon-grid = 2; - app-grid-folder-icon-size = -1; - app-grid-folder-rows = 0; - app-grid-icon-size = -1; - app-grid-incomplete-pages = false; - app-grid-names = 0; - app-grid-order = 1; - app-grid-page-width-scale = 80; - app-grid-performance = true; - app-grid-remember-page = true; - app-grid-rows = 0; - app-grid-spacing = 12; - center-app-grid = true; - center-dash-to-ws = false; - center-search = true; - close-ws-button-mode = 2; - dash-bg-color = 0; - dash-bg-gs3-style = false; - dash-bg-opacity = 50; - dash-bg-radius = 0; - dash-icon-scroll = 1; - dash-isolate-workspaces = true; - dash-max-icon-size = 64; - dash-module = true; - dash-position = 2; - dash-position-adjust = 0; - dash-show-extensions-icon = 0; - dash-show-recent-files-icon = 0; - dash-show-windows-before-activation = 3; - enable-page-shortcuts = false; - favorites-notify = 1; - highlighting-style = 1; - hot-corner-action = 1; - hot-corner-fullscreen = false; - hot-corner-position = 1; - hot-corner-ripples = true; - layout-module = true; - message-tray-module = true; - new-window-focus-fix = false; - new-window-monitor-fix = false; - notification-position = 1; - osd-position = 2; - osd-window-module = true; - overlay-key-module = true; - overlay-key-primary = 1; - overlay-key-secondary = 1; - overview-bg-blur-sigma = 50; - overview-bg-brightness = 50; - overview-esc-behavior = 1; - overview-mode = 0; - panel-module = true; - panel-overview-style = 1; - panel-position = 0; - panel-visibility = 0; - recent-files-search-provider-module = false; - running-dot-style = 1; - search-bg-brightness = 30; - search-controller-module = true; - search-fuzzy = true; - search-icon-size = 96; - search-max-results-rows = 5; - search-module = true; - search-view-animation = 1; - search-width-scale = 105; - search-windows-icon-scroll = 1; - search-windows-order = 1; - sec-wst-position-adjust = 0; - secondary-ws-preview-scale = 100; - secondary-ws-preview-shift = false; - secondary-ws-thumbnail-scale = 5; - secondary-ws-thumbnails-position = 2; - show-app-icon-position = 0; - show-bg-in-overview = true; - show-search-entry = false; - show-ws-preview-bg = false; - show-ws-switcher-bg = false; - show-wst-labels = 1; - show-wst-labels-on-hover = true; - smooth-blur-transitions = true; - startup-state = 2; - swipe-tracker-module = true; - win-attention-handler-module = true; - win-preview-icon-size = 1; - win-preview-mid-mouse-btn-action = 1; - win-preview-sec-mouse-btn-action = 0; - win-preview-show-close-button = true; - win-title-position = 0; - window-attention-mode = 0; - window-icon-click-action = 1; - window-manager-module = true; - window-preview-module = true; - workspace-animation = 1; - workspace-animation-module = true; - workspace-module = true; - workspace-switcher-animation = 1; - workspace-switcher-popup-module = true; - ws-max-spacing = 350; - ws-preview-bg-radius = 30; - ws-preview-scale = 100; - ws-sw-popup-h-position = 50; - ws-sw-popup-mode = 0; - ws-sw-popup-v-position = 50; - ws-switcher-ignore-last = false; - ws-switcher-mode = 0; - ws-switcher-wraparound = false; - ws-thumbnail-scale = 10; - ws-thumbnail-scale-appgrid = 20; - ws-thumbnails-full = false; - ws-thumbnails-position = 5; - wst-position-adjust = 0; - }; - } - ] - ++ optionals sys.gui.fancy [ - { - package = rounded-window-corners-reborn; - settings = { - skip-libadwaita-app = false; - skip-libhandy-app = false; - border-width = -1; - border-color = - with colors; - mkTuple [ - (mkDouble base0D-dec-r) - (mkDouble base0D-dec-g) - (mkDouble base0D-dec-b) - 1.0 - ]; - global-rounded-corner-settings = "{'padding': <{'left': 1, 'right': 1, 'top': 1, 'bottom': 1}>, 'keepRoundedCorners': <{'maximized': true, 'fullscreen': false}>, 'borderRadius': <uint32 12>, 'smoothing': <0.0>, 'enabled': <true>}"; - blacklist = [ - "com.desktop.ding" - "com.github.amezin.ddterm" - ]; - }; - } - { - package = panel-corners; - settings.panel-corners = true; - } - { - package = transparent-window-moving; - settings.window-opacity = 200; - } - { - package = gtk4-desktop-icons-ng-ding; - settings = { - dark-text-in-labels = false; - show-drop-place = false; - show-network-volumes = false; - }; - } - ] - ); -in -{ - dconf.settings = { - "org/gnome/shell" = - let - list = - enabled: - map (ext: ext.package.extensionUuid) ( - filter (ext: if enabled then (!(ext.disable or false)) else (ext.disable or false)) extensions - ); - in - { - disable-user-extensions = false; - disable-extension-version-validation = true; - disabled-extensions = list false; - enabled-extensions = list true; - }; - } - // foldr recursiveUpdate { } ( - map ( - ext: - if (hasAttr "settings" ext) then - ( - if (hasAttr "path" ext) then - { "${ext.path}" = ext.settings; } - else if (hasAttr "name" ext) then - { "org/gnome/shell/extensions/${ext.name}" = ext.settings; } - else - { "org/gnome/shell/extensions/${ext.package.extensionPortalSlug}" = ext.settings; } - ) - else - { } - ) extensions - ); - - home = { - packages = [ pkgs.dconf2nix ] ++ builtins.map (ext: ext.package) extensions; - file.".config/guillotine.json".source = files.gnome.menu; # Action Menu - persist.directories = [ - ".local/share/gnome-shell/extensions" - - # Clipboard - ".cache/copyous@boerdereinar.dev" - ".config/copyous@boerdereinar.dev" - ".local/share/copyous@boerdereinar.dev" - ]; - }; -} diff --git a/nixos/modules/gui/desktop/hyprland/apps/idle.nix b/nixos/modules/gui/desktop/hyprland/apps/idle.nix @@ -1,34 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - inherit (lib) getExe getExe'; -in -{ - ## Idle Timeout - user.homeConfig.services.swayidle.timeouts = - with config._shared.idle; - let - shader = getExe pkgs.hyprshade; - dpms = "${getExe' config.programs.hyprland.package "hyprctl"} dispatch dpms"; - in - [ - { - timeout = 240; # Dim display - command = audio "${shader} on dim"; - resumeCommand = "${shader} off"; - } - { - timeout = 300; # Turn off display - command = audio "${dpms} off"; - resumeCommand = "${dpms} on"; - } - { - timeout = 500; # Suspend device - command = audio "${dpms} on && ${lock "" ""} && ${getExe' pkgs.systemd "systemctl"} suspend"; - } - ]; -} diff --git a/nixos/modules/gui/desktop/hyprland/apps/launcher.nix b/nixos/modules/gui/desktop/hyprland/apps/launcher.nix @@ -1,81 +0,0 @@ -{ - config, - util, - inputs, - files, - ... -}: -{ - ## Launcher Configuration - user.homeConfig = { - imports = [ inputs.hyprshell.homeModules.default ]; - home.persist.directories = [ - ".local/share/hyprshell" - ".cache/hyprshell" - ]; - - programs.hyprshell = { - enable = true; - systemd.enable = true; - styleFile = util.build.theme { - inherit (config.lib.stylix) colors; - file = files.hyprland.hyprshell; - }; - - settings.windows = { - enable = true; - scale = 9.0; - items_per_row = 3; - - overview = { - enable = true; - modifier = "super"; - key = "tab"; - - launcher = { - launch_modifier = "alt"; - default_terminal = "kitty"; - width = 700; - max_items = 4; - show_when_empty = true; - plugins = { - applications = { - run_cache_weeks = 4; - show_execs = true; - show_actions_submenu = true; - }; - calc.enable = true; - path.enable = true; - terminal.enable = true; - websearch.engines = [ - { - url = "https://www.google.com/search?q={}"; - name = "Google"; - key = "g"; - } - { - url = "https://en.wikipedia.org/wiki/Special:Search?search={}"; - name = "Wikipedia"; - key = "w"; - } - ]; - }; - }; - }; - - switch = { - enable = true; - modifier = "alt"; - filter_by = [ "current_workspace" ]; - }; - - switch_2 = { - enable = true; - modifier = "alt"; - key = "grave"; - filter_by = [ "same_class" ]; - }; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/hyprland/apps/panel.nix b/nixos/modules/gui/desktop/hyprland/apps/panel.nix @@ -1,166 +0,0 @@ -{ - config, - lib, - files, - ... -}: -let - inherit (lib) mkMerge; - inherit (config._shared) panel theme; - inherit (config.gui) display; -in -{ - ## Panel Configuration - user.homeConfig.programs.waybar = { - style = files.hyprland.waybar; - settings = - let - shared = { - position = "top"; - height = 40; - spacing = 3; - margin-top = 2; - margin-right = 5; - margin-bottom = 1; - margin-left = 5; - - "group/users" = { - orientation = "horizontal"; - modules = [ - "user" - "custom/power" - ]; - drawer.transition-left-to-right = true; - }; - - user = { - height = 22; - width = 22; - }; - - "hyprland/submap" = { - always-on = false; - tooltip = false; - format = " {}"; - on-click = "hyprctl dispatch submap reset"; - }; - - "hyprland/window" = { - format = "{class}"; - icon = false; - separate-outputs = true; - }; - - "hyprland/workspaces" = { - all-outputs = false; - show-special = true; - format = "<small>{name}</small>{windows}"; - on-scroll-up = "hyprctl dispatch workspace m+1"; - on-scroll-down = "hyprctl dispatch workspace m-1"; - ignore-workspaces = [ - "special:S-.*" - "special:minimized" - ]; - - workspace-taskbar = { - enable = true; - format = "{icon}"; - icon-size = 22; - icon-theme = theme.icons.name; - on-click-window = "hyprutils click {button} {address}"; - ignore-list = [ - "kitty-clip" - "kitty-dropterm" - ]; - }; - }; - - "custom/minimized" = { - format = ""; - on-click = "hyprutils toggle minimized"; - }; - - "group/menu" = { - orientation = "horizontal"; - drawer.transition-left-to-right = true; - }; - - "group/media" = { - orientation = "horizontal"; - drawer.transition-left-to-right = false; - }; - - "group/display" = { - orientation = "horizontal"; - drawer.transition-left-to-right = false; - }; - - backlight.on-click = "nwg-displays"; - - "group/power" = { - orientation = "horizontal"; - drawer.transition-left-to-right = false; - }; - - battery = { - align = 0; - on-click-right = "hyprutils toggle fancy"; - }; - - "group/notify" = { - orientation = "horizontal"; - drawer.transition-left-to-right = false; - }; - - modules-left = [ - "custom/logo" - "group/users" - "hyprland/workspaces" - "custom/minimized" - ]; - - modules-center = [ - "hyprland/window" - "hyprland/submap" - ]; - }; - in - [ - (mkMerge [ - panel - shared - { - output = display; - modules-right = [ - "group/menu" - "bluetooth" - "network" - "group/media" - "group/display" - "group/power" - "custom/weather" - "clock" - "group/notify" - ]; - } - ]) - (mkMerge [ - panel - shared - { - output = "!" + display; - modules-right = [ - "group/menu" - "bluetooth" - "network" - "group/media" - "group/power" - "custom/weather" - "clock" - "group/notify" - ]; - } - ]) - ]; - }; -} diff --git a/nixos/modules/gui/desktop/hyprland/apps/utilities.nix b/nixos/modules/gui/desktop/hyprland/apps/utilities.nix @@ -1,81 +0,0 @@ -{ - config, - lib, - util, - pkgs, - files, - ... -}: -let - inherit (lib) getExe; - inherit (config.lib.stylix) colors; -in -{ - environment.systemPackages = with pkgs; [ - # Apps - custom.kebihelp - nwg-displays - - # Utilities - custom.hyprutils - grim - grimblast - hyprkeys - hyprshade - unstable.pyprland - slurp - waycorner - ]; - - user.homeConfig = { - # Wallpaper Daemon - services.hyprpaper = { - enable = true; - settings = { - ipc = false; - splash = true; - }; - }; - - # Hot Corners - systemd.user.services.waycorner = - let - target = [ "graphical-session.target" ]; - in - { - Install.WantedBy = target; - Unit = { - Description = "Hot Corners"; - After = target; - }; - Service.ExecStart = getExe pkgs.waycorner; - }; - - home = { - persist.directories = [ ".config/nwg-displays" ]; - file = with files.hyprland; { - # Application Drawer - ".config/nwg-drawer/drawer.css".text = drawer; - - # Pyprland - ".config/hypr/pyprland.toml".text = pypr; - - # Hot Corners - ".config/waycorner/config.toml".text = waycorner; - - # Keybinds Viewer - ".config/kebihelp.json".text = util.build.theme { - inherit colors; - inherit (config.stylix) fonts; - file = kebihelp; - }; - - # Shaders - ".config/hypr/shaders" = { - source = shaders; - recursive = true; - }; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/hyprland/default.nix b/nixos/modules/gui/desktop/hyprland/default.nix @@ -1,65 +0,0 @@ -{ - config, - lib, - util, - pkgs, - files, - ... -}@args: -let - inherit (lib) - getExe - getExe' - mkForce - mkIf - mkMerge - replaceStrings - ; -in -{ - ## Hyprland Configuration ## - imports = [ ../_shared ]; - config = mkIf (config.gui.desktop == "hyprland") ( - mkMerge ( - # App Configuration - (builtins.map (path: import path args) (util.map.modules.list ./apps)) - ++ [ - ## Environment Setup - rec { - # WM - programs.hyprland = { - enable = true; - withUWSM = true; - xwayland.enable = true; - package = pkgs.hyprworld.hyprland; - portalPackage = pkgs.hyprworld.xdg-desktop-portal-hyprland; - }; - - # Greeter - services.greetd.settings.default_session.command = - mkForce "${getExe' programs.hyprland.package "start-hyprland"} -- --config ${ - pkgs.writeText "greeter.conf" ( - replaceStrings [ "@greeter" ] [ (getExe config.programs.regreet.package) ] ( - util.build.theme { - inherit (config.lib.stylix) colors; - file = files.hyprland.greeter; - } - ) - ) - } &> /dev/null"; - } - { - # App Environment - xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; - - # Settings - _shared.enable = true; - user.homeConfig = { - imports = [ ./settings ]; - home.persist.directories = [ ".config/hypr" ]; - }; - } - ] - ) - ); -} diff --git a/nixos/modules/gui/desktop/hyprland/settings/apps.nix b/nixos/modules/gui/desktop/hyprland/settings/apps.nix @@ -1,162 +0,0 @@ -{ - sys, - lib, - util, - pkgs, - ... -}: -let - inherit (builtins) map toString; - inherit (lib) flatten getExe; - inherit (sys.gui) cursors display; - cursor = "${cursors.name}-Hyprcursor"; -in -{ - ## App Environment - # Cursor - xdg.dataFile."icons/${cursor}".source = "${cursors.package}/share/icons/${cursor}"; - wayland.windowManager.hyprland.settings = { - env = [ - "HYPRCURSOR_THEME, ${cursor}" - "HYPRCURSOR_SIZE, ${toString cursors.size}" - - # QT Apps - "QT_WAYLAND_DISABLE_WINDOWDECORATION, 1" - - # Screenshot - "SLURP_ARGS, -dc ${sys.lib.stylix.colors.base0D}" - ]; - - # Window Swallowing - misc.swallow_regex = "^(kitty)$"; - - ## Autostart - exec-once = [ - "uwsm finalize" - "hyprctl setcursor ${cursor} ${toString cursors.size}" - ] - ++ (map (app: "uwsm app -t service -u ${util.build.until " " app}.service -- " + app) [ - "hyprutils daemon" - - # Pyprland - "pypr" - - # Application Drawer - "nwg-drawer -r" - - # Desktop Icons - "pcmanfm-qt --desktop" - - # Display Temperature - "sunsetr -b" - ]); - - ## Shortcuts - bind = - let - toggle = app: "pkill ${app} || uwsm app -u ${app}.scope -- ${app}"; - runOnce = app: "pgrep ${app} || uwsm app -u ${app}.scope -- ${app}"; - in - [ - # Applications - "$mod, F, exec, nemo" - "$mod, T, exec, kitty" - "$mod, W, exec, firefox" - "$mod, Return, exec, ${runOnce "resources"}" - "$mod SHIFT, equal, exec, pypr toggle calc" - ", XF86Calculator, exec, qalculate-gtk" - - # Utilities - "$mod, A, exec, nwg-drawer" - "$mod, slash, exec, ${toggle "kebihelp"} show -a" - "$mod SHIFT, C, exec, ${runOnce "hyprpicker"} -arf hex" - "$mod SHIFT, B, exec, ${runOnce "overskride"}" - "$mod, D, exec, ${runOnce "nwg-displays"}" - "$mod SHIFT, P, exec, pwvucontrol" - "$mod SHIFT, N, exec, sh -c 'env XDG_CURRENT_DESKTOP=GNOME gnome-control-center wifi'" - "$mod, Escape, exec, ${toggle "wlogout"} -p layer-shell" - - # Tools - "$mod SHIFT, A, exec, sysutils toggle service waybar" - "$mod SHIFT, D, exec, hyprutils toggle monitor ${display}" - "$mod, N, exec, swaync-client -t -sw" - "$mod, S, exec, hyprutils toggle shader" - "$mod SHIFT, T, exec, pypr toggle term" - "$mod, V, exec, pypr show clip" - "$mod, backslash, exec, pypr toggle emoji" - ]; - - ## Permissions - permission = [ - "${sys.programs.hyprland.portalPackage}/libexec/.xdg-desktop-portal-hyprland-wrapped, screencopy, allow" - "${getExe pkgs.grim}, screencopy, allow" - "${getExe pkgs.wl-screenrec}, screencopy, allow" - ]; - - ## Layer Rules - layerrule = [ - "no_anim on, match:namespace ^(hyprpicker)$" - "dim_around on, match:namespace ^(hyprshell_overview)$" - - "blur on, animation fade, match:namespace ^(logout_dialog)$" - "blur on, dim_around on, animation popin, match:namespace ^(nwg-drawer)$" - - "blur on, ignore_alpha 0, animation slide right, match:namespace ^(swaync-control-center)$" - "blur on, ignore_alpha 0, animation slide right, match:namespace ^(swaync-notification-window)$" - - "blur on, ignore_alpha 0, match:namespace ^(waybar)$" - "blur on, ignore_alpha 0, match:namespace ^(wlclock)$" - ]; - - ## Window Rules - windowrule = flatten ( - [ - # Settings - "stay_focused on, match:class ^(gnome-control-center)$" - - # Keybinds Viewer - "pin on, stay_focused on, opacity 0.9 override, match:title ^(Kebihelp)$" - - # Browser Windows - "float on, match:title ^(Picture-in-[P|p]icture)$" - "workspace special silent, match:title ^(Sharing Indicator)$" - "workspace special silent, match:title ^(.*is sharing (your screen|a window).)$" - - # Media Consumption - "idle_inhibit focus, match:class ^(mpv|.*celluloid.*|.+exe)$" - "idle_inhibit focus, match:class ^(firefox|brave-browser)$, match:title ^(.*YouTube.*)$" - "idle_inhibit fullscreen, match:class ^(firefox|brave-browser)$" - - # Screen Tearing - "immediate on, match:class ^(.+exe)$" - - # Prompt Windows - "float on, dim_around on, match:class ^(xdg-desktop-portal-gtk)$" - ] - ++ (map (class: [ "pin on, dim_around on, stay_focused on, match:class ^(${class})$" ]) [ - # Authentication - "pinentry-" - "gay.vaskel.Soteria" - "gcr-prompter" - ]) - ++ (map (class: [ "float on, pin on, persistent_size on, match:class ^(${class})$" ]) [ - # Utilities - "com.saivert.pwvucontrol" - "io.github.kaii_lb.Overskride" - "nwg-displays" - "gnome-control-center" - "org.gnome.Settings" - ]) - ++ (map (title: [ "float on, match:title ^(${title})(.*)$" ]) [ - # Dialogs - "Library" - "Open File" - "Open Folder" - "Save As" - "Save File" - "Select a File" - ".*Properties" - ]) - ); - }; -} diff --git a/nixos/modules/gui/desktop/hyprland/settings/default.nix b/nixos/modules/gui/desktop/hyprland/settings/default.nix @@ -1,214 +0,0 @@ -{ - sys, - lib, - util, - ... -}: -let - inherit (lib) mkForce mkIf; - inherit (sys.gui) display fancy; - inherit (sys.lib.stylix.colors) base03 base05 base0D; -in -{ - ## Hyprland Settings - imports = util.map.modules.list ./.; - stylix.targets.hyprland.enable = true; - wayland.windowManager.hyprland = { - inherit (sys.programs.hyprland) enable package portalPackage; - - # Use 'nwg-displays' to configure monitors - extraConfig = '' - source = ~/.config/hypr/monitors.conf - source = ~/.config/hypr/workspaces.conf - ''; - - settings = { - # Display - monitor = ", preferred, auto, 1"; - xwayland = { - enabled = true; - force_zero_scaling = true; - }; - - input = { - follow_mouse = 1; # Focus on cursor move - focus_on_close = 1; - - # Keyboard - kb_layout = "us"; - numlock_by_default = true; - - # Mouse - accel_profile = "flat"; - touchpad = { - tap-to-click = true; - tap-and-drag = true; - natural_scroll = true; - disable_while_typing = false; - }; - }; - - # Workspace Behaviour - binds = { - workspace_center_on = 1; - movefocus_cycles_fullscreen = true; - workspace_back_and_forth = true; - }; - - gesture = [ - "3, horizontal, workspace" - ]; - - # Touchpad Gestures - gestures = { - workspace_swipe_use_r = false; - workspace_swipe_create_new = true; - }; - - # Cursor Settings - cursor = { - default_monitor = display; - hide_on_key_press = true; - sync_gsettings_theme = true; - warp_on_change_workspace = true; - }; - - # Tiling Layout - dwindle = { - pseudotile = true; # Keep floating dimensions - preserve_split = true; - smart_split = true; - }; - - # Smart Gaps - workspace = [ - "w[tv1]s[false], gapsout:0, gapsin:0" - "f[1]s[false], gapsout:0, gapsin:0" - ]; - windowrule = [ - "border_size 0, rounding 0, match:float 0, match:workspace w[tv1]s[false]" - "border_size 0, rounding 0, match:float 0, match:workspace f[1]s[false]" - ]; - - misc = { - disable_autoreload = true; # Disable configuration Polling - enable_swallow = true; # Window Swallowing - - focus_on_activate = true; - initial_workspace_tracking = 1; - middle_click_paste = false; - on_focus_under_fullscreen = 2; - - # Interfere with wallpaper daemons - force_default_wallpaper = 0; - disable_hyprland_logo = true; - - # Graphics - vrr = 1; - }; - render.direct_scanout = 1; - - general = { - allow_tearing = !fancy; - resize_on_border = true; - - # Floating Layout - snap = { - enabled = true; - border_overlap = true; - respect_gaps = true; - monitor_gap = 10; - window_gap = 15; - }; - - # Visuals - gaps_in = 3; - gaps_out = 3; - float_gaps = 3; - border_size = 2; - "col.active_border" = mkForce "rgb(${base0D}) rgb(${base05}) 90deg"; - }; - - group = { - auto_group = true; - insert_after_current = true; - drag_into_group = 2; - merge_groups_on_drag = true; - merge_groups_on_groupbar = true; - merge_floated_into_tiled_on_groupbar = false; - group_on_movetoworkspace = false; - "col.border_active" = mkForce "rgb(${base05}) rgb(${base0D}) 90deg"; - "col.border_inactive" = mkForce "rgb(${base05}) rgb(${base03}) 90deg"; - - groupbar = { - enabled = true; - scrolling = true; - gradients = true; - blur = true; - height = 15; - render_titles = true; - font_size = 10; - font_weight_active = "bold"; - keep_upper_gap = false; - indicator_height = 0; - gradient_rounding = 5; - gradient_round_only_edges = false; - "col.active" = mkForce "rgba(${base0D}99)"; - "col.inactive" = mkForce "rgb(${base03})"; - }; - }; - - animation = mkIf fancy { - bezier = [ - "accelerate, 0.3, 0, 0.8, 0.15" - "decelerate, 0.05, 0.7, 0.1, 1" - "zoom, 0.38, 0.04, 1, 0.07" - "crash, 0.1, 1, 0, 1" - ]; - - animation = [ - "border, 1, 10, default" - "fade, 1, 3, decelerate" - "fadeLayersIn, 1, 2, crash" - "fadeLayersOut, 1, 0.5, zoom" - "layersIn, 1, 3, crash, slide" - "layersOut, 1, 1.6, zoom" - "specialWorkspace, 1, 3, decelerate, slidevert" - "windows, 1, 3, decelerate, popin 60%" - "windowsIn, 1, 3, decelerate, popin 60%" - "windowsOut, 1, 3, accelerate, popin 60%" - "workspaces, 1, 7, crash, slide" - ]; - }; - - decoration = mkIf fancy { - rounding = 10; - dim_special = 0.3; - - shadow = { - enabled = true; - ignore_window = true; - offset = "0 2"; - range = 20; - }; - - blur = { - enabled = true; - brightness = 1.0; - contrast = 1.0; - passes = 2; - }; - }; - - debug = { - disable_logs = false; - error_position = 1; - }; - - ecosystem = { - no_update_news = true; - no_donation_nag = true; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/hyprland/settings/keybinds.nix b/nixos/modules/gui/desktop/hyprland/settings/keybinds.nix @@ -1,209 +0,0 @@ -_: -let - inherit (builtins) concatLists genList toString; -in -{ - ## Compositor Binds ## - wayland.windowManager.hyprland = { - ## Keybindings - settings = { - "$mod" = "SUPER"; - bind = [ - # Compositor Commands - "ALT, F4, killactive," - "$mod, Q, killactive," - "$mod SHIFT, Q, forcekillactive," - "$mod SHIFT, E, fullscreen," - "$mod, C, centerwindow" - "$mod, C, movecursortocorner, 2" - "$mod, E, fullscreen, 1" - "$mod, P, pin" - "$mod, Space, togglesplit" - "$mod SHIFT, S, toggleswallow" - - # Window Focus - "$mod, left, movefocus, l" - "$mod, right, movefocus, r" - "$mod, up, movefocus, u" - "$mod, down, movefocus, d" - "ALT, A, focusurgentorlast" - "ALT, A, alterzorder, top" - - # Window Swap - "$mod SHIFT, left, swapwindow, l" - "$mod SHIFT, right, swapwindow, r" - "$mod SHIFT, up, swapwindow, u" - "$mod SHIFT, down, swapwindow, d" - - # Window Groups - "$mod SHIFT, space, togglegroup" - "ALT, grave, changegroupactive, f" - "ALT SHIFT, grave, changegroupactive, b" - "$mod CTRL, left, moveintogroup, l" - "$mod CTRL, right, moveintogroup, r" - "$mod CTRL, up, moveintogroup, u" - "$mod CTRL, down, moveintogroup, d" - - # Floating Mode - "$mod, semicolon, togglefloating," - "$mod, apostrophe, exec, hyprutils toggle float" - - # Cycle Workspaces - "$mod, comma, split:workspace, m-1" - "$mod, period, split:workspace, m+1" - "$mod CTRL, comma, split:workspace, r-1" - "$mod CTRL, period, split:workspace, r+1" - "$mod, mouse_up, split:workspace, r-1" - "$mod, mouse_down, split:workspace, r+1" - - # Special Workspace - "$mod, 0, togglespecialworkspace, Stash" - "$mod SHIFT, 0, exec, pypr toggle_special Stash" - - # Move Window to Workspace - "$mod SHIFT, comma, split:movetoworkspace, r-1" - "$mod SHIFT, period, split:movetoworkspace, r+1" - - # Cycle Monitors - "$mod ALT, comma, focusmonitor, l" - "$mod ALT, period, focusmonitor, r" - - # Move Window to Monitor - "$mod SHIFT ALT, comma, movewindow, mon:-1" - "$mod SHIFT ALT, period, movewindow, mon:+1" - - # Screen Lock - "$mod, L, exec, loginctl lock-session" - - # Window Minimization - "ALT, Q, movetoworkspacesilent, special:minimized" - "ALT SHIFT, Q, exec, hyprutils toggle minimized" - - # Screenshot - '', Print, exec, sh -c "pgrep slurp || grimblast --notify --freeze copysave area"'' - "CTRL, Print, exec, grimblast --notify --cursor copysave active" - "SHIFT, Print, exec, grimblast --notify --cursor copysave output" - - # Submaps - "$mod SHIFT, Escape, exec, sysutils toggle service waycorner" - "$mod SHIFT, Escape, submap, Inhibit" - "$mod, R, submap, Resize" - "$mod, M, submap, Move" - ] - ++ - # Workspaces - (concatLists ( - genList ( - n: - let - num = toString (n + 1); - in - [ - "$mod, ${num}, split:workspace, ${num}" - "$mod SHIFT, ${num}, split:movetoworkspace, ${num}" - ] - ) 9 - )); - - # Mouse - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - ]; - - # Ignore Locked State - bindl = [ - # Media Controls - ", XF86AudioPlay, exec, sysutils media toggle" - ", XF86AudioPrev, exec, sysutils media previous" - ", XF86AudioNext, exec, sysutils media next" - - # Volume - ", XF86AudioMute, exec, sysutils volume mute" - - # Keyboard Backlight - ", XF86KbdBrightnessUp, exec, sysutils backlight up" - ", XF86KbdBrightnessDown, exec, sysutils backlight down" - - # Touchpad - ", XF86TouchpadToggle, exec, hyprutils toggle touchpad" - ]; - - # Repeat on Hold - bindle = [ - # Volume - ", XF86AudioRaiseVolume, exec, sysutils volume up" - ", XF86AudioLowerVolume, exec, sysutils volume down" - - # Backlight - ", XF86MonBrightnessUp, exec, sysutils brightness up" - ", XF86MonBrightnessDown, exec, sysutils brightness down" - - # Magnifier - "$mod, equal, exec, pypr zoom ++0.5" - "$mod, minus, exec, pypr zoom --0.5" - "$mod SHIFT, minus, exec, pypr zoom" - ]; - }; - - ## Submaps - submaps = { - # Inhibit Keybinds - Inhibit.settings.bind = [ - "$mod SHIFT, Escape, exec, sysutils toggle service waycorner" - "$mod SHIFT, Escape, submap, reset" - ]; - - # Window Resize - Resize.settings = { - binde = [ - ", right, resizeactive, 10 0" - ", left, resizeactive, -10 0" - ", up, resizeactive, 0 -10" - ", down, resizeactive, 0 10" - ]; - bindm = [ ", mouse:272, resizewindow" ]; - bind = [ - ", escape, submap, reset" - "$mod, R, submap, reset" - ]; - }; - - # Window Movement - Move.settings = { - bind = [ - ", C, centerwindow" - ", P, pin" - ", left, movewindoworgroup, l" - ", right, movewindoworgroup, r" - ", up, movewindoworgroup, u" - ", down, movewindoworgroup, d" - "SHIFT, left, moveactive, -30 0" - "SHIFT, right, moveactive, 30 0" - "SHIFT, up, moveactive, 0 -30" - "SHIFT, down, moveactive, 0 30" - ", comma, split:movetoworkspace, r-1" - ", period, split:movetoworkspace, r+1" - ", escape, submap, reset" - "$mod, M, submap, reset" - ]; - bindm = [ ", mouse:272, movewindow" ]; - }; - - # Window Minimization - Minimized.settings.bind = [ - ", left, movefocus, l" - ", right, movefocus, r" - ", up, movefocus, u" - ", down, movefocus, d" - ", Q, killactive," - ", Return, movetoworkspace, +0" - ", Return, submap, reset" - ", mouse:272, movetoworkspace, +0" - ", mouse:272, submap, reset" - ", escape, togglespecialworkspace, minimized" - ", escape, submap, reset" - ]; - }; - }; -} diff --git a/nixos/modules/gui/desktop/hyprland/settings/plugins.nix b/nixos/modules/gui/desktop/hyprland/settings/plugins.nix @@ -1,51 +0,0 @@ -{ - sys, - config, - pkgs, - ... -}: -{ - ## Plugin Settings - wayland.windowManager.hyprland = { - plugins = with pkgs.hyprworld; [ - hypr-dynamic-cursors - hyprexpo - hyprsplit - ]; - - settings = { - plugin = { - # Workspaces per Monitor - hyprsplit.num_workspaces = 9; - - # Cursor Effects - dynamic-cursors = { - enabled = true; - hyprcursor.enabled = true; - shake = { - enabled = true; - nearest = true; - effects = false; - ipc = false; - }; - mode = if sys.gui.fancy then "tilt" else "none"; - tilt.function = "negative_quadratic"; - }; - - # Overview - hyprexpo = { - columns = 3; - workspace_method = "first 1"; - bg_col = "rgb(${sys.lib.stylix.colors.base00})"; - gap_size = builtins.toString config.wayland.windowManager.hyprland.settings.general.gaps_in; - }; - }; - - bind = [ "$mod, grave, hyprexpo:expo, toggle" ]; - hyprexpo-gesture = [ - "4, up, expo, on" - "4, down, expo, off" - ]; - }; - }; -} diff --git a/nixos/modules/gui/desktop/install.nix b/nixos/modules/gui/desktop/install.nix @@ -1,85 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}@args: -let - inherit (lib) - mkIf - mkForce - mkMerge - ; -in -{ - ## GNOME Configuration ## - config = mkIf (config.gui.desktop == "install") (mkMerge [ - (import ./gnome/common.nix args) - - { - services = { - displayManager.gdm = { - banner = "Install Media"; - autoSuspend = false; - }; - - desktopManager.gnome = { - extraGSettingsOverridePackages = [ pkgs.gnome-settings-daemon ]; - favoriteAppsOverride = '' - [org.gnome.shell] - favorite-apps=[ 'org.gnome.Epiphany.desktop', 'nixos-manual.desktop', 'org.gnome.Console.desktop', 'org.gnome.Nautilus.desktop', 'gparted.desktop' ] - ''; - - extraGSettingsOverrides = '' - [org.gnome.shell] - welcome-dialog-last-shown-version='9999999999' - - [org.gnome.desktop.session] - idle-delay=0 - - [org.gnome.settings-daemon.plugins.power] - sleep-inactive-ac-type='nothing' - sleep-inactive-battery-type='nothing' - ''; - }; - }; - - # Essential Utilities - environment.systemPackages = with pkgs; [ - gparted - epiphany - gnome-console - gnome-system-monitor - gnome-text-editor - nautilus - ]; - - # Excluded Packages - services.gnome = { - core-apps.enable = mkForce false; - gnome-browser-connector.enable = mkForce false; - gnome-remote-desktop.enable = mkForce false; - gnome-user-share.enable = mkForce false; - rygel.enable = mkForce false; - }; - - environment.gnome.excludePackages = with pkgs; [ - gnome-backgrounds - gnome-tour - gnome-user-docs - ]; - - # Disable suspension - security.polkit.extraConfig = '' - polkit.addRule(function(action, subject) { - if (action.id == "org.freedesktop.login1.suspend" || - action.id == "org.freedesktop.login1.suspend-multiple-sessions" || - action.id == "org.freedesktop.login1.hibernate" || - action.id == "org.freedesktop.login1.hibernate-multiple-sessions") { - return polkit.Result.NO; - } - }); - ''; - } - ]); -} diff --git a/nixos/modules/gui/desktop/niri/apps/idle.nix b/nixos/modules/gui/desktop/niri/apps/idle.nix @@ -1,28 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - inherit (lib) getExe'; -in -{ - ## Idle Timeout - user.homeConfig.services.swayidle.timeouts = - with config._shared.idle; - let - dpms = state: "${getExe' config.programs.niri.package "niri"} msg action power-${state}-monitors"; - in - [ - { - timeout = 300; # Turn off display - command = audio (dpms "off"); - resumeCommand = dpms "on"; - } - { - timeout = 500; # Suspend device - command = audio "${dpms "on"} && ${lock "" ""} && ${getExe' pkgs.systemd "systemctl"} suspend"; - } - ]; -} diff --git a/nixos/modules/gui/desktop/niri/apps/launcher.nix b/nixos/modules/gui/desktop/niri/apps/launcher.nix @@ -1,30 +0,0 @@ -{ - config, - util, - pkgs, - files, - ... -}: -{ - ## Launcher Configuration - user.homeConfig = { - programs.rofi = { - enable = true; - package = pkgs.rofi; - configPath = ".config/rofi/main.rasi"; - plugins = with pkgs; [ - rofi-calc - rofi-emoji - ]; - }; - - stylix.targets.rofi.enable = true; - home = { - persist.directories = [ ".cache/rofi" ]; - file.".config/rofi/config.rasi".text = util.build.theme { - inherit (config.lib.stylix) colors; - file = files.niri.rofi; - }; - }; - }; -} diff --git a/nixos/modules/gui/desktop/niri/apps/panel.nix b/nixos/modules/gui/desktop/niri/apps/panel.nix @@ -1,158 +0,0 @@ -{ - config, - lib, - pkgs, - files, - ... -}: -let - inherit (lib) mkMerge; - inherit (config._shared) panel; - inherit (config.gui) display; -in -{ - ## Panel Configuration - user.homeConfig.programs.waybar = { - style = files.niri.waybar; - settings = - let - shared = { - position = "left"; - width = 40; - spacing = 3; - margin = "0"; - - "group/users" = { - orientation = "vertical"; - modules = [ - "custom/user" - "custom/power" - ]; - drawer.transition-left-to-right = false; - }; - - "niri/workspaces" = { - all-outputs = false; - format = "<small>{value}</small>"; - }; - - "niri/window" = { - format = ""; - icon = true; - icon-size = 20; - separate-outputs = true; - }; - - "group/menu" = { - orientation = "vertical"; - drawer.transition-left-to-right = false; - }; - - keyboard-state.format = { - numlock = " N\n{icon}"; - capslock = "󰪛\n{icon}"; - }; - - "group/media" = { - orientation = "vertical"; - drawer.transition-left-to-right = true; - }; - - mpris = { - format = ""; - format-paused = "󰏤"; - }; - - "group/power" = { - orientation = "vertical"; - drawer.transition-left-to-right = true; - }; - - "group/display" = { - orientation = "vertical"; - drawer.transition-left-to-right = true; - }; - - "custom/hide".format = ""; - - "custom/weather" = { - format = "{}"; - hide-empty-text = true; - exec = "${ - pkgs.writeShellApplication { - name = "weather"; - runtimeInputs = with pkgs; [ - coreutils - wttrbar - ]; - text = '' - WEATHER=$(wttrbar --date-format %d/%m --nerd --vertical-view) - if [[ $WEATHER = *wttr.in* ]] - then - echo "{}" - else - echo "$WEATHER" - fi - ''; - } - }/bin/weather"; - }; - - clock = { - format = "󰅐\n{:%H\n%M\n%S} "; - format-alt = "󰅐\n{:%I\n%M\n\n%d\n%m\n%y} "; - }; - - "group/notify" = { - orientation = "vertical"; - drawer.transition-left-to-right = true; - }; - - modules-right = [ - "group/menu" - "group/users" - "custom/logo" - ]; - - modules-center = [ - "niri/window" - "niri/workspaces" - ]; - }; - in - [ - (mkMerge [ - panel - shared - { - output = display; - modules-left = [ - "group/notify" - "clock" - "custom/weather" - "group/power" - "group/display" - "group/media" - "network" - "bluetooth" - ]; - } - ]) - (mkMerge [ - panel - shared - { - output = "!" + display; - modules-left = [ - "group/notify" - "clock" - "group/power" - "group/media" - "network" - "bluetooth" - ]; - } - ]) - ]; - }; -} diff --git a/nixos/modules/gui/desktop/niri/apps/utilities.nix b/nixos/modules/gui/desktop/niri/apps/utilities.nix @@ -1,31 +0,0 @@ -{ - config, - util, - pkgs, - files, - ... -}: -{ - environment.systemPackages = with pkgs; [ - nautilus - wl-mirror - xwayland-satellite-stable - ]; - - user.homeConfig = { - # Wallpaper - stylix.targets.wpaperd.enable = true; - services = { - wpaperd.enable = true; - - # Notifications - swaync.settings.positionX = "left"; - }; - - # Application Drawer - home.file.".config/nwg-drawer/drawer.css".text = util.build.theme { - inherit (config.lib.stylix) colors; - file = files.niri.drawer; - }; - }; -} diff --git a/nixos/modules/gui/desktop/niri/default.nix b/nixos/modules/gui/desktop/niri/default.nix @@ -1,54 +0,0 @@ -{ - config, - lib, - util, - inputs, - pkgs, - ... -}@args: -{ - ## Niri Configuration ## - imports = [ - ../_shared - inputs.niri.nixosModules.niri - ]; - - config = lib.mkIf (config.gui.desktop == "niri") ( - lib.mkMerge ( - # App Configuration - (builtins.map (path: import path args) (util.map.modules.list ./apps)) - ++ [ - ## Environment Setup - { - programs = { - # WM - niri = { - enable = true; - package = pkgs.niri-unstable; - }; - - # Session - uwsm = { - enable = true; - waylandCompositors = { - niri = { - prettyName = "Niri"; - comment = "Niri compositor managed by UWSM"; - binPath = "/run/current-system/sw/bin/niri"; - }; - }; - }; - }; - - # Settings - _shared.enable = true; - systemd.user.services.niri-flake-polkit.enable = false; - user.homeConfig = { - imports = [ ./settings ]; - programs.niri = { inherit (config.programs.niri) package; }; - }; - } - ] - ) - ); -} diff --git a/nixos/modules/gui/desktop/niri/settings/apps.nix b/nixos/modules/gui/desktop/niri/settings/apps.nix @@ -1,141 +0,0 @@ -{ config, ... }: -{ - programs.niri.settings = { - ## Autostart - spawn-at-startup = - let - exec = - app: args: - [ - "uwsm" - "app" - "-t" - "service" - "-u" - "${app}.service" - "--" - app - ] - ++ args; - in - [ - { - command = [ - "uwsm" - "finalize" - "NIRI_SOCKET" - ]; - } - { command = exec "pcmanfm-qt" [ "--desktop" ]; } - { command = exec "nwg-drawer" [ "-r" ]; } - { command = exec "sunsetr" [ "-b" ]; } - ]; - - ## Keybindings - binds = - with config.lib.niri.actions; - let - sh = spawn "sh" "-c"; - toggle = app: args: sh "pkill ${app} || uwsm app -u ${app}.scope -- ${app} ${args}"; - runOnce = app: args: sh "pgrep ${app} || uwsm app -u ${app}.scope -- ${app} ${args}"; - in - { - # Applications - "Super+space" = { - action = spawn "rofi" "-show" "drun"; - hotkey-overlay.title = "Launcher"; - }; - - "Super+A" = { - action = spawn "nwg-drawer"; - hotkey-overlay.title = "Application Drawer"; - }; - - "Super+F" = { - action = spawn "nemo"; - hotkey-overlay.title = "Files"; - }; - - "Super+T" = { - action = spawn "kitty"; - hotkey-overlay.title = "Terminal"; - }; - - "Super+W" = { - action = spawn "firefox"; - hotkey-overlay.title = "Browser"; - }; - - "Super+Return" = { - action = runOnce "resources" ""; - hotkey-overlay.title = "Task Manager"; - }; - - "XF86Calculator" = { - action = spawn "qalculate-gtk"; - hotkey-overlay.title = "Calculator"; - }; - - # Utilities - "Super+N" = { - action = spawn "swaync-client" "-t" "-sw"; - hotkey-overlay.title = "Show Notifications"; - }; - - "Super+V" = { - action = spawn "kitty" "--class=clipboard" "-e" "clipse"; - hotkey-overlay.title = "Clipboard"; - }; - - "Super+Shift+C" = { - action = runOnce "hyprpicker" "-arf hex"; - hotkey-overlay.title = "Color Picker"; - }; - - "Super+Shift+B" = { - action = runOnce "overskride" ""; - hotkey-overlay.title = "Bluetooth Settings"; - }; - - "Super+Shift+N" = { - action = sh "env XDG_CURRENT_DESKTOP=GNOME gnome-control-center wifi"; - hotkey-overlay.title = "Network Settings"; - }; - - "Super+Shift+P" = { - action = spawn "pwvucontrol"; - hotkey-overlay.title = "Audio Settings"; - }; - - "Super+Escape" = { - action = toggle "wlogout" "-p layer-shell"; - hotkey-overlay.title = "Power Menu"; - }; - }; - - ## Window Rules - window-rules = [ - { - matches = [ - { app-id = "clipboard"; } - { app-id = "qalculate-gtk"; } - ]; - open-floating = true; - default-column-width.proportion = 0.5; - default-window-height.proportion = 0.9; - default-floating-position = { - relative-to = "right"; - x = 5; - y = 0; - }; - } - { - matches = [ - { app-id = "com.saivert.pwvucontrol"; } - { app-id = "com.github.wwmm.easyeffects"; } - ]; - open-floating = true; - } - ]; - }; -} diff --git a/nixos/modules/gui/desktop/niri/settings/default.nix b/nixos/modules/gui/desktop/niri/settings/default.nix @@ -1,75 +0,0 @@ -{ sys, util, ... }: -with sys.lib.stylix.colors; -{ - imports = util.map.modules.list ./.; - programs.niri.settings = { - screenshot-path = "~/Pictures/Screenshots/%Y-%m-%d-%H%M%S.png"; - hotkey-overlay = { - skip-at-startup = true; - hide-not-bound = true; - }; - - input = { - keyboard.numlock = true; - warp-mouse-to-focus.enable = true; - workspace-auto-back-and-forth = true; - focus-follows-mouse = { - enable = true; - max-scroll-amount = "90%"; - }; - }; - - layout = { - tab-indicator = { - enable = true; - place-within-column = true; - }; - - default-column-width.proportion = 0.5; - preset-column-widths = [ - { proportion = 1.0 / 3.0; } - { proportion = 0.5; } - { proportion = 2.0 / 3.0; } - { proportion = 0.85; } - ]; - preset-window-heights = [ - { proportion = 1.0 / 3.0; } - { proportion = 0.5; } - { proportion = 2.0 / 3.0; } - { proportion = 1.0; } - ]; - }; - }; - - programs.niri.extraConfig = '' - recent-windows { - open-delay-ms 150 - - binds { - Alt+Tab { next-window; } - Alt+Shift+Tab { previous-window; } - Alt+grave { next-window filter="app-id"; } - Alt+Shift+grave { previous-window filter="app-id"; } - } - - highlight { - active-color "#${base04}" - urgent-color "#${base08}" - padding 30 - corner-radius 7 - } - - previews { - max-height 480 - max-scale 0.5 - } - } - - gestures { - hot-corners { - top-right - bottom-right - } - } - ''; -} diff --git a/nixos/modules/gui/desktop/niri/settings/keybinds.nix b/nixos/modules/gui/desktop/niri/settings/keybinds.nix @@ -1,100 +0,0 @@ -{ config, ... }: -let - inherit (builtins) - concatLists - genList - listToAttrs - toString - ; -in -{ - programs.niri.settings = { - input.power-key-handling.enable = false; - binds = - with config.lib.niri.actions; - let - sh = spawn "sh" "-c"; - in - { - # Compositor - "Super+slash".action = show-hotkey-overlay; - "Super+Q".action = close-window; - "Super+C".action = center-window; - "Super+Shift+F".action = fullscreen-window; - "Super+equal".action = switch-preset-column-width; - "Super+minus".action = switch-preset-window-height; - "Super+Shift+equal".action = maximize-column; - "Super+Shift+minus".action = set-column-width "+10%"; - "Super+semicolon".action = toggle-window-floating; - "Super+apostrophe".action = switch-focus-between-floating-and-tiling; - "Super+Shift+Tab".action = toggle-column-tabbed-display; - - "Super+Tab".action = toggle-overview; - "Super+Right".action = focus-column-or-monitor-right; - "Super+Left".action = focus-column-or-monitor-left; - "Super+Up".action = focus-window-or-workspace-up; - "Super+Down".action = focus-window-or-workspace-down; - - "Super+Shift+Right".action = consume-or-expel-window-right; - "Super+Shift+Left".action = consume-or-expel-window-left; - "Super+Shift+Up".action = move-window-up-or-to-workspace-up; - "Super+Shift+Down".action = move-window-down-or-to-workspace-down; - "Super+Shift+Return".action = move-window-to-monitor-next; - - "Print".action.screenshot = [ ]; - "Shift+Print".action.screenshot-screen = [ ]; - "Ctrl+Print".action.screenshot-window = [ ]; - - # Controls - "Super+L" = { - action = sh "loginctl lock-session"; - hotkey-overlay.title = "Lock Screen"; - }; - - "XF86AudioPlay".action = sh "sysutils media toggle"; - "XF86AudioPrev".action = sh "sysutils media previous"; - "XF86AudioNext".action = sh "sysutils media next"; - "XF86AudioMute".action = sh "sysutils volume mute"; - "XF86AudioRaiseVolume".action = sh "sysutils volume up"; - "XF86AudioLowerVolume".action = sh "sysutils volume down"; - "XF86MonBrightnessUp".action = sh "sysutils brightness up"; - "XF86MonBrightnessDown".action = sh "sysutils brightness down"; - "XF86KbdBrightnessUp".action = sh "sysutils backlight up"; - "XF86KbdBrightnessDown".action = sh "sysutils backlight down"; - - # Mouse - "Super+Shift+MouseRight".action = switch-preset-window-width; - "Super+WheelScrollUp" = { - action = focus-workspace-up; - cooldown-ms = 150; - }; - "Super+WheelScrollDown" = { - action = focus-workspace-down; - cooldown-ms = 150; - }; - } - // - # Workspaces - listToAttrs ( - concatLists ( - genList ( - n: - let - num = n + 1; - snum = toString (n + 1); - in - [ - { - name = "Super+${snum}"; - value.action = focus-workspace num; - } - { - name = "Super+Shift+${snum}"; - value.action.move-window-to-workspace = num; - } - ] - ) 9 - ) - ); - }; -} diff --git a/nixos/modules/gui/desktop/niri/settings/style.nix b/nixos/modules/gui/desktop/niri/settings/style.nix @@ -1,56 +0,0 @@ -{ sys, ... }: -with sys.lib.stylix.colors.withHashtag; -{ - programs.niri.settings = { - prefer-no-csd = true; - overview.backdrop-color = base00; - layout = { - gaps = 7; - background-color = base00; - insert-hint.display.color = base05; - - shadow = { - enable = true; - spread = 4; - softness = 8; - offset = { - x = 0; - y = 0; - }; - }; - - border.width = 1; - focus-ring = { - enable = true; - width = 1; - active.color = base0D; - }; - - tab-indicator = { - position = "left"; - length.total-proportion = 1.0; - width = 7; - gap = 7; - gaps-between-tabs = 7; - corner-radius = 7; - }; - }; - - window-rules = [ - { - clip-to-geometry = true; - draw-border-with-background = false; - geometry-corner-radius = - let - radius = 7.0; - in - { - bottom-left = radius; - bottom-right = radius; - top-left = radius; - top-right = radius; - }; - } - ]; - }; -} diff --git a/nixos/modules/gui/desktop/pantheon/default.nix b/nixos/modules/gui/desktop/pantheon/default.nix @@ -1,188 +0,0 @@ -{ - config, - lib, - util, - pkgs, - files, - ... -}: -let - inherit (config.gui) desktop; - exists = app: builtins.elem app config.apps.list; - inherit (lib) - getExe - mkIf - mkMerge - ; -in -{ - ## Pantheon Desktop Configuration ## - config = mkIf (desktop == "pantheon") (mkMerge [ - { - # Session - services = { - xserver.enable = true; - desktopManager.pantheon.enable = true; - }; - - # Desktop Integration - gui = { - gtk = { - enable = true; - theme = { - name = "io.elementary.stylesheet.blueberry"; - package = pkgs.pantheon.elementary-gtk-theme; - }; - }; - - qt = { - enable = true; - style = "gtk"; - }; - - cursors = { - name = "elementary"; - package = pkgs.pantheon.elementary-icon-theme; - size = 32; - }; - }; - - # Color Scheme - stylix.base16Scheme = files.colors.elementary; - - # Essential Utilities - apps.list = [ "firefox" ]; - services.pantheon.apps.enable = true; - - # Panel Indicators - environment.pathsToLink = [ "/libexec" ]; - services.desktopManager.pantheon.extraWingpanelIndicators = with pkgs; [ - monitor - wingpanel-indicator-ayatana - ]; - - # Apps - environment.systemPackages = with pkgs.pantheon // pkgs; [ - appeditor - pantheon-tweaks - ]; - - user.homeConfig = { - ## Desktop Settings - imports = [ ./settings.nix ]; - stylix.targets.gnome.enable = false; - - # Default Applications - xdg.mimeApps.defaultApplications = util.build.mime { - audio = [ "io.elementary.files.desktop" ]; - calendar = [ "io.elementary.calendar.desktop" ]; - directory = [ "io.elementary.files.desktop" ]; - image = [ "io.elementary.photos.desktop" ]; - pdf = [ "org.gnome.Evince.desktop" ]; - text = [ "io.elementary.code.desktop" ]; - video = [ "io.elementary.videos.desktop" ]; - }; - - systemd.user.services = { - # App Indicator - indicator-application-gtk3 = { - Unit.Description = "Application Indicator"; - Install.wantedBy = [ "graphical-session.target" ]; - Service = { - Type = "Simple"; - ExecStart = "${pkgs.indicator-application-gtk3}/libexec/indicator-application/indicator-application-service"; - }; - }; - - # Emoji Picker - emote = { - Unit.Description = "Emote Emoji Picker"; - Install.WantedBy = [ "graphical-session.target" ]; - Service = { - ExecStart = "${getExe pkgs.emote}"; - Restart = "on-failure"; - }; - }; - }; - - home = { - # Persisted Files - persist.directories = [ - ".config/evolution" - ".local/share/contractor" - ".local/share/evolution" - ".local/share/Emote" - ".local/share/io.elementary.code" - ".local/share/io.elementary.photos" - ".cache/evolution" - ".cache/io.elementary.appcenter" - ]; - - file = { - # Firefox Elementary Theme - ".mozilla/firefox/default/chrome/userChrome.css".source = - "${pkgs.custom.firefox-elementary}/Windows/userChrome.css"; - ".mozilla/firefox/default/chrome/userContent.css".source = - "${pkgs.custom.firefox-elementary}/userContent.css"; - ".mozilla/firefox/default/chrome/base.css".source = "${pkgs.custom.firefox-elementary}/base.css"; - - # Panel Indicators - ".config/autostart/ibus-daemon.desktop".text = '' - [Desktop Entry] - Name=IBus Daemon - Type=Application - Exec=ibus-daemon --daemonize --desktop=pantheon --replace --xim - Categories= - Terminal=false - NoDisplay=true - StartupNotify=false - ''; - - ".config/autostart/monitor-background.desktop".text = '' - [Desktop Entry] - Name=Monitor Indicators - Type=Application - Exec=com.github.stsdc.monitor --start-in-background - Icon=com.github.stsdc.monitor - Categories= - Terminal=false - NoDisplay=true - StartupNotify=false - ''; - }; - }; - }; - } - - ## 3rd Party Apps Configuration - { - # Code Editor - user.homeConfig.programs.vscode.profiles.default = mkIf (exists "vscode") { - extensions = [ pkgs.vscode-marketplace.sixpounder.elementary-theme ]; - userSettings = { - "workbench.colorTheme" = "Elementary Dark"; - "terminal.external.linuxExec" = "io.elementary.terminal"; - }; - }; - - # Flatpak - warnings = [ "Flatpak support is enabled by default for Pantheon Desktop" ]; - apps.list = [ "flatpak" ]; - services.flatpak = { - remotes = [ - { - name = "appcenter"; - location = "https://flatpak.elementary.io/repo.flatpakrepo"; - } - ]; - - packages = [ - { - appId = "com.github.hezral.clips"; - origin = "appcenter"; - } - ]; - }; - } - ]); -} diff --git a/nixos/modules/gui/desktop/pantheon/settings.nix b/nixos/modules/gui/desktop/pantheon/settings.nix @@ -1,321 +0,0 @@ -{ - sys, - lib, - ... -}: -with lib.hm.gvariant; -let - inherit (builtins) head; - fonts = sys.fonts.fontconfig.defaultFonts; -in -{ - ## Dconf Keys ## - # Generated via nix-community/dconf2nix - # Use 'dconf watch /' to record changes - dconf.settings = { - # Panel - "io/elementary/desktop/wingpanel".use-transparency = true; - "io/elementary/desktop/wingpanel/sound".max-volume = 100.0; - "io/elementary/desktop/wingpanel/power".show-percentage = true; - "io/elementary/desktop/wingpanel/bluetooth".bluetooth-enabled = false; - "io/elementary/switchboard/keyboard".first-launch = false; - "io/elementary/wingpanel/keyboard" = { - show-a11y = true; - capslock = true; - numlock = true; - }; - - # Desktop - "io/elementary/desktop/agent-geoclue2".location-enabled = true; - "io/elementary/settings-daemon/power".profile-plugged-in = "performance"; - "io/elementary/notifications/applications/gala-other" = { - remember = true; - sounds = true; - }; - - "org/gnome/desktop/session".idle-delay = mkUint32 900; - "org/gnome/desktop/a11y/keyboard".togglekeys-enable = true; - "org/gnome/desktop/datetime".automatic-timezone = true; - "org/gnome/desktop/interface" = { - clock-format = "24h"; - clock-show-weekday = true; - cursor-size = 32; - enable-animations = true; - enable-hot-corners = true; - gtk-enable-primary-paste = true; - locate-pointer = true; - text-scaling-factor = 1.0; - }; - - "org/gnome/desktop/background" = rec { - color-shading-type = "solid"; - picture-options = "zoom"; - picture-uri = "file://${sys.gui.wallpaper}"; - picture-uri-dark = picture-uri; - }; - - "org/gnome/desktop/sound" = { - allow-volume-above-100-percent = false; - event-sounds = true; - theme-name = "elementary"; - }; - - "org/gnome/desktop/peripherals/touchpad" = { - click-method = "fingers"; - tap-to-click = true; - two-finger-scrolling-enabled = true; - }; - - "org/gnome/settings-daemon/plugins/power" = { - power-button-action = "interactive"; - sleep-inactive-ac-timeout = 0; - sleep-inactive-ac-type = "nothing"; - sleep-inactive-battery-timeout = 1800; - }; - - "org/gnome/settings-daemon/plugins/color" = { - night-light-enabled = true; - night-light-schedule-automatic = false; - night-light-schedule-from = 19.0; - night-light-schedule-to = 7.0; - night-light-temperature = mkUint32 3700; - }; - - "io/elementary/settings-daemon/housekeeping" = { - cleanup-downloads-folder = false; - cleanup-screenshots-folder = false; - cleanup-temp-folder = true; - cleanup-trash-folder = true; - old-files-age = 7; - }; - - # Window Manager - "org/gnome/desktop/wm/preferences" = { - button-layout = ":minimize,maximize,close"; - titlebar-font = "${head fonts.sansSerif} Bold 11"; - }; - - "io/elementary/desktop/wm/behavior" = { - hotcorner-bottomleft = "show-workspace-view"; - hotcorner-bottomright = "switch-to-workspace-next"; - hotcorner-topleft = "open-launcher"; - move-fullscreened-workspace = true; - }; - - "org/gnome/mutter" = { - attach-modal-dialogs = true; - center-new-windows = true; - dynamic-workspaces = true; - edge-tiling = true; - focus-change-on-pointer-rest = true; - workspaces-only-on-primary = true; - }; - - "org/gnome/mutter/keybindings" = { - cancel-input-capture = [ "<Super><Shift>Escape" ]; - toggle-tiled-left = [ ]; - toggle-tiled-right = [ ]; - }; - - # Dock - "io/elementary/dock" = { - autohide-mode = "overlapping-focus-window"; - icon-size = 48; - launchers = [ - "gala-multitaskingview.desktop" - "brave-browser.desktop" - "io.elementary.mail.desktop" - "io.elementary.terminal.desktop" - "io.elementary.files.desktop" - "io.elementary.code.desktop" - "io.elementary.settings.desktop" - ]; - }; - - # Gestures - "io/elementary/desktop/wm/gestures" = { - three-finger-swipe-horizontal = "switch-to-workspace"; - four-finger-swipe-horizontal = "move-to-workspace"; - three-finger-swipe-up = "multitasking-view"; - four-finger-swipe-up = "toggle-maximized"; - four-finger-pinch = "zoom"; - }; - - # Apps - "io/elementary/files/preferences".singleclick-select = false; - "org/gtk/settings/file-chooser".sort-directories-first = true; - - "desktop/ibus/panel/emoji".font = "${head fonts.emoji} 16"; - "desktop/ibus/panel" = { - show-icon-on-systray = false; - use-custom-font = true; - custom-font = "${head fonts.sansSerif} 10"; - }; - - "com/github/stsdc/monitor/settings" = { - background-state = true; - indicator-state = true; - indicator-cpu-state = false; - indicator-gpu-state = false; - indicator-memory-state = true; - indicator-network-download-state = false; - indicator-network-upload-state = false; - indicator-temperature-state = true; - }; - - "io/elementary/terminal/settings" = { - audible-bell = false; - follow-last-tab = "true"; - font = "${head fonts.monospace} Medium 13"; - natural-copy-paste = false; - unsafe-paste-alert = true; - }; - - "io/elementary/code/saved-state".outline-visible = true; - "io/elementary/code/settings" = { - autosave = false; - prefer-dark-style = true; - show-mini-map = true; - show-right-margin = true; - strip-trailing-on-save = true; - plugins-enabled = [ - "editorconfig" - "word-completion" - "brackets-completion" - "preserve-indent" - "detect-indent" - ]; - }; - - "org/gnome/epiphany" = { - ask-for-default = false; - default-search-engine = "Google"; - use-google-search-suggestions = true; - }; - - "com/github/hezral/clips" = { - first-run = false; - hide-on-startup = true; - min-column-number = 3; - persistent-mode = false; - prefer-dark-style = true; - protected-mode = true; - quick-paste = true; - shake-reveal = false; - show-close-button = false; - theme-optin = true; - }; - - # Keyboard Shortcuts - "org/gnome/desktop/wm/keybindings" = { - begin-move = [ ]; - begin-resize = [ ]; - close = [ - "<Super>q" - "<Alt>F4" - ]; - cycle-group = [ ]; - cycle-group-backward = [ ]; - maximize = [ "" ]; - minimize = [ "<Super>Down" ]; - move-to-monitor-down = [ ]; - move-to-monitor-left = [ "<Shift><Super>Left" ]; - move-to-monitor-right = [ "<Shift><Super>Right" ]; - move-to-monitor-up = [ ]; - move-to-workspace-1 = [ ]; - move-to-workspace-2 = [ "" ]; - move-to-workspace-3 = [ "" ]; - move-to-workspace-4 = [ "" ]; - move-to-workspace-5 = [ "" ]; - move-to-workspace-6 = [ "" ]; - move-to-workspace-7 = [ "" ]; - move-to-workspace-8 = [ "" ]; - move-to-workspace-9 = [ "" ]; - move-to-workspace-down = [ ]; - move-to-workspace-last = [ ]; - move-to-workspace-left = [ "<Primary><Super>Left" ]; - move-to-workspace-right = [ "<Primary><Super>Right" ]; - move-to-workspace-up = [ ]; - show-desktop = [ "<Super>d" ]; - switch-applications = [ "<Alt>Tab" ]; - switch-applications-backward = [ "<Shift><Alt>Tab" ]; - switch-group = [ "<Super>Tab" ]; - switch-group-backward = [ "<Shift><Super>Tab" ]; - switch-to-workspace-1 = [ "<Super>Home" ]; - switch-to-workspace-2 = [ "" ]; - switch-to-workspace-3 = [ "" ]; - switch-to-workspace-4 = [ "" ]; - switch-to-workspace-5 = [ "" ]; - switch-to-workspace-6 = [ "" ]; - switch-to-workspace-7 = [ "" ]; - switch-to-workspace-8 = [ "" ]; - switch-to-workspace-9 = [ "" ]; - switch-to-workspace-down = [ ]; - switch-to-workspace-last = [ "<Super>End" ]; - switch-to-workspace-left = [ "<Super>Left" ]; - switch-to-workspace-right = [ "<Super>Right" ]; - switch-to-workspace-up = [ ]; - toggle-maximized = [ "<Super>Up" ]; - unmaximize = [ ]; - }; - - "org/gnome/settings-daemon/plugins/media-keys" = { - email = [ "<Super>e" ]; - home = [ "<Super>f" ]; - magnifier-zoom-in = [ "<Super>equal" ]; - magnifier-zoom-out = [ "<Super>minus" ]; - play = [ "F4" ]; - screenreader = [ ]; - screensaver = [ "<Super>l" ]; - terminal = [ ]; - volume-down = [ "AudioLowerVolume" ]; - volume-mute = [ "" ]; - volume-up = [ "AudioRaiseVolume" ]; - www = [ "<Super>w" ]; - custom-keybindings = [ - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/" - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/" - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/" - "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/" - ]; - }; - - "io/elementary/desktop/wm/keybindings" = { - area-screenshot = [ "Print" ]; - screenshot = [ "<Shift>Print" ]; - expose-windows = [ "" ]; - pip = [ "" ]; - }; - - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { - name = "Task Manager"; - binding = "<Primary><Alt>Return"; - command = "com.github.stsdc.monitor"; - }; - - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = { - name = "Terminal"; - binding = "<Super>t"; - command = "io.elementary.terminal"; - }; - - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = { - name = "Calculator"; - binding = "Calculator"; - command = "io.elementary.calculator"; - }; - - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3" = { - name = "Clipboard"; - binding = "<Super>v"; - command = "gtk-launch com.github.hezral.clips"; - }; - - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4" = { - name = "Emoji Picker"; - binding = "<Super>comma"; - command = "emote"; - }; - }; -} diff --git a/nixos/modules/gui/fonts.nix b/nixos/modules/gui/fonts.nix @@ -1,93 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -{ - options.gui.fonts.enable = lib.mkEnableOption "Enable Fonts Configuration"; - - ## Font Configuration ## - config = lib.mkIf config.gui.fonts.enable rec { - fonts = { - enableDefaultPackages = true; - fontDir.enable = true; - - ## Render Settings - fontconfig = { - enable = true; - - hinting = { - enable = true; - autohint = false; - style = "slight"; - }; - - subpixel = { - rgba = "rgb"; - lcdfilter = "default"; - }; - - # Emoji Support - defaultFonts = - let - emoji = [ stylix.fonts.emoji.name ]; - in - { - monospace = emoji; - sansSerif = emoji; - serif = emoji; - }; - }; - }; - - stylix.fonts = { - # Default Fonts - sansSerif = { - package = pkgs.adwaita-fonts; - name = "Adwaita Sans"; - }; - - serif = { - package = pkgs.eb-garamond; - name = "EB Garamond"; - }; - - monospace = { - package = pkgs.custom.fonts; - name = "Iosvmata"; - }; - - emoji = { - package = pkgs.twitter-color-emoji; - name = "Twitter Color Emoji"; - }; - - # Font Sizes - sizes = { - applications = 11; - desktop = 11; - popups = 10; - terminal = 12; - }; - }; - - # Font Packages - fonts.packages = with pkgs; [ - font-awesome - nerd-fonts.symbols-only - noto-fonts - symbola - - fira - fira-code - fira-mono - ibm-plex - roboto - roboto-mono - roboto-slab - source-code-pro - ubuntu-classic - ]; - }; -} diff --git a/nixos/modules/gui/gtk.nix b/nixos/modules/gui/gtk.nix @@ -1,80 +0,0 @@ -{ - config, - lib, - pkgs, - files, - ... -}: -let - inherit (lib) - mkEnableOption - mkIf - mkOption - types - ; - - cfg = config.gui.gtk; -in -{ - options.gui.gtk = { - enable = mkEnableOption "Enable GTK Configuration"; - theme = { - name = mkOption { - description = "GTK+ Application Theme"; - type = types.str; - }; - - package = mkOption { - description = "GTK+ Theme Package"; - type = types.package; - }; - }; - }; - - ## GTK Configuration ## - config = mkIf cfg.enable { - # Environment Setup - programs.dconf.enable = true; - services.dbus.packages = [ pkgs.dconf ]; - environment = { - systemPackages = [ cfg.theme.package ]; - variables."GTK_THEME" = cfg.theme.name; - }; - - # Desktop Integration - programs.gnupg.agent.pinentryPackage = pkgs.pinentry-gtk2; - - user.homeConfig = { - home = { - # Configuration - persist.directories = [ - ".config/dconf" - ".config/gtk-3.0" - ".config/gtk-4.0" - ]; - - # Bookmarks - file.".config/gtk-3.0/bookmarks" = { - text = files.bookmarks; - force = true; - }; - }; - - # Theming - stylix.targets.gtk.enable = false; - dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; - gtk = { - enable = true; - inherit (cfg) theme; - cursorTheme = config.gui.cursors; - font = with config.stylix.fonts; { - inherit (sansSerif) package name; - size = sizes.applications; - }; - - gtk3.extraConfig.gtk-application-prefer-dark-theme = 1; - gtk4.extraConfig.gtk-application-prefer-dark-theme = 1; - }; - }; - }; -} diff --git a/nixos/modules/gui/qt.nix b/nixos/modules/gui/qt.nix @@ -1,151 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - inherit (lib) - mkDefault - mkEnableOption - mkIf - mkMerge - mkOption - types - ; - - inherit (config.gui) qt icons; - inherit (config.stylix) fonts; -in -{ - options.gui.qt = { - enable = mkEnableOption "Enable QT Configuration"; - style = mkOption { - description = "QT Application Style"; - type = types.nullOr ( - types.enum [ - "gtk" - "kvantum" - "qtct" - ] - ); - default = null; - }; - - theme = { - name = mkOption { - description = "QT Application Theme"; - type = types.str; - }; - - package = mkOption { - description = "QT Theme Package"; - type = types.package; - }; - }; - }; - - ## QT Configuration ## - config = - with qt.theme; - mkIf qt.enable (mkMerge [ - { - stylix.targets.qt.enable = false; - qt = { - enable = true; - platformTheme = mkDefault "gtk2"; - }; - } - - (mkIf (qt.style == "gtk") { - qt = { - platformTheme = "gnome"; - style = "adwaita-dark"; - }; - }) - - (mkIf (qt.style == "kvantum") { - qt = { - platformTheme = "qt5ct"; - style = "kvantum"; - }; - - environment = { - systemPackages = [ package ]; - etc."xdg/Kvantum/kvantum.kvconfig".text = '' - [General] - Theme=${name} - ''; - }; - - user.homeConfig = { - qt = { - enable = true; - platformTheme.name = "qtct"; - style.name = "kvantum"; - }; - - xdg.configFile = { - "Kvantum/${name}".source = "${package}/share/Kvantum/${name}"; - "Kvantum/kvantum.kvconfig".text = '' - [General] - theme=${name} - ''; - }; - }; - }) - - (mkIf (qt.style == "qtct") ( - let - pkg = with pkgs; [ - darkly - darkly-qt5 - ]; - - conf = - version: - lib.generators.toINI { } { - Appearance = { - style = "Lightly"; - standard_dialogs = "default"; - icon_theme = icons.name; - custom_palette = true; - color_scheme_path = "${package}/share/${version}/colors/${name}.conf"; - }; - - Fonts = - let - size = fonts.sizes.applications; - in - { - fixed = "\"${fonts.monospace.name},${size},-1,5,50,0,0,0,0,0,Regular\""; - general = "\"${fonts.sansSerif.name},${size},-1,5,50,0,0,0,0,0,Regular\""; - }; - }; - in - { - qt.platformTheme = "qt5ct"; - environment = { - systemPackages = pkg; - etc = { - "xdg/qt5ct/qt5ct.conf" = conf "qt5ct"; - "xdg/qt6ct/qt6ct.conf" = conf "qt6ct"; - }; - }; - - user.homeConfig = { - qt = { - enable = true; - platformTheme.name = "qtct"; - style.package = pkg; - }; - - xdg.configFile = { - "qt5ct/qt5ct.conf" = conf "qt5ct"; - "qt6ct/qt6ct.conf" = conf "qt6ct"; - }; - }; - } - )) - ]); -} diff --git a/nixos/modules/gui/theme.nix b/nixos/modules/gui/theme.nix @@ -1,114 +0,0 @@ -{ - config, - lib, - inputs, - pkgs, - files, - ... -}: -let - inherit (lib) - attrNames - mkIf - mkOption - optionals - types - ; - - cfg = config.gui; - enable = cfg.desktop != "" && cfg.desktop != "install"; - exists = app: builtins.elem app config.apps.list; -in -{ - imports = [ inputs.stylix.nixosModules.stylix ]; - - options.gui = { - icons = { - name = mkOption { - description = "Application Icons Theme"; - type = types.str; - default = "Papirus-Dark"; - }; - - package = mkOption { - description = "Icons Package"; - type = types.package; - default = pkgs.papirus-icon-theme; - }; - }; - - cursors = { - name = mkOption { - description = "GUI Cursors Theme"; - type = types.str; - default = "Bibata-Original-Classic"; - }; - - package = mkOption { - description = "Cursors Package"; - type = types.package; - default = pkgs.bibata-cursors; - }; - - size = mkOption { - description = "Cursors Size"; - type = types.int; - default = 28; - }; - }; - - wallpaper = mkOption { - description = "Desktop Wallpaper Choice"; - type = types.enum (attrNames files.wallpapers); - default = "Beauty"; - apply = image: files.wallpapers."${image}"; - }; - }; - - ## Application Theming ## - config = rec { - environment.systemPackages = [ - stylix.cursor.package - ] - ++ optionals enable [ - cfg.icons.package - cfg.cursors.package - ]; - - stylix = { - inherit enable; - autoEnable = true; - image = cfg.wallpaper; - cursor = cfg.cursors; - polarity = "dark"; - opacity = { - popups = 0.9; - terminal = 0.9; - }; - - homeManagerIntegration.autoImport = true; - targets = { - console.enable = true; - plymouth.enable = false; - chromium.enable = false; - }; - }; - - home-manager.sharedModules = optionals (!enable) [ config.stylix.homeManagerIntegration.module ]; - user.homeConfig.stylix = { - inherit enable; - icons = { - enable = true; - inherit (cfg.icons) package; - light = cfg.icons.name; - dark = cfg.icons.name; - }; - - targets = { - firefox.enable = false; - spicetify.enable = mkIf (exists "spotify") true; - vscode.enable = mkIf (exists "vscode") false; - }; - }; - }; -} diff --git a/nixos/modules/hardware/README.md b/nixos/modules/hardware/README.md @@ -1,40 +0,0 @@ -### Boot - -To boot into a different build generation, hold down the Spacebar (for `efi`) or the `Shift`/`Esc` key (for `mbr`) upon startup to access the boot menu - -To access recovery settings, open the boot menu and select the `recovery` Specialisation - -#### Secure Boot - -Set `hardware.boot.loader` to `secure` to enable [Secure Boot](https://en.wikipedia.org/wiki/UEFI#Secure_Boot) - -The setup should occur automatically on first boot, consult the [docs](https://nix-community.github.io/lanzaboote/) in case of any issue - -> [!NOTE] -> Secure Boot is only supported in EFI Mode - -### File System - -The system may be set up using either a `simple` or `advanced` filesystem scheme. The advanced ZFS encrypted opt-in state filesystem configuration allows for a vastly improved experience, preventing formation of cruft and exerting total control over the device state, by erasing the system at every boot, keeping only what's required - -#### Data Storage - -All important persisted files are stored at `/data` (declared using either `hardware.fs.persist`, or `home.persist` for user files), while persisted system files are stored at `/nix/state` (declared using `environment.persist`). -Personal files and media are stored at `/data/files` - -### Virtualisation - -Configuration has been provided to run VMs using `qemu-kvm` and `libvirt`, along with support for VFIO PCI Passthrough. This can be used to create high-performance VMs, especially useful for virtualising Windows - -#### PCI Passthrough - -Use [`scripts/pci.sh`](../../scripts/pci.sh) in order to determine the PCI Device IDs which must be added to `hardware.vm.passthrough` - -#### Windows Virtualisation - -In order to create a highly performant Windows VM using the `virt-manager` GUI and [Virtio](https://wiki.libvirt.org/Virtio.html) drivers, follow the instructions given on [this](https://sysguides.com/install-a-windows-11-virtual-machine-on-kvm) page. To configure GPU passthrough, add the relevant GPU and audio IDs to `hardware.vm.passthrough` (See the [Arch Wiki](https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF) for additional information), and set `hardware.vm.vfio` to `"on"`. Confirm that the GPU is recognized within the Windows VM, and download the relevant drivers. In order to utilize full graphical bandwidth, one of the following must be done: - -1. Connect an external monitor to the GPU -2. Use a dummy monitor plug or fake a display using [`Virtual Display Driver`](https://github.com/itsmikethetech/Virtual-Display-Driver), then use [Looking Glass](https://looking-glass.io/) to extract video output onto the main monitor. The configuration for Looking Glass on the Linux (client) side is already implemented, and only the Windows (host) needs to be configured by following instructions on [this](https://looking-glass.io/docs/stable/install/) page (Follow the section titled 'IVSHMEM with shared memory') - -The `vfio` Specialisation can be selected in the boot menu to enable GPU passthrough when required (when `hardware.vm.vfio` is set to `"setup"`) diff --git a/nixos/modules/hardware/blockchain.nix b/nixos/modules/hardware/blockchain.nix @@ -1,26 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - enable = builtins.elem "blockchain" config.hardware.support; -in -{ - ## Blockchain Support ## - config = lib.mkIf enable { - virtualisation.docker.enable = true; - user.groups = [ "docker" ]; - environment = { - persist.directories = [ "/var/lib/docker" ]; - systemPackages = with pkgs; [ - custom.fabric-ca - hyperledger-fabric - - docker-compose - nodejs - ]; - }; - }; -} diff --git a/nixos/modules/hardware/boot.nix b/nixos/modules/hardware/boot.nix @@ -1,120 +0,0 @@ -{ - config, - options, - lib, - inputs, - pkgs, - ... -}: -let - inherit (lib) - mkDefault - mkForce - mkIf - mkMerge - mkOption - optional - types - ; - - loader = config.hardware.boot; -in -{ - imports = [ inputs.boot.nixosModules.lanzaboote ]; - - options.hardware.boot = mkOption { - description = "Supported Boot Firmware"; - type = types.nullOr ( - types.enum [ - "mbr" - "efi" - "secure" - ] - ); - default = "efi"; - }; - - ## Boot Configuration ## - config = { - warnings = optional (loader == null) (options.hardware.boot.description + " is unset"); - } - // mkIf (loader != null) (mkMerge [ - { - boot = { - tmp.cleanOnBoot = true; - - # Plymouth - consoleLogLevel = 3; - initrd.verbose = false; - plymouth.enable = true; - kernelParams = [ - "quiet" - "splash" - "boot.shell_on_fail" - "rd.systemd.show_status=false" - "rd.udev.log_level=3" - "udev.log_priority=3" - ]; - - # Boot Loader - loader = { - timeout = mkDefault 0; - efi.canTouchEfiVariables = true; - - grub.enable = mkDefault false; - systemd-boot.enable = mkDefault false; - }; - }; - - # Debug - specialisation.recovery.configuration = { - system.nixos.label = "special.recovery"; - boot = { - initrd.verbose = mkForce true; - plymouth.enable = mkForce false; - }; - }; - } - - ## GRUB MBR Boot Loader ## - (mkIf (loader == "mbr") { - boot.loader.grub = { - enable = mkForce true; - device = "nodev"; - efiSupport = true; - zfsSupport = true; - useOSProber = true; - splashImage = null; - extraConfig = "set timeout_style=hidden"; - }; - }) - - ## SYSTEMD EFI Boot Loader ## - (mkIf (loader == "efi") { - boot.loader.systemd-boot = { - enable = mkForce true; - editor = false; - configurationLimit = 15; - }; - }) - - ## EFI Secure Boot ## - (mkIf (loader == "secure") rec { - boot.lanzaboote = { - enable = true; - configurationLimit = 15; - pkiBundle = "/etc/secureboot"; - autoGenerateKeys.enable = true; - autoEnrollKeys = { - enable = true; - autoReboot = true; - }; - }; - - environment = { - systemPackages = [ pkgs.sbctl ]; - persist.directories = [ boot.lanzaboote.pkiBundle ]; - }; - }) - ]); -} diff --git a/nixos/modules/hardware/cpu.nix b/nixos/modules/hardware/cpu.nix @@ -1,47 +0,0 @@ -{ - config, - options, - lib, - ... -}: -let - inherit (lib) mkOption optional types; - cfg = config.hardware.cpu; - opt = options.hardware.cpu; -in -{ - ## CPU Configuration ## - options.hardware.cpu = { - model = mkOption { - description = "CPU Model"; - type = types.enum [ - "" - "amd" - "intel" - ]; - default = ""; - }; - - cores = mkOption { - description = "Number of CPU Cores"; - type = types.int; - default = 4; - }; - - mode = mkOption { - description = "CPU Frequency Governor Mode"; - type = types.enum [ - "ondemand" - "performance" - "powersave" - ]; - default = "performance"; - }; - }; - - config = { - warnings = optional (cfg.model == "") (opt.model.description + " is unset"); - powerManagement.cpuFreqGovernor = cfg.mode; - nix.settings.max-jobs = cfg.cores; - }; -} diff --git a/nixos/modules/hardware/default.nix b/nixos/modules/hardware/default.nix @@ -1,36 +0,0 @@ -{ - inputs, - lib, - util, - ... -}: -let - inherit (util.map) modules; - inherit (lib) mkForce mkOption types; -in -{ - ## HARDWARE Configuration ## - imports = modules.list ./.; - - options.hardware = with types; { - modules = mkOption { - description = "List of Modules imported from 'inputs.hardware'"; - type = listOf (enum (attrNames inputs.hardware.nixosModules)); - default = [ ]; - }; - - support = mkOption { - description = "List of Additional Supported Hardware"; - type = listOf (enum (modules.name ./.)); - default = [ ]; - }; - }; - - config = { - specialisation.powersave.configuration = { - system.nixos.label = "special.powersave"; - gui.fancy = mkForce false; - hardware.cpu.mode = mkForce "powersave"; - }; - }; -} diff --git a/nixos/modules/hardware/filesystem.nix b/nixos/modules/hardware/filesystem.nix @@ -1,262 +0,0 @@ -{ - config, - options, - lib, - inputs, - pkgs, - files, - ... -}: -let - inherit (builtins) listToAttrs map; - inherit (lib) - filterAttrs - getExe - hasPrefix - mkAliasOptionModule - mkDefault - mkIf - mkMerge - mkOption - nameValuePair - optional - types - ; - - inherit (config.hardware.fs) scheme; -in -{ - ## File System Configuration ## - imports = [ - inputs.impermanence.nixosModule - ] - ++ [ - (mkAliasOptionModule [ "environment" "persist" ] [ "environment" "persistence" files.path.persist ]) - (mkAliasOptionModule [ "hardware" "fs" "persist" ] [ "environment" "persistence" files.path.data ]) - ]; - - options.hardware.fs.scheme = mkOption { - description = "Disk Filesystem Scheme"; - type = - with types; - nullOr (enum [ - "simple" - "advanced" - ]); - default = null; - }; - - config = mkMerge [ - { - warnings = optional (scheme == null) (options.hardware.fs.scheme.description + " is unset"); - - ## Common Partitions - boot.supportedFilesystems = { - ntfs = true; - vfat = true; - zfs = true; - }; - } - - (mkIf (scheme != null) { - programs.fuse.userAllowOther = true; - - # EFI System Partition - fileSystems."/boot" = { - device = "/dev/disk/by-partlabel/ESP"; - fsType = "vfat"; - }; - - # SWAP Partition - swapDevices = [ { device = "/dev/disk/by-partlabel/swap"; } ]; - boot.kernel.sysctl."vm.swappiness" = 1; - - system.activationScripts.dotfiles = - with files.path; - let - path = if scheme == "advanced" then "${persist}/" else ""; - dir = "${path}${system}"; - in - '' - chown root:keys ${dir} - chmod 774 -R ${dir} - ''; - }) - - ## Simple File System Configuration using EXT4 ## - (mkIf (scheme == "simple") { - fileSystems = { - # ROOT Partition - "/" = { - device = "/dev/disk/by-partlabel/System"; - fsType = "ext4"; - }; - }; - }) - - ## Advanced File System Configuration using ZFS ## - { - environment.persist.enable = mkDefault false; - hardware.fs.persist.enable = mkDefault false; - user.homeConfig.imports = [ - (mkAliasOptionModule [ "home" "persist" ] [ "home" "persistence" files.path.data ]) - (_: { home.persist.enable = mkDefault false; }) - ]; - } - (mkIf (scheme == "advanced") ( - let - rollback = '' - zfs rollback -r fspool/system/root@blank && echo "Rollback Complete!" - ''; - in - { - fileSystems = { - # ROOT Partition - "/" = { - device = "fspool/system/root"; - fsType = "zfs"; - }; - - # NIX Partition - "/nix" = { - device = "fspool/system/nix"; - fsType = "zfs"; - }; - - # PERSISTENT Partition - "${files.path.data}" = { - device = "fspool/data"; - fsType = "zfs"; - neededForBoot = true; - }; - } - # Early Boot Requirements - // filterAttrs (name: _: hasPrefix "/etc" name) ( - listToAttrs ( - map ( - item: - nameValuePair item.directory { - device = "${files.path.persist}${item.directory}"; - fsType = "none"; - options = [ "bind" ]; - neededForBoot = true; - } - ) config.environment.persist.directories - ) - ); - - # Boot Settings - boot = { - resumeDevice = "/dev/disk/by-partlabel/swap"; - kernelParams = [ "elevator=none" ]; - zfs = { - allowHibernation = true; - forceImportRoot = false; - forceImportAll = false; - devNodes = "/dev/disk/by-partlabel/System"; - }; - - initrd.systemd = { - enable = true; - services.rollback = { - description = "Wipe ZFS partition for Opt-In State Configuration"; - wantedBy = [ "initrd.target" ]; - after = [ "zfs-import-fspool.service" ]; - before = [ "sysroot.mount" ]; - path = [ pkgs.zfs ]; - unitConfig.DefaultDependencies = "no"; - serviceConfig.Type = "oneshot"; - script = rollback; - }; - }; - }; - - # Maintainence - services.zfs = { - trim.enable = true; - autoScrub.enable = true; - autoSnapshot = { - enable = true; - hourly = 12; - daily = 7; - weekly = 3; - monthly = 1; - }; - }; - - # Persisted Files - hardware.fs.persist.enable = true; - environment.persistence."${files.path.persist}" = { - enable = true; - files = [ "/etc/machine-id" ]; - directories = [ - files.path.system - "/var/log" - "/var/lib/AccountsService" - "/var/lib/nixos" - "/var/lib/systemd/coredump" - ]; - }; - - user.homeConfig = { - home.persistence."${files.path.data}" = { - enable = true; - allowTrash = true; - hideMounts = true; - directories = [ - "Desktop" - "Documents" - "Downloads" - "Music" - "Pictures" - "Public" - "Videos" - { - directory = ".local/share/keyrings"; - mode = "0700"; - } - ]; - }; - - systemd.user.services.persist-trash = { - Unit.Description = "Persist Trash Folder"; - Install.WantedBy = [ "default.target" ]; - Service = - let - run = - script: - getExe ( - pkgs.writeShellApplication { - name = "script"; - runtimeInputs = [ pkgs.coreutils ]; - text = '' - LOCAL="$HOME/.local/share/Trash" - PERSIST="${files.path.data}/home/$USER/Trash" - mkdir -p "$LOCAL" - ${script} - ''; - } - ); - in - { - Type = "oneshot"; - RemainAfterExit = true; - StandardOutput = "journal"; - ExecStart = run '' - if [ -d "$PERSIST" ] - then - cp -r "$PERSIST"/. "$LOCAL" - rm -rf "$PERSIST" - fi - ''; - ExecStop = run '' - mkdir -p "$PERSIST" - cp -r "$LOCAL"/. "$PERSIST" - ''; - }; - }; - }; - } - )) - ]; -} diff --git a/nixos/modules/hardware/gpu.nix b/nixos/modules/hardware/gpu.nix @@ -1,109 +0,0 @@ -{ - config, - options, - lib, - pkgs, - ... -}: -let - inherit (lib) - mkForce - mkIf - mkEnableOption - mkMerge - mkOption - types - ; - - cfg = config.hardware.gpu; - opt = options.hardware.gpu; - mode = config.hardware.cpu.mode != "powersave"; - gamemode = config.programs.gamemode.enable; -in -{ - ## GPU Configuration ## - options.hardware.gpu = { - enable = mkEnableOption "Discrete GPU Support"; - model = mkOption { - description = "Discrete GPU Model"; - type = with types; nullOr (enum [ "nvidia" ]); - default = null; - }; - }; - - config = mkMerge [ - (mkIf cfg.enable { - assertions = [ - { - assertion = cfg.model != null; - message = opt.model.description + " must be set"; - } - ]; - }) - - (mkIf (cfg.enable && cfg.model == "nvidia") ( - let - hybrid = with config.hardware.nvidia.prime; (amdgpuBusId != "" || intelBusId != ""); - in - { - services.xserver.videoDrivers = mkForce [ "nvidia" ]; - environment = { - systemPackages = [ pkgs.btop-cuda ]; - variables = mkIf mode { - "__GLX_VENDOR_LIBRARY_NAME" = "nvidia"; - "LIBVA_DRIVER_NAME" = "nvidia"; - }; - sessionVariables = { - "GAMEMODERUNEXEC" = mkIf (hybrid && gamemode && !mode) "nvidia-offload"; - }; - }; - - boot = { - blacklistedKernelModules = [ "nouveau" ]; - kernelModules = [ - "nvidia" - "nvidia_drm" - "nvidia_modeset" - "nvidia_uvm" - ]; - - kernelParams = [ - # Wayland Support - "nvidia-drm.fbdev=1" - ]; - - extraModprobeConfig = '' - # PAT Support - options nvidia NVreg_UsePageAttributeTable=1 - - # DDC/CI Support - options nvidia NVreg_RegistryDwords=RMUseSwI2c=0x01;RMI2cSpeed=100 - ''; - }; - - hardware.nvidia = { - modesetting.enable = mkForce true; - nvidiaSettings = mkForce true; - dynamicBoost.enable = true; - powerManagement.enable = true; - prime = mkIf hybrid { - sync.enable = mkForce mode; - offload = { - enable = mkForce (!mode); - enableOffloadCmd = mkForce (!mode); - }; - }; - }; - } - )) - - (mkIf (!cfg.enable && cfg.model == "nvidia") { - boot.blacklistedKernelModules = [ - "nvidia" - "nvidia_drm" - "nvidia_modeset" - "nvidia_uvm" - ]; - }) - ]; -} diff --git a/nixos/modules/hardware/laptop.nix b/nixos/modules/hardware/laptop.nix @@ -1,63 +0,0 @@ -{ - config, - lib, - pkgs, - files, - ... -}: -let - enable = builtins.elem "laptop" config.hardware.support; -in -{ - ## Laptop Configuration ## - config = lib.mkIf enable { - services.logind.settings.Login = { - KillUserProcesses = true; - - # Power Button - HandlePowerKey = "poweroff"; - HandlePowerKeyLongPress = "reboot"; - - # Lid - HandleLidSwitch = "lock"; - HandleLidSwitchDocked = "ignore"; - }; - - # Audio - user.homeConfig.home.file.".config/autostart/audio-tweaks.desktop".text = '' - [Desktop Entry] - Type=Application - Name=audio-tweaks - Exec=${ - pkgs.writeShellApplication { - name = "audio"; - text = files.scripts.audio; - runtimeInputs = with pkgs; [ - glib - playerctl - ]; - } - }/bin/audio - ''; - - # Touchpad - services.libinput = { - enable = true; - touchpad = { - tapping = true; - tappingDragLock = true; - middleEmulation = true; - naturalScrolling = false; - disableWhileTyping = true; - scrollMethod = "twofinger"; - accelSpeed = "0.7"; - }; - }; - - # Battery - powerManagement = { - enable = true; - powertop.enable = true; - }; - }; -} diff --git a/nixos/modules/hardware/mobile.nix b/nixos/modules/hardware/mobile.nix @@ -1,25 +0,0 @@ -# ? # Run 'systemctl restart usbmuxd' if iOS doesn't work -{ - config, - lib, - pkgs, - ... -}: -let - enable = builtins.elem "mobile" config.hardware.support; -in -{ - ## Device Firmware ## - config = lib.mkIf enable { - # Android Compatibilty - user.groups = [ "adbusers" ]; - programs.adb.enable = true; - - # iOS Compatibility - services.usbmuxd.enable = true; - environment.systemPackages = with pkgs; [ - libimobiledevice - scrcpy - ]; - }; -} diff --git a/nixos/modules/hardware/printer.nix b/nixos/modules/hardware/printer.nix @@ -1,40 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - enable = builtins.elem "printer" config.hardware.support; -in -{ - ## Printer Firmware ## - config = lib.mkIf enable { - # Scanning - user.groups = [ - "lp" - "scanner" - ]; - hardware.sane.enable = true; - - # Printing - services.printing = { - enable = true; - drivers = with pkgs; [ - gutenprint - brlaser - cnijfilter2 - ]; - extraConf = '' - DefaultPaperSize A4 - ''; - }; - - # Network Print - services.avahi = { - enable = true; - nssmdns4 = true; - openFirewall = true; - }; - }; -} diff --git a/nixos/modules/hardware/virtualisation/android.nix b/nixos/modules/hardware/virtualisation/android.nix @@ -1,45 +0,0 @@ -# ? # Run 'waydroid init -s GAPPS -f' to install system image -{ - config, - options, - lib, - pkgs, - ... -}: -let - inherit (lib) mkEnableOption mkIf optional; -in -{ - options.hardware.vm.android.enable = mkEnableOption "Enable Android Virtualisation"; - - ## Android Virtualisation ## - config = mkIf config.hardware.vm.android.enable { - warnings = optional (config.boot.kernelPackages != options.boot.kernelPackages.default) '' - Android Virtualisation may not work - - Kernel may not have requisite 'binder' module - - Use the mainline/LTS kernel for assured support - ''; - - virtualisation.waydroid.enable = true; - environment.systemPackages = [ pkgs.wl-clipboard ]; - - # Environment Setup - users.groups.android = { - name = "android"; - gid = 1000; - }; - - user = { - groups = [ "android" ]; - homeConfig.home.persist.directories = [ ".local/share/waydroid" ]; - }; - - environment.persist.directories = [ - { - directory = "/var/lib/waydroid"; - group = "android"; - mode = "774"; - } - ]; - }; -} diff --git a/nixos/modules/hardware/virtualisation/default.nix b/nixos/modules/hardware/virtualisation/default.nix @@ -1,58 +0,0 @@ -# ? # Run 'virsh net-start default' to start virtual network service -{ - config, - lib, - util, - pkgs, - ... -}: -let - inherit (config.hardware.cpu) model; - enable = builtins.elem "virtualisation" config.hardware.support; -in -{ - imports = util.map.modules.list ./.; - - ## Virtualisation Settings ## - config = lib.mkIf enable { - # Environment Setup - environment.persist.directories = [ "/var/lib/libvirt" ]; - user = { - groups = [ - "kvm" - "libvirtd" - ]; - homeConfig.home.persist.directories = [ - ".config/libvirt" - ".local/share/libvirt" - ]; - }; - - security.virtualisation.flushL1DataCache = "cond"; - boot = { - kernelModules = [ "kvm-${model}" ]; - extraModprobeConfig = "options kvm_${model} nested=1"; - }; - - # VM Packages - programs.virt-manager.enable = true; - environment.systemPackages = [ pkgs.libguestfs ]; - - # VM Utilities - virtualisation = { - kvmgt.enable = true; - spiceUSBRedirection.enable = true; - libvirtd = { - enable = true; - onBoot = "ignore"; - onShutdown = "shutdown"; - qemu = { - package = pkgs.qemu_kvm; - runAsRoot = false; - swtpm.enable = true; - vhostUserPackages = [ pkgs.virtiofsd ]; - }; - }; - }; - }; -} diff --git a/nixos/modules/hardware/virtualisation/vfio.nix b/nixos/modules/hardware/virtualisation/vfio.nix @@ -1,128 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - inherit (builtins) concatStringsSep elem; - inherit (lib) - generators - mkForce - mkIf - mkMerge - mkOption - types - ; - - cfg = config.hardware.vm; - inherit (config.hardware.cpu) model; - enable = elem "virtualisation" config.hardware.support; -in -{ - options.hardware.vm = { - vfio = mkOption { - description = "Configure VFIO PCI passthrough"; - type = types.enum [ - "on" - "off" - "setup" - ]; - default = "off"; - }; - - passthrough = mkOption { - description = "PCI Device IDs for VFIO"; - type = types.listOf types.str; - default = [ ]; - example = [ - "10de:28e0" # Graphics - "10de:22be" # Audio - ]; - }; - }; - - ## VFIO Configuration ## - config = mkIf (enable && cfg.vfio != "") (mkMerge [ - { - specialisation.vfio.configuration = { - system.nixos.label = "special.vfio"; - hardware = { - vm.vfio = mkForce "on"; - cpu.mode = mkForce "performance"; - }; - }; - } - - (mkIf (cfg.vfio == "on") { - specialisation.no-vfio.configuration = { - system.nixos.label = "special.no-vfio"; - hardware.vm.vfio = mkForce "setup"; - }; - - # Disable GPU - hardware.gpu.enable = mkForce false; - - boot = { - kernelParams = [ - "iommu=pt" - "${model}_iommu=on" - "kvm.ignore_msrs=1" - "kvm.report_ignored_msrs=0" - ("vfio-pci.ids=" + concatStringsSep "," cfg.passthrough) - ]; - - initrd.kernelModules = [ - "vfio" - "vfio_pci" - "vfio_iommu_type1" - ]; - }; - - # Looking Glass - user.groups = [ "qemu-libvirtd" ]; - systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 root qemu-libvirtd -" ]; - environment = { - systemPackages = [ pkgs.looking-glass-client ]; - etc."looking-glass-client.ini".text = generators.toINI { } { - app.renderer = "egl"; - win = { - title = "Virtual Machine"; - autoResize = "yes"; - borderless = "no"; - dontUpscale = "yes"; - fullScreen = "no"; - keepAspect = "yes"; - maximize = "no"; - noScreensaver = "yes"; - quickSplash = "yes"; - uiSize = 16; - }; - - egl = { - scale = 2; - multisample = "yes"; - vsync = "yes"; - }; - - input = { - autoCapture = "yes"; - grabKeyboardOnFocus = "yes"; - rawMouse = "yes"; - releaseKeysOnFocusLoss = "yes"; - }; - - spice = { - enable = "yes"; - clipboard = "yes"; - }; - - wayland = { - warpSupport = "yes"; - fractionScale = "no"; - }; - }; - }; - }) - ]); -} diff --git a/nixos/modules/nix/config.nix b/nixos/modules/nix/config.nix @@ -1,7 +0,0 @@ -{ - allowAliases = true; - allowBroken = false; - allowUnfree = true; - allowInsecurePredicate = _: true; - pulseAudio = true; -} diff --git a/nixos/modules/nix/default.nix b/nixos/modules/nix/default.nix @@ -1,51 +0,0 @@ -{ pkgs, ... }: -{ - ## NIX Configuration ## - imports = [ - ./index.nix - ./registry.nix - ./tools.nix - ]; - - config = { - # Settings - user.homeConfig.home.persist.directories = [ ".cache/nix" ]; - nix = { - # Version - package = pkgs.nixFlakes; - - # Garbage Collection - settings.auto-optimise-store = true; - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; - }; - - settings = { - sandbox = true; - - # User Permissions - allowed-users = [ - "root" - "@wheel" - ]; - trusted-users = [ - "root" - "@wheel" - ]; - - # Binary Cache - inherit ((import ../../flake.nix).nixConfig) trusted-substituters trusted-public-keys; - }; - - extraOptions = '' - accept-flake-config = true - warn-dirty = false - experimental-features = nix-command flakes recursive-nix - min-free = ${builtins.toString (1024 * 1024 * 1024)} - max-free = ${builtins.toString (10 * 1024 * 1024 * 1024)} - ''; - }; - }; -} diff --git a/nixos/modules/nix/index.nix b/nixos/modules/nix/index.nix @@ -1,20 +0,0 @@ -{ - config, - lib, - inputs, - ... -}: -{ - options.nix.index = lib.mkEnableOption "Enable Package Indexer"; - - ## Package Indexer ## - config = lib.mkIf config.nix.index { - user.homeConfig = { - imports = [ inputs.index.homeModules.nix-index ]; - programs = { - nix-index.enable = true; - nix-index-database.comma.enable = true; - }; - }; - }; -} diff --git a/nixos/modules/nix/registry.nix b/nixos/modules/nix/registry.nix @@ -1,28 +0,0 @@ -{ - lib, - inputs, - ... -}: -{ - ## Nix Registry ## - config = { - nixpkgs.flake = { - setNixPath = false; - setFlakeRegistry = false; - }; - - nix = { - nixPath = [ "/etc/nix/inputs" ]; - registry = builtins.mapAttrs (_: value: { flake = value; }) ( - lib.filterAttrs (_: value: value ? outputs) inputs - ); - }; - - environment.etc = lib.mapAttrs' (name: value: { - name = "nix/inputs/${name}"; - value = { - source = value.outPath; - }; - }) inputs; - }; -} diff --git a/nixos/modules/nix/tools.nix b/nixos/modules/nix/tools.nix @@ -1,30 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -{ - options.nix.tools = lib.mkEnableOption "Enable Additional Nix Tools"; - - ## Nix Tools ## - config = lib.mkIf config.nix.tools { - user.homeConfig.home.persist.directories = [ ".cache/manix" ]; - nix.settings.system-features = [ - "kvm" - "big-parallel" - "recursive-nix" - ]; - - environment.systemPackages = with pkgs; [ - cachix - dix - manix - nixfmt - nix-output-monitor - nodePackages.prettier - shellcheck - statix - ]; - }; -} diff --git a/nixos/modules/secrets.nix b/nixos/modules/secrets.nix @@ -1 +0,0 @@ -(import ../secrets) diff --git a/nixos/modules/shell/default.nix b/nixos/modules/shell/default.nix @@ -1,177 +0,0 @@ -{ - config, - lib, - util, - pkgs, - files, - ... -}: -let - inherit (util.map) modules; - inherit (lib) - mkEnableOption - mkIf - mkMerge - ; -in -{ - ## SHELL Configuration ## - imports = modules.list ./. ++ modules.list ./list; - - options.shell.utilities = mkEnableOption "Enable Additional Shell Utilities"; - - config = mkMerge [ - { - # Text Editor - environment.variables."EDITOR" = "nano"; - programs = { - nano = { - enable = true; - syntaxHighlight = true; - nanorc = files.nano; - }; - - # Terminal Multiplexer - tmux = { - enable = true; - keyMode = "emacs"; - shortcut = "Space"; - aggressiveResize = true; - baseIndex = 1; - clock24 = true; - escapeTime = 0; - historyLimit = 50000; - terminal = "tmux-256color"; - extraConfig = files.tmux; - }; - }; - } - - (mkIf config.shell.utilities { - environment = with files; { - # Utilities - systemPackages = with pkgs; [ - bat - btop - eza - fastfetch - fd - hstr - lolcat - micro - tree - yazi - ]; - - # Fetch - etc."fastfetch/config.jsonc".text = fetch; - - # Command Aliases - shellAliases = { - hi = "echo 'Hi there. How are you?'"; - bye = "exit"; - dotfiles = "cd ${path.system}"; - - # Programs - c = "bat"; - l = "eza -b -h -l -F --octal-permissions --time-style iso"; - grep = "grep --color"; - colors = "${scripts.colors}"; - sike = "fastfetch"; - }; - }; - - ## Program Configuration - services.lorri.enable = true; # Faster 'nix shell' - programs = { - yazi.enable = true; # File Browser - - # Command Correction Helper - pay-respects = { - enable = true; - alias = "fix"; # Use 'fix' to correct previous command - }; - - # DirENV Support - direnv = { - enable = true; # Load Shell Variables from '.envrc' - nix-direnv.enable = true; - }; - - # Bat Configuration - bat = { - enable = true; - settings = { - style = "full"; - italic-text = "always"; - }; - }; - - # Terminal Multiplexer - tmux = with config.lib.stylix.colors; { - plugins = with pkgs.tmuxPlugins; [ - open - yank - minimal-tmux-status - ]; - - extraConfigBeforePlugins = '' - set -g @minimal-tmux-bg "#${base02}" - set -g @minimal-tmux-fg "#${base05}" - set -g @minimal-tmux-use-arrow true - set -g @minimal-tmux-right-arrow "" - set -g @minimal-tmux-left-arrow "" - ''; - }; - }; - - user.homeConfig = { - home.persist = { - files = [ ".hstr_favorites" ]; - directories = [ - ".config/micro" - ".local/share/direnv" - ]; - }; - - programs = { - btop.enable = true; # Resource Monitor - hstr.enable = true; # Command History Browser - - # File Lister - eza = { - enable = true; - colors = "auto"; - icons = "auto"; - git = true; - extraOptions = [ "--group-directories-first" ]; - }; - - # Text Editor - micro = { - enable = true; - settings = { - autoindent = true; - backup = true; - clipboard = "external"; - cursorline = true; - eofnewline = false; - helpsplit = "vsplit"; - hltrailingws = true; - infobar = true; - matchbrace = true; - keymenu = true; - mouse = true; - reload = "prompt"; - ruler = true; - saveundo = true; - smartpaste = true; - statusline = true; - syntax = true; - }; - }; - }; - }; - }) - ]; -} diff --git a/nixos/modules/shell/list/bash.nix b/nixos/modules/shell/list/bash.nix @@ -1,42 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - inherit (builtins) any attrValues elem; - enable = any (value: elem "bash" value.shells) (attrValues config.user.settings); -in -{ - ## Bourne Shell Configuration ## - config = lib.mkIf enable { - # Shell Environment - environment.shells = [ pkgs.bashInteractive ]; - user.homeConfig.home.persist = { - files = [ ".bash_history" ]; - directories = [ ".local/share/bash" ]; - }; - - programs.bash = { - vteIntegration = true; - promptInit = '' - # Options - shopt -s autocd - shopt -s cdspell - shopt -s checkjobs - shopt -s checkwinsize - shopt -s cmdhist - shopt -s extglob - shopt -s globstar - shopt -s histappend - - # Command History - HISTCONTROL=erasedups:ignoredups:ignorespace - HISTFILESIZE=100000 - HISTIGNORE=rm:killall - HISTSIZE=100000 - ''; - }; - }; -} diff --git a/nixos/modules/shell/list/zsh.nix b/nixos/modules/shell/list/zsh.nix @@ -1,58 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - inherit (builtins) any attrValues elem; - enable = any (value: elem "zsh" value.shells) (attrValues config.user.settings); -in -{ - ## Z Shell Configuration ## - config = lib.mkIf enable { - # Shell Environment - programs.zsh = { - enable = true; - - # Features - autosuggestions.enable = true; - enableCompletion = false; - syntaxHighlighting.enable = true; - vteIntegration = true; - setOptions = [ - "autocd" - "EXTENDED_HISTORY" - "HIST_EXPIRE_DUPS_FIRST" - ]; - - # Keybindings - promptInit = '' - bindkey '^[[1;5C' forward-word - bindkey '^[[1;5D' backward-word - bindkey '^[[3;5~' kill-word - bindkey '^[[3~' delete-char - bindkey "^[[5~" beginning-of-history - bindkey "^[[6~" end-of-history - bindkey '^[[A' up-line-or-search - bindkey '^[[B' down-line-or-search - bindkey '^[[C' forward-char - bindkey '^[[D' backward-char - bindkey '^[[F' end-of-linegestures - bindkey '^[[H' beginning-of-line - bindkey '^J' backward-kill-line - ''; - - # Plugins - interactiveShellInit = '' - source ${pkgs.zsh-autopair}/share/zsh/zsh-autopair/autopair.zsh - ''; - }; - - system.userActivationScripts.zshrc = "touch .zshrc"; - user.homeConfig.home.persist = { - files = [ ".zsh_history" ]; - directories = [ ".cache/zsh" ]; - }; - }; -} diff --git a/nixos/modules/shell/prompt.nix b/nixos/modules/shell/prompt.nix @@ -1,198 +0,0 @@ -{ - config, - lib, - ... -}: -{ - ## Shell Prompt Configuration ## - options.shell.prompt = lib.mkEnableOption "Enable Fancy Shell Prompt"; - - config = lib.mkIf config.shell.prompt { - programs.starship = - let - open = ""; - close = ""; - char = "⮞"; - - build = - a: b: c: - build' { - icon = a; - var = b; - color = c; - }; - - build' = - { - icon, - var, - color, - style ? "fg:white", - end ? "[${close}](fg:base03)", - ... - }: - "[─](fg:base04)[${open}](fg:${color})[${icon}](fg:base01 bg:${color})[${close}](fg:${color} bg:base03)[ ${var}](${style} bg:base03)${end}"; - in - { - enable = true; - settings = { - add_newline = true; - continuation_prompt = "${char} "; - format = "[╭](fg:base04)$os$directory$git_branch$git_status$fill$c$python$java$nodejs$dotnet$status$cmd_duration$shell$username$hostname$time$line_break$character"; - character = { - format = "[╰─$symbol](fg:base04) "; - success_symbol = "[${char}](fg:bold white)"; - error_symbol = "[${char}](fg:bold red)"; - }; - - os = { - disabled = false; - format = "(fg:base04)[${open}](fg:white)[$symbol](fg:base01 bg:white)[${close}](fg:white)"; - symbols = { - Android = ""; - Arch = ""; - Fedora = ""; - Linux = ""; - Macos = ""; - NixOS = ""; - Ubuntu = ""; - Windows = ""; - Unknown = ""; - }; - }; - - directory = { - disabled = false; - format = build "󰉋" "$read_only$truncation_symbol$path" "blue"; - home_symbol = "~"; - truncation_symbol = "…/"; - truncation_length = 4; - truncate_to_repo = false; - read_only = ""; - }; - - git_branch = { - disabled = false; - format = build' { - icon = ""; - var = "$branch"; - color = "green"; - end = ""; - }; - }; - - git_status = { - disabled = false; - format = "[$ahead_behind$all_status](fg:green bg:base03)[${close}](fg:base03)"; - ahead = " ⇡$count"; - behind = " ⇣$count"; - diverged = " ⇡$ahead_count ⇣$behind_count"; - conflicted = " =$count"; - deleted = " ×$count"; - modified = " !$count"; - renamed = " »$count"; - staged = " +$count"; - stashed = " *$count"; - untracked = " ?$count"; - up_to_date = ""; - }; - - c.format = build " C" "$version" "bright-white"; - python.format = build " Python" "$version" "bright-white"; - java.format = build " Java" "$version" "bright-white"; - nodejs.format = build "󰎙 Node.js" "$version" "bright-white"; - dotnet.format = build "󰪮 .NET" "$version" "bright-white"; - - fill = { - symbol = "─"; - style = "fg:base04"; - }; - - status = { - disabled = false; - format = build "" "$status" "red"; - }; - - cmd_duration = { - min_time = 500; - format = build "󰦖" "$duration" "orange"; - }; - - shell = { - disabled = false; - format = build "" "$indicator" "purple"; - bash_indicator = "bash"; - fish_indicator = "fish"; - zsh_indicator = "zsh"; - unknown_indicator = "shell"; - }; - - username = { - show_always = true; - style_user = "fg:white"; - style_root = "bold fg:red"; - format = build' { - icon = ""; - var = "$user"; - color = "yellow"; - style = "$style"; - }; - }; - - hostname = { - disabled = false; - format = build "" "$hostname" "cyan"; - ssh_only = false; - }; - - time = { - disabled = false; - format = build "" "$time" "blue"; - time_format = "%H:%M"; - }; - - palette = "base16"; - palettes.base16 = with config.lib.stylix.colors.withHashtag; { - black = base00; - bright-black = base03; - white = base05; - bright-white = base07; - purple = magenta; - bright-purple = bright-magenta; - inherit - blue - brown - cyan - green - magenta - orange - red - yellow - bright-blue - bright-cyan - bright-green - bright-magenta - bright-red - bright-yellow - base00 - base01 - base02 - base03 - base04 - base05 - base06 - base07 - base08 - base09 - base0A - base0B - base0C - base0D - base0E - base0F - ; - }; - }; - }; - }; -} diff --git a/nixos/modules/user/default.nix b/nixos/modules/user/default.nix @@ -1,184 +0,0 @@ -{ - config, - lib, - util, - inputs, - files, - ... -}: -let - inherit (builtins) - all - attrNames - attrValues - mapAttrs - pathExists - ; - - inherit (lib) - filterAttrs - findFirst - findSingle - getValues - mkIf - mkEnableOption - mkOption - mkOptionType - optionals - types - ; - - inherit (util.map) modules; - inherit (config.user) groups homeConfig settings; - - # Merged Sets Type - mergedAttrs = mkOptionType { - name = "mergedAttrs"; - merge = _: getValues; - }; -in -{ - ## USER Configuration ## - imports = [ - inputs.home.nixosModules.home-manager - ./home.nix - ./security.nix - ]; - - options = { - # Global Home Manager Configuration - home-manager.users = mkOption { - type = types.attrsOf ( - types.submoduleWith { - modules = - if (all (value: value.minimal) (attrValues settings)) then - [ { home.stateVersion = config.system.stateVersion; } ] - else - homeConfig; - } - ); - }; - - # Configuration Options - user = { - homeConfig = mkOption { - description = "Shared User Home Configuration"; - type = mergedAttrs; - default = { }; - }; - - groups = mkOption { - description = "Additional User Groups"; - type = types.listOf types.str; - default = [ ]; - }; - - settings = mkOption { - description = "User Settings"; - default = { }; - type = - with types; - attrsOf ( - submodule ( - { - options, - config, - ... - }: - { - freeformType = attrsOf anything; - options = { - forwarded = mkOption { }; - autologin = mkEnableOption "Enable Automatic User Login"; - minimal = mkEnableOption "Enable Minimal User Configuration"; - extraGroups = mkOption { - apply = group: group ++ optionals config.isNormalUser groups; - }; - shells = mkOption { - description = "List of Additional Supported Shells"; - type = listOf (enum (modules.name ../shell/list)); - default = [ "bash" ]; - }; - homeConfig = mkOption { - description = "User Specific Home Configuration"; - type = mergedAttrs; - default = { }; - }; - }; - - config = { - isNormalUser = true; - group = "users"; - useDefaultShell = false; - homeConfig = - let - path = ../../. + "/users/${config.name}"; - in - if (pathExists (path + "/default.nix")) then - { - imports = [ path ]; - } - else if (pathExists (path + ".nix")) then - { - imports = [ (path + ".nix") ]; - } - else - { }; - - forwarded = filterAttrs (name: _: !(options ? "${name}") || name == "extraGroups") config; - }; - } - ) - ); - }; - }; - }; - - config = { - # Settings - users = { - mutableUsers = false; - users = mapAttrs (_: name: name.forwarded) settings; - extraUsers.root = { - isNormalUser = false; - extraGroups = [ "wheel" ]; - }; - }; - - # Login - services.displayManager.autoLogin = - let - find = findSingle (value: value.autologin || value.minimal) "0" "1" (attrValues settings); - in - rec { - enable = - if (find == "0") then - false - else if (config.services.displayManager.defaultSession == null) then - throw "Graphical Environment must be present for Automatic Log-In" - else if (find == "1") then - throw "Only one User can be Automatically Logged-In" - else - true; - - user = mkIf enable ( - findFirst (name: with settings."${name}"; autologin || minimal) "nixos" (attrNames settings) - ); - }; - - # Home Management - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - backupFileExtension = "bak"; - users = mapAttrs (_: value: { imports = value.homeConfig; }) settings; - extraSpecialArgs = { - inherit util inputs files; - sys = config; - }; - }; - - # Debug - specialisation.recovery.configuration.home-manager.verbose = true; - }; -} diff --git a/nixos/modules/user/home.nix b/nixos/modules/user/home.nix @@ -1,38 +0,0 @@ -{ config, ... }: -{ - ## User Home Configuration ## - config = { - # Environment Settings - environment.sessionVariables = { - "XDG_CACHE_HOME" = "$HOME/.cache"; - "XDG_CONFIG_HOME" = "$HOME/.config"; - "XDG_DATA_HOME" = "$HOME/.local/share"; - "XDG_BIN_HOME" = "$HOME/.local/bin"; - }; - - user.homeConfig = { - imports = [ - ../../users - ./mutable.nix - ]; - - # Update News - news.display = "show"; - - # User Services - systemd.user = { - enable = true; - startServices = true; - }; - - # Package Configuration - home = { - inherit (config.system) stateVersion; - file = { - ".config/nixpkgs/config.nix".source = ../nix/config.nix; - ".config/nix/nix.conf".source = config.environment.etc."nix/nix.conf".source; - }; - }; - }; - }; -} diff --git a/nixos/modules/user/mutable.nix b/nixos/modules/user/mutable.nix @@ -1,102 +0,0 @@ -# https://gist.github.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa -{ config, lib, ... }: -let - inherit (builtins) - attrValues - concatLists - filter - foldl' - map - ; - - inherit (lib) - assertMsg - concatLines - escapeShellArg - getAttrFromPath - hm - mkOption - recursiveUpdate - setAttrByPath - types - ; - - fileOptionAttrPaths = [ - [ - "home" - "file" - ] - [ - "xdg" - "configFile" - ] - [ - "xdg" - "dataFile" - ] - ]; -in -{ - options = - let - mergeAttrsList = foldl' recursiveUpdate { }; - fileAttrsType = types.attrsOf ( - types.submodule (_: { - options.mutable = mkOption { - type = types.bool; - default = false; - description = '' - Whether to copy the file without the read-only attribute instead of - symlinking. If you set this to `true`, you must also set `force` to - `true`. Mutable files are not removed when you remove them from your - configuration. - This option is useful for programs that don't have a very good - support for read-only configurations. - ''; - }; - }) - ); - in - mergeAttrsList ( - map ( - attrPath: - setAttrByPath attrPath (mkOption { - type = fileAttrsType; - }) - ) fileOptionAttrPaths - ); - - config = { - home.activation.mutableFileGeneration = - let - allFiles = concatLists ( - map (attrPath: attrValues (getAttrFromPath attrPath config)) fileOptionAttrPaths - ); - - filterMutableFiles = filter ( - file: - (file.mutable or false) - && assertMsg file.force "if you specify `mutable` to `true` on a file, you must also set `force` to `true`" - ); - - mutableFiles = filterMutableFiles allFiles; - - toCommand = - file: - let - source = escapeShellArg file.source; - target = escapeShellArg file.target; - in - '' - $VERBOSE_ECHO "${source} -> ${target}" - $DRY_RUN_CMD cp --remove-destination --no-preserve=mode ${source} ${target} - ''; - - command = '' - echo "Copying mutable home files for $HOME" - '' - + concatLines (map toCommand mutableFiles); - in - hm.dag.entryAfter [ "linkGeneration" ] command; - }; -} diff --git a/nixos/modules/user/security.nix b/nixos/modules/user/security.nix @@ -1,94 +0,0 @@ -{ - config, - lib, - util, - files, - ... -}: -let - inherit (lib) - filterAttrs - mkAfter - mkDefault - mkForce - mkIf - ; - - inherit (builtins) - all - attrNames - attrValues - hasAttr - mapAttrs - readFile - ; - - inherit (config.sops) secrets; - inherit (config.user) settings; - enable = all (value: value.minimal) (attrValues settings); - directory = ../../users/passwords; -in -{ - ## Security Settings ## - config = { - # Passwords - services.openssh.enable = mkIf enable (mkForce false); - sops.secrets = - if enable then - (mkForce { }) - else - util.map.secrets { - inherit directory; - neededForUsers = true; - }; - - users = { - users = mapAttrs (name: value: { - hashedPasswordFile = mkIf (!value.minimal) secrets."${name}.secret".path; - }) settings; - extraUsers.root.hashedPasswordFile = - mkIf (hasAttr "root.secret" secrets) - secrets."root.secret".path; - }; - - # Authentication - security.sudo = { - execWheelOnly = true; - extraConfig = '' - Defaults pwfeedback - Defaults lecture = always, lecture_file = ${files.ascii.groot} - ''; - - # Passwordless Access - extraRules = [ - { - users = attrNames (filterAttrs (_: value: value.minimal) settings); - commands = [ - { - command = "ALL"; - options = [ - "NOPASSWD" - "SETENV" - ]; - } - ]; - } - ]; - }; - - # Recovery Account - specialisation.recovery.configuration = mkIf (!(all (value: value.minimal) (attrValues settings))) { - security.sudo.extraConfig = mkAfter "recovery ALL=(ALL:ALL) NOPASSWD:ALL"; - users.extraUsers.recovery = { - name = "recovery"; - description = "Recovery Account"; - isNormalUser = true; - uid = 1100; - group = "users"; - extraGroups = [ "wheel" ]; - useDefaultShell = true; - initialHashedPassword = mkDefault (readFile (directory + "/default")); - }; - }; - }; -} diff --git a/nixos/packages/README.md b/nixos/packages/README.md @@ -1,20 +0,0 @@ -### Packages - -The `packages` directory contains custom-built packages (can be accessed by `github:maydayv7/dotfiles#packages.${system}`). Packages which have a separate `metadata.nix` can be automatically updated using `sh update.sh` - -The `overlays` directory contains overrides for pre-built packages (See [this](https://wiki.nixos.org/wiki/Overlays) for more information) - -It is advisable to use Flake `inputs` as package sources. To pin it to a specific commit/revision add `?rev=` after the `url`. Else you may also specify the source using `fetch` functions -In case you don't know the hash for the source, set: - -``` -hash = lib.fakeHash; -sha256 = lib.fakeSha256; -``` - -Then Nix will fail the build with an `error` message and give the correct hash -Otherwise run <code>nix hash convert --hash-algo sha256 $(nix-prefetch-url <b>url</b>)</code> to obtain the hash - -### Patches - -The `nixpkgs` package channel can be patched by simply dropping a valid `.patch` file into the `patches` directory diff --git a/nixos/packages/copyous.nix b/nixos/packages/copyous.nix @@ -1,51 +0,0 @@ -{ - lib, - pkgs, - ... -}: -with pkgs; -stdenv.mkDerivation rec { - pname = "gnome-shell-extension-copyous"; - version = "1.2.0"; - - src = fetchzip { - url = "https://github.com/boerdereinar/copyous/releases/download/v${version}/copyous@boerdereinar.dev.zip"; - hash = "sha256-3yE0+F/E1/qrGGO6loaMoCzf5gtT1j964/HdytU0ePM="; - stripRoot = false; - }; - - nativeBuildInputs = [ glib ]; - - buildPhase = '' - runHook preBuild - glib-compile-schemas --strict schemas - runHook postBuild - ''; - - preInstall = '' - sed -i "1i import GIRepository from 'gi://GIRepository';\nGIRepository.Repository.dup_default().prepend_search_path('${libgda6}/lib/girepository-1.0');\nGIRepository.Repository.dup_default().prepend_search_path('${gsound}/lib/girepository-1.0');\n" lib/preferences/dependencies/dependencies.js - sed -i "1i import GIRepository from 'gi://GIRepository';\nGIRepository.Repository.dup_default().prepend_search_path('${libgda6}/lib/girepository-1.0');\n" lib/misc/db.js - sed -i "1i import GIRepository from 'gi://GIRepository';\nGIRepository.Repository.dup_default().prepend_search_path('${gsound}/lib/girepository-1.0');\n" lib/common/sound.js - sed -i "1i import GIRepository from 'gi://GIRepository';\nGIRepository.Repository.dup_default().prepend_search_path('${gsound}/lib/girepository-1.0');\n" lib/preferences/general/feedbackSettings.js - ''; - - installPhase = '' - runHook preInstall - mkdir -p $out/share/gnome-shell/extensions - cp -r -T . $out/share/gnome-shell/extensions/copyous@boerdereinar.dev - runHook postInstall - ''; - - passthru = { - extensionPortalSlug = "copyous"; - extensionUuid = "copyous@boerdereinar.dev"; - }; - - meta = with lib; { - description = "Modern Clipboard Manager for GNOME"; - homepage = "https://github.com/boerdereinar/copyous"; - license = licenses.gpl3Plus; - maintainers = [ "maydayv7" ]; - platforms = platforms.linux; - }; -} diff --git a/nixos/packages/default.nix b/nixos/packages/default.nix @@ -1,2 +0,0 @@ -# Package Channel -with builtins; (getFlake "git+file://${toString ../.}").legacyPackages."${currentSystem}" diff --git a/nixos/packages/fabric-ca.nix b/nixos/packages/fabric-ca.nix @@ -1,36 +0,0 @@ -{ - lib, - pkgs, - ... -}: -with pkgs; -buildGoModule rec { - pname = "fabric-ca"; - version = "1.5.15"; - - src = fetchFromGitHub { - owner = "hyperledger"; - repo = "fabric-ca"; - rev = "v${version}"; - hash = "sha256-kJGeA30hoRk98/io/O5lorw96bpiGpheSaHrHVqqO+s="; - }; - - vendorHash = null; - postPatch = "rm cmd/fabric-ca-server/main_test.go"; - ldflags = [ - "-s" - "-w" - ]; - - subPackages = [ - "cmd/fabric-ca-client" - "cmd/fabric-ca-server" - ]; - - meta = with lib; { - description = "Certificate Authority for Hyperledger Fabric"; - homepage = "https://wiki.hyperledger.org/display/fabric"; - license = licenses.asl20; - maintainers = [ "maydayv7" ]; - }; -} diff --git a/nixos/packages/firefox-elementary/default.nix b/nixos/packages/firefox-elementary/default.nix @@ -1,29 +0,0 @@ -{ - lib, - pkgs, - ... -}: -with pkgs; -let - metadata = import ./metadata.nix; -in -stdenv.mkDerivation rec { - pname = "elementaryos-firefox-theme"; - version = metadata.rev; - - src = fetchFromGitHub { - owner = "Zonnev"; - repo = pname; - inherit (metadata) rev sha256; - }; - - dontBuild = true; - installPhase = "mkdir -p $out/ && cp -r . $out/"; - - meta = with lib; { - description = "An Elementary OS Theme for Firefox"; - homepage = metadata.repo; - license = licenses.mpl20; - maintainers = [ "maydayv7" ]; - }; -} diff --git a/nixos/packages/firefox-elementary/metadata.nix b/nixos/packages/firefox-elementary/metadata.nix @@ -1,6 +0,0 @@ -{ - repo = "https://github.com/Zonnev/elementaryos-firefox-theme"; - branch = "elementaryos-firefox-theme"; - rev = "8d62c4aa5f08cebd572f3ab83eafa5d728c87c34"; - sha256 = "sha256-braUKEeWxSuoiFHGFEMcWIK8x2/RMLuY62iM9tQO60I="; -} diff --git a/nixos/packages/flake.nix b/nixos/packages/flake.nix @@ -1,110 +0,0 @@ -{ - self, - util, - inputs, - ... -}: -let - inherit (util) map; - inherit (builtins) any attrValues isPath; -in -{ - ## Packages Configuration ## - perSystem = - { - self', - system, - lib, - inputs', - pkgs, - ... - }: - rec { - # Package Channel - _module.args.pkgs = legacyPackages; - legacyPackages = - with inputs; - let - # Package Configuration - config = import ../modules/nix/config.nix; - in - import (self.patchedPkgs system) { - inherit system config; - - # Package Overrides - overlays = (attrValues self.overlays or { }) ++ [ - (_: _: { - custom = self.packages."${system}"; - stagit-fork = stagit.packages."${system}".default; - unstable = import unstable { inherit system config; }; - - gaming = gaming.packages."${system}"; - wine = windows.packages."${system}"; - winelib = windows.lib."${system}"; - spicetify = spotify.legacyPackages."${system}"; - hyprworld = - hyprland.packages."${system}" // hyprsplit.packages."${system}" // hyprcursors.packages."${system}"; - }) - minecraft.overlay - niri.overlays.niri - vscode.overlays.default - ]; - }; - } - // ( - let - # Package Calling Function - call = rec { - __functor = _: name: pkg name { }; - pkg = name: args: pkgs.callPackage name ({ inherit lib util pkgs; } // args); - script = - name: - pkg name { - inherit inputs; - inherit (inputs.self) files; - }; - }; - in - { - # Custom Packages - packages = - map.modules ./. call // map.modules ../scripts call.script // inputs'.proprietary.packages; - apps = - map.modules ../scripts ( - name: - let - drv = call.script name; - in - { - type = "app"; - program = lib.getExe drv; - meta = drv.meta or { }; - } - ) - // { - default = self'.apps.nixos; - }; - } - ); - - flake = { - # Patched Source - patchedPkgs = - system: - let - src = inputs.nixpkgs; - patches = map.patches ./patches; - pkgs' = import src { inherit system; }; - in - if !(any isPath patches) then - src - else - pkgs'.applyPatches { - inherit src patches; - name = "nixpkgs-patched-${src.shortRev}"; - }; - - # Package Overrides - overlays = map.modules ./overlays import; - }; -} diff --git a/nixos/packages/geany-catppuccin/default.nix b/nixos/packages/geany-catppuccin/default.nix @@ -1,33 +0,0 @@ -{ - lib, - pkgs, - ... -}: -with pkgs; -let - metadata = import ./metadata.nix; -in -stdenv.mkDerivation { - pname = "geany-catppuccin"; - version = metadata.rev; - - src = fetchFromGitHub { - owner = "catppuccin"; - repo = "geany"; - inherit (metadata) rev sha256; - }; - - dontBuild = true; - patches = [ ./selection.patch ]; - installPhase = '' - mkdir -p $out/share/geany/colorschemes/ - cp -r ./src/. $out/share/geany/colorschemes/ - ''; - - meta = with lib; { - description = "Soothing pastel theme for Geany"; - homepage = metadata.repo; - license = licenses.mit; - maintainers = [ "maydayv7" ]; - }; -} diff --git a/nixos/packages/geany-catppuccin/metadata.nix b/nixos/packages/geany-catppuccin/metadata.nix @@ -1,5 +0,0 @@ -{ - repo = "https://github.com/catppuccin/geany"; - rev = "ab96041d6ec462b19e5d70c232e8a20bc738ca99"; - sha256 = "sha256-9QwL/tTqjkF7R9SP/1tGphBcgrjxCTrKqKbp5JuG/B8="; -} diff --git a/nixos/packages/geany-catppuccin/selection.patch b/nixos/packages/geany-catppuccin/selection.patch @@ -1,11 +0,0 @@ ---- a/src/catppuccin-macchiato.conf -+++ b/src/catppuccin-macchiato.conf -@@ -46,7 +46,7 @@ error=red;yellow;false;true - op=blue;base;true;false - # Editor UI - # selection: words; background --selection=pink;blue;false;false -+selection=;surface1;false;true - current_line=;surface0;true - brace_good=green;overlay1;true;true - brace_bad=red;overlay1;true;true diff --git a/nixos/packages/hyprshellevents/default.nix b/nixos/packages/hyprshellevents/default.nix @@ -1,42 +0,0 @@ -{ - lib, - pkgs, - ... -}: -with pkgs; -let - metadata = import ./metadata.nix; -in -stdenvNoCC.mkDerivation (final: { - pname = "hyprshellevents"; - version = metadata.rev; - sourceRoot = "${final.src.name}/shellevents"; - - src = fetchFromGitHub { - owner = "hyprwm"; - repo = "contrib"; - inherit (metadata) rev sha256; - }; - - buildInputs = [ bash ]; - makeFlags = [ "PREFIX=$(out)" ]; - nativeBuildInputs = [ makeWrapper ]; - postInstall = '' - wrapProgram $out/bin/shellevents --prefix PATH ':' \ - "${ - lib.makeBinPath [ - coreutils - hyprland - ] - }" - ''; - - meta = with lib; { - mainProgram = "shellevents"; - description = "Run shell scripts in response to Hyprland events"; - homepage = metadata.repo; - license = licenses.mit; - platforms = platforms.unix; - maintainers = [ "maydayv7" ]; - }; -}) diff --git a/nixos/packages/hyprshellevents/metadata.nix b/nixos/packages/hyprshellevents/metadata.nix @@ -1,5 +0,0 @@ -{ - repo = "https://github.com/hyprwm/contrib"; - rev = "541628cebe42792ddf5063c4abd6402c2f1bd68f"; - sha256 = "sha256-CopNx3j//gZ2mE0ggEK9dZ474UcbDhpTw+KMor8mSxI="; -} diff --git a/nixos/packages/kebihelp/default.nix b/nixos/packages/kebihelp/default.nix @@ -1,43 +0,0 @@ -{ - lib, - pkgs, - ... -}: -with pkgs; -with python311Packages; -let - metadata = import ./metadata.nix; -in -buildPythonPackage rec { - pname = "kebihelp"; - version = metadata.rev; - - src = fetchFromGitHub { - owner = "juienpro"; - repo = pname; - inherit (metadata) rev sha256; - }; - - build-system = [ setuptools-scm ]; - nativeBuildInputs = [ libsForQt5.qt5.wrapQtAppsHook ]; - propagatedBuildInputs = [ - prettytable - pyqt5 - pyqt5-sip - libsForQt5.qt5.qtwayland - ]; - - format = "pyproject"; - dontWrapQtApps = true; - dontCheckRuntimeDeps = true; - preFixup = '' - makeWrapperArgs+=("''${qtWrapperArgs[@]}") - ''; - - meta = with lib; { - description = "Universal Keybinding helper written in Python and QT5"; - homepage = metadata.repo; - license = licenses.mit; - maintainers = [ "maydayv7" ]; - }; -} diff --git a/nixos/packages/kebihelp/metadata.nix b/nixos/packages/kebihelp/metadata.nix @@ -1,6 +0,0 @@ -{ - repo = "https://github.com/juienpro/kebihelp"; - release = true; - rev = "v0.1.2"; - sha256 = "sha256-GWsStVpUk7BCtfcRzcaSn4MNuomgrRef0XAFWnUcPAk="; -} diff --git a/nixos/packages/kitty-search/default.nix b/nixos/packages/kitty-search/default.nix @@ -1,29 +0,0 @@ -{ - lib, - pkgs, - ... -}: -with pkgs; -let - metadata = import ./metadata.nix; -in -stdenv.mkDerivation rec { - pname = "kitty-kitten-search"; - version = metadata.rev; - - src = fetchFromGitHub { - owner = "trygveaa"; - repo = pname; - inherit (metadata) rev sha256; - }; - - dontBuild = true; - installPhase = "mkdir -p $out/ && cp -r . $out/"; - - meta = with lib; { - description = " Kitten for searching in Kitty Terminal"; - homepage = metadata.repo; - license = licenses.gpl3Only; - maintainers = [ "maydayv7" ]; - }; -} diff --git a/nixos/packages/kitty-search/metadata.nix b/nixos/packages/kitty-search/metadata.nix @@ -1,6 +0,0 @@ -{ - repo = "https://github.com/trygveaa/kitty-kitten-search"; - branch = "master"; - rev = "992c1f3d220dc3e1ae18a24b15fcaf47f4e61ff8"; - sha256 = "sha256-Xy4dH2fzEQmKfqhmotVDEszuTqoISONGNfC1yfcdevs="; -} diff --git a/nixos/packages/kvlibadwaita/default.nix b/nixos/packages/kvlibadwaita/default.nix @@ -1,32 +0,0 @@ -{ - lib, - pkgs, - ... -}: -with pkgs; -let - metadata = import ./metadata.nix; -in -stdenv.mkDerivation rec { - pname = "KvLibadwaita"; - version = metadata.rev; - - src = fetchFromGitHub { - owner = "GabePoel"; - repo = pname; - inherit (metadata) rev sha256; - }; - - dontBuild = true; - installPhase = '' - mkdir -p $out/share/Kvantum/ - cp -r ./src/. $out/share/Kvantum/ - ''; - - meta = with lib; { - description = "Libadwaita style theme for Kvantum"; - homepage = metadata.repo; - license = licenses.gpl3Only; - maintainers = [ "maydayv7" ]; - }; -} diff --git a/nixos/packages/kvlibadwaita/metadata.nix b/nixos/packages/kvlibadwaita/metadata.nix @@ -1,5 +0,0 @@ -{ - repo = "https://github.com/GabePoel/KvLibadwaita"; - rev = "1f4e0bec44b13dabfa1fe4047aa8eeaccf2f3557"; - sha256 = "sha256-jCXME6mpqqWd7gWReT04a//2O83VQcOaqIIXa+Frntc="; -} diff --git a/nixos/packages/overlays/brave.nix b/nixos/packages/overlays/brave.nix @@ -1,11 +0,0 @@ -final: prev: { - # Brave Browser Flags - brave = prev.brave.overrideAttrs (old: { - installPhase = old.installPhase + '' - exe="$out/bin/brave" - fix=" --enable-features=TouchpadOverscrollHistoryNavigation --gtk-version=4" - substituteInPlace $out/share/applications/{brave-browser,com.brave.Browser}.desktop \ - --replace-fail $exe "$exe$fix" - ''; - }); -} diff --git a/nixos/packages/overlays/nix-output-monitor.nix b/nixos/packages/overlays/nix-output-monitor.nix @@ -1,18 +0,0 @@ -final: prev: { - # 'nom' Rendering - nix-output-monitor = prev.nix-output-monitor.overrideAttrs (old: { - postPatch = old.postPatch or "" + '' - sed -ie ${final.lib.escapeShellArg '' - s/↓/\\xf072e/ - s/↑/\\xf0737/ - s/⏱/\\xf520/ - s/⏵/\\xf04b/ - s/✔/\\xf00c/ - s/⏸/\\xf04d/ - s/⚠/\\xf071/ - s/∅/\\xf1da/ - s/∑/\\xf04a0/ - ''} lib/NOM/Print.hs - ''; - }); -} diff --git a/nixos/packages/overlays/nixFlakes.nix b/nixos/packages/overlays/nixFlakes.nix @@ -1,4 +0,0 @@ -final: prev: { - # Nix Version - nixFlakes = final.nixVersions.latest; -} diff --git a/nixos/packages/patches/stremio.patch b/nixos/packages/patches/stremio.patch @@ -1,138 +0,0 @@ ---- /dev/null -+++ b/pkgs/by-name/st/stremio-linux-shell/package.nix -@@ -0,0 +1,135 @@ -+{ -+ lib, -+ symlinkJoin, -+ rustPlatform, -+ fetchFromGitHub, -+ versionCheckHook, -+ gitUpdater, -+ -+ # buildInputs -+ atk, -+ cef-binary, -+ gtk3, -+ libayatana-appindicator, -+ libxkbcommon, -+ mpv, -+ openssl, -+ -+ # nativeBuildInputs -+ wrapGAppsHook4, -+ makeBinaryWrapper, -+ pkg-config, -+ -+ # Wrapper -+ libGL, -+ nodejs, -+}: -+ -+let -+ # Follow upstream -+ # https://github.com/Stremio/stremio-linux-shell/blob/v1.0.0-beta.13/flatpak/com.stremio.Stremio.Devel.json#L150 -+ cefPinned = cef-binary.override { -+ version = "138.0.21"; -+ gitRevision = "54811fe"; -+ chromiumVersion = "138.0.7204.101"; -+ -+ srcHashes = { -+ aarch64-linux = ""; # TODO: Add when available -+ x86_64-linux = "sha256-Kob/5lPdZc9JIPxzqiJXNSMaxLuAvNQKdd/AZDiXvNI="; -+ }; -+ }; -+ -+ # Stremio expects CEF files in a specific layout -+ cefPath = symlinkJoin { -+ name = "stremio-cef-target"; -+ paths = [ -+ "${cefPinned}/Resources" -+ "${cefPinned}/Release" -+ ]; -+ }; -+in -+rustPlatform.buildRustPackage (finalAttrs: { -+ pname = "stremio-linux-shell"; -+ version = "1.0.0-beta.13"; -+ -+ src = fetchFromGitHub { -+ owner = "Stremio"; -+ repo = "stremio-linux-shell"; -+ tag = "v${finalAttrs.version}"; -+ hash = "sha256-1f9IBNo5gxpSqTSIf8QuQOlf+sfRhohOmQTLRbX/OU8="; -+ }; -+ -+ cargoHash = "sha256-wx5oF4uF9UMtKzfGxZKsy6mVjYaRD40dLuvaRtz8yE4="; -+ -+ postPatch = '' -+ substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \ -+ --replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1" -+ substituteInPlace $cargoDepsCopy/xkbcommon-dl-*/src/lib.rs \ -+ --replace-fail "libxkbcommon.so.0" "${libxkbcommon}/lib/libxkbcommon.so.0" -+ substituteInPlace $cargoDepsCopy/xkbcommon-dl-*/src/x11.rs \ -+ --replace-fail "libxkbcommon-x11.so.0" "${libxkbcommon}/lib/libxkbcommon-x11.so.0" -+ ''; -+ -+ # Don't download CEF during build -+ buildFeatures = [ "offline-build" ]; -+ -+ buildInputs = [ -+ atk -+ cefPath -+ gtk3 -+ libayatana-appindicator -+ libxkbcommon -+ mpv -+ openssl -+ ]; -+ -+ nativeBuildInputs = [ -+ wrapGAppsHook4 -+ makeBinaryWrapper -+ pkg-config -+ ]; -+ -+ env.CEF_PATH = "${cefPath}"; -+ -+ postInstall = '' -+ mkdir -p $out/share/applications -+ cp data/com.stremio.Stremio.desktop $out/share/applications/com.stremio.Stremio.desktop -+ -+ mkdir -p $out/share/icons/hicolor/scalable/apps -+ cp data/icons/com.stremio.Stremio.svg $out/share/icons/hicolor/scalable/apps/com.stremio.Stremio.svg -+ -+ cp data/server.js $out/bin/server.js -+ mv $out/bin/stremio-linux-shell $out/bin/stremio -+ ''; -+ -+ # Node.js is required to run `server.js` -+ # Add to `gappsWrapperArgs` to avoid two layers of wrapping. -+ preFixup = '' -+ gappsWrapperArgs+=( -+ --prefix LD_LIBRARY_PATH : "/run/opengl-driver/lib" \ -+ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}" \ -+ --prefix PATH : "${lib.makeBinPath [ nodejs ]}" -+ ) -+ ''; -+ -+ nativeInstallCheckInputs = [ -+ versionCheckHook -+ ]; -+ versionCheckProgramArg = "--version"; -+ doInstallCheck = true; -+ -+ passthru.updateScript = gitUpdater { rev-prefix = "v"; }; -+ -+ meta = { -+ description = "Modern media center that gives you the freedom to watch everything you want"; -+ homepage = "https://www.stremio.com/"; -+ license = with lib.licenses; [ -+ gpl3Only -+ # server.js is unfree -+ unfree -+ ]; -+ maintainers = with lib.maintainers; [ thunze ]; -+ platforms = lib.platforms.linux; -+ mainProgram = "stremio"; -+ }; -+}) diff --git a/nixos/packages/wine/.keep b/nixos/packages/wine/.keep diff --git a/nixos/packages/wine/7zip.nix b/nixos/packages/wine/7zip.nix @@ -1,84 +0,0 @@ -{ - lib, - build, - pkgs, - wine, - ... -}: -let - inherit (pkgs) copyDesktopItems fetchurl makeDesktopItem; - inherit (build) copyDesktopIcons makeDesktopIcon mkWindowsApp; -in -mkWindowsApp rec { - inherit wine; - pname = "7zip"; - version = "2404"; - src = fetchurl { - url = "https://www.7-zip.org/a/7z${version}.exe"; - sha256 = "sha256-0Mj79dcm5B2F5RVZI0tbOUVSLoQgjfUjntJfAu9j7/M="; - }; - - dontUnpack = true; - wineArch = "win32"; - fileMap = { }; - enableInstallNotification = false; - nativeBuildInputs = [ - copyDesktopItems - copyDesktopIcons - ]; - - winAppInstall = '' - $WINE start /unix ${src} /S - wineserver -w - ''; - - winAppRun = '' - $WINE start /unix "$WINEPREFIX/drive_c/Program Files/7-Zip/7zFM.exe" "$ARGS" - ''; - - installPhase = '' - runHook preInstall - ln -s $out/bin/.launcher $out/bin/${pname} - runHook postInstall - ''; - - desktopItems = [ - (makeDesktopItem { - name = pname; - exec = pname; - icon = pname; - desktopName = "7-Zip"; - genericName = "Archive Manager"; - categories = [ - "Office" - "Utility" - ]; - mimeTypes = builtins.map (n: "application/" + n) [ - "epub+zip" - "x-zip-compressed-fb2" - "x-cbt" - "x-cb7" - "x-7z-compressed" - "vnd.rar" - "x-tar" - "zip" - ]; - }) - ]; - - desktopIcon = makeDesktopIcon { - name = "7zip"; - src = fetchurl { - url = "https://www.7-zip.org/7ziplogo.png"; - sha256 = "1nkas4wy40ffsmcji1a3gq8a61d72zp4w65jjpmqjj9wyh0j5b7q"; - }; - }; - - meta = with lib; { - description = "File Archiver with a High Compression Ratio"; - homepage = "https://www.7-zip.org/"; - license = licenses.bsd3; - platforms = platforms.linux; - maintainers = [ "maydayv7" ]; - }; -} diff --git a/nixos/packages/wine/notepad++.nix b/nixos/packages/wine/notepad++.nix @@ -1,86 +0,0 @@ -{ - lib, - build, - pkgs, - wine, - ... -}: -let - inherit (pkgs) copyDesktopItems fetchurl makeDesktopItem; - inherit (build) copyDesktopIcons makeDesktopIcon mkWindowsAppNoCC; -in -mkWindowsAppNoCC rec { - inherit wine; - pname = "notepad-plus-plus"; - version = "8.7.3"; - src = fetchurl { - url = "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v${version}/npp.${version}.Installer.exe"; - sha256 = "0qb8x7fy2840wvc0ypmqk0zn806va3zrpdz6cdzrqwcyn76j3ymf"; - }; - - dontUnpack = true; - wineArch = "win32"; - - fileMap = { - "$HOME/.config/Notepad++" = "drive_c/users/$USER/AppData/Roaming/Notepad++"; - }; - - enableMonoBootPrompt = false; - nativeBuildInputs = [ - copyDesktopItems - copyDesktopIcons - ]; - - winAppInstall = '' - $WINE start /unix ${src} /S - wineserver -w - rm -f "$WINEPREFIX/drive_c/Program Files/Notepad++/uninstall.exe" - rm -fR "$WINEPREFIX/drive_c/Program Files/Notepad++/updater" - ''; - - winAppRun = '' - $WINE start /unix "$WINEPREFIX/drive_c/Program Files/Notepad++/notepad++.exe" "$ARGS" - ''; - - installPhase = '' - runHook preInstall - ln -s $out/bin/.launcher $out/bin/${pname} - runHook postInstall - ''; - - desktopItems = [ - (makeDesktopItem { - name = "Notepad++"; - exec = pname; - icon = pname; - desktopName = "Notepad++"; - genericName = "Text Editor"; - mimeTypes = [ "text/plain" ]; - categories = [ - "Utility" - "TextEditor" - ]; - }) - ]; - - desktopIcon = makeDesktopIcon { - name = pname; - icoIndex = 2; - src = fetchurl { - url = "https://notepad-plus-plus.org/favicon.ico"; - sha256 = "1av2m6m665ccfngnzqnbsnv2aky907p2c6ggvfxrwbp70szgj9vi"; - }; - }; - - meta = with lib; { - mainProgram = pname; - homepage = "https://notepad-plus-plus.org/"; - description = "A text and source code editor"; - license = licenses.gpl3Plus; - maintainers = [ "maydayv7" ]; - platforms = [ - "x86_64-linux" - "i686-linux" - ]; - }; -} diff --git a/nixos/scripts/README.md b/nixos/scripts/README.md @@ -1,7 +0,0 @@ -### Scripts - -The `scripts` directory contains a combination of custom Bash Scripts (with `nix` shebangs, and can be run using <code><i>./path/to/script</i></code>) as well as ones written in conjunction with the Nix Syntax (which can be accessed by `github:maydayv7/dotfiles#apps.${system}`) - -A system management script is present, invoked via the [`nixos`](./nixos.nix) command, which can be used to apply user and device configuration changes, setup the device on first boot, and perform various other useful functions (If you have a working NixOS install, you can check it out using `nix run github:maydayv7/dotfiles`) - -There is also a system install script, invoked via the [`os-install`](./install.nix) command, that painlessly installs the OS diff --git a/nixos/scripts/audio.sh b/nixos/scripts/audio.sh @@ -1,28 +0,0 @@ -#! /usr/bin/env nix -#! nix shell nixpkgs#bash nixpkgs#glib nixpkgs#playerctl -c bash - -# Audio Tweaks # - -# Pause playback on Screen Lock -gdbus monitor -y -d org.freedesktop.login1 | grep LockedHint --line-buffered | - while read -r line - do - case "$line" in - *"<true>"*) - if playerctl status | grep Playing - then - PLAY=true - else - PLAY=false - fi - playerctl pause -a - ;; - *"<false>"*) - if $PLAY - then - playerctl play-pause - fi - ;; - esac - done -exit diff --git a/nixos/scripts/colors.sh b/nixos/scripts/colors.sh @@ -1,9 +0,0 @@ -#! /usr/bin/env nix -#! nix shell nixpkgs#bash -c bash - -# Print Color Map # - -for i in {0..255} -do - print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'} -done diff --git a/nixos/scripts/commands.sh b/nixos/scripts/commands.sh @@ -1,89 +0,0 @@ -#! /usr/bin/env nix -#! nix shell nixpkgs#bash nixpkgs#bzip2 nixpkgs#coreutils nixpkgs#git nixpkgs#gnupg nixpkgs#gnutar nixpkgs#gzip nixpkgs#p7zip nixpkgs#unzip -c bash - -# Useful Commands # - -temp(){ - TEMP=/tmp/"$1" - if [ "$2" != "1" ]; then rm -rf "$TEMP"; fi - if [ "$2" != "2" ]; then mkdir -p "$TEMP"; fi -} - -extract() { - if [ -f "$1" ] - then - case $1 in - *.tar.bz2) tar xvjf "$1";; - *.tar.gz) tar xvzf "$1";; - *.tar.xz) tar Jxvf "$1";; - *.bz2) bunzip2 "$1";; - *.rar) rar x "$1";; - *.gz) gunzip "$1";; - *.tar) tar xvf "$1";; - *.tbz2) tar xvjf "$1";; - *.tgz) tar xvzf "$1";; - *.zip) unzip -d "${1//\.zip/}" "$1";; - *.Z) uncompress "$1";; - *.7z) 7z x "$1";; - *) error "Can't Extract '$1'" ;; - esac - else - error "File '$1' is invalid" - fi -} - -up() { - LIMIT=$1 - P=$PWD/.. - for ((i=1; i < LIMIT; i++)) - do - P=$P/.. - done - cd "$P" || exit -} - -internet() { - if ! nc -zw1 google.com 443 2> /dev/null - then - error "You are Offline, Please Connect to the Internet" - fi -} - -restart() { - read -rp "Do you want to Reboot the System? (Y/*): " choice - case $choice in - [Yy]*) reboot;; - *) exit;; - esac -} - -# Print - -newline() { - echo -e "\n"; -} - -error() { - echo -e "\n\033[0;31merror:\033[0m $1" - if [ -n "$2" ] - then - echo -e "\n$2" - fi - exit 7 -} - -info() { - echo -e "\n\033[0;35minfo:\033[0m $1" - if [ -n "$2" ] - then - echo -e "\n$2" - fi -} - -warn() { - echo -e "\n\033[0;35mwarning:\033[0m $1" - if [ -n "$2" ] - then - echo -e "\n$2" - fi -} diff --git a/nixos/scripts/hyprutils.nix b/nixos/scripts/hyprutils.nix @@ -1,211 +0,0 @@ -{ - lib, - pkgs, - files, - ... -}: -let - inherit (lib) licenses recursiveUpdate; - - help = '' - # Legend # - xxx - Command [action] - Description - - # Usage # - help - Show this information - click [button] [address] - Opens [address] with [button] action - toggle  - fancy - Toggle Compositor Effects - float - Toggle window floating in current workspace - minimized - Show minimized windows - monitor 'name' - Toggle specified Monitor - shader - Toggle Compositor Shader - touchpad - Toggle touchpad - ''; - - daemon = builtins.toFile "daemon.sh" '' - event_activespecial() { - case "$WORKSPACENAME" in - special:minimized*) - hyprctl dispatch submap reset - hyprctl dispatch submap Minimized - ;; - esac - } - - event_minimized() { - WINDOW="address:0x$WINDOWADDRESS" - case "$MINIMIZED" in - 0) hyprctl dispatch movetoworkspace "+0, $WINDOW" ;; - 1) hyprctl dispatch movetoworkspacesilent "special:minimized, $WINDOW" ;; - esac - } - ''; -in -recursiveUpdate - { - meta = { - mainProgram = "hyprutils"; - description = "Hyprland Utility Script"; - homepage = files.path.repo; - license = licenses.gpl3Only; - maintainers = [ "maydayv7" ]; - }; - } - ( - pkgs.writeShellApplication { - name = "hyprutils"; - runtimeInputs = with pkgs; [ - coreutils - gnugrep - socat - - custom.hyprshellevents - hyprland - hyprshade - libnotify - zenity - ]; - - text = '' - set +eu - ${files.scripts.commands} - - notify() { - notify-send -a "utility" -t 1000 -h string:x-canonical-private-synchronous:"$1" "''${@:2}" - } - - hyprnotify() { - hyprctl notify "$1" 1500 0 " $2 " - } - - fail() { - error "$1" "Try 'hyprutils help' for more information" - } - - case "$1" in - "") error "Expected an Option" "${help}";; - "help") echo -e "## Hyprland Utility Script ##\n${help}";; - "daemon") - info "Monitoring Hyprland Socket..." - socat -u UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock EXEC:"shellevents ${daemon}",nofork - ;; - "click") - BUTTON="$2" - ADDRESS="$3" - if [ -z "$BUTTON" ] || [ -z "$ADDRESS" ] - then - fail "Expected GDK Button event and a window address" - fi - - case "$BUTTON" in - "1") - # Left Click - hyprctl keyword cursor:no_warps true - hyprctl dispatch focuswindow address:"$ADDRESS" - hyprctl dispatch bringactivetotop - hyprctl keyword cursor:no_warps false - ;; - "2") - # Middle Click - hyprctl dispatch movetoworkspacesilent "special:minimized, address:$ADDRESS" - ;; - "3") - # Right Click - hyprctl dispatch closewindow address:"$ADDRESS" - ;; - esac - ;; - "toggle") - case "$2" in - "fancy") - FANCY=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}') - if [ "$FANCY" = 1 ] - then - hyprnotify 1 "Compositor Effects Disabled" - hyprctl --batch "\ - keyword animations:enabled 0;\ - keyword decoration:shadow:enabled 0;\ - keyword decoration:blur:enabled 0;\ - keyword general:gaps_in 0;\ - keyword general:gaps_out 0;\ - keyword general:border_size 1;\ - keyword decoration:rounding 0;\ - keyword plugin:dynamic-cursors:enabled 0" - exit - fi - hyprnotify 1 "Compositor Effects Enabled" - hyprctl reload - ;; - "float") - WORKSPACE=$(hyprctl activeworkspace | grep "workspace ID" | awk '{print $3}') - hyprnotify 1 "Toggled window floating on Workspace $WORKSPACE" - hyprctl dispatch workspaceopt allfloat - ;; - "minimized") - if hyprctl workspaces | grep "special:minimize" - then - hyprctl dispatch workspace special:minimized - else - hyprnotify 1 "No minimized windows present" - fi - ;; - "monitor") - if [ -z "$3" ] - then - fail "Expected monitor name" - fi - - if hyprctl monitors | grep "Monitor $3" - then - hyprctl keyword monitor "$3, disable" - else - hyprctl keyword monitor "$3, preferred, auto, 1" - fi - hyprctl reload - ;; - "shader") - hyprshade off - mapfile SHADERS < <(hyprshade ls) - SHADER=$(zenity --list --title="Compositor Shader Toggle" --column="Shaders" "''${SHADERS[@]}" | sed "s/^[ \t]*//") - hyprshade on "$SHADER" && hyprctl seterror "" - ;; - "touchpad") - temp hyprutils_touchpad 1 - STATUS="$TEMP/status" - touchpad=$(hyprctl devices | grep touchpad | xargs) - - enable() { - hyprctl keyword "device[$touchpad]:enabled" true - printf "true" >"$STATUS" - notify touchpad -i "touchpad" "Touchpad Enabled" - } - - disable() { - hyprctl keyword "device[$touchpad]:enabled" false - printf "false" >"$STATUS" - notify touchpad -i "touchpad" "Touchpad Disabled" - } - - if ! [ -f "$STATUS" ] - then - disable - else - if [ "$(cat "$STATUS")" = "true" ] - then - disable - elif [ "$(cat "$STATUS")" = "false" ] - then - enable - fi - fi - ;; - "") fail "Expected an Option" ;; - *) fail "Unexpected Option 'toggle $2'" ;; - esac - ;; - *) fail "Unexpected Option '$1'" ;; - esac - ''; - } - ) diff --git a/nixos/scripts/install.nix b/nixos/scripts/install.nix @@ -1,184 +0,0 @@ -{ - lib, - pkgs, - files, - ... -}: -with files.path; -let - inherit (lib) licenses recursiveUpdate; - - # File System Operations - partitions = '' - partition_disk() { - read -rp "Enter Path to Disk: /dev/" DISK - if [ -z "$DISK" ] - then - error "Path to Disk cannot be empty. If unsure, use the command 'fdisk -l'" - fi - - echo "Deleting Partitions..." - dd if=/dev/zero of=/dev/"$DISK" bs=512 count=1 - if [[ "$DISK" == nvme* ]] - then - parted /dev/"$DISK" --script mklabel gpt - else - parted /dev/"$DISK" --script mklabel msdos - fi - - echo "Creating Partitions..." - parted /dev/"$DISK" -- mkpart ESP fat32 1MiB 1024MiB - parted /dev/"$DISK" -- set 1 esp on - parted /dev/"$DISK" -- name 1 ESP - mkfs.fat -F 32 /dev/disk/by-partlabel/ESP - - parted /dev/"$DISK" -- mkpart primary 1025MiB -8GiB - parted /dev/"$DISK" -- name 2 System - - parted /dev/"$DISK" -- mkpart primary linux-swap -8GiB 100% - parted /dev/"$DISK" -- name 3 swap - mkswap /dev/disk/by-partlabel/swap - - mkdir -p /mnt - } - - create_ext4() { - echo "Creating 'EXT4' Partition..." - mkfs.ext4 /dev/disk/by-partlabel/System - } - - mount_ext4() { - echo "Mounting 'EXT4' Partition..." - mount /dev/disk/by-partlabel/System /mnt - } - - create_zfs() { - echo "Creating 'ZFS' Volumes..." - read -rp "Enter Password for Pool Encryption: " PASS - echo "$PASS" | zpool create -f fspool -O compression=zstd -O encryption=on -O keyformat=passphrase /dev/disk/by-partlabel/System - - zfs create -p -o mountpoint=legacy -o xattr=sa -o acltype=posixacl fspool/system/root - zfs snapshot fspool/system/root@blank - zfs create -o mountpoint=legacy -o atime=off fspool/system/nix - - zfs create -p -o mountpoint=legacy -o xattr=sa -o acltype=posixacl -o com.sun:auto-snapshot=true fspool/data - - # Use 'zfs set refreservation=none fspool/reserve' to free space - zfs create -o canmount=off -o refreservation=1G fspool/reserve - } - - mount_zfs() { - echo "Mounting 'ZFS' Volumes..." - zpool import -f fspool - mount -t zfs fspool/system/root /mnt - mkdir -p /mnt/{nix,data} - mount -t zfs fspool/system/nix /mnt/nix - mkdir -p /mnt${persist} - mount -t zfs fspool/data /mnt${data} - } - - mount_other() { - echo "Mounting Other Partitions..." - mkdir -p /mnt/boot - mount -t vfat /dev/disk/by-partlabel/ESP /mnt/boot - swapoff --all - swapon /dev/disk/by-partlabel/swap - } - - unmount_all () { - echo "Unmounting All Partitions..." - umount -l /mnt - zpool export fspool - } - ''; -in -recursiveUpdate - { - meta = { - mainProgram = "os-install"; - description = "System Install Script"; - homepage = repo; - license = licenses.gpl3Only; - maintainers = [ "maydayv7" ]; - }; - } - ( - pkgs.writeShellApplication { - name = "os-install"; - runtimeInputs = with pkgs; [ - coreutils - dosfstools - git - gparted - nixFlakes - ntfs3g - parted - util-linux - zfs - ]; - - text = '' - set +eu - ${files.scripts.commands} - ${partitions} - - internet - if [ "$EUID" -ne 0 ] - then - error "This Command must be Executed as 'root'" - fi - - warn "Disk will be Completely Wiped for Automatic Partitioning" - read -rp "Do you want to Automatically Create the Partitions? (Y/*): " choice - case $choice in - [Yy]*) partition_disk;; - *) warn "You must Create, Format and Label the Partitions on your own"; gparted &> /dev/null;; - esac - newline - read -rp "Select Filesystem to use for Disk (simple/advanced): " choice - case $choice in - 1|[Ss]*) - read -rp "Do you want to Create and Format the EXT4 Partitions? (Y/*): " choice - case $choice in - [Yy]*) create_ext4; mount_ext4;; - *) warn "Assuming that Required EXT4 Partition has already been Created"; mount_ext4;; - esac - ;; - 2|[Aa]*) - read -rp "Do you want to Create the ZFS Pool and Datasets? (Y/*): " choice - case $choice in - [Yy]*) create_zfs; mount_zfs;; - *) warn "Assuming that Required ZFS Pool and Datasets have already been Created"; mount_zfs;; - esac - ;; - *) error "Choose (1)simple or (2)advanced";; - esac - newline - - mount_other - systemd-machine-id-setup --root=/mnt - newline - - read -rp "Enter Name of Device to Install: " HOST - read -rp "Enter Path to Repository (path/URL): " URL - if [ -z "$URL" ] - then - URL=${flake} - fi - echo "Installing System from '$URL'..." - until nixos-install --no-root-passwd --root /mnt --flake "$URL"#"$HOST" - do - newline - info "Couldn't finish installation. Trying again..." - done - newline - - unmount_all - newline - - info "Run 'nixos setup' after rebooting to finish the install" - info "Select the (Recovery) boot menu option and run the above script as the 'recovery' user" - restart - ''; - } - ) diff --git a/nixos/scripts/mail.sh b/nixos/scripts/mail.sh @@ -1,28 +0,0 @@ -#! /usr/bin/env nix -#! nix shell nixpkgs#bash nixpkgs#coreutils nixpkgs#gnused nixpkgs#libpst -c bash - -# Script to convert '.pst' Files to '.mbox' # - -MAIL=./convert-$(date '+%H-%M_%d-%m-%y') - -# File Conversion -read -rp "Enter Path to '.pst' File: " DIR -echo "Converting '.pst' to '.mbox'" -mkdir "$MAIL" && readpst -o "$MAIL" -r "$DIR" -find "$MAIL" -type d -mindepth 1 | tac | xargs -d '\n' -I{} mv {} {}.sbd -find "$MAIL" -name mbox -type f | xargs -d '\n' -I{} echo '"{}" "{}"' | sed -e 's/\.sbd\/mbox"$/"/' | xargs -L 1 mv -find "$MAIL" -empty -type d | xargs -d '\n' rmdir -find "$MAIL" -type d | grep -E '.sbd' | sed 's/.\{4\}$//' | xargs -d '\n' touch -echo "Conversion complete, files are present in $MAIL" - -# Mail Import -import() { -read -rp "Enter name of Thunderbird Profile: " PROFILE -cp -r "$MAIL"/. "$HOME/.thunderbird/$PROFILE/Mail/Local Folders/Converted/" && echo "Successfully Imported" -} - -read -rp "Do you want to import the Mails into Thunderbird? (Y/*): " choice - case $choice in - [Yy]*) import; rm -rf "$MAIL";; - *) rm -rf "$MAIL"; exit;; - esac diff --git a/nixos/scripts/nixos.nix b/nixos/scripts/nixos.nix @@ -1,504 +0,0 @@ -{ - lib, - util, - inputs, - pkgs, - files, - ... -}: -with files; -let - inherit (inputs) self; - inherit (util.map) list; - inherit (lib) licenses recursiveUpdate; - - devShells = list self.devShells."${pkgs.stdenv.system}"; - nixosConfigurations = list self.nixosConfigurations; - - # Usage Description - usage = { - script = '' - # Legend # - xxx - Command - [ ] - Optional - Command Description - ' ' - Variable - - # Usage # - apply [ --'option' ] - Applies Device and User Configuration - cache 'command' - Pushes Binary Cache Output to Cachix - check [ --trace ] - Checks System Configuration [ Displays Error to Trace ] - clean [ --all ] - Garbage Collects and Optimises Nix Store - explore - Opens Interactive Shell to explore Syntax and Configuration - iso 'variant' [ --burn ] - Builds Image for Specified Device [ Burns '.iso' to USB ] - list [ 'pattern' ] - Lists all Installed Packages [ Returns Matches ] - locate 'package' - Locates Installed Package - run [ 'path' ] 'command' - Runs Specified Command [ from 'path' ] (Wraps 'nix run') - search 'term' [ 'source' ] - Searches for Packages [ Providing 'term' ] or Configuration Options - secret 'choice' [ 'path' ] - Manages 'sops' Encrypted Secrets - setup - Sets up NixOS System (on First Boot) - shell [ 'name' ] - Opens desired Nix Developer Shell - update [ 'repo' / --'option' ] - Manages System Package Updates - ''; - - apply = '' - # Usage # - 'specialisation' - Activates Specified System Specialisation - --activate [ home ] - Activates Current [ Home ] Configuration - --boot - Applies Configuration on boot - --delta - Shows Package Delta for Build - --rollback [ 'generation' ] - Reverts to Last [ or Specified ] Build Generation - --test - Tests Configuration Build - ''; - - search = '' - # Usage # - cmd.'command' - Searches for Package providing 'command' - pkgs.'package' [ 'repo' ] - Searches for Package 'package' [ In Repository ] - 'term' - Searches for Packages and Configuration Options and matching 'term' - ''; - - secret = '' - # Usage # - create 'path' - Creates desired Secret - edit 'name' - Edits desired Secret - list - Lists all 'sops' Encrypted Secrets - show 'name' - Shows desired Secret - update - Updates Secrets to defined Keys - ''; - - update = '' - # Usage # - --pkgs - Automatically updates manually packaged apps - --commit - Updates 'inputs' and commits changes - 'repo' [ 'source' ] - Updates 'repo' input [ To specified 'source' ] - ''; - }; -in -recursiveUpdate - { - meta = { - mainProgram = "nixos"; - description = "System Management Script"; - homepage = path.repo; - license = licenses.gpl3Only; - maintainers = [ "maydayv7" ]; - }; - } - ( - pkgs.writeShellApplication { - name = "nixos"; - runtimeInputs = with pkgs; [ - coreutils - gnugrep - gnused - git - jq - tree - gnupg - sops - wine.mkwindowsapp-tools - - nixFlakes - cachix - manix - dix - nix-output-monitor - ]; - - text = '' - set +eu - ${scripts.commands} - - if [[ -n $IN_NIX_SHELL ]] - then - warn "You are in a Nix Developer Shell" "This script may not work here properly\n" - fi - - case $1 in - "") error "Expected an Option" "${usage.script}";; - help|--help|-h) echo -e "## Tool for NixOS System Management ##\n${usage.script}";; - "apply") - case $2 in - help|--help|-h) echo "${usage.apply}";; - "") - if [ -z "$NIXOS_SPECIALISATION" ] - then - echo "Applying Configuration..." - sudo nixos-rebuild switch --flake ${path.system}# - else - echo "Applying Configuration ($NIXOS_SPECIALISATION)..." - sudo nixos-rebuild switch --specialisation "$NIXOS_SPECIALISATION" - fi - ;; - "--activate") - case $3 in - "") - if [ -z "$NIXOS_SPECIALISATION" ] - then - echo "Activating Configuration..." - sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch - else - echo "Activating Configuration ($NIXOS_SPECIALISATION)..." - sudo /nix/var/nix/profiles/system/specialisation/"$NIXOS_SPECIALISATION"/bin/switch-to-configuration switch - fi - ;; - "home") - echo "Applying Home Configuration..." - sudo systemctl restart home-manager-"$USER" - ;; - *) error "Unknown Option '$3'";; - esac - ;; - "--boot") - echo "Applying Configuration..." - if sudo nixos-rebuild boot --flake ${path.system}# - then - restart - else - error "Couldn't build generation successfully" - fi - ;; - "--delta") - echo "Building Configuration..." - temp nixos_build 2 - HOSTNAME=$(cat /etc/hostname) - if nom build ${path.system}#nixosConfigurations."$HOSTNAME".config.system.build.toplevel --out-link "$TEMP" - then - echo "Processing Delta..." - dix /run/current-system "$TEMP" - read -rp "Do you want to apply the configuration? (Y/*): " choice - case $choice in - [Yy]*) - echo "Applying Configuration..." - sudo "$TEMP"/bin/switch-to-configuration switch - ;; - *) exit;; - esac - else - error "Couldn't build generation successfully" - fi - ;; - "--test") - echo "Testing Configuration..." - sudo nixos-rebuild test --no-build-nix --show-trace --flake ${path.system}# - ;; - "--rollback") - case $3 in - "") - echo "Applying Rollback..." - sudo nixos-rebuild switch --rollback - ;; - "list") - echo "# System Generations #" - nixos-rebuild list-generations - ;; - *) - echo "Rolling Back to Generation '$3'..." - sudo nix-env --switch-generation "$3" -p "/nix/var/nix/profiles/system" && nixos apply --activate - ;; - esac - ;; - *) - SPECIALISATIONS=$(ls -1 /nix/var/nix/profiles/system/specialisation) - if grep -wq "$2" <<<"$SPECIALISATIONS" &> /dev/null - then - echo "Applying Configuration ($2)..." - sudo nixos-rebuild switch --specialisation "$2" - else - error "Unknown Option '$2'\n${usage.apply}" "# Available Specialisations #\n$SPECIALISATIONS" - fi - ;; - esac - ;; - "cache") - if [ -z "$2" ] - then - error "Expected a Build Command" - else - echo "Executing Command '" "''${@:2}" "'..." - cachix authtoken "$(find ${path.system} -name cachix-token.secret -exec sops --config ${path.sops} -d {} \+)" - cachix watch-exec ${path.cache} "''${@:2}" - fi - ;; - "check") - echo "Formatting Code..." - pushd ${path.system} &> /dev/null; nix fmt; popd &> /dev/null - case $2 in - "") nix flake check ${path.system} --keep-going;; - "--trace") nix flake check ${path.system} --keep-going --show-trace;; - *) nix flake check "$2" --keep-going;; - esac - ;; - "clean") - echo "Running Garbage Collection..." - mkwindows-tools-gc - nix-collect-garbage -d - rm -rf /nix/var/nix/profiles/per-user/"$USER"/profile - if [ "$EUID" -ne 0 ] && [ "$2" != "--all" ] - then - warn "Run as 'root' or use Option '--all' to Clean System Generations" - else - sudo nix-collect-garbage -d - sudo rm -rf /run/secrets/* - sudo nix-env --delete-generations old --profile /nix/var/nix/profiles/system - nixos apply --activate - fi - newline - echo "Running De-Duplication..." - nix store optimise - ;; - "explore") - case $2 in - "") nix repl --arg host true --arg path ${path.system} --file ${repl};; - *) nix repl --arg path "$(readlink -f "$2" | sed 's|/flake.nix||')" --file ${repl};; - esac - ;; - "iso") - case $2 in - "") error "Expected a Device name";; - *) - if grep -wq "$2" <<<"${nixosConfigurations}" &> /dev/null - then - echo "Building '$2' Image..." - nom build ${path.system}#nixosConfigurations."$2".config.system.build.images.iso - else - error "Unknown Device '$2'" "# Available Devices #\n ${nixosConfigurations}" - fi - ;; - esac - case $3 in - "") echo "The '--burn' Option can be used to Flash the Image onto a USB";; - "--burn") - case $4 in - "") error "Expected a 'path' to USB Drive";; - *) - IMAGE=$(find ./result/iso -type f -name "*.iso") - sudo dd if="$IMAGE" of="$4" status=progress bs=1M - ;; - esac - ;; - *) error "Unknown Option '$3'";; - esac - ;; - "list") - case $2 in - "") nix-store -q -R /run/current-system | sed -n -e 's/\/nix\/store\/[0-9a-z]\{32\}-//p' | sort | uniq;; - *) find=$(nix-store -q -R /run/current-system | sed -n -e 's/\/nix\/store\/[0-9a-z]\{32\}-//p' | sort | uniq | grep "$2") - if [ -z "$find" ] - then - if nix search nixpkgs#"$2" &> /dev/null - then - error "Package '$2' is not installed" - else - error "Package '$2' not found" - fi - else - echo "$find" - fi - ;; - esac - ;; - "locate") - case $2 in - "") error "Expected Package Name";; - *) - package=$(nix-store -q -R /run/current-system | sed -n -e 's/\/nix\/store\/[0-9a-z]\{32\}-//p' | sort | uniq | grep "$2") - if [ -z "$package" ] - then - location=$(find /nix/store -maxdepth 1 -type d -name "*$2*") - if [ -n "$location" ] - then - if (( $(grep -c . <<<"$location") > 1 )) - then - echo -e "Locations:\n$location" - else - echo -e "Location: $location" - fi - else - if nix search nixpkgs#"$2" &> /dev/null - then - error "Package '$2' is not installed" - else - error "Package '$2' is invalid" - fi - fi - else - if (( $(grep -c . <<<"$package") > 1 )) - then - locations=$(find /nix/store -maxdepth 1 -type d -name "*$2*") - echo -e "Locations:\n$locations" - else - echo "Package $package found" - nix search nixpkgs#"$2" &> /dev/null && location=$(nix eval nixpkgs#"$2".outPath 2> /dev/null | sed 's/"//g') || location=$(find /nix/store -maxdepth 1 -type d -name "*$package") - echo "Location: $location" - fi - fi - ;; - esac - ;; - "run") - export NIXPKGS_ALLOW_UNFREE=1 - if [[ "$2" == *[:/]* ]] || grep -wq "$2" <<<"${list inputs}" - then - nix run "$2"#"$3" --impure -- "''${@:4}" - else - nix run ${path.system}#"$2" --impure -- "''${@:3}" - fi - ;; - "search") - case $2 in - "") error "Expected an Option" "${usage.search}";; - help|--help|-h) echo "${usage.search}";; - cmd.*) - command="''${2//cmd\./}" - echo "Searching for Package providing Command '$command'..." - output=$(nix-locate --whole-name --type x --type s --no-group --top-level --at-root "/bin/$command") - if [ -z "$output" ] - then - error "Command '$command' not found" - else - echo "$output" - fi - ;; - pkgs.*) - package="''${2//pkgs\./}" - echo "Searching for Package '$package'..." - if [ -z "$3" ] - then - nix search nixpkgs#"$package" - else - nix search "$3"#"$package" - fi - ;; - *) - echo "Searching for Term '$2'..." - manix "$2" - ;; - esac - ;; - "secret") - case $2 in - "") error "Expected an Option" "${usage.secret}";; - help|--help|-h) echo "${usage.secret}";; - "create") - case $3 in - "") error "Expected 'name' of Secret";; - *) - echo "Creating Secret '$3'..." - sops --config ${path.sops} -i ${path.system}/"$3".secret - ;; - esac - ;; - "edit") - case $3 in - "") error "Expected 'name' of Secret";; - *) - if find ${path.system} -name "$3".secret | grep "secret" &> /dev/null - then - echo "Editing Secret '$3'..." - find ${path.system} -name "$3".secret -exec sops --config ${path.sops} -i {} \+ - else - error "Unknown Secret '$3'" - fi - ;; - esac - ;; - "list") - echo "## Secrets in ${path.system} ##" - grep / ${path.sops} | sed -e 's|- path_regex:||' -e 's/\/\.\*\$//' -e 's| |${path.system}/|' | xargs tree -C --noreport -P '*.secret' -I '_*' | sed 's/\.secret//' - ;; - "show") - if find ${path.system} -name "$3".secret | grep "secret" &> /dev/null - then - echo "Showing Secret '$3'..." - find ${path.system} -name "$3".secret -exec sops --config ${path.sops} -d {} \+ - else - error "Unknown Secret '$3'" - fi - ;; - "update") - echo "Updating Secrets..." - find ${path.system} -name '*.secret' ! -name '_*' -exec sops --config ${path.sops} updatekeys {} \; - ;; - *) error "Unknown Option '$2'" "${usage.secret}";; - esac - ;; - "setup") - if [ -d ${path.persist} ]; then - DIR=${path.persist}${path.system} - else - DIR=${path.system} - fi - - echo "Cloning Repository..." - sudo git clone --recurse-submodules ${path.repo} "$DIR" - pushd "$DIR" &> /dev/null; sudo git config core.fileMode false; popd &> /dev/null - sudo chgrp -R keys "$DIR" - newline - - read -rp "Enter Path to GPG Keys (path/.git): " KEY - LINK='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]' - if [ -z "$KEY" ] - then - error "Path to GPG Keys cannot be empty" - elif [[ $KEY =~ $LINK ]] - then - echo "Cloning Keys..." - git clone "$KEY" keys --progress - else - cp -r "$KEY"/. ./keys - fi - echo "Importing Keys..." - find ./keys -name '*.gpg' -exec sudo gpg --homedir ${path.gpg} --import {} \+ - rm -rf ./keys - newline - - nixos apply --activate - ;; - "shell") - case $2 in - "") nix develop ${path.system} --command "$SHELL";; - *) - if grep -wq "$2" <<<"${devShells}" &> /dev/null - then - nix develop ${path.system}#"$2" --command "$SHELL" - else - error "Unknown Shell '$2'" "# Available Shells #\n ${devShells}" - fi - ;; - esac - ;; - "update") - case $2 in - help|--help|-h) echo "${usage.update}";; - "--pkgs") - echo "Updating Packages..." - pushd ${path.system}/packages &> /dev/null - bash ${./packages.sh} - popd &> /dev/null - ;; - "--commit") - echo "Updating Flake Inputs..." - nix flake update --flake ${path.system} --commit-lock-file - ;; - "") - echo "Updating Flake Inputs..." - nix flake update --flake ${path.system} - ;; - *) - echo "Updating Flake Input '$2'..." - if [ -z "$3" ] - then - nix flake update --flake ${path.system} "$2" - else - - nix flake update --flake ${path.system} "$2" --override-input "$2" "$3" - fi - ;; - esac - ;; - *) error "Unknown Option '$1'" "${usage.script}";; - esac - ''; - } - ) diff --git a/nixos/scripts/packages.sh b/nixos/scripts/packages.sh @@ -1,138 +0,0 @@ -#! /usr/bin/env nix -#! nix shell nixpkgs#bash nixpkgs#coreutils nixpkgs#jq -c bash - -unset NIX_PATH -set -euo pipefail - -COMMIT_PREFIX="chore(packages): Update" - -# Script to Automatically Update Packages # -# Logic -update() { - if [[ "${1:-""}" != "" ]] - then - t1="$(mktemp)"; trap 'rm ${t1}' EXIT; - t2="$(mktemp)"; trap 'rm ${t2}' EXIT; - pkg="${1}" - metadata="${pkg}/metadata.nix" - pkgname="$(basename "${pkg}")" - - if [[ ! -f "${pkg}/metadata.nix" ]] - then - exit 0 - fi - - # Extraction - # Include ${pkg}/metadata.nix according to spec - nix eval -f "${metadata}" --json > "${t1}" 2>/dev/null - rev="$(cat "${t1}" | jq -r .rev)" - sha256="$(cat "${t1}" | jq -r .sha256)" - repo="$(cat "${t1}" | jq -r .repo)" - branch="$(cat "${t1}" | jq -r .branch)" # Optional - release="$(cat "${t1}" | jq -r .release)" # Optional - cargoHash="$(cat "${t1}" | jq -r .cargoHash)" # Optional - vendorHash="$(cat "${t1}" | jq -r .vendorHash)" # Optional - skip="$(cat "${t1}" | jq -r .skip)" # Optional - upattr="$(cat "${t1}" | jq -r .upattr)"; # Optional - if [[ "${upattr}" == "null" ]] - then - upattr="${pkgname}" - fi - - if [[ "${skip}" == "true" ]] - then - echo "Skipping (Pinned to '${rev}')" - exit 0 - fi - - # Latest Revision - if [[ "${repo}" != "null" ]] - then - if [[ "${release}" == "true" ]] - then - newrev="$(git ls-remote --refs --sort="version:refname" --tags "${repo}" | cut -d/ -f3- | tail -n1)" - else - if [[ "${branch}" == "null" ]] - then - branch="main" - fi - newrev="$(git ls-remote "${repo}" "refs/heads/${branch}" | awk '{ print $1}')" - fi - fi - - # Early Quit - if [[ "${rev}" == "${newrev}" && "${FORCE_RECHECK:-""}" != "true" ]] - then - echo "'${pkgname}' Already Up to Date ('${rev}')" - exit 0 - fi - - echo "Updating '${pkgname}'..." - echo "Bumping '${rev}' ---> '${newrev}'" - - # SHA - fakeHash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" - sed -i "s|${rev}|${newrev}|" "${metadata}" - sed -i "s|${sha256}|${fakeHash}|" "${metadata}" - nix build --no-link "..#${upattr}" &> "${t2}" || true - newHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f2 | tr -d ' ' || true)" - if [[ "${newHash}" == "sha256" ]] - then - newHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f3 | tr -d ' ' || true)" - fi - - newHash="$(nix hash convert --hash-algo sha256 "${newHash}")" - sed -i "s|${fakeHash}|${newHash}|" "${metadata}" - - # Cargo SHA - if [[ "${cargoHash}" != "null" ]] - then - sed -i "s|${cargoHash}|${fakeHash}|" "${metadata}" - nix build --no-link "..#${upattr}" &> "${t2}" || true - newcargoHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f2 | tr -d ' ' || true)" - if [[ "${newcargoHash}" == "sha256" ]] - then - newcargoHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f3 | tr -d ' ' || true)" - fi - newcargoHash="$(nix hash convert --hash-algo sha256 "${newcargoHash}")" - sed -i "s|${fakeHash}|${newcargoHash}|" "${metadata}" - fi - - # Vendor SHA - if [[ "${vendorHash}" != "null" ]] - then - sed -i "s|${vendorHash}|${fakeHash}|" "${metadata}" - nix build --no-link "..#${upattr}" &> "${t2}" || true - newvendorHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f2 | tr -d ' ' || true)" - if [[ "${newvendorHash}" == "sha256" ]] - then - newvendorHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f3 | tr -d ' ' || true)" - fi - newvendorHash="$(nix hash convert --hash-algo sha256 "${newvendorHash}")" - sed -i "s|${fakeHash}|${newvendorHash}|" "${metadata}" - fi - - # Commit - git diff-index --quiet HEAD "${pkg}" || \ - git commit -q -n "${pkg}" -m "${COMMIT_PREFIX} \`${pkgname}\`" -m "${rev} ---> ${newrev}" - echo -e "Finished Updating '${pkgname}' ('${rev}' ---> '${newrev}')\n" - exit 0 - fi -} -export -f update - -# Execution -main() { - echo "Checking for Updates..." -} - -while true -do - (main) - find . -mindepth 1 -maxdepth 1 -type d -exec bash -c 'update "$0"' {} \; - res=$? - if (( res != 255 )) - then - break - fi -done diff --git a/nixos/scripts/pci.sh b/nixos/scripts/pci.sh @@ -1,13 +0,0 @@ -#! /usr/bin/env nix -#! nix shell nixpkgs#bash nixpkgs#coreutils -c bash - -# Shows PCI Devices mapped to IOMMU Groups # - -for group in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V) -do - echo "IOMMU Group ""${group##*/}"":" - for device in "$group"/devices/* - do - echo -e "\t$(lspci -nns "${device##*/}")" - done -done diff --git a/nixos/scripts/sysutils.nix b/nixos/scripts/sysutils.nix @@ -1,258 +0,0 @@ -{ - lib, - pkgs, - files, - ... -}: -let - inherit (lib) licenses recursiveUpdate; - - help = '' - # Legend # - xxx - Command [action] - Description - - # Usage # - help - Show this information - brightness [up,down] - Screen Brightness Controls - backlight [up,down] - Keyboard Backlight Controls - temperature - Display Temperature Control - volume [up,down,mute] - Volume Controls - media [next,previous,toggle] - Media Controls - toggle  - service ['name'] - Toggle SYSTEMD Service - ''; -in -recursiveUpdate - { - meta = { - mainProgram = "sysutils"; - description = "System Utility Script"; - homepage = files.path.repo; - license = licenses.gpl3Only; - maintainers = [ "maydayv7" ]; - }; - } - ( - pkgs.writeShellApplication { - name = "sysutils"; - runtimeInputs = with pkgs; [ - coreutils - gnugrep - wget - - alsa-utils - brightnessctl - brillo - libnotify - playerctl - sunsetr - systemd - ]; - - text = '' - set +eu - ${files.scripts.commands} - show_album_art=true - show_music_in_volume_indicator=true - - notify() { - notify-send -a "utility" -t 1000 -h string:x-canonical-private-synchronous:"$1" "''${@:2}" - } - - fail() { - error "$1" "Try 'sysutils help' for more information" - } - - get_media_icon() { - media_icon="audio-speakers" - if $show_album_art - then - temp sysutils_media-icon 1 - url=$(playerctl -f "{{mpris:artUrl}}" metadata) - if [[ "$url" == "file://"* ]] - then - media_icon="''${url/file:\/\//}" - elif [[ "$url" == "http://"* ]] || [[ "$url" == "https://"* ]] - then - filename="$(echo "$url" | sed "s/.*\///")" - if [ ! -f "$TEMP/$filename" ]; then wget -O "$TEMP/$filename" "$url"; fi - media_icon="$TEMP/$filename" - fi - fi - } - - case "$1" in - "") error "Expected an Option" "${help}";; - "help") echo -e "## System Utility Script ##\n${help}";; - "brightness") - brightness_notification() { - brightness=$(brillo | grep -Po '[0-9]{1,3}' | head -n 1) - notify brightness -i "display" -h int:value:"$brightness" "🔅 $brightness%" - } - case "$2" in - "up") - brillo -u 300000 -A 5 - brightness_notification - ;; - "down") - brillo -u 300000 -U 5 - brightness_notification - ;; - "") fail "Expected an Option" ;; - *) fail "Unexpected Option 'brightness $2'" ;; - esac - ;; - "backlight") - backlight_notification() { - backlight="$(cat /sys/class/leds/*::kbd_backlight/brightness)" - light=0; if [ "$backlight" -eq 1 ]; then light=33; fi - if [ "$backlight" -eq 2 ]; then light=67; fi - if [ "$backlight" -eq 3 ]; then light=100; fi - notify backlight -i "keyboard" -h int:value:"$light" "🔅 $light%" - } - case "$2" in - "up") - brightnessctl -d "*::kbd_backlight" set 33%+ - backlight_notification - ;; - "down") - brightnessctl -d "*::kbd_backlight" set 33%- - backlight_notification - ;; - "") fail "Expected an Option" ;; - *) fail "Unexpected Option 'brightness $2'" ;; - esac - ;; - "temperature") - readarray -t presets < <(sunsetr preset list) - active_preset=$(sunsetr preset active) - cur_ind=-1 - for i in "''${!presets[@]}" - do - if [ "''${presets[$i]}" = "$active_preset" ] - then - cur_ind=$i - break - fi - done - - if [ "$cur_ind" -eq -1 ] - then - next_ind=0 - else - next_ind=$(( (cur_ind + 1) % ''${#presets[@]} )) - fi - - next_preset="''${presets[$next_ind]}" - sunsetr preset "$next_preset" - notify temperature -i "display" "🌡 Preset: $next_preset" - ;; - "volume") - volume_notification() { - volume=$(amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1) - mute=$(amixer get Master | grep '%' | grep -oE '[^ ]+$' | grep off | head -n1) - if [ "$volume" -eq 0 ] || [ "$mute" == "[off]" ] - then - volume_icon="🔇" - elif [ "$volume" -lt 50 ] - then - volume_icon="🔉" - else - volume_icon="🔊" - fi - - song_title=$(playerctl -f "{{title}}" metadata) - get_media_icon - if $show_music_in_volume_indicator && [ -n "$song_title" ] - then - song_artist=$(playerctl -f "{{artist}}" metadata) - if [ -z "$song_artist" ] - then - notify volume -h int:value:"$volume" -i "$media_icon" "$volume_icon $volume%" "$song_title" - else - notify volume -h int:value:"$volume" -i "$media_icon" "$volume_icon $volume%" "$song_title\nBy $song_artist" - fi - else - notify volume -h int:value:"$volume" -i "$media_icon" "$volume_icon $volume%" - fi - } - case "$2" in - "up") - amixer set Master on - amixer sset Master 5%+ - volume_notification - ;; - "down") - amixer set Master on - amixer sset Master 5%- - volume_notification - ;; - "mute") - amixer set Master 1+ toggle - volume_notification - ;; - "") fail "Expected an Option" ;; - *) fail "Unexpected Option 'volume $2'" ;; - esac - ;; - "media") - music_notification() { - song_title=$(playerctl -f "{{title}}" metadata) - song_artist=$(playerctl -f "{{artist}}" metadata) - song_album=$(playerctl -f "{{album}}" metadata) - get_media_icon - if [ -z "$song_album" ] - then - if [ -z "$song_artist" ] - then - notify music -i "$media_icon" "$song_title" - else - notify music -i "$media_icon" "$song_title" "By $song_artist" - fi - else - notify music -i "$media_icon" "$song_title" "By $song_artist from $song_album" - fi - } - case "$2" in - "next") - playerctl next - sleep 0.5 && music_notification - ;; - "previous") - playerctl previous - sleep 0.5 && music_notification - ;; - "toggle") - playerctl play-pause - music_notification - ;; - "") fail "Expected an Option" ;; - *) fail "Unexpected Option 'media $2'" ;; - esac - ;; - "toggle") - case "$2" in - "service") - if [ -z "$3" ] - then - fail "Expected service name" - fi - - if systemctl --user is-active "$3" - then - systemctl --user stop "$3" - notify service -i "system-config-services" "Stopped $3" - else - systemctl --user start "$3" - notify service -i "system-config-services" "Started $3" - fi - ;; - "") fail "Expected an Option" ;; - *) fail "Unexpected Option 'toggle $2'" ;; - esac - ;; - *) fail "Unexpected Option '$1'" ;; - esac - ''; - } - ) diff --git a/nixos/secrets/README.md b/nixos/secrets/README.md @@ -1,10 +0,0 @@ -### Credentials - -The authentication credentials are managed using [`sops-nix`](https://github.com/Mic92/sops-nix) at `secrets`. -The [`sops`](https://github.com/mozilla/sops) encrypted secrets (using GPG) are stored at multiple places, like in this directory, as well as [`users/passwords`](../users/passwords). -User passwords are generated using `mkpasswd -m sha-512` and specified using the `hashedPasswordFile` option. -The `sops` encrypted secrets are of `binary` format (and have the extension `.secret`) and can be conveniently managed using the [`nixos`](../scripts/README.md) `secret` command. -The `keys` directory contains the _public_ User GPG Keys which are automatically imported - -To create a secret, use the `nixos secret create` command, and append the directory along with requisite access permissions to the `secrets.yaml` file. -Device-specific secrets are automatically imported, if a directory (with the same name as the device `HOSTNAME`) containing them is present in this directory diff --git a/nixos/secrets/default.nix b/nixos/secrets/default.nix @@ -1,35 +0,0 @@ -{ - config, - util, - inputs, - pkgs, - files, - ... -}: -let - path = files.path.gpg; -in -{ - imports = [ inputs.sops.nixosModules.sops ]; - - ## Authentication Credentials Management ## - config = { - environment = { - persist.directories = [ path ]; - systemPackages = [ pkgs.sops ]; - }; - - sops = { - # GPG Key Import - gnupg.home = path; - - # Encrypted Secrets - secrets = - let - directory = ./. + "/${config.networking.hostName}"; - in - util.map.secrets { directory = ./.; } - // (if (builtins.pathExists directory) then util.map.secrets { inherit directory; } else { }); - }; - }; -} diff --git a/nixos/secrets/secrets.yaml b/nixos/secrets/secrets.yaml @@ -1,13 +0,0 @@ -keys: - - &v7 8C240C0C11293EE56260601CCF616EB19C2765E4 - - &navya B141E0D9F711DD86DEAE1269D9B023AB01B68EFE -creation_rules: - - path_regex: secrets/.*$ - key_groups: - - pgp: - - *v7 - - path_regex: users/passwords/.*$ - key_groups: - - pgp: - - *v7 - - *navya diff --git a/nixos/shells/.envrc b/nixos/shells/.envrc @@ -1 +0,0 @@ -eval "$(lorri direnv --shell-file default.nix)" diff --git a/nixos/shells/android.nix b/nixos/shells/android.nix @@ -1,51 +0,0 @@ -pkgs: -let - androidEnv = pkgs.callPackage "${toString pkgs.path}/pkgs/development/mobile/androidenv" { - inherit pkgs; - licenseAccepted = true; - }; - - buildTools = "35.0.0"; - inherit - (androidEnv.composeAndroidPackages { - cmdLineToolsVersion = "8.0"; - toolsVersion = "26.1.1"; - platformToolsVersion = "35.0.2"; - buildToolsVersions = [ buildTools ]; - includeEmulator = false; - platformVersions = [ "35" ]; - includeSystemImages = false; - includeSources = false; - cmakeVersions = [ "3.22.1" ]; - includeNDK = true; - ndkVersions = [ "27.0.12077973" ]; - extraLicenses = [ - "android-sdk-license" - "android-sdk-preview-license" - ]; - }) - androidsdk - ; - -in -rec { - name = "Android"; - packages = with pkgs; [ - jdk - kotlin - gradle - flutter - - androidsdk - pkg-config - ]; - - shellHook = ''echo "## Android Development Shell ##"''; - JAVA_HOME = pkgs.jdk; - GRADLE_HOME = "${pkgs.gradle}/lib/gradle"; - GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidsdk}/libexec/android-sdk/build-tools/${buildTools}/aapt2"; - FLUTTER_ROOT = pkgs.flutter; - DART_ROOT = "${FLUTTER_ROOT}/bin/cache/dart-sdk"; - ANDROID_SDK_ROOT = "${androidsdk}/libexec/android-sdk"; - ANDROID_NDK_ROOT = "${ANDROID_SDK_ROOT}/ndk-bundle"; -} diff --git a/nixos/shells/cc.nix b/nixos/shells/cc.nix @@ -1,13 +0,0 @@ -pkgs: { - name = "C"; - packages = with pkgs; [ - clang - cmake - gcc - gdb - libcxx - ]; - - shellHook = ''echo "## C/C++ Development Shell ##"''; - LIBCLANG_PATH = "${pkgs.libclang}/lib"; -} diff --git a/nixos/shells/default.nix b/nixos/shells/default.nix @@ -1,25 +0,0 @@ -{ - pkgs ? import ../packages, - ... -}: -with pkgs; -mkShell { - name = "devShell"; - packages = [ - git - gnupg - jq - nixFlakes - sops - treefmt - ] - ++ [ - figlet - fastfetch - ]; - - shellHook = '' - echo -e "\e[36m## Default Developer Shell ##" - echo -e "\e[34m Version: $(nix --version)" - ''; -} diff --git a/nixos/shells/flake.nix b/nixos/shells/flake.nix @@ -1,11 +0,0 @@ -{ util, ... }: -{ - ## Developer Shells ## - perSystem = - { pkgs, ... }: - { - devShells = util.map.modules ./. (file: pkgs.mkShell (import file pkgs)) // { - default = import ./. { inherit pkgs; }; - }; - }; -} diff --git a/nixos/shells/java.nix b/nixos/shells/java.nix @@ -1,6 +0,0 @@ -pkgs: { - name = "Java"; - packages = [ pkgs.jdk ]; - shellHook = ''echo "## Java Development Shell ##"''; - JAVA_HOME = pkgs.jdk; -} diff --git a/nixos/shells/js.nix b/nixos/shells/js.nix @@ -1,12 +0,0 @@ -pkgs: { - name = "JS"; - shellHook = ''echo "## JavaScript Development Shell ##"''; - packages = with pkgs; [ - nodejs - typescript - - eslint - nodemon - postman - ]; -} diff --git a/nixos/shells/lua.nix b/nixos/shells/lua.nix @@ -1,8 +0,0 @@ -pkgs: { - name = "Lua"; - shellHook = ''echo "## Lua Development Shell ##"''; - packages = with pkgs; [ - lua - luaPackages.moonscript - ]; -} diff --git a/nixos/shells/python.nix b/nixos/shells/python.nix @@ -1,22 +0,0 @@ -pkgs: { - name = "Python"; - shellHook = ''echo "## Python Development Shell ##"''; - packages = [ - pkgs.python3 - (pkgs.python3.withPackages ( - p: with p; [ - pip - poetry-core - setuptools - - black - pylint - - ipython - matplotlib - numpy - pandas - ] - )) - ]; -} diff --git a/nixos/shells/rust.nix b/nixos/shells/rust.nix @@ -1,10 +0,0 @@ -pkgs: { - name = "Rust"; - packages = with pkgs; [ - cargo - rustup - ]; - - shellHook = ''echo "## Rust Development Shell ##"''; - RUST_BACKTRACE = 1; -} diff --git a/nixos/shells/sql.nix b/nixos/shells/sql.nix @@ -1,37 +0,0 @@ -pkgs: -let - pkg = pkgs.mariadb; -in -{ - name = "SQL"; - packages = [ pkg ]; - shellHook = '' - alias mysql='mysql -u root' - MYSQL_HOME=$HOME/.mysql - MYSQL_DATADIR=$MYSQL_HOME/data - export MYSQL_UNIX_PORT=$MYSQL_HOME/mysql.sock - MYSQL_PID_FILE=$MYSQL_HOME/mysql.pid - - if [ ! -d "$MYSQL_HOME" ] - then - # Make sure to use normal authentication method - # otherwise we can only connect with unix account - # but users do not actually exist in NixOS - mysql_install_db --auth-root-authentication-method=normal \ - --datadir=$MYSQL_DATADIR --basedir=${pkg} \ - --pid-file=$MYSQL_PID_FILE - fi - - # Starts the daemon - mysqld --datadir=$MYSQL_DATADIR --pid-file=$MYSQL_PID_FILE \ - --socket=$MYSQL_UNIX_PORT 2> $MYSQL_HOME/mysql.log & - MYSQL_PID=$! - - finish() { - mysqladmin -u root --socket=$MYSQL_UNIX_PORT shutdown - kill $MYSQL_PID - wait $MYSQL_PID - } - trap finish EXIT - ''; -} diff --git a/nixos/shells/video.nix b/nixos/shells/video.nix @@ -1,13 +0,0 @@ -pkgs: { - name = "Video"; - shellHook = ''echo "## Video Editing Shell ##"''; - packages = with pkgs; [ - audacity - blender - ffmpeg - handbrake - mpv - obs-studio - yt-dlp - ]; -} diff --git a/nixos/site b/nixos/site @@ -1 +0,0 @@ -../site -\ No newline at end of file diff --git a/nixos/users/README.md b/nixos/users/README.md @@ -1,7 +0,0 @@ -### Users - -The `users` directory contains the individual user-specific configurations for multiple users (of a single PC or multiple ones). -To add a user, create a configuration file matching the `username` and write down the configuration using the `home-manager` module [options](https://home-manager-options.extranix.com/). The configuration is automatically imported, if present. -Do not forget to create a `USERNAME.secret` file (using `nixos secret create`) in [`passwords`](./passwords) containing the user password. - -There is also a `recovery` user defined in the system configuration as a [specialisation](https://wiki.nixos.org/wiki/Specialisation). diff --git a/nixos/users/default.nix b/nixos/users/default.nix @@ -1,114 +0,0 @@ -{ - config, - lib, - util, - files, - ... -}: -let - inherit (builtins) attrValues map; - inherit (lib) - mkBefore - mkIf - mkOption - types - ; - - cfg = config.credentials; - dir = config.home.homeDirectory; -in -{ - options.credentials = { - name = mkOption { - description = "Work User Name"; - type = types.str; - default = config.home.username; - }; - - fullname = mkOption { - description = "Full User Name"; - type = types.str; - default = "Default User"; - }; - - mail = mkOption { - description = "User Mail ID"; - type = types.str; - default = ""; - example = "user@email.com"; - }; - - key = mkOption { - description = "User GPG Key"; - type = types.str; - default = ""; - example = "Use 'gpg --list-signatures --keyid-format short'"; - }; - }; - - ## Home Configuration ## - config = { - home.file = { - # Wallpapers - ".local/share/backgrounds".source = files.wallpapers.path; - - # GTK+ Bookmarks - ".config/gtk-3.0/bookmarks".text = mkBefore '' - file://${dir}/Downloads Downloads - file://${dir}/Pictures Pictures - file://${dir}/Documents Documents - ''; - }; - - # GPG Settings - programs.gpg = { - settings = mkIf (cfg.key != "") { - default-key = cfg.key; - default-recipient-self = true; - auto-key-locate = "local,wkd,keyserver"; - keyserver = "hkps://keys.openpgp.org"; - auto-key-retrieve = true; - auto-key-import = true; - keyserver-options = "honor-keyserver-url"; - }; - - publicKeys = - map - (source: { - inherit source; - trust = "ultimate"; - }) - ( - attrValues ( - util.map.files { - directory = ../secrets/keys; - extension = ".gpg"; - } - ) - ); - }; - - # XDG Configuration - xdg = { - enable = true; - mime.enable = true; - mimeApps.enable = true; - configFile."mimeapps.list".force = true; - - # User Home Directories - userDirs = { - enable = true; - createDirectories = true; - desktop = "$HOME/Desktop"; - documents = "$HOME/Documents"; - download = "$HOME/Downloads"; - music = "$HOME/Music"; - pictures = "$HOME/Pictures"; - publicShare = "$HOME/Public"; - templates = "$HOME/Templates"; - videos = "$HOME/Videos"; - extraConfig."XDG_SCREENSHOTS_DIR" = "$HOME/Pictures/Screenshots"; - }; - }; - }; -} diff --git a/nixos/users/navya.nix b/nixos/users/navya.nix @@ -1,8 +0,0 @@ -_: { - # Personal Credentials - credentials = { - fullname = "Navya G"; - mail = "gnavya009@gmail.com"; - key = "B141E0D9F711DD86DEAE1269D9B023AB01B68EFE"; - }; -} diff --git a/nixos/users/v7/accounts.conf b/nixos/users/v7/accounts.conf @@ -1,9 +0,0 @@ -[Account account_1635317848_0] -Provider=google -MailEnabled=true -CalendarEnabled=true -ContactsEnabled=true -DocumentsEnabled=true -PhotosEnabled=true -FilesEnabled=false -PrintersEnabled=false diff --git a/nixos/users/v7/default.nix b/nixos/users/v7/default.nix @@ -1,46 +0,0 @@ -{ - config, - lib, - pkgs, - files, - ... -}: -let - homeDir = config.home.homeDirectory; -in -{ - # Personal Credentials - credentials = { - name = "maydayv7"; - fullname = "V7"; - mail = "73811274+maydayv7@users.noreply.github.com"; - key = "8C240C0C11293EE56260601CCF616EB19C2765E4"; - }; - - # Home Configuration - home = { - packages = [ pkgs.home-manager ]; - persist.directories = [ - "TBD" - "Projects" - ]; - - # Directory Symlinks - file = { - # Profile Picture - ".face".source = ./profile.png; - - # Online Accounts - ".config/goa-1.0/accounts.conf".text = builtins.readFile ./accounts.conf; - - # Dotfiles - "Projects/dotfiles".source = config.lib.file.mkOutOfStoreSymlink files.path.system; - - # GTK+ Bookmarks - ".config/gtk-3.0/bookmarks".text = lib.mkBefore '' - file://${homeDir}/TBD TBD - file://${homeDir}/Projects Projects - ''; - }; - }; -} diff --git a/packages/README.md b/packages/README.md @@ -0,0 +1,20 @@ +### Packages + +The `packages` directory contains custom-built packages (can be accessed by `github:maydayv7/dotfiles#packages.${system}`). Packages which have a separate `metadata.nix` can be automatically updated using `sh update.sh` + +The `overlays` directory contains overrides for pre-built packages (See [this](https://wiki.nixos.org/wiki/Overlays) for more information) + +It is advisable to use Flake `inputs` as package sources. To pin it to a specific commit/revision add `?rev=` after the `url`. Else you may also specify the source using `fetch` functions +In case you don't know the hash for the source, set: + +``` +hash = lib.fakeHash; +sha256 = lib.fakeSha256; +``` + +Then Nix will fail the build with an `error` message and give the correct hash +Otherwise run <code>nix hash convert --hash-algo sha256 $(nix-prefetch-url <b>url</b>)</code> to obtain the hash + +### Patches + +The `nixpkgs` package channel can be patched by simply dropping a valid `.patch` file into the `patches` directory diff --git a/packages/_config.nix b/packages/_config.nix @@ -0,0 +1,7 @@ +{ + allowAliases = true; + allowBroken = false; + allowUnfree = true; + allowInsecurePredicate = _: true; + pulseAudio = true; +} diff --git a/packages/_module.nix b/packages/_module.nix @@ -0,0 +1,97 @@ +## Package Configuration ## +{ + config, + inputs, + lib, + ... +}: let + map = import ../lib/map.nix lib; + inherit (builtins) any attrValues isPath; +in { + perSystem = { + self', + system, + lib, + inputs', + pkgs, + ... + }: + rec { + _module.args.pkgs = legacyPackages; + legacyPackages = with inputs; let + nixpkgsConfig = import ./_config.nix; + in + import (config.flake.patchedPkgs system) { + inherit system; + config = nixpkgsConfig; + + overlays = + (attrValues config.flake.overlays or {}) + ++ [ + (_: _: { + custom = config.flake.packages."${system}" or {}; + stagit-fork = stagit.packages."${system}".default; + unstable = import unstable { + inherit system; + config = nixpkgsConfig; + }; + + gaming = gaming.packages."${system}"; + wine = windows.packages."${system}"; + winelib = windows.lib."${system}"; + spicetify = spicetify.legacyPackages."${system}"; + hyprworld = + hyprland.packages."${system}" // hyprsplit.packages."${system}" // hyprcursors.packages."${system}"; + }) + minecraft.overlay + vscode.overlays.default + ]; + }; + } + // ( + let + call = rec { + __functor = _: name: pkg name {}; + pkg = name: args: pkgs.callPackage name ({inherit lib pkgs;} // {inherit (config) util;} // args); + script = name: + pkg name { + inherit inputs; + inherit (config.flake) files; + }; + }; + in { + packages = + map.modules ../packages call // map.modules ../scripts call.script // inputs'.proprietary.packages; + apps = + map.modules ../scripts ( + name: let + drv = call.script name; + in { + type = "app"; + program = lib.getExe drv; + meta = drv.meta or {}; + } + ) + // { + default = self'.apps.nixos; + }; + } + ); + + flake = { + patchedPkgs = system: let + src = inputs.nixpkgs; + patches = map.patches ./patches; + pkgs' = import src {inherit system;}; + in + if !(any isPath patches) + then src + else + pkgs'.applyPatches { + inherit src patches; + name = "nixpkgs-patched-${src.shortRev}"; + }; + + overlays = map.modules ./overlays import; + }; +} diff --git a/packages/default.nix b/packages/default.nix @@ -0,0 +1,2 @@ +# Package Channel +with builtins; (getFlake "git+file://${toString ../.}").legacyPackages."${currentSystem}" diff --git a/packages/fabric-ca.nix b/packages/fabric-ca.nix @@ -0,0 +1,36 @@ +{ + lib, + pkgs, + ... +}: +with pkgs; + buildGoModule rec { + pname = "fabric-ca"; + version = "1.5.15"; + + src = fetchFromGitHub { + owner = "hyperledger"; + repo = "fabric-ca"; + rev = "v${version}"; + hash = "sha256-kJGeA30hoRk98/io/O5lorw96bpiGpheSaHrHVqqO+s="; + }; + + vendorHash = null; + postPatch = "rm cmd/fabric-ca-server/main_test.go"; + ldflags = [ + "-s" + "-w" + ]; + + subPackages = [ + "cmd/fabric-ca-client" + "cmd/fabric-ca-server" + ]; + + meta = with lib; { + description = "Certificate Authority for Hyperledger Fabric"; + homepage = "https://wiki.hyperledger.org/display/fabric"; + license = licenses.asl20; + maintainers = ["maydayv7"]; + }; + } diff --git a/packages/geany-catppuccin/default.nix b/packages/geany-catppuccin/default.nix @@ -0,0 +1,32 @@ +{ + lib, + pkgs, + ... +}: +with pkgs; let + metadata = import ./metadata.nix; +in + stdenv.mkDerivation { + pname = "geany-catppuccin"; + version = metadata.rev; + + src = fetchFromGitHub { + owner = "catppuccin"; + repo = "geany"; + inherit (metadata) rev sha256; + }; + + dontBuild = true; + patches = [./selection.patch]; + installPhase = '' + mkdir -p $out/share/geany/colorschemes/ + cp -r ./src/. $out/share/geany/colorschemes/ + ''; + + meta = with lib; { + description = "Soothing pastel theme for Geany"; + homepage = metadata.repo; + license = licenses.mit; + maintainers = ["maydayv7"]; + }; + } diff --git a/packages/geany-catppuccin/metadata.nix b/packages/geany-catppuccin/metadata.nix @@ -0,0 +1,5 @@ +{ + repo = "https://github.com/catppuccin/geany"; + rev = "ab96041d6ec462b19e5d70c232e8a20bc738ca99"; + sha256 = "sha256-9QwL/tTqjkF7R9SP/1tGphBcgrjxCTrKqKbp5JuG/B8="; +} diff --git a/packages/geany-catppuccin/selection.patch b/packages/geany-catppuccin/selection.patch @@ -0,0 +1,11 @@ +--- a/src/catppuccin-macchiato.conf ++++ b/src/catppuccin-macchiato.conf +@@ -46,7 +46,7 @@ error=red;yellow;false;true + op=blue;base;true;false + # Editor UI + # selection: words; background +-selection=pink;blue;false;false ++selection=;surface1;false;true + current_line=;surface0;true + brace_good=green;overlay1;true;true + brace_bad=red;overlay1;true;true diff --git a/packages/hyprshellevents/default.nix b/packages/hyprshellevents/default.nix @@ -0,0 +1,41 @@ +{ + lib, + pkgs, + ... +}: +with pkgs; let + metadata = import ./metadata.nix; +in + stdenvNoCC.mkDerivation (final: { + pname = "hyprshellevents"; + version = metadata.rev; + sourceRoot = "${final.src.name}/shellevents"; + + src = fetchFromGitHub { + owner = "hyprwm"; + repo = "contrib"; + inherit (metadata) rev sha256; + }; + + buildInputs = [bash]; + makeFlags = ["PREFIX=$(out)"]; + nativeBuildInputs = [makeWrapper]; + postInstall = '' + wrapProgram $out/bin/shellevents --prefix PATH ':' \ + "${ + lib.makeBinPath [ + coreutils + hyprland + ] + }" + ''; + + meta = with lib; { + mainProgram = "shellevents"; + description = "Run shell scripts in response to Hyprland events"; + homepage = metadata.repo; + license = licenses.mit; + platforms = platforms.unix; + maintainers = ["maydayv7"]; + }; + }) diff --git a/packages/hyprshellevents/metadata.nix b/packages/hyprshellevents/metadata.nix @@ -0,0 +1,5 @@ +{ + repo = "https://github.com/hyprwm/contrib"; + rev = "541628cebe42792ddf5063c4abd6402c2f1bd68f"; + sha256 = "sha256-CopNx3j//gZ2mE0ggEK9dZ474UcbDhpTw+KMor8mSxI="; +} diff --git a/packages/kebihelp/default.nix b/packages/kebihelp/default.nix @@ -0,0 +1,42 @@ +{ + lib, + pkgs, + ... +}: +with pkgs; +with python311Packages; let + metadata = import ./metadata.nix; +in + buildPythonPackage rec { + pname = "kebihelp"; + version = metadata.rev; + + src = fetchFromGitHub { + owner = "juienpro"; + repo = pname; + inherit (metadata) rev sha256; + }; + + build-system = [setuptools-scm]; + nativeBuildInputs = [libsForQt5.qt5.wrapQtAppsHook]; + propagatedBuildInputs = [ + prettytable + pyqt5 + pyqt5-sip + libsForQt5.qt5.qtwayland + ]; + + format = "pyproject"; + dontWrapQtApps = true; + dontCheckRuntimeDeps = true; + preFixup = '' + makeWrapperArgs+=("''${qtWrapperArgs[@]}") + ''; + + meta = with lib; { + description = "Universal Keybinding helper written in Python and QT5"; + homepage = metadata.repo; + license = licenses.mit; + maintainers = ["maydayv7"]; + }; + } diff --git a/packages/kebihelp/metadata.nix b/packages/kebihelp/metadata.nix @@ -0,0 +1,6 @@ +{ + repo = "https://github.com/juienpro/kebihelp"; + release = true; + rev = "v0.1.2"; + sha256 = "sha256-GWsStVpUk7BCtfcRzcaSn4MNuomgrRef0XAFWnUcPAk="; +} diff --git a/packages/kitty-search/default.nix b/packages/kitty-search/default.nix @@ -0,0 +1,28 @@ +{ + lib, + pkgs, + ... +}: +with pkgs; let + metadata = import ./metadata.nix; +in + stdenv.mkDerivation rec { + pname = "kitty-kitten-search"; + version = metadata.rev; + + src = fetchFromGitHub { + owner = "trygveaa"; + repo = pname; + inherit (metadata) rev sha256; + }; + + dontBuild = true; + installPhase = "mkdir -p $out/ && cp -r . $out/"; + + meta = with lib; { + description = " Kitten for searching in Kitty Terminal"; + homepage = metadata.repo; + license = licenses.gpl3Only; + maintainers = ["maydayv7"]; + }; + } diff --git a/packages/kitty-search/metadata.nix b/packages/kitty-search/metadata.nix @@ -0,0 +1,6 @@ +{ + repo = "https://github.com/trygveaa/kitty-kitten-search"; + branch = "master"; + rev = "992c1f3d220dc3e1ae18a24b15fcaf47f4e61ff8"; + sha256 = "sha256-Xy4dH2fzEQmKfqhmotVDEszuTqoISONGNfC1yfcdevs="; +} diff --git a/packages/kvlibadwaita/default.nix b/packages/kvlibadwaita/default.nix @@ -0,0 +1,31 @@ +{ + lib, + pkgs, + ... +}: +with pkgs; let + metadata = import ./metadata.nix; +in + stdenv.mkDerivation rec { + pname = "KvLibadwaita"; + version = metadata.rev; + + src = fetchFromGitHub { + owner = "GabePoel"; + repo = pname; + inherit (metadata) rev sha256; + }; + + dontBuild = true; + installPhase = '' + mkdir -p $out/share/Kvantum/ + cp -r ./src/. $out/share/Kvantum/ + ''; + + meta = with lib; { + description = "Libadwaita style theme for Kvantum"; + homepage = metadata.repo; + license = licenses.gpl3Only; + maintainers = ["maydayv7"]; + }; + } diff --git a/packages/kvlibadwaita/metadata.nix b/packages/kvlibadwaita/metadata.nix @@ -0,0 +1,5 @@ +{ + repo = "https://github.com/GabePoel/KvLibadwaita"; + rev = "1f4e0bec44b13dabfa1fe4047aa8eeaccf2f3557"; + sha256 = "sha256-jCXME6mpqqWd7gWReT04a//2O83VQcOaqIIXa+Frntc="; +} diff --git a/packages/overlays/brave.nix b/packages/overlays/brave.nix @@ -0,0 +1,13 @@ +final: prev: { + # Brave Browser Flags + brave = prev.brave.overrideAttrs (old: { + installPhase = + old.installPhase + + '' + exe="$out/bin/brave" + fix=" --enable-features=TouchpadOverscrollHistoryNavigation --gtk-version=4" + substituteInPlace $out/share/applications/{brave-browser,com.brave.Browser}.desktop \ + --replace-fail $exe "$exe$fix" + ''; + }); +} diff --git a/packages/overlays/nix-output-monitor.nix b/packages/overlays/nix-output-monitor.nix @@ -0,0 +1,20 @@ +final: prev: { + # 'nom' Rendering + nix-output-monitor = prev.nix-output-monitor.overrideAttrs (old: { + postPatch = + old.postPatch or "" + + '' + sed -ie ${final.lib.escapeShellArg '' + s/↓/\\xf072e/ + s/↑/\\xf0737/ + s/⏱/\\xf520/ + s/⏵/\\xf04b/ + s/✔/\\xf00c/ + s/⏸/\\xf04d/ + s/⚠/\\xf071/ + s/∅/\\xf1da/ + s/∑/\\xf04a0/ + ''} lib/NOM/Print.hs + ''; + }); +} diff --git a/packages/overlays/nixFlakes.nix b/packages/overlays/nixFlakes.nix @@ -0,0 +1,4 @@ +final: prev: { + # Nix Version + nixFlakes = final.nixVersions.latest; +} diff --git a/nixos/files/templates/File b/packages/patches/.keep diff --git a/packages/patches/copilot.patch b/packages/patches/copilot.patch @@ -0,0 +1,31 @@ +--- a/pkgs/by-name/gi/github-copilot-cli/package.nix ++++ b/pkgs/by-name/gi/github-copilot-cli/package.nix +@@ -15,7 +15,7 @@ + + stdenv.mkDerivation (finalAttrs: { + pname = "github-copilot-cli"; +- version = "1.0.26"; ++ version = "1.0.61"; + + # GitHub provide platform-specific SEA binaries as well as a "universal" + # package. Use the universal package as it gives us a bit more flexibility +@@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { + # about how paths should be set up which don't reliably hold when using Nix. + src = fetchurl { + url = "https://github.com/github/copilot-cli/releases/download/v${finalAttrs.version}/github-copilot-${finalAttrs.version}.tgz"; +- hash = "sha256-zNO0clQRfgw6CX9K8NaJXsoOhhNjBfK7KAr0AoL7Oqo="; ++ hash = "sha256-8Lks8lHa5XF9ZrC+fU/9VlzD1W32MbRZ7PZtL5YWLTA="; + }; + + nativeBuildInputs = [ +@@ -58,6 +58,10 @@ stdenv.mkDerivation (finalAttrs: { + ''; + + postInstall = '' ++ # Upstream bundles linuxmusl prebuilds in the universal tarball; they are ++ # not needed on glibc systems and make autoPatchelf fail on musl libc deps. ++ find "$out"/lib/github-copilot-cli -depth -path '*/linuxmusl-*' -exec rm -rf '{}' + ++ + makeWrapper ${nodejs}/bin/node "$out"/bin/copilot \ + --add-flag "$out"/lib/github-copilot-cli/index.js \ + --add-flag --no-auto-update \ diff --git a/packages/thunderbird-tools-ng/default.nix b/packages/thunderbird-tools-ng/default.nix @@ -0,0 +1,36 @@ +{ + lib, + pkgs, + ... +}: +with pkgs; let + metadata = import ./metadata.nix; + addonId = "ImportExportToolsNG@cleidigh.kokkini.net"; +in + stdenvNoCC.mkDerivation rec { + pname = "thunderbird-importexporttools-ng"; + version = lib.removePrefix "v" metadata.rev; + + src = fetchurl { + url = "${metadata.repo}/releases/download/v${version}/import-export-tools-ng-${version}-tb.xpi"; + inherit (metadata) sha256; + }; + + preferLocalBuild = true; + dontUnpack = true; + + installPhase = '' + runHook preInstall + dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" + mkdir -p "$dst" + install -v -m644 "$src" "$dst/${addonId}.xpi" + runHook postInstall + ''; + + meta = with lib; { + description = "Import/Export tools for messages and folders in Thunderbird"; + homepage = metadata.repo; + license = licenses.gpl3Only; + maintainers = ["maydayv7"]; + }; + } diff --git a/packages/thunderbird-tools-ng/metadata.nix b/packages/thunderbird-tools-ng/metadata.nix @@ -0,0 +1,6 @@ +{ + repo = "https://github.com/thunderbird/import-export-tools-ng"; + rev = "v15.0.0"; + release = true; + sha256 = "sha256-6nFAh+WVeqms/8/80iYKMqAo78yDJe6F7684mbfwpmo="; +} diff --git a/nixos/packages/update.sh b/packages/update.sh diff --git a/nixos/packages/patches/.keep b/packages/wine/.keep diff --git a/packages/wine/7zip.nix b/packages/wine/7zip.nix @@ -0,0 +1,83 @@ +{ + lib, + build, + pkgs, + wine, + ... +}: let + inherit (pkgs) copyDesktopItems fetchurl makeDesktopItem; + inherit (build) copyDesktopIcons makeDesktopIcon mkWindowsApp; +in + mkWindowsApp rec { + inherit wine; + pname = "7zip"; + version = "2601"; + src = fetchurl { + url = "https://www.7-zip.org/a/7z${version}.exe"; + sha256 = "sha256-YVl2WY+ADHCCfFpH5owrDSsX0Ei5chugccivgl0kdr0="; + }; + + dontUnpack = true; + wineArch = "win32"; + fileMap = {}; + enableInstallNotification = false; + nativeBuildInputs = [ + copyDesktopItems + copyDesktopIcons + ]; + + winAppInstall = '' + $WINE start /unix ${src} /S + wineserver -w + ''; + + winAppRun = '' + $WINE start /unix "$WINEPREFIX/drive_c/Program Files/7-Zip/7zFM.exe" "$ARGS" + ''; + + installPhase = '' + runHook preInstall + ln -s $out/bin/.launcher $out/bin/${pname} + runHook postInstall + ''; + + desktopItems = [ + (makeDesktopItem { + name = pname; + exec = pname; + icon = pname; + desktopName = "7-Zip"; + genericName = "Archive Manager"; + categories = [ + "Office" + "Utility" + ]; + mimeTypes = builtins.map (n: "application/" + n) [ + "epub+zip" + "x-zip-compressed-fb2" + "x-cbt" + "x-cb7" + "x-7z-compressed" + "vnd.rar" + "x-tar" + "zip" + ]; + }) + ]; + + desktopIcon = makeDesktopIcon { + name = "7zip"; + src = fetchurl { + url = "https://www.7-zip.org/7ziplogo.png"; + sha256 = "1nkas4wy40ffsmcji1a3gq8a61d72zp4w65jjpmqjj9wyh0j5b7q"; + }; + }; + + meta = with lib; { + description = "File Archiver with a High Compression Ratio"; + homepage = "https://www.7-zip.org/"; + license = licenses.bsd3; + platforms = platforms.linux; + maintainers = ["maydayv7"]; + }; + } diff --git a/packages/wine/notepad++.nix b/packages/wine/notepad++.nix @@ -0,0 +1,85 @@ +{ + lib, + build, + pkgs, + wine, + ... +}: let + inherit (pkgs) copyDesktopItems fetchurl makeDesktopItem; + inherit (build) copyDesktopIcons makeDesktopIcon mkWindowsAppNoCC; +in + mkWindowsAppNoCC rec { + inherit wine; + pname = "notepad-plus-plus"; + version = "8.7.3"; + src = fetchurl { + url = "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v${version}/npp.${version}.Installer.exe"; + sha256 = "0qb8x7fy2840wvc0ypmqk0zn806va3zrpdz6cdzrqwcyn76j3ymf"; + }; + + dontUnpack = true; + wineArch = "win32"; + + fileMap = { + "$HOME/.config/Notepad++" = "drive_c/users/$USER/AppData/Roaming/Notepad++"; + }; + + enableMonoBootPrompt = false; + nativeBuildInputs = [ + copyDesktopItems + copyDesktopIcons + ]; + + winAppInstall = '' + $WINE start /unix ${src} /S + wineserver -w + rm -f "$WINEPREFIX/drive_c/Program Files/Notepad++/uninstall.exe" + rm -fR "$WINEPREFIX/drive_c/Program Files/Notepad++/updater" + ''; + + winAppRun = '' + $WINE start /unix "$WINEPREFIX/drive_c/Program Files/Notepad++/notepad++.exe" "$ARGS" + ''; + + installPhase = '' + runHook preInstall + ln -s $out/bin/.launcher $out/bin/${pname} + runHook postInstall + ''; + + desktopItems = [ + (makeDesktopItem { + name = "Notepad++"; + exec = pname; + icon = pname; + desktopName = "Notepad++"; + genericName = "Text Editor"; + mimeTypes = ["text/plain"]; + categories = [ + "Utility" + "TextEditor" + ]; + }) + ]; + + desktopIcon = makeDesktopIcon { + name = pname; + icoIndex = 2; + src = fetchurl { + url = "https://notepad-plus-plus.org/favicon.ico"; + sha256 = "1av2m6m665ccfngnzqnbsnv2aky907p2c6ggvfxrwbp70szgj9vi"; + }; + }; + + meta = with lib; { + mainProgram = pname; + homepage = "https://notepad-plus-plus.org/"; + description = "A text and source code editor"; + license = licenses.gpl3Plus; + maintainers = ["maydayv7"]; + platforms = [ + "x86_64-linux" + "i686-linux" + ]; + }; + } diff --git a/popos/conky/conky.lua b/popos/conky/conky.lua @@ -1,551 +0,0 @@ --------------------------------------------------------------------------------- --- Conky Pop!OS --------------------------------------------------------------------------------- - -require("cairo") - --------------------------------------------------------------------------------- --- Clock DATA --- HOURS -clock_h = { - { - name = "time", - arg = "%H", - max_value = 12, - x = 110, - y = 80, - graph_radius = 53, - graph_thickness = 3, - graph_unit_angle = 30, - graph_unit_thickness = 30, - graph_bg_colour = 0xffffff, - graph_bg_alpha = 0.0, - graph_fg_colour = 0xFFFFFF, - graph_fg_alpha = 0.3, - txt_radius = 34, - txt_weight = 1, - txt_size = 10.0, - txt_fg_colour = 0xFFFFFF, - txt_fg_alpha = 0.6, - graduation_radius = 53, - graduation_thickness = 6, - graduation_mark_thickness = 2, - graduation_unit_angle = 30, - graduation_fg_colour = 0xFFFFFF, - graduation_fg_alpha = 0.3, - }, -} --- MINUTES -clock_m = { - { - name = "time", - arg = "%M", - max_value = 60, - x = 110, - y = 80, - graph_radius = 57, - graph_thickness = 2, - graph_unit_angle = 6, - graph_unit_thickness = 6, - graph_bg_colour = 0xffffff, - graph_bg_alpha = 0.1, - graph_fg_colour = 0xFFFFFF, - graph_fg_alpha = 0.3, - txt_radius = 70, - txt_weight = 0, - txt_size = 9.0, - txt_fg_colour = 0xFFFFFF, - txt_fg_alpha = 0.6, - graduation_radius = 57, - graduation_thickness = 0, - graduation_mark_thickness = 2, - graduation_unit_angle = 30, - graduation_fg_colour = 0xFFFFFF, - graduation_fg_alpha = 0.3, - }, -} --- SECONDS -clock_s = { - { - name = "time", - arg = "%S", - max_value = 60, - x = 110, - y = 80, - graph_radius = 50, - graph_thickness = 2, - graph_unit_angle = 6, - graph_unit_thickness = 2, - graph_bg_colour = 0xffffff, - graph_bg_alpha = 0.0, - graph_fg_colour = 0xFFFFFF, - graph_fg_alpha = 0.2, - txt_radius = 40, - txt_weight = 0, - txt_size = 12.0, - txt_fg_colour = 0xFFFFFF, - txt_fg_alpha = 0.3, - graduation_radius = 0, - graduation_thickness = 0, - graduation_mark_thickness = 0, - graduation_unit_angle = 0, - graduation_fg_colour = 0xFFFFFF, - graduation_fg_alpha = 0.0, - }, -} - --------------------------------------------------------------------------------- --- Gauge DATA -gauge = { - { - name = "cpu", - arg = "cpu0", - max_value = 100, - x = 85, - y = 200, - graph_radius = 24, - graph_thickness = 5, - graph_start_angle = 180, - graph_unit_angle = 2.7, - graph_unit_thickness = 2.7, - graph_bg_colour = 0xffffff, - graph_bg_alpha = 0.1, - graph_fg_colour = 0xFFFFFF, - graph_fg_alpha = 0.2, - hand_fg_colour = 0xEF5A29, - hand_fg_alpha = 1.0, - txt_radius = 34, - txt_weight = 0, - txt_size = 8.0, - txt_fg_colour = 0xEF5A29, - txt_fg_alpha = 1.0, - graduation_radius = 28, - graduation_thickness = 0, - graduation_mark_thickness = 1, - graduation_unit_angle = 27, - graduation_fg_colour = 0xFFFFFF, - graduation_fg_alpha = 0.3, - caption = "", - caption_weight = 1, - caption_size = 8.0, - caption_fg_colour = 0xFFFFFF, - caption_fg_alpha = 0.3, - }, - { - name = "cpu", - arg = "cpu1", - max_value = 100, - x = 85, - y = 200, - graph_radius = 18, - graph_thickness = 5, - graph_start_angle = 180, - graph_unit_angle = 2.7, - graph_unit_thickness = 2.7, - graph_bg_colour = 0xffffff, - graph_bg_alpha = 0.1, - graph_fg_colour = 0xFFFFFF, - graph_fg_alpha = 0.2, - hand_fg_colour = 0xEF5A29, - hand_fg_alpha = 1.0, - txt_radius = 10, - txt_weight = 0, - txt_size = 8.0, - txt_fg_colour = 0xEF5A29, - txt_fg_alpha = 1.0, - graduation_radius = 28, - graduation_thickness = 0, - graduation_mark_thickness = 1, - graduation_unit_angle = 27, - graduation_fg_colour = 0xFFFFFF, - graduation_fg_alpha = 0.3, - caption = "", - caption_weight = 1, - caption_size = 8.0, - caption_fg_colour = 0xFFFFFF, - caption_fg_alpha = 0.3, - }, - { - name = "memperc", - arg = "", - max_value = 100, - x = 85, - y = 300, - graph_radius = 24, - graph_thickness = 5, - graph_start_angle = 180, - graph_unit_angle = 2.7, - graph_unit_thickness = 2.7, - graph_bg_colour = 0xffffff, - graph_bg_alpha = 0.1, - graph_fg_colour = 0xFFFFFF, - graph_fg_alpha = 0.2, - hand_fg_colour = 0xEF5A29, - hand_fg_alpha = 1.0, - txt_radius = 10, - txt_weight = 0, - txt_size = 8.0, - txt_fg_colour = 0xEF5A29, - txt_fg_alpha = 1.0, - graduation_radius = 23, - graduation_thickness = 0, - graduation_mark_thickness = 2, - graduation_unit_angle = 27, - graduation_fg_colour = 0xFFFFFF, - graduation_fg_alpha = 0.5, - caption = "", - caption_weight = 1, - caption_size = 8.0, - caption_fg_colour = 0xFFFFFF, - caption_fg_alpha = 0.3, - }, - { - name = "fs_used_perc", - arg = "/", - max_value = 100, - x = 85, - y = 380, - graph_radius = 24, - graph_thickness = 5, - graph_start_angle = 180, - graph_unit_angle = 2.7, - graph_unit_thickness = 2.7, - graph_bg_colour = 0xffffff, - graph_bg_alpha = 0.1, - graph_fg_colour = 0xFFFFFF, - graph_fg_alpha = 0.2, - hand_fg_colour = 0xEF5A29, - hand_fg_alpha = 1.0, - txt_radius = 34, - txt_weight = 0, - txt_size = 8.0, - txt_fg_colour = 0xEF5A29, - txt_fg_alpha = 1.0, - graduation_radius = 28, - graduation_thickness = 0, - graduation_mark_thickness = 1, - graduation_unit_angle = 27, - graduation_fg_colour = 0xFFFFFF, - graduation_fg_alpha = 0.3, - caption = "/", - caption_weight = 1, - caption_size = 8.0, - caption_fg_colour = 0xFFFFFF, - caption_fg_alpha = 0.5, - }, - { - name = "fs_used_perc", - arg = "/home/", - max_value = 100, - x = 85, - y = 380, - graph_radius = 18, - graph_thickness = 5, - graph_start_angle = 180, - graph_unit_angle = 2.7, - graph_unit_thickness = 2.7, - graph_bg_colour = 0xffffff, - graph_bg_alpha = 0.1, - graph_fg_colour = 0xFFFFFF, - graph_fg_alpha = 0.2, - hand_fg_colour = 0xEF5A29, - hand_fg_alpha = 1.0, - txt_radius = 10, - txt_weight = 0, - txt_size = 8.0, - txt_fg_colour = 0xEF5A29, - txt_fg_alpha = 1.0, - graduation_radius = 28, - graduation_thickness = 0, - graduation_mark_thickness = 1, - graduation_unit_angle = 27, - graduation_fg_colour = 0xFFFFFF, - graduation_fg_alpha = 0.3, - caption = "/home", - caption_weight = 1, - caption_size = 8.0, - caption_fg_colour = 0xFFFFFF, - caption_fg_alpha = 0.5, - }, -} - -------------------------------------------------------------------------------- --- Converts Color in Hexa to Decimal --- -function rgb_to_r_g_b(colour, alpha) - return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha -end - -------------------------------------------------------------------------------- --- Converts Degree to rad and Rotates (0 is on the Top) --- -function angle_to_position(start_angle, current_angle) - local pos = current_angle + start_angle - return ((pos * (2 * math.pi / 360)) - (math.pi / 2)) -end - -------------------------------------------------------------------------------- --- Displays Clock --- -function draw_clock_ring(display, data, value) - local max_value = data["max_value"] - local x, y = data["x"], data["y"] - local graph_radius = data["graph_radius"] - local graph_thickness, graph_unit_thickness = data["graph_thickness"], data["graph_unit_thickness"] - local graph_unit_angle = data["graph_unit_angle"] - local graph_bg_colour, graph_bg_alpha = data["graph_bg_colour"], data["graph_bg_alpha"] - local graph_fg_colour, graph_fg_alpha = data["graph_fg_colour"], data["graph_fg_alpha"] - - -- Background Ring - cairo_arc(display, x, y, graph_radius, 0, 2 * math.pi) - cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha)) - cairo_set_line_width(display, graph_thickness) - cairo_stroke(display) - - -- Arc - local val = (value % max_value) - local i = 1 - while i <= val do - cairo_arc( - display, - x, - y, - graph_radius, - (((graph_unit_angle * i) - graph_unit_thickness) * (2 * math.pi / 360)) - (math.pi / 2), - ((graph_unit_angle * i) * (2 * math.pi / 360)) - (math.pi / 2) - ) - cairo_set_source_rgba(display, rgb_to_r_g_b(graph_fg_colour, graph_fg_alpha)) - cairo_stroke(display) - i = i + 1 - end - local angle = (graph_unit_angle * i) - graph_unit_thickness - - -- Graduations - local graduation_radius = data["graduation_radius"] - local graduation_thickness, graduation_mark_thickness = - data["graduation_thickness"], data["graduation_mark_thickness"] - local graduation_unit_angle = data["graduation_unit_angle"] - local graduation_fg_colour, graduation_fg_alpha = data["graduation_fg_colour"], data["graduation_fg_alpha"] - if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then - local nb_graduation = 360 / graduation_unit_angle - local i = 1 - while i <= nb_graduation do - cairo_set_line_width(display, graduation_thickness) - cairo_arc( - display, - x, - y, - graduation_radius, - (((graduation_unit_angle * i) - (graduation_mark_thickness / 2)) * (2 * math.pi / 360)) - (math.pi / 2), - (((graduation_unit_angle * i) + (graduation_mark_thickness / 2)) * (2 * math.pi / 360)) - (math.pi / 2) - ) - cairo_set_source_rgba(display, rgb_to_r_g_b(graduation_fg_colour, graduation_fg_alpha)) - cairo_stroke(display) - cairo_set_line_width(display, graph_thickness) - i = i + 1 - end - end - - -- Text - local txt_radius = data["txt_radius"] - local txt_weight, txt_size = data["txt_weight"], data["txt_size"] - local txt_fg_colour, txt_fg_alpha = data["txt_fg_colour"], data["txt_fg_alpha"] - local movex = txt_radius * (math.cos((angle * 2 * math.pi / 360) - (math.pi / 2))) - local movey = txt_radius * (math.sin((angle * 2 * math.pi / 360) - (math.pi / 2))) - cairo_select_font_face(display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight) - cairo_set_font_size(display, txt_size) - cairo_set_source_rgba(display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha)) - cairo_move_to(display, x + movex - (txt_size / 2), y + movey + 3) - cairo_show_text(display, value) - cairo_stroke(display) -end - -------------------------------------------------------------------------------- --- Displays Gauges --- -function draw_gauge_ring(display, data, value) - local max_value = data["max_value"] - local x, y = data["x"], data["y"] - local graph_radius = data["graph_radius"] - local graph_thickness, graph_unit_thickness = data["graph_thickness"], data["graph_unit_thickness"] - local graph_start_angle = data["graph_start_angle"] - local graph_unit_angle = data["graph_unit_angle"] - local graph_bg_colour, graph_bg_alpha = data["graph_bg_colour"], data["graph_bg_alpha"] - local graph_fg_colour, graph_fg_alpha = data["graph_fg_colour"], data["graph_fg_alpha"] - local hand_fg_colour, hand_fg_alpha = data["hand_fg_colour"], data["hand_fg_alpha"] - local graph_end_angle = (max_value * graph_unit_angle) % 360 - - -- Background Ring - cairo_arc( - display, - x, - y, - graph_radius, - angle_to_position(graph_start_angle, 0), - angle_to_position(graph_start_angle, graph_end_angle) - ) - cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha)) - cairo_set_line_width(display, graph_thickness) - cairo_stroke(display) - - -- Arc - local val = value % (max_value + 1) - local start_arc = 0 - local stop_arc = 0 - local i = 1 - while i <= val do - start_arc = (graph_unit_angle * i) - graph_unit_thickness - stop_arc = (graph_unit_angle * i) - cairo_arc( - display, - x, - y, - graph_radius, - angle_to_position(graph_start_angle, start_arc), - angle_to_position(graph_start_angle, stop_arc) - ) - cairo_set_source_rgba(display, rgb_to_r_g_b(graph_fg_colour, graph_fg_alpha)) - cairo_stroke(display) - i = i + 1 - end - local angle = start_arc - - -- Hand - start_arc = (graph_unit_angle * val) - (graph_unit_thickness * 2) - stop_arc = (graph_unit_angle * val) - cairo_arc( - display, - x, - y, - graph_radius, - angle_to_position(graph_start_angle, start_arc), - angle_to_position(graph_start_angle, stop_arc) - ) - cairo_set_source_rgba(display, rgb_to_r_g_b(hand_fg_colour, hand_fg_alpha)) - cairo_stroke(display) - - -- Graduations - local graduation_radius = data["graduation_radius"] - local graduation_thickness, graduation_mark_thickness = - data["graduation_thickness"], data["graduation_mark_thickness"] - local graduation_unit_angle = data["graduation_unit_angle"] - local graduation_fg_colour, graduation_fg_alpha = data["graduation_fg_colour"], data["graduation_fg_alpha"] - if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then - local nb_graduation = graph_end_angle / graduation_unit_angle - local i = 0 - while i < nb_graduation do - cairo_set_line_width(display, graduation_thickness) - start_arc = (graduation_unit_angle * i) - (graduation_mark_thickness / 2) - stop_arc = (graduation_unit_angle * i) + (graduation_mark_thickness / 2) - cairo_arc( - display, - x, - y, - graduation_radius, - angle_to_position(graph_start_angle, start_arc), - angle_to_position(graph_start_angle, stop_arc) - ) - cairo_set_source_rgba(display, rgb_to_r_g_b(graduation_fg_colour, graduation_fg_alpha)) - cairo_stroke(display) - cairo_set_line_width(display, graph_thickness) - i = i + 1 - end - end - - -- Text - local txt_radius = data["txt_radius"] - local txt_weight, txt_size = data["txt_weight"], data["txt_size"] - local txt_fg_colour, txt_fg_alpha = data["txt_fg_colour"], data["txt_fg_alpha"] - local movex = txt_radius * math.cos(angle_to_position(graph_start_angle, angle)) - local movey = txt_radius * math.sin(angle_to_position(graph_start_angle, angle)) - cairo_select_font_face(display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight) - cairo_set_font_size(display, txt_size) - cairo_set_source_rgba(display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha)) - cairo_move_to(display, x + movex - (txt_size / 2), y + movey + 3) - cairo_show_text(display, value) - cairo_stroke(display) - - -- Caption - local caption = data["caption"] - local caption_weight, caption_size = data["caption_weight"], data["caption_size"] - local caption_fg_colour, caption_fg_alpha = data["caption_fg_colour"], data["caption_fg_alpha"] - local tox = graph_radius * (math.cos((graph_start_angle * 2 * math.pi / 360) - (math.pi / 2))) - local toy = graph_radius * (math.sin((graph_start_angle * 2 * math.pi / 360) - (math.pi / 2))) - cairo_select_font_face(display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, caption_weight) - cairo_set_font_size(display, caption_size) - cairo_set_source_rgba(display, rgb_to_r_g_b(caption_fg_colour, caption_fg_alpha)) - cairo_move_to(display, x + tox + 5, y + toy + 1) - if graph_start_angle < 105 then - cairo_move_to(display, x + tox - 30, y + toy + 1) - end - cairo_show_text(display, caption) - cairo_stroke(display) -end - -------------------------------------------------------------------------------- --- Loads data and Displays Clock --- -function go_clock_rings(display) - local function load_clock_rings(display, data) - local str, value = "", 0 - str = string.format("${%s %s}", data["name"], data["arg"]) - str = conky_parse(str) - value = tonumber(str) - draw_clock_ring(display, data, value) - end - - for i in pairs(clock_h) do - load_clock_rings(display, clock_h[i]) - end - for i in pairs(clock_m) do - load_clock_rings(display, clock_m[i]) - end - for i in pairs(clock_s) do - load_clock_rings(display, clock_s[i]) - end -end - -------------------------------------------------------------------------------- --- Loads data and Displays Gauges --- -function go_gauge_rings(display) - local function load_gauge_rings(display, data) - local str, value = "", 0 - str = string.format("${%s %s}", data["name"], data["arg"]) - str = conky_parse(str) - value = tonumber(str) - draw_gauge_ring(display, data, value) - end - - for i in pairs(gauge) do - load_gauge_rings(display, gauge[i]) - end -end - -------------------------------------------------------------------------------- --- MAIN -function conky_main() - if conky_window == nil then - return - end - - local cs = cairo_xlib_surface_create( - conky_window.display, - conky_window.drawable, - conky_window.visual, - conky_window.width, - conky_window.height - ) - local display = cairo_create(cs) - - local updates = conky_parse("${updates}") - update_num = tonumber(updates) - - if update_num > 5 then - go_clock_rings(display) - go_gauge_rings(display) - end - - cairo_surface_destroy(cs) - cairo_destroy(display) -end diff --git a/popos/conky/conkyrc b/popos/conky/conkyrc @@ -1,80 +0,0 @@ -## PopOS Conky Config - -conky.config = { - background = true, - update_interval = 0.5, - cpu_avg_samples = 2, - net_avg_samples = 2, - temperature_unit = 'celsius', - double_buffer = true, - no_buffers = true, - text_buffer_size = 2048, - gap_x = 1600, - gap_y = 100, - minimum_width = 250, - minimum_height = 750, - own_window = true, - own_window_class = 'desktop', - own_window_type = 'desktop', - own_window_argb_visual = true, - own_window_transparent = true, - own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below', - border_inner_margin = 0, - border_outer_margin = 0, - alignment = tr, - draw_shades = false, - draw_outline = false, - draw_borders = false, - draw_graph_borders = false, - override_utf8_locale = true, - use_xft= true, - font = 'caviar dreams:size=8', - xftalpha = 0.5, - uppercase = false, - default_color = '49B9C7', - color1 = 'DDDDDD', - color2 = 'AAAAAA', - color3 = '888888', - color4 = '666666', - lua_load = '~/.conky/conky_pop/conky.lua', - lua_draw_hook_post = 'main' -} - -conky.text = [[ -${voffset 35} -${goto 95}${color4}${font ubuntu:size=22}${time %e}${color1}${offset -50}${font ubuntu:size=10}${time %A} -${goto 85}${color2}${voffset -2}${font ubuntu:size=9}${time %b}${voffset -2} ${color3}${font ubuntu:size=12}${time %Y}${font} - -${voffset 80} -${goto 90}${font fira bold:size=7}${color}CPU -${goto 90}${font fira:size=7}${color1}${top name 1}${alignr}${top cpu 1}% -${goto 90}${font fira:size=7}${color2}${top name 2}${alignr}${top cpu 2}% -${goto 90}${font fira:size=7}${color3}${top name 3}${alignr}${top cpu 3}% -${goto 90}${cpugraph 10,100 666666 666666} -${goto 90}${voffset -10}${font fira:size=7}${color}${threads} process - -${voffset 20} -${goto 90}${font fira bold:size=7}${color}MEM -${goto 90}${font fira:size=7}${color1}${top_mem name 1}${alignr}${top_mem mem 1}% -${goto 90}${font fira:size=7}${color2}${top_mem name 2}${alignr}${top_mem mem 2}% -${goto 90}${font fira:size=7}${color3}${top_mem name 3}${alignr}${top_mem mem 3}% - -${voffset 25} -${goto 90}${font fira bold:size=7}${color}DISKS - -${goto 90}${diskiograph 30,100 666666 666666}${voffset -30} -${goto 90}${font fira:size=7}${color}used: ${fs_used /home} /home -${goto 90}${font fira:size=7}${color}used: ${fs_used /} / - -${voffset 10} -${goto 70}${font fira bold:size=18}${color3}NET${alignr}${color2}${font fira bold:size=7}${color1}${if_up eth0}eth ${addr eth0} ${endif}${if_up wlan0}wifi ${addr wlan0}${endif} -${goto 90}${font fira bold:size=7}${color}open ports: ${alignr}${color2}${tcp_portmon 1 65535 count} -${goto 90}${font fira bold:size=7}${color}${offset 10}IP${alignr}DPORT -${goto 90}${font fira:size=7}${color1}${tcp_portmon 1 65535 rip 0}${alignr 1}${tcp_portmon 1 65535 rport 0} -${goto 90}${font fira:size=7}${color1}${tcp_portmon 1 65535 rip 1}${alignr 1}${tcp_portmon 1 65535 rport 1} -${goto 90}${font fira:size=7}${color1}${tcp_portmon 1 65535 rip 2}${alignr 1}${tcp_portmon 1 65535 rport 2} -${goto 90}${font fira:size=7}${color1}${tcp_portmon 1 65535 rip 3}${alignr 1}${tcp_portmon 1 65535 rport 3} -${goto 90}${font fira:size=7}${color1}${tcp_portmon 1 65535 rip 4}${alignr 1}${tcp_portmon 1 65535 rport 4} -${goto 90}${font fira:size=7}${color1}${tcp_portmon 1 65535 rip 5}${alignr 1}${tcp_portmon 1 65535 rport 5} -${goto 90}${font fira:size=7}${color1}${tcp_portmon 1 65535 rip 6}${alignr 1}${tcp_portmon 1 65535 rport 6} -]] diff --git a/popos/neofetch/config.conf b/popos/neofetch/config.conf @@ -1,54 +0,0 @@ -## PopOS Neofetch Config - -print_info() { - prin "Software Information" - info " " distro - info " " kernel - info " " packages - info " " de - info " " theme - info " " icons - info " " term_font - - info underline - prin "Hardware Information" - info " " model - info " " cpu - info "﬙ " gpu - info " " disk - info " " resolution - info "⊗ " uptime - info battery - - info cols -} - -# Kernel -kernel_shorthand="off" - -# OS Architecture -os_arch="off" - -# Uptime -uptime_shorthand="tiny" - -# Memory Unit -memory_unit="gib" - -# Packages -package_managers="tiny" - -# Text Colors -colors=(4 3 3 3 3 6) - -# Info Display -cpu_display="off" -memory_display="off" -battery_display="barinfo" -disk_display="off" - -# Ascii Distro -ascii_distro="POP_OS" - -# Ascii Colors -ascii_colors=(6) diff --git a/popos/p10k.zsh b/popos/p10k.zsh @@ -1,472 +0,0 @@ -## PopOS P10k config - -() { - emulate -L zsh -o extended_glob - unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' - - typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( - os_icon - context - dir - vcs - ) - typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( - status - background_jobs - direnv - asdf - virtualenv - anaconda - pyenv - goenv - nodenv - nvm - nodeenv - rbenv - rvm - fvm - luaenv - jenv - plenv - phpenv - scalaenv - haskell_stack - kubecontext - terraform - aws - aws_eb_env - azure - gcloud - google_app_cred - nordvpn - ranger - vim_shell - midnight_commander - nix_shell - vi_mode - ram - todo - timewarrior - taskwarrior - battery - command_execution_time - time - ) - - # Character Set - typeset -g POWERLEVEL9K_MODE=nerdfont-complete - typeset -g POWERLEVEL9K_ICON_PADDING=none - - # OS Icon - typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232 - typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7 - - # Prompt - typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT= - typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%242F╭─' - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%242F├─' - typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%242F╰─' - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%242F─╮' - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%242F─┤' - typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%242F─╯' - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='─' - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND= - if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242 - typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' - typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' - fi - typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1' - typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0B3' - typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' - typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2' - typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' - typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' - typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' - typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' - typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= - typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND= - typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 - typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' - typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE= - - # Directory - typeset -g POWERLEVEL9K_DIR_BACKGROUND=3 - typeset -g POWERLEVEL9K_DIR_FOREGROUND=0 - typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique - typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= - typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=250 - typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=0 - typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true - local anchor_files=( - .bzr - .citc - .git - .hg - .node-version - .python-version - .go-version - .ruby-version - .lua-version - .java-version - .perl-version - .php-version - .tool-version - .shorten_folder_marker - .svn - .terraform - CVS - Cargo.toml - composer.json - go.mod - package.json - stack.yaml - ) - typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" - typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false - typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 - typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 - typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 - typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 - typeset -g POWERLEVEL9K_DIR_HYPERLINK=false - typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v2 - - # VCS - typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 ' - typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' - - function my_git_formatter() { - emulate -L zsh - if [[ -n $P9K_CONTENT ]]; then - # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from - # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. - typeset -g my_git_format=$P9K_CONTENT - return - fi - local meta='%7F' # white foreground - local clean='%0F' # black foreground - local modified='%0F' # black foreground - local untracked='%0F' # black foreground - local conflicted='%1F' # red foreground - local res - local where # branch or tag - if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then - res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}" - where=${(V)VCS_STATUS_LOCAL_BRANCH} - elif [[ -n $VCS_STATUS_TAG ]]; then - res+="${meta}#" - where=${(V)VCS_STATUS_TAG} - fi - (( $#where > 32 )) && where[13,-13]="…" - res+="${clean}${where//\%/%%}" # escape % - [[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" - if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then - res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape % - fi - (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" - (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " - (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" - (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" - (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " - (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" - (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" - [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" - (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" - (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" - (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" - (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" - (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" - - typeset -g my_git_format=$res - } - functions -M my_git_formatter 2>/dev/null - typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 - typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' - typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true - typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}' - typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 - typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) - - # Status - typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true - typeset -g POWERLEVEL9K_STATUS_OK=true - typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' - typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=6 - typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=0 - typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=6 - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=0 - typeset -g POWERLEVEL9K_STATUS_ERROR=true - typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' - typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=6 - typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=0 - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true - typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=6 - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND=0 - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=6 - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_BACKGROUND=0 - - # Execution Time - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=3 - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=0 - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' - - # Background Jobs - typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false - - # asdf - typeset -g POWERLEVEL9K_ASDF_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_BACKGROUND=7 - typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true - typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= - typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_RUBY_BACKGROUND=1 - typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_PYTHON_BACKGROUND=4 - typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_GOLANG_BACKGROUND=4 - typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_NODEJS_BACKGROUND=2 - typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_RUST_BACKGROUND=208 - typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_BACKGROUND=5 - typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_FLUTTER_BACKGROUND=4 - typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_LUA_BACKGROUND=4 - typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=1 - typeset -g POWERLEVEL9K_ASDF_JAVA_BACKGROUND=7 - typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_PERL_BACKGROUND=4 - typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_ERLANG_BACKGROUND=1 - typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_ELIXIR_BACKGROUND=5 - typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_POSTGRES_BACKGROUND=6 - typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_PHP_BACKGROUND=5 - typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_HASKELL_BACKGROUND=3 - typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_JULIA_BACKGROUND=2 - - # NordVPN - typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= - typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= - - - # Disk - typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 - typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 - typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false - - # Vi - typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0 - typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL - typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2 - typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL - typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4 - typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE - typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3 - typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= - typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8 - - # RAM - typeset -g POWERLEVEL9K_RAM_FOREGROUND=0 - typeset -g POWERLEVEL9K_RAM_BACKGROUND=3 - - # CPU Load - typeset -g POWERLEVEL9K_LOAD_WHICH=5 - - # ToDo - typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true - typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false - - # Timewarrior - typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' - - - # Context - typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=0 - typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=6 - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=0 - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_BACKGROUND=4 - typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=0 - typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=6 - typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n@%m' - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n ✠ %m' - typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n ✠ %m' - - # Python - typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false - typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false - typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= - typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' - typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true - typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}' - - # Node - typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true - typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false - typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= - typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true - - # Go - typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true - typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true - - # Rust - typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true - - # .NET - typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true - - # Laravel - typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=1 - typeset -g POWERLEVEL9K_LARAVEL_VERSION_BACKGROUND=7 - - # Ruby - typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true - - # RVM - typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false - typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false - - # Lua - typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true - - # Java - typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=1 - typeset -g POWERLEVEL9K_JAVA_VERSION_BACKGROUND=7 - typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true - typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false - typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true - - # Perl - typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true - - # PHP - typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=0 - typeset -g POWERLEVEL9K_PHP_VERSION_BACKGROUND=5 - typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true - typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true - - # Scala - typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true - - # Haskell - typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) - typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true - - # Terraform - typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false - typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( - # '*prod*' PROD # These values are examples that are unlikely - # '*test*' TEST # to match your needs. Customize them as needed. - '*' OTHER) - typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=4 - typeset -g POWERLEVEL9K_TERRAFORM_OTHER_BACKGROUND=0 - - # Kubecontext - typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile' - typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( - # '*prod*' PROD # These values are examples that are unlikely - # '*test*' TEST # to match your needs. Customize them as needed. - '*' DEFAULT) - typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=7 - typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND=5 - typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= - POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' - POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' - typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' - typeset -g POWERLEVEL9K_AWS_CLASSES=( - # '*prod*' PROD # These values are examples that are unlikely - # '*test*' TEST # to match your needs. Customize them as needed. - '*' DEFAULT) - - # Azure - typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' - - # GCloud - typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' - typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( - # '*:*prod*:*' PROD # These values are examples that are unlikely - # '*:*test*:*' TEST # to match your needs. Customize them as needed. - '*' DEFAULT) - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' - - # VPN - typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= - typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun))[0-9]*' - typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false - - # IP - typeset -g POWERLEVEL9K_IP_BACKGROUND=4 - typeset -g POWERLEVEL9K_IP_FOREGROUND=0 - typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+⇡$P9K_IP_TX_RATE }$P9K_IP_IP' - typeset -g POWERLEVEL9K_IP_INTERFACE='e.*' - - # Battery - typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 - typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1 - typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=0 - typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=0 - typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' - typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false - typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=6 - - # Time - typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' - typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false - typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='' - - # Instant Prompt - typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off - typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose - typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true - (( ! $+functions[p10k] )) || p10k reload -} - -typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} -(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} -'builtin' 'unset' 'p10k_config_opts' diff --git a/scripts/README.md b/scripts/README.md @@ -0,0 +1,7 @@ +### Scripts + +The `scripts` directory contains a combination of custom Bash Scripts (with `nix` shebangs, and can be run using <code><i>./path/to/script</i></code>) as well as ones written in conjunction with the Nix Syntax (which can be accessed by `github:maydayv7/dotfiles#apps.${system}`) + +A system management script is present, invoked via the [`nixos`](./nixos.nix) command, which can be used to apply user and device configuration changes, setup the device on first boot, and perform various other useful functions (If you have a working NixOS install, you can check it out using `nix run github:maydayv7/dotfiles`) + +There is also a system install script, invoked via the [`os-install`](./install.nix) command, that painlessly installs the OS diff --git a/scripts/audio.sh b/scripts/audio.sh @@ -0,0 +1,28 @@ +#! /usr/bin/env nix +#! nix shell nixpkgs#bash nixpkgs#glib nixpkgs#playerctl -c bash + +# Audio Tweaks # + +# Pause playback on Screen Lock +gdbus monitor -y -d org.freedesktop.login1 | grep LockedHint --line-buffered | + while read -r line + do + case "$line" in + *"<true>"*) + if playerctl status | grep Playing + then + PLAY=true + else + PLAY=false + fi + playerctl pause -a + ;; + *"<false>"*) + if $PLAY + then + playerctl play-pause + fi + ;; + esac + done +exit diff --git a/scripts/colors.sh b/scripts/colors.sh @@ -0,0 +1,9 @@ +#! /usr/bin/env nix +#! nix shell nixpkgs#bash -c bash + +# Print Color Map # + +for i in {0..255} +do + print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'} +done diff --git a/scripts/commands.sh b/scripts/commands.sh @@ -0,0 +1,89 @@ +#! /usr/bin/env nix +#! nix shell nixpkgs#bash nixpkgs#bzip2 nixpkgs#coreutils nixpkgs#git nixpkgs#gnupg nixpkgs#gnutar nixpkgs#gzip nixpkgs#p7zip nixpkgs#unzip -c bash + +# Useful Commands # + +temp(){ + TEMP=/tmp/"$1" + if [ "$2" != "1" ]; then rm -rf "$TEMP"; fi + if [ "$2" != "2" ]; then mkdir -p "$TEMP"; fi +} + +extract() { + if [ -f "$1" ] + then + case $1 in + *.tar.bz2) tar xvjf "$1";; + *.tar.gz) tar xvzf "$1";; + *.tar.xz) tar Jxvf "$1";; + *.bz2) bunzip2 "$1";; + *.rar) rar x "$1";; + *.gz) gunzip "$1";; + *.tar) tar xvf "$1";; + *.tbz2) tar xvjf "$1";; + *.tgz) tar xvzf "$1";; + *.zip) unzip -d "${1//\.zip/}" "$1";; + *.Z) uncompress "$1";; + *.7z) 7z x "$1";; + *) error "Can't Extract '$1'" ;; + esac + else + error "File '$1' is invalid" + fi +} + +up() { + LIMIT=$1 + P=$PWD/.. + for ((i=1; i < LIMIT; i++)) + do + P=$P/.. + done + cd "$P" || exit +} + +internet() { + if ! nc -zw1 google.com 443 2> /dev/null + then + error "You are Offline, Please Connect to the Internet" + fi +} + +restart() { + read -rp "Do you want to Reboot the System? (Y/*): " choice + case $choice in + [Yy]*) reboot;; + *) exit;; + esac +} + +# Print + +newline() { + echo -e "\n"; +} + +error() { + echo -e "\n\033[0;31merror:\033[0m $1" + if [ -n "$2" ] + then + echo -e "\n$2" + fi + exit 7 +} + +info() { + echo -e "\n\033[0;35minfo:\033[0m $1" + if [ -n "$2" ] + then + echo -e "\n$2" + fi +} + +warn() { + echo -e "\n\033[0;35mwarning:\033[0m $1" + if [ -n "$2" ] + then + echo -e "\n$2" + fi +} diff --git a/scripts/hyprutils.nix b/scripts/hyprutils.nix @@ -0,0 +1,210 @@ +{ + lib, + pkgs, + files, + ... +}: let + inherit (lib) licenses recursiveUpdate; + + help = '' + # Legend # + xxx - Command [action] - Description + + # Usage # + help - Show this information + click [button] [address] - Opens [address] with [button] action + toggle  + fancy - Toggle Compositor Effects + float - Toggle window floating in current workspace + minimized - Show minimized windows + monitor 'name' - Toggle specified Monitor + shader - Toggle Compositor Shader + touchpad - Toggle touchpad + ''; + + daemon = builtins.toFile "daemon.sh" '' + event_activespecial() { + case "$WORKSPACENAME" in + special:minimized*) + hyprctl dispatch submap reset + hyprctl dispatch submap Minimized + ;; + esac + } + + event_minimized() { + WINDOW="address:0x$WINDOWADDRESS" + case "$MINIMIZED" in + 0) hyprctl dispatch movetoworkspace "+0, $WINDOW" ;; + 1) hyprctl dispatch movetoworkspacesilent "special:minimized, $WINDOW" ;; + esac + } + ''; +in + recursiveUpdate + { + meta = { + mainProgram = "hyprutils"; + description = "Hyprland Utility Script"; + homepage = files.path.repo; + license = licenses.gpl3Only; + maintainers = ["maydayv7"]; + }; + } + ( + pkgs.writeShellApplication { + name = "hyprutils"; + runtimeInputs = with pkgs; [ + coreutils + gnugrep + socat + + custom.hyprshellevents + hyprland + hyprshade + libnotify + zenity + ]; + + text = '' + set +eu + ${files.scripts.commands} + + notify() { + notify-send -a "utility" -t 1000 -h string:x-canonical-private-synchronous:"$1" "''${@:2}" + } + + hyprnotify() { + hyprctl notify "$1" 1500 0 " $2 " + } + + fail() { + error "$1" "Try 'hyprutils help' for more information" + } + + case "$1" in + "") error "Expected an Option" "${help}";; + "help") echo -e "## Hyprland Utility Script ##\n${help}";; + "daemon") + info "Monitoring Hyprland Socket..." + socat -u UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock EXEC:"shellevents ${daemon}",nofork + ;; + "click") + BUTTON="$2" + ADDRESS="$3" + if [ -z "$BUTTON" ] || [ -z "$ADDRESS" ] + then + fail "Expected GDK Button event and a window address" + fi + + case "$BUTTON" in + "1") + # Left Click + hyprctl keyword cursor:no_warps true + hyprctl dispatch focuswindow address:"$ADDRESS" + hyprctl dispatch bringactivetotop + hyprctl keyword cursor:no_warps false + ;; + "2") + # Middle Click + hyprctl dispatch movetoworkspacesilent "special:minimized, address:$ADDRESS" + ;; + "3") + # Right Click + hyprctl dispatch closewindow address:"$ADDRESS" + ;; + esac + ;; + "toggle") + case "$2" in + "fancy") + FANCY=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}') + if [ "$FANCY" = 1 ] + then + hyprnotify 1 "Compositor Effects Disabled" + hyprctl --batch "\ + keyword animations:enabled 0;\ + keyword decoration:shadow:enabled 0;\ + keyword decoration:blur:enabled 0;\ + keyword general:gaps_in 0;\ + keyword general:gaps_out 0;\ + keyword general:border_size 1;\ + keyword decoration:rounding 0;\ + keyword plugin:dynamic-cursors:enabled 0" + exit + fi + hyprnotify 1 "Compositor Effects Enabled" + hyprctl reload + ;; + "float") + WORKSPACE=$(hyprctl activeworkspace | grep "workspace ID" | awk '{print $3}') + hyprnotify 1 "Toggled window floating on Workspace $WORKSPACE" + hyprctl dispatch workspaceopt allfloat + ;; + "minimized") + if hyprctl workspaces | grep "special:minimize" + then + hyprctl dispatch workspace special:minimized + else + hyprnotify 1 "No minimized windows present" + fi + ;; + "monitor") + if [ -z "$3" ] + then + fail "Expected monitor name" + fi + + if hyprctl monitors | grep "Monitor $3" + then + hyprctl keyword monitor "$3, disable" + else + hyprctl keyword monitor "$3, preferred, auto, 1" + fi + hyprctl reload + ;; + "shader") + hyprshade off + mapfile SHADERS < <(hyprshade ls) + SHADER=$(zenity --list --title="Compositor Shader Toggle" --column="Shaders" "''${SHADERS[@]}" | sed "s/^[ \t]*//") + hyprshade on "$SHADER" && hyprctl seterror "" + ;; + "touchpad") + temp hyprutils_touchpad 1 + STATUS="$TEMP/status" + touchpad=$(hyprctl devices | grep touchpad | xargs) + + enable() { + hyprctl keyword "device[$touchpad]:enabled" true + printf "true" >"$STATUS" + notify touchpad -i "touchpad" "Touchpad Enabled" + } + + disable() { + hyprctl keyword "device[$touchpad]:enabled" false + printf "false" >"$STATUS" + notify touchpad -i "touchpad" "Touchpad Disabled" + } + + if ! [ -f "$STATUS" ] + then + disable + else + if [ "$(cat "$STATUS")" = "true" ] + then + disable + elif [ "$(cat "$STATUS")" = "false" ] + then + enable + fi + fi + ;; + "") fail "Expected an Option" ;; + *) fail "Unexpected Option 'toggle $2'" ;; + esac + ;; + *) fail "Unexpected Option '$1'" ;; + esac + ''; + } + ) diff --git a/scripts/install.nix b/scripts/install.nix @@ -0,0 +1,183 @@ +{ + lib, + pkgs, + files, + ... +}: +with files.path; let + inherit (lib) licenses recursiveUpdate; + + # File System Operations + partitions = '' + partition_disk() { + read -rp "Enter Path to Disk: /dev/" DISK + if [ -z "$DISK" ] + then + error "Path to Disk cannot be empty. If unsure, use the command 'fdisk -l'" + fi + + echo "Deleting Partitions..." + dd if=/dev/zero of=/dev/"$DISK" bs=512 count=1 + if [[ "$DISK" == nvme* ]] + then + parted /dev/"$DISK" --script mklabel gpt + else + parted /dev/"$DISK" --script mklabel msdos + fi + + echo "Creating Partitions..." + parted /dev/"$DISK" -- mkpart ESP fat32 1MiB 1024MiB + parted /dev/"$DISK" -- set 1 esp on + parted /dev/"$DISK" -- name 1 ESP + mkfs.fat -F 32 /dev/disk/by-partlabel/ESP + + parted /dev/"$DISK" -- mkpart primary 1025MiB -8GiB + parted /dev/"$DISK" -- name 2 System + + parted /dev/"$DISK" -- mkpart primary linux-swap -8GiB 100% + parted /dev/"$DISK" -- name 3 swap + mkswap /dev/disk/by-partlabel/swap + + mkdir -p /mnt + } + + create_ext4() { + echo "Creating 'EXT4' Partition..." + mkfs.ext4 /dev/disk/by-partlabel/System + } + + mount_ext4() { + echo "Mounting 'EXT4' Partition..." + mount /dev/disk/by-partlabel/System /mnt + } + + create_zfs() { + echo "Creating 'ZFS' Volumes..." + read -rp "Enter Password for Pool Encryption: " PASS + echo "$PASS" | zpool create -f fspool -O compression=zstd -O encryption=on -O keyformat=passphrase /dev/disk/by-partlabel/System + + zfs create -p -o mountpoint=legacy -o xattr=sa -o acltype=posixacl fspool/system/root + zfs snapshot fspool/system/root@blank + zfs create -o mountpoint=legacy -o atime=off fspool/system/nix + + zfs create -p -o mountpoint=legacy -o xattr=sa -o acltype=posixacl -o com.sun:auto-snapshot=true fspool/data + + # Use 'zfs set refreservation=none fspool/reserve' to free space + zfs create -o canmount=off -o refreservation=1G fspool/reserve + } + + mount_zfs() { + echo "Mounting 'ZFS' Volumes..." + zpool import -f fspool + mount -t zfs fspool/system/root /mnt + mkdir -p /mnt/{nix,data} + mount -t zfs fspool/system/nix /mnt/nix + mkdir -p /mnt${persist} + mount -t zfs fspool/data /mnt${data} + } + + mount_other() { + echo "Mounting Other Partitions..." + mkdir -p /mnt/boot + mount -t vfat /dev/disk/by-partlabel/ESP /mnt/boot + swapoff --all + swapon /dev/disk/by-partlabel/swap + } + + unmount_all () { + echo "Unmounting All Partitions..." + umount -l /mnt + zpool export fspool + } + ''; +in + recursiveUpdate + { + meta = { + mainProgram = "os-install"; + description = "System Install Script"; + homepage = repo; + license = licenses.gpl3Only; + maintainers = ["maydayv7"]; + }; + } + ( + pkgs.writeShellApplication { + name = "os-install"; + runtimeInputs = with pkgs; [ + coreutils + dosfstools + git + gparted + nixFlakes + ntfs3g + parted + util-linux + zfs + ]; + + text = '' + set +eu + ${files.scripts.commands} + ${partitions} + + internet + if [ "$EUID" -ne 0 ] + then + error "This Command must be Executed as 'root'" + fi + + warn "Disk will be Completely Wiped for Automatic Partitioning" + read -rp "Do you want to Automatically Create the Partitions? (Y/*): " choice + case $choice in + [Yy]*) partition_disk;; + *) warn "You must Create, Format and Label the Partitions on your own"; gparted &> /dev/null;; + esac + newline + read -rp "Select Filesystem to use for Disk (simple/advanced): " choice + case $choice in + 1|[Ss]*) + read -rp "Do you want to Create and Format the EXT4 Partitions? (Y/*): " choice + case $choice in + [Yy]*) create_ext4; mount_ext4;; + *) warn "Assuming that Required EXT4 Partition has already been Created"; mount_ext4;; + esac + ;; + 2|[Aa]*) + read -rp "Do you want to Create the ZFS Pool and Datasets? (Y/*): " choice + case $choice in + [Yy]*) create_zfs; mount_zfs;; + *) warn "Assuming that Required ZFS Pool and Datasets have already been Created"; mount_zfs;; + esac + ;; + *) error "Choose (1)simple or (2)advanced";; + esac + newline + + mount_other + systemd-machine-id-setup --root=/mnt + newline + + read -rp "Enter Name of Device to Install: " HOST + read -rp "Enter Path to Repository (path/URL): " URL + if [ -z "$URL" ] + then + URL=${flake} + fi + echo "Installing System from '$URL'..." + until nixos-install --no-root-passwd --root /mnt --flake "$URL"#"$HOST" + do + newline + info "Couldn't finish installation. Trying again..." + done + newline + + unmount_all + newline + + info "Run 'nixos setup' after rebooting to finish the install" + info "Select the (Recovery) boot menu option and run the above script as the 'recovery' user" + restart + ''; + } + ) diff --git a/scripts/mail.sh b/scripts/mail.sh @@ -0,0 +1,28 @@ +#! /usr/bin/env nix +#! nix shell nixpkgs#bash nixpkgs#coreutils nixpkgs#gnused nixpkgs#libpst -c bash + +# Script to convert '.pst' Files to '.mbox' # + +MAIL=./convert-$(date '+%H-%M_%d-%m-%y') + +# File Conversion +read -rp "Enter Path to '.pst' File: " DIR +echo "Converting '.pst' to '.mbox'" +mkdir "$MAIL" && readpst -o "$MAIL" -r "$DIR" +find "$MAIL" -type d -mindepth 1 | tac | xargs -d '\n' -I{} mv {} {}.sbd +find "$MAIL" -name mbox -type f | xargs -d '\n' -I{} echo '"{}" "{}"' | sed -e 's/\.sbd\/mbox"$/"/' | xargs -L 1 mv +find "$MAIL" -empty -type d | xargs -d '\n' rmdir +find "$MAIL" -type d | grep -E '.sbd' | sed 's/.\{4\}$//' | xargs -d '\n' touch +echo "Conversion complete, files are present in $MAIL" + +# Mail Import +import() { +read -rp "Enter name of Thunderbird Profile: " PROFILE +cp -r "$MAIL"/. "$HOME/.thunderbird/$PROFILE/Mail/Local Folders/Converted/" && echo "Successfully Imported" +} + +read -rp "Do you want to import the Mails into Thunderbird? (Y/*): " choice + case $choice in + [Yy]*) import; rm -rf "$MAIL";; + *) rm -rf "$MAIL"; exit;; + esac diff --git a/scripts/nixos.nix b/scripts/nixos.nix @@ -0,0 +1,505 @@ +{ + lib, + inputs, + pkgs, + files, + ... +}: +with files; let + inherit (inputs) self; + inherit (lib) licenses recursiveUpdate; + + # Joins an attrset's names into a space-separated string (for shell `grep -wq`) + list = attrs: builtins.foldl' (x: y: x + y + " ") "" (builtins.attrNames attrs); + + devShells = list self.devShells."${pkgs.stdenv.system}"; + nixosConfigurations = list self.nixosConfigurations; + + # Usage Description + usage = { + script = '' + # Legend # + xxx - Command + [ ] - Optional - Command Description + ' ' - Variable + + # Usage # + apply [ --'option' ] - Applies Device and User Configuration + cache 'command' - Pushes Binary Cache Output to Cachix + check [ --trace ] - Checks System Configuration [ Displays Error to Trace ] + clean [ --all ] - Garbage Collects and Optimises Nix Store + explore - Opens Interactive Shell to explore Syntax and Configuration + iso 'variant' [ --burn ] - Builds Image for Specified Device [ Burns '.iso' to USB ] + list [ 'pattern' ] - Lists all Installed Packages [ Returns Matches ] + locate 'package' - Locates Installed Package + run [ 'path' ] 'command' - Runs Specified Command [ from 'path' ] (Wraps 'nix run') + search 'term' [ 'source' ] - Searches for Packages [ Providing 'term' ] or Configuration Options + secret 'choice' [ 'path' ] - Manages 'sops' Encrypted Secrets + setup - Sets up NixOS System (on First Boot) + shell [ 'name' ] - Opens desired Nix Developer Shell + update [ 'repo' / --'option' ] - Manages System Package Updates + ''; + + apply = '' + # Usage # + 'specialisation' - Activates Specified System Specialisation + --activate [ home ] - Activates Current [ Home ] Configuration + --boot - Applies Configuration on boot + --delta - Shows Package Delta for Build + --rollback [ 'generation' ] - Reverts to Last [ or Specified ] Build Generation + --test - Tests Configuration Build + ''; + + search = '' + # Usage # + cmd.'command' - Searches for Package providing 'command' + pkgs.'package' [ 'repo' ] - Searches for Package 'package' [ In Repository ] + 'term' - Searches for Packages and Configuration Options and matching 'term' + ''; + + secret = '' + # Usage # + create 'path' - Creates desired Secret + edit 'name' - Edits desired Secret + list - Lists all 'sops' Encrypted Secrets + show 'name' - Shows desired Secret + update - Updates Secrets to defined Keys + ''; + + update = '' + # Usage # + --pkgs - Automatically updates manually packaged apps + --commit - Updates 'inputs' and commits changes + 'repo' [ 'source' ] - Updates 'repo' input [ To specified 'source' ] + ''; + }; +in + recursiveUpdate + { + meta = { + mainProgram = "nixos"; + description = "System Management Script"; + homepage = path.repo; + license = licenses.gpl3Only; + maintainers = ["maydayv7"]; + }; + } + ( + pkgs.writeShellApplication { + name = "nixos"; + runtimeInputs = with pkgs; [ + coreutils + gnugrep + gnused + git + jq + tree + gnupg + sops + wine.mkwindowsapp-tools + + nixFlakes + cachix + manix + dix + nix-output-monitor + ]; + + text = '' + set +eu + ${scripts.commands} + + installed() { nix-store -q -R /run/current-system | sed -n -e 's/\/nix\/store\/[0-9a-z]\{32\}-//p' | sort | uniq; } + + missing() { + if nix search nixpkgs#"$1" &> /dev/null + then error "Package '$1' is not installed" + else error "$2" + fi + } + + secret_exists() { find ${path.system} -name "$1".secret | grep "secret" &> /dev/null; } + + if [[ -n $IN_NIX_SHELL ]] + then + warn "You are in a Nix Developer Shell" "This script may not work here properly\n" + fi + + case $1 in + "") error "Expected an Option" "${usage.script}";; + help|--help|-h) echo -e "## Tool for NixOS System Management ##\n${usage.script}";; + "apply") + case $2 in + help|--help|-h) echo "${usage.apply}";; + "") + if [ -z "$NIXOS_SPECIALISATION" ] + then + echo "Applying Configuration..." + sudo nixos-rebuild switch --flake ${path.system}# + else + echo "Applying Configuration ($NIXOS_SPECIALISATION)..." + sudo nixos-rebuild switch --specialisation "$NIXOS_SPECIALISATION" + fi + ;; + "--activate") + case $3 in + "") + if [ -z "$NIXOS_SPECIALISATION" ] + then + echo "Activating Configuration..." + sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch + else + echo "Activating Configuration ($NIXOS_SPECIALISATION)..." + sudo /nix/var/nix/profiles/system/specialisation/"$NIXOS_SPECIALISATION"/bin/switch-to-configuration switch + fi + ;; + "home") + echo "Applying Home Configuration..." + sudo systemctl restart home-manager-"$USER" + ;; + *) error "Unknown Option '$3'";; + esac + ;; + "--boot") + echo "Applying Configuration..." + if sudo nixos-rebuild boot --flake ${path.system}# + then + restart + else + error "Couldn't build generation successfully" + fi + ;; + "--delta") + echo "Building Configuration..." + temp nixos_build 2 + HOSTNAME=$(cat /etc/hostname) + if nom build ${path.system}#nixosConfigurations."$HOSTNAME".config.system.build.toplevel --out-link "$TEMP" + then + echo "Processing Delta..." + dix /run/current-system "$TEMP" + read -rp "Do you want to apply the configuration? (Y/*): " choice + case $choice in + [Yy]*) + echo "Applying Configuration..." + sudo "$TEMP"/bin/switch-to-configuration switch + ;; + *) exit;; + esac + else + error "Couldn't build generation successfully" + fi + ;; + "--test") + echo "Testing Configuration..." + sudo nixos-rebuild test --no-build-nix --show-trace --flake ${path.system}# + ;; + "--rollback") + case $3 in + "") + echo "Applying Rollback..." + sudo nixos-rebuild switch --rollback + ;; + "list") + echo "# System Generations #" + nixos-rebuild list-generations + ;; + *) + echo "Rolling Back to Generation '$3'..." + sudo nix-env --switch-generation "$3" -p "/nix/var/nix/profiles/system" && nixos apply --activate + ;; + esac + ;; + *) + SPECIALISATIONS=$(ls -1 /nix/var/nix/profiles/system/specialisation) + if grep -wq "$2" <<<"$SPECIALISATIONS" &> /dev/null + then + echo "Applying Configuration ($2)..." + sudo nixos-rebuild switch --specialisation "$2" + else + error "Unknown Option '$2'\n${usage.apply}" "# Available Specialisations #\n$SPECIALISATIONS" + fi + ;; + esac + ;; + "cache") + if [ -z "$2" ] + then + error "Expected a Build Command" + else + echo "Executing Command '" "''${@:2}" "'..." + cachix authtoken "$(find ${path.system} -name cachix-token.secret -exec sops --config ${path.sops} -d {} \+)" + cachix watch-exec ${path.cache} "''${@:2}" + fi + ;; + "check") + echo "Formatting Code..." + pushd ${path.system} &> /dev/null; nix fmt; popd &> /dev/null + case $2 in + "") nix flake check ${path.system} --keep-going;; + "--trace") nix flake check ${path.system} --keep-going --show-trace;; + *) nix flake check "$2" --keep-going;; + esac + ;; + "clean") + echo "Running Garbage Collection..." + mkwindows-tools-gc + nix-collect-garbage -d + rm -rf /nix/var/nix/profiles/per-user/"$USER"/profile + if [ "$EUID" -ne 0 ] && [ "$2" != "--all" ] + then + warn "Run as 'root' or use Option '--all' to Clean System Generations" + else + sudo nix-collect-garbage -d + sudo rm -rf /run/secrets/* + sudo nix-env --delete-generations old --profile /nix/var/nix/profiles/system + nixos apply --activate + fi + newline + echo "Running De-Duplication..." + nix store optimise + ;; + "explore") + case $2 in + "") nix repl --arg host true --arg path ${path.system} --file ${repl};; + *) nix repl --arg path "$(readlink -f "$2" | sed 's|/flake.nix||')" --file ${repl};; + esac + ;; + "iso") + case $2 in + "") error "Expected a Device name";; + *) + if grep -wq "$2" <<<"${nixosConfigurations}" &> /dev/null + then + echo "Building '$2' Image..." + nom build ${path.system}#nixosConfigurations."$2".config.system.build.images.iso + else + error "Unknown Device '$2'" "# Available Devices #\n ${nixosConfigurations}" + fi + ;; + esac + case $3 in + "") echo "The '--burn' Option can be used to Flash the Image onto a USB";; + "--burn") + case $4 in + "") error "Expected a 'path' to USB Drive";; + *) + IMAGE=$(find ./result/iso -type f -name "*.iso") + sudo dd if="$IMAGE" of="$4" status=progress bs=1M + ;; + esac + ;; + *) error "Unknown Option '$3'";; + esac + ;; + "list") + case $2 in + "") installed;; + *) find=$(installed | grep "$2") + if [ -z "$find" ] + then + missing "$2" "Package '$2' not found" + else + echo "$find" + fi + ;; + esac + ;; + "locate") + case $2 in + "") error "Expected Package Name";; + *) + package=$(installed | grep "$2") + if [ -z "$package" ] + then + location=$(find /nix/store -maxdepth 1 -type d -name "*$2*") + if [ -n "$location" ] + then + if (( $(grep -c . <<<"$location") > 1 )) + then + echo -e "Locations:\n$location" + else + echo -e "Location: $location" + fi + else + missing "$2" "Package '$2' is invalid" + fi + else + if (( $(grep -c . <<<"$package") > 1 )) + then + locations=$(find /nix/store -maxdepth 1 -type d -name "*$2*") + echo -e "Locations:\n$locations" + else + echo "Package $package found" + nix search nixpkgs#"$2" &> /dev/null && location=$(nix eval nixpkgs#"$2".outPath 2> /dev/null | sed 's/"//g') || location=$(find /nix/store -maxdepth 1 -type d -name "*$package") + echo "Location: $location" + fi + fi + ;; + esac + ;; + "run") + export NIXPKGS_ALLOW_UNFREE=1 + if [[ "$2" == *[:/]* ]] || grep -wq "$2" <<<"${list inputs}" + then + nix run "$2"#"$3" --impure -- "''${@:4}" + else + nix run ${path.system}#"$2" --impure -- "''${@:3}" + fi + ;; + "search") + case $2 in + "") error "Expected an Option" "${usage.search}";; + help|--help|-h) echo "${usage.search}";; + cmd.*) + command="''${2//cmd\./}" + echo "Searching for Package providing Command '$command'..." + output=$(nix-locate --whole-name --type x --type s --no-group --top-level --at-root "/bin/$command") + if [ -z "$output" ] + then + error "Command '$command' not found" + else + echo "$output" + fi + ;; + pkgs.*) + package="''${2//pkgs\./}" + echo "Searching for Package '$package'..." + if [ -z "$3" ] + then + nix search nixpkgs#"$package" + else + nix search "$3"#"$package" + fi + ;; + *) + echo "Searching for Term '$2'..." + manix "$2" + ;; + esac + ;; + "secret") + case $2 in + "") error "Expected an Option" "${usage.secret}";; + help|--help|-h) echo "${usage.secret}";; + "create") + case $3 in + "") error "Expected 'name' of Secret";; + *) + echo "Creating Secret '$3'..." + sops --config ${path.sops} -i ${path.system}/"$3".secret + ;; + esac + ;; + "edit") + case $3 in + "") error "Expected 'name' of Secret";; + *) + if secret_exists "$3" + then + echo "Editing Secret '$3'..." + find ${path.system} -name "$3".secret -exec sops --config ${path.sops} -i {} \+ + else + error "Unknown Secret '$3'" + fi + ;; + esac + ;; + "list") + echo "## Secrets in ${path.system} ##" + grep / ${path.sops} | sed -e 's|- path_regex:||' -e 's/\/\.\*\$//' -e 's| |${path.system}/|' | xargs tree -C --noreport -P '*.secret' -I '_*' | sed 's/\.secret//' + ;; + "show") + if secret_exists "$3" + then + echo "Showing Secret '$3'..." + find ${path.system} -name "$3".secret -exec sops --config ${path.sops} -d {} \+ + else + error "Unknown Secret '$3'" + fi + ;; + "update") + echo "Updating Secrets..." + find ${path.system} -name '*.secret' ! -name '_*' -exec sops --config ${path.sops} updatekeys {} \; + ;; + *) error "Unknown Option '$2'" "${usage.secret}";; + esac + ;; + "setup") + if [ -d ${path.persist} ]; then + DIR=${path.persist}${path.system} + else + DIR=${path.system} + fi + + echo "Cloning Repository..." + sudo git clone --recurse-submodules ${path.repo} "$DIR" + pushd "$DIR" &> /dev/null; sudo git config core.fileMode false; popd &> /dev/null + sudo chgrp -R keys "$DIR" + newline + + read -rp "Enter Path to GPG Keys (path/.git): " KEY + LINK='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]' + if [ -z "$KEY" ] + then + error "Path to GPG Keys cannot be empty" + elif [[ $KEY =~ $LINK ]] + then + echo "Cloning Keys..." + git clone "$KEY" keys --progress + else + cp -r "$KEY"/. ./keys + fi + echo "Importing Keys..." + find ./keys -name '*.gpg' -exec sudo gpg --homedir ${path.gpg} --import {} \+ + rm -rf ./keys + newline + + nixos apply --activate + ;; + "shell") + case $2 in + "") nix develop ${path.system} --command "$SHELL";; + *) + if grep -wq "$2" <<<"${devShells}" &> /dev/null + then + nix develop ${path.system}#"$2" --command "$SHELL" + else + error "Unknown Shell '$2'" "# Available Shells #\n ${devShells}" + fi + ;; + esac + ;; + "update") + case $2 in + help|--help|-h) echo "${usage.update}";; + "--pkgs") + echo "Updating Packages..." + pushd ${path.system}/packages &> /dev/null + bash ${./packages.sh} + popd &> /dev/null + ;; + "--commit") + echo "Updating Flake Inputs..." + nix flake update --flake ${path.system} --commit-lock-file + ;; + "") + echo "Updating Flake Inputs..." + nix flake update --flake ${path.system} + ;; + *) + echo "Updating Flake Input '$2'..." + if [ -z "$3" ] + then + nix flake update --flake ${path.system} "$2" + else + + nix flake update --flake ${path.system} "$2" --override-input "$2" "$3" + fi + ;; + esac + ;; + *) error "Unknown Option '$1'" "${usage.script}";; + esac + ''; + } + ) diff --git a/scripts/packages.sh b/scripts/packages.sh @@ -0,0 +1,138 @@ +#! /usr/bin/env nix +#! nix shell nixpkgs#bash nixpkgs#coreutils nixpkgs#jq -c bash + +unset NIX_PATH +set -euo pipefail + +COMMIT_PREFIX="chore(packages): Update" + +# Script to Automatically Update Packages # +# Logic +update() { + if [[ "${1:-""}" != "" ]] + then + t1="$(mktemp)"; trap 'rm ${t1}' EXIT; + t2="$(mktemp)"; trap 'rm ${t2}' EXIT; + pkg="${1}" + metadata="${pkg}/metadata.nix" + pkgname="$(basename "${pkg}")" + + if [[ ! -f "${pkg}/metadata.nix" ]] + then + exit 0 + fi + + # Extraction + # Include ${pkg}/metadata.nix according to spec + nix eval -f "${metadata}" --json > "${t1}" 2>/dev/null + rev="$(cat "${t1}" | jq -r .rev)" + sha256="$(cat "${t1}" | jq -r .sha256)" + repo="$(cat "${t1}" | jq -r .repo)" + branch="$(cat "${t1}" | jq -r .branch)" # Optional + release="$(cat "${t1}" | jq -r .release)" # Optional + cargoHash="$(cat "${t1}" | jq -r .cargoHash)" # Optional + vendorHash="$(cat "${t1}" | jq -r .vendorHash)" # Optional + skip="$(cat "${t1}" | jq -r .skip)" # Optional + upattr="$(cat "${t1}" | jq -r .upattr)"; # Optional + if [[ "${upattr}" == "null" ]] + then + upattr="${pkgname}" + fi + + if [[ "${skip}" == "true" ]] + then + echo "Skipping (Pinned to '${rev}')" + exit 0 + fi + + # Latest Revision + if [[ "${repo}" != "null" ]] + then + if [[ "${release}" == "true" ]] + then + newrev="$(git ls-remote --refs --sort="version:refname" --tags "${repo}" | cut -d/ -f3- | tail -n1)" + else + if [[ "${branch}" == "null" ]] + then + branch="main" + fi + newrev="$(git ls-remote "${repo}" "refs/heads/${branch}" | awk '{ print $1}')" + fi + fi + + # Early Quit + if [[ "${rev}" == "${newrev}" && "${FORCE_RECHECK:-""}" != "true" ]] + then + echo "'${pkgname}' Already Up to Date ('${rev}')" + exit 0 + fi + + echo "Updating '${pkgname}'..." + echo "Bumping '${rev}' ---> '${newrev}'" + + # SHA + fakeHash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + sed -i "s|${rev}|${newrev}|" "${metadata}" + sed -i "s|${sha256}|${fakeHash}|" "${metadata}" + nix build --no-link "..#${upattr}" &> "${t2}" || true + newHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f2 | tr -d ' ' || true)" + if [[ "${newHash}" == "sha256" ]] + then + newHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f3 | tr -d ' ' || true)" + fi + + newHash="$(nix hash convert --hash-algo sha256 "${newHash}")" + sed -i "s|${fakeHash}|${newHash}|" "${metadata}" + + # Cargo SHA + if [[ "${cargoHash}" != "null" ]] + then + sed -i "s|${cargoHash}|${fakeHash}|" "${metadata}" + nix build --no-link "..#${upattr}" &> "${t2}" || true + newcargoHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f2 | tr -d ' ' || true)" + if [[ "${newcargoHash}" == "sha256" ]] + then + newcargoHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f3 | tr -d ' ' || true)" + fi + newcargoHash="$(nix hash convert --hash-algo sha256 "${newcargoHash}")" + sed -i "s|${fakeHash}|${newcargoHash}|" "${metadata}" + fi + + # Vendor SHA + if [[ "${vendorHash}" != "null" ]] + then + sed -i "s|${vendorHash}|${fakeHash}|" "${metadata}" + nix build --no-link "..#${upattr}" &> "${t2}" || true + newvendorHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f2 | tr -d ' ' || true)" + if [[ "${newvendorHash}" == "sha256" ]] + then + newvendorHash="$(cat "${t2}" | grep 'got:' | cut -d':' -f3 | tr -d ' ' || true)" + fi + newvendorHash="$(nix hash convert --hash-algo sha256 "${newvendorHash}")" + sed -i "s|${fakeHash}|${newvendorHash}|" "${metadata}" + fi + + # Commit + git diff-index --quiet HEAD "${pkg}" || \ + git commit -q -n "${pkg}" -m "${COMMIT_PREFIX} \`${pkgname}\`" -m "${rev} ---> ${newrev}" + echo -e "Finished Updating '${pkgname}' ('${rev}' ---> '${newrev}')\n" + exit 0 + fi +} +export -f update + +# Execution +main() { + echo "Checking for Updates..." +} + +while true +do + (main) + find . -mindepth 1 -maxdepth 1 -type d -exec bash -c 'update "$0"' {} \; + res=$? + if (( res != 255 )) + then + break + fi +done diff --git a/scripts/pci.sh b/scripts/pci.sh @@ -0,0 +1,13 @@ +#! /usr/bin/env nix +#! nix shell nixpkgs#bash nixpkgs#coreutils -c bash + +# Shows PCI Devices mapped to IOMMU Groups # + +for group in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V) +do + echo "IOMMU Group ""${group##*/}"":" + for device in "$group"/devices/* + do + echo -e "\t$(lspci -nns "${device##*/}")" + done +done diff --git a/scripts/sysutils.nix b/scripts/sysutils.nix @@ -0,0 +1,257 @@ +{ + lib, + pkgs, + files, + ... +}: let + inherit (lib) licenses recursiveUpdate; + + help = '' + # Legend # + xxx - Command [action] - Description + + # Usage # + help - Show this information + brightness [up,down] - Screen Brightness Controls + backlight [up,down] - Keyboard Backlight Controls + temperature - Display Temperature Control + volume [up,down,mute] - Volume Controls + media [next,previous,toggle] - Media Controls + toggle  + service ['name'] - Toggle SYSTEMD Service + ''; +in + recursiveUpdate + { + meta = { + mainProgram = "sysutils"; + description = "System Utility Script"; + homepage = files.path.repo; + license = licenses.gpl3Only; + maintainers = ["maydayv7"]; + }; + } + ( + pkgs.writeShellApplication { + name = "sysutils"; + runtimeInputs = with pkgs; [ + coreutils + gnugrep + wget + + alsa-utils + brightnessctl + brillo + libnotify + playerctl + sunsetr + systemd + ]; + + text = '' + set +eu + ${files.scripts.commands} + show_album_art=true + show_music_in_volume_indicator=true + + notify() { + notify-send -a "utility" -t 1000 -h string:x-canonical-private-synchronous:"$1" "''${@:2}" + } + + fail() { + error "$1" "Try 'sysutils help' for more information" + } + + get_media_icon() { + media_icon="audio-speakers" + if $show_album_art + then + temp sysutils_media-icon 1 + url=$(playerctl -f "{{mpris:artUrl}}" metadata) + if [[ "$url" == "file://"* ]] + then + media_icon="''${url/file:\/\//}" + elif [[ "$url" == "http://"* ]] || [[ "$url" == "https://"* ]] + then + filename="$(echo "$url" | sed "s/.*\///")" + if [ ! -f "$TEMP/$filename" ]; then wget -O "$TEMP/$filename" "$url"; fi + media_icon="$TEMP/$filename" + fi + fi + } + + case "$1" in + "") error "Expected an Option" "${help}";; + "help") echo -e "## System Utility Script ##\n${help}";; + "brightness") + brightness_notification() { + brightness=$(brillo | grep -Po '[0-9]{1,3}' | head -n 1) + notify brightness -i "display" -h int:value:"$brightness" "🔅 $brightness%" + } + case "$2" in + "up") + brillo -u 300000 -A 5 + brightness_notification + ;; + "down") + brillo -u 300000 -U 5 + brightness_notification + ;; + "") fail "Expected an Option" ;; + *) fail "Unexpected Option 'brightness $2'" ;; + esac + ;; + "backlight") + backlight_notification() { + backlight="$(cat /sys/class/leds/*::kbd_backlight/brightness)" + light=0; if [ "$backlight" -eq 1 ]; then light=33; fi + if [ "$backlight" -eq 2 ]; then light=67; fi + if [ "$backlight" -eq 3 ]; then light=100; fi + notify backlight -i "keyboard" -h int:value:"$light" "🔅 $light%" + } + case "$2" in + "up") + brightnessctl -d "*::kbd_backlight" set 33%+ + backlight_notification + ;; + "down") + brightnessctl -d "*::kbd_backlight" set 33%- + backlight_notification + ;; + "") fail "Expected an Option" ;; + *) fail "Unexpected Option 'brightness $2'" ;; + esac + ;; + "temperature") + readarray -t presets < <(sunsetr preset list) + active_preset=$(sunsetr preset active) + cur_ind=-1 + for i in "''${!presets[@]}" + do + if [ "''${presets[$i]}" = "$active_preset" ] + then + cur_ind=$i + break + fi + done + + if [ "$cur_ind" -eq -1 ] + then + next_ind=0 + else + next_ind=$(( (cur_ind + 1) % ''${#presets[@]} )) + fi + + next_preset="''${presets[$next_ind]}" + sunsetr preset "$next_preset" + notify temperature -i "display" "🌡 Preset: $next_preset" + ;; + "volume") + volume_notification() { + volume=$(amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1) + mute=$(amixer get Master | grep '%' | grep -oE '[^ ]+$' | grep off | head -n1) + if [ "$volume" -eq 0 ] || [ "$mute" == "[off]" ] + then + volume_icon="🔇" + elif [ "$volume" -lt 50 ] + then + volume_icon="🔉" + else + volume_icon="🔊" + fi + + song_title=$(playerctl -f "{{title}}" metadata) + get_media_icon + if $show_music_in_volume_indicator && [ -n "$song_title" ] + then + song_artist=$(playerctl -f "{{artist}}" metadata) + if [ -z "$song_artist" ] + then + notify volume -h int:value:"$volume" -i "$media_icon" "$volume_icon $volume%" "$song_title" + else + notify volume -h int:value:"$volume" -i "$media_icon" "$volume_icon $volume%" "$song_title\nBy $song_artist" + fi + else + notify volume -h int:value:"$volume" -i "$media_icon" "$volume_icon $volume%" + fi + } + case "$2" in + "up") + amixer set Master on + amixer sset Master 5%+ + volume_notification + ;; + "down") + amixer set Master on + amixer sset Master 5%- + volume_notification + ;; + "mute") + amixer set Master 1+ toggle + volume_notification + ;; + "") fail "Expected an Option" ;; + *) fail "Unexpected Option 'volume $2'" ;; + esac + ;; + "media") + music_notification() { + song_title=$(playerctl -f "{{title}}" metadata) + song_artist=$(playerctl -f "{{artist}}" metadata) + song_album=$(playerctl -f "{{album}}" metadata) + get_media_icon + if [ -z "$song_album" ] + then + if [ -z "$song_artist" ] + then + notify music -i "$media_icon" "$song_title" + else + notify music -i "$media_icon" "$song_title" "By $song_artist" + fi + else + notify music -i "$media_icon" "$song_title" "By $song_artist from $song_album" + fi + } + case "$2" in + "next") + playerctl next + sleep 0.5 && music_notification + ;; + "previous") + playerctl previous + sleep 0.5 && music_notification + ;; + "toggle") + playerctl play-pause + music_notification + ;; + "") fail "Expected an Option" ;; + *) fail "Unexpected Option 'media $2'" ;; + esac + ;; + "toggle") + case "$2" in + "service") + if [ -z "$3" ] + then + fail "Expected service name" + fi + + if systemctl --user is-active "$3" + then + systemctl --user stop "$3" + notify service -i "system-config-services" "Stopped $3" + else + systemctl --user start "$3" + notify service -i "system-config-services" "Started $3" + fi + ;; + "") fail "Expected an Option" ;; + *) fail "Unexpected Option 'toggle $2'" ;; + esac + ;; + *) fail "Unexpected Option '$1'" ;; + esac + ''; + } + ) diff --git a/secrets/README.md b/secrets/README.md @@ -0,0 +1,10 @@ +### Credentials + +The authentication credentials are managed using [`sops-nix`](https://github.com/Mic92/sops-nix) at `secrets`. +The [`sops`](https://github.com/mozilla/sops) encrypted secrets (using GPG) are stored at multiple places, like in this directory, as well as [`passwords`](./passwords). +User passwords are generated using `mkpasswd -m sha-512` and specified using the `hashedPasswordFile` option. +The `sops` encrypted secrets are of `binary` format (and have the extension `.secret`) and can be conveniently managed using the [`nixos`](../scripts/README.md) `secret` command. +The `keys` directory contains the _public_ User GPG Keys which are automatically imported + +To create a secret, use the `nixos secret create` command, and append the directory along with requisite access permissions to the `secrets.yaml` file. +Device-specific secrets are automatically imported, if a directory (with the same name as the device `HOSTNAME`) containing them is present in this directory diff --git a/secrets/_module.nix b/secrets/_module.nix @@ -0,0 +1,39 @@ +## Secrets Management ## +{ + config, + inputs, + ... +}: let + inherit (config) util; + inherit (config.flake) files; +in { + flake.modules.nixos.secrets = { + config, + pkgs, + ... + }: let + path = files.path.gpg; + in { + imports = [inputs.sops.nixosModules.sops]; + + config = { + environment = { + persist.directories = [path]; + systemPackages = [pkgs.sops]; + }; + + sops = { + gnupg.home = path; + secrets = let + directory = ./. + "/${config.networking.hostName}"; + in + util.map.secrets {directory = ./.;} + // ( + if (builtins.pathExists directory) + then util.map.secrets {inherit directory;} + else {} + ); + }; + }; + }; +} diff --git a/nixos/secrets/cachix-token.secret b/secrets/cachix-token.secret diff --git a/nixos/secrets/github-token.secret b/secrets/github-token.secret diff --git a/nixos/secrets/gitlab-token.secret b/secrets/gitlab-token.secret diff --git a/nixos/secrets/keys/.gitattributes b/secrets/keys/.gitattributes diff --git a/nixos/secrets/keys/navya.gpg b/secrets/keys/navya.gpg diff --git a/nixos/secrets/keys/v7.gpg b/secrets/keys/v7.gpg diff --git a/nixos/users/passwords/default b/secrets/passwords/default diff --git a/nixos/users/passwords/navya.secret b/secrets/passwords/navya.secret diff --git a/nixos/users/passwords/root.secret b/secrets/passwords/root.secret diff --git a/nixos/users/passwords/v7.secret b/secrets/passwords/v7.secret diff --git a/secrets/secrets.yaml b/secrets/secrets.yaml @@ -0,0 +1,13 @@ +keys: + - &v7 8C240C0C11293EE56260601CCF616EB19C2765E4 + - &navya B141E0D9F711DD86DEAE1269D9B023AB01B68EFE +creation_rules: + - path_regex: secrets/.*$ + key_groups: + - pgp: + - *v7 + - path_regex: secrets/passwords/.*$ + key_groups: + - pgp: + - *v7 + - *navya diff --git a/nixos/secrets/valkyrie/tailscale.secret b/secrets/valkyrie/tailscale.secret diff --git a/nixos/secrets/vortex/cloudflare.secret b/secrets/vortex/cloudflare.secret diff --git a/nixos/secrets/vortex/github-runner.secret b/secrets/vortex/github-runner.secret diff --git a/nixos/secrets/vortex/gitlab-runner.secret b/secrets/vortex/gitlab-runner.secret diff --git a/shells/.envrc b/shells/.envrc @@ -0,0 +1 @@ +eval "$(lorri direnv --shell-file default.nix)" diff --git a/shells/android.nix b/shells/android.nix @@ -0,0 +1,48 @@ +pkgs: let + androidEnv = pkgs.callPackage "${toString pkgs.path}/pkgs/development/mobile/androidenv" { + inherit pkgs; + licenseAccepted = true; + }; + + buildTools = "35.0.0"; + inherit + (androidEnv.composeAndroidPackages { + cmdLineToolsVersion = "8.0"; + toolsVersion = "26.1.1"; + platformToolsVersion = "35.0.2"; + buildToolsVersions = [buildTools]; + includeEmulator = false; + platformVersions = ["35"]; + includeSystemImages = false; + includeSources = false; + cmakeVersions = ["3.22.1"]; + includeNDK = true; + ndkVersions = ["27.0.12077973"]; + extraLicenses = [ + "android-sdk-license" + "android-sdk-preview-license" + ]; + }) + androidsdk + ; +in rec { + name = "Android"; + packages = with pkgs; [ + jdk + kotlin + gradle + flutter + + androidsdk + pkg-config + ]; + + shellHook = ''echo "## Android Development Shell ##"''; + JAVA_HOME = pkgs.jdk; + GRADLE_HOME = "${pkgs.gradle}/lib/gradle"; + GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidsdk}/libexec/android-sdk/build-tools/${buildTools}/aapt2"; + FLUTTER_ROOT = pkgs.flutter; + DART_ROOT = "${FLUTTER_ROOT}/bin/cache/dart-sdk"; + ANDROID_SDK_ROOT = "${androidsdk}/libexec/android-sdk"; + ANDROID_NDK_ROOT = "${ANDROID_SDK_ROOT}/ndk-bundle"; +} diff --git a/shells/cc.nix b/shells/cc.nix @@ -0,0 +1,13 @@ +pkgs: { + name = "C"; + packages = with pkgs; [ + clang + cmake + gcc + gdb + libcxx + ]; + + shellHook = ''echo "## C/C++ Development Shell ##"''; + LIBCLANG_PATH = "${pkgs.libclang}/lib"; +} diff --git a/shells/default.nix b/shells/default.nix @@ -0,0 +1,23 @@ +{pkgs ? import ../packages, ...}: +with pkgs; + mkShell { + name = "devShell"; + packages = + [ + git + gnupg + jq + nixFlakes + sops + treefmt + ] + ++ [ + figlet + fastfetch + ]; + + shellHook = '' + echo -e "\e[36m## Default Developer Shell ##" + echo -e "\e[34m Version: $(nix --version)" + ''; + } diff --git a/shells/java.nix b/shells/java.nix @@ -0,0 +1,6 @@ +pkgs: { + name = "Java"; + packages = [pkgs.jdk]; + shellHook = ''echo "## Java Development Shell ##"''; + JAVA_HOME = pkgs.jdk; +} diff --git a/shells/js.nix b/shells/js.nix @@ -0,0 +1,12 @@ +pkgs: { + name = "JS"; + shellHook = ''echo "## JavaScript Development Shell ##"''; + packages = with pkgs; [ + nodejs + typescript + + eslint + nodemon + postman + ]; +} diff --git a/shells/lua.nix b/shells/lua.nix @@ -0,0 +1,8 @@ +pkgs: { + name = "Lua"; + shellHook = ''echo "## Lua Development Shell ##"''; + packages = with pkgs; [ + lua + luaPackages.moonscript + ]; +} diff --git a/shells/python.nix b/shells/python.nix @@ -0,0 +1,23 @@ +pkgs: { + name = "Python"; + shellHook = ''echo "## Python Development Shell ##"''; + packages = [ + pkgs.python3 + (pkgs.python3.withPackages ( + p: + with p; [ + pip + poetry-core + setuptools + + black + pylint + + ipython + matplotlib + numpy + pandas + ] + )) + ]; +} diff --git a/shells/rust.nix b/shells/rust.nix @@ -0,0 +1,10 @@ +pkgs: { + name = "Rust"; + packages = with pkgs; [ + cargo + rustup + ]; + + shellHook = ''echo "## Rust Development Shell ##"''; + RUST_BACKTRACE = 1; +} diff --git a/shells/sql.nix b/shells/sql.nix @@ -0,0 +1,35 @@ +pkgs: let + pkg = pkgs.mariadb; +in { + name = "SQL"; + packages = [pkg]; + shellHook = '' + alias mysql='mysql -u root' + MYSQL_HOME=$HOME/.mysql + MYSQL_DATADIR=$MYSQL_HOME/data + export MYSQL_UNIX_PORT=$MYSQL_HOME/mysql.sock + MYSQL_PID_FILE=$MYSQL_HOME/mysql.pid + + if [ ! -d "$MYSQL_HOME" ] + then + # Make sure to use normal authentication method + # otherwise we can only connect with unix account + # but users do not actually exist in NixOS + mysql_install_db --auth-root-authentication-method=normal \ + --datadir=$MYSQL_DATADIR --basedir=${pkg} \ + --pid-file=$MYSQL_PID_FILE + fi + + # Starts the daemon + mysqld --datadir=$MYSQL_DATADIR --pid-file=$MYSQL_PID_FILE \ + --socket=$MYSQL_UNIX_PORT 2> $MYSQL_HOME/mysql.log & + MYSQL_PID=$! + + finish() { + mysqladmin -u root --socket=$MYSQL_UNIX_PORT shutdown + kill $MYSQL_PID + wait $MYSQL_PID + } + trap finish EXIT + ''; +} diff --git a/shells/video.nix b/shells/video.nix @@ -0,0 +1,13 @@ +pkgs: { + name = "Video"; + shellHook = ''echo "## Video Editing Shell ##"''; + packages = with pkgs; [ + audacity + blender + ffmpeg + handbrake + mpv + obs-studio + yt-dlp + ]; +} diff --git a/site/README.md b/site/README.md @@ -1,6 +1,6 @@ ## My Personal Website -[![website](../.misc/website.png)](https://maydayv7.cc) +[![website](../files/images/website.png)](https://maydayv7.cc) Built with [Zola](https://www.getzola.org/) Deployed via [Nix](https://nixos.org/) and [Cloudflare](https://www.cloudflare.com/) @@ -8,7 +8,7 @@ Hosted at [maydayv7.cc](https://maydayv7.cc) ### Build -You can grab all the required dependencies using `nix-shell` +You can grab all the required dependencies using `nix develop github:maydayv7/dotfiles#website` or `nix-shell` For testing, run the following commands: @@ -19,8 +19,8 @@ zola -r site serve Then click [here](http://localhost:1111) -To build the website, run `nix build`. -To override the URL, run: <pre><code>nix build --impure --expr "with import \<nixpkgs\> { }; callPackage ./site { site = <b><i>URL</i></b>; }"</code></pre> +To build the site, run `nix build .#website`. +To override the URL, run: <pre><code>nix build --impure --expr 'with (builtins.getFlake (toString ../.)).legacyPackages.x86_64-linux; callPackage ./site { site = "<b><i>URL</i></b>"; }'</code></pre> #### Continuous Integration @@ -48,7 +48,7 @@ To override the URL, run: <pre><code>nix build --impure --expr "with import \<ni ## `git` frontend -The [`git`](./git) directory contains the configuration for my static `git` frontend, hosted at [git.maydayv7.cc](https://maydayv7.cc) +The [`git`](./git) directory contains the configuration for my static `git` frontend, hosted at [git.maydayv7.cc](https://git.maydayv7.cc) It is built using my `stagit` [fork](https://github.com/maydayv7/stagit) to generate static HTML pages for my repositories To build it, run `nix run .#build-stagit` -[`GitHub Actions`](../checks/github/workflows/website-git.yml) is used to automatically build the site and deploy it to Cloudflare every week +[`GitHub Actions`](../.github/workflows/website-git.yaml) is used to automatically build the site and deploy it to Cloudflare every week diff --git a/site/_module.nix b/site/_module.nix @@ -0,0 +1,30 @@ +## Website Configuration ## +_: { + perSystem = { + lib, + pkgs, + ... + }: { + # Website + packages.website = pkgs.callPackage ./. {inherit lib pkgs;}; + + # 'git' Frontend + apps.build-stagit = { + type = "app"; + program = lib.getExe (pkgs.callPackage ./git {inherit lib pkgs;}); + }; + + # Development Shell + devShells.website = import ./shell.nix {inherit pkgs;}; + + # Formatting Errors + treefmt.config.programs.prettier.excludes = [ + "site/templates/macros/edit.html" + "site/templates/macros/head.html" + "site/templates/macros/javascript.html" + "site/templates/macros/menu.html" + "site/templates/macros/posts.html" + "site/templates/tags/list.html" + ]; + }; +} diff --git a/site/default.nix b/site/default.nix @@ -8,13 +8,17 @@ pkgs.stdenvNoCC.mkDerivation { version = "stable"; src = ./.; - buildInputs = [ pkgs.zola ]; + buildInputs = [pkgs.zola]; installPhase = "cp -r public $out"; - buildPhase = "zola build ${if (site != null) then "--base-url " + site else ""}"; + buildPhase = "zola build ${ + if (site != null) + then "--base-url " + site + else "" + }"; meta = with lib; { description = "My Personal Website"; license = licenses.gpl3Only; - maintainers = [ "maydayv7" ]; + maintainers = ["maydayv7"]; }; } diff --git a/site/flake.lock b/site/flake.lock @@ -1,142 +0,0 @@ -{ - "nodes": { - "formatter": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1780220602, - "narHash": "sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "db947814a175b7ca6ded66e21383d938df01c227", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "framework": { - "inputs": { - "nixpkgs-lib": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1778716662, - "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1780243769, - "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "formatter": "formatter", - "framework": "framework", - "nixpkgs": "nixpkgs", - "stagit": "stagit", - "systems": "systems_2" - } - }, - "stagit": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "utils": "utils" - }, - "locked": { - "lastModified": 1767557231, - "narHash": "sha256-cXLrl1XCf3Mhz9UhCQxt0eZNcAOtejReiMAi/fTWn6s=", - "owner": "maydayv7", - "repo": "stagit", - "rev": "62010429c33b33ef1239638b202a745ea29e43a1", - "type": "github" - }, - "original": { - "owner": "maydayv7", - "repo": "stagit", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "flake": false, - "locked": { - "lastModified": 1707463813, - "narHash": "sha256-qUyPFG6yjwI4b3wya7aEFDYSIxf1fZeapi0dF46+pAk=", - "owner": "maydayv7", - "repo": "dotfiles", - "rev": "5d24bade1fb3e0186e28a33908519f65ec774c2d", - "type": "github" - }, - "original": { - "owner": "maydayv7", - "ref": "systems", - "repo": "dotfiles", - "type": "github" - } - }, - "utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/site/flake.nix b/site/flake.nix @@ -1,99 +0,0 @@ -{ - description = "My Personal Website"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable"; - systems = { - url = "github:maydayv7/dotfiles?ref=systems"; - flake = false; - }; - - framework = { - url = "github:hercules-ci/flake-parts"; - inputs.nixpkgs-lib.follows = "nixpkgs"; - }; - - formatter = { - url = "github:numtide/treefmt-nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - stagit = { - url = "github:maydayv7/stagit"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = - { self, ... }@inputs: - inputs.framework.lib.mkFlake { inherit inputs; } { - inherit (self) systems; - flake.systems = import inputs.systems; - imports = [ inputs.formatter.flakeModule ]; - perSystem = - { - config, - lib, - system, - ... - }: - let - pkgs = import inputs.nixpkgs { - inherit system; - overlays = [ - (final: prev: { - stagit-fork = inputs.stagit.packages.${system}.default; - }) - ]; - }; - in - { - # Website - packages = rec { - default = website; - website = pkgs.callPackage ./. { inherit lib pkgs; }; - }; - - # 'git' Frontend - apps = rec { - default = build-stagit; - build-stagit = { - type = "app"; - program = lib.getExe (pkgs.callPackage ./git { inherit lib pkgs; }); - }; - }; - - # Development Shell - devShells = rec { - default = website; - website = import ./shell.nix { inherit pkgs; }; - }; - - # Formatting - treefmt.config = { - projectRootFile = "flake.nix"; - settings.global.excludes = [ - "_*" - "result/**" - "flake.lock" - ]; - - programs = { - nixfmt.enable = true; - prettier = { - enable = true; - settings.bracketSameLine = true; - excludes = [ - "templates/macros/edit.html" - "templates/macros/head.html" - "templates/macros/javascript.html" - "templates/macros/menu.html" - "templates/macros/posts.html" - "templates/tags/list.html" - ]; - }; - }; - }; - }; - }; -} diff --git a/site/git/default.nix b/site/git/default.nix @@ -4,26 +4,25 @@ site ? "https://git.maydayv7.cc", sitename ? "maydayv7", test ? false, -}: -let +}: let inherit (lib) concatMapStrings licenses recursiveUpdate; theme = import ./theme.nix pkgs; buildCommands = - if test then - ''build_repo test "A long description just for testing" Me "$(pwd)"'' + if test + then ''build_repo test "A long description just for testing" Me "$(pwd)"'' else concatMapStrings (repo: '' build_repo "${repo.name}" "${repo.description}" "${repo.owner}" "${repo.url}" '') (import ./repos.nix); in -recursiveUpdate + recursiveUpdate { meta = { mainProgram = "build-stagit"; description = "Build 'git' frontend site"; license = licenses.gpl3Only; - maintainers = [ "maydayv7" ]; + maintainers = ["maydayv7"]; }; } ( @@ -36,7 +35,6 @@ recursiveUpdate ]; text = '' - set -e echo "Building Site..." diff --git a/site/git/theme.nix b/site/git/theme.nix @@ -1,34 +1,30 @@ -pkgs: -let +pkgs: let style = builtins.readFile ./style.css; - mkTheme = - name: colors: + mkTheme = name: colors: with colors; - pkgs.writeText "style-${name}.css" '' - - ${style} - :root { - --bg: ${bg}; - --fg: ${fg}; - --fg-dim: ${fgDim}; - --border: ${border}; - --border-subtle: rgba(255, 255, 255, 0.05); - - /* Theme Colors */ - --accent: ${accent}; - --accent-alpha-70: ${accentAlpha70}; - --secondary: ${secondary}; - --secondary-alpha-20: ${secondaryAlpha20}; - --secondary-alpha-70: ${secondaryAlpha70}; - --bg-hover: rgba(255, 255, 255, 0.03); - --bg-code: rgba(0, 0, 0, 0.2); - --diff-add: ${diffAdd}; - --diff-del: ${diffDel}; - --diff-mod: ${diffMod}; - } - ''; -in -{ + pkgs.writeText "style-${name}.css" '' + ${style} + :root { + --bg: ${bg}; + --fg: ${fg}; + --fg-dim: ${fgDim}; + --border: ${border}; + --border-subtle: rgba(255, 255, 255, 0.05); + + /* Theme Colors */ + --accent: ${accent}; + --accent-alpha-70: ${accentAlpha70}; + --secondary: ${secondary}; + --secondary-alpha-20: ${secondaryAlpha20}; + --secondary-alpha-70: ${secondaryAlpha70}; + --bg-hover: rgba(255, 255, 255, 0.03); + --bg-code: rgba(0, 0, 0, 0.2); + --diff-add: ${diffAdd}; + --diff-del: ${diffDel}; + --diff-mod: ${diffMod}; + } + ''; +in { red = mkTheme "red" { bg = "#221f29"; fg = "whitesmoke"; diff --git a/site/shell.nix b/site/shell.nix @@ -1,7 +1,4 @@ -{ - pkgs ? import ../., - ... -}: +{pkgs ? import ../., ...}: pkgs.mkShell { name = "Website"; packages = with pkgs; [ diff --git a/windows/packages.ubundle b/windows/packages.ubundle @@ -1,1425 +0,0 @@ -{ - "export_version": 3, - "packages": [ - { - "Id": "7zip.7zip", - "Name": "7-Zip", - "Version": "26.01", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "9WZDNCRDXF41", - "Name": "Character Map UWP", - "Version": "2026.3.0.0", - "Source": "msstore", - "ManagerName": "winget" - }, - { - "Id": "AdrienAllard.FileConverter", - "Name": "File Converter", - "Version": "2.2.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Alacritty.Alacritty", - "Name": "Alacritty", - "Version": "0.17.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Alex313031.Thorium.AVX2", - "Name": "Thorium (AVX2)", - "Version": "138.0.7204.303", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "AmN.yasb", - "Name": "yasb", - "Version": "2.0.2", - "Source": "winget", - "ManagerName": "winget", - "Updates": { - "IgnoredVersion": "2.0.0" - } - }, - { - "Id": "Anthropic.Claude", - "Name": "Claude", - "Version": "1.8089.1.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "AntibodySoftware.WizTree", - "Name": "WizTree", - "Version": "4.31", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Audacity.Audacity", - "Name": "Audacity", - "Version": "3.7.7", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "AutoHotkey.AutoHotkey", - "Name": "AutoHotkey", - "Version": "2.0.26", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "BlenderFoundation.Blender.LTS.4.2", - "Name": "blender", - "Version": "4.2.16", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "BrechtSanders.WinLibs.POSIX.UCRT.LLVM", - "Name": "WinLibs (POSIX threads, UCRT runtime, LLVM included)", - "Version": "14.2.0-19.1.1-12.0.0-r2", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "BurntSushi.ripgrep.MSVC", - "Name": "RipGrep MSVC", - "Version": "15.1.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Cloudflare.Warp", - "Name": "Cloudflare One Client", - "Version": "26.4.1390.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Cloudflare.cloudflared", - "Name": "cloudflared", - "Version": "2026.5.2", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "CodecGuide.K-LiteCodecPack.Full", - "Name": "K-Lite Codec Pack Full", - "Version": "19.7.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Cyanfish.NAPS2", - "Name": "NAPS2", - "Version": "8.2.1", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Devolutions.UniGetUI", - "Name": "UniGetUI", - "Version": "2026.1.11", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Discord.Discord", - "Name": "Discord", - "Version": "1.0.9239", - "Source": "winget", - "ManagerName": "winget", - "InstallationOptions": { - "OverridesNextLevelOpts": true - } - }, - { - "Id": "Docker.DockerDesktop", - "Name": "Docker Desktop", - "Version": "4.74.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "EpicGames.EpicGamesLauncher", - "Name": "Epic Games Launcher", - "Version": "1.3.176.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Exploitox.GoAwayEdge", - "Name": "GoAwayEdge", - "Version": "2.0.3.264", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Figma.Figma", - "Name": "Figma", - "Version": "126.4.11", - "Source": "winget", - "ManagerName": "winget", - "InstallationOptions": { - "OverridesNextLevelOpts": true - } - }, - { - "Id": "GIMP.GIMP.3", - "Name": "GIMP", - "Version": "3.2.4.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "GermanCoding.SyncTrayzor", - "Name": "SyncTrayzor (x64)", - "Version": "2.1.0.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Git.Git", - "Name": "Git", - "Version": "2.54.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Google.AntigravityIDE", - "Name": "Antigravity IDE", - "Version": "2.0.3", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Google.GoogleDrive", - "Name": "Google Drive", - "Version": "125.0.0.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Google.QuickShare", - "Name": "Quick Share from Google", - "Version": "1.0.2600.1", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Gyan.FFmpeg.Shared", - "Name": "FFmpeg (Shared)", - "Version": "8.1.1", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "HandBrake.HandBrake", - "Name": "HandBrake", - "Version": "1.11.1", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "IrfanSkiljan.IrfanView", - "Name": "IrfanView", - "Version": "4.73", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "JohnMacFarlane.Pandoc", - "Name": "Pandoc", - "Version": "3.9.0.2", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "KeePassXCTeam.KeePassXC", - "Name": "KeePassXC", - "Version": "2.7.12", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Kitware.CMake", - "Name": "CMake", - "Version": "4.3.3", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Klocman.BulkCrapUninstaller", - "Name": "Bulk Crap Uninstaller", - "Version": "6.1.0.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Logseq.Logseq", - "Name": "Logseq", - "Version": "0.10.15", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "M2Team.NanaZip", - "Name": "NanaZip", - "Version": "6.0.1711.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Meltytech.Shotcut", - "Name": "Shotcut", - "Version": "26.4.30", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "MiKTeX.MiKTeX", - "Name": "MiKTeX", - "Version": "25.12", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.AppInstaller", - "Name": "App Installer", - "Version": "1.28.240.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.CLRTypesSQLServer.2019", - "Name": "Microsoft System CLR Types for SQL Server 2019", - "Version": "15.0.2000.5", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.DotNet.DesktopRuntime.10", - "Name": "Microsoft .NET Windows Desktop Runtime 10.0", - "Version": "10.0.8", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.DotNet.DesktopRuntime.8", - "Name": "Microsoft .NET Windows Desktop Runtime 8.0", - "Version": "8.0.27", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.DotNet.Native.Runtime", - "Name": "Microsoft .NET Native Runtime", - "Version": "2.2.28604.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.Edge", - "Name": "Microsoft Edge", - "Version": "148.0.3967.96", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.Office", - "Name": "Microsoft 365 Apps for enterprise", - "Version": "16.0.19929.20172", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.OpenJDK.25", - "Name": "Microsoft Build of OpenJDK with Hotspot 25", - "Version": "25.0.3.9", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.PowerShell", - "Name": "PowerShell", - "Version": "7.6.2.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.PowerToys", - "Name": "PowerToys", - "Version": "0.99.1", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.Sysinternals.Suite", - "Name": "Sysinternals Suite", - "Version": "2026-05-07", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.Teams", - "Name": "Microsoft Teams", - "Version": "26106.1911.4707.3286", - "Source": "winget", - "ManagerName": "winget", - "InstallationOptions": { - "OverridesNextLevelOpts": true - } - }, - { - "Id": "Microsoft.UI.Xaml.2.7", - "Name": "Microsoft.UI.Xaml", - "Version": "7.2409.9001.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.UI.Xaml.2.8", - "Name": "Microsoft.UI.Xaml", - "Version": "8.2511.26001.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.VCLibs.14", - "Name": "Microsoft Visual C\u002B\u002B 2015 UWP Runtime Package", - "Version": "14.0.33519.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.VCLibs.Desktop.14", - "Name": "Microsoft Visual C\u002B\u002B 2015 UWP Desktop Runtime Package", - "Version": "14.0.33728.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.VCRedist.2015\u002B.x64", - "Name": "Microsoft Visual C\u002B\u002B 2015-2022 Redistributable (x64)", - "Version": "14.51.36231.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.VCRedist.2015\u002B.x86", - "Name": "Microsoft Visual C\u002B\u002B 2015-2022 Redistributable (x86)", - "Version": "14.51.36231.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.VisualStudio.Community", - "Name": "Visual Studio Community 2026", - "Version": "18.6.2", - "Source": "winget", - "ManagerName": "winget", - "Updates": { - "IgnoredVersion": "18.6.0" - } - }, - { - "Id": "Microsoft.VisualStudioCode", - "Name": "Microsoft Visual Studio Code", - "Version": "1.122.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.WSL", - "Name": "Windows Subsystem for Linux", - "Version": "2.7.3.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.WebDeploy", - "Name": "Microsoft Web Deploy", - "Version": "10.0.9419", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.WinGet.Client", - "Name": "Microsoft.WinGet.Client", - "Version": "1.12.440", - "Source": "PSGallery", - "ManagerName": "pwsh" - }, - { - "Id": "Microsoft.WinGet.CommandNotFound", - "Name": "Microsoft.WinGet.CommandNotFound", - "Version": "1.0.6", - "Source": "PSGallery", - "ManagerName": "pwsh" - }, - { - "Id": "Microsoft.WindowsAppRuntime.1.5", - "Name": "Windows App Runtime 1.5", - "Version": "\u003E 1.5.8", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.WindowsAppRuntime.1.6", - "Name": "Windows App Runtime 1.6", - "Version": "1.6.9", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.WindowsAppRuntime.1.7", - "Name": "Windows App Runtime 1.7", - "Version": "1.7.9", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.WindowsAppRuntime.1.8", - "Name": "Windows App Runtime 1.8", - "Version": "8000.859.21.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.WindowsTerminal", - "Name": "Windows Terminal", - "Version": "1.24.11321.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Microsoft.msodbcsql.17", - "Name": "Microsoft ODBC Driver 17 for SQL Server", - "Version": "17.11.1.1", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "MongoDB.Compass.Full", - "Name": "MongoDB Compass", - "Version": "1.49.8.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Mozilla.Firefox", - "Name": "Mozilla Firefox (en-US)", - "Version": "151.0.2", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Mozilla.Thunderbird", - "Name": "Mozilla Thunderbird (en-US)", - "Version": "151.0.1", - "Source": "winget", - "ManagerName": "winget", - "Updates": { - "IgnoredVersion": "150.0.2" - } - }, - { - "Id": "Neovim.Neovim", - "Name": "Neovim", - "Version": "0.12.2", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Ninja-build.Ninja", - "Name": "ninja", - "Version": "1.13.2", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Notepad\u002B\u002B.Notepad\u002B\u002B", - "Name": "Notepad\u002B\u002B", - "Version": "8.9.6", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Nvidia.PhysX", - "Name": "NVIDIA PhysX System Software", - "Version": "9.23.1019", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "OBSProject.OBSStudio", - "Name": "OBS Studio", - "Version": "32.1.2", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "PDFgear.PDFgear", - "Name": "PDFgear", - "Version": "2.1.15", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "PrismLauncher.PrismLauncher", - "Name": "Prism Launcher", - "Version": "11.0.2", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "PuTTY.PuTTY", - "Name": "PuTTY", - "Version": "0.84.0.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Python.PythonInstallManager", - "Name": "Python Install Manager", - "Version": "26.2.240.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "REALiX.HWiNFO", - "Name": "HWiNFO\u00AE", - "Version": "8.48", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Rainmeter.Rainmeter", - "Name": "Rainmeter", - "Version": "4.5.26", - "Source": "winget", - "ManagerName": "winget", - "Updates": { - "IgnoredVersion": "4.5.25" - } - }, - { - "Id": "RamenSoftware.Windhawk", - "Name": "Windhawk", - "Version": "1.7.3", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Roblox.Roblox", - "Name": "Roblox Player", - "Version": "0.702.2.7020633", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Rufus.Rufus", - "Name": "Rufus", - "Version": "4.14", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Rustlang.Rustup", - "Name": "Rustup: the Rust toolchain installer", - "Version": "1.29.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Spotify.Spotify", - "Name": "Spotify", - "Version": "1.2.89.539.gfb3c63a3", - "Source": "winget", - "ManagerName": "winget", - "InstallationOptions": { - "OverridesNextLevelOpts": true - } - }, - { - "Id": "Starship.Starship", - "Name": "starship", - "Version": "1.25.1", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "StrawberryPerl.StrawberryPerl", - "Name": "Strawberry Perl", - "Version": "5.42.2.1", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Stremio.Stremio", - "Name": "Stremio", - "Version": "4.4.181", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "SumatraPDF.SumatraPDF", - "Name": "SumatraPDF", - "Version": "3.6.1", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Tailscale.Tailscale", - "Name": "Tailscale", - "Version": "1.98.4", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "TechPowerUp.NVCleanstall", - "Name": "NVCleanstall", - "Version": "1.19.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "TheDocumentFoundation.LibreOffice", - "Name": "LibreOffice", - "Version": "26.2.3.2", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Valve.Steam", - "Name": "Steam", - "Version": "2.10.91.91", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "ViRb3.wgcf", - "Name": "wgcf", - "Version": "2.2.31", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "VideoLAN.VLC", - "Name": "VLC media player", - "Version": "3.0.23", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Volta.Volta", - "Name": "Volta", - "Version": "2.0.2", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "VoodooSoft.DefenderUI", - "Name": "DefenderUI", - "Version": "2.05", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "WinMerge.WinMerge", - "Name": "WinMerge", - "Version": "2.16.56.2", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "WinSCP.WinSCP", - "Name": "WinSCP", - "Version": "6.5.6", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "WireGuard.WireGuard", - "Name": "WireGuard", - "Version": "1.1", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "XnSoft.XnViewMP", - "Name": "XnView MP", - "Version": "1.11.2.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "ZedIndustries.Zed", - "Name": "Zed", - "Version": "1.1.7", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "Zellij.Zellij", - "Name": "Zellij", - "Version": "0.44.3", - "Source": "winget", - "ManagerName": "winget", - "Updates": { - "IgnoredVersion": "0.44.2" - } - }, - { - "Id": "amir1376.ABDownloadManager", - "Name": "ABDownloadManager", - "Version": "1.8.8", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "calibre.calibre", - "Name": "calibre", - "Version": "9.9.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "cargo-binstall", - "Name": "Cargo Binstall", - "Version": "1.19.1", - "Source": "crates.io", - "ManagerName": "cargo" - }, - { - "Id": "cargo-update", - "Name": "Cargo Update", - "Version": "20.0.0", - "Source": "crates.io", - "ManagerName": "cargo" - }, - { - "Id": "chrisant996.Clink", - "Name": "Clink", - "Version": "1.9.25", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "dandavison.delta", - "Name": "delta", - "Version": "0.19.2", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "dorssel.usbipd-win", - "Name": "usbipd-win", - "Version": "5.3.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "ente-io.auth-desktop", - "Name": "Ente Auth", - "Version": "4.4.22", - "Source": "winget", - "ManagerName": "winget", - "InstallationOptions": { - "OverridesNextLevelOpts": true - } - }, - { - "Id": "lin-ycv.EverythingCmdPal3", - "Name": "EverythingCmdPal", - "Version": "0.2.0.0", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "pip", - "Name": "Pip", - "Version": "26.1.1", - "Source": "pip", - "ManagerName": "pip" - }, - { - "Id": "qBittorrent.qBittorrent", - "Name": "qBittorrent", - "Version": "5.2.1", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "seerge.g-helper", - "Name": "g-helper", - "Version": "0.250", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "sharkdp.fd", - "Name": "fd", - "Version": "10.4.2", - "Source": "winget", - "ManagerName": "winget" - }, - { - "Id": "voidtools.Everything.Alpha", - "Name": "Everything (Alpha)", - "Version": "1.5.0.1409", - "Source": "winget", - "ManagerName": "winget" - } - ], - "incompatible_packages_info": "Incompatible packages cannot be installed from UniGetUI, either because they came from a local source (for example Local PC) or because the package manager was unavailable. Nevertheless, they have been listed here for logging purposes.", - "incompatible_packages": [ - { - "Id": "ARP\\Machine\\X64\\Android Studio", - "Name": "Android Studio", - "Version": "2025.3", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X64\\MozillaMaintenanceService", - "Name": "Mozilla Maintenance Service", - "Version": "151.0.1", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X64\\Riot Vanguard", - "Name": "Riot Vanguard", - "Version": "Unknown", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X64\\RustDesk", - "Name": "RustDesk", - "Version": "1.4.6.29544831", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X64\\Steam App 2767030", - "Name": "Marvel Rivals", - "Version": "Unknown", - "Source": "Steam" - }, - { - "Id": "ARP\\Machine\\X64\\Steam App 291550", - "Name": "Brawlhalla", - "Version": "Unknown", - "Source": "Steam" - }, - { - "Id": "ARP\\Machine\\X64\\Steam App 322170", - "Name": "Geometry Dash", - "Version": "Unknown", - "Source": "Steam" - }, - { - "Id": "ARP\\Machine\\X64\\Steam App 431960", - "Name": "Wallpaper Engine", - "Version": "Unknown", - "Source": "Steam" - }, - { - "Id": "ARP\\Machine\\X64\\Steam App 837350", - "Name": "King of the Hat", - "Version": "Unknown", - "Source": "Steam" - }, - { - "Id": "ARP\\Machine\\X64\\{552ED017-461C-4DE5-8739-E04466E938FB}", - "Name": "RustDesk", - "Version": "1.4.6.29544831", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X64\\{572A0073-40AE-4866-8138-AE60C3D90EF3}", - "Name": "VMware Workstation", - "Version": "25.0.1", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X64\\{6F320B93-EE3C-4826-85E0-ADF79F8D4C61}", - "Name": "Microsoft Visual Studio Installer", - "Version": "4.5.35.35368", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X64\\{725E471E-63CB-4E02-ABB3-265267B936B8}", - "Name": "Microsoft .NET SDK 10.0.300 (x64) from Visual Studio", - "Version": "40.11.2206", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X64\\{A7AB73A3-CB10-4AA5-9D38-6AEFFBDE4C91}", - "Name": "Microsoft Teams Meeting Add-in for Microsoft Office", - "Version": "1.26.08901", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X64\\{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8}_Display.Driver", - "Name": "NVIDIA Graphics Driver 596.49", - "Version": "596.49", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X64\\{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8}_HDAudio.Driver", - "Name": "NVIDIA HD Audio Driver 1.4.5.7", - "Version": "1.4.5.7", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X64\\{C21221FC-C5DD-488F-AA88-9C936DB25907}", - "Name": "IIS 10.0 Express", - "Version": "10.0.11304", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X64\\{E9279A3D-A613-4CA7-8B09-A6C4C5C5AB5A}", - "Name": "Microsoft SQL Server 2025 LocalDB ", - "Version": "17.0.4025.3", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X86\\FreeFileSync_is1", - "Name": "FreeFileSync", - "Version": "14.9", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X86\\{13D2A7A2-1B42-4C03-8F0F-697991259AEE}", - "Name": "Windows SDK AddOn", - "Version": "10.1.0.0", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X86\\{1851460E-0E63-4117-B5BA-25A2F045801B}", - "Name": "vs_CoreEditorFonts", - "Version": "17.7.40001", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X86\\{204d0387-6d9a-48cf-bb7d-93d49ec0141c}", - "Name": "Windows Software Development Kit - Windows 10.0.26100.8249", - "Version": "10.1.26100.8249", - "Source": "Local PC" - }, - { - "Id": "ARP\\Machine\\X86\\{6300A8E0-851B-4638-ADBB-1385DCF1248D}", - "Name": "Epic Online Services", - "Version": "4.3.1", - "Source": "Local PC" - }, - { - "Id": "ARP\\User\\X64\\63bbf0cc7b6c24ec34fd82081e7704a2", - "Name": "YouTube", - "Version": "1.0", - "Source": "Local PC" - }, - { - "Id": "ARP\\User\\X64\\Riot Game Riot_Client.", - "Name": "Riot Client ", - "Version": "Unknown", - "Source": "Local PC" - }, - { - "Id": "ARP\\User\\X64\\Riot Game valorant.live", - "Name": "VALORANT", - "Version": "Unknown", - "Source": "Local PC" - }, - { - "Id": "ARP\\User\\X64\\a223f8361ace19a6d109b880df9421a4", - "Name": "Gemini", - "Version": "1.0", - "Source": "Local PC" - }, - { - "Id": "ARP\\User\\X64\\pymanager-pythoncore-3.14-64", - "Name": "Python 3.14.4", - "Version": "3.14-64", - "Source": "Local PC" - }, - { - "Id": "MSIX\\5319275A.WhatsAppDesktop_2.2616.100.0_x64__cv1g1gvanyjgm", - "Name": "WhatsApp", - "Version": "2.2616.100.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\AdvancedMicroDevicesInc-2.AMDRadeonSoftware_10.22.40043.0_x64__0a9344xs7nr4m", - "Name": "AMD Radeon Software", - "Version": "10.22.40043.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\DolbyLaboratories.DolbyAccess_3.27.9430.0_x64__rz1tebttyb220", - "Name": "Dolby Access", - "Version": "3.27.9430.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\DolbyLaboratories.DolbyDigitalPlusDecoderOEM_1.2.588.0_x64__rz1tebttyb220", - "Name": "Dolby Digital Plus decoder for PC OEMs", - "Version": "1.2.588.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\DongleInsovaki.MicaForEveryone_2.0.5.0_x64__t8299cmby5bjr", - "Name": "Mica For Everyone", - "Version": "2.0.5.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.AV1VideoExtension_2.0.7.0_x64__8wekyb3d8bbwe", - "Name": "AV1 Video Extension", - "Version": "2.0.7.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.AVCEncoderVideoExtension_1.1.23.0_x64__8wekyb3d8bbwe", - "Name": "AVC Encoder Video Extension", - "Version": "1.1.23.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.ApplicationCompatibilityEnhancements_1.2511.9.0_x64__8wekyb3d8bbwe", - "Name": "Windows Application Compatibility Enhancements", - "Version": "1.2511.9.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.CommandPalette_0.10.11181.0_x64__8wekyb3d8bbwe", - "Name": "Command Palette", - "Version": "0.10.11181.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.GamingApp_2605.1001.13.0_x64__8wekyb3d8bbwe", - "Name": "Xbox", - "Version": "2605.1001.13.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.HEIFImageExtension_1.2.30.0_x64__8wekyb3d8bbwe", - "Name": "HEIF Image Extension", - "Version": "1.2.30.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.HEVCVideoExtension_2.4.43.0_x64__8wekyb3d8bbwe", - "Name": "HEVC Video Extensions from Device Manufacturer", - "Version": "2.4.43.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.Ink.Handwriting.Main.en-US.1.0.1_0.1121.1848.0_x64__8wekyb3d8bbwe", - "Name": "Ink.Handwriting.Main.en-US.1.0", - "Version": "0.1121.1848.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.Ink.Handwriting.en-US.1.0_0.1121.1848.0_x64__8wekyb3d8bbwe", - "Name": "Ink.Handwriting.en-US.1.0", - "Version": "0.1121.1848.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.Ink.Handwriting.en-US.1.0_0.1121.1848.0_x86__8wekyb3d8bbwe", - "Name": "Ink.Handwriting.en-US.1.0", - "Version": "0.1121.1848.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.MPEG2VideoExtension_1.2.13.0_x64__8wekyb3d8bbwe", - "Name": "MPEG-2 Video Extension", - "Version": "1.2.13.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.MicrosoftEdge.Stable_140.0.3485.66_neutral__8wekyb3d8bbwe", - "Name": "Microsoft Edge", - "Version": "140.0.3485.66", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe", - "Name": "Microsoft .Net Native Framework Package 2.2", - "Version": "2.2.29512.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x86__8wekyb3d8bbwe", - "Name": "Microsoft .Net Native Framework Package 2.2", - "Version": "2.2.29512.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.Office.ActionsServer_16.0.19929.20172_neutral__8wekyb3d8bbwe", - "Name": "Microsoft.Office.ActionsServer", - "Version": "16.0.19929.20172", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.Office.OneNoteVirtualPrinter_1.0.0.0_x64__8wekyb3d8bbwe", - "Name": "OneNote Virtual Printer", - "Version": "1.0.0.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.OfficePushNotificationUtility_16.0.19929.20172_neutral__8wekyb3d8bbwe", - "Name": "OfficePushNotificationsUtility", - "Version": "16.0.19929.20172", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.OutlookForWindows_1.2026.504.100_x64__8wekyb3d8bbwe", - "Name": "Outlook for Windows", - "Version": "1.2026.504.100", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.Paint_11.2603.251.0_x64__8wekyb3d8bbwe", - "Name": "Paint", - "Version": "11.2603.251.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.PowerToys.FileLocksmithContextMenu_0.99.1.0_neutral__8wekyb3d8bbwe", - "Name": "PowerToys FileLocksmith Context Menu", - "Version": "0.99.1.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.PowerToys.ImageResizerContextMenu_0.99.1.0_neutral__8wekyb3d8bbwe", - "Name": "PowerToys ImageResizer Context Menu", - "Version": "0.99.1.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.PowerToys.PowerRenameContextMenu_0.99.1.0_neutral__8wekyb3d8bbwe", - "Name": "PowerToys PowerRename Context Menu", - "Version": "0.99.1.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.PowerToys.SparseApp_0.99.1.0_neutral__8wekyb3d8bbwe", - "Name": "PowerToys.SparseApp", - "Version": "0.99.1.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.RawImageExtension_2.5.7.0_x64__8wekyb3d8bbwe", - "Name": "Raw Image Extension", - "Version": "2.5.7.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.ScreenSketch_11.2602.47.0_x64__8wekyb3d8bbwe", - "Name": "Snipping Tool", - "Version": "11.2602.47.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.SecHealthUI_1000.29554.1001.0_x64__8wekyb3d8bbwe", - "Name": "Windows Security", - "Version": "1000.29554.1001.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.Services.Store.Engagement_10.0.23012.0_x64__8wekyb3d8bbwe", - "Name": "Microsoft Engagement Framework", - "Version": "10.0.23012.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.Services.Store.Engagement_10.0.23012.0_x86__8wekyb3d8bbwe", - "Name": "Microsoft Engagement Framework", - "Version": "10.0.23012.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.StorePurchaseApp_22603.1401.2.0_x64__8wekyb3d8bbwe", - "Name": "Store Experience Host", - "Version": "22603.1401.2.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.VP9VideoExtensions_1.2.13.0_x64__8wekyb3d8bbwe", - "Name": "VP9 Video Extensions", - "Version": "1.2.13.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.VisualStudioCode_1.0.122.0_neutral__8wekyb3d8bbwe", - "Name": "Visual Studio Code", - "Version": "1.0.122.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.WebMediaExtensions_2.1.26.0_x64__8wekyb3d8bbwe", - "Name": "Web Media Extensions", - "Version": "2.1.26.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.WebpImageExtension_1.2.14.0_x64__8wekyb3d8bbwe", - "Name": "WebP Image Extension", - "Version": "1.2.14.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.Windows.DevHome_0.2101.858.0_x64__8wekyb3d8bbwe", - "Name": "Windows Advanced Settings", - "Version": "0.2101.858.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.Windows.Photos_2026.11020.20001.0_x64__8wekyb3d8bbwe", - "Name": "Microsoft Photos", - "Version": "2026.11020.20001.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.WindowsCalculator_11.2508.4.0_x64__8wekyb3d8bbwe", - "Name": "Windows Calculator", - "Version": "11.2508.4.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.WindowsCamera_2025.2510.2.0_x64__8wekyb3d8bbwe", - "Name": "Windows Camera", - "Version": "2025.2510.2.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.WindowsNotepad_11.2604.5.0_x64__8wekyb3d8bbwe", - "Name": "Windows Notepad", - "Version": "11.2604.5.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.WindowsStore_22604.1401.6.0_x64__8wekyb3d8bbwe", - "Name": "Microsoft Store", - "Version": "22604.1401.6.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.Winget.Fonts.Source_2025.1016.311.49_neutral__8wekyb3d8bbwe", - "Name": "Windows Package Manager Source (winget-font) V2", - "Version": "2025.1016.311.49", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.Winget.Source_2026.529.911.31_neutral__8wekyb3d8bbwe", - "Name": "Windows Package Manager Source (winget) V2", - "Version": "2026.529.911.31", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.Xbox.TCUI_1.24.10001.0_x64__8wekyb3d8bbwe", - "Name": "Xbox TCUI", - "Version": "1.24.10001.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.XboxGamingOverlay_7.326.5041.0_x64__8wekyb3d8bbwe", - "Name": "Game Bar", - "Version": "7.326.5041.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.XboxIdentityProvider_12.130.16001.0_x64__8wekyb3d8bbwe", - "Name": "Xbox Identity Provider", - "Version": "12.130.16001.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.XboxSpeechToTextOverlay_1.111.30001.0_x64__8wekyb3d8bbwe", - "Name": "Game Speech Window", - "Version": "1.111.30001.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\Microsoft.YourPhone_0.26032.102.0_x64__8wekyb3d8bbwe", - "Name": "Phone Link", - "Version": "0.26032.102.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\MicrosoftCorporationII.WinAppRuntime.Main.1.8_8000.836.2153.0_x64__8wekyb3d8bbwe", - "Name": "WinAppRuntime.Main.1.8", - "Version": "8000.836.2153.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\MicrosoftWindows.CrossDevice_0.26032.83.0_x64__cw5n1h2txyewy", - "Name": "Cross Device Experience Host", - "Version": "0.26032.83.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\MicrosoftWindows.WindowsSandbox_0.5.3.0_x64__cw5n1h2txyewy", - "Name": "Windows Sandbox", - "Version": "0.5.3.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\NVIDIACorp.NVIDIAControlPanel_8.1.969.0_x64__56jybvy8sckqj", - "Name": "NVIDIA Control Panel", - "Version": "8.1.969.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\NearbyShare_1.0.2600.1_x64__21hpf16v5xp10", - "Name": "Quick Share", - "Version": "1.0.2600.1", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\NotepadPlusPlus_1.0.0.0_neutral__2247w0b46hfww", - "Name": "Notepad\u002B\u002B", - "Version": "1.0.0.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\RealtekSemiconductorCorp.RealtekAudioControl_1.1.137.0_x64__dt26b99r8h8gj", - "Name": "Realtek Audio Control", - "Version": "1.1.137.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\WinMerge_1.0.8.0_neutral__f62ztx9ss5ed4", - "Name": "WinMerge", - "Version": "1.0.8.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\ZedIndustries.Zed_1.0.0.0_neutral__japxn1gcva8rg", - "Name": "Zed", - "Version": "1.0.0.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\aimgr_0.20.47.0_x64__8wekyb3d8bbwe", - "Name": "Local AI Manager for Microsoft 365", - "Version": "0.20.47.0", - "Source": "Microsoft Store" - }, - { - "Id": "MSIX\\ngrok.ngrok_3.39.1.0_x64__1g87z0zv29zzc", - "Name": "ngrok", - "Version": "3.39.1.0", - "Source": "Microsoft Store" - } - ] -} -\ No newline at end of file