dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit abf662276d3c54eb3d8c443ffc1b7fcde0210cca parent 0d269c2e908350539773d29469a29eed4c61badb Author: maydayv7 <maydayv7@gmail.com> Date: Mon, 2 Mar 2026 22:18:44 +0530 feat!: Move to Windows
Diffstat:
| D | .github/ISSUE_TEMPLATE/bug-report.md | | | 40 | ---------------------------------------- |
| D | .github/ISSUE_TEMPLATE/feature-request.md | | | 19 | ------------------- |
| D | .github/ISSUE_TEMPLATE/help-request.md | | | 32 | -------------------------------- |
| D | .github/workflows/build.yml | | | 54 | ------------------------------------------------------ |
| D | .github/workflows/check.yml | | | 33 | --------------------------------- |
| D | .github/workflows/shell.yml | | | 33 | --------------------------------- |
| D | .github/workflows/update.yml | | | 60 | ------------------------------------------------------------ |
| M | .gitignore | | | 5 | ----- |
| R | files/images/logo/dark.png -> .misc/banner-dark.png | | | 0 | |
| R | files/images/logo/light.png -> .misc/banner-light.png | | | 0 | |
| R | files/images/website.png -> .misc/website.png | | | 0 | |
| M | CHANGELOG.md | | | 7 | +++++++ |
| M | README.md | | | 472 | +------------------------------------------------------------------------------ |
| A | arch/COMMANDS.md | | | 60 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | arch/INSTALL.md | | | 174 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | arch/zshrc | | | 41 | +++++++++++++++++++++++++++++++++++++++++ |
| D | checks/flake.nix | | | 42 | ------------------------------------------ |
| D | checks/github | | | 2 | -- |
| D | checks/gitlab/.gitlab-ci.yml | | | 16 | ---------------- |
| D | checks/gitlab/.gitlab-webide.yml | | | 4 | ---- |
| D | checks/gitlab/issue_templates/Bug.md | | | 32 | -------------------------------- |
| D | checks/gitlab/issue_templates/Feature.md | | | 11 | ----------- |
| D | checks/gitlab/issue_templates/Help.md | | | 24 | ------------------------ |
| D | checks/gitlab/pipelines/build.yml | | | 27 | --------------------------- |
| D | checks/gitlab/pipelines/check.yml | | | 11 | ----------- |
| D | checks/gitlab/pipelines/release.yml | | | 20 | -------------------- |
| D | checks/gitlab/pipelines/shell.yml | | | 18 | ------------------ |
| D | checks/gitlab/pipelines/update.yml | | | 18 | ------------------ |
| D | checks/gitlab/pipelines/website.yml | | | 15 | --------------- |
| D | devices/README.md | | | 20 | -------------------- |
| D | devices/flake.nix | | | 8 | -------- |
| D | devices/futura.nix | | | 40 | ---------------------------------------- |
| D | devices/install/default.nix | | | 17 | ----------------- |
| D | devices/install/image.nix | | | 13 | ------------- |
| D | devices/valkyrie/default.nix | | | 107 | ------------------------------------------------------------------------------- |
| D | devices/valkyrie/minecraft.nix | | | 48 | ------------------------------------------------ |
| D | devices/valkyrie/settings/asusd.ron | | | 16 | ---------------- |
| D | devices/valkyrie/settings/aura.ron | | | 99 | ------------------------------------------------------------------------------- |
| D | devices/valkyrie/settings/default.nix | | | 32 | -------------------------------- |
| D | devices/valkyrie/settings/home.nix | | | 62 | -------------------------------------------------------------- |
| D | devices/valkyrie/settings/network.nix | | | 18 | ------------------ |
| D | devices/vortex.nix | | | 74 | -------------------------------------------------------------------------- |
| D | files/.archive/Linux/Arch/COMMANDS.md | | | 60 | ------------------------------------------------------------ |
| D | files/.archive/Linux/Arch/INSTALL.md | | | 174 | ------------------------------------------------------------------------------- |
| D | files/.archive/Linux/Arch/zshrc | | | 41 | ----------------------------------------- |
| D | files/.archive/Linux/Pop/conky/conky.lua | | | 551 | ------------------------------------------------------------------------------- |
| D | files/.archive/Linux/Pop/conky/conkyrc | | | 80 | ------------------------------------------------------------------------------- |
| D | files/.archive/Linux/Pop/neofetch/config.conf | | | 54 | ------------------------------------------------------ |
| D | files/.archive/Linux/Pop/p10k.zsh | | | 472 | ------------------------------------------------------------------------------- |
| D | files/.archive/Windows/APPS.md | | | 26 | -------------------------- |
| D | files/.archive/Windows/Velociraptor.rmskin | | | 0 | |
| D | files/README.md | | | 6 | ------ |
| D | files/ascii/groot | | | 10 | ---------- |
| D | files/ascii/lol | | | 7 | ------- |
| D | files/ascii/pacman | | | 12 | ------------ |
| D | files/ascii/tux | | | 19 | ------------------- |
| D | files/colors/README.md | | | 26 | -------------------------- |
| D | files/colors/adwaita.yaml | | | 18 | ------------------ |
| D | files/colors/catppuccin.yaml | | | 18 | ------------------ |
| D | files/colors/elementary.yaml | | | 18 | ------------------ |
| D | files/fastfetch.jsonc | | | 160 | ------------------------------------------------------------------------------- |
| D | files/flake.nix | | | 169 | ------------------------------------------------------------------------------- |
| D | files/geany/keybindings.conf | | | 152 | ------------------------------------------------------------------------------- |
| D | files/geany/settings.conf | | | 188 | ------------------------------------------------------------------------------- |
| D | files/git/hooks/commit-msg | | | 16 | ---------------- |
| D | files/git/hooks/pre-commit | | | 10 | ---------- |
| D | files/gitea/theme-black.css | | | 61 | ------------------------------------------------------------- |
| D | files/gitea/theme-blue.css | | | 58 | ---------------------------------------------------------- |
| D | files/gitea/theme-red.css | | | 58 | ---------------------------------------------------------- |
| D | files/gnome/menu.json | | | 102 | ------------------------------------------------------------------------------- |
| D | files/gnome/shortcuts.json | | | 308 | ------------------------------------------------------------------------------- |
| D | files/hyprland/greeter.conf | | | 20 | -------------------- |
| D | files/hyprland/kebihelp.json | | | 1640 | ------------------------------------------------------------------------------- |
| D | files/hyprland/pypr.toml | | | 40 | ---------------------------------------- |
| D | files/hyprland/shaders/dim.frag | | | 14 | -------------- |
| D | files/hyprland/shaders/invert.frag | | | 15 | --------------- |
| D | files/hyprland/theme/drawer.css | | | 26 | -------------------------- |
| D | files/hyprland/theme/hyprshell.css | | | 49 | ------------------------------------------------- |
| D | files/hyprland/theme/waybar.css | | | 226 | ------------------------------------------------------------------------------- |
| D | files/hyprland/waycorner.toml | | | 11 | ----------- |
| D | files/logseq/preferences.json | | | 22 | ---------------------- |
| D | files/logseq/settings/logseq-awesome-ui.json | | | 23 | ----------------------- |
| D | files/logseq/settings/logseq-bullet-threading.json | | | 6 | ------ |
| D | files/logseq/settings/logseq-git.json | | | 9 | --------- |
| D | files/logseq/settings/logseq-journals-calendar.json | | | 10 | ---------- |
| D | files/logseq/settings/logseq-move-block.json | | | 7 | ------- |
| D | files/logseq/settings/logseq-pdf-export-plugin.json | | | 14 | -------------- |
| D | files/logseq/settings/logseq-tabs.json | | | 11 | ----------- |
| D | files/logseq/settings/logseq-tocgen.json | | | 13 | ------------- |
| D | files/nanorc | | | 9 | --------- |
| D | files/niri/rofi.rasi | | | 315 | ------------------------------------------------------------------------------- |
| D | files/niri/theme/drawer.css | | | 26 | -------------------------- |
| D | files/niri/theme/waybar.css | | | 202 | ------------------------------------------------------------------------------- |
| D | files/pcmanfm.conf | | | 116 | ------------------------------------------------------------------------------- |
| D | files/repl.nix | | | 47 | ----------------------------------------------- |
| D | files/sunsetr/presets/3000/sunsetr.toml | | | 3 | --- |
| D | files/sunsetr/presets/4000/sunsetr.toml | | | 3 | --- |
| D | files/sunsetr/presets/5000/sunsetr.toml | | | 3 | --- |
| D | files/sunsetr/presets/6000/sunsetr.toml | | | 3 | --- |
| D | files/sunsetr/presets/7000/sunsetr.toml | | | 3 | --- |
| D | files/sunsetr/presets/8000/sunsetr.toml | | | 3 | --- |
| D | files/sunsetr/sunsetr.toml | | | 16 | ---------------- |
| D | files/swaync.css | | | 251 | ------------------------------------------------------------------------------- |
| D | files/tmuxrc.tmux | | | 11 | ----------- |
| D | files/vscode/keybindings.json | | | 28 | ---------------------------- |
| D | files/vscode/settings.json | | | 94 | ------------------------------------------------------------------------------- |
| D | files/wlogout.css | | | 32 | -------------------------------- |
| D | files/ytmusic.json | | | 56 | -------------------------------------------------------- |
| D | flake.lock | | | 2068 | ------------------------------------------------------------------------------- |
| D | flake.nix | | | 307 | ------------------------------------------------------------------------------- |
| D | lib/README.md | | | 29 | ----------------------------- |
| D | lib/_mime.nix | | | 296 | ------------------------------------------------------------------------------- |
| D | lib/build.nix | | | 120 | ------------------------------------------------------------------------------- |
| D | lib/map.nix | | | 161 | ------------------------------------------------------------------------------- |
| D | lib/pack.nix | | | 23 | ----------------------- |
| D | modules/README.md | | | 100 | ------------------------------------------------------------------------------- |
| D | modules/apps/default.nix | | | 25 | ------------------------- |
| D | modules/apps/discord.nix | | | 90 | ------------------------------------------------------------------------------- |
| D | modules/apps/firefox.nix | | | 132 | ------------------------------------------------------------------------------- |
| D | modules/apps/flatpak.nix | | | 91 | ------------------------------------------------------------------------------- |
| D | modules/apps/games/default.nix | | | 73 | ------------------------------------------------------------------------- |
| D | modules/apps/games/mc-server.nix | | | 218 | ------------------------------------------------------------------------------- |
| D | modules/apps/games/minecraft.nix | | | 13 | ------------- |
| D | modules/apps/games/osu.nix | | | 13 | ------------- |
| D | modules/apps/games/roblox.nix | | | 18 | ------------------ |
| D | modules/apps/git/default.nix | | | 169 | ------------------------------------------------------------------------------- |
| D | modules/apps/git/hosting.nix | | | 130 | ------------------------------------------------------------------------------- |
| D | modules/apps/git/runner.nix | | | 75 | --------------------------------------------------------------------------- |
| D | modules/apps/git/user.nix | | | 34 | ---------------------------------- |
| D | modules/apps/internet.nix | | | 52 | ---------------------------------------------------- |
| D | modules/apps/latex.nix | | | 26 | -------------------------- |
| D | modules/apps/notes.nix | | | 60 | ------------------------------------------------------------ |
| D | modules/apps/office.nix | | | 94 | ------------------------------------------------------------------------------- |
| D | modules/apps/spotify.nix | | | 52 | ---------------------------------------------------- |
| D | modules/apps/stream.nix | | | 19 | ------------------- |
| D | modules/apps/tools.nix | | | 62 | -------------------------------------------------------------- |
| D | modules/apps/vscode/default.nix | | | 97 | ------------------------------------------------------------------------------- |
| D | modules/apps/vscode/mutable.nix | | | 36 | ------------------------------------ |
| D | modules/apps/wine.nix | | | 76 | ---------------------------------------------------------------------------- |
| D | modules/apps/youtube.nix | | | 54 | ------------------------------------------------------ |
| D | modules/base/default.nix | | | 103 | ------------------------------------------------------------------------------- |
| D | modules/base/firmware.nix | | | 99 | ------------------------------------------------------------------------------- |
| D | modules/base/security.nix | | | 101 | ------------------------------------------------------------------------------- |
| D | modules/configuration.nix | | | 142 | ------------------------------------------------------------------------------- |
| D | modules/gui/default.nix | | | 85 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/_shared/browser.nix | | | 30 | ------------------------------ |
| D | modules/gui/desktop/_shared/default.nix | | | 5 | ----- |
| D | modules/gui/desktop/_shared/files.nix | | | 131 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/_shared/login.nix | | | 35 | ----------------------------------- |
| D | modules/gui/desktop/_shared/media.nix | | | 49 | ------------------------------------------------- |
| D | modules/gui/desktop/_shared/misc.nix | | | 96 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/_shared/notify.nix | | | 96 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/_shared/panel.nix | | | 309 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/_shared/security.nix | | | 132 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/_shared/style.nix | | | 38 | -------------------------------------- |
| D | modules/gui/desktop/_shared/terminal.nix | | | 47 | ----------------------------------------------- |
| D | modules/gui/desktop/_shared/text.nix | | | 63 | --------------------------------------------------------------- |
| D | modules/gui/desktop/_shared/theme.nix | | | 40 | ---------------------------------------- |
| D | modules/gui/desktop/_shared/utilities.nix | | | 105 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/gnome/common.nix | | | 44 | -------------------------------------------- |
| D | modules/gui/desktop/gnome/default.nix | | | 258 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/gnome/settings/apps.nix | | | 229 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/gnome/settings/default.nix | | | 205 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/gnome/settings/extensions.nix | | | 599 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/hyprland/apps/idle.nix | | | 34 | ---------------------------------- |
| D | modules/gui/desktop/hyprland/apps/launcher.nix | | | 81 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/hyprland/apps/panel.nix | | | 166 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/hyprland/apps/utilities.nix | | | 81 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/hyprland/default.nix | | | 65 | ----------------------------------------------------------------- |
| D | modules/gui/desktop/hyprland/settings/apps.nix | | | 162 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/hyprland/settings/default.nix | | | 214 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/hyprland/settings/keybinds.nix | | | 209 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/hyprland/settings/plugins.nix | | | 51 | --------------------------------------------------- |
| D | modules/gui/desktop/install.nix | | | 85 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/niri/apps/idle.nix | | | 28 | ---------------------------- |
| D | modules/gui/desktop/niri/apps/launcher.nix | | | 30 | ------------------------------ |
| D | modules/gui/desktop/niri/apps/panel.nix | | | 158 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/niri/apps/utilities.nix | | | 31 | ------------------------------- |
| D | modules/gui/desktop/niri/default.nix | | | 54 | ------------------------------------------------------ |
| D | modules/gui/desktop/niri/settings/apps.nix | | | 141 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/niri/settings/default.nix | | | 75 | --------------------------------------------------------------------------- |
| D | modules/gui/desktop/niri/settings/keybinds.nix | | | 100 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/niri/settings/style.nix | | | 56 | -------------------------------------------------------- |
| D | modules/gui/desktop/pantheon/default.nix | | | 188 | ------------------------------------------------------------------------------- |
| D | modules/gui/desktop/pantheon/settings.nix | | | 321 | ------------------------------------------------------------------------------- |
| D | modules/gui/fonts.nix | | | 93 | ------------------------------------------------------------------------------- |
| D | modules/gui/gtk.nix | | | 80 | ------------------------------------------------------------------------------- |
| D | modules/gui/qt.nix | | | 151 | ------------------------------------------------------------------------------ |
| D | modules/gui/theme.nix | | | 114 | ------------------------------------------------------------------------------- |
| D | modules/hardware/README.md | | | 40 | ---------------------------------------- |
| D | modules/hardware/blockchain.nix | | | 26 | -------------------------- |
| D | modules/hardware/boot.nix | | | 120 | ------------------------------------------------------------------------------- |
| D | modules/hardware/cpu.nix | | | 47 | ----------------------------------------------- |
| D | modules/hardware/default.nix | | | 36 | ------------------------------------ |
| D | modules/hardware/filesystem.nix | | | 262 | ------------------------------------------------------------------------------- |
| D | modules/hardware/gpu.nix | | | 109 | ------------------------------------------------------------------------------- |
| D | modules/hardware/laptop.nix | | | 63 | --------------------------------------------------------------- |
| D | modules/hardware/mobile.nix | | | 25 | ------------------------- |
| D | modules/hardware/printer.nix | | | 40 | ---------------------------------------- |
| D | modules/hardware/virtualisation/android.nix | | | 45 | --------------------------------------------- |
| D | modules/hardware/virtualisation/default.nix | | | 58 | ---------------------------------------------------------- |
| D | modules/hardware/virtualisation/vfio.nix | | | 128 | ------------------------------------------------------------------------------- |
| D | modules/nix/config.nix | | | 7 | ------- |
| D | modules/nix/default.nix | | | 51 | --------------------------------------------------- |
| D | modules/nix/index.nix | | | 20 | -------------------- |
| D | modules/nix/registry.nix | | | 28 | ---------------------------- |
| D | modules/nix/tools.nix | | | 30 | ------------------------------ |
| D | modules/secrets.nix | | | 1 | - |
| D | modules/shell/default.nix | | | 177 | ------------------------------------------------------------------------------- |
| D | modules/shell/list/bash.nix | | | 42 | ------------------------------------------ |
| D | modules/shell/list/zsh.nix | | | 58 | ---------------------------------------------------------- |
| D | modules/shell/prompt.nix | | | 198 | ------------------------------------------------------------------------------- |
| D | modules/user/default.nix | | | 184 | ------------------------------------------------------------------------------- |
| D | modules/user/home.nix | | | 38 | -------------------------------------- |
| D | modules/user/mutable.nix | | | 102 | ------------------------------------------------------------------------------- |
| D | modules/user/security.nix | | | 94 | ------------------------------------------------------------------------------- |
| A | nixos/.gitignore | | | 1 | + |
| A | nixos/README.md | | | 468 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/checks/flake.nix | | | 42 | ++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/checks/github/ISSUE_TEMPLATE/bug-report.md | | | 40 | ++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/checks/github/ISSUE_TEMPLATE/feature-request.md | | | 19 | +++++++++++++++++++ |
| A | nixos/checks/github/ISSUE_TEMPLATE/help-request.md | | | 32 | ++++++++++++++++++++++++++++++++ |
| A | nixos/checks/github/workflows/build.yml | | | 54 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/checks/github/workflows/check.yml | | | 33 | +++++++++++++++++++++++++++++++++ |
| R | .github/workflows/install.yml -> nixos/checks/github/workflows/install.yml | | | 0 | |
| A | nixos/checks/github/workflows/shell.yml | | | 33 | +++++++++++++++++++++++++++++++++ |
| A | nixos/checks/github/workflows/update.yml | | | 60 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/checks/gitlab/.gitlab-ci.yml | | | 16 | ++++++++++++++++ |
| A | nixos/checks/gitlab/.gitlab-webide.yml | | | 4 | ++++ |
| A | nixos/checks/gitlab/issue_templates/Bug.md | | | 32 | ++++++++++++++++++++++++++++++++ |
| A | nixos/checks/gitlab/issue_templates/Feature.md | | | 11 | +++++++++++ |
| A | nixos/checks/gitlab/issue_templates/Help.md | | | 24 | ++++++++++++++++++++++++ |
| A | nixos/checks/gitlab/pipelines/build.yml | | | 27 | +++++++++++++++++++++++++++ |
| A | nixos/checks/gitlab/pipelines/check.yml | | | 11 | +++++++++++ |
| A | nixos/checks/gitlab/pipelines/release.yml | | | 20 | ++++++++++++++++++++ |
| A | nixos/checks/gitlab/pipelines/shell.yml | | | 18 | ++++++++++++++++++ |
| A | nixos/checks/gitlab/pipelines/update.yml | | | 18 | ++++++++++++++++++ |
| R | devices/.keep -> nixos/devices/.keep | | | 0 | |
| A | nixos/devices/README.md | | | 20 | ++++++++++++++++++++ |
| A | nixos/devices/flake.nix | | | 8 | ++++++++ |
| A | nixos/devices/futura.nix | | | 40 | ++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/devices/install/default.nix | | | 17 | +++++++++++++++++ |
| A | nixos/devices/install/image.nix | | | 13 | +++++++++++++ |
| A | nixos/devices/valkyrie/default.nix | | | 107 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/devices/valkyrie/minecraft.nix | | | 48 | ++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/devices/valkyrie/settings/asusd.ron | | | 16 | ++++++++++++++++ |
| A | nixos/devices/valkyrie/settings/aura.ron | | | 99 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/devices/valkyrie/settings/default.nix | | | 32 | ++++++++++++++++++++++++++++++++ |
| A | nixos/devices/valkyrie/settings/home.nix | | | 62 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/devices/valkyrie/settings/network.nix | | | 18 | ++++++++++++++++++ |
| A | nixos/devices/vortex.nix | | | 74 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/README.md | | | 6 | ++++++ |
| A | nixos/files/ascii/groot | | | 10 | ++++++++++ |
| A | nixos/files/ascii/lol | | | 7 | +++++++ |
| A | nixos/files/ascii/pacman | | | 12 | ++++++++++++ |
| A | nixos/files/ascii/tux | | | 19 | +++++++++++++++++++ |
| A | nixos/files/colors/README.md | | | 26 | ++++++++++++++++++++++++++ |
| A | nixos/files/colors/adwaita.yaml | | | 18 | ++++++++++++++++++ |
| A | nixos/files/colors/catppuccin.yaml | | | 18 | ++++++++++++++++++ |
| A | nixos/files/colors/elementary.yaml | | | 18 | ++++++++++++++++++ |
| A | nixos/files/fastfetch.jsonc | | | 160 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/flake.nix | | | 169 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/geany/keybindings.conf | | | 152 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/geany/settings.conf | | | 188 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/git/hooks/commit-msg | | | 16 | ++++++++++++++++ |
| A | nixos/files/git/hooks/pre-commit | | | 10 | ++++++++++ |
| A | nixos/files/gitea/theme-black.css | | | 61 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/gitea/theme-blue.css | | | 58 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/gitea/theme-red.css | | | 58 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/gnome/menu.json | | | 102 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/gnome/shortcuts.json | | | 308 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/hyprland/greeter.conf | | | 20 | ++++++++++++++++++++ |
| A | nixos/files/hyprland/kebihelp.json | | | 1640 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/hyprland/pypr.toml | | | 40 | ++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/hyprland/shaders/dim.frag | | | 14 | ++++++++++++++ |
| A | nixos/files/hyprland/shaders/invert.frag | | | 15 | +++++++++++++++ |
| R | files/hyprland/shaders/monochrome.frag -> nixos/files/hyprland/shaders/monochrome.frag | | | 0 | |
| A | nixos/files/hyprland/theme/drawer.css | | | 26 | ++++++++++++++++++++++++++ |
| A | nixos/files/hyprland/theme/hyprshell.css | | | 49 | +++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/hyprland/theme/waybar.css | | | 226 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/hyprland/waycorner.toml | | | 11 | +++++++++++ |
| R | files/images/desktop/gnome.jpg -> nixos/files/images/desktop/gnome.jpg | | | 0 | |
| R | files/images/desktop/hyprland.jpg -> nixos/files/images/desktop/hyprland.jpg | | | 0 | |
| R | files/images/desktop/old/gnome_41.jpg -> nixos/files/images/desktop/old/gnome_41.jpg | | | 0 | |
| R | files/images/desktop/old/gnome_44.jpg -> nixos/files/images/desktop/old/gnome_44.jpg | | | 0 | |
| R | files/images/desktop/old/gnome_45.jpg -> nixos/files/images/desktop/old/gnome_45.jpg | | | 0 | |
| R | files/images/desktop/pantheon.jpg -> nixos/files/images/desktop/pantheon.jpg | | | 0 | |
| R | files/images/desktop/xfce.jpg -> nixos/files/images/desktop/xfce.jpg | | | 0 | |
| R | files/images/transparent.png -> nixos/files/images/transparent.png | | | 0 | |
| A | nixos/files/logseq/preferences.json | | | 22 | ++++++++++++++++++++++ |
| A | nixos/files/logseq/settings/logseq-awesome-ui.json | | | 23 | +++++++++++++++++++++++ |
| A | nixos/files/logseq/settings/logseq-bullet-threading.json | | | 6 | ++++++ |
| A | nixos/files/logseq/settings/logseq-git.json | | | 9 | +++++++++ |
| A | nixos/files/logseq/settings/logseq-journals-calendar.json | | | 10 | ++++++++++ |
| A | nixos/files/logseq/settings/logseq-move-block.json | | | 7 | +++++++ |
| A | nixos/files/logseq/settings/logseq-pdf-export-plugin.json | | | 14 | ++++++++++++++ |
| A | nixos/files/logseq/settings/logseq-tabs.json | | | 11 | +++++++++++ |
| A | nixos/files/logseq/settings/logseq-tocgen.json | | | 13 | +++++++++++++ |
| A | nixos/files/nanorc | | | 9 | +++++++++ |
| A | nixos/files/niri/rofi.rasi | | | 315 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/niri/theme/drawer.css | | | 26 | ++++++++++++++++++++++++++ |
| A | nixos/files/niri/theme/waybar.css | | | 202 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/pcmanfm.conf | | | 116 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/repl.nix | | | 47 | +++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/sunsetr/presets/3000/sunsetr.toml | | | 3 | +++ |
| A | nixos/files/sunsetr/presets/4000/sunsetr.toml | | | 3 | +++ |
| A | nixos/files/sunsetr/presets/5000/sunsetr.toml | | | 3 | +++ |
| A | nixos/files/sunsetr/presets/6000/sunsetr.toml | | | 3 | +++ |
| A | nixos/files/sunsetr/presets/7000/sunsetr.toml | | | 3 | +++ |
| A | nixos/files/sunsetr/presets/8000/sunsetr.toml | | | 3 | +++ |
| A | nixos/files/sunsetr/sunsetr.toml | | | 16 | ++++++++++++++++ |
| A | nixos/files/swaync.css | | | 251 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| R | files/templates/Document.docx -> nixos/files/templates/Document.docx | | | 0 | |
| R | files/.archive/.keep -> nixos/files/templates/File | | | 0 | |
| R | files/templates/Presentation.pptx -> nixos/files/templates/Presentation.pptx | | | 0 | |
| R | files/templates/Spreadsheet.xlsx -> nixos/files/templates/Spreadsheet.xlsx | | | 0 | |
| A | nixos/files/tmuxrc.tmux | | | 11 | +++++++++++ |
| A | nixos/files/vscode/keybindings.json | | | 28 | ++++++++++++++++++++++++++++ |
| A | nixos/files/vscode/settings.json | | | 94 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/files/wlogout.css | | | 32 | ++++++++++++++++++++++++++++++++ |
| A | nixos/files/ytmusic.json | | | 56 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/flake.lock | | | 2068 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/flake.nix | | | 307 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/lib/README.md | | | 29 | +++++++++++++++++++++++++++++ |
| A | nixos/lib/_mime.nix | | | 296 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/lib/build.nix | | | 120 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/lib/map.nix | | | 161 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/lib/pack.nix | | | 23 | +++++++++++++++++++++++ |
| A | nixos/modules/README.md | | | 100 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/default.nix | | | 25 | +++++++++++++++++++++++++ |
| A | nixos/modules/apps/discord.nix | | | 90 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/firefox.nix | | | 132 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/flatpak.nix | | | 91 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/games/default.nix | | | 73 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/games/mc-server.nix | | | 218 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/games/minecraft.nix | | | 13 | +++++++++++++ |
| A | nixos/modules/apps/games/osu.nix | | | 13 | +++++++++++++ |
| A | nixos/modules/apps/games/roblox.nix | | | 18 | ++++++++++++++++++ |
| A | nixos/modules/apps/git/default.nix | | | 169 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/git/hosting.nix | | | 130 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/git/runner.nix | | | 75 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/git/user.nix | | | 34 | ++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/internet.nix | | | 52 | ++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/latex.nix | | | 26 | ++++++++++++++++++++++++++ |
| A | nixos/modules/apps/notes.nix | | | 60 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/office.nix | | | 94 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/spotify.nix | | | 52 | ++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/stream.nix | | | 19 | +++++++++++++++++++ |
| A | nixos/modules/apps/tools.nix | | | 62 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/vscode/default.nix | | | 97 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/vscode/mutable.nix | | | 36 | ++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/wine.nix | | | 76 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/apps/youtube.nix | | | 54 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/base/default.nix | | | 103 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/base/firmware.nix | | | 99 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/base/security.nix | | | 101 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/configuration.nix | | | 142 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/default.nix | | | 85 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/_shared/browser.nix | | | 30 | ++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/_shared/default.nix | | | 5 | +++++ |
| A | nixos/modules/gui/desktop/_shared/files.nix | | | 131 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/_shared/login.nix | | | 35 | +++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/_shared/media.nix | | | 49 | +++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/_shared/misc.nix | | | 96 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/_shared/notify.nix | | | 96 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/_shared/panel.nix | | | 309 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/_shared/security.nix | | | 132 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/_shared/style.nix | | | 38 | ++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/_shared/terminal.nix | | | 47 | +++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/_shared/text.nix | | | 63 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/_shared/theme.nix | | | 40 | ++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/_shared/utilities.nix | | | 105 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/gnome/common.nix | | | 44 | ++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/gnome/default.nix | | | 258 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/gnome/settings/apps.nix | | | 229 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/gnome/settings/default.nix | | | 205 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/gnome/settings/extensions.nix | | | 599 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/hyprland/apps/idle.nix | | | 34 | ++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/hyprland/apps/launcher.nix | | | 81 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/hyprland/apps/panel.nix | | | 166 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/hyprland/apps/utilities.nix | | | 81 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/hyprland/default.nix | | | 65 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/hyprland/settings/apps.nix | | | 162 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/hyprland/settings/default.nix | | | 214 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/hyprland/settings/keybinds.nix | | | 209 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/hyprland/settings/plugins.nix | | | 51 | +++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/install.nix | | | 85 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/niri/apps/idle.nix | | | 28 | ++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/niri/apps/launcher.nix | | | 30 | ++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/niri/apps/panel.nix | | | 158 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/niri/apps/utilities.nix | | | 31 | +++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/niri/default.nix | | | 54 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/niri/settings/apps.nix | | | 141 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/niri/settings/default.nix | | | 75 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/niri/settings/keybinds.nix | | | 100 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/niri/settings/style.nix | | | 56 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/pantheon/default.nix | | | 188 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/desktop/pantheon/settings.nix | | | 321 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/fonts.nix | | | 93 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/gtk.nix | | | 80 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/qt.nix | | | 151 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/gui/theme.nix | | | 114 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/hardware/README.md | | | 40 | ++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/hardware/blockchain.nix | | | 26 | ++++++++++++++++++++++++++ |
| A | nixos/modules/hardware/boot.nix | | | 120 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/hardware/cpu.nix | | | 47 | +++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/hardware/default.nix | | | 36 | ++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/hardware/filesystem.nix | | | 262 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/hardware/gpu.nix | | | 109 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/hardware/laptop.nix | | | 63 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/hardware/mobile.nix | | | 25 | +++++++++++++++++++++++++ |
| A | nixos/modules/hardware/printer.nix | | | 40 | ++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/hardware/virtualisation/android.nix | | | 45 | +++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/hardware/virtualisation/default.nix | | | 58 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/hardware/virtualisation/vfio.nix | | | 128 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/nix/config.nix | | | 7 | +++++++ |
| A | nixos/modules/nix/default.nix | | | 51 | +++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/nix/index.nix | | | 20 | ++++++++++++++++++++ |
| A | nixos/modules/nix/registry.nix | | | 28 | ++++++++++++++++++++++++++++ |
| A | nixos/modules/nix/tools.nix | | | 30 | ++++++++++++++++++++++++++++++ |
| A | nixos/modules/secrets.nix | | | 1 | + |
| A | nixos/modules/shell/default.nix | | | 177 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/shell/list/bash.nix | | | 42 | ++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/shell/list/zsh.nix | | | 58 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/shell/prompt.nix | | | 198 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/user/default.nix | | | 184 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/user/home.nix | | | 38 | ++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/user/mutable.nix | | | 102 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/modules/user/security.nix | | | 94 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/packages/README.md | | | 20 | ++++++++++++++++++++ |
| A | nixos/packages/copyous.nix | | | 51 | +++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/packages/default.nix | | | 2 | ++ |
| A | nixos/packages/fabric-ca.nix | | | 36 | ++++++++++++++++++++++++++++++++++++ |
| A | nixos/packages/firefox-elementary/default.nix | | | 29 | +++++++++++++++++++++++++++++ |
| A | nixos/packages/firefox-elementary/metadata.nix | | | 6 | ++++++ |
| A | nixos/packages/flake.nix | | | 110 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/packages/geany-catppuccin/default.nix | | | 33 | +++++++++++++++++++++++++++++++++ |
| A | nixos/packages/geany-catppuccin/metadata.nix | | | 5 | +++++ |
| A | nixos/packages/geany-catppuccin/selection.patch | | | 11 | +++++++++++ |
| A | nixos/packages/hyprshellevents/default.nix | | | 42 | ++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/packages/hyprshellevents/metadata.nix | | | 5 | +++++ |
| A | nixos/packages/kebihelp/default.nix | | | 43 | +++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/packages/kebihelp/metadata.nix | | | 6 | ++++++ |
| A | nixos/packages/kitty-search/default.nix | | | 29 | +++++++++++++++++++++++++++++ |
| A | nixos/packages/kitty-search/metadata.nix | | | 6 | ++++++ |
| A | nixos/packages/kvlibadwaita/default.nix | | | 32 | ++++++++++++++++++++++++++++++++ |
| A | nixos/packages/kvlibadwaita/metadata.nix | | | 5 | +++++ |
| A | nixos/packages/overlays/brave.nix | | | 11 | +++++++++++ |
| A | nixos/packages/overlays/nix-output-monitor.nix | | | 18 | ++++++++++++++++++ |
| A | nixos/packages/overlays/nixFlakes.nix | | | 4 | ++++ |
| R | files/templates/File -> nixos/packages/patches/.keep | | | 0 | |
| A | nixos/packages/patches/stremio.patch | | | 138 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/packages/update.sh | | | 2 | ++ |
| R | packages/patches/.keep -> nixos/packages/wine/.keep | | | 0 | |
| A | nixos/packages/wine/7zip.nix | | | 84 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/packages/wine/notepad++.nix | | | 86 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/scripts/README.md | | | 7 | +++++++ |
| A | nixos/scripts/audio.sh | | | 28 | ++++++++++++++++++++++++++++ |
| A | nixos/scripts/colors.sh | | | 9 | +++++++++ |
| A | nixos/scripts/commands.sh | | | 89 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/scripts/hyprutils.nix | | | 211 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/scripts/install.nix | | | 184 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/scripts/mail.sh | | | 28 | ++++++++++++++++++++++++++++ |
| A | nixos/scripts/nixos.nix | | | 504 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/scripts/packages.sh | | | 138 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/scripts/pci.sh | | | 13 | +++++++++++++ |
| A | nixos/scripts/sysutils.nix | | | 258 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/secrets/README.md | | | 10 | ++++++++++ |
| R | secrets/cachix-token.secret -> nixos/secrets/cachix-token.secret | | | 0 | |
| A | nixos/secrets/default.nix | | | 35 | +++++++++++++++++++++++++++++++++++ |
| R | secrets/github-token.secret -> nixos/secrets/github-token.secret | | | 0 | |
| R | secrets/gitlab-token.secret -> nixos/secrets/gitlab-token.secret | | | 0 | |
| R | secrets/keys/.gitattributes -> nixos/secrets/keys/.gitattributes | | | 0 | |
| R | secrets/keys/navya.gpg -> nixos/secrets/keys/navya.gpg | | | 0 | |
| R | secrets/keys/v7.gpg -> nixos/secrets/keys/v7.gpg | | | 0 | |
| A | nixos/secrets/secrets.yaml | | | 13 | +++++++++++++ |
| R | secrets/valkyrie/tailscale.secret -> nixos/secrets/valkyrie/tailscale.secret | | | 0 | |
| R | secrets/vortex/cloudflare.secret -> nixos/secrets/vortex/cloudflare.secret | | | 0 | |
| R | secrets/vortex/github-runner.secret -> nixos/secrets/vortex/github-runner.secret | | | 0 | |
| R | secrets/vortex/gitlab-runner.secret -> nixos/secrets/vortex/gitlab-runner.secret | | | 0 | |
| A | nixos/shells/.envrc | | | 1 | + |
| A | nixos/shells/android.nix | | | 51 | +++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/shells/cc.nix | | | 13 | +++++++++++++ |
| A | nixos/shells/default.nix | | | 25 | +++++++++++++++++++++++++ |
| A | nixos/shells/flake.nix | | | 11 | +++++++++++ |
| A | nixos/shells/java.nix | | | 6 | ++++++ |
| A | nixos/shells/js.nix | | | 12 | ++++++++++++ |
| A | nixos/shells/lua.nix | | | 8 | ++++++++ |
| A | nixos/shells/python.nix | | | 22 | ++++++++++++++++++++++ |
| A | nixos/shells/rust.nix | | | 10 | ++++++++++ |
| A | nixos/shells/sql.nix | | | 37 | +++++++++++++++++++++++++++++++++++++ |
| A | nixos/shells/video.nix | | | 13 | +++++++++++++ |
| A | nixos/site | | | 2 | ++ |
| A | nixos/users/README.md | | | 7 | +++++++ |
| A | nixos/users/default.nix | | | 114 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | nixos/users/navya.nix | | | 8 | ++++++++ |
| R | users/passwords/default -> nixos/users/passwords/default | | | 0 | |
| R | users/passwords/navya.secret -> nixos/users/passwords/navya.secret | | | 0 | |
| R | users/passwords/root.secret -> nixos/users/passwords/root.secret | | | 0 | |
| R | users/passwords/v7.secret -> nixos/users/passwords/v7.secret | | | 0 | |
| A | nixos/users/v7/accounts.conf | | | 11 | +++++++++++ |
| A | nixos/users/v7/default.nix | | | 46 | ++++++++++++++++++++++++++++++++++++++++++++++ |
| R | users/v7/profile.png -> nixos/users/v7/profile.png | | | 0 | |
| D | packages/README.md | | | 20 | -------------------- |
| D | packages/copyous.nix | | | 51 | --------------------------------------------------- |
| D | packages/default.nix | | | 2 | -- |
| D | packages/fabric-ca.nix | | | 36 | ------------------------------------ |
| D | packages/firefox-elementary/default.nix | | | 29 | ----------------------------- |
| D | packages/firefox-elementary/metadata.nix | | | 6 | ------ |
| D | packages/flake.nix | | | 110 | ------------------------------------------------------------------------------- |
| D | packages/geany-catppuccin/default.nix | | | 33 | --------------------------------- |
| D | packages/geany-catppuccin/metadata.nix | | | 5 | ----- |
| D | packages/geany-catppuccin/selection.patch | | | 11 | ----------- |
| D | packages/hyprshellevents/default.nix | | | 42 | ------------------------------------------ |
| D | packages/hyprshellevents/metadata.nix | | | 5 | ----- |
| D | packages/kebihelp/default.nix | | | 43 | ------------------------------------------- |
| D | packages/kebihelp/metadata.nix | | | 6 | ------ |
| D | packages/kitty-search/default.nix | | | 29 | ----------------------------- |
| D | packages/kitty-search/metadata.nix | | | 6 | ------ |
| D | packages/kvlibadwaita/default.nix | | | 32 | -------------------------------- |
| D | packages/kvlibadwaita/metadata.nix | | | 5 | ----- |
| D | packages/overlays/brave.nix | | | 11 | ----------- |
| D | packages/overlays/nix-output-monitor.nix | | | 18 | ------------------ |
| D | packages/overlays/nixFlakes.nix | | | 4 | ---- |
| D | packages/patches/stremio.patch | | | 138 | ------------------------------------------------------------------------------- |
| D | packages/update.sh | | | 2 | -- |
| D | packages/wine/.keep | | | 0 | |
| D | packages/wine/7zip.nix | | | 84 | ------------------------------------------------------------------------------- |
| D | packages/wine/notepad++.nix | | | 86 | ------------------------------------------------------------------------------- |
| A | popos/conky/conky.lua | | | 551 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | popos/conky/conkyrc | | | 80 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | popos/neofetch/config.conf | | | 54 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | popos/p10k.zsh | | | 472 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| D | scripts/README.md | | | 7 | ------- |
| D | scripts/audio.sh | | | 28 | ---------------------------- |
| D | scripts/colors.sh | | | 9 | --------- |
| D | scripts/commands.sh | | | 89 | ------------------------------------------------------------------------------- |
| D | scripts/hyprutils.nix | | | 211 | ------------------------------------------------------------------------------- |
| D | scripts/install.nix | | | 184 | ------------------------------------------------------------------------------- |
| D | scripts/mail.sh | | | 28 | ---------------------------- |
| D | scripts/nixos.nix | | | 504 | ------------------------------------------------------------------------------- |
| D | scripts/packages.sh | | | 138 | ------------------------------------------------------------------------------- |
| D | scripts/pci.sh | | | 13 | ------------- |
| D | scripts/sysutils.nix | | | 258 | ------------------------------------------------------------------------------- |
| D | secrets/README.md | | | 10 | ---------- |
| D | secrets/default.nix | | | 35 | ----------------------------------- |
| D | secrets/secrets.yaml | | | 13 | ------------- |
| D | shells/.envrc | | | 1 | - |
| D | shells/android.nix | | | 51 | --------------------------------------------------- |
| D | shells/cc.nix | | | 13 | ------------- |
| D | shells/default.nix | | | 25 | ------------------------- |
| D | shells/flake.nix | | | 11 | ----------- |
| D | shells/java.nix | | | 6 | ------ |
| D | shells/js.nix | | | 12 | ------------ |
| D | shells/lua.nix | | | 8 | -------- |
| D | shells/python.nix | | | 22 | ---------------------- |
| D | shells/rust.nix | | | 10 | ---------- |
| D | shells/sql.nix | | | 37 | ------------------------------------- |
| D | shells/video.nix | | | 13 | ------------- |
| A | site/.gitignore | | | 4 | ++++ |
| M | site/README.md | | | 10 | +++++----- |
| M | site/static/curl.txt | | | 25 | ++++++++++++++++++++----- |
| D | users/README.md | | | 7 | ------- |
| D | users/default.nix | | | 114 | ------------------------------------------------------------------------------- |
| D | users/navya.nix | | | 8 | -------- |
| D | users/v7/accounts.conf | | | 11 | ----------- |
| D | users/v7/default.nix | | | 46 | ---------------------------------------------- |
| A | windows/Vollmond.rmskin | | | 0 | |
| A | windows/yasb/config.yaml | | | 636 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | windows/yasb/styles.css | | | 2061 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
570 files changed, 25867 insertions(+), 23187 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.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/.github/ISSUE_TEMPLATE/feature-request.md b/.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/.github/ISSUE_TEMPLATE/help-request.md b/.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/.github/workflows/build.yml b/.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/.github/workflows/check.yml b/.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/.github/workflows/shell.yml b/.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/.github/workflows/update.yml b/.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/.gitignore b/.gitignore @@ -1,6 +1 @@ ~* -result -public -.wrangler -node_modules -site/static/processed_images diff --git a/files/images/logo/dark.png b/.misc/banner-dark.png Binary files differ. diff --git a/files/images/logo/light.png b/.misc/banner-light.png Binary files differ. diff --git a/files/images/website.png b/.misc/website.png Binary files differ. diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -1,5 +1,12 @@ ## 2026 +### March + +- Move to Windows + - Add YASB Configuration + - Update Rainmeter Skin +- Refactor directory Structure + ### February - Use `sunsetr` for Display Temperature Control diff --git a/README.md b/README.md @@ -1,471 +1,5 @@ <picture> - <source media="(prefers-color-scheme: light)" srcset="files/images/logo/light.png"/> - <source media="(prefers-color-scheme: dark)" srcset="files/images/logo/dark.png"/> - <img alt="Logo" src="files/images/logo/dark.png"> + <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"> </picture> - - - -[](https://nixos.org) - -This [repository](https://github.com/maydayv7/dotfiles) 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_ | - -|  | -| :------------------------------------------------: | -| _GNOME Desktop_ | - -|  | -| :------------------------------------------------------: | -| _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> - -| [](https://www.reddit.com/r/unixporn/comments/19efxry/xfce_functional_and_beautiful/) | -| :-----------------------------------------------------------------------------------------------------------------------------------: | -| _XFCE Desktop_ | - -|  | -| :--------------------------------------------------: | -| _GNOME 45_ | - -|  | -| :--------------------------------------------------: | -| _GNOME 44_ | - -| [](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/arch/COMMANDS.md b/arch/COMMANDS.md @@ -0,0 +1,60 @@ +# 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 @@ -0,0 +1,174 @@ +# 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 @@ -0,0 +1,41 @@ +## 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/checks/flake.nix b/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/checks/github b/checks/github @@ -1 +0,0 @@ -../.github -\ No newline at end of file diff --git a/checks/gitlab/.gitlab-ci.yml b/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/checks/gitlab/.gitlab-webide.yml b/checks/gitlab/.gitlab-webide.yml @@ -1,4 +0,0 @@ -terminal: - image: nixpkgs/cachix-flakes:latest - before_script: - - nix develop diff --git a/checks/gitlab/issue_templates/Bug.md b/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/checks/gitlab/issue_templates/Feature.md b/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/checks/gitlab/issue_templates/Help.md b/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/checks/gitlab/pipelines/build.yml b/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/checks/gitlab/pipelines/check.yml b/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/checks/gitlab/pipelines/release.yml b/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/checks/gitlab/pipelines/shell.yml b/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/checks/gitlab/pipelines/update.yml b/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/checks/gitlab/pipelines/website.yml b/checks/gitlab/pipelines/website.yml @@ -1,15 +0,0 @@ -# Build and Deploy Website -website: - stage: publish - only: - changes: - - "site/*" - except: - - /^(?!stable).+@/ - script: nix build .#website - after_script: - - mkdir -p archive - - cp -r ./result/* archive - artifacts: - paths: - - "archive/*" diff --git a/devices/README.md b/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/devices/flake.nix b/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/devices/futura.nix b/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/devices/install/default.nix b/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/devices/install/image.nix b/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/devices/valkyrie/default.nix b/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/devices/valkyrie/minecraft.nix b/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/devices/valkyrie/settings/asusd.ron b/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/devices/valkyrie/settings/aura.ron b/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/devices/valkyrie/settings/default.nix b/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/devices/valkyrie/settings/home.nix b/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/devices/valkyrie/settings/network.nix b/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/devices/vortex.nix b/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/files/.archive/Linux/Arch/COMMANDS.md b/files/.archive/Linux/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/files/.archive/Linux/Arch/INSTALL.md b/files/.archive/Linux/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/files/.archive/Linux/Arch/zshrc b/files/.archive/Linux/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/.archive/Linux/Pop/conky/conky.lua b/files/.archive/Linux/Pop/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/files/.archive/Linux/Pop/conky/conkyrc b/files/.archive/Linux/Pop/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/files/.archive/Linux/Pop/neofetch/config.conf b/files/.archive/Linux/Pop/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/files/.archive/Linux/Pop/p10k.zsh b/files/.archive/Linux/Pop/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/files/.archive/Windows/APPS.md b/files/.archive/Windows/APPS.md @@ -1,26 +0,0 @@ -## Apps - -- Microsoft Office -- Microsoft Teams -- Firefox -- 7-Zip -- VLC Media Player -- CCleaner -- Recuva -- EaseUS Partition Master -- Rufus -- VirtualBox -- BlueJ -- Zoom -- PowerToys -- TaskbarX -- Rainmeter -- Printer Driver - -### UWP - -- Dashboard PDF -- Notepads -- iTunes -- Speedtest -- Terminal diff --git a/files/.archive/Windows/Velociraptor.rmskin b/files/.archive/Windows/Velociraptor.rmskin Binary files differ. diff --git a/files/README.md b/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/files/ascii/groot b/files/ascii/groot @@ -1,10 +0,0 @@ - [00;32m \^V// - [00;33m |[01;37m. [01;37m.[00;33m| [01;34m I AM (G)ROOT! - [00;32m- [00;33m\ - / [00;32m_ - [00;33m \_| |_/ - [00;33m \ \ - [00;31m __[00;33m/[00;31m_[00;33m/[00;31m__ - [00;31m|_______| [00;37m With Great Power Comes Great Responsibility - [00;31m \ / [00;37m Use it Wisely - [00;31m \___/ -[0m diff --git a/files/ascii/lol b/files/ascii/lol @@ -1,6 +0,0 @@ -██╗░░░░░░█████╗░██╗░░░░░ -██║░░░░░██╔══██╗██║░░░░░ -██║░░░░░██║░░██║██║░░░░░ -██║░░░░░██║░░██║██║░░░░░ -███████╗╚█████╔╝███████╗ -╚══════╝░╚════╝░╚══════╝ -\ No newline at end of file diff --git a/files/ascii/pacman b/files/ascii/pacman @@ -1,11 +0,0 @@ -================================================. - .-. .-. .--. | - | OO| | OO| / _.-' .-. .-. .-. .''. | - | | | | \ '-. '-' '-' '-' '..' | - '^^^' '^^^' '--' | -===============. .-. .================. .-. | - | | | | | '-' | - | | | | | | - | ':-:' | | .-. | - | '-' | | '-' | -===============' '================' | -\ No newline at end of file diff --git a/files/ascii/tux b/files/ascii/tux @@ -1,18 +0,0 @@ - .-"""-. - ' \ - |,. ,-. | - |()L( ()| | - |,' `".| | - |.___.',| ` - .j `--"' ` `. - / ' ' \ - / / ` `. - / / ` . - / / l | - . , | | - ,"`. .| | - _.' ``. | `..-'l -| `.`, | `. -| `. __.j ) -|__ |--""___| ,-' - `"--...,+"""" `._,.-' -\ No newline at end of file diff --git a/files/colors/README.md b/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/files/colors/adwaita.yaml b/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/files/colors/catppuccin.yaml b/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/files/colors/elementary.yaml b/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/files/fastfetch.jsonc b/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/files/flake.nix b/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/files/geany/keybindings.conf b/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/files/geany/settings.conf b/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/files/git/hooks/commit-msg b/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/files/git/hooks/pre-commit b/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/files/gitea/theme-black.css b/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/files/gitea/theme-blue.css b/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/files/gitea/theme-red.css b/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/files/gnome/menu.json b/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/files/gnome/shortcuts.json b/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/files/hyprland/greeter.conf b/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/files/hyprland/kebihelp.json b/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/files/hyprland/pypr.toml b/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/files/hyprland/shaders/dim.frag b/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/files/hyprland/shaders/invert.frag b/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/files/hyprland/theme/drawer.css b/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/files/hyprland/theme/hyprshell.css b/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/files/hyprland/theme/waybar.css b/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/files/hyprland/waycorner.toml b/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/files/logseq/preferences.json b/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/files/logseq/settings/logseq-awesome-ui.json b/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/files/logseq/settings/logseq-bullet-threading.json b/files/logseq/settings/logseq-bullet-threading.json @@ -1,6 +0,0 @@ -{ - "disabled": false, - "color": "", - "customColor": false, - "width": "2px" -} diff --git a/files/logseq/settings/logseq-git.json b/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/files/logseq/settings/logseq-journals-calendar.json b/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/files/logseq/settings/logseq-move-block.json b/files/logseq/settings/logseq-move-block.json @@ -1,7 +0,0 @@ -{ - "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 @@ -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/files/logseq/settings/logseq-tabs.json b/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/files/logseq/settings/logseq-tocgen.json b/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/files/nanorc b/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/files/niri/rofi.rasi b/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/files/niri/theme/drawer.css b/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/files/niri/theme/waybar.css b/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/files/pcmanfm.conf b/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/files/repl.nix b/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/files/sunsetr/presets/3000/sunsetr.toml b/files/sunsetr/presets/3000/sunsetr.toml @@ -1,3 +0,0 @@ -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 @@ -1,3 +0,0 @@ -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 @@ -1,3 +0,0 @@ -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 @@ -1,3 +0,0 @@ -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 @@ -1,3 +0,0 @@ -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 @@ -1,3 +0,0 @@ -transition_mode = "static" -static_temp = 8000 -static_gamma = 100 diff --git a/files/sunsetr/sunsetr.toml b/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/files/swaync.css b/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/files/tmuxrc.tmux b/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/files/vscode/keybindings.json b/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/files/vscode/settings.json b/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/files/wlogout.css b/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/files/ytmusic.json b/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/flake.lock b/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/flake.nix b/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/lib/README.md b/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/lib/_mime.nix b/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/lib/build.nix b/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/lib/map.nix b/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/lib/pack.nix b/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/modules/README.md b/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/modules/apps/default.nix b/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/modules/apps/discord.nix b/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/modules/apps/firefox.nix b/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/modules/apps/flatpak.nix b/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/modules/apps/games/default.nix b/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/modules/apps/games/mc-server.nix b/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/modules/apps/games/minecraft.nix b/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/modules/apps/games/osu.nix b/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/modules/apps/games/roblox.nix b/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/modules/apps/git/default.nix b/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/modules/apps/git/hosting.nix b/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/modules/apps/git/runner.nix b/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/modules/apps/git/user.nix b/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/modules/apps/internet.nix b/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/modules/apps/latex.nix b/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/modules/apps/notes.nix b/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/modules/apps/office.nix b/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/modules/apps/spotify.nix b/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/modules/apps/stream.nix b/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/modules/apps/tools.nix b/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/modules/apps/vscode/default.nix b/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/modules/apps/vscode/mutable.nix b/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/modules/apps/wine.nix b/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/modules/apps/youtube.nix b/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/modules/base/default.nix b/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/modules/base/firmware.nix b/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/modules/base/security.nix b/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/modules/configuration.nix b/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/modules/gui/default.nix b/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/modules/gui/desktop/_shared/browser.nix b/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/modules/gui/desktop/_shared/default.nix b/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/modules/gui/desktop/_shared/files.nix b/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/modules/gui/desktop/_shared/login.nix b/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/modules/gui/desktop/_shared/media.nix b/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/modules/gui/desktop/_shared/misc.nix b/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/modules/gui/desktop/_shared/notify.nix b/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/modules/gui/desktop/_shared/panel.nix b/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/modules/gui/desktop/_shared/security.nix b/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/modules/gui/desktop/_shared/style.nix b/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/modules/gui/desktop/_shared/terminal.nix b/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/modules/gui/desktop/_shared/text.nix b/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/modules/gui/desktop/_shared/theme.nix b/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/modules/gui/desktop/_shared/utilities.nix b/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/modules/gui/desktop/gnome/common.nix b/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/modules/gui/desktop/gnome/default.nix b/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/modules/gui/desktop/gnome/settings/apps.nix b/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/modules/gui/desktop/gnome/settings/default.nix b/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/modules/gui/desktop/gnome/settings/extensions.nix b/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/modules/gui/desktop/hyprland/apps/idle.nix b/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/modules/gui/desktop/hyprland/apps/launcher.nix b/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/modules/gui/desktop/hyprland/apps/panel.nix b/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/modules/gui/desktop/hyprland/apps/utilities.nix b/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/modules/gui/desktop/hyprland/default.nix b/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/modules/gui/desktop/hyprland/settings/apps.nix b/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/modules/gui/desktop/hyprland/settings/default.nix b/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/modules/gui/desktop/hyprland/settings/keybinds.nix b/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/modules/gui/desktop/hyprland/settings/plugins.nix b/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/modules/gui/desktop/install.nix b/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/modules/gui/desktop/niri/apps/idle.nix b/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/modules/gui/desktop/niri/apps/launcher.nix b/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/modules/gui/desktop/niri/apps/panel.nix b/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/modules/gui/desktop/niri/apps/utilities.nix b/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/modules/gui/desktop/niri/default.nix b/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/modules/gui/desktop/niri/settings/apps.nix b/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/modules/gui/desktop/niri/settings/default.nix b/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/modules/gui/desktop/niri/settings/keybinds.nix b/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/modules/gui/desktop/niri/settings/style.nix b/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/modules/gui/desktop/pantheon/default.nix b/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/modules/gui/desktop/pantheon/settings.nix b/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/modules/gui/fonts.nix b/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/modules/gui/gtk.nix b/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/modules/gui/qt.nix b/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/modules/gui/theme.nix b/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/modules/hardware/README.md b/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/modules/hardware/blockchain.nix b/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/modules/hardware/boot.nix b/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/modules/hardware/cpu.nix b/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/modules/hardware/default.nix b/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/modules/hardware/filesystem.nix b/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/modules/hardware/gpu.nix b/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/modules/hardware/laptop.nix b/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/modules/hardware/mobile.nix b/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/modules/hardware/printer.nix b/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/modules/hardware/virtualisation/android.nix b/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/modules/hardware/virtualisation/default.nix b/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/modules/hardware/virtualisation/vfio.nix b/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/modules/nix/config.nix b/modules/nix/config.nix @@ -1,7 +0,0 @@ -{ - allowAliases = true; - allowBroken = false; - allowUnfree = true; - allowInsecurePredicate = _: true; - pulseAudio = true; -} diff --git a/modules/nix/default.nix b/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/modules/nix/index.nix b/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/modules/nix/registry.nix b/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/modules/nix/tools.nix b/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/modules/secrets.nix b/modules/secrets.nix @@ -1 +0,0 @@ -(import ../secrets) diff --git a/modules/shell/default.nix b/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/modules/shell/list/bash.nix b/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/modules/shell/list/zsh.nix b/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/modules/shell/prompt.nix b/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/modules/user/default.nix b/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/modules/user/home.nix b/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/modules/user/mutable.nix b/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/modules/user/security.nix b/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/.gitignore b/nixos/.gitignore @@ -0,0 +1 @@ +result diff --git a/nixos/README.md b/nixos/README.md @@ -0,0 +1,468 @@ +> [!CAUTION] +> I have switched to Windows, and do not use this configuration anymore + +[](https://nixos.org) + + + +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_ | + +|  | +| :------------------------------------------------: | +| _GNOME Desktop_ | + +|  | +| :------------------------------------------------------: | +| _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> + +| [](https://www.reddit.com/r/unixporn/comments/19efxry/xfce_functional_and_beautiful/) | +| :-----------------------------------------------------------------------------------------------------------------------------------: | +| _XFCE Desktop_ | + +|  | +| :--------------------------------------------------: | +| _GNOME 45_ | + +|  | +| :--------------------------------------------------: | +| _GNOME 44_ | + +| [](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 @@ -0,0 +1,42 @@ +{ + 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 @@ -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/nixos/checks/github/ISSUE_TEMPLATE/feature-request.md b/nixos/checks/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/nixos/checks/github/ISSUE_TEMPLATE/help-request.md b/nixos/checks/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/nixos/checks/github/workflows/build.yml b/nixos/checks/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/nixos/checks/github/workflows/check.yml b/nixos/checks/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/.github/workflows/install.yml b/nixos/checks/github/workflows/install.yml diff --git a/nixos/checks/github/workflows/shell.yml b/nixos/checks/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/nixos/checks/github/workflows/update.yml b/nixos/checks/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/nixos/checks/gitlab/.gitlab-ci.yml b/nixos/checks/gitlab/.gitlab-ci.yml @@ -0,0 +1,16 @@ +# 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 @@ -0,0 +1,4 @@ +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 @@ -0,0 +1,32 @@ +### 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 @@ -0,0 +1,11 @@ +**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 @@ -0,0 +1,24 @@ +### 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 @@ -0,0 +1,27 @@ +# 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 @@ -0,0 +1,11 @@ +# 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 @@ -0,0 +1,20 @@ +# 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 @@ -0,0 +1,18 @@ +# 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 @@ -0,0 +1,18 @@ +# 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/devices/.keep b/nixos/devices/.keep diff --git a/nixos/devices/README.md b/nixos/devices/README.md @@ -0,0 +1,20 @@ +### 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 @@ -0,0 +1,8 @@ +{ 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 @@ -0,0 +1,40 @@ +{ + 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 @@ -0,0 +1,17 @@ +{ + 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 @@ -0,0 +1,13 @@ +{ 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 @@ -0,0 +1,107 @@ +{ + 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 @@ -0,0 +1,48 @@ +{ 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 @@ -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/nixos/devices/valkyrie/settings/aura.ron b/nixos/devices/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/nixos/devices/valkyrie/settings/default.nix b/nixos/devices/valkyrie/settings/default.nix @@ -0,0 +1,32 @@ +{ + 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 @@ -0,0 +1,62 @@ +{ + 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 @@ -0,0 +1,18 @@ +{ 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 @@ -0,0 +1,74 @@ +{ + 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 @@ -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 [`flake.nix`](./flake.nix) to understand how they are used diff --git a/nixos/files/ascii/groot b/nixos/files/ascii/groot @@ -0,0 +1,10 @@ + [00;32m \^V// + [00;33m |[01;37m. [01;37m.[00;33m| [01;34m I AM (G)ROOT! + [00;32m- [00;33m\ - / [00;32m_ + [00;33m \_| |_/ + [00;33m \ \ + [00;31m __[00;33m/[00;31m_[00;33m/[00;31m__ + [00;31m|_______| [00;37m With Great Power Comes Great Responsibility + [00;31m \ / [00;37m Use it Wisely + [00;31m \___/ +[0m diff --git a/nixos/files/ascii/lol b/nixos/files/ascii/lol @@ -0,0 +1,6 @@ +██╗░░░░░░█████╗░██╗░░░░░ +██║░░░░░██╔══██╗██║░░░░░ +██║░░░░░██║░░██║██║░░░░░ +██║░░░░░██║░░██║██║░░░░░ +███████╗╚█████╔╝███████╗ +╚══════╝░╚════╝░╚══════╝ +\ No newline at end of file diff --git a/nixos/files/ascii/pacman b/nixos/files/ascii/pacman @@ -0,0 +1,11 @@ +================================================. + .-. .-. .--. | + | OO| | OO| / _.-' .-. .-. .-. .''. | + | | | | \ '-. '-' '-' '-' '..' | + '^^^' '^^^' '--' | +===============. .-. .================. .-. | + | | | | | '-' | + | | | | | | + | ':-:' | | .-. | + | '-' | | '-' | +===============' '================' | +\ No newline at end of file diff --git a/nixos/files/ascii/tux b/nixos/files/ascii/tux @@ -0,0 +1,18 @@ + .-"""-. + ' \ + |,. ,-. | + |()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 @@ -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/nixos/files/colors/adwaita.yaml b/nixos/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/nixos/files/colors/catppuccin.yaml b/nixos/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/nixos/files/colors/elementary.yaml b/nixos/files/colors/elementary.yaml @@ -0,0 +1,18 @@ +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 @@ -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/nixos/files/flake.nix b/nixos/files/flake.nix @@ -0,0 +1,169 @@ +{ + 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 @@ -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/nixos/files/geany/settings.conf b/nixos/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/nixos/files/git/hooks/commit-msg b/nixos/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/nixos/files/git/hooks/pre-commit b/nixos/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/nixos/files/gitea/theme-black.css b/nixos/files/gitea/theme-black.css @@ -0,0 +1,61 @@ +: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 @@ -0,0 +1,58 @@ +: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 @@ -0,0 +1,58 @@ +: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 @@ -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/nixos/files/gnome/shortcuts.json b/nixos/files/gnome/shortcuts.json @@ -0,0 +1,308 @@ +[ + { + "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 @@ -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/nixos/files/hyprland/kebihelp.json b/nixos/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/nixos/files/hyprland/pypr.toml b/nixos/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/nixos/files/hyprland/shaders/dim.frag b/nixos/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/nixos/files/hyprland/shaders/invert.frag b/nixos/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/nixos/files/hyprland/shaders/monochrome.frag diff --git a/nixos/files/hyprland/theme/drawer.css b/nixos/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/nixos/files/hyprland/theme/hyprshell.css b/nixos/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/nixos/files/hyprland/theme/waybar.css b/nixos/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/nixos/files/hyprland/waycorner.toml b/nixos/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/files/images/desktop/gnome.jpg b/nixos/files/images/desktop/gnome.jpg Binary files differ. diff --git a/files/images/desktop/hyprland.jpg b/nixos/files/images/desktop/hyprland.jpg Binary files differ. diff --git a/files/images/desktop/old/gnome_41.jpg b/nixos/files/images/desktop/old/gnome_41.jpg Binary files differ. diff --git a/files/images/desktop/old/gnome_44.jpg b/nixos/files/images/desktop/old/gnome_44.jpg Binary files differ. diff --git a/files/images/desktop/old/gnome_45.jpg b/nixos/files/images/desktop/old/gnome_45.jpg Binary files differ. diff --git a/files/images/desktop/pantheon.jpg b/nixos/files/images/desktop/pantheon.jpg Binary files differ. diff --git a/files/images/desktop/xfce.jpg b/nixos/files/images/desktop/xfce.jpg Binary files differ. diff --git a/files/images/transparent.png b/nixos/files/images/transparent.png Binary files differ. diff --git a/nixos/files/logseq/preferences.json b/nixos/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/nixos/files/logseq/settings/logseq-awesome-ui.json b/nixos/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/nixos/files/logseq/settings/logseq-bullet-threading.json b/nixos/files/logseq/settings/logseq-bullet-threading.json @@ -0,0 +1,6 @@ +{ + "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 @@ -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/nixos/files/logseq/settings/logseq-journals-calendar.json b/nixos/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/nixos/files/logseq/settings/logseq-move-block.json b/nixos/files/logseq/settings/logseq-move-block.json @@ -0,0 +1,7 @@ +{ + "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 @@ -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/nixos/files/logseq/settings/logseq-tabs.json b/nixos/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/nixos/files/logseq/settings/logseq-tocgen.json b/nixos/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/nixos/files/nanorc b/nixos/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/nixos/files/niri/rofi.rasi b/nixos/files/niri/rofi.rasi @@ -0,0 +1,315 @@ +/** + * 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 @@ -0,0 +1,26 @@ +/* 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 @@ -0,0 +1,202 @@ +* { + 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 @@ -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/nixos/files/repl.nix b/nixos/files/repl.nix @@ -0,0 +1,47 @@ +{ + 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 @@ -0,0 +1,3 @@ +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 @@ -0,0 +1,3 @@ +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 @@ -0,0 +1,3 @@ +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 @@ -0,0 +1,3 @@ +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 @@ -0,0 +1,3 @@ +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 @@ -0,0 +1,3 @@ +transition_mode = "static" +static_temp = 8000 +static_gamma = 100 diff --git a/nixos/files/sunsetr/sunsetr.toml b/nixos/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/nixos/files/swaync.css b/nixos/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/files/templates/Document.docx b/nixos/files/templates/Document.docx Binary files differ. diff --git a/files/.archive/.keep b/nixos/files/templates/File diff --git a/files/templates/Presentation.pptx b/nixos/files/templates/Presentation.pptx Binary files differ. diff --git a/files/templates/Spreadsheet.xlsx b/nixos/files/templates/Spreadsheet.xlsx Binary files differ. diff --git a/nixos/files/tmuxrc.tmux b/nixos/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/nixos/files/vscode/keybindings.json b/nixos/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/nixos/files/vscode/settings.json b/nixos/files/vscode/settings.json @@ -0,0 +1,94 @@ +{ + "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 @@ -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/nixos/files/ytmusic.json b/nixos/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/nixos/flake.lock b/nixos/flake.lock @@ -0,0 +1,2068 @@ +{ + "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 @@ -0,0 +1,307 @@ +############################################### +# ▗▄▄▄ ▗▄▄▄▄ ▄▄▄▖ # +# ▜███▙ ▜███▙ ▟███▛ # +# ▜███▙ ▜███▙▟███▛ # +# ▜███▙ ▜██████▛ # +# ▟█████████████████▙ ▜████▛ ▟▙ # +# ▟███████████████████▙ ▜███▙ ▟██▙ # +# ▄▄▄▄▖ ▜███▙ ▟███▛ # +# ▟███▛ ▜██▛ ▟███▛ # +# ▟███▛ ▜▛ ▟███▛ # +# ▟███████████▛ ▟██████████▙ # +# ▜██████████▛ ▟███████████▛ # +# ▟███▛ ▟▙ ▟███▛ # +# ▟███▛ ▟██▙ ▟███▛ # +# ▟███▛ ▜███▙ ▝▀▀▀▀ # +# ▜██▛ ▜███▙ ▜██████████████████▛ # +# ▜▛ ▟████▙ ▜████████████████▛ # +# ▟██████▙ ▜███▙ # +# ▟███▛▜███▙ ▜███▙ # +# ▟███▛ ▜███▙ ▜███▙ # +# ▝▀▀▀ ▀▀▀▀▘ ▀▀▀▘ # +# --------------------------------------- # +# 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 @@ -0,0 +1,29 @@ +### 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 @@ -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/nixos/lib/build.nix b/nixos/lib/build.nix @@ -0,0 +1,120 @@ +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 @@ -0,0 +1,161 @@ +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 @@ -0,0 +1,23 @@ +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 @@ -0,0 +1,100 @@ +### 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 @@ -0,0 +1,25 @@ +{ + 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 @@ -0,0 +1,90 @@ +{ + 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 @@ -0,0 +1,132 @@ +{ + 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 @@ -0,0 +1,91 @@ +{ + 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 @@ -0,0 +1,73 @@ +{ + 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 @@ -0,0 +1,218 @@ +# ? # 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 @@ -0,0 +1,13 @@ +{ + 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 @@ -0,0 +1,13 @@ +{ + 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 @@ -0,0 +1,18 @@ +{ + 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 @@ -0,0 +1,169 @@ +{ + 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 @@ -0,0 +1,130 @@ +{ + 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 @@ -0,0 +1,75 @@ +{ + 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 @@ -0,0 +1,34 @@ +{ + 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 @@ -0,0 +1,52 @@ +{ + 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 @@ -0,0 +1,26 @@ +{ + 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 @@ -0,0 +1,60 @@ +{ + 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 @@ -0,0 +1,94 @@ +{ + 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 @@ -0,0 +1,52 @@ +{ + 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 @@ -0,0 +1,19 @@ +{ + 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 @@ -0,0 +1,62 @@ +{ + 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 @@ -0,0 +1,97 @@ +{ + 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 @@ -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/nixos/modules/apps/wine.nix b/nixos/modules/apps/wine.nix @@ -0,0 +1,76 @@ +{ + 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 @@ -0,0 +1,54 @@ +{ + 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 @@ -0,0 +1,103 @@ +{ + 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 @@ -0,0 +1,99 @@ +{ + 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 @@ -0,0 +1,101 @@ +{ + 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 @@ -0,0 +1,142 @@ +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 @@ -0,0 +1,85 @@ +{ + 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 @@ -0,0 +1,30 @@ +{ + 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 @@ -0,0 +1,5 @@ +{ 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 @@ -0,0 +1,131 @@ +{ + 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 @@ -0,0 +1,35 @@ +{ + 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 @@ -0,0 +1,49 @@ +{ + 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 @@ -0,0 +1,96 @@ +{ + 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 @@ -0,0 +1,96 @@ +{ + 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 @@ -0,0 +1,309 @@ +{ + 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 @@ -0,0 +1,132 @@ +{ + 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 @@ -0,0 +1,38 @@ +{ + 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 @@ -0,0 +1,47 @@ +{ + 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 @@ -0,0 +1,63 @@ +{ + 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 @@ -0,0 +1,40 @@ +{ 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 @@ -0,0 +1,105 @@ +{ + 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 @@ -0,0 +1,44 @@ +{ + 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 @@ -0,0 +1,258 @@ +{ + 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 @@ -0,0 +1,229 @@ +{ + 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 @@ -0,0 +1,205 @@ +{ + 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 @@ -0,0 +1,599 @@ +{ + 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 @@ -0,0 +1,34 @@ +{ + 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 @@ -0,0 +1,81 @@ +{ + 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 @@ -0,0 +1,166 @@ +{ + 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 @@ -0,0 +1,81 @@ +{ + 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 @@ -0,0 +1,65 @@ +{ + 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 @@ -0,0 +1,162 @@ +{ + 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 @@ -0,0 +1,214 @@ +{ + 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 @@ -0,0 +1,209 @@ +_: +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 @@ -0,0 +1,51 @@ +{ + 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 @@ -0,0 +1,85 @@ +{ + 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 @@ -0,0 +1,28 @@ +{ + 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 @@ -0,0 +1,30 @@ +{ + 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 @@ -0,0 +1,158 @@ +{ + 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 @@ -0,0 +1,31 @@ +{ + 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 @@ -0,0 +1,54 @@ +{ + 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 @@ -0,0 +1,141 @@ +{ 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 @@ -0,0 +1,75 @@ +{ 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 @@ -0,0 +1,100 @@ +{ 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 @@ -0,0 +1,56 @@ +{ 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 @@ -0,0 +1,188 @@ +{ + 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 @@ -0,0 +1,321 @@ +{ + 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 @@ -0,0 +1,93 @@ +{ + 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 @@ -0,0 +1,80 @@ +{ + 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 @@ -0,0 +1,151 @@ +{ + 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 @@ -0,0 +1,114 @@ +{ + 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 @@ -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 `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 @@ -0,0 +1,26 @@ +{ + 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 @@ -0,0 +1,120 @@ +{ + 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 @@ -0,0 +1,47 @@ +{ + 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 @@ -0,0 +1,36 @@ +{ + 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 @@ -0,0 +1,262 @@ +{ + 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 @@ -0,0 +1,109 @@ +{ + 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 @@ -0,0 +1,63 @@ +{ + 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 @@ -0,0 +1,25 @@ +# ? # 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 @@ -0,0 +1,40 @@ +{ + 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 @@ -0,0 +1,45 @@ +# ? # 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 @@ -0,0 +1,58 @@ +# ? # 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 @@ -0,0 +1,128 @@ +{ + 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 @@ -0,0 +1,7 @@ +{ + allowAliases = true; + allowBroken = false; + allowUnfree = true; + allowInsecurePredicate = _: true; + pulseAudio = true; +} diff --git a/nixos/modules/nix/default.nix b/nixos/modules/nix/default.nix @@ -0,0 +1,51 @@ +{ 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 @@ -0,0 +1,20 @@ +{ + 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 @@ -0,0 +1,28 @@ +{ + 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 @@ -0,0 +1,30 @@ +{ + 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 @@ -0,0 +1 @@ +(import ../secrets) diff --git a/nixos/modules/shell/default.nix b/nixos/modules/shell/default.nix @@ -0,0 +1,177 @@ +{ + 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 @@ -0,0 +1,42 @@ +{ + 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 @@ -0,0 +1,58 @@ +{ + 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 @@ -0,0 +1,198 @@ +{ + 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 @@ -0,0 +1,184 @@ +{ + 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 @@ -0,0 +1,38 @@ +{ 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 @@ -0,0 +1,102 @@ +# 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 @@ -0,0 +1,94 @@ +{ + 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 @@ -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/nixos/packages/copyous.nix b/nixos/packages/copyous.nix @@ -0,0 +1,51 @@ +{ + 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 @@ -0,0 +1,2 @@ +# Package Channel +with builtins; (getFlake "git+file://${toString ../.}").legacyPackages."${currentSystem}" diff --git a/nixos/packages/fabric-ca.nix b/nixos/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/nixos/packages/firefox-elementary/default.nix b/nixos/packages/firefox-elementary/default.nix @@ -0,0 +1,29 @@ +{ + 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 @@ -0,0 +1,6 @@ +{ + 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 @@ -0,0 +1,110 @@ +{ + 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 @@ -0,0 +1,33 @@ +{ + 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 @@ -0,0 +1,5 @@ +{ + 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 @@ -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/nixos/packages/hyprshellevents/default.nix b/nixos/packages/hyprshellevents/default.nix @@ -0,0 +1,42 @@ +{ + 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 @@ -0,0 +1,5 @@ +{ + 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 @@ -0,0 +1,43 @@ +{ + 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 @@ -0,0 +1,6 @@ +{ + 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 @@ -0,0 +1,29 @@ +{ + 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 @@ -0,0 +1,6 @@ +{ + 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 @@ -0,0 +1,32 @@ +{ + 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 @@ -0,0 +1,5 @@ +{ + 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 @@ -0,0 +1,11 @@ +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 @@ -0,0 +1,18 @@ +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 @@ -0,0 +1,4 @@ +final: prev: { + # Nix Version + nixFlakes = final.nixVersions.latest; +} diff --git a/files/templates/File b/nixos/packages/patches/.keep diff --git a/nixos/packages/patches/stremio.patch b/nixos/packages/patches/stremio.patch @@ -0,0 +1,138 @@ +--- /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/update.sh b/nixos/packages/update.sh @@ -0,0 +1 @@ +../scripts/packages.sh +\ No newline at end of file diff --git a/packages/patches/.keep b/nixos/packages/wine/.keep diff --git a/nixos/packages/wine/7zip.nix b/nixos/packages/wine/7zip.nix @@ -0,0 +1,84 @@ +{ + 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 @@ -0,0 +1,86 @@ +{ + 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 @@ -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/nixos/scripts/audio.sh b/nixos/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/nixos/scripts/colors.sh b/nixos/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/nixos/scripts/commands.sh b/nixos/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/nixos/scripts/hyprutils.nix b/nixos/scripts/hyprutils.nix @@ -0,0 +1,211 @@ +{ + 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 @@ -0,0 +1,184 @@ +{ + 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 @@ -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/nixos/scripts/nixos.nix b/nixos/scripts/nixos.nix @@ -0,0 +1,504 @@ +{ + 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 @@ -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/nixos/scripts/pci.sh b/nixos/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/nixos/scripts/sysutils.nix b/nixos/scripts/sysutils.nix @@ -0,0 +1,258 @@ +{ + 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 @@ -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 [`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/secrets/cachix-token.secret b/nixos/secrets/cachix-token.secret diff --git a/nixos/secrets/default.nix b/nixos/secrets/default.nix @@ -0,0 +1,35 @@ +{ + 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/secrets/github-token.secret b/nixos/secrets/github-token.secret diff --git a/secrets/gitlab-token.secret b/nixos/secrets/gitlab-token.secret diff --git a/secrets/keys/.gitattributes b/nixos/secrets/keys/.gitattributes diff --git a/secrets/keys/navya.gpg b/nixos/secrets/keys/navya.gpg diff --git a/secrets/keys/v7.gpg b/nixos/secrets/keys/v7.gpg diff --git a/nixos/secrets/secrets.yaml b/nixos/secrets/secrets.yaml @@ -0,0 +1,13 @@ +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/secrets/valkyrie/tailscale.secret b/nixos/secrets/valkyrie/tailscale.secret diff --git a/secrets/vortex/cloudflare.secret b/nixos/secrets/vortex/cloudflare.secret diff --git a/secrets/vortex/github-runner.secret b/nixos/secrets/vortex/github-runner.secret diff --git a/secrets/vortex/gitlab-runner.secret b/nixos/secrets/vortex/gitlab-runner.secret diff --git a/nixos/shells/.envrc b/nixos/shells/.envrc @@ -0,0 +1 @@ +eval "$(lorri direnv --shell-file default.nix)" diff --git a/nixos/shells/android.nix b/nixos/shells/android.nix @@ -0,0 +1,51 @@ +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 @@ -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/nixos/shells/default.nix b/nixos/shells/default.nix @@ -0,0 +1,25 @@ +{ + 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 @@ -0,0 +1,11 @@ +{ 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 @@ -0,0 +1,6 @@ +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 @@ -0,0 +1,12 @@ +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 @@ -0,0 +1,8 @@ +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 @@ -0,0 +1,22 @@ +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 @@ -0,0 +1,10 @@ +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 @@ -0,0 +1,37 @@ +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 @@ -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/nixos/site b/nixos/site @@ -0,0 +1 @@ +../site +\ No newline at end of file diff --git a/nixos/users/README.md b/nixos/users/README.md @@ -0,0 +1,7 @@ +### 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 @@ -0,0 +1,114 @@ +{ + 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 @@ -0,0 +1,8 @@ +_: { + # Personal Credentials + credentials = { + fullname = "Navya G"; + mail = "gnavya009@gmail.com"; + key = "B141E0D9F711DD86DEAE1269D9B023AB01B68EFE"; + }; +} diff --git a/users/passwords/default b/nixos/users/passwords/default diff --git a/users/passwords/navya.secret b/nixos/users/passwords/navya.secret diff --git a/users/passwords/root.secret b/nixos/users/passwords/root.secret diff --git a/users/passwords/v7.secret b/nixos/users/passwords/v7.secret diff --git a/nixos/users/v7/accounts.conf b/nixos/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/nixos/users/v7/default.nix b/nixos/users/v7/default.nix @@ -0,0 +1,46 @@ +{ + config, + lib, + pkgs, + files, + ... +}: +let + homeDir = config.home.homeDirectory; +in +{ + # Personal Credentials + credentials = { + name = "maydayv7"; + fullname = "V7"; + mail = "maydayv7@gmail.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/users/v7/profile.png b/nixos/users/v7/profile.png Binary files differ. diff --git a/packages/README.md b/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/packages/copyous.nix b/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/packages/default.nix b/packages/default.nix @@ -1,2 +0,0 @@ -# Package Channel -with builtins; (getFlake "git+file://${toString ../.}").legacyPackages."${currentSystem}" diff --git a/packages/fabric-ca.nix b/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/packages/firefox-elementary/default.nix b/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/packages/firefox-elementary/metadata.nix b/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/packages/flake.nix b/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/packages/geany-catppuccin/default.nix b/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/packages/geany-catppuccin/metadata.nix b/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/packages/geany-catppuccin/selection.patch b/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/packages/hyprshellevents/default.nix b/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/packages/hyprshellevents/metadata.nix b/packages/hyprshellevents/metadata.nix @@ -1,5 +0,0 @@ -{ - 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 @@ -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/packages/kebihelp/metadata.nix b/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/packages/kitty-search/default.nix b/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/packages/kitty-search/metadata.nix b/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/packages/kvlibadwaita/default.nix b/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/packages/kvlibadwaita/metadata.nix b/packages/kvlibadwaita/metadata.nix @@ -1,5 +0,0 @@ -{ - 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 @@ -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/packages/overlays/nix-output-monitor.nix b/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/packages/overlays/nixFlakes.nix b/packages/overlays/nixFlakes.nix @@ -1,4 +0,0 @@ -final: prev: { - # Nix Version - nixFlakes = final.nixVersions.latest; -} diff --git a/packages/patches/stremio.patch b/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/packages/update.sh b/packages/update.sh @@ -1 +0,0 @@ -../scripts/packages.sh -\ No newline at end of file diff --git a/packages/wine/.keep b/packages/wine/.keep diff --git a/packages/wine/7zip.nix b/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/packages/wine/notepad++.nix b/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/popos/conky/conky.lua b/popos/conky/conky.lua @@ -0,0 +1,551 @@ +-------------------------------------------------------------------------------- +-- 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 @@ -0,0 +1,80 @@ +## 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 @@ -0,0 +1,54 @@ +## 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 @@ -0,0 +1,472 @@ +## 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 @@ -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/scripts/audio.sh b/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/scripts/colors.sh b/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/scripts/commands.sh b/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/scripts/hyprutils.nix b/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/scripts/install.nix b/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/scripts/mail.sh b/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/scripts/nixos.nix b/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/scripts/packages.sh b/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/scripts/pci.sh b/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/scripts/sysutils.nix b/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/secrets/README.md b/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/secrets/default.nix b/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/secrets/secrets.yaml b/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/shells/.envrc b/shells/.envrc @@ -1 +0,0 @@ -eval "$(lorri direnv --shell-file default.nix)" diff --git a/shells/android.nix b/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/shells/cc.nix b/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/shells/default.nix b/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/shells/flake.nix b/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/shells/java.nix b/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/shells/js.nix b/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/shells/lua.nix b/shells/lua.nix @@ -1,8 +0,0 @@ -pkgs: { - name = "Lua"; - shellHook = ''echo "## Lua Development Shell ##"''; - packages = with pkgs; [ - lua - luaPackages.moonscript - ]; -} diff --git a/shells/python.nix b/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/shells/rust.nix b/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/shells/sql.nix b/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/shells/video.nix b/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/site/.gitignore b/site/.gitignore @@ -0,0 +1,4 @@ +public +.wrangler +node_modules +static/processed_images diff --git a/site/README.md b/site/README.md @@ -1,6 +1,6 @@ ## My Personal Website -[](https://maydayv7.cc) +[](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 develop github:maydayv7/dotfiles#website` or `nix-shell` +You can grab all the required dependencies using `nix-shell` For testing, run the following commands: @@ -19,12 +19,12 @@ zola -r site serve Then click [here](http://localhost:1111) -To build the site, run `nix build`. -To override the URL, run: <pre><code>nix build --impure --expr "with import ../packages; callPackage ./site { site = <b><i>URL</i></b>; }"</code></pre> +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> #### Continuous Integration -[`GitHub Actions`](../checks/github/workflows/website.yml) is used to automatically build the site and deploy it to Cloudflare +[`GitHub Actions`](../.github/workflows/website.yml) is used to automatically build the site and deploy it to Cloudflare ### Features diff --git a/site/static/curl.txt b/site/static/curl.txt @@ -1,8 +1,23 @@ Bello! You found my secret 'curl' page - __ - _/o \_ -( \_ ) -/ / \ \ -\_) (_/ + +\ \ ______________ + \ \ \___________ \ + \ \ / / + \ \ / / + \ \ / / + \ \ / / + \ \ / / + \ \ / / + \ \ / / + \ \ / / + \ \ / / + \ \ / / + \ \ / / + \ \ / / + \ \ / / + \ \ / / + \ \/ / + \ / + \/ Check out my site via a browser for the full experience diff --git a/users/README.md b/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/users/default.nix b/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/users/navya.nix b/users/navya.nix @@ -1,8 +0,0 @@ -_: { - # Personal Credentials - credentials = { - fullname = "Navya G"; - mail = "gnavya009@gmail.com"; - key = "B141E0D9F711DD86DEAE1269D9B023AB01B68EFE"; - }; -} diff --git a/users/v7/accounts.conf b/users/v7/accounts.conf @@ -1,11 +0,0 @@ -[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/users/v7/default.nix b/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 = "maydayv7@gmail.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/windows/Vollmond.rmskin b/windows/Vollmond.rmskin Binary files differ. diff --git a/windows/yasb/config.yaml b/windows/yasb/config.yaml @@ -0,0 +1,636 @@ +# YASB Panel Configuration +watch_stylesheet: true +watch_config: true +debug: false + +bars: + panel: + enabled: true + screens: ["*"] + class_name: "yasb-panel" + alignment: + position: "top" + center: true + window_flags: + always_on_top: true + windows_app_bar: true + hide_on_fullscreen: true + dimensions: + width: "100%" + height: 26 + padding: + top: 0 + left: 0 + bottom: 0 + right: 0 + animation: + enabled: true + duration: 400 + blur_effect: + enabled: true + acrylic: true + dark_mode: true + round_corners: false + border_color: None + widgets: + left: [ + "task_view", + # "home", + "windows_workspaces", + "active_window", + "media", + # "apps", + # "taskbar", + ] + center: [] + right: [ + # "cpu", + # "gpu", + # "memory", + # "disk", + # "traffic", + "microphone", + "volume", + "brightness", + "battery", + "bluetooth", + "wifi", + "weather", + "clock", + "power_menu", + ] + +widgets: + task_view: + type: "yasb.custom.CustomWidget" + options: + label: "<span>\ue154</span>" + label_alt: "<span>\ue154</span>" + class_name: "task-view-widget" + callbacks: + on_left: "exec explorer.exe shell:::{3080F90E-D7AD-11D9-BD98-0000947B0257}" + on_middle: "do_nothing" + on_right: "exec winver" + + home: + type: "yasb.home.HomeWidget" + options: + label: "<span>\ue62a</span>" + system_menu: true + power_menu: false + blur: true + border_color: "system" + round_corners_type: "normal" + menu_labels: + about: "\ue66A About This PC" + system: "\uF423 System Settings" + task_manager: "\uf437 Task Manager" + hibernate: "\uf28e Hibernate" + sleep: "\u23fe Sleep" + restart: "\uead2 Restart" + shutdown: "\uf011 Shutdown" + lock: "\uea75 Lock" + logout: "\udb80\udf43 Logout" + menu_list: + - { title: "\uE617 Home", path: "~" } + - { title: "\udb80\udd20 Downloads", path: "~\\Downloads" } + - { title: "\udb80\ude1a Documents", path: "~\\Documents" } + - { title: "\uf03e Pictures", path: "~\\Pictures" } + + active_window: + type: "yasb.active_window.ActiveWindowWidget" + options: + label: "{win[app_name]}" + label_alt: "{win[title]}" + label_no_window: "" + label_icon: true + label_icon_size: 14 + max_length: 50 + max_length_ellipsis: "..." + monitor_exclusive: false + ignore_window: + processes: + - "Rainmeter.exe" + classes: + - "RainmeterMeterWindow" + callbacks: + on_left: "do_nothing" + on_middle: "do_nothing" + on_right: "toggle_label" + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + windows_workspaces: + type: "yasb.windows_desktops.WorkspaceWidget" + options: + label_workspace_btn: "\udb81\udc3d" + label_workspace_active_btn: "\udb81\udc3e" + btn_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + clock: + type: "yasb.clock.ClockWidget" + options: + label: "<span>\uf017</span> {%a %d %b %H:%M}" + label_alt: "{%A %d %B %Y %H:%M:%S}" + timezones: [] + calendar: + blur: true + round_corners: true + round_corners_type: "normal" + border_color: "system" + alignment: "center" + direction: "down" + show_holidays: true + show_week_numbers: true + holiday_color: "#FF6464" + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + apps: + type: "yasb.applications.ApplicationsWidget" + options: + label: "{data}" + app_list: + - { icon: "\uf0a2", launch: "notification_center" } + - { icon: "\ueb51", launch: "quick_settings" } + - { icon: "\uf46a", launch: "cmd /c start ms-settings:windowsupdate" } + - { icon: "\uf422", launch: "search" } + - { icon: "\ueb03", launch: "cmd /c Taskmgr", name: "Task Manager" } + - { icon: "\uf489", launch: "wt", name: "Windows Terminal" } + - { icon: "\udb82\ude1e", launch: "cmd /c code", name: "VS Code" } + - { + icon: "\uf1b6", + launch: "C:/Program Files (x86)/Steam/Steam.exe", + name: "Steam", + } + container_padding: + top: 0 + left: 8 + bottom: 0 + right: 8 + + taskbar: + type: "yasb.taskbar.TaskbarWidget" + options: + icon_size: 16 + animation: + enabled: true + preview: + enabled: true + width: 250 + delay: 400 + padding: 12 + callbacks: + on_middle: "close_app" + + media: + type: "yasb.media.MediaWidget" + options: + label: "<span>\udb80\udf87</span> {title}" + label_alt: "<span>\udb80\udf87</span> {artist}" + hide_empty: true + callbacks: + on_left: "toggle_media_menu" + on_middle: "toggle_play_pause" + on_right: "toggle_label" + max_field_size: + label: 45 + label_alt: 80 + show_thumbnail: false + controls_only: false + controls_left: false + thumbnail_alpha: 80 + thumbnail_padding: 8 + thumbnail_corner_radius: 16 + icons: + prev_track: "\udb81\udcae" + next_track: "\udb81\udcad" + play: "\udb81\udc0a" + pause: "\udb80\udfe4" + media_menu: + blur: true + round_corners: true + round_corners_type: "normal" + alignment: "right" + direction: "down" + offset_top: 6 + offset_left: 10 + thumbnail_corner_radius: 8 + thumbnail_size: 120 + max_title_size: 80 + max_artist_size: 20 + show_source: true + media_menu_icons: + play: "\ue768" + pause: "\ue769" + prev_track: "\ue892" + next_track: "\ue893" + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + weather: + type: "yasb.weather.WeatherWidget" + options: + label: "<span>{icon}</span> {temp}" + label_alt: "{location}: {min_temp}/{max_temp}" + api_key: "$env:YASB_WEATHER_API_KEY" + location: "auto:ip" + show_alerts: true + hide_decimal: true + units: "metric" + callbacks: + on_left: "toggle_card" + on_middle: "do_nothing" + on_right: "toggle_label" + icons: + sunnyDay: "\ue30d" + clearNight: "\ue32b" + cloudyDay: "\udb81\udd99" + cloudyNight: "\ue311" + rainyDay: "\udb81\ude7e" + rainyNight: "\udb81\ude7e" + snowyDay: "\udb81\udd98" + snowyNight: "\udb81\udd98" + blizzardDay: "\uebaa" + default: "\uebaa" + weather_card: + blur: True + round_corners: True + round_corners_type: "normal" + border_color: "System" + alignment: "right" + direction: "down" + distance: 6 + icon_size: 64 + + cpu: + type: "yasb.cpu.CpuWidget" + options: + label: "<span>\ueea1</span> {info[percent][total]}%" + label_alt: "<span>\ueea1</span> {info[histograms][cpu_percent]}" + update_interval: 1000 + histogram_icons: + - "\u2581" # 0% + - "\u2581" # 10% + - "\u2582" # 20% + - "\u2583" # 30% + - "\u2584" # 40% + - "\u2585" # 50% + - "\u2586" # 60% + - "\u2587" # 70% + - "\u2588" # 80%+ + histogram_num_columns: 8 + callbacks: + on_left: "do_nothing" + on_middle: "exec cmd /c Taskmgr" + on_right: "toggle_label" + container_padding: + top: 0 + left: 0 + bottom: 0 + right: 0 + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + gpu: + type: "yasb.gpu.GpuWidget" + options: + label: "<span>\uf4bc</span> {info[temp]}°C" + label_alt: "<span>\uf4bc</span> {info[temp]}°C | {info[mem_used]} / {info[mem_total]}" + update_interval: 2000 + gpu_thresholds: + low: 25 + medium: 50 + high: 90 + histogram_icons: + - "\u2581" # 0% + - "\u2581" # 10% + - "\u2582" # 20% + - "\u2583" # 30% + - "\u2584" # 40% + - "\u2585" # 50% + - "\u2586" # 60% + - "\u2587" # 70% + - "\u2588" # 80%+ + histogram_num_columns: 8 + callbacks: + on_left: "do_nothing" + on_middle: "exec cmd /c Taskmgr" + on_right: "toggle_label" + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + memory: + type: "yasb.memory.MemoryWidget" + options: + label: "<span>\uefc5</span> {virtual_mem_used} / {virtual_mem_total}" + label_alt: "<span>\uf4bc</span> VIRT: {virtual_mem_percent}% SWAP: {swap_mem_percent}%" + update_interval: 5000 + callbacks: + on_left: "do_nothing" + on_middle: "exec cmd /c Taskmgr" + on_right: "toggle_label" + memory_thresholds: + low: 25 + medium: 50 + high: 90 + histogram_icons: + - "\u2581" # 0% + - "\u2581" # 10% + - "\u2582" # 20% + - "\u2583" # 30% + - "\u2584" # 40% + - "\u2585" # 50% + - "\u2586" # 60% + - "\u2587" # 70% + - "\u2588" # 80%+ + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + disk: + type: "yasb.disk.DiskWidget" + options: + label: "<span>\uf473</span> Disks" + label_alt: "<span>\uf473</span> {volume_label} {space[used][gb]} / {space[total][gb]}" + volume_label: "C" + decimal_display: 1 + update_interval: 60 + group_label: + volume_labels: + [ + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + ] + show_label_name: true + blur: true + round_corners: true + round_corners_type: "normal" + border_color: "system" + alignment: "center" + direction: "down" + callbacks: + on_left: "toggle_group" + on_middle: "do_nothing" + on_right: "toggle_label" + disk_thresholds: + low: 25 + medium: 50 + high: 90 + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + traffic: + type: "yasb.traffic.TrafficWidget" + options: + label: "<span class='download'>\uea9a {download_speed}</span><span class='upload'>{upload_speed} \ueaa1</span>" + label_alt: "<span class='download'>\uea9a {download_speed}</span><span class='upload'>{upload_speed} \ueaa1</span>" + update_interval: 1000 + hide_if_offline: true + speed_unit: "bytes" + max_label_length_align: "center" + menu: + blur: true + round_corners: true + round_corners_type: "normal" + border_color: "system" + alignment: "center" + direction: "down" + callbacks: + on_left: "toggle_menu" + on_middle: "exec cmd.exe /c start ms-settings:network-status" + on_right: "do_nothing" + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + microphone: + type: "yasb.microphone.MicrophoneWidget" + options: + label: "<span>{icon}</span> {level}" + label_alt: "<span>{icon}</span>" + mute_text: "Mute" + icons: + normal: "\ue720" + muted: "\uf12e" + mic_menu: + blur: true + round_corners: true + round_corners_type: "normal" + border_color: "system" + alignment: "right" + direction: "down" + callbacks: + on_left: "toggle_mic_menu" + on_middle: "exec cmd.exe /c start ms-settings:sound" + on_right: "toggle_mute" + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + volume: + type: "yasb.volume.VolumeWidget" + options: + label: "<span>{icon}</span> {level}" + label_alt: "{volume}" + mute_text: "Mute" + volume_icons: + - "\ue74f" # Mute + - "\ue992" # 10% + - "\ue993" # 30% + - "\ue994" # 60% + - "\ue995" # 100% + callbacks: + on_left: "toggle_volume_menu" + on_middle: "exec cmd.exe /c start ms-settings:sound" + on_right: "toggle_mute" + audio_menu: + blur: true + round_corners: true + round_corners_type: "normal" + border_color: "system" + alignment: "center" + direction: "down" + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + brightness: + type: "yasb.brightness.BrightnessWidget" + options: + label: "<span>{icon}</span> {percent}%" + label_alt: "<span>{icon}</span> {percent}%" + hide_unsupported: true + brightness_menu: + blur: true + round_corners: true + round_corners_type: "normal" + border_color: "system" + alignment: "center" + direction: "down" + callbacks: + on_left: "toggle_brightness_menu" + on_middle: "exec cmd /c start ms-settings:display" + on_right: "do_nothing" + brightness_icons: ["\ue706", "\ue706", "\ue706", "\ue706"] + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + wifi: + type: "yasb.wifi.WifiWidget" + options: + label: "<span>{wifi_icon}</span>" + label_alt: "<span>{wifi_icon}</span> {wifi_name} {wifi_strength}%" + update_interval: 5000 + get_exact_wifi_strength: true + ethernet_label: "<span>{wifi_icon}</span>" + ethernet_label_alt: "<span>{wifi_icon}</span> {ip_addr}" + ethernet_icon: "\ue839" + wifi_icons: ["\uec3c", "\uec3d", "\uec3e", "\uec3e", "\uec3f"] + callbacks: + on_left: "toggle_menu" + on_middle: "exec cmd.exe /c start ms-settings:network" + on_right: "toggle_label" + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + menu_config: + blur: true + round_corners: true + round_corners_type: "normal" + border_color: "system" + alignment: "center" + direction: "down" + offset_top: 6 + offset_left: 0 + + bluetooth: + type: "yasb.bluetooth.BluetoothWidget" + options: + label: "<span>{icon}</span>" + label_alt: "{device_name}" + label_no_device: "Not Connected" + label_device_separator: ", " + max_length: 15 + max_length_ellipsis: "..." + icons: + bluetooth_on: "\uec41" + bluetooth_off: "\ueb90" + bluetooth_connected: "\ue702" + callbacks: + on_left: "exec cmd.exe /c start ms-settings:bluetooth" + on_middle: "do_nothing" + on_right: "toggle_label" + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + battery: + type: "yasb.battery.BatteryWidget" + options: + label: "<span>{icon}</span> {percent}%" + label_alt: "<span>{icon}</span> {percent}% ({time_remaining})" + update_interval: 5000 + hide_unsupported: true + charging_options: + icon_format: "{charging_icon}" + blink_charging_icon: true + blink_interval: 800 + status_thresholds: + critical: 10 + low: 25 + medium: 60 + high: 90 + full: 100 + status_icons: + icon_charging: "\ue945" + icon_critical: "\ue851" + icon_low: "\ue853" + icon_medium: "\ue855" + icon_high: "\ue857" + icon_full: "\ue859" + callbacks: + on_left: "exec cmd /c start ms-settings:powersleep" + on_middle: "do_nothing" + on_right: "toggle_label" + label_shadow: + enabled: true + color: "black" + radius: 1 + offset: [0, 0] + + power_menu: + type: "yasb.power_menu.PowerMenuWidget" + options: + label: "\ue7e8" + uptime: true + blur: false + blur_background: true + animation_duration: 300 + button_row: 3 + buttons: + lock: ["\uea75", "Lock"] + signout: ["\udb80\udf43", "Sign out"] + shutdown: ["\uf011", "Shut Down"] + restart: ["\uead2", "Restart"] + hibernate: ["\uf28e", "Hibernate"] + cancel: ["\udb81\udf3a", "Cancel"] diff --git a/windows/yasb/styles.css b/windows/yasb/styles.css @@ -0,0 +1,2061 @@ +/* ---- YASB Panel Style ---- */ +:root { + /* Fonts */ + --font-primary: "Segoe UI", system-ui; + --font-text: "Segoe UI Variable Text", "Segoe UI", system-ui; + --font-mono: "MesloLGS NF"; + --font-icon: "Segoe Fluent Icons", "MesloLGS NF"; + --font-icon-2: "MesloLGS NF", "Segoe UI"; + + /* Typography */ + --font-size-caption: 10px; + --font-size-body: 12px; + --font-size-body-strong: 14px; + --font-size-subtitle: 16px; + --font-size-title: 20px; + --font-size-icon-large: 32px; + --font-size-display: 48px; + + --font-weight-regular: 400; + --font-weight-semibold: 500; + --font-weight-bold: 700; + + /* Spacing */ + --space-2: 2px; + --space-4: 4px; + --space-6: 6px; + --space-8: 8px; + --space-12: 12px; + --space-16: 16px; + --space-20: 20px; + --space-24: 24px; + --space-32: 32px; + + /* Dimensions */ + --width-menu-sm: 160px; + --width-menu-md: 280px; + --width-menu-lg: 380px; + --size-icon-btn: 28px; + --size-app-icon: 32px; + --height-item-md: 36px; + --height-item-lg: 80px; + + /* Border Radius */ + --radius-none: 0; + --radius-small: 4px; + --radius-medium: 6px; + --radius-large: 8px; + --radius-circle: 32px; + + /* -- Light Theme -- */ + --color-background-base: rgba(243, 243, 243, 0.9); + --color-background-layer: rgba(249, 249, 249, 0.8); + --color-background-elevated: rgba(252, 252, 252, 0.9); + --color-background-elevated-x2: rgba(255, 255, 255, 0.95); + + --color-taskbar: rgba(243, 243, 243, 0.85); + --color-widget-container: rgba(212, 212, 212, 0.7); + + /* Surface Colors */ + --color-surface-default: rgba(0, 0, 0, 0.0373); + --color-surface-secondary: rgba(0, 0, 0, 0.0241); + --color-surface-tertiary: rgba(0, 0, 0, 0.0186); + --color-surface-disabled: rgba(0, 0, 0, 0.0241); + + /* Text Colors */ + --color-text-primary: rgba(0, 0, 0, 0.9); + --color-text-secondary: rgba(0, 0, 0, 0.6063); + --color-text-tertiary: rgba(0, 0, 0, 0.4458); + --color-text-disabled: rgba(0, 0, 0, 0.3614); + + /* Accent Colors */ + --color-accent-default: #0078d4; + --color-accent-secondary: #005a9e; + --color-accent-tertiary: rgba(0, 120, 212, 0.4); + --color-accent-disabled: rgba(0, 0, 0, 0.2); + + /* Semantic Colors */ + --color-success: #107c10; + --color-warning: #ffe600c0; + --color-error: #c42b1c; + --color-info: #0078d4; + + /* Component Colors */ + --color-traffic-download: #1a7c0d; + --color-traffic-upload: #c41022; + --color-success-bg: rgba(16, 124, 16, 0.15); + --color-error-bg: rgba(196, 43, 28, 0.15); + + /* Interactive States */ + --color-subtle-fill-rest: rgba(0, 0, 0, 0.0373); + --color-subtle-fill-hover: rgba(0, 0, 0, 0.0578); + --color-subtle-fill-pressed: rgba(0, 0, 0, 0.0241); + --color-subtle-fill-disabled: transparent; + + /* Stroke/Border Colors */ + --color-stroke-surface: rgba(0, 0, 0, 0.0578); + --color-stroke-control-default: rgba(0, 0, 0, 0.0578); + --color-stroke-divider: rgba(0, 0, 0, 0.0578); + --color-stroke-focus: rgba(0, 0, 0, 0.0893); + + /* -- Dark Theme -- */ + --color-dark-background-base: rgba(8, 8, 8, 0.6); + --color-dark-background-layer: rgba(44, 44, 44, 0.5); + --color-dark-background-elevated: rgba(22, 22, 22, 0.25); + --color-dark-background-elevated-x2: rgba(22, 22, 22, 0.8); + + --color-dark-taskbar: rgba(43, 44, 45, 0.85); + --color-dark-widget-container: rgba(60, 60, 60, 0.7); + + /* Surface Colors */ + --color-dark-surface-default: rgba(255, 255, 255, 0.0605); + --color-dark-surface-secondary: rgba(255, 255, 255, 0.0419); + --color-dark-surface-tertiary: rgba(255, 255, 255, 0.0326); + --color-dark-surface-disabled: rgba(255, 255, 255, 0.0419); + + /* Text Colors */ + --color-dark-text-primary: rgba(255, 255, 255, 1); + --color-dark-text-secondary: rgba(255, 255, 255, 0.786); + --color-dark-text-tertiary: rgba(255, 255, 255, 0.544); + --color-dark-text-disabled: rgba(255, 255, 255, 0.362); + + /* Accent Colors */ + --color-dark-accent-default: #60cdff; + --color-dark-accent-secondary: #0078d4; + --color-dark-accent-tertiary: rgba(96, 205, 255, 0.5); + --color-dark-accent-disabled: rgba(255, 255, 255, 0.1581); + + /* Semantic Colors */ + --color-dark-success: #6ccb5f; + --color-dark-warning: #fce100; + --color-dark-error: #ff99a4; + --color-dark-info: #60cdff; + + /* Component Colors */ + --color-dark-traffic-download: var(--color-dark-success); + --color-dark-traffic-upload: var(--color-dark-error); + --color-dark-success-bg: rgba(108, 203, 95, 0.2); + --color-dark-error-bg: rgba(255, 153, 164, 0.2); + + /* Interactive States */ + --color-dark-subtle-fill-rest: rgba(255, 255, 255, 0.0605); + --color-dark-subtle-fill-hover: rgba(255, 255, 255, 0.0837); + --color-dark-subtle-fill-pressed: rgba(255, 255, 255, 0.0512); + --color-dark-subtle-fill-disabled: transparent; + + /* Stroke/Border Colors */ + --color-dark-stroke-surface: rgba(255, 255, 255, 0.0698); + --color-dark-stroke-control-default: rgba(255, 255, 255, 0.0838); + --color-dark-stroke-divider: rgba(255, 255, 255, 0.0838); + --color-dark-stroke-focus: rgba(255, 255, 255, 0.1047); +} + +/* ---------------------------------------------------------------------------- + Global Reset + ---------------------------------------------------------------------------- */ +* { + font-size: var(--font-size-body); + color: var(--color-text-primary); + font-weight: var(--font-weight-regular); + font-family: var(--font-primary); + margin: 0; + padding: 0; +} + +.dark * { + color: var(--color-dark-text-primary); +} + +/* ---------------------------------------------------------------------------- + Layout + ---------------------------------------------------------------------------- */ +.yasb-panel { + padding: 0 var(--space-4); + margin: 0; + background-color: var(--color-background-base); + border-bottom: 1px solid var(--color-stroke-control-default); +} + +.yasb-panel.dark { + background-color: var(--color-dark-background-base); + border-bottom: 1px solid var(--color-dark-stroke-control-default); +} + +/* Label */ +.widget { + padding: 0 var(--space-2); + margin: 0; +} + +.widget .label { + padding: 0 var(--space-4); + font-size: var(--font-size-body); + color: var(--color-text-secondary); +} + +*.dark .widget .label { + color: var(--color-dark-text-secondary); +} + +.widget .label.alt { + padding: 0 var(--space-4); +} + +.widget .label:hover { + color: var(--color-text-primary); +} + +*.dark .widget .label:hover { + color: var(--color-dark-text-primary); +} + +/* Icon */ +.widget .icon { + padding-top: 1px; + font-family: var(--font-icon); + font-size: var(--font-size-body); + color: var(--color-text-secondary); + margin-right: var(--space-4); +} + +*.dark .widget .icon { + color: var(--color-dark-text-secondary); +} + +.widget:hover .icon { + color: var(--color-text-primary); +} + +*.dark .widget:hover .icon { + color: var(--color-dark-text-primary); +} + +/* Tooltip */ +.tooltip { + background-color: var(--color-background-elevated-x2); + border: 1px solid var(--color-stroke-surface); + border-radius: var(--radius-medium); + padding: var(--space-8) var(--space-12); + margin-top: var(--space-12); + font-size: var(--font-size-body); + font-family: var(--font-primary); + color: var(--color-text-primary); + font-weight: var(--font-weight-regular); +} + +*.dark .tooltip { + background-color: var(--color-dark-background-elevated-x2); + border: 1px solid var(--color-dark-stroke-surface); + color: var(--color-dark-text-primary); +} + +/* ---------------------------------------------------------------------------- + Context Menu + ---------------------------------------------------------------------------- */ +.context-menu, +.context-menu .menu-checkbox { + background-color: var(--color-dark-background-elevated); + border: 1px solid var(--color-dark-stroke-surface); + border-radius: var(--radius-medium); + padding: var(--space-4) 0; + font-family: var(--font-primary); + font-size: var(--font-size-body); + color: var(--color-dark-text-primary); +} + +.context-menu::right-arrow { + width: var(--space-8); + height: var(--space-8); + padding-right: var(--space-24); +} + +.context-menu::item, +.context-menu .menu-checkbox { + background-color: transparent; + padding: var(--space-4) var(--space-8); + margin: var(--space-2) var(--space-4); + border-radius: var(--radius-small); + border: 0; + min-width: var(--width-menu-sm); +} + +.context-menu::item:selected, +.context-menu .menu-checkbox:hover { + background-color: var(--color-dark-subtle-fill-hover) !important; + color: var(--color-dark-text-primary) !important; +} + +.context-menu::separator { + height: 1px; + background-color: var(--color-dark-stroke-divider) !important; + margin: var(--space-4) var(--space-8); +} + +.context-menu::item:disabled { + color: var(--color-dark-text-disabled) !important; + background-color: transparent; +} + +.context-menu .menu-checkbox .checkbox { + border: none; + padding: var(--space-4) var(--space-12); + font-size: var(--font-size-body); + margin: 0; + color: var(--color-dark-text-primary) !important; + font-family: var(--font-primary); +} + +.context-menu .submenu::item:disabled { + margin: 0; + padding-left: var(--space-16); +} + +.context-menu .menu-checkbox .checkbox:unchecked { + color: var(--color-dark-text-tertiary) !important; +} + +.context-menu .menu-checkbox .checkbox::indicator { + width: var(--space-12); + height: var(--space-12); + margin-left: 0; + margin-right: var(--space-8); +} + +.context-menu .menu-checkbox .checkbox::indicator:unchecked { + background-color: var(--color-dark-surface-secondary) !important; + border-radius: var(--radius-small); +} + +.context-menu .menu-checkbox .checkbox::indicator:checked { + background-color: var(--color-dark-accent-secondary) !important; + border-radius: var(--radius-small); +} + +.context-menu .menu-checkbox .checkbox:focus { + outline: none; +} + +/* ---------------------------------------------------------------------------- + Common Widget Container + ---------------------------------------------------------------------------- */ +.widget-container { + padding: 1px var(--space-4); + margin: var(--space-2) 0; + background-color: var(--color-background-elevated); + border-radius: var(--radius-medium); + border: 1px solid var(--color-stroke-control-default); +} + +*.dark .widget-container { + background-color: var(--color-dark-background-elevated); + border: 1px solid var(--color-dark-stroke-control-default); +} + +.widget-container:hover { + background-color: var(--color-widget-container); + border-color: var(--color-stroke-focus); +} + +*.dark .widget-container:hover { + background-color: var(--color-dark-widget-container); + border-color: var(--color-dark-stroke-focus); +} + +/* ---------------------------------------------------------------------------- + Task View Widget + ---------------------------------------------------------------------------- */ +.task-view-widget .widget-container { + background-color: transparent; + border: 0; +} + +.task-view-widget .widget-container:hover { + background-color: transparent; +} + +.task-view-widget .icon { + font-family: var(--font-icon-2); + font-size: var(--font-size-subtitle); + color: var(--color-text-secondary); +} + +*.dark .task-view-widget .icon { + font-family: var(--font-icon-2); + font-size: var(--font-size-subtitle); + color: var(--color-dark-text-secondary); +} + +.task-view-widget .icon:hover { + color: var(--color-accent-default); +} + +*.dark .task-view-widget .icon:hover { + color: var(--color-dark-accent-default); +} + +/* ---------------------------------------------------------------------------- + Home Widget + ---------------------------------------------------------------------------- */ +.home-widget .widget-container { + background-color: transparent; + border: 0; +} + +.home-widget .widget-container:hover { + background-color: transparent; +} + +.home-widget .icon { + font-family: var(--font-icon-2); + font-size: var(--font-size-subtitle); + color: var(--color-text-secondary); +} + +*.dark .home-widget .icon { + color: var(--color-dark-text-secondary); +} + +.home-widget .icon:hover { + color: var(--color-accent-default); +} + +*.dark .home-widget .icon:hover { + color: var(--color-dark-accent-default); +} + +.home-menu { + background-color: var(--color-background-elevated); + border: 1px solid var(--color-stroke-surface); + border-radius: var(--radius-medium); + padding: var(--space-8) 0; + font-family: var(--font-primary); + font-size: var(--font-size-body); + color: var(--color-text-primary); +} + +*.dark .home-menu { + background-color: var(--color-dark-background-elevated); + border: 1px solid var(--color-dark-stroke-surface); + color: var(--color-dark-text-primary); +} + +.home-menu .menu-item { + background-color: transparent; + padding: var(--space-8) var(--space-12); + margin: var(--space-2) var(--space-8); + border-radius: var(--radius-small); + font-family: var(--font-icon-2); + border: 0; + min-width: 180px; +} + +.home-menu .menu-item:hover { + background-color: var(--color-subtle-fill-hover); + color: var(--color-text-primary); +} + +*.dark .home-menu .menu-item:hover { + background-color: var(--color-dark-subtle-fill-hover); + color: var(--color-dark-text-primary); +} + +.home-menu .separator { + height: 1px; + min-height: 1px; + max-height: 1px; + background-color: var(--color-stroke-divider); + margin: var(--space-4) var(--space-8); +} + +*.dark .home-menu .separator { + background-color: var(--color-dark-stroke-divider); +} + +/* ---------------------------------------------------------------------------- + Windows Desktops + ---------------------------------------------------------------------------- */ +.windows-desktops .ws-btn { + color: var(--color-text-tertiary); + background-color: transparent; + border: none; + font-size: var(--font-size-body-strong); + padding-left: unset; + padding: 1px 3px; + margin: -1px 0 0 0; + border-radius: var(--radius-small); + min-width: var(--space-16); +} + +.windows-desktops .ws-btn.button-1 { + padding-left: -2px; +} + +*.dark .windows-desktops .ws-btn { + color: var(--color-dark-text-tertiary); +} + +.windows-desktops .ws-btn:hover { + color: var(--color-text-secondary); +} + +*.dark .windows-desktops .ws-btn:hover { + color: var(--color-dark-text-secondary); +} + +.windows-desktops .ws-btn.active { + color: var(--color-accent-default); + font-weight: var(--font-weight-semibold); +} + +*.dark .windows-desktops .ws-btn.active { + color: var(--color-dark-accent-default); +} + +.windows-desktops .context-menu { + background-color: var(--color-background-elevated); + border: 1px solid var(--color-stroke-surface); + border-radius: var(--radius-medium); + padding: var(--space-4); +} + +*.dark .windows-desktops .context-menu { + background-color: var(--color-dark-background-elevated); + border: 1px solid var(--color-dark-stroke-surface); +} + +.windows-desktops .context-menu .menu-item { + padding: var(--space-8) var(--space-16); + border-radius: var(--radius-small); + color: var(--color-text-secondary); +} + +*.dark .windows-desktops .context-menu .menu-item { + color: var(--color-dark-text-secondary); +} + +.windows-desktops .context-menu .menu-item:hover { + background-color: var(--color-subtle-fill-hover); + color: var(--color-text-primary); +} + +*.dark .windows-desktops .context-menu .menu-item:hover { + background-color: var(--color-dark-subtle-fill-hover); + color: var(--color-dark-text-primary); +} + +.windows-desktops .context-menu .separator { + height: 1px; + background-color: var(--color-stroke-divider); + margin: var(--space-4) 0; +} + +*.dark .windows-desktops .context-menu .separator { + background-color: var(--color-dark-stroke-divider); +} + +/* Qt-specific Dialog Styles */ +.windows-desktops .rename-dialog { + border: 1px solid var(--color-stroke-surface); + border-radius: var(--radius-large); +} + +*.dark .windows-desktops .rename-dialog { + border: 1px solid var(--color-stroke-surface); +} + +.windows-desktops .rename-dialog QPushButton { + background-color: var(--color-accent-default); + color: var(--color-background-base); + border: none; + padding: var(--space-8) var(--space-16); + border-radius: var(--radius-small); + font-weight: var(--font-weight-semibold); +} + +*.dark .windows-desktops .rename-dialog QPushButton { + background-color: var(--color-dark-accent-default); + color: var(--color-dark-background-base); +} + +.windows-desktops .rename-dialog QPushButton:hover { + background-color: var(--color-accent-secondary); +} + +*.dark .windows-desktops .rename-dialog QPushButton:hover { + background-color: var(--color-dark-accent-secondary); +} + +.windows-desktops .rename-dialog QLabel { + color: var(--color-text-primary); + font-size: var(--font-size-body); +} + +*.dark .windows-desktops .rename-dialog QLabel { + color: var(--color-dark-text-primary); +} + +.windows-desktops .rename-dialog QLineEdit { + background-color: var(--color-surface-secondary); + border: 1px solid var(--color-stroke-control-default); + border-radius: var(--radius-small); + padding: var(--space-8); + color: var(--color-text-primary); + font-family: var(--font-text); +} + +*.dark .windows-desktops .rename-dialog QLineEdit { + background-color: var(--color-dark-surface-secondary); + border: 1px solid var(--color-dark-stroke-control-default); + color: var(--color-dark-text-primary); +} + +.windows-desktops .rename-dialog QLineEdit:focus { + border-color: var(--color-accent-default); + outline: none; +} + +*.dark .windows-desktops .rename-dialog QLineEdit:focus { + border-color: var(--color-dark-accent-default); +} + +/* ---------------------------------------------------------------------------- + Active Window Widget + ---------------------------------------------------------------------------- */ +.active-window-widget .widget-container .icon { + font-family: var(--font-icon); + font-size: var(--font-size-body); + padding-left: var(--space-6); +} + +.active-window-widget .icon { + padding: 0; +} + +.active-window-widget .widget-container .label { + color: var(--color-text-secondary); + font-family: var(--font-mono); + font-weight: var(--font-weight-semibold); +} + +*.dark .active-window-widget .widget-container .label { + color: var(--color-dark-text-secondary); +} + +/* ---------------------------------------------------------------------------- + Taskbar Widget + ---------------------------------------------------------------------------- */ +.taskbar-widget .app-container { + padding: 0 var(--space-4); + margin: 0 var(--space-2); + border-radius: var(--radius-small); +} + +.taskbar-widget .app-container:hover { + background-color: var(--color-subtle-fill-hover); +} + +*.dark .taskbar-widget .app-container:hover { + background-color: var(--color-dark-subtle-fill-hover); +} + +.taskbar-widget .app-container.foreground { + background-color: var(--color-subtle-fill-rest); + border-left: 2px solid var(--color-accent-default); +} + +*.dark .taskbar-widget .app-container.foreground { + background-color: var(--color-dark-subtle-fill-rest); + border-left: 2px solid var(--color-dark-accent-default); +} + +.taskbar-widget .app-container .app-title { + padding-left: var(--space-4); + color: var(--color-text-secondary); + font-size: var(--font-size-body); +} + +*.dark .taskbar-widget .app-container .app-title { + color: var(--color-dark-text-secondary); +} + +.taskbar-widget .app-container.foreground .app-title { + color: var(--color-text-primary); + font-weight: var(--font-weight-semibold); +} + +*.dark .taskbar-widget .app-container.foreground .app-title { + color: var(--color-dark-text-primary); +} + +.taskbar-preview { + background-color: var(--color-taskbar); + border: 1px solid var(--color-stroke-surface); + border-radius: var(--radius-medium); + padding: var(--space-8); +} + +*.dark .taskbar-preview { + background-color: var(--color-dark-taskbar); + border: 1px solid var(--color-dark-stroke-surface); +} + +.taskbar-preview .header { + padding-bottom: var(--space-8); + padding-top: var(--space-8); +} + +.taskbar-preview .header .title { + color: var(--color-text-primary); + font-weight: var(--font-weight-bold); + font-size: var(--font-size-body); +} + +*.dark .taskbar-preview .header .title { + color: var(--color-dark-text-primary); +} + +/* ---------------------------------------------------------------------------- + Apps Widget + ---------------------------------------------------------------------------- */ +.apps-widget .widget-container { + padding: 0 var(--space-4); +} + +.apps-widget .label { + font-size: var(--font-size-body); + color: var(--color-text-secondary); +} + +*.dark .apps-widget .label { + color: var(--color-dark-text-secondary); +} + +.apps-widget .label:hover { + color: var(--color-accent-default); +} + +*.dark .apps-widget .label:hover { + color: var(--color-dark-accent-default); +} + +/* ---------------------------------------------------------------------------- + Media Widget + ---------------------------------------------------------------------------- */ +.media-widget .btn { + font-size: var(--font-size-body); + color: var(--color-text-secondary); + padding: var(--space-2) var(--space-4); + margin: 0 var(--space-2); + background-color: transparent; + border: none; + border-radius: var(--radius-small); +} + +*.dark .media-widget .btn { + color: var(--color-dark-text-secondary); +} + +.media-widget .btn:hover { + color: var(--color-text-primary); + background-color: var(--color-subtle-fill-hover); +} + +*.dark .media-widget .btn:hover { + color: var(--color-dark-text-primary); + background-color: var(--color-dark-subtle-fill-hover); +} + +.media-widget .btn:active { + background-color: var(--color-subtle-fill-pressed); +} + +*.dark .media-widget .btn:active { + background-color: var(--color-dark-subtle-fill-pressed); +} + +.media-menu { + min-width: var(--width-menu-lg); + max-width: var(--width-menu-lg); + border-radius: var(--radius-medium); + padding: var(--space-12); + background-color: var(--color-background-elevated); +} + +*.dark .media-menu { + background-color: var(--color-dark-background-elevated); +} + +.media-menu .title, +.media-menu .artist, +.media-menu .source { + font-family: var(--font-text); + margin-left: var(--space-12); +} + +.media-menu .title { + font-size: var(--font-size-body-strong); + font-weight: var(--font-weight-semibold); + color: var(--color-text-primary); +} + +*.dark .media-menu .title { + color: var(--color-dark-text-primary); +} + +.media-menu .artist { + font-size: var(--font-size-body); + color: var(--color-text-secondary); + margin-top: var(--space-2); + margin-bottom: var(--space-4); +} + +*.dark .media-menu .artist { + color: var(--color-dark-text-secondary); +} + +.media-menu .source { + font-size: var(--font-size-caption); + color: var(--color-text-tertiary); +} + +*.dark .media-menu .source { + color: var(--color-dark-text-tertiary); +} + +.media-menu .btn { + font-family: var(--font-icon); + font-size: var(--font-size-subtitle); + margin: var(--space-12) var(--space-8) 0; + min-width: var(--size-icon-btn); + max-width: var(--size-icon-btn); + min-height: var(--size-icon-btn); + max-height: var(--size-icon-btn); + border-radius: var(--radius-large); + color: var(--color-text-secondary); + background-color: var(--color-subtle-fill-rest); + border: 1px solid var(--color-stroke-control-default); +} + +*.dark .media-menu .btn { + color: var(--color-dark-text-secondary); + background-color: var(--color-dark-subtle-fill-rest); + border: 1px solid var(--color-dark-stroke-control-default); +} + +.media-menu .btn:hover { + background-color: var(--color-subtle-fill-hover); + color: var(--color-text-primary); +} + +*.dark .media-menu .btn:hover { + background-color: var(--color-dark-subtle-fill-hover); + color: var(--color-dark-text-primary); +} + +.media-menu .btn.prev { + margin-left: var(--space-16); +} + +.media-menu .btn.play { + background-color: var(--color-accent-default); + color: var(--color-background-base); + border-color: transparent; +} + +*.dark .media-menu .btn.play { + background-color: var(--color-dark-accent-default); + color: var(--color-dark-background-base); +} + +.media-menu .btn.play:hover { + background-color: var(--color-accent-secondary); +} + +*.dark .media-menu .btn.play:hover { + background-color: var(--color-dark-accent-secondary); +} + +.media-menu .btn.disabled, +.media-menu .btn.disabled:hover { + color: var(--color-text-disabled); + background-color: var(--color-surface-disabled); + cursor: not-allowed; +} + +*.dark .media-menu .btn.disabled, +*.dark .media-menu .btn.disabled:hover { + color: var(--color-dark-text-disabled); + background-color: var(--color-dark-surface-disabled); +} + +.media-menu .playback-time { + font-size: var(--font-size-caption); + font-family: var(--font-mono); + color: var(--color-text-tertiary); + margin-top: var(--space-16); + min-width: 100px; +} + +*.dark .media-menu .playback-time { + color: var(--color-dark-text-tertiary); +} + +.media-menu .progress-slider { + height: var(--space-16); + margin: var(--space-4); + border-radius: var(--radius-small); +} + +.media-menu .progress-slider::groove { + background-color: var(--color-surface-tertiary); + height: var(--space-4); + border-radius: var(--radius-small); +} + +*.dark .media-menu .progress-slider::groove { + background-color: var(--color-dark-surface-tertiary); +} + +.media-menu .progress-slider::groove:hover { + height: var(--space-6); + background-color: var(--color-surface-secondary); +} + +*.dark .media-menu .progress-slider::groove:hover { + background-color: var(--color-dark-surface-secondary); +} + +.media-menu .progress-slider::sub-page { + background-color: var(--color-accent-default); + border-radius: var(--radius-small); + height: var(--space-4); +} + +*.dark .media-menu .progress-slider::sub-page { + background-color: var(--color-dark-accent-default); +} + +/* ---------------------------------------------------------------------------- + CPU Widget + ---------------------------------------------------------------------------- */ +.cpu-widget { + cursor: crosshair; +} + +.cpu-widget .widget-container .icon { + padding-right: var(--space-4); +} + +.cpu-widget .widget-container .label { + color: var(--color-text-secondary); + font-family: var(--font-mono); + font-weight: var(--font-weight-semibold); +} + +*.dark .cpu-widget .widget-container .label { + color: var(--color-dark-text-secondary); +} + +/* ---------------------------------------------------------------------------- + GPU Widget + ---------------------------------------------------------------------------- */ +.gpu-widget .widget-container .icon { + padding-right: var(--space-4); +} + +.gpu-widget .widget-container .label { + color: var(--color-text-secondary); + font-family: var(--font-mono); + font-weight: var(--font-weight-semibold); +} + +*.dark .gpu-widget .widget-container .label { + color: var(--color-dark-text-secondary); +} + +/* ---------------------------------------------------------------------------- + Memory Widget + ---------------------------------------------------------------------------- */ +.memory-widget .widget-container .icon { + padding-right: var(--space-4); +} + +.memory-widget .widget-container .label { + color: var(--color-text-secondary); + font-family: var(--font-mono); + font-weight: var(--font-weight-semibold); +} + +*.dark .memory-widget .widget-container .label { + color: var(--color-dark-text-secondary); +} + +.memory-widget .widget-container .label.status-low { + color: var(--color-success); +} +*.dark .memory-widget .widget-container .label.status-low { + color: var(--color-dark-success); +} + +.memory-widget .widget-container .label.status-medium { + color: var(--color-warning); +} +*.dark .memory-widget .widget-container .label.status-medium { + color: var(--color-dark-warning); +} + +.memory-widget .widget-container .label.status-high { + color: var(--color-accent-default); +} +*.dark .memory-widget .widget-container .label.status-high { + color: var(--color-dark-accent-default); +} + +.memory-widget .widget-container .label.status-critical { + color: var(--color-error); +} +*.dark .memory-widget .widget-container .label.status-critical { + color: var(--color-dark-error); +} + +.memory-widget .progress-circle { + margin-right: var(--space-8); +} + +/* ---------------------------------------------------------------------------- + Traffic Widget + ---------------------------------------------------------------------------- */ +.traffic-widget { + width: 200px; + min-width: 200px; + max-width: 200px; +} + +.traffic-widget .download { + color: var(--color-traffic-download); + font-family: var(--font-mono); + font-weight: var(--font-weight-semibold); +} + +*.dark .traffic-widget .download { + color: var(--color-dark-traffic-download); +} + +.traffic-widget .upload { + color: var(--color-traffic-upload); + font-family: var(--font-mono); + font-weight: var(--font-weight-semibold); +} + +*.dark .traffic-widget .upload { + color: var(--color-dark-traffic-upload); +} + +.traffic-menu { + background-color: var(--color-background-elevated); + border: 1px solid var(--color-stroke-surface); + border-radius: var(--radius-medium); + min-width: var(--width-menu-md); + padding: var(--space-12); +} + +*.dark .traffic-menu { + background-color: var(--color-dark-background-elevated); + border: 1px solid var(--color-dark-stroke-surface); +} + +.traffic-menu .header .title { + padding: var(--space-12); + font-size: var(--font-size-subtitle); + font-weight: var(--font-weight-bold); + color: var(--color-text-primary); +} + +*.dark .traffic-menu .header .title { + color: var(--color-dark-text-primary); +} + +.traffic-menu .header .reset-button { + font-size: var(--font-size-caption); + padding: var(--space-4) var(--space-8); + margin-right: var(--space-12); + border-radius: var(--radius-medium); + font-weight: var(--font-weight-semibold); + background-color: transparent; + border: 1px solid transparent; + color: var(--color-text-secondary); +} + +*.dark .traffic-menu .header .reset-button { + color: var(--color-dark-text-secondary); +} + +.traffic-menu .reset-button:hover { + color: var(--color-text-primary); + background-color: var(--color-subtle-fill-hover); + border: 1px solid var(--color-stroke-control-default); +} + +*.dark .traffic-menu .reset-button:hover { + color: var(--color-dark-text-primary); + background-color: var(--color-dark-subtle-fill-hover); + border: 1px solid var(--color-dark-stroke-control-default); +} + +/* Speed column styles */ +.traffic-menu .download-speed, +.traffic-menu .upload-speed { + background-color: transparent; + padding: var(--space-8); + margin: var(--space-12) var(--space-8) 0; +} + +.traffic-menu .speed-separator { + max-width: 1px; + background-color: var(--color-stroke-divider); + margin: var(--space-24) 0 var(--space-12) 0; +} + +*.dark .traffic-menu .speed-separator { + background-color: var(--color-dark-stroke-divider); +} + +.traffic-menu .upload-speed-value, +.traffic-menu .download-speed-value { + font-size: var(--font-size-title); + font-weight: var(--font-weight-bold); + color: var(--color-text-primary); +} + +*.dark .traffic-menu .upload-speed-value, +*.dark .traffic-menu .download-speed-value { + color: var(--color-dark-text-primary); +} + +.traffic-menu .upload-speed-unit, +.traffic-menu .download-speed-unit { + font-size: var(--font-size-body); + font-weight: var(--font-weight-semibold); + padding-top: var(--space-4); + color: var(--color-text-secondary); +} + +*.dark .traffic-menu .upload-speed-unit, +*.dark .traffic-menu .download-speed-unit { + color: var(--color-dark-text-secondary); +} + +.traffic-menu .upload-speed-placeholder, +.traffic-menu .download-speed-placeholder { + color: var(--color-text-tertiary); + font-size: var(--font-size-caption); + padding-bottom: var(--space-12); +} + +*.dark .traffic-menu .upload-speed-placeholder, +*.dark .traffic-menu .download-speed-placeholder { + color: var(--color-dark-text-tertiary); +} + +/* Section and data styles */ +.traffic-menu .section-title { + font-size: var(--font-size-caption); + font-weight: var(--font-weight-semibold); + color: var(--color-text-primary); + margin-bottom: var(--space-4); +} + +*.dark .traffic-menu .section-title { + color: var(--color-dark-text-primary); +} + +.traffic-menu .session-section, +.traffic-menu .today-section, +.traffic-menu .alltime-section { + margin: var(--space-8); + padding: 0 var(--space-8) var(--space-8); + background-color: transparent; +} + +.traffic-menu .data-text { + font-size: var(--font-size-body); + color: var(--color-text-secondary); + padding: var(--space-2); +} + +*.dark .traffic-menu .data-text { + color: var(--color-dark-text-secondary); +} + +.traffic-menu .data-value { + font-weight: var(--font-weight-semibold); + font-size: var(--font-size-body); + padding: var(--space-2); + color: var(--color-text-primary); +} + +*.dark .traffic-menu .data-value { + color: var(--color-dark-text-primary); +} + +/* Interface and Internet info styles */ +.traffic-menu .interface-info { + margin-top: var(--space-8); + border-top: 1px solid var(--color-stroke-divider); + padding: var(--space-4) 0; + font-size: var(--font-size-caption); + color: var(--color-text-secondary); + font-family: var(--font-text); +} + +*.dark .traffic-menu .interface-info { + border-top: 1px solid var(--color-dark-stroke-divider); + color: var(--color-dark-text-secondary); +} + +.traffic-menu .internet-info { + font-size: var(--font-size-caption); + color: var(--color-text-secondary); + padding: var(--space-4) 0; + font-family: var(--font-text); +} + +*.dark .traffic-menu .internet-info { + color: var(--color-dark-text-secondary); +} + +.traffic-menu .internet-info.connected { + background-color: var(--color-success-bg); + color: var(--color-success); + padding: var(--space-4) var(--space-8); + border-radius: var(--radius-small); +} + +*.dark .traffic-menu .internet-info.connected { + background-color: var(--color-dark-success-bg); + color: var(--color-dark-success); +} + +.traffic-menu .internet-info.disconnected { + background-color: var(--color-error-bg); + color: var(--color-error); + padding: var(--space-4) var(--space-8); + border-radius: var(--radius-small); +} + +*.dark .traffic-menu .internet-info.disconnected { + background-color: var(--color-dark-error-bg); + color: var(--color-dark-error); +} + +/* ---------------------------------------------------------------------------- + Disk Widget + ---------------------------------------------------------------------------- */ +.disk-widget .widget-container .icon { + font-family: var(--font-icon-2); + font-size: var(--font-size-body); +} + +.disk-widget .widget-container .label { + color: var(--color-text-secondary); + font-family: var(--font-mono); + font-weight: var(--font-weight-semibold); +} + +*.dark .disk-widget .widget-container .label { + color: var(--color-dark-text-secondary); +} + +.disk-group { + background-color: var(--color-background-elevated); + border: 1px solid var(--color-stroke-surface); + border-radius: var(--radius-medium); + padding: var(--space-8); +} + +*.dark .disk-group { + background-color: var(--color-dark-background-elevated); + border: 1px solid var(--color-dark-stroke-surface); +} + +.disk-group-row { + min-width: 250px; + max-width: 300px; + min-height: var(--height-item-md); + max-height: var(--height-item-md); + margin: 0; + padding: var(--space-12); + border-radius: var(--radius-medium); + border: 1px solid transparent; +} + +.disk-group-row:hover { + background-color: var(--color-subtle-fill-hover); + border: 1px solid var(--color-stroke-control-default); +} + +*.dark .disk-group-row:hover { + background-color: var(--color-dark-subtle-fill-hover); + border: 1px solid var(--color-dark-stroke-control-default); +} + +.disk-group-label-bar { + margin-bottom: var(--space-8); + max-height: var(--space-6); + border: 0px solid transparent; + background-color: var(--color-surface-secondary); + border-radius: var(--radius-small); +} + +*.dark .disk-group-label-bar { + background-color: var(--color-dark-surface-secondary); +} + +.disk-group-label-bar::chunk { + background-color: var(--color-success); + border-radius: var(--radius-small); +} + +*.dark .disk-group-label-bar::chunk { + background-color: var(--color-dark-success); +} + +.disk-group-label { + font-size: var(--font-size-body); + color: var(--color-text-primary); +} + +*.dark .disk-group-label { + color: var(--color-dark-text-primary); +} + +.disk-group-label-size { + font-size: var(--font-size-body); + color: var(--color-text-secondary); +} + +*.dark .disk-group-label-size { + color: var(--color-dark-text-secondary); +} + +/* ---------------------------------------------------------------------------- + Microphone Widget + ---------------------------------------------------------------------------- */ +.microphone-widget .icon { + font-family: var(--font-icon); + font-size: var(--font-size-body); + padding-left: var(--space-4); +} + +.microphone-widget .widget-container .label { + color: var(--color-text-secondary); + font-family: var(--font-mono); + font-weight: var(--font-weight-semibold); +} + +*.dark .microphone-widget .widget-container .label { + color: var(--color-dark-text-secondary); +} + +.microphone-menu { + background-color: var(--color-background-elevated); + border: 1px solid var(--color-stroke-surface); + border-radius: var(--radius-medium); + min-width: var(--width-menu-md); + padding: var(--space-8); +} + +*.dark .microphone-menu { + background-color: var(--color-dark-background-elevated); + border: 1px solid var(--color-dark-stroke-surface); +} + +.microphone-menu .system-volume-container .volume-slider { + border: none; +} + +.microphone-menu .microphone-container .device { + background-color: transparent; + border: none; + padding: var(--space-4) var(--space-8); + margin: var(--space-2) 0; + font-size: var(--font-size-body); + color: var(--color-text-secondary); + border-radius: var(--radius-small); +} + +*.dark .microphone-menu .microphone-container .device { + color: var(--color-dark-text-secondary); +} + +.microphone-menu .microphone-container .device:hover { + background-color: var(--color-subtle-fill-hover); + color: var(--color-text-primary); +} + +*.dark .microphone-menu .microphone-container .device:hover { + background-color: var(--color-dark-subtle-fill-hover); + color: var(--color-dark-text-primary); +} + +.microphone-menu .microphone-container .device.selected { + background-color: var(--color-subtle-fill-rest); + color: var(--color-text-primary); +} + +*.dark .microphone-menu .microphone-container .device.selected { + background-color: var(--color-dark-subtle-fill-rest); + color: var(--color-dark-text-primary); +} + +/* ---------------------------------------------------------------------------- + Volume Widget + ---------------------------------------------------------------------------- */ +.volume-widget .icon { + font-family: var(--font-icon); + font-size: var(--font-size-body); + padding-left: var(--space-4); +} + +.volume-widget .widget-container .label { + color: var(--color-text-secondary); + font-family: var(--font-mono); + font-weight: var(--font-weight-semibold); +} + +*.dark .volume-widget .widget-container .label { + color: var(--color-dark-text-secondary); +} + +.audio-menu { + background-color: var(--color-background-elevated); + border: 1px solid var(--color-stroke-surface); + border-radius: var(--radius-medium); + min-width: var(--width-menu-md); + padding: var(--space-8); +} + +*.dark .audio-menu { + background-color: var(--color-dark-background-elevated); + border: 1px solid var(--color-dark-stroke-surface); +} + +.audio-menu .system-volume-container .volume-slider { + border: none; +} + +.audio-menu .audio-container .device { + background-color: transparent; + border: none; + padding: var(--space-4) var(--space-8); + margin: var(--space-2) 0; + font-size: var(--font-size-body); + color: var(--color-text-secondary); + border-radius: var(--radius-small); +} + +*.dark .audio-menu .audio-container .device { + color: var(--color-dark-text-secondary); +} + +.audio-menu .audio-container .device:hover { + background-color: var(--color-subtle-fill-hover); + color: var(--color-text-primary); +} + +*.dark .audio-menu .audio-container .device:hover { + background-color: var(--color-dark-subtle-fill-hover); + color: var(--color-dark-text-primary); +} + +.audio-menu .audio-container .device.selected { + background-color: var(--color-subtle-fill-rest); + color: var(--color-text-primary); +} + +*.dark .audio-menu .audio-container .device.selected { + background-color: var(--color-dark-subtle-fill-rest); + color: var(--color-dark-text-primary); +} + +.audio-menu .toggle-apps { + background-color: transparent; + border: none; + padding: var(--space-4); + margin: 0; + min-height: var(--size-icon-btn); + min-width: var(--size-icon-btn); + border-radius: var(--radius-small); +} + +.audio-menu .toggle-apps:hover { + background-color: var(--color-subtle-fill-hover); +} + +*.dark .audio-menu .toggle-apps:hover { + background-color: var(--color-dark-subtle-fill-hover); +} + +.audio-menu .toggle-apps.expanded { + background-color: var(--color-subtle-fill-rest); +} + +*.dark .audio-menu .toggle-apps.expanded { + background-color: var(--color-dark-subtle-fill-rest); +} + +.audio-menu .apps-container { + padding: var(--space-8); + margin-top: var(--space-12); + border-radius: var(--radius-medium); + background-color: var(--color-surface-secondary); + border: 1px solid var(--color-stroke-divider); +} + +*.dark .audio-menu .apps-container { + background-color: var(--color-dark-surface-secondary); + border: 1px solid var(--color-dark-stroke-divider); +} + +.audio-menu .apps-container .app-volume .app-icon-container { + min-width: var(--size-app-icon); + min-height: var(--size-app-icon); + max-width: var(--size-app-icon); + max-height: var(--size-app-icon); + border-radius: var(--radius-small); + margin-right: var(--space-8); +} + +.audio-menu .apps-container .app-volume .app-icon-container:hover { + background-color: var(--color-subtle-fill-hover); +} + +*.dark .audio-menu .apps-container .app-volume .app-icon-container:hover { + background-color: var(--color-dark-subtle-fill-hover); +} + +/* ---------------------------------------------------------------------------- + Brightness Widget + ---------------------------------------------------------------------------- */ +.brightness-widget .widget-container .icon { + font-family: var(--font-icon); + padding-left: var(--space-4); +} + +.Brightness-widget .widget-container .label { + color: var(--color-text-secondary); + font-family: var(--font-mono); + font-weight: var(--font-weight-semibold); +} + +*.dark .brightness-widget .widget-container .label { + color: var(--color-dark-text-secondary); +} + +.brightness-menu { + background-color: var(--color-background-elevated); + border: 1px solid var(--color-stroke-surface); + border-radius: var(--radius-medium); + min-width: var(--width-menu-md); + padding: var(--space-8); +} + +*.dark .brightness-menu { + background-color: var(--color-dark-background-elevated); + border: 1px solid var(--color-dark-stroke-surface); +} + +.brightness-menu .slider-container { + padding: var(--space-4); +} + +/* ---------------------------------------------------------------------------- + WiFi Widget + ---------------------------------------------------------------------------- */ +.wifi-widget .widget-container .icon { + font-family: var(--font-icon); + padding-left: var(--space-4); +} + +.wifi-widget .widget-container .label { + color: var(--color-text-secondary); + font-family: var(--font-mono); + font-weight: var(--font-weight-semibold); +} + +*.dark .wifi-widget .widget-container .label { + color: var(--color-dark-text-secondary); +} + +/* Menu Container */ +.wifi-menu { + font-family: var(--font-primary); + background-color: var(--color-background-elevated); + border: 1px solid var(--color-stroke-surface); + border-radius: var(--radius-medium); + min-height: 400px; + max-height: 450px; + min-width: var(--width-menu-lg); + padding: var(--space-8); +} + +*.dark .wifi-menu { + background-color: var(--color-dark-background-elevated); + border: 1px solid var(--color-dark-stroke-surface); +} + +/* Header */ +.wifi-menu .header { + font-size: var(--font-size-subtitle); + font-weight: var(--font-weight-bold); + margin-bottom: var(--space-8); + padding: var(--space-8); + background-color: transparent; + color: var(--color-text-primary); + border-bottom: 1px solid var(--color-stroke-divider); +} + +*.dark .wifi-menu .header { + color: var(--color-dark-text-primary); + border-bottom: 1px solid var(--color-dark-stroke-divider); +} + +/* WiFi List */ +.wifi-menu .wifi-list { + background-color: transparent; + margin: var(--space-2); +} + +/* WiFi Item */ +.wifi-menu .wifi-item { + min-height: var(--height-item-md); + padding: var(--space-4) var(--space-12); + margin: var(--space-2) 0; + border-radius: var(--radius-small); + border: 1px solid transparent; +} + +.wifi-menu .wifi-item:hover { + background-color: var(--color-subtle-fill-hover); + border-color: var(--color-stroke-control-default); +} + +*.dark .wifi-menu .wifi-item:hover { + background-color: var(--color-dark-subtle-fill-hover); + border-color: var(--color-dark-stroke-control-default); +} + +.wifi-menu .wifi-item[active="true"] { + background-color: var(--color-subtle-fill-rest); + border: 1px solid var(--color-accent-default); + min-height: var(--height-item-lg); +} + +*.dark .wifi-menu .wifi-item[active="true"] { + background-color: var(--color-dark-subtle-fill-rest); + border: 1px solid var(--color-dark-accent-default); +} + +/* Item Text & Icons */ +.wifi-menu .wifi-item .icon { + font-family: var(--font-icon); + font-size: var(--font-size-title); + margin-right: var(--space-12); + color: var(--color-text-secondary); +} + +*.dark .wifi-menu .wifi-item .icon { + color: var(--color-dark-text-secondary); +} + +.wifi-menu .wifi-item .name { + font-size: var(--font-size-body-strong); + font-weight: var(--font-weight-semibold); + color: var(--color-text-primary); +} + +*.dark .wifi-menu .wifi-item .name { + color: var(--color-dark-text-primary); +} + +.wifi-menu .wifi-item .status { + font-size: var(--font-size-caption); + color: var(--color-text-tertiary); +} + +*.dark .wifi-menu .wifi-item .status { + color: var(--color-dark-text-tertiary); +} + +/* Connect Button */ +.wifi-menu .wifi-item .connect { + background-color: var(--color-accent-default); + color: white; + padding: var(--space-4) var(--space-16); + border-radius: var(--radius-small); + border: none; + font-weight: var(--font-weight-semibold); + margin-top: var(--space-8); +} + +*.dark .wifi-menu .wifi-item .connect { + background-color: var(--color-dark-accent-default); + color: black; +} + +.wifi-menu .wifi-item .connect:hover { + background-color: var(--color-accent-secondary); +} + +/* Footer */ +.wifi-menu .footer { + font-size: var(--font-size-caption); + padding: var(--space-8); + margin-top: var(--space-8); + color: var(--color-text-tertiary); + background-color: transparent; + border-top: 1px solid var(--color-stroke-divider); + display: flex; + justify-content: space-between; +} + +*.dark .wifi-menu .footer { + color: var(--color-dark-text-tertiary); + border-top: 1px solid var(--color-dark-stroke-divider); +} + +.wifi-menu .footer .refresh-icon { + font-family: var(--font-icon); + background-color: transparent; + border: none; + font-size: var(--font-size-subtitle); + color: var(--color-text-primary); +} + +*.dark .wifi-menu .footer .refresh-icon { + color: var(--color-dark-text-primary); +} + +.wifi-menu .footer .refresh-icon:hover { + color: var(--color-accent-default); +} + +/* ---------------------------------------------------------------------------- + Bluetooth Widget + ---------------------------------------------------------------------------- */ +.bluetooth-widget .widget-container .icon { + font-family: var(--font-icon); + font-size: var(--font-size-body); + padding-left: var(--space-4); +} + +.bluetooth-widget .widget-container .label { + color: var(--color-text-secondary); + font-family: var(--font-text); + font-weight: var(--font-weight-semibold); +} + +*.dark .bluetooth-widget .widget-container .label { + color: var(--color-dark-text-secondary); +} + +/* --- Bluetooth States --- */ + +/* OFF */ +.bluetooth-widget.bluetooth-off .widget-container .icon { + color: var(--color-text-disabled); +} +*.dark .bluetooth-widget.bluetooth-off .widget-container .icon { + color: var(--color-dark-text-disabled); +} + +/* ON */ +.bluetooth-widget.bluetooth-on .widget-container .icon { + color: var(--color-accent-default); +} +*.dark .bluetooth-widget.bluetooth-on .widget-container .icon { + color: var(--color-dark-accent-default); +} + +/* CONNECTED */ +.bluetooth-widget.bluetooth-connected .widget-container .icon { + color: var(--color-accent-default); +} +.bluetooth-widget.bluetooth-connected .widget-container .label { + color: var(--color-text-primary); +} + +*.dark .bluetooth-widget.bluetooth-connected .widget-container .icon { + color: var(--color-dark-accent-default); +} +*.dark .bluetooth-widget.bluetooth-connected .widget-container .label { + color: var(--color-dark-text-primary); +} + +/* ---------------------------------------------------------------------------- + Battery Widget + ---------------------------------------------------------------------------- */ +.battery-widget .widget-container .icon { + font-family: var(--font-icon); + font-size: var(--font-size-body); + padding-left: var(--space-4); +} + +.battery-widget .widget-container .label { + color: var(--color-text-secondary); + font-family: var(--font-mono); + font-weight: var(--font-weight-semibold); +} + +*.dark .battery-widget .widget-container .label { + color: var(--color-dark-text-secondary); +} + +/* --- Battery States --- */ + +/* Critical (Red) */ +.battery-widget .widget-container .icon.status-critical { + color: var(--color-error); +} +*.dark .battery-widget .widget-container .icon.status-critical { + color: var(--color-dark-error); +} + +/* Low (Orange/Warning) */ +.battery-widget .widget-container .icon.status-low { + color: var(--color-warning); +} +*.dark .battery-widget .widget-container .icon.status-low { + color: var(--color-dark-warning); +} + +/* Medium (Standard Text Color) */ +.battery-widget .widget-container .icon.status-medium { + color: var(--color-text-secondary); +} +*.dark .battery-widget .widget-container .icon.status-medium { + color: var(--color-dark-text-secondary); +} + +/* High/Full (Green) */ +.battery-widget .widget-container .icon.status-high, +.battery-widget .widget-container .icon.status-full { + color: var(--color-success); +} +*.dark .battery-widget .widget-container .icon.status-high, +*.dark .battery-widget .widget-container .icon.status-full { + color: var(--color-dark-success); +} + +/* Charging (Accent Blue) */ +.battery-widget .widget-container .icon.status-charging { + color: var(--color-accent-default); +} +*.dark .battery-widget .widget-container .icon.status-charging { + color: var(--color-dark-accent-default); +} + +/* Charging Animation */ +@keyframes blink { + 0% { + opacity: 1; + } + 50% { + opacity: 0.4; + } + 100% { + opacity: 1; + } +} + +.battery-widget .widget-container .icon.status-charging.blink { + animation: blink 2s infinite ease-in-out; +} + +/* ---------------------------------------------------------------------------- + Clock Widget + ---------------------------------------------------------------------------- */ +.clock-widget .widget-container { + background-color: transparent; + border: transparent; +} + +.clock-widget .widget-container .icon { + margin-right: var(--space-8); + padding-left: var(--space-4); +} + +.clock-widget .label { + font-family: var(--font-text); + font-size: var(--font-size-body-strong); + font-weight: var(--font-weight-regular); +} + +/* ---------------------------------------------------------------------------- + Calendar Flyout + ---------------------------------------------------------------------------- */ +.calendar { + padding: var(--space-12); + border: 1px solid var(--color-stroke-surface); + border-radius: var(--radius-medium); + background-color: var(--color-background-elevated); +} + +*.dark .calendar { + border: 1px solid var(--color-dark-stroke-surface); + background-color: var(--color-dark-background-elevated); +} + +.calendar .calendar-table::item:selected { + background-color: var(--color-accent-default); + color: var(--color-background-base); + border-radius: var(--radius-small); +} + +*.dark .calendar .calendar-table::item:selected { + background-color: var(--color-dark-accent-default); + color: var(--color-dark-background-base); +} + +.calendar .day-label, +.calendar .month-label, +.calendar .date-label { + font-family: var(--font-primary); + color: var(--color-text-primary); + min-width: var(--width-menu-sm); + max-width: var(--width-menu-sm); +} + +*.dark .calendar .day-label, +*.dark .calendar .month-label, +*.dark .calendar .date-label { + color: var(--color-dark-text-primary); +} + +.calendar .month-label { + font-size: var(--font-size-body-strong); + font-weight: var(--font-weight-semibold); + margin-top: var(--space-16); +} + +.calendar .day-label { + font-size: var(--font-size-subtitle); + font-weight: var(--font-weight-semibold); + margin-top: var(--space-8); +} + +.calendar .date-label { + font-size: var(--font-size-display); + font-weight: var(--font-weight-bold); + margin-top: -var(--space-8); +} + +/* ---------------------------------------------------------------------------- + Weather Widget + ---------------------------------------------------------------------------- */ +.weather-widget .widget-container { + background-color: transparent; + border: transparent; +} + +.weather-widget .widget-container .icon { + margin-right: var(--space-8); + padding-left: var(--space-4); +} + +.weather-widget .label { + font-family: var(--font-text); + font-size: var(--font-size-body-strong); + font-weight: var(--font-weight-regular); +} + +/* ---------------------------------------------------------------------------- + Power Menu Widget + ---------------------------------------------------------------------------- */ +.power-menu-widget .widget-container { + background-color: transparent; + border: 0; +} + +.power-menu-widget .widget-container:hover { + background-color: transparent; +} + +.power-menu-widget .label { + font-family: var(--font-icon); + font-size: var(--font-size-body); + color: var(--color-dark-error); + font-weight: var(--font-weight-semibold); +} + +*.dark .power-menu-widget .label { + color: var(--color-dark-error); +} + +.power-menu-widget .label:hover { + color: var(--color-accent-default); +} + +*.dark .power-menu-widget .label:hover { + color: var(--color-dark-accent-default); +} + +.power-menu-popup { + border-radius: var(--radius-large); + border: 1px solid var(--color-dark-stroke-surface); + padding: var(--space-12); +} + +.power-menu-popup .button { + width: var(--width-menu-sm); + height: var(--height-item-lg); + padding: var(--space-12); + margin: var(--space-4); + + background-color: var(--color-dark-subtle-fill-rest); + border: 1px solid var(--color-dark-stroke-control-default); + border-radius: var(--radius-medium); + + color: var(--color-dark-text-primary); + font-family: var(--font-primary); + + cursor: pointer; +} + +.power-menu-popup .button:hover, +.power-menu-popup .button.hover { + background-color: var(--color-dark-subtle-fill-hover); + border-color: var(--color-dark-stroke-focus); +} + +.power-menu-popup .button:active { + background-color: var(--color-dark-subtle-fill-pressed); +} + +.power-menu-popup .button .label { + font-size: var(--font-size-body-strong); + font-weight: var(--font-weight-semibold); + color: var(--color-dark-text-primary); + margin-bottom: var(--space-4); +} +.power-menu-popup .button .icon { + font-size: var(--font-size-icon-large); + color: var(--color-dark-text-tertiary); + margin-top: var(--space-12); +} + +.power-menu-popup .button.shutdown .icon { + font-family: var(--font-icon); + color: var(--color-dark-accent-default); +} + +.power-menu-popup .button.cancel .icon { + color: var(--color-dark-error); +} + +.uptime { + font-size: var(--font-size-subtitle); + font-weight: var(--font-weight-semibold); + color: var(--color-dark-text-primary); + margin-bottom: var(--space-8); +}