diff --git a/.github/assets/2025-01-26T21:52:48,481278761+11:00.png b/.github/assets/2025-01-26T21:52:48,481278761+11:00.png new file mode 100644 index 0000000..4b64ffa Binary files /dev/null and b/.github/assets/2025-01-26T21:52:48,481278761+11:00.png differ diff --git a/.github/workflows/cachix.yaml b/.github/workflows/cachix.yaml new file mode 100644 index 0000000..ad7d8ad --- /dev/null +++ b/.github/workflows/cachix.yaml @@ -0,0 +1,47 @@ +name: "Build packages and push to cache" +on: + workflow_dispatch: + push: + paths: + - outputs/pkgs/** + - flake.lock + branches: + - main +concurrency: + group: ooknet-cache-${{ github.ref }} + cancel-in-progress: true +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + package: + - ook-vim + - live-buds-cli + - caddy-with-cloudflare + - fpp-config + - fpp-launcher + - fpp-sd + - project-plus + - repomix + - website + - wii-u-gc-adapter + - spotify-player + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Configure git + run: git config --global url."https://github.com/".insteadOf "git@github.com:" + - name: Setup Nix + uses: DeterminateSystems/nix-installer-action@main + - name: Magic Nix Cache + uses: DeterminateSystems/magic-nix-cache-action@main + - name: Setup Cachix + uses: cachix/cachix-action@v15 + with: + name: ooknet + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + extraPullNames: nix-community + - name: Build packages + run: nix build .#${{ matrix.package }} --print-build-logs + continue-on-error: true diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..8c1c92e --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,47 @@ +name: "Nix Flake Check" +on: + workflow_dispatch: + push: + branches: + - main + paths-ignore: + - .github/** + - README.md + - .repomixignore + - repomix.config.json + - .gitignore +concurrency: + group: ooknet-check-${{ github.ref }} + cancel-in-progress: true +jobs: + check-format: + name: Check Formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + - run: nix run nixpkgs#alejandra -- --check . + + check-dead-code: + name: Check Dead Code + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + - uses: cachix/cachix-action@v15 + with: + name: deadnix + - uses: astro/deadnix-action@main + + check-flake: + name: Check Flake + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.KUNZEN_DEPLOY_KEY }} + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - run: nix flake check + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a40c183 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +repodump.xml diff --git a/.repomixignore b/.repomixignore new file mode 100644 index 0000000..221341a --- /dev/null +++ b/.repomixignore @@ -0,0 +1,5 @@ +*.lock +**/equicord/options.nix +**/gruv.nix +.repomixignore +repomix* diff --git a/README.md b/README.md new file mode 100644 index 0000000..f26b6b0 --- /dev/null +++ b/README.md @@ -0,0 +1,152 @@ +

ooknet

+

A monorepo for all my nix expressions powered by flake-parts.

+ +## Overview + +This repository serves two main purposes: + +1. To serve as a centralized location for all my personal computing + infrastructure +2. To provide a place to experiment and learn about networking, administration, + security, unix, design, and programming + +> [!WARNING] +> This repository is not intended to be used by anyone but myself. It is highly +> personalized and likely doesn't fit anyone else's needs. I leave this +> repository public to serve as a reference for anyone else building something +> similar. + +## Features + +- NixOS configurations for all my hosts +- Home-manager configuration for my workstations +- Custom packages +- Development environments +- Declarative secrets with agenix +- Personal website +- Templates for bootstrapping projects + +## Fleet + +Below are all the hosts I currently maintain within this flake: + +| host | spec | role | description | architecture | status | +| --------- | ------------------------------------- | ----------- | --------------------------------- | ------------ | ------ | +| ooksdesk | 7500F / RX5700XT / 32 GB DDR5 | Workstation | Primary desktop workstation | x86_64-linux | UP | +| ookst480s | T480s / i5-8350U / 24 GB DDR4 | Workstation | Primary mobile workstation | x86_64-linux | UP | +| ooksmicro | GPD Micro PC / N8100 / 8 GB LPDR3 | Workstation | Pocket workstation | x86_64-linux | UP | +| ooksmedia | i3-10100 / 1650 Super / 8 GB DDR4 | Server | Homelab/Media server | x86_64-linux | UP | +| ooksx1 | X1 Carbon G4 / i5 6200U / 8 GB LPDDR3 | Workstation | Alternative mobile workstation | x86_64-linux | DOWN | +| ooknode | Linode Nanode | Server | VPS for website | x86_64-linux | UP | +| ooksphone | Termux | Workstation | Nix environment for android phone | x86_64-linux | DOWN | + +## Architecture + +As this project serves as a learning environment, its architecture changes +frequently. While I'll try to keep this documentation current, what follows is a +high-level overview of the current design. + +One of the main goals of this project was to allow for easy bootstrapping of new +hosts while maintaining fine-grained configuration on a per-host basis. This is +accomplished using a roles and profiles pattern (similar to +[Puppet's roles and profiles method](https://www.puppet.com/docs/puppet/7/the_roles_and_profiles_method.html)). + +#### Roles + +- **Workstation**: Desktop/laptop systems with GUI environment +- **Server**: Headless systems running specific services + +Roles are declared via their own respective helper functions `mkWorkstation` and +`mkServer`. Both being simple wrappers of +[`lib.nixosSystem`](https://github.com/NixOS/nixpkgs/blob/e5db80ae487b59b4e9f950d68983ffb0575e26c6/flake.nix#L21) +(also see [`lib.evalModules`](https://noogle.dev/f/lib/evalModules)). These +functions serve to abstract the boilerplate, leaving a simple interface for +declaring hosts. + +Example: + +```nix +flake.nixosConfigurations = { + ookst480s = mkWorkstation { + inherit withSystem; + system = "x86_64-linux"; + hostname = "ookst480s"; + type = "laptop"; + }; + ooknode = mkServer { + inherit withSystem; + system = "x86_64-linux"; + hostname = "ooknode"; + domain = "ooknet.org"; + type = "vm"; + profile = "linode"; + services = ["website" "forgejo"]; + }; +}; +``` + +#### Profiles + +Profiles are collections of related software and configurations that can be +enabled on a per-host basis. Here are some example profiles for workstations: + +- `gaming`: Steam & emulators +- `communication`: Discord, Teams, Matrix +- `productivity`: Document editing, note-taking +- `creative`: Art and design tools +- `media`: Audio/video playback and management +- `virtualization`: Virtual machine support + +Example configuration: + +```nix +ooknet.workstation.profiles = ["gaming" "creative" "media"]; +``` + +For servers, profiles are defined as services. For example: + +- `ookflix`: Media server services +- `forgjo`: Git server +- `website`: My static website + +```nix +ooknet.server.services = ["ookflix"]; +``` + +## Desktop environment + + +All workstations currently run a minimal wayland configuration made from a few +components: + +- [Hyprland](https://github.com/hyprwm/Hyprland) +- Hypr* ware ([hypridle](https://github.com/hyprwm/hypridle), + [hyprlock](https://github.com/hyprwm/hyprlock), + [hyprpaper](https://github.com/hyprwm/hyprpaper)) +- [Waybar](https://github.com/Alexays/Waybar) +- [Mako](https://github.com/emersion/mako) +- [Gruvbox extended](https://github.com/ooks-io/ooknet/blob/main/outputs/hozen/default.nix) + +## Appreciation + +I want to give some appreciation to the many people/resources who have helped in +some way to build this project. + +### People + +- [ghuntley](https://github.com/ghuntley) +- [NobbZ](https://github.com/NobbZ) +- [notashelf](https://github.com/NotAShelf) +- [mic92](https://github.com/Mic92) +- [fabaff](https://github.com/fabaff) +- [gerg-l](https://github.com/Gerg-L) +- [viperML](https://github.com/viperML) +- [colemickens](https://github.com/colemickens) +- [fufexan](https://github.com/fufexan) +- [max-privatevoid](https://github.com/max-privatevoid) + +### Resources + +- [nix.dev](https://nix.dev/) +- [noogle](https://noogle.dev/) +- [nix-pills](https://nixos.org/guides/nix-pills/) diff --git a/flake.lock b/flake.lock index 3c92d63..ae6f9b1 100644 --- a/flake.lock +++ b/flake.lock @@ -3,16 +3,19 @@ "agenix": { "inputs": { "darwin": "darwin", - "home-manager": "home-manager", - "nixpkgs": "nixpkgs", + "home-manager": "home-manager_2", + "nixpkgs": [ + "secrets", + "nixpkgs" + ], "systems": "systems" }, "locked": { - "lastModified": 1723293904, - "narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=", + "lastModified": 1736955230, + "narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=", "owner": "ryantm", "repo": "agenix", - "rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41", + "rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c", "type": "github" }, "original": { @@ -21,6 +24,31 @@ "type": "github" } }, + "agenix-rekey": { + "inputs": { + "devshell": "devshell", + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "secrets", + "nixpkgs" + ], + "pre-commit-hooks": "pre-commit-hooks_2", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1737124467, + "narHash": "sha256-askwM5GDYo4xy/UARNXUvn7lKERyNp31BcES/t4Ki2Y=", + "owner": "oddlama", + "repo": "agenix-rekey", + "rev": "27c5fc5b763321054832d0c96a9259d849b2f58a", + "type": "github" + }, + "original": { + "owner": "oddlama", + "repo": "agenix-rekey", + "type": "github" + } + }, "aquamarine": { "inputs": { "hyprutils": [ @@ -41,11 +69,11 @@ ] }, "locked": { - "lastModified": 1729527199, - "narHash": "sha256-D5/YksfRga8Akd04ZtIkuYSIOjXVrAzQIQBSeplokzU=", + "lastModified": 1737636397, + "narHash": "sha256-F5MbBj3QVorycVSFE9qjuOTLtIQBqt2VWbXa0uwzm98=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "8d732fa8aff8b12ef2b1e2f00fc8153e41312b72", + "rev": "7fe006981fae53e931f513026fc754e322f13145", "type": "github" }, "original": { @@ -56,11 +84,11 @@ }, "crane": { "locked": { - "lastModified": 1727974419, - "narHash": "sha256-WD0//20h+2/yPGkO88d2nYbb23WMWYvnRyDQ9Dx4UHg=", + "lastModified": 1736898272, + "narHash": "sha256-D10wlrU/HCpSRcb3a7yk+bU3ggpMD1kGbseKtO+7teo=", "owner": "ipetkov", "repo": "crane", - "rev": "37e4f9f0976cb9281cd3f0c70081e5e0ecaee93f", + "rev": "6a589f034202a7c6e10bce6c5d1d392d7bc0f340", "type": "github" }, "original": { @@ -72,6 +100,7 @@ "darwin": { "inputs": { "nixpkgs": [ + "secrets", "agenix", "nixpkgs" ] @@ -91,6 +120,28 @@ "type": "github" } }, + "devshell": { + "inputs": { + "nixpkgs": [ + "secrets", + "agenix-rekey", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728330715, + "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", + "owner": "numtide", + "repo": "devshell", + "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "firefox-addons": { "inputs": { "flake-utils": "flake-utils", @@ -100,11 +151,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1730013417, - "narHash": "sha256-nZ6ylS3/FAjsi9wwdZJpzIV0+bgJDAurZAi0w9q1Nxw=", + "lastModified": 1737864207, + "narHash": "sha256-pmww5SaFlgqYxgzAZ5He/LWMLFWyh37kebwLHBDNvQk=", "owner": "rycee", "repo": "nur-expressions", - "rev": "e9ec8d2766bbe4d242c9255247197372ac64f885", + "rev": "6770d28ffd09fee64fcded7b9f1cbeaf2883a9f6", "type": "gitlab" }, "original": { @@ -130,16 +181,32 @@ "type": "github" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "lastModified": 1736143030, + "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de", "type": "github" }, "original": { @@ -150,32 +217,18 @@ }, "flake-parts_2": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" + "nixpkgs-lib": [ + "secrets", + "agenix-rekey", + "nixpkgs" + ] }, "locked": { - "lastModified": 1715865404, - "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_3": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib_3" - }, - "locked": { - "lastModified": 1726153070, - "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -201,14 +254,16 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_3" + "systems": [ + "systems" + ] }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -219,14 +274,14 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_7" + "systems": "systems_3" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -257,19 +312,41 @@ "type": "github" } }, - "home-manager": { + "gitignore_2": { "inputs": { "nixpkgs": [ - "agenix", + "secrets", + "agenix-rekey", + "pre-commit-hooks", "nixpkgs" ] }, "locked": { - "lastModified": 1703113217, - "narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737762889, + "narHash": "sha256-5HGG09bh/Yx0JA8wtBMAzt0HMCL1bYZ93x4IqzVExio=", "owner": "nix-community", "repo": "home-manager", - "rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", + "rev": "daf04c5950b676f47a794300657f1d3d14c1a120", "type": "github" }, "original": { @@ -281,15 +358,17 @@ "home-manager_2": { "inputs": { "nixpkgs": [ + "secrets", + "agenix", "nixpkgs" ] }, "locked": { - "lastModified": 1730016908, - "narHash": "sha256-bFCxJco7d8IgmjfNExNz9knP8wvwbXU4s/d53KOK6U0=", + "lastModified": 1703113217, + "narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", "owner": "nix-community", "repo": "home-manager", - "rev": "e83414058edd339148dc142a8437edb9450574c8", + "rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", "type": "github" }, "original": { @@ -314,11 +393,11 @@ ] }, "locked": { - "lastModified": 1728669738, - "narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=", + "lastModified": 1737634937, + "narHash": "sha256-Ffw4ujFpi++6pPHe+gCBOfDgAoNlzVPZN6MReC1beu8=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "0264e698149fcb857a66a53018157b41f8d97bb0", + "rev": "9c5dd1f7c825ee47f72727ad0a4e16ca46a2688e", "type": "github" }, "original": { @@ -327,6 +406,93 @@ "type": "github" } }, + "hyprgraphics": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1737634889, + "narHash": "sha256-9JZE3KxcXOqZH9zs3UeadngDiK/yIACTiAR8HSA/TNI=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "0d77b4895ad5f1bb3b0ee43103a5246c58b65591", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, + "hyprgraphics_2": { + "inputs": { + "hyprutils": [ + "hyprlock", + "hyprutils" + ], + "nixpkgs": [ + "hyprlock", + "nixpkgs" + ], + "systems": [ + "hyprlock", + "systems" + ] + }, + "locked": { + "lastModified": 1737634889, + "narHash": "sha256-9JZE3KxcXOqZH9zs3UeadngDiK/yIACTiAR8HSA/TNI=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "0d77b4895ad5f1bb3b0ee43103a5246c58b65591", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, + "hyprgraphics_3": { + "inputs": { + "hyprutils": [ + "hyprpaper", + "hyprutils" + ], + "nixpkgs": [ + "hyprpaper", + "nixpkgs" + ], + "systems": [ + "hyprpaper", + "systems" + ] + }, + "locked": { + "lastModified": 1737634889, + "narHash": "sha256-9JZE3KxcXOqZH9zs3UeadngDiK/yIACTiAR8HSA/TNI=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "0d77b4895ad5f1bb3b0ee43103a5246c58b65591", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, "hypridle": { "inputs": { "hyprlang": [ @@ -347,11 +513,11 @@ ] }, "locked": { - "lastModified": 1729679960, - "narHash": "sha256-RoFKwZsx4RHKUwO8LhEZtmI08VBVrWt3TdzoJgx1HJ0=", + "lastModified": 1737635556, + "narHash": "sha256-Ahb+xhd80dlzgRSICthPktiDcvi+DqDtHP+YX0TrSdE=", "owner": "hyprwm", "repo": "hypridle", - "rev": "4d2fb9e73eb6b75336ed3eb198e900f94ada24f4", + "rev": "33ac8cae64226d3a0b63ebf77a22455807895455", "type": "github" }, "original": { @@ -364,21 +530,25 @@ "inputs": { "aquamarine": "aquamarine", "hyprcursor": "hyprcursor", + "hyprgraphics": "hyprgraphics", "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang", - "hyprutils": "hyprutils", + "hyprland-qtutils": "hyprland-qtutils", + "hyprlang": "hyprlang_2", + "hyprutils": "hyprutils_2", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems_2", + "systems": [ + "systems" + ], "xdph": "xdph" }, "locked": { - "lastModified": 1730054738, - "narHash": "sha256-xU5DxVMZXFLcypIo6PvrLRI0+74kOrFTdEykDDEaEkQ=", + "lastModified": 1737842278, + "narHash": "sha256-5N0ExKra/jw3HI/0EEIzmeJKHN9RIBV7ceR/sxQR11s=", "owner": "hyprwm", "repo": "hyprland", - "rev": "5d4b54b01286c10d4b6bf402a772b5938b054ce6", + "rev": "8b1d6e3009c540457068e23e6c2bc201d20ce4d1", "type": "github" }, "original": { @@ -395,11 +565,11 @@ ] }, "locked": { - "lastModified": 1729224425, - "narHash": "sha256-w9dNUedNe2qnhHuhcRf7A1l29+/6DxdMfwN6g4U3c/w=", + "lastModified": 1737834765, + "narHash": "sha256-xiThQfn7aCcV8+aQ8qdIornefqRATY6/H+3qqyiiUbQ=", "owner": "hyprwm", "repo": "contrib", - "rev": "d72bc8b1cd30d448bd438e8328f8eeb4c0f2ddb6", + "rev": "296740785d25b5fe19cce4978050dc5dc704876a", "type": "github" }, "original": { @@ -425,11 +595,11 @@ ] }, "locked": { - "lastModified": 1729596320, - "narHash": "sha256-sBPr6O2Ad916f+L7biAjmJVx4TLDITC4joKgeOT47V8=", + "lastModified": 1737682243, + "narHash": "sha256-sQh5Wjt+BWzcLmL1/Aaup9slDJfHd952BfxFvJnDsnc=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "4d7f0b5d8b952f31f7d2e29af22ab0a55ca5c219", + "rev": "7634792d199d32ed9396d5864e6431cde1cca6bd", "type": "github" }, "original": { @@ -450,11 +620,11 @@ ] }, "locked": { - "lastModified": 1728345020, - "narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=", + "lastModified": 1737556638, + "narHash": "sha256-laKgI3mr2qz6tas/q3tuGPxMdsGhBi/w+HO+hO2f1AY=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "a7c183800e74f337753de186522b9017a07a8cee", + "rev": "4c75dd5c015c8a0e5a34c6d02a018a650f57feb5", "type": "github" }, "original": { @@ -463,7 +633,95 @@ "type": "github" } }, + "hyprland-qt-support": { + "inputs": { + "hyprlang": "hyprlang", + "nixpkgs": [ + "hyprland", + "hyprland-qtutils", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprland-qtutils", + "systems" + ] + }, + "locked": { + "lastModified": 1737634706, + "narHash": "sha256-nGCibkfsXz7ARx5R+SnisRtMq21IQIhazp6viBU8I/A=", + "owner": "hyprwm", + "repo": "hyprland-qt-support", + "rev": "8810df502cdee755993cb803eba7b23f189db795", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-qt-support", + "type": "github" + } + }, + "hyprland-qtutils": { + "inputs": { + "hyprland-qt-support": "hyprland-qt-support", + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1737811848, + "narHash": "sha256-WZ7LeiKHk5Y94MU5gHIWn0r8asWxYOvie4LqfCjVIZU=", + "owner": "hyprwm", + "repo": "hyprland-qtutils", + "rev": "9c0831ff98856c0f312fcb8b57553fbe3dd34d5b", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-qtutils", + "type": "github" + } + }, "hyprlang": { + "inputs": { + "hyprutils": "hyprutils", + "nixpkgs": [ + "hyprland", + "hyprland-qtutils", + "hyprland-qt-support", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprland-qtutils", + "hyprland-qt-support", + "systems" + ] + }, + "locked": { + "lastModified": 1737634606, + "narHash": "sha256-W7W87Cv6wqZ9PHegI6rH1+ve3zJPiyevMFf0/HwdbCQ=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "f41271d35cc0f370d300413d756c2677f386af9d", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlang_2": { "inputs": { "hyprutils": [ "hyprland", @@ -479,11 +737,11 @@ ] }, "locked": { - "lastModified": 1728168612, - "narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=", + "lastModified": 1737634606, + "narHash": "sha256-W7W87Cv6wqZ9PHegI6rH1+ve3zJPiyevMFf0/HwdbCQ=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e", + "rev": "f41271d35cc0f370d300413d756c2677f386af9d", "type": "github" }, "original": { @@ -494,39 +752,7 @@ }, "hyprlock": { "inputs": { - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1730053985, - "narHash": "sha256-jh7PhejwT+XqkkYnpZ6K/Gkqy4tvjN7g/ZBTvlS+Q9Y=", - "owner": "hyprwm", - "repo": "hyprlock", - "rev": "edbecc87081756b45bdbea16b63e413473659dcd", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlock", - "type": "github" - } - }, - "hyprpaper": { - "inputs": { + "hyprgraphics": "hyprgraphics_2", "hyprlang": [ "hyprland", "hyprlang" @@ -546,11 +772,46 @@ ] }, "locked": { - "lastModified": 1729890887, - "narHash": "sha256-Vg98Dm6MaglEUNNTRgLF2Lxy02FrU5ntnlwsMkBSTKg=", + "lastModified": 1737837801, + "narHash": "sha256-i7nKSo/FGU5Sjq2xM+UFahZHqqrjZn5WUekOZFsjO2w=", + "owner": "hyprwm", + "repo": "hyprlock", + "rev": "e77bc92b99e06ee66ccd684afbfe3a743af1f01d", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlock", + "type": "github" + } + }, + "hyprpaper": { + "inputs": { + "hyprgraphics": "hyprgraphics_3", + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": "hyprwayland-scanner_3", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1737645174, + "narHash": "sha256-pmkJCzjflvsOytiu2mgn2wfSeyL6mTfoi214T4A2OZQ=", "owner": "hyprwm", "repo": "hyprpaper", - "rev": "3f8cc92109209364e9d39789b3631e9ac109987a", + "rev": "7efb4a03464c45bf9fee7b0f428c09462da70a14", "type": "github" }, "original": { @@ -560,6 +821,37 @@ } }, "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprland", + "hyprland-qtutils", + "hyprland-qt-support", + "hyprlang", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprland-qtutils", + "hyprland-qt-support", + "hyprlang", + "systems" + ] + }, + "locked": { + "lastModified": 1737632363, + "narHash": "sha256-X9I8POSlHxBVjD0fiX1O2j7U9Zi1+4rIkrsyHP0uHXY=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "006620eb29d54ea9086538891404c78563d1bae1", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprutils_2": { "inputs": { "nixpkgs": [ "hyprland", @@ -571,11 +863,11 @@ ] }, "locked": { - "lastModified": 1728941256, - "narHash": "sha256-WRypmcZ2Bw94lLmcmxYokVOHPJSZ7T06V49QZ4tkZeQ=", + "lastModified": 1737725508, + "narHash": "sha256-jGmcPc6y/prg/4A8KGYqJ27nSPaProCMiFadaxNAKvA=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "fd4be8b9ca932f7384e454bcd923c5451ef2aa85", + "rev": "fb0c2d1de3d1ef7396d19c18ac09e12bd956929e", "type": "github" }, "original": { @@ -596,11 +888,11 @@ ] }, "locked": { - "lastModified": 1726874836, - "narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=", + "lastModified": 1735493474, + "narHash": "sha256-fktzv4NaqKm94VAkAoVqO/nqQlw+X0/tJJNAeCSfzK4=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "500c81a9e1a76760371049a8d99e008ea77aa59e", + "rev": "de913476b59ee88685fdc018e77b8f6637a2ae0b", "type": "github" }, "original": { @@ -610,6 +902,31 @@ } }, "hyprwayland-scanner_2": { + "inputs": { + "nixpkgs": [ + "hyprlock", + "nixpkgs" + ], + "systems": [ + "hyprlock", + "systems" + ] + }, + "locked": { + "lastModified": 1735493474, + "narHash": "sha256-fktzv4NaqKm94VAkAoVqO/nqQlw+X0/tJJNAeCSfzK4=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "de913476b59ee88685fdc018e77b8f6637a2ae0b", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "hyprwayland-scanner_3": { "inputs": { "nixpkgs": [ "hyprpaper", @@ -621,11 +938,11 @@ ] }, "locked": { - "lastModified": 1721324119, - "narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=", + "lastModified": 1735493474, + "narHash": "sha256-fktzv4NaqKm94VAkAoVqO/nqQlw+X0/tJJNAeCSfzK4=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30", + "rev": "de913476b59ee88685fdc018e77b8f6637a2ae0b", "type": "github" }, "original": { @@ -636,11 +953,11 @@ }, "mnw": { "locked": { - "lastModified": 1726188505, - "narHash": "sha256-3dkxJo6y/aKfwkAg6YnpdiQAoZKgHhWHz7ilGJHCoVU=", + "lastModified": 1735150973, + "narHash": "sha256-OJhcCAoaMMXeD6o4qI/hxBCNELJp4dN8D5LJZc8w8XA=", "owner": "Gerg-L", "repo": "mnw", - "rev": "ea00b3d2162d85dd085a6ba6d49aa2a186e588e7", + "rev": "40cd0b006cc48dffd0f8698ad7f54cf1d56779a6", "type": "github" }, "original": { @@ -649,28 +966,6 @@ "type": "github" } }, - "naersk": { - "inputs": { - "nixpkgs": [ - "nvf", - "rnix-lsp", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1655042882, - "narHash": "sha256-9BX8Fuez5YJlN7cdPO63InoyBy7dm3VlJkkmTt6fS1A=", - "owner": "nix-community", - "repo": "naersk", - "rev": "cddffb5aa211f50c4b8750adbec0bbbdfb26bb9f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "naersk", - "type": "github" - } - }, "nil": { "inputs": { "flake-utils": [ @@ -684,11 +979,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1714571717, - "narHash": "sha256-o4tqlTzi9kcVub167kTGXgCac9jM3kW4+v9MH/ue4Hk=", + "lastModified": 1732053863, + "narHash": "sha256-DCIVdlb81Fct2uwzbtnawLBC/U03U2hqx8trqTJB7WA=", "owner": "oxalica", "repo": "nil", - "rev": "2f3ed6348bbf1440fcd1ab0411271497a0fbbfa4", + "rev": "2e24c9834e3bb5aa2a3701d3713b43a6fb106362", "type": "github" }, "original": { @@ -697,21 +992,6 @@ "type": "github" } }, - "nix-filter": { - "locked": { - "lastModified": 1710156097, - "narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=", - "owner": "numtide", - "repo": "nix-filter", - "rev": "3342559a24e85fc164b295c3444e8a139924675b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "nix-filter", - "type": "github" - } - }, "nix-index-db": { "inputs": { "nixpkgs": [ @@ -719,11 +999,11 @@ ] }, "locked": { - "lastModified": 1729999765, - "narHash": "sha256-LYsavZXitFjjyETZoij8usXjTa7fa9AIF3Sk3MJSX+Y=", + "lastModified": 1737861961, + "narHash": "sha256-LIRtMvAwLGb8pBoamzgEF67oKlNPz4LuXiRPVZf+TpE=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "0e3a8778c2ee218eff8de6aacf3d2fa6c33b2d4f", + "rev": "79b7b8eae3243fc5aa9aad34ba6b9bbb2266f523", "type": "github" }, "original": { @@ -734,11 +1014,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", + "lastModified": 1737632463, + "narHash": "sha256-38J9QfeGSej341ouwzqf77WIHAScihAKCt8PQJ+NH28=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", + "rev": "0aa475546ed21629c4f5bbf90e38c846a99ec9e9", "type": "github" }, "original": { @@ -750,63 +1030,23 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1727825735, - "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", + "lastModified": 1735774519, + "narHash": "sha256-CewEm1o2eVAnoqb6Ml+Qi9Gg/EfNAxbRx1lANGVyoLI=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" - } - }, - "nixpkgs-lib_2": { - "locked": { - "lastModified": 1714640452, - "narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" - } - }, - "nixpkgs-lib_3": { - "locked": { - "lastModified": 1725233747, - "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1720386169, - "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", - "type": "github" + "url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz" } }, "nixpkgs_2": { "locked": { - "lastModified": 1729413321, - "narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=", + "lastModified": 1737885589, + "narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1997e4aa514312c1af7e2bda7fad1644e778ff26", + "rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8", "type": "github" }, "original": { @@ -816,70 +1056,6 @@ "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1729880355, - "narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1726871744, - "narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "a1d92660c6b3b7c26fb883500a80ea9d33321be2", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1656753965, - "narHash": "sha256-BCrB3l0qpJokOnIVc3g2lHiGhnjUi0MoXiw6t1o8H1E=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "0ea7a8f1b939d74e5df8af9a8f7342097cdf69eb", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { - "locked": { - "lastModified": 1728061008, - "narHash": "sha256-qjyJDtwmJckqDyXHmBIiN04kzby/TX/kPYmclBXlROA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "8bca501bf31b54ae2022fe5065ab475d75f7560e", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nmd": { "flake": false, "locked": { @@ -898,12 +1074,19 @@ }, "nvf": { "inputs": { - "flake-parts": "flake-parts_2", - "flake-utils": "flake-utils_2", + "flake-parts": [ + "flake-parts" + ], + "flake-utils": [ + "flake-utils" + ], "mnw": "mnw", "nil": "nil", - "nixpkgs": "nixpkgs_4", + "nixpkgs": [ + "nixpkgs" + ], "nmd": "nmd", + "plugin-aerial-nvim": "plugin-aerial-nvim", "plugin-alpha-nvim": "plugin-alpha-nvim", "plugin-base16": "plugin-base16", "plugin-bufdelete-nvim": "plugin-bufdelete-nvim", @@ -923,6 +1106,7 @@ "plugin-copilot-cmp": "plugin-copilot-cmp", "plugin-copilot-lua": "plugin-copilot-lua", "plugin-crates-nvim": "plugin-crates-nvim", + "plugin-csharpls-extended": "plugin-csharpls-extended", "plugin-dashboard-nvim": "plugin-dashboard-nvim", "plugin-diffview-nvim": "plugin-diffview-nvim", "plugin-dracula": "plugin-dracula", @@ -932,10 +1116,12 @@ "plugin-fidget-nvim": "plugin-fidget-nvim", "plugin-flutter-tools": "plugin-flutter-tools", "plugin-friendly-snippets": "plugin-friendly-snippets", + "plugin-fzf-lua": "plugin-fzf-lua", "plugin-gesture-nvim": "plugin-gesture-nvim", "plugin-gitsigns-nvim": "plugin-gitsigns-nvim", "plugin-glow-nvim": "plugin-glow-nvim", "plugin-gruvbox": "plugin-gruvbox", + "plugin-haskell-tools-nvim": "plugin-haskell-tools-nvim", "plugin-highlight-undo": "plugin-highlight-undo", "plugin-hop-nvim": "plugin-hop-nvim", "plugin-icon-picker-nvim": "plugin-icon-picker-nvim", @@ -949,7 +1135,49 @@ "plugin-lua-utils-nvim": "plugin-lua-utils-nvim", "plugin-lualine": "plugin-lualine", "plugin-luasnip": "plugin-luasnip", + "plugin-lz-n": "plugin-lz-n", + "plugin-lzn-auto-require": "plugin-lzn-auto-require", "plugin-mind-nvim": "plugin-mind-nvim", + "plugin-mini-ai": "plugin-mini-ai", + "plugin-mini-align": "plugin-mini-align", + "plugin-mini-animate": "plugin-mini-animate", + "plugin-mini-base16": "plugin-mini-base16", + "plugin-mini-basics": "plugin-mini-basics", + "plugin-mini-bracketed": "plugin-mini-bracketed", + "plugin-mini-bufremove": "plugin-mini-bufremove", + "plugin-mini-clue": "plugin-mini-clue", + "plugin-mini-colors": "plugin-mini-colors", + "plugin-mini-comment": "plugin-mini-comment", + "plugin-mini-completion": "plugin-mini-completion", + "plugin-mini-diff": "plugin-mini-diff", + "plugin-mini-doc": "plugin-mini-doc", + "plugin-mini-extra": "plugin-mini-extra", + "plugin-mini-files": "plugin-mini-files", + "plugin-mini-fuzzy": "plugin-mini-fuzzy", + "plugin-mini-git": "plugin-mini-git", + "plugin-mini-hipatterns": "plugin-mini-hipatterns", + "plugin-mini-hues": "plugin-mini-hues", + "plugin-mini-icons": "plugin-mini-icons", + "plugin-mini-indentscope": "plugin-mini-indentscope", + "plugin-mini-jump": "plugin-mini-jump", + "plugin-mini-jump2d": "plugin-mini-jump2d", + "plugin-mini-map": "plugin-mini-map", + "plugin-mini-misc": "plugin-mini-misc", + "plugin-mini-move": "plugin-mini-move", + "plugin-mini-notify": "plugin-mini-notify", + "plugin-mini-operators": "plugin-mini-operators", + "plugin-mini-pairs": "plugin-mini-pairs", + "plugin-mini-pick": "plugin-mini-pick", + "plugin-mini-sessions": "plugin-mini-sessions", + "plugin-mini-snippets": "plugin-mini-snippets", + "plugin-mini-splitjoin": "plugin-mini-splitjoin", + "plugin-mini-starter": "plugin-mini-starter", + "plugin-mini-statusline": "plugin-mini-statusline", + "plugin-mini-surround": "plugin-mini-surround", + "plugin-mini-tabline": "plugin-mini-tabline", + "plugin-mini-test": "plugin-mini-test", + "plugin-mini-trailspace": "plugin-mini-trailspace", + "plugin-mini-visits": "plugin-mini-visits", "plugin-minimap-vim": "plugin-minimap-vim", "plugin-modes-nvim": "plugin-modes-nvim", "plugin-neo-tree-nvim": "plugin-neo-tree-nvim", @@ -960,6 +1188,7 @@ "plugin-new-file-template-nvim": "plugin-new-file-template-nvim", "plugin-noice-nvim": "plugin-noice-nvim", "plugin-none-ls": "plugin-none-ls", + "plugin-nord": "plugin-nord", "plugin-nui-nvim": "plugin-nui-nvim", "plugin-nvim-autopairs": "plugin-nvim-autopairs", "plugin-nvim-bufferline-lua": "plugin-nvim-bufferline-lua", @@ -978,33 +1207,43 @@ "plugin-nvim-neoclip": "plugin-nvim-neoclip", "plugin-nvim-nio": "plugin-nvim-nio", "plugin-nvim-notify": "plugin-nvim-notify", + "plugin-nvim-scrollbar": "plugin-nvim-scrollbar", "plugin-nvim-session-manager": "plugin-nvim-session-manager", "plugin-nvim-surround": "plugin-nvim-surround", "plugin-nvim-tree-lua": "plugin-nvim-tree-lua", "plugin-nvim-treesitter-context": "plugin-nvim-treesitter-context", "plugin-nvim-ts-autotag": "plugin-nvim-ts-autotag", + "plugin-nvim-ufo": "plugin-nvim-ufo", "plugin-nvim-web-devicons": "plugin-nvim-web-devicons", "plugin-obsidian-nvim": "plugin-obsidian-nvim", + "plugin-omnisharp-extended": "plugin-omnisharp-extended", "plugin-onedark": "plugin-onedark", "plugin-orgmode-nvim": "plugin-orgmode-nvim", "plugin-otter-nvim": "plugin-otter-nvim", "plugin-oxocarbon": "plugin-oxocarbon", "plugin-pathlib-nvim": "plugin-pathlib-nvim", "plugin-plenary-nvim": "plugin-plenary-nvim", + "plugin-precognition-nvim": "plugin-precognition-nvim", "plugin-project-nvim": "plugin-project-nvim", + "plugin-promise-async": "plugin-promise-async", + "plugin-rainbow-delimiters": "plugin-rainbow-delimiters", "plugin-registers": "plugin-registers", + "plugin-render-markdown-nvim": "plugin-render-markdown-nvim", "plugin-rose-pine": "plugin-rose-pine", + "plugin-rtp-nvim": "plugin-rtp-nvim", + "plugin-run-nvim": "plugin-run-nvim", "plugin-rustaceanvim": "plugin-rustaceanvim", - "plugin-scrollbar-nvim": "plugin-scrollbar-nvim", "plugin-smartcolumn": "plugin-smartcolumn", "plugin-sqls-nvim": "plugin-sqls-nvim", "plugin-tabular": "plugin-tabular", "plugin-telescope": "plugin-telescope", + "plugin-tiny-devicons-auto-colors": "plugin-tiny-devicons-auto-colors", "plugin-todo-comments": "plugin-todo-comments", "plugin-toggleterm-nvim": "plugin-toggleterm-nvim", "plugin-tokyonight": "plugin-tokyonight", "plugin-trouble": "plugin-trouble", "plugin-ts-error-translator": "plugin-ts-error-translator", + "plugin-typst-preview-nvim": "plugin-typst-preview-nvim", "plugin-vim-dirtytalk": "plugin-vim-dirtytalk", "plugin-vim-fugitive": "plugin-vim-fugitive", "plugin-vim-illuminate": "plugin-vim-illuminate", @@ -1012,75 +1251,48 @@ "plugin-vim-repeat": "plugin-vim-repeat", "plugin-vim-startify": "plugin-vim-startify", "plugin-which-key": "plugin-which-key", - "rnix-lsp": "rnix-lsp", - "systems": "systems_4" - }, - "locked": { - "lastModified": 1729695103, - "narHash": "sha256-1nesOKIa7zAQ3LVbWzvoxRE9PG0P9SAzBi2Ye1K3SWU=", - "owner": "notashelf", - "repo": "nvf", - "rev": "da86e554a6433fe4ebdb390494c072b12b0b624b", - "type": "github" - }, - "original": { - "owner": "notashelf", - "ref": "v0.7", - "repo": "nvf", - "type": "github" - } - }, - "ooknet-website": { - "inputs": { - "flake-parts": "flake-parts_3", - "nix-filter": "nix-filter", - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems_5" - }, - "locked": { - "lastModified": 1728305902, - "narHash": "sha256-761elKy4m30bx9+3QTlc2MGlRbESek/klbufIP75UqI=", - "ref": "refs/heads/master", - "rev": "b0ed4617e28b40e43cc286c9cd50d75d0e204668", - "revCount": 4, - "type": "git", - "url": "ssh://git@github.com/ooks-io/website" - }, - "original": { - "type": "git", - "url": "ssh://git@github.com/ooks-io/website" - } - }, - "ooks-scripts": { - "inputs": { - "nixpkgs": [ - "nixpkgs" + "systems": [ + "systems" ] }, "locked": { - "lastModified": 1718496814, - "narHash": "sha256-q9OaUOdA0+bmlJ8nK11aiEjHxlJ6a9sqAdvG8CwsH8M=", - "ref": "refs/heads/main", - "rev": "53ef8a8bc986f6a3a80aa0336eb6ea8ccd6e3ae7", - "revCount": 39, - "type": "git", - "url": "ssh://git@github.com/ooks-io/scripts" + "lastModified": 1737815146, + "narHash": "sha256-UptKVzFBLGhN25BHsyT9V78FpmWjfXM982YHz8O16T4=", + "owner": "notashelf", + "repo": "nvf", + "rev": "4242640c9801d6bcd9e72ae942eb92928093b0a5", + "type": "github" }, "original": { - "type": "git", - "url": "ssh://git@github.com/ooks-io/scripts" + "owner": "notashelf", + "repo": "nvf", + "type": "github" + } + }, + "plugin-aerial-nvim": { + "flake": false, + "locked": { + "lastModified": 1736064692, + "narHash": "sha256-7YQtkUTACTMfAGoqoFDPmRrqtw+ypxDbeLCTB3sy4Us=", + "owner": "stevearc", + "repo": "aerial.nvim", + "rev": "b3ec25ca8c347fafa976484a6cace162239112e1", + "type": "github" + }, + "original": { + "owner": "stevearc", + "repo": "aerial.nvim", + "type": "github" } }, "plugin-alpha-nvim": { "flake": false, "locked": { - "lastModified": 1708891191, - "narHash": "sha256-kTVPKZ/e1us/uHfSwFwR38lFYN8EotJq2jKz6xm/eqg=", + "lastModified": 1731604504, + "narHash": "sha256-sNi5qarejYqM4/J7lBZI3gjVLxer5FBPq8K6qjqcMjA=", "owner": "goolord", "repo": "alpha-nvim", - "rev": "41283fb402713fc8b327e60907f74e46166f4cfd", + "rev": "de72250e054e5e691b9736ee30db72c65d560771", "type": "github" }, "original": { @@ -1124,11 +1336,11 @@ "plugin-catppuccin": { "flake": false, "locked": { - "lastModified": 1728131011, - "narHash": "sha256-j6F078taxuGzr3jngrc+Pc5I1kDdxTLMETgq6Xn4w/4=", + "lastModified": 1735299190, + "narHash": "sha256-lwQLmqm01FihJdad4QRMK23MTrouyOokyuX/3enWjzs=", "owner": "catppuccin", "repo": "nvim", - "rev": "7be452ee067978cdc8b2c5f3411f0c71ffa612b9", + "rev": "f67b886d65a029f12ffa298701fb8f1efd89295d", "type": "github" }, "original": { @@ -1140,11 +1352,11 @@ "plugin-ccc": { "flake": false, "locked": { - "lastModified": 1714299582, - "narHash": "sha256-QRq9hQF5vLnOTzQGbOWC2ykMdMsQDlDlb6XC17dJG7Q=", + "lastModified": 1727935067, + "narHash": "sha256-OhdR2sAQV5PvlhaKQ6rYneMmvQiN3QfymOeanpAs9wY=", "owner": "uga-rosa", "repo": "ccc.nvim", - "rev": "f388f1981d222967c741fe9927edf9ba5fa3bcbe", + "rev": "7c639042583c7bdc7ce2e37e5a0e0aa6d0659c6a", "type": "github" }, "original": { @@ -1156,11 +1368,11 @@ "plugin-cellular-automaton": { "flake": false, "locked": { - "lastModified": 1693589931, - "narHash": "sha256-szbd6m7hH7NFI0UzjWF83xkpSJeUWCbn9c+O8F8S/Fg=", + "lastModified": 1719777869, + "narHash": "sha256-nIv7ISRk0+yWd1lGEwAV6u1U7EFQj/T9F8pU6O0Wf0s=", "owner": "Eandrju", "repo": "cellular-automaton.nvim", - "rev": "b7d056dab963b5d3f2c560d92937cb51db61cb5b", + "rev": "11aea08aa084f9d523b0142c2cd9441b8ede09ed", "type": "github" }, "original": { @@ -1172,11 +1384,11 @@ "plugin-chatgpt": { "flake": false, "locked": { - "lastModified": 1709721561, - "narHash": "sha256-vD3NEsYmPRWlxBSOxyIMIQiJXQXxx0hhsw4zIxxXB3o=", + "lastModified": 1728720509, + "narHash": "sha256-+YVXAkG4pp7RGs8lGnNFc0kQcUV3O3kYBQaQ5Qa4wB0=", "owner": "jackMort", "repo": "ChatGPT.nvim", - "rev": "df53728e05129278d6ea26271ec086aa013bed90", + "rev": "5b6d296eefc75331e2ff9f0adcffbd7d27862dd6", "type": "github" }, "original": { @@ -1204,11 +1416,11 @@ "plugin-cinnamon-nvim": { "flake": false, "locked": { - "lastModified": 1714107684, - "narHash": "sha256-cMP9WRZzevxaWgpILyDh1JwNukm3Jl3JKJYPT2HnFns=", + "lastModified": 1722992123, + "narHash": "sha256-kccQ4iFMSQ8kvE7hYz90hBrsDLo7VohFj/6lEZZiAO8=", "owner": "declancm", "repo": "cinnamon.nvim", - "rev": "a011e84b624cd7b609ea928237505d31b987748a", + "rev": "450cb3247765fed7871b41ef4ce5fa492d834215", "type": "github" }, "original": { @@ -1236,11 +1448,11 @@ "plugin-cmp-luasnip": { "flake": false, "locked": { - "lastModified": 1696878902, - "narHash": "sha256-nUJJl2zyK/oSwz5RzI9j3gf9zpDfCImCYbPbVsyXgz8=", + "lastModified": 1730707109, + "narHash": "sha256-86lKQPPyqFz8jzuLajjHMKHrYnwW6+QOcPyQEx6B+gw=", "owner": "saadparwaiz1", "repo": "cmp_luasnip", - "rev": "05a9ab28b53f71d1aece421ef32fee2cb857a843", + "rev": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90", "type": "github" }, "original": { @@ -1252,11 +1464,11 @@ "plugin-cmp-nvim-lsp": { "flake": false, "locked": { - "lastModified": 1715931395, - "narHash": "sha256-CT1+Z4XJBVsl/RqvJeGmyitD6x7So0ylXvvef5jh7I8=", + "lastModified": 1733823748, + "narHash": "sha256-iaihXNCF5bB5MdeoosD/kc3QtpA/QaIDZVLiLIurBSM=", "owner": "hrsh7th", "repo": "cmp-nvim-lsp", - "rev": "39e2eda76828d88b773cc27a3f61d2ad782c922d", + "rev": "99290b3ec1322070bcfb9e846450a46f6efa50f0", "type": "github" }, "original": { @@ -1300,11 +1512,11 @@ "plugin-codewindow-nvim": { "flake": false, "locked": { - "lastModified": 1695487629, - "narHash": "sha256-/u2Zjbd9m3/iJU3I3HzFzXWxuvoycwJoIq7UFeHNtKM=", + "lastModified": 1717593052, + "narHash": "sha256-HAqVTAkFZ1/vBiBP/QDE1fmwOl/PbznAxz/jmUFxs88=", "owner": "gorbit99", "repo": "codewindow.nvim", - "rev": "8c8f5ff66e123491c946c04848d744fcdc7cac6c", + "rev": "dd7017617962943eb1d152fc58940f11c6775a4a", "type": "github" }, "original": { @@ -1316,11 +1528,11 @@ "plugin-comment-nvim": { "flake": false, "locked": { - "lastModified": 1691409559, - "narHash": "sha256-+dF1ZombrlO6nQggufSb0igXW5zwU++o0W/5ZA07cdc=", + "lastModified": 1717957420, + "narHash": "sha256-h0kPue5Eqd5aeu4VoLH45pF0DmWWo1d8SnLICSQ63zc=", "owner": "numToStr", "repo": "Comment.nvim", - "rev": "0236521ea582747b58869cb72f70ccfa967d2e89", + "rev": "e30b7f2008e52442154b66f7c519bfd2f1e32acb", "type": "github" }, "original": { @@ -1332,11 +1544,11 @@ "plugin-copilot-cmp": { "flake": false, "locked": { - "lastModified": 1694286652, - "narHash": "sha256-srgNohm/aJpswNJ5+T7p+zi9Jinp9e5FA8/wdk6VRiY=", + "lastModified": 1733947099, + "narHash": "sha256-erRL8bY/zuwuCZfttw+avTrFV7pjv2H6v73NzY2bymM=", "owner": "zbirenbaum", "repo": "copilot-cmp", - "rev": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3", + "rev": "15fc12af3d0109fa76b60b5cffa1373697e261d1", "type": "github" }, "original": { @@ -1348,11 +1560,11 @@ "plugin-copilot-lua": { "flake": false, "locked": { - "lastModified": 1709095198, - "narHash": "sha256-JX3sdsnOnjkY7r9fCtC2oauo0PXF3SQ+SHUo8ifBvAc=", + "lastModified": 1734926641, + "narHash": "sha256-c2UE0dLBtoYMvMxg+jXzfsD+wN9sZLvftJq4gGmooZU=", "owner": "zbirenbaum", "repo": "copilot.lua", - "rev": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6", + "rev": "886ee73b6d464b2b3e3e6a7ff55ce87feac423a9", "type": "github" }, "original": { @@ -1364,11 +1576,11 @@ "plugin-crates-nvim": { "flake": false, "locked": { - "lastModified": 1715690194, - "narHash": "sha256-R1y1OIep4tcFd4mhylZ/A2zdwOmEQtCzuVBOBYu0qUI=", + "lastModified": 1727384188, + "narHash": "sha256-DIG0MXRTit4iEVoLlgsTK4znjam/QDjeZEpIDn6KHiE=", "owner": "Saecki", "repo": "crates.nvim", - "rev": "d556c00d60c9421c913ee54ff690df2a34f6264e", + "rev": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785", "type": "github" }, "original": { @@ -1377,14 +1589,30 @@ "type": "github" } }, + "plugin-csharpls-extended": { + "flake": false, + "locked": { + "lastModified": 1734491815, + "narHash": "sha256-jO/vuNgP8JAOIturzPFvxMLL5y+6YTYsUxjWwX6Nyso=", + "owner": "Decodetalkers", + "repo": "csharpls-extended-lsp.nvim", + "rev": "4f56c06215d10c4fcfee8a7f04ba766c114aece0", + "type": "github" + }, + "original": { + "owner": "Decodetalkers", + "repo": "csharpls-extended-lsp.nvim", + "type": "github" + } + }, "plugin-dashboard-nvim": { "flake": false, "locked": { - "lastModified": 1715952164, - "narHash": "sha256-mLQHRzt9vUJLOO15+u7EaE2FGzIm1Ba7fqwdu5zaTYA=", + "lastModified": 1730526793, + "narHash": "sha256-Qi8kmC3U8Tvxh0pWIBtN3DuWJioEGWn7FqQ8lQwauRo=", "owner": "glepnir", "repo": "dashboard-nvim", - "rev": "5182c09ac8085dc73b78ad0ea9f5479c9a866fc4", + "rev": "ae309606940d26d8c9df8b048a6e136b6bbec478", "type": "github" }, "original": { @@ -1396,11 +1624,11 @@ "plugin-diffview-nvim": { "flake": false, "locked": { - "lastModified": 1716569036, - "narHash": "sha256-sCrswSN/ERirije4hukg81t+X8sVG6EnG8SPK/P1Bts=", + "lastModified": 1718279802, + "narHash": "sha256-SX+ybIzL/w6uyCy4iZKnWnzTFwqB1oXSgyYVAdpdKi8=", "owner": "sindrets", "repo": "diffview.nvim", - "rev": "1ec7b56b959dab18f7030f541c33ae60e18a6f88", + "rev": "4516612fe98ff56ae0415a259ff6361a89419b0a", "type": "github" }, "original": { @@ -1412,11 +1640,11 @@ "plugin-dracula": { "flake": false, "locked": { - "lastModified": 1708834650, - "narHash": "sha256-I3rtbJYv1D+kniOLL9hmTF3ucp/qSNewnO2GmYAERko=", + "lastModified": 1734597715, + "narHash": "sha256-9iRI5NW3mcVzduitY4sr679dRWAWVbZuCAEfgM1OIOs=", "owner": "Mofiqul", "repo": "dracula.nvim", - "rev": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c", + "rev": "515acae4fd294fcefa5b15237a333c2606e958d1", "type": "github" }, "original": { @@ -1428,11 +1656,11 @@ "plugin-dressing-nvim": { "flake": false, "locked": { - "lastModified": 1716410905, - "narHash": "sha256-AXY1+nA6Q/kWbuwOAqwVdd3QrjkHGVdVMHShvSIfLwM=", + "lastModified": 1734804193, + "narHash": "sha256-N4hB5wDgoqXrXxSfzDCrqmdDtdVvq+PtOS7FBPH7qXE=", "owner": "stevearc", "repo": "dressing.nvim", - "rev": "3c38ac861e1b8d4077ff46a779cde17330b29f3a", + "rev": "3a45525bb182730fe462325c99395529308f431e", "type": "github" }, "original": { @@ -1444,11 +1672,11 @@ "plugin-elixir-tools": { "flake": false, "locked": { - "lastModified": 1716478469, - "narHash": "sha256-ESL/H/l5Yarcuo3MjBplKwox8E6CBxvWrpciyJeaES0=", + "lastModified": 1735076861, + "narHash": "sha256-CoGTVSKifjqshk8hYaQfFYTYgEGsIb1hKdz6fIS81iU=", "owner": "elixir-tools", "repo": "elixir-tools.nvim", - "rev": "815cf0b0aab0421f8490199c0dd7442d22a7c1b7", + "rev": "803fa69dbb457305cff98e3997bed2c4b51aea7c", "type": "github" }, "original": { @@ -1460,11 +1688,11 @@ "plugin-fastaction-nvim": { "flake": false, "locked": { - "lastModified": 1721396662, - "narHash": "sha256-L7na78FsE+QHlEwxMpiwQcoOPhtmrknvdTZfzUoDANI=", + "lastModified": 1734546047, + "narHash": "sha256-1GSxTyXqufjkRtNK3drWlCn/mGJ9mM9bHMR6ZwWT6X8=", "owner": "Chaitanyabsprip", "repo": "fastaction.nvim", - "rev": "2384dea7ba81d2709d0bee0e4bc7a8831ff13a9d", + "rev": "886e22d85e13115808e81ca367d5aaba02d9a25b", "type": "github" }, "original": { @@ -1476,11 +1704,11 @@ "plugin-fidget-nvim": { "flake": false, "locked": { - "lastModified": 1716093309, - "narHash": "sha256-Gpk/G0ByOAIE8uX4Xr94CvAjJBSJMEOwBuvrhmYYGsg=", + "lastModified": 1734334336, + "narHash": "sha256-o0za2NxFtzHZa7PRIm9U/P1/fwJrxS1G79ukdGLhJ4Q=", "owner": "j-hui", "repo": "fidget.nvim", - "rev": "ef99df04a1c53a453602421bc0f756997edc8289", + "rev": "9238947645ce17d96f30842e61ba81147185b657", "type": "github" }, "original": { @@ -1492,11 +1720,11 @@ "plugin-flutter-tools": { "flake": false, "locked": { - "lastModified": 1716114535, - "narHash": "sha256-dRcWCqFHtDMOEGjKji3lxYQZKBhlhss/i51pX6FZxuI=", + "lastModified": 1735420417, + "narHash": "sha256-xfSdPhrSUwBYdE9ZA8GgwFvR70nOp+snbNrFHeIfwOM=", "owner": "akinsho", "repo": "flutter-tools.nvim", - "rev": "990a1349c29f7d474a0cd51355aba773ccc9deea", + "rev": "a526c30f1941a7472509aaedda13758f943c968e", "type": "github" }, "original": { @@ -1508,11 +1736,11 @@ "plugin-friendly-snippets": { "flake": false, "locked": { - "lastModified": 1727061933, - "narHash": "sha256-yTsuV5unoujY0mhLINssYYBWCeefe+nJaxQHJKm7hlk=", + "lastModified": 1733106470, + "narHash": "sha256-I8SRZxnoNC6SOWW+scoA77Jwyxcb4eUczppLdyOiZe0=", "owner": "rafamadriz", "repo": "friendly-snippets", - "rev": "00ba9dd3df89509f95437b8d595553707c46d5ea", + "rev": "efff286dd74c22f731cdec26a70b46e5b203c619", "type": "github" }, "original": { @@ -1521,14 +1749,30 @@ "type": "github" } }, + "plugin-fzf-lua": { + "flake": false, + "locked": { + "lastModified": 1737131132, + "narHash": "sha256-0IdADUsIr+SZ0ort92jPPfGIH1EdcwELYz+TCmDCPPI=", + "owner": "ibhagwan", + "repo": "fzf-lua", + "rev": "fbe21aeb147b3dc8b188b5753a8e288ecedcee5e", + "type": "github" + }, + "original": { + "owner": "ibhagwan", + "repo": "fzf-lua", + "type": "github" + } + }, "plugin-gesture-nvim": { "flake": false, "locked": { - "lastModified": 1715776261, - "narHash": "sha256-XgF5BTKR5IiELNqYDvOPIGMw3HtkyNd3K5SOGfYFizY=", + "lastModified": 1731669851, + "narHash": "sha256-LTkttlDmKO9ngzrJrMWeeG9R0Bz/PoroCAF2URhUEbM=", "owner": "notomo", "repo": "gesture.nvim", - "rev": "3750313a40a752629e3e90f3c3e591969fdab388", + "rev": "dbd839bda337cb73911aeef06897eb29cb99f76f", "type": "github" }, "original": { @@ -1540,11 +1784,11 @@ "plugin-gitsigns-nvim": { "flake": false, "locked": { - "lastModified": 1716453598, - "narHash": "sha256-TTC3uvRsq4v6PBdS/3YAGpyhVt0w3/SGkPE3fu1zW94=", + "lastModified": 1732361574, + "narHash": "sha256-H7A+AxioiedSuC+jqRwP4c7DjZR/0j4o/fTUasT2urc=", "owner": "lewis6991", "repo": "gitsigns.nvim", - "rev": "cdfcd9d39d23c46ae9a040de2c6a8b8bf868746e", + "rev": "5f808b5e4fef30bd8aca1b803b4e555da07fc412", "type": "github" }, "original": { @@ -1572,11 +1816,11 @@ "plugin-gruvbox": { "flake": false, "locked": { - "lastModified": 1716072809, - "narHash": "sha256-BLhZGijGF03UFiyMJ66C1ZLDRqAo1C80ekHcBm1PGoY=", + "lastModified": 1732485864, + "narHash": "sha256-qasIg1nvAlUWUUzSZLF36jnoNm8PmQa3owgh0tKGgHk=", "owner": "ellisonleao", "repo": "gruvbox.nvim", - "rev": "96a8ec336fb48a11cefbd57508888361431aac26", + "rev": "68c3460a5d1d1a362318960035c9f3466d5011f5", "type": "github" }, "original": { @@ -1585,14 +1829,30 @@ "type": "github" } }, + "plugin-haskell-tools-nvim": { + "flake": false, + "locked": { + "lastModified": 1734222260, + "narHash": "sha256-gZVN9ADPO5wFOaf19FydCneb7aKTT9K1vcLoBURPEjk=", + "owner": "mrcjkb", + "repo": "haskell-tools.nvim", + "rev": "943b77b68a79d3991523ba4d373063c9355c6f55", + "type": "github" + }, + "original": { + "owner": "mrcjkb", + "repo": "haskell-tools.nvim", + "type": "github" + } + }, "plugin-highlight-undo": { "flake": false, "locked": { - "lastModified": 1714982601, - "narHash": "sha256-yGw1SxcUmGQxqKhMb2SJAai07g+rOpEJy2CqIX2h9dM=", + "lastModified": 1732378966, + "narHash": "sha256-b0JrMu3vbbYgyHPs9hyayMzUypFwugEAxvZOcuRMc/o=", "owner": "tzachar", "repo": "highlight-undo.nvim", - "rev": "1ea1c79372d7d93c88fd97543880927b7635e3d2", + "rev": "5f588b420179a31d7073854bfd07ed9d5f364645", "type": "github" }, "original": { @@ -1636,11 +1896,11 @@ "plugin-image-nvim": { "flake": false, "locked": { - "lastModified": 1716308282, - "narHash": "sha256-6nFzUchDQIvaTOv4lZ10q66m/ntU3dgVnlfBRodW+0Y=", + "lastModified": 1735173549, + "narHash": "sha256-Sjbmf4BmjkjAorT3tojbC7JivJagFamAVgzwcCipa8k=", "owner": "3rd", "repo": "image.nvim", - "rev": "2a618c86d9f8fd9f7895d12b55ec2f31fd14fa05", + "rev": "b991fc7f845bc6ab40c6ec00b39750dcd5190010", "type": "github" }, "original": { @@ -1652,11 +1912,11 @@ "plugin-indent-blankline": { "flake": false, "locked": { - "lastModified": 1716449809, - "narHash": "sha256-K5y0UQAXc0N6+1kqncX2eClpvZb7jlg7GhSerHQVZX0=", + "lastModified": 1733296464, + "narHash": "sha256-H3lUQZDvgj3a2STYeMUDiOYPe7rfsy08tJ4SlDd+LuE=", "owner": "lukas-reineke", "repo": "indent-blankline.nvim", - "rev": "d98f537c3492e87b6dc6c2e3f66ac517528f406f", + "rev": "259357fa4097e232730341fa60988087d189193a", "type": "github" }, "original": { @@ -1668,11 +1928,11 @@ "plugin-leap-nvim": { "flake": false, "locked": { - "lastModified": 1716207448, - "narHash": "sha256-O/wN5v8GhlEECBIhJQvWhKcpQrqT7J+BNkd/fIh0TIQ=", + "lastModified": 1722337962, + "narHash": "sha256-PFD/UliAHKk2ga+7p/GmoZGqZFWenIVLkzmO+FkhvrY=", "owner": "ggandor", "repo": "leap.nvim", - "rev": "8f4d3ab9fe5c906c5745150191831c5ee0a427a0", + "rev": "c6bfb191f1161fbabace1f36f578a20ac6c7642c", "type": "github" }, "original": { @@ -1684,11 +1944,11 @@ "plugin-lsp-lines": { "flake": false, "locked": { - "lastModified": 1716108775, - "narHash": "sha256-QsvmPOer7JgO7Y+N/iaNJD7Kmy69gnlV4CeyaQesNvA=", + "lastModified": 1734793049, + "narHash": "sha256-jHiIZemneQACTDYZXBJqX2/PRTBoxq403ILvt1Ej1ZM=", "owner": "~whynothugo", "repo": "lsp_lines.nvim", - "rev": "7d9e2748b61bff6ebba6e30adbc7173ccf21c055", + "rev": "a92c755f182b89ea91bd8a6a2227208026f27b4d", "type": "sourcehut" }, "original": { @@ -1700,11 +1960,11 @@ "plugin-lsp-signature": { "flake": false, "locked": { - "lastModified": 1716637798, - "narHash": "sha256-4Abo4HGwzZtqEHcS9lsQdw+Dsn7tkQoeq5QyfTEEwnA=", + "lastModified": 1726445971, + "narHash": "sha256-W6bN3R10B84noK7MOzvUOIc82WwyojIS97iFL/dO5yk=", "owner": "ray-x", "repo": "lsp_signature.nvim", - "rev": "529e8861d0410389f0163a5e5c2199d4a4ef5bf6", + "rev": "fc38521ea4d9ec8dbd4c2819ba8126cea743943b", "type": "github" }, "original": { @@ -1716,11 +1976,11 @@ "plugin-lspkind": { "flake": false, "locked": { - "lastModified": 1704982040, - "narHash": "sha256-/QLdBU/Zwmkw1NGuLBD48tvrmIP9d9WHhgcLEQgRTWo=", + "lastModified": 1733408701, + "narHash": "sha256-OCvKUBGuzwy8OWOL1x3Z3fo+0+GyBMI9TX41xSveqvE=", "owner": "onsails", "repo": "lspkind-nvim", - "rev": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf", + "rev": "d79a1c3299ad0ef94e255d045bed9fa26025dab6", "type": "github" }, "original": { @@ -1764,11 +2024,11 @@ "plugin-lualine": { "flake": false, "locked": { - "lastModified": 1723473562, - "narHash": "sha256-gCm7m96PkZyrgjmt7Efc+NMZKStAq1zr7JRCYOgGDuE=", + "lastModified": 1731050126, + "narHash": "sha256-IN6Qz3jGxUcylYiRTyd8j6me3pAoqJsJXtFUvph/6EI=", "owner": "hoob3rt", "repo": "lualine.nvim", - "rev": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056", + "rev": "2a5bae925481f999263d6f5ed8361baef8df4f83", "type": "github" }, "original": { @@ -1780,11 +2040,11 @@ "plugin-luasnip": { "flake": false, "locked": { - "lastModified": 1726165831, - "narHash": "sha256-nkaa1NGOI28Et2QitQB+Spv+J42QVdHE1oywteLcJJw=", + "lastModified": 1733162004, + "narHash": "sha256-efDe3RXncnNVkj37AmIv8oj0DKurB50Dziao5FGTLP4=", "owner": "L3MON4D3", "repo": "LuaSnip", - "rev": "e808bee352d1a6fcf902ca1a71cee76e60e24071", + "rev": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d", "type": "github" }, "original": { @@ -1793,6 +2053,39 @@ "type": "github" } }, + "plugin-lz-n": { + "flake": false, + "locked": { + "lastModified": 1735437369, + "narHash": "sha256-6NIXqwmX7RgwiZVEzmTnkJgmrPqFNx12ayIcRgNIaEs=", + "owner": "nvim-neorocks", + "repo": "lz.n", + "rev": "32be28a221b9c98e56841458e4b20c150a4169c4", + "type": "github" + }, + "original": { + "owner": "nvim-neorocks", + "repo": "lz.n", + "type": "github" + } + }, + "plugin-lzn-auto-require": { + "flake": false, + "locked": { + "lastModified": 1731009187, + "narHash": "sha256-KC1z+zC9vKODllZVpBu+udzM12oYJaS8e6LdXWtQ89U=", + "owner": "horriblename", + "repo": "lzn-auto-require", + "rev": "a075ed51976323fd7fc44ccfca89fe0449a08cca", + "type": "github" + }, + "original": { + "owner": "horriblename", + "ref": "require-rewrite", + "repo": "lzn-auto-require", + "type": "github" + } + }, "plugin-mind-nvim": { "flake": false, "locked": { @@ -1809,6 +2102,646 @@ "type": "github" } }, + "plugin-mini-ai": { + "flake": false, + "locked": { + "lastModified": 1733662803, + "narHash": "sha256-b/776l9nYM9e2atzXrvOk9dCxjzIuW/+iINC/yPv88Y=", + "owner": "echasnovski", + "repo": "mini.ai", + "rev": "ebb04799794a7f94628153991e6334c3304961b8", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.ai", + "type": "github" + } + }, + "plugin-mini-align": { + "flake": false, + "locked": { + "lastModified": 1735582248, + "narHash": "sha256-oHub8dEihIx4kcP3CD9GXG1SUObJUVpH4bg2Z6PmadQ=", + "owner": "echasnovski", + "repo": "mini.align", + "rev": "e715137aece7d05734403d793b8b6b64486bc812", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.align", + "type": "github" + } + }, + "plugin-mini-animate": { + "flake": false, + "locked": { + "lastModified": 1733078395, + "narHash": "sha256-ZePmJuHCCymTgaK46nSg5tRloxs+UKrVgVmT++rGKpc=", + "owner": "echasnovski", + "repo": "mini.animate", + "rev": "d14190ac3040116540889e2ebc25f488b195799e", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.animate", + "type": "github" + } + }, + "plugin-mini-base16": { + "flake": false, + "locked": { + "lastModified": 1734960100, + "narHash": "sha256-VGs4k/xDujPcA0Nv5T18ybSv1iqnzg0AFmaweRdhvDM=", + "owner": "echasnovski", + "repo": "mini.base16", + "rev": "23453dacc1606e5d42238d82f0b42a2985386b62", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.base16", + "type": "github" + } + }, + "plugin-mini-basics": { + "flake": false, + "locked": { + "lastModified": 1730194519, + "narHash": "sha256-R8POaMcgb6SBOxIpanZsswieywapnU7zDNjQMRTkR8U=", + "owner": "echasnovski", + "repo": "mini.basics", + "rev": "67c10b3436d5d3b892715137f4773e71c6753b13", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.basics", + "type": "github" + } + }, + "plugin-mini-bracketed": { + "flake": false, + "locked": { + "lastModified": 1737036218, + "narHash": "sha256-y+tGFF1H37ES/hnEtr3GJK3GeB6D5s8ZdSpvzl+lh3s=", + "owner": "echasnovski", + "repo": "mini.bracketed", + "rev": "0091e11fabe34973fc038a8d0d0485202742e403", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.bracketed", + "type": "github" + } + }, + "plugin-mini-bufremove": { + "flake": false, + "locked": { + "lastModified": 1730726192, + "narHash": "sha256-CB6ZIlrCQlh2W44Knnb10REDcvj4jcYkW/9CiOaoH2E=", + "owner": "echasnovski", + "repo": "mini.bufremove", + "rev": "285bdac9596ee7375db50c0f76ed04336dcd2685", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.bufremove", + "type": "github" + } + }, + "plugin-mini-clue": { + "flake": false, + "locked": { + "lastModified": 1737130586, + "narHash": "sha256-/0DpZV/jXuhaqBz5j4JN3xmofATlwPMHNSm/uTXALg0=", + "owner": "echasnovski", + "repo": "mini.clue", + "rev": "63e42dad781b9ed4845d90ef1da8c52dfb6dce3f", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.clue", + "type": "github" + } + }, + "plugin-mini-colors": { + "flake": false, + "locked": { + "lastModified": 1730726192, + "narHash": "sha256-B2JahCUhKpYwOJrl+BhSp3UQFiyyMGJAYKGK+uMv3fk=", + "owner": "echasnovski", + "repo": "mini.colors", + "rev": "d64b1c0f520579d905f97208eca85329e664ab88", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.colors", + "type": "github" + } + }, + "plugin-mini-comment": { + "flake": false, + "locked": { + "lastModified": 1736611383, + "narHash": "sha256-vAgBDSVtXCP+rlu+cmXdoZQBGShyH7KfL8E/gvDMfnM=", + "owner": "echasnovski", + "repo": "mini.comment", + "rev": "6e1f9a8ebbf6f693fa3787ceda8ca3bf3cb6aec7", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.comment", + "type": "github" + } + }, + "plugin-mini-completion": { + "flake": false, + "locked": { + "lastModified": 1732271068, + "narHash": "sha256-dlQCfHUQX9rPiSYZSRipezHX0CG/redbV2g7cpwwExY=", + "owner": "echasnovski", + "repo": "mini.completion", + "rev": "6eb9546685c4e1c4af2365b87166d4afa39d8a1b", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.completion", + "type": "github" + } + }, + "plugin-mini-diff": { + "flake": false, + "locked": { + "lastModified": 1735324663, + "narHash": "sha256-dRvW/1lfVShiHmRU0mQA5g5xDyQ0EVtVLLZ0y6WSedg=", + "owner": "echasnovski", + "repo": "mini.diff", + "rev": "00f072250061ef498f91ed226918c9ec31a416a4", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.diff", + "type": "github" + } + }, + "plugin-mini-doc": { + "flake": false, + "locked": { + "lastModified": 1723308950, + "narHash": "sha256-Q3DAEV1ZHS+lFhZKFCNoIjn41ksk7WRrVP2b2d6uSss=", + "owner": "echasnovski", + "repo": "mini.doc", + "rev": "bb73a3d1ff390f7e2740027ea2567017099a237c", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.doc", + "type": "github" + } + }, + "plugin-mini-extra": { + "flake": false, + "locked": { + "lastModified": 1736279066, + "narHash": "sha256-lUJrviUjAmJ70g2y93aNw3e1mHGHoB9lbh44HGP7zQs=", + "owner": "echasnovski", + "repo": "mini.extra", + "rev": "477e3dda7b597b49bc1373951ea7da4da834c352", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.extra", + "type": "github" + } + }, + "plugin-mini-files": { + "flake": false, + "locked": { + "lastModified": 1736535707, + "narHash": "sha256-UHW78m4BiYMMrABwdkyyzQUENgQrVFbWJnmNdRMtr0w=", + "owner": "echasnovski", + "repo": "mini.files", + "rev": "d0f03a5c38836fd2cce3dc80734124959002078c", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.files", + "type": "github" + } + }, + "plugin-mini-fuzzy": { + "flake": false, + "locked": { + "lastModified": 1730726192, + "narHash": "sha256-XvDkDfwPcBxySuz58f2mpWTeo8EsOnMvZUcNI8HNZg8=", + "owner": "echasnovski", + "repo": "mini.fuzzy", + "rev": "faa5a6c0d29c28012c90bd011162963a58715428", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.fuzzy", + "type": "github" + } + }, + "plugin-mini-git": { + "flake": false, + "locked": { + "lastModified": 1736535710, + "narHash": "sha256-rXuKopyZBCBbpKuytCdm8keruSNK1ohk2NdeZv1wifI=", + "owner": "echasnovski", + "repo": "mini-git", + "rev": "fc13dde6cfe87cf25a4fd1ee177c0d157468436b", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini-git", + "type": "github" + } + }, + "plugin-mini-hipatterns": { + "flake": false, + "locked": { + "lastModified": 1733141274, + "narHash": "sha256-zJ8OMzfcBh9NtSg2FHDjB5DFX9C2qZRo8t8lc097sCI=", + "owner": "echasnovski", + "repo": "mini.hipatterns", + "rev": "f34975103a38b3f608219a1324cdfc58ea660b8b", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.hipatterns", + "type": "github" + } + }, + "plugin-mini-hues": { + "flake": false, + "locked": { + "lastModified": 1734960100, + "narHash": "sha256-4y79ejOkRL/fajZ4jC8t4K6EgNbnTsH++mIjmo6G3q0=", + "owner": "echasnovski", + "repo": "mini.hues", + "rev": "ae6ad4c666ff42c1102344fe1eba18bb486f2e46", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.hues", + "type": "github" + } + }, + "plugin-mini-icons": { + "flake": false, + "locked": { + "lastModified": 1737036219, + "narHash": "sha256-w0PxiTj9uiUffZXkMM18IO/b/zPpdRKW9ydyhvXRoqE=", + "owner": "echasnovski", + "repo": "mini.icons", + "rev": "910db5df9724d65371182948f921fce23c2c881e", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.icons", + "type": "github" + } + }, + "plugin-mini-indentscope": { + "flake": false, + "locked": { + "lastModified": 1737036220, + "narHash": "sha256-Mrzc7oHXxyEGqdE003qiC9unScyb7i5A6+l8Do7yxws=", + "owner": "echasnovski", + "repo": "mini.indentscope", + "rev": "613df2830d7faeae7483ba2e736683154b95921e", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.indentscope", + "type": "github" + } + }, + "plugin-mini-jump": { + "flake": false, + "locked": { + "lastModified": 1733662809, + "narHash": "sha256-qMP9ezk4xZov5S4vrUFM62lnc4YkEaZL1EVzdXwDq1Q=", + "owner": "echasnovski", + "repo": "mini.jump", + "rev": "bb93d998c9db6936697746330411f5fb9957145e", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.jump", + "type": "github" + } + }, + "plugin-mini-jump2d": { + "flake": false, + "locked": { + "lastModified": 1733662811, + "narHash": "sha256-+DihKCh6GYwin3H9YD+q30MLMRNXvvb1GtKnfBinGjc=", + "owner": "echasnovski", + "repo": "mini.jump2d", + "rev": "88077058297e80f1c76a18ed801ae9d7064187c6", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.jump2d", + "type": "github" + } + }, + "plugin-mini-map": { + "flake": false, + "locked": { + "lastModified": 1725613927, + "narHash": "sha256-dL+d92+GLAILQ/A1JVCwoe3B5WtwVK01tPuC+fOTB5A=", + "owner": "echasnovski", + "repo": "mini.map", + "rev": "4c58e755d75f9999abcd3b3c6e934734b6a8b098", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.map", + "type": "github" + } + }, + "plugin-mini-misc": { + "flake": false, + "locked": { + "lastModified": 1734103112, + "narHash": "sha256-qnYa4IZk14MGZArmVpn15l+P9cwtFWomBVxRuYHVyXc=", + "owner": "echasnovski", + "repo": "mini.misc", + "rev": "645fb9367c19bb485902e54e5451425981498601", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.misc", + "type": "github" + } + }, + "plugin-mini-move": { + "flake": false, + "locked": { + "lastModified": 1723711319, + "narHash": "sha256-nX0eAlhMnKhAftgM6qeHUuawagumLQMPKDkqZNPLljg=", + "owner": "echasnovski", + "repo": "mini.move", + "rev": "4caa1c212f5ca3d1633d21cfb184808090ed74b1", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.move", + "type": "github" + } + }, + "plugin-mini-notify": { + "flake": false, + "locked": { + "lastModified": 1736790793, + "narHash": "sha256-q27j14OV6LAfoxeqBG75GSiqtqmW37GOPHpmA2fD4gs=", + "owner": "echasnovski", + "repo": "mini.notify", + "rev": "05e598d5b349bd66404d576e6a4d4340aea5f194", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.notify", + "type": "github" + } + }, + "plugin-mini-operators": { + "flake": false, + "locked": { + "lastModified": 1731776514, + "narHash": "sha256-+Zhy0AhuMPSHnM6dqbV45Aa7dS7XJ4mpfcHApSbuy8A=", + "owner": "echasnovski", + "repo": "mini.operators", + "rev": "7cb4dc66c51a3d736d347bbc517dc73dc7d28888", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.operators", + "type": "github" + } + }, + "plugin-mini-pairs": { + "flake": false, + "locked": { + "lastModified": 1728656795, + "narHash": "sha256-PtHxLKU1smVTx655r5SINxuz5CJmZWnBW70T8zJ/oxM=", + "owner": "echasnovski", + "repo": "mini.pairs", + "rev": "7e834c5937d95364cc1740e20d673afe2d034cdb", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.pairs", + "type": "github" + } + }, + "plugin-mini-pick": { + "flake": false, + "locked": { + "lastModified": 1736696004, + "narHash": "sha256-Q4GD0WzUYNtoBMx8pIl6fX5glKn1oflS4HZVC+w/eAM=", + "owner": "echasnovski", + "repo": "mini.pick", + "rev": "09ade94d2c9c5133db9ae00f3693d82eae78e9be", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.pick", + "type": "github" + } + }, + "plugin-mini-sessions": { + "flake": false, + "locked": { + "lastModified": 1735582250, + "narHash": "sha256-vyn8MGyOWFgJ5QVvjYb7K1cKDtg9qWnWYMNf80+kpHk=", + "owner": "echasnovski", + "repo": "mini.sessions", + "rev": "71c9ae596664ac110560d27eb928fc24e22bc53d", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.sessions", + "type": "github" + } + }, + "plugin-mini-snippets": { + "flake": false, + "locked": { + "lastModified": 1736611383, + "narHash": "sha256-How9m7KTo66FrwjZQlgZRmJ5toFKn/+GnUbx/0va3lM=", + "owner": "echasnovski", + "repo": "mini.snippets", + "rev": "72920f62e3dd1330720e94e8f5d42592f3a1ecf8", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.snippets", + "type": "github" + } + }, + "plugin-mini-splitjoin": { + "flake": false, + "locked": { + "lastModified": 1719822504, + "narHash": "sha256-LDIbh5KfupTI4zkYOlLmVCd3DuZRhx5lTASN53VG34g=", + "owner": "echasnovski", + "repo": "mini.splitjoin", + "rev": "3e92f6764e770ba392325cad3a4497adcada695f", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.splitjoin", + "type": "github" + } + }, + "plugin-mini-starter": { + "flake": false, + "locked": { + "lastModified": 1736858747, + "narHash": "sha256-pJYkZUo+L3IeGCRdTipqTzMv+HatpNnyRxshaygKtIw=", + "owner": "echasnovski", + "repo": "mini.starter", + "rev": "4b257cfc93241e8c8cde3f9302d1616ad4e0d036", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.starter", + "type": "github" + } + }, + "plugin-mini-statusline": { + "flake": false, + "locked": { + "lastModified": 1735582251, + "narHash": "sha256-AQ2N93JDjtFpgerWTzRspmxrl9oQuALbeCUxBO4ZPqo=", + "owner": "echasnovski", + "repo": "mini.statusline", + "rev": "1b0edf76fe2af015f8c989385ff949f1db7aade2", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.statusline", + "type": "github" + } + }, + "plugin-mini-surround": { + "flake": false, + "locked": { + "lastModified": 1733662812, + "narHash": "sha256-okWJlG0KOdg1ShvkIIMnPSoOzGd7K84eDcp5kx6eVP8=", + "owner": "echasnovski", + "repo": "mini.surround", + "rev": "aa5e245829dd12d8ff0c96ef11da28681d6049aa", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.surround", + "type": "github" + } + }, + "plugin-mini-tabline": { + "flake": false, + "locked": { + "lastModified": 1729176541, + "narHash": "sha256-nucUqSN8w2xBnDp1dFBgRVVvfVoqZMdx7Zj78wdFAP0=", + "owner": "echasnovski", + "repo": "mini.tabline", + "rev": "06ef4ecaeca2e362c7d31113435d86d144b3cbbe", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.tabline", + "type": "github" + } + }, + "plugin-mini-test": { + "flake": false, + "locked": { + "lastModified": 1729520957, + "narHash": "sha256-NtsX441k84owAAJywq4G2rMvV6d7UR2K75G8oKam+gs=", + "owner": "echasnovski", + "repo": "mini.test", + "rev": "86a64d5a4bf9d73ebf5875edaae0d878f64f5e48", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.test", + "type": "github" + } + }, + "plugin-mini-trailspace": { + "flake": false, + "locked": { + "lastModified": 1725613928, + "narHash": "sha256-JKYvFz8g8kVZvxE44RhwoHXQykghXx7ebW/Mj1ZdJIw=", + "owner": "echasnovski", + "repo": "mini.trailspace", + "rev": "3a328e62559c33014e422fb9ae97afc4208208b1", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.trailspace", + "type": "github" + } + }, + "plugin-mini-visits": { + "flake": false, + "locked": { + "lastModified": 1737036221, + "narHash": "sha256-Q+m1gZ5Obu6Zzo87Djt6VCX76ZjdOiLb0j771jP8uQE=", + "owner": "echasnovski", + "repo": "mini.visits", + "rev": "90f20ba6ab7d3d7cb984fffddd82f5f6c7a6bea7", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.visits", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -1828,11 +2761,11 @@ "plugin-modes-nvim": { "flake": false, "locked": { - "lastModified": 1702245923, - "narHash": "sha256-Kd2hf5obrPvCVLtRcFjLd75byyrB2o3uYCSEMW6IeCc=", + "lastModified": 1734414076, + "narHash": "sha256-ShIK8ROowT1yFHgSIVHUFnnQOEMr3YPIqw4ixzR8w8M=", "owner": "mvllow", "repo": "modes.nvim", - "rev": "4035a46aaabe43faf1b54740575af9dd5bb03809", + "rev": "c7a4b1b383606832aab150902719bd5eb5cdb2b0", "type": "github" }, "original": { @@ -1844,11 +2777,11 @@ "plugin-neo-tree-nvim": { "flake": false, "locked": { - "lastModified": 1726542367, - "narHash": "sha256-Lqt0KJNT9HmpJwZoWChYeVBrDWhscRe8COqVCwgcTwk=", + "lastModified": 1735302061, + "narHash": "sha256-tZMneZsEbB5bgZgYq4ZWwK25B3vcnn80Q7diKcRoEv4=", "owner": "nvim-neo-tree", "repo": "neo-tree.nvim", - "rev": "a77af2e764c5ed4038d27d1c463fa49cd4794e07", + "rev": "a9f8943b4c31f8460d25c71e0f463d65e9775f1c", "type": "github" }, "original": { @@ -1860,11 +2793,11 @@ "plugin-neocord": { "flake": false, "locked": { - "lastModified": 1713923379, - "narHash": "sha256-oVWdnQlgXIMzMiybMq7yR/WfEW+Fm5RmhWx0RWprlfQ=", + "lastModified": 1733429637, + "narHash": "sha256-g/pq6hFo7duonIl1wWoxbJUTh/IRTH3hHEoQUdoiqKE=", "owner": "IogaMaster", "repo": "neocord", - "rev": "aa7a58023166533da83ca7b11c0d2569e45d7381", + "rev": "4d55d8dab2d5f2f272192add7a2c21982039c699", "type": "github" }, "original": { @@ -1876,11 +2809,11 @@ "plugin-neodev-nvim": { "flake": false, "locked": { - "lastModified": 1711715247, - "narHash": "sha256-mAJOMVN7/xO7ykVNAeTeX+z2A/7yB8zdqlEKHL6Pb74=", + "lastModified": 1720260306, + "narHash": "sha256-hOjzlo/IqmV8tYjGwfmcCPEmHYsWnEIwtHZdhpwA1kM=", "owner": "folke", "repo": "neodev.nvim", - "rev": "ce9a2e8eaba5649b553529c5498acb43a6c317cd", + "rev": "46aa467dca16cf3dfe27098042402066d2ae242d", "type": "github" }, "original": { @@ -1892,11 +2825,11 @@ "plugin-neorg": { "flake": false, "locked": { - "lastModified": 1727821831, - "narHash": "sha256-yfWQ6yKytu1jkWUtRZTVICslUWej6jVYv7frmSB7/6Q=", + "lastModified": 1734188232, + "narHash": "sha256-xH87caxEebrWLwY/v3xyyOy6PTG/ZqX2OfCdwg/RqDY=", "owner": "nvim-neorg", "repo": "neorg", - "rev": "afc9a37bf021acb0853e95714c4c6436e1588286", + "rev": "6b945909d84b5aeadc875f9b3f529ec44b9bc60f", "type": "github" }, "original": { @@ -1940,11 +2873,11 @@ "plugin-noice-nvim": { "flake": false, "locked": { - "lastModified": 1716502618, - "narHash": "sha256-GrgFjVDIQcCfg5qyO6FnhlGUCrz6rwAFh81yZXUJra4=", + "lastModified": 1734026622, + "narHash": "sha256-OpwgNTGunmy6Y7D/k0T+DFK/WJ8MeVTGWwjiPTQlvEY=", "owner": "folke", "repo": "noice.nvim", - "rev": "f119045f38792ad5311e5f9be7a879e4c1a95fe0", + "rev": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f", "type": "github" }, "original": { @@ -1970,14 +2903,30 @@ "type": "github" } }, + "plugin-nord": { + "flake": false, + "locked": { + "lastModified": 1737019140, + "narHash": "sha256-ZhDS7Y90DKp+jkUqcoQRf/zHy4DVgSDQXrnl3sBYJXs=", + "owner": "gbprod", + "repo": "nord.nvim", + "rev": "b0f3ed242fd8e5bafa7231367821d46c6c835dd8", + "type": "github" + }, + "original": { + "owner": "gbprod", + "repo": "nord.nvim", + "type": "github" + } + }, "plugin-nui-nvim": { "flake": false, "locked": { - "lastModified": 1716019714, - "narHash": "sha256-JRVVRT1CZZTjr58L+gAer7eCg9/fMdAD0YD5ljNwl0Q=", + "lastModified": 1733856815, + "narHash": "sha256-6U7E/i5FuNXQy+sF4C5DVxuTPqNKD5wxUgFohpOjm9Q=", "owner": "MunifTanjim", "repo": "nui.nvim", - "rev": "b1b3dcd6ed8f355c78bad3d395ff645be5f8b6ae", + "rev": "53e907ffe5eedebdca1cd503b00aa8692068ca46", "type": "github" }, "original": { @@ -1989,11 +2938,11 @@ "plugin-nvim-autopairs": { "flake": false, "locked": { - "lastModified": 1716158088, - "narHash": "sha256-YEAqjlzVrS/VLrkwGo3L7cNOE1LuyLYlBtkR2HA5oVk=", + "lastModified": 1731803843, + "narHash": "sha256-LbaxiU3ienVBcMKrug3Coppc4R+MD2rjREw7rHQim1w=", "owner": "windwp", "repo": "nvim-autopairs", - "rev": "c15de7e7981f1111642e7e53799e1211d4606cb9", + "rev": "b464658e9b880f463b9f7e6ccddd93fb0013f559", "type": "github" }, "original": { @@ -2005,11 +2954,11 @@ "plugin-nvim-bufferline-lua": { "flake": false, "locked": { - "lastModified": 1716555412, - "narHash": "sha256-8PCkY1zrlMrPGnQOb7MjqDXNlkeX46jrT4ScIL+MOwM=", + "lastModified": 1732824069, + "narHash": "sha256-zqz2GMius0gLxtgxt12RmLUVQFVaWe+MQaGCfUGr6bI=", "owner": "akinsho", "repo": "nvim-bufferline.lua", - "rev": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe", + "rev": "261a72b90d6db4ed8014f7bda976bcdc9dd7ce76", "type": "github" }, "original": { @@ -2021,11 +2970,11 @@ "plugin-nvim-cmp": { "flake": false, "locked": { - "lastModified": 1715954188, - "narHash": "sha256-GhXfnWqpXFVM7Yi9+qEXHfA6LIMILcMG9pP4VYXuptE=", + "lastModified": 1734672427, + "narHash": "sha256-Z/Qy2ErbCa7dbjZVuJUkMmb4d24amNunNgRcbCGPfOg=", "owner": "hrsh7th", "repo": "nvim-cmp", - "rev": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07", + "rev": "b555203ce4bd7ff6192e759af3362f9d217e8c89", "type": "github" }, "original": { @@ -2037,11 +2986,11 @@ "plugin-nvim-colorizer-lua": { "flake": false, "locked": { - "lastModified": 1703321305, - "narHash": "sha256-oKvFN2K+ASlPNwj2rhptR/ErYgo6XKBPhXSZotDdCP0=", + "lastModified": 1735384185, + "narHash": "sha256-quqs3666vQc/4ticc/Z5BHzGxV6UUVE9jVGT07MEMQQ=", "owner": "NvChad", "repo": "nvim-colorizer.lua", - "rev": "85855b38011114929f4058efc97af1059ab3e41d", + "rev": "8a65c448122fc8fac9c67b2e857b6e830a4afd0b", "type": "github" }, "original": { @@ -2069,11 +3018,11 @@ "plugin-nvim-dap": { "flake": false, "locked": { - "lastModified": 1716747841, - "narHash": "sha256-uzivFy0ZNLxAXDqkYNrNy1SSHPRrGv3OLVCNCRDiikU=", + "lastModified": 1735568902, + "narHash": "sha256-5iaXim9bDvSAI6jUXgu2OEk/KivfAsMTRry+UTHs2Gk=", "owner": "mfussenegger", "repo": "nvim-dap", - "rev": "922ebc75c2fa9305e36402fbd8c984c8638770a0", + "rev": "ffb077e65259f13be096ea6d603e3575a76b214a", "type": "github" }, "original": { @@ -2085,11 +3034,11 @@ "plugin-nvim-dap-go": { "flake": false, "locked": { - "lastModified": 1716775637, - "narHash": "sha256-B8A+ven18YgePLxAN3Q/j5NFb0FeTHCQak1uzaNDX9c=", + "lastModified": 1727922873, + "narHash": "sha256-wcGp5df1ER5T5oLVitWE02OywgJs3V4pazcGU5qVaUY=", "owner": "leoluz", "repo": "nvim-dap-go", - "rev": "a0c5a2b991d7e9304a9a032cf177e22a4b0acda1", + "rev": "6aa88167ea1224bcef578e8c7160fe8afbb44848", "type": "github" }, "original": { @@ -2101,11 +3050,11 @@ "plugin-nvim-dap-ui": { "flake": false, "locked": { - "lastModified": 1716237606, - "narHash": "sha256-paiyLNzqUq9G3U8qn8yl1AjHJzTTa17exA05QO09nGA=", + "lastModified": 1735324898, + "narHash": "sha256-psIBQpx3tV2UWm5hZTMPBANcXHPAX24dIuDq8Qcscxs=", "owner": "rcarriga", "repo": "nvim-dap-ui", - "rev": "334cf3038c4756e6ab999cbac67c847fb654c190", + "rev": "e94d98649dccb6a3884b66aabc2e07beb279e535", "type": "github" }, "original": { @@ -2117,11 +3066,11 @@ "plugin-nvim-docs-view": { "flake": false, "locked": { - "lastModified": 1705711563, - "narHash": "sha256-N5PrJKhF6pHkel4EyAllNdEYQRninfSyaAXPbuAiD+s=", + "lastModified": 1733658747, + "narHash": "sha256-b5aH8Tj+tMk0BjNCgdeCEeR26oQ9NCobj98P7IDgIPY=", "owner": "amrbashir", "repo": "nvim-docs-view", - "rev": "78d88bca16f32a430572758677f9246f6d7f7b94", + "rev": "1b97f8f954d74c46061bf289b6cea9232484c12c", "type": "github" }, "original": { @@ -2133,11 +3082,11 @@ "plugin-nvim-lightbulb": { "flake": false, "locked": { - "lastModified": 1689887436, - "narHash": "sha256-Meoop66jINllnxN6aohuPmU7DEjn64FMq/b8zuy9FEQ=", + "lastModified": 1734997673, + "narHash": "sha256-byvgRJvvt5rhiUVWdreY2jELXoPVld5EKQlOXwjNgWE=", "owner": "kosayoda", "repo": "nvim-lightbulb", - "rev": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9", + "rev": "3ac0791be37ba9cc7939f1ad90ebc5e75abf4eea", "type": "github" }, "original": { @@ -2149,11 +3098,11 @@ "plugin-nvim-lspconfig": { "flake": false, "locked": { - "lastModified": 1727085470, - "narHash": "sha256-IPpUZEMIL7+4mmqQLy9JeT0cW15/SH3Hx8kyksVcqC0=", + "lastModified": 1735439232, + "narHash": "sha256-6a1HjpLYdZ+ZmWM1B0tv631A3EHHstPrjaV15UnVtoY=", "owner": "neovim", "repo": "nvim-lspconfig", - "rev": "dd329912c8d446240584a2dbcd3802af3a19105a", + "rev": "8b15a1a597a59f4f5306fad9adfe99454feab743", "type": "github" }, "original": { @@ -2165,11 +3114,11 @@ "plugin-nvim-metals": { "flake": false, "locked": { - "lastModified": 1728295172, - "narHash": "sha256-ja/+MNxZ3H9io9jDwm5rhE6iKNi86a22eCOY75g19O8=", + "lastModified": 1735386491, + "narHash": "sha256-G9V7fX65uW4z7kiuiP8mLtEjLoTJ1mkltj51OlN5/oM=", "owner": "scalameta", "repo": "nvim-metals", - "rev": "f861db9fda55939797ac1b05238c49b0dcdc3bdb", + "rev": "e6b02c99161b43c67cfe1d6e5f9a9b9a0bb4701c", "type": "github" }, "original": { @@ -2213,11 +3162,11 @@ "plugin-nvim-neoclip": { "flake": false, "locked": { - "lastModified": 1701664728, - "narHash": "sha256-QtqLKdrDGzIiSEo3DZtv0C7wx3KlrcyePoIYdvH6vpk=", + "lastModified": 1734898459, + "narHash": "sha256-RCMZi1DM9JFrXWQ5w2wOjFzpANkiukn+RvHB9swMtbk=", "owner": "AckslD", "repo": "nvim-neoclip.lua", - "rev": "798cd0592a81c185465db3a091a0ff8a21af60fd", + "rev": "5e5e010251281f4aea69cfc1d4976ffe6065cf0f", "type": "github" }, "original": { @@ -2229,11 +3178,11 @@ "plugin-nvim-nio": { "flake": false, "locked": { - "lastModified": 1716391538, - "narHash": "sha256-UffuTu7mF96LHk0MQRNrsgDyo1QWa/1i5eJKjZkuG8k=", + "lastModified": 1720707425, + "narHash": "sha256-i6imNTb1xrfBlaeOyxyIwAZ/+o6ew9C4/z34a7/BgFg=", "owner": "nvim-neotest", "repo": "nvim-nio", - "rev": "632024157d01e8bc48fd7df6a7de8ffe3fdd4f3a", + "rev": "a428f309119086dc78dd4b19306d2d67be884eee", "type": "github" }, "original": { @@ -2245,11 +3194,11 @@ "plugin-nvim-notify": { "flake": false, "locked": { - "lastModified": 1715959703, - "narHash": "sha256-wxyHwL/uFdp6w32CVHgSOWkzRrIRuFvWh+J2401RAAA=", + "lastModified": 1735562588, + "narHash": "sha256-9jDpoLLto9WgTsV399WeE2XGrTJXWTYbcJ+zOFWldAA=", "owner": "rcarriga", "repo": "nvim-notify", - "rev": "d333b6f167900f6d9d42a59005d82919830626bf", + "rev": "c3797193536711b5d8983975791c4b11dc35ab3a", "type": "github" }, "original": { @@ -2258,14 +3207,30 @@ "type": "github" } }, + "plugin-nvim-scrollbar": { + "flake": false, + "locked": { + "lastModified": 1729162132, + "narHash": "sha256-/nB7eP2Rz/A9zMXrNEH4FReo6eZS0C/SEGvKhxV7AUA=", + "owner": "petertriho", + "repo": "nvim-scrollbar", + "rev": "6994eb9f73d5fdc36ee2c8717940e8c853e51a49", + "type": "github" + }, + "original": { + "owner": "petertriho", + "repo": "nvim-scrollbar", + "type": "github" + } + }, "plugin-nvim-session-manager": { "flake": false, "locked": { - "lastModified": 1716560093, - "narHash": "sha256-A6oHIg8PG84L7QIRpo9WXKzMq4EUe92jQIxObOxpFmg=", + "lastModified": 1728423652, + "narHash": "sha256-W9jtfVXHC8MQJwdbxakNqhd+xh/auQb3U09XKdN2Wzw=", "owner": "Shatur", "repo": "neovim-session-manager", - "rev": "b552ee8667037be5d0291229279a35af25e515fb", + "rev": "ce43f2eb2a52492157d7742e5f684b9a42bb3e5c", "type": "github" }, "original": { @@ -2277,11 +3242,11 @@ "plugin-nvim-surround": { "flake": false, "locked": { - "lastModified": 1715892699, - "narHash": "sha256-Mg60htwXPqNKu+JnexKiKF3Huvr7pBNdvc6f3Kt2FRA=", + "lastModified": 1732818349, + "narHash": "sha256-sC+V86FEDfIapY4Qy0Ch2dTUpqe+C/xEUR/iSIEY6LA=", "owner": "kylechui", "repo": "nvim-surround", - "rev": "79aaa42da1f698ed31bcbe7f83081f69dca7ba17", + "rev": "9f0cb495f25bff32c936062d85046fbda0c43517", "type": "github" }, "original": { @@ -2293,11 +3258,11 @@ "plugin-nvim-tree-lua": { "flake": false, "locked": { - "lastModified": 1716687243, - "narHash": "sha256-E6J9d0LJMK+Owj/iWbGVZBiVL/NI1xd5P0NNQpUmXj4=", + "lastModified": 1734820548, + "narHash": "sha256-4PmP31vYPH9xw4AjV5rDSKvcvZGTnIaPfR4Bwc0lAiA=", "owner": "nvim-tree", "repo": "nvim-tree.lua", - "rev": "517e4fbb9ef3c0986da7047f44b4b91a2400f93c", + "rev": "68fc4c20f5803444277022c681785c5edd11916d", "type": "github" }, "original": { @@ -2309,11 +3274,11 @@ "plugin-nvim-treesitter-context": { "flake": false, "locked": { - "lastModified": 1726947805, - "narHash": "sha256-5oN/vyhSqDqjLEzECj01A7A+Yq7U1H1HXLbzkC1Ljqw=", + "lastModified": 1734710732, + "narHash": "sha256-TIFMPKzD2ero1eK9aVfY1iKEvf/Sw8SL/9mk9omCQ3c=", "owner": "nvim-treesitter", "repo": "nvim-treesitter-context", - "rev": "3d5390c49e3f8fe457b376df2a49aa39d75b7911", + "rev": "2bcf700b59bc92850ca83a1c02e86ba832e0fae0", "type": "github" }, "original": { @@ -2325,11 +3290,11 @@ "plugin-nvim-ts-autotag": { "flake": false, "locked": { - "lastModified": 1716420040, - "narHash": "sha256-gy6OVR2iH361XMDDo0dqxJsAxo+5nXr3wP42pieeCUg=", + "lastModified": 1733164313, + "narHash": "sha256-v2NTFBIzKTYizUPWB3uhpnTGVZWaelhE3MT5+BDA6Do=", "owner": "windwp", "repo": "nvim-ts-autotag", - "rev": "8ae54b90e36ef1fc5267214b30c2cbff71525fe4", + "rev": "1cca23c9da708047922d3895a71032bc0449c52d", "type": "github" }, "original": { @@ -2338,14 +3303,30 @@ "type": "github" } }, + "plugin-nvim-ufo": { + "flake": false, + "locked": { + "lastModified": 1735147722, + "narHash": "sha256-etyfm4KpwjYN+kkotOMl0LgbQniILmqMqab4acMtTlw=", + "owner": "kevinhwang91", + "repo": "nvim-ufo", + "rev": "32cb247b893a384f1888b9cd737264159ecf183c", + "type": "github" + }, + "original": { + "owner": "kevinhwang91", + "repo": "nvim-ufo", + "type": "github" + } + }, "plugin-nvim-web-devicons": { "flake": false, "locked": { - "lastModified": 1716609001, - "narHash": "sha256-fmbsnNVZ6nBorBILwPfEgcDDWZCkh9YZH/aC343FxP4=", + "lastModified": 1735569123, + "narHash": "sha256-h9rY6F+2sBlG9PFN34/0ZTkY66oCeCIPe/HEadM03K4=", "owner": "nvim-tree", "repo": "nvim-web-devicons", - "rev": "b77921fdc44833c994fdb389d658ccbce5490c16", + "rev": "4adeeaa7a32d46cf3b5833341358c797304f950a", "type": "github" }, "original": { @@ -2357,11 +3338,11 @@ "plugin-obsidian-nvim": { "flake": false, "locked": { - "lastModified": 1716489161, - "narHash": "sha256-R7q3PmDMYQtDTE1JZgQtvArBq55MnvNdcChOsuivSCo=", + "lastModified": 1722536347, + "narHash": "sha256-mbq7fAPmlwOAbWlN3lGX9WGBKTV8cAPZx8pnRCyszJc=", "owner": "epwalsh", "repo": "obsidian.nvim", - "rev": "0890a3f4e1711d98b5aa78bf40d2c5b81ef3c39f", + "rev": "14e0427bef6c55da0d63f9a313fd9941be3a2479", "type": "github" }, "original": { @@ -2370,14 +3351,30 @@ "type": "github" } }, + "plugin-omnisharp-extended": { + "flake": false, + "locked": { + "lastModified": 1732802864, + "narHash": "sha256-lA22ncMWHz2oVcZMPQGpLL3UjjXOXGxhtXR1LX5cX3A=", + "owner": "Hoffs", + "repo": "omnisharp-extended-lsp.nvim", + "rev": "4916fa12e5b28d21a1f031f0bdd10aa15a75d85d", + "type": "github" + }, + "original": { + "owner": "Hoffs", + "repo": "omnisharp-extended-lsp.nvim", + "type": "github" + } + }, "plugin-onedark": { "flake": false, "locked": { - "lastModified": 1715454207, - "narHash": "sha256-GERMsVNELbeRrKsiPeSKcwNI+bH4C79koTBRtRMGqvc=", + "lastModified": 1731171496, + "narHash": "sha256-NLHq9SUUo81m50NPQe8852uZbo4Mo4No10N3ptX43t0=", "owner": "navarasu", "repo": "onedark.nvim", - "rev": "8e4b79b0e6495ddf29552178eceba1e147e6cecf", + "rev": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6", "type": "github" }, "original": { @@ -2389,11 +3386,11 @@ "plugin-orgmode-nvim": { "flake": false, "locked": { - "lastModified": 1716750850, - "narHash": "sha256-3xsdklkUuJwUzUieZT6eGIgDZUdVEGeyhxxUe99TOAA=", + "lastModified": 1734770880, + "narHash": "sha256-E1YJeTay1tX2PgiXwV/DRgrlYHIGUe9/uTA+6ORIhBw=", "owner": "nvim-orgmode", "repo": "orgmode", - "rev": "cb3c9bf6caf3411af88a9a1a0b7eb9be57b9741c", + "rev": "bf657742f7cb56211f99946ff64f5f87d7d7f0d0", "type": "github" }, "original": { @@ -2405,11 +3402,11 @@ "plugin-otter-nvim": { "flake": false, "locked": { - "lastModified": 1724585935, - "narHash": "sha256-euHwoK2WHLF/hrjLY2P4yGrIbYyBN38FL3q4CKNZmLY=", + "lastModified": 1735130975, + "narHash": "sha256-NPBGcLi1lEmpGGbGs58Xzw1IriOyKTMQdwIdVFsbVDM=", "owner": "jmbuhr", "repo": "otter.nvim", - "rev": "ca9ce67d0399380b659923381b58d174344c9ee7", + "rev": "e8c662e1aefa8b483cfba6e00729a39a363dcecc", "type": "github" }, "original": { @@ -2421,11 +3418,11 @@ "plugin-oxocarbon": { "flake": false, "locked": { - "lastModified": 1701119822, - "narHash": "sha256-++JALLPklok9VY2ChOddTYDvDNVadmCeB98jCAJYCZ0=", + "lastModified": 1724853107, + "narHash": "sha256-Hi/nATEvZ4a6Yxc66KtuJqss6kQV19cmtIlhCw6alOI=", "owner": "nyoom-engineering", "repo": "oxocarbon.nvim", - "rev": "c5846d10cbe4131cc5e32c6d00beaf59cb60f6a2", + "rev": "004777819ba294423b638a35a75c9f0c7be758ed", "type": "github" }, "original": { @@ -2453,11 +3450,11 @@ "plugin-plenary-nvim": { "flake": false, "locked": { - "lastModified": 1716230027, - "narHash": "sha256-5Jf2mWFVDofXBcXLbMa417mqlEPWLA+cQIZH/vNEV1g=", + "lastModified": 1726602776, + "narHash": "sha256-bmmPekAvuBvLQmrnnX0n+FRBqfVxBsObhxIEkDGAla4=", "owner": "nvim-lua", "repo": "plenary.nvim", - "rev": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683", + "rev": "2d9b06177a975543726ce5c73fca176cedbffe9d", "type": "github" }, "original": { @@ -2466,6 +3463,22 @@ "type": "github" } }, + "plugin-precognition-nvim": { + "flake": false, + "locked": { + "lastModified": 1732647805, + "narHash": "sha256-m3dKoKxCd/QODM+EL89c3RVOoZnuA4nrBG0KhPZ/o9Y=", + "owner": "tris203", + "repo": "precognition.nvim", + "rev": "531971e6d883e99b1572bf47294e22988d8fbec0", + "type": "github" + }, + "original": { + "owner": "tris203", + "repo": "precognition.nvim", + "type": "github" + } + }, "plugin-project-nvim": { "flake": false, "locked": { @@ -2482,14 +3495,46 @@ "type": "github" } }, + "plugin-promise-async": { + "flake": false, + "locked": { + "lastModified": 1722813441, + "narHash": "sha256-9eM66brPjiFlY64vmBetRYrKnpDyN7+/URMm4GsGimA=", + "owner": "kevinhwang91", + "repo": "promise-async", + "rev": "119e8961014c9bfaf1487bf3c2a393d254f337e2", + "type": "github" + }, + "original": { + "owner": "kevinhwang91", + "repo": "promise-async", + "type": "github" + } + }, + "plugin-rainbow-delimiters": { + "flake": false, + "locked": { + "lastModified": 1736686348, + "narHash": "sha256-zWHXYs3XdnoszqOFY3hA2L5mNn1a44OAeKv3lL3EMEw=", + "owner": "HiPhish", + "repo": "rainbow-delimiters.nvim", + "rev": "85b80abaa09cbbc039e3095b2f515b3cf8cadd11", + "type": "github" + }, + "original": { + "owner": "HiPhish", + "repo": "rainbow-delimiters.nvim", + "type": "github" + } + }, "plugin-registers": { "flake": false, "locked": { - "lastModified": 1703954003, - "narHash": "sha256-/MwIOR7H6ZkH/uLZOcMgg9XOWQB0yYYonbSKl51bXzo=", + "lastModified": 1730794647, + "narHash": "sha256-M7uR3yXYUQ4I8Gt8P6k25q67UNwksRDPKGrS/FCqrt0=", "owner": "tversteeg", "repo": "registers.nvim", - "rev": "22bb98f93a423252fffeb3531f7bc12a3e07b63f", + "rev": "c217f8f369e0886776cda6c94eab839b30a8940d", "type": "github" }, "original": { @@ -2498,14 +3543,30 @@ "type": "github" } }, + "plugin-render-markdown-nvim": { + "flake": false, + "locked": { + "lastModified": 1735525479, + "narHash": "sha256-ncFqBv0JITX3pTsLON+HctLUaKXhLRMBUrRWmI8KOSA=", + "owner": "MeanderingProgrammer", + "repo": "render-markdown.nvim", + "rev": "6fbd1491abc104409f119685de5353c35c97c005", + "type": "github" + }, + "original": { + "owner": "MeanderingProgrammer", + "repo": "render-markdown.nvim", + "type": "github" + } + }, "plugin-rose-pine": { "flake": false, "locked": { - "lastModified": 1716691958, - "narHash": "sha256-mpBx0R9tR4KrOMO9J0gg2aOeHtiU9zK8xoa7Ebkx0n8=", + "lastModified": 1733845819, + "narHash": "sha256-ejh9UXQbLc8Ie6wF7zszzL1gaJzr16gcu0dUWqTo8AM=", "owner": "rose-pine", "repo": "neovim", - "rev": "87aa437172357ad8f916942bca249ceadc6c68b1", + "rev": "91548dca53b36dbb9d36c10f114385f759731be1", "type": "github" }, "original": { @@ -2514,14 +3575,46 @@ "type": "github" } }, + "plugin-rtp-nvim": { + "flake": false, + "locked": { + "lastModified": 1724409589, + "narHash": "sha256-lmJbiD7I7MTEEpukESs67uAmLyn+p66hrUKLbEHp0Kw=", + "owner": "nvim-neorocks", + "repo": "rtp.nvim", + "rev": "494ddfc888bb466555d90ace731856de1320fe45", + "type": "github" + }, + "original": { + "owner": "nvim-neorocks", + "repo": "rtp.nvim", + "type": "github" + } + }, + "plugin-run-nvim": { + "flake": false, + "locked": { + "lastModified": 1735501787, + "narHash": "sha256-CFOyOARCLQiMOhFPeqz8n2ULyaaRxRZrOk0FCibjuIM=", + "owner": "diniamo", + "repo": "run.nvim", + "rev": "9015c9cece816ccf10a185b420f6e345fd990802", + "type": "github" + }, + "original": { + "owner": "diniamo", + "repo": "run.nvim", + "type": "github" + } + }, "plugin-rustaceanvim": { "flake": false, "locked": { - "lastModified": 1720595685, - "narHash": "sha256-Mx8pB9ECjFpbfmZPuXfpwoE5pUZ363M53f27ht7MBmA=", + "lastModified": 1735431742, + "narHash": "sha256-ucZXGbxHtbSKf5n11lL3vb6rD2BxJacIDOgcx32PLzA=", "owner": "mrcjkb", "repo": "rustaceanvim", - "rev": "047f9c9d8cd2861745eb9de6c1570ee0875aa795", + "rev": "51c097ebfb65d83baa71f48000b1e5c0a8dcc4fb", "type": "github" }, "original": { @@ -2530,30 +3623,14 @@ "type": "github" } }, - "plugin-scrollbar-nvim": { - "flake": false, - "locked": { - "lastModified": 1684886154, - "narHash": "sha256-zLBexSxQCn9HPY04a9w/UCJP1F5ShI2X12I9xE9H0cM=", - "owner": "petertriho", - "repo": "nvim-scrollbar", - "rev": "35f99d559041c7c0eff3a41f9093581ceea534e8", - "type": "github" - }, - "original": { - "owner": "petertriho", - "repo": "nvim-scrollbar", - "type": "github" - } - }, "plugin-smartcolumn": { "flake": false, "locked": { - "lastModified": 1710067624, - "narHash": "sha256-DHIeDNUF9n9s14GVeojIwc5QUPwJMYYl3gRvhvO/rdE=", + "lastModified": 1734696989, + "narHash": "sha256-6RodA5BQnL6tB3RCE5G2RiXqBvM3VP3HYZ+T3AxIF7Q=", "owner": "m4xshen", "repo": "smartcolumn.nvim", - "rev": "cefb17be095ad5526030a21bb2a80553cae09127", + "rev": "f14fbea6f86cd29df5042897ca9e3ba10ba4d27f", "type": "github" }, "original": { @@ -2565,11 +3642,11 @@ "plugin-sqls-nvim": { "flake": false, "locked": { - "lastModified": 1684697500, - "narHash": "sha256-jKFut6NZAf/eIeIkY7/2EsjsIhvZQKCKAJzeQ6XSr0s=", + "lastModified": 1733090837, + "narHash": "sha256-o5uD6shPkweuE+k/goBX42W3I2oojXVijfJC7L50sGU=", "owner": "nanotee", "repo": "sqls.nvim", - "rev": "4b1274b5b44c48ce784aac23747192f5d9d26207", + "rev": "a514379f5f89bf72955ed3bf5c1c31a40b8a1472", "type": "github" }, "original": { @@ -2581,11 +3658,11 @@ "plugin-tabular": { "flake": false, "locked": { - "lastModified": 1550598128, - "narHash": "sha256-irolBA/m3YIaezl+90h5G+xUOpad+3u44uJqDs4JCUs=", + "lastModified": 1720022617, + "narHash": "sha256-qmDpdg3Tl3W4JSovRb4ODlrKMjRL5CaVI05YBn0Q0LI=", "owner": "godlygeek", "repo": "tabular", - "rev": "339091ac4dd1f17e225fe7d57b48aff55f99b23a", + "rev": "12437cd1b53488e24936ec4b091c9324cafee311", "type": "github" }, "original": { @@ -2597,11 +3674,11 @@ "plugin-telescope": { "flake": false, "locked": { - "lastModified": 1716732931, - "narHash": "sha256-JXdpKfrSvrzpTqy+g9Bg85/vIDTUZfDr+ZhxH8wJDxA=", + "lastModified": 1732884846, + "narHash": "sha256-npb61MZYAotz71Co5G1dUeIqWt7GVeqZNz0A2Yz2dy4=", "owner": "nvim-telescope", "repo": "telescope.nvim", - "rev": "349660c0d35da06459ee8589af77de2086b652ce", + "rev": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc", "type": "github" }, "original": { @@ -2610,14 +3687,30 @@ "type": "github" } }, + "plugin-tiny-devicons-auto-colors": { + "flake": false, + "locked": { + "lastModified": 1733445616, + "narHash": "sha256-klUZKvdYhwO3sq4Su4sBFDcNSAYXh53O72vg4+ZOrhI=", + "owner": "rachartier", + "repo": "tiny-devicons-auto-colors.nvim", + "rev": "c8f63933ee013c1e0a26091d58131e060546f01f", + "type": "github" + }, + "original": { + "owner": "rachartier", + "repo": "tiny-devicons-auto-colors.nvim", + "type": "github" + } + }, "plugin-todo-comments": { "flake": false, "locked": { - "lastModified": 1716400082, - "narHash": "sha256-ZJp0emoHogSdhXPIH74MH4CznxhCmMbO243dqxAZMJo=", + "lastModified": 1726481242, + "narHash": "sha256-EH4Sy7qNkzOgA1INFzrtsRfD79TgMqSbKUdundyw22w=", "owner": "folke", "repo": "todo-comments.nvim", - "rev": "e1549807066947818113a7d7ed48f637e49620d3", + "rev": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0", "type": "github" }, "original": { @@ -2629,11 +3722,11 @@ "plugin-toggleterm-nvim": { "flake": false, "locked": { - "lastModified": 1716115307, - "narHash": "sha256-h82zisizLm0FOt4l8lzgC/spFk3R5Gx25A5YgULwW8U=", + "lastModified": 1735340326, + "narHash": "sha256-oeNIb+QHa/9yGZz/2u9LYIdKluel0bcQkaIqOuQUkis=", "owner": "akinsho", "repo": "toggleterm.nvim", - "rev": "fee58a0473fd92b28c34f8f724e4918b15ba30a3", + "rev": "344fc1810292785b3d962ddac2de57669e1a7ff9", "type": "github" }, "original": { @@ -2645,11 +3738,11 @@ "plugin-tokyonight": { "flake": false, "locked": { - "lastModified": 1716732360, - "narHash": "sha256-ZWxK0q8kUYHOk+ykH1m4901trnuHN8O9hkOZR6HdC+Y=", + "lastModified": 1734211493, + "narHash": "sha256-TJ/a6N6Cc1T0wdMxMopma1NtwL7rMYbZ6F0zFI1zaIA=", "owner": "folke", "repo": "tokyonight.nvim", - "rev": "0fae425aaab04a5f97666bd431b96f2f19c36935", + "rev": "45d22cf0e1b93476d3b6d362d720412b3d34465c", "type": "github" }, "original": { @@ -2661,11 +3754,11 @@ "plugin-trouble": { "flake": false, "locked": { - "lastModified": 1716133735, - "narHash": "sha256-D3dqI4NRgEG4BCDLQ3ci9lgYxt90XyWDQXlk4/uuR6M=", + "lastModified": 1732701472, + "narHash": "sha256-JhnERZfma2JHFEn/DElVmrSU5KxM2asx3SJ+86lCfoo=", "owner": "folke", "repo": "trouble.nvim", - "rev": "a8264a65a0b894832ea642844f5b7c30112c458f", + "rev": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6", "type": "github" }, "original": { @@ -2677,11 +3770,11 @@ "plugin-ts-error-translator": { "flake": false, "locked": { - "lastModified": 1712269172, - "narHash": "sha256-NJ0qfKvkwZ/0GolAeATlQLyQ7nGN6Z6q3uRqI+73wPk=", + "lastModified": 1731721659, + "narHash": "sha256-fi68jJVNTL2WlTehcl5Q8tijAeu2usjIsWXjcuixkCM=", "owner": "dmmulroy", "repo": "ts-error-translator.nvim", - "rev": "11ae55b28bde02663b5f983f59b0e3fd9c4e845b", + "rev": "47e5ba89f71b9e6c72eaaaaa519dd59bd6897df4", "type": "github" }, "original": { @@ -2690,6 +3783,22 @@ "type": "github" } }, + "plugin-typst-preview-nvim": { + "flake": false, + "locked": { + "lastModified": 1734839452, + "narHash": "sha256-d6Tv7xZRghYYDfABk/p2e9qTm4qnWHM+ejKDCcR0TfY=", + "owner": "chomosuke", + "repo": "typst-preview.nvim", + "rev": "c1100e8788baabe8ca8f8cd7fd63d3d479e49e36", + "type": "github" + }, + "original": { + "owner": "chomosuke", + "repo": "typst-preview.nvim", + "type": "github" + } + }, "plugin-vim-dirtytalk": { "flake": false, "locked": { @@ -2709,11 +3818,11 @@ "plugin-vim-fugitive": { "flake": false, "locked": { - "lastModified": 1716130336, - "narHash": "sha256-nyNtb3nsS/zFdSNRyXabcGIabAwgivJIUFB2c62vXmA=", + "lastModified": 1735457366, + "narHash": "sha256-45zsqKavWoclA67MC54bAel1nE8CLHtSdullHByiRS8=", "owner": "tpope", "repo": "vim-fugitive", - "rev": "4f59455d2388e113bd510e85b310d15b9228ca0d", + "rev": "174230d6a7f2df94705a7ffd8d5413e27ec10a80", "type": "github" }, "original": { @@ -2741,11 +3850,11 @@ "plugin-vim-markdown": { "flake": false, "locked": { - "lastModified": 1709279705, - "narHash": "sha256-eKwWdyvMZ7FV3FvOtqWVD7pulXNnhbEEjHq7MYg1woU=", + "lastModified": 1726813437, + "narHash": "sha256-ZCCSjZ5Xok4rnIwfa4VUEaz6d3oW9066l0EkoqiTppM=", "owner": "preservim", "repo": "vim-markdown", - "rev": "a657e697376909c41475a686eeef7fc7a4972d94", + "rev": "8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51", "type": "github" }, "original": { @@ -2757,11 +3866,11 @@ "plugin-vim-repeat": { "flake": false, "locked": { - "lastModified": 1611544268, - "narHash": "sha256-8rfZa3uKXB3TRCqaDHZ6DfzNbm7WaYnLvmTNzYtnKHg=", + "lastModified": 1720473942, + "narHash": "sha256-G/dmkq1KtSHIl+I5p3LfO6mGPS3eyLRbEEsuLbTpGlk=", "owner": "tpope", "repo": "vim-repeat", - "rev": "24afe922e6a05891756ecf331f39a1f6743d3d5a", + "rev": "65846025c15494983dafe5e3b46c8f88ab2e9635", "type": "github" }, "original": { @@ -2789,11 +3898,11 @@ "plugin-which-key": { "flake": false, "locked": { - "lastModified": 1697801635, - "narHash": "sha256-uvghPj/teWrRMm09Gh8iQ/LV2nYJw0lmoiZK6L4+1cY=", + "lastModified": 1734253151, + "narHash": "sha256-f/+sYMDEguB5ZDiYiQAsDvdF/2cVcWnLBU+9qwigk4s=", "owner": "folke", "repo": "which-key.nvim", - "rev": "4433e5ec9a507e5097571ed55c02ea9658fb268a", + "rev": "8ab96b38a2530eacba5be717f52e04601eb59326", "type": "github" }, "original": { @@ -2809,15 +3918,14 @@ "nixpkgs": [ "hyprland", "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" + ] }, "locked": { - "lastModified": 1729104314, - "narHash": "sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ+/nVtALHIciX/BI=", + "lastModified": 1737465171, + "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6", + "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", "type": "github" }, "original": { @@ -2826,32 +3934,36 @@ "type": "github" } }, - "rnix-lsp": { + "pre-commit-hooks_2": { "inputs": { - "naersk": "naersk", - "nixpkgs": "nixpkgs_5", - "utils": "utils" + "flake-compat": "flake-compat_2", + "gitignore": "gitignore_2", + "nixpkgs": [ + "secrets", + "agenix-rekey", + "nixpkgs" + ] }, "locked": { - "lastModified": 1669555118, - "narHash": "sha256-F0s0m62S5bHNVWNHLZD6SeHiLrsDx98VQbRjDyIu+qQ=", - "owner": "nix-community", - "repo": "rnix-lsp", - "rev": "95d40673fe43642e2e1144341e86d0036abd95d9", + "lastModified": 1735882644, + "narHash": "sha256-3FZAG+pGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "a5a961387e75ae44cc20f0a57ae463da5e959656", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "rnix-lsp", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", "type": "github" } }, "root": { "inputs": { - "agenix": "agenix", "firefox-addons": "firefox-addons", "flake-parts": "flake-parts", - "home-manager": "home-manager_2", + "flake-utils": "flake-utils_2", + "home-manager": "home-manager", "hypridle": "hypridle", "hyprland": "hyprland", "hyprland-contrib": "hyprland-contrib", @@ -2859,21 +3971,15 @@ "hyprlock": "hyprlock", "hyprpaper": "hyprpaper", "nix-index-db": "nix-index-db", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "nvf": "nvf", - "ooknet-website": "ooknet-website", - "ooks-scripts": "ooks-scripts", - "systems": "systems_6", + "secrets": "secrets", + "systems": "systems_2", "zjstatus": "zjstatus" } }, "rust-overlay": { "inputs": { - "flake-utils": [ - "nvf", - "nil", - "flake-utils" - ], "nixpkgs": [ "nvf", "nil", @@ -2881,11 +3987,11 @@ ] }, "locked": { - "lastModified": 1714529851, - "narHash": "sha256-YMKJW880f7LHXVRzu93xa6Ek+QLECIu0IRQbXbzZe38=", + "lastModified": 1731983527, + "narHash": "sha256-JECaBgC0pQ91Hq3W4unH6K9to8s2Zl2sPNu7bLOv4ek=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "9ca720fdcf7865385ae3b93ecdf65f1a64cb475e", + "rev": "71287228d96e9568e1e70c6bbfa3f992d145947b", "type": "github" }, "original": { @@ -2902,11 +4008,11 @@ ] }, "locked": { - "lastModified": 1728095260, - "narHash": "sha256-X62hA5ivYLY5G5+mXI6l9eUDkgi6Wu/7QUrwXhJ09oo=", + "lastModified": 1737166965, + "narHash": "sha256-vlDROBAgq+7PEVM0vaS2zboY6DXs3oKK0qW/1dVuFs4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "d1d2532ab267cfe6e40dff73fbaf34436c406d26", + "rev": "fc839c9d5d1ebc789b4657c43c4d54838c7c01de", "type": "github" }, "original": { @@ -2915,6 +4021,34 @@ "type": "github" } }, + "secrets": { + "inputs": { + "agenix": "agenix", + "agenix-rekey": "agenix-rekey", + "flake-parts": [ + "flake-parts" + ], + "nixpkgs": [ + "nixpkgs" + ], + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1738128696, + "narHash": "sha256-SY+UKbuhfHrAbAqVpCi3+Z4zSZ7cLJ5z6WXO8JcDmd0=", + "ref": "refs/heads/master", + "rev": "f88c11c910405e489716ca02c9d993aa50572e64", + "revCount": 34, + "type": "git", + "url": "ssh://git@github.com/ooks-io/kunzen" + }, + "original": { + "type": "git", + "url": "ssh://git@github.com/ooks-io/kunzen" + } + }, "systems": { "locked": { "lastModified": 1681028828, @@ -2960,78 +4094,25 @@ "type": "github" } }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "secrets", + "agenix-rekey", + "nixpkgs" + ] }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_5": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_6": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_7": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "utils": { - "locked": { - "lastModified": 1656928814, - "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", + "lastModified": 1735135567, + "narHash": "sha256-8T3K5amndEavxnludPyfj3Z1IkcFdRpR23q+T0BVeZE=", "owner": "numtide", - "repo": "flake-utils", - "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249", + "repo": "treefmt-nix", + "rev": "9e09d30a644c57257715902efbb3adc56c79cf28", "type": "github" }, "original": { "owner": "numtide", - "repo": "flake-utils", + "repo": "treefmt-nix", "type": "github" } }, @@ -3063,11 +4144,11 @@ ] }, "locked": { - "lastModified": 1728166987, - "narHash": "sha256-w6dVTguAn9zJ+7aPOhBQgDz8bn6YZ7b56cY8Kg5HJRI=", + "lastModified": 1737634991, + "narHash": "sha256-dBAnb7Kbnier30cA7AgxVSxxARmxKZ1vHZT33THSIr8=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "fb9c8d665af0588bb087f97d0f673ddf0d501787", + "rev": "e09dfe2726c8008f983e45a0aa1a3b7416aaeb8a", "type": "github" }, "original": { @@ -3080,15 +4161,17 @@ "inputs": { "crane": "crane", "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_6", + "nixpkgs": [ + "nixpkgs" + ], "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1729787428, - "narHash": "sha256-kGSM7b4+X5LObd6AdgQZABU241ZzHGm24xaiy33kwBI=", + "lastModified": 1737741991, + "narHash": "sha256-FCIlCT8HNEVEWwtiL5zwWH01XW1vHir83HWodfKeWU4=", "owner": "dj95", "repo": "zjstatus", - "rev": "c74e310c35fb7ec6b59a1c73720db4d6d8e236a1", + "rev": "8e9aa9d977ec70991c4e4cde8bcda9942dee3f5d", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 4b9c24c..176273c 100644 --- a/flake.nix +++ b/flake.nix @@ -9,36 +9,63 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - flake-parts.url = "github:hercules-ci/flake-parts"; + + systems.url = "github:nix-systems/default-linux"; + + flake-parts = { + url = "github:hercules-ci/flake-parts"; + }; + + flake-utils = { + url = "github:numtide/flake-utils"; + inputs.systems.follows = "systems"; + }; + home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - agenix.url = "github:ryantm/agenix"; + nix-index-db = { url = "github:nix-community/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; - zjstatus.url = "github:dj95/zjstatus"; - systems.url = "github:nix-systems/default-linux"; + + zjstatus = { + url = "github:dj95/zjstatus"; + inputs.nixpkgs.follows = "nixpkgs"; + }; firefox-addons = { url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; }; - ooks-scripts = { - url = "git+ssh://git@github.com/ooks-io/scripts"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - ooknet-website = { - url = "git+ssh://git@github.com/ooks-io/website"; - inputs.nixpkgs.follows = "nixpkgs"; + + secrets = { + url = "git+ssh://git@github.com/ooks-io/kunzen"; + inputs = { + nixpkgs.follows = "nixpkgs"; + flake-parts.follows = "flake-parts"; + systems.follows = "systems"; + }; }; - nvf.url = "github:notashelf/nvf/v0.7"; + nvf = { + url = "github:notashelf/nvf"; + inputs = { + systems.follows = "systems"; + + nixpkgs.follows = "nixpkgs"; + flake-parts.follows = "flake-parts"; + flake-utils.follows = "flake-utils"; + }; + }; # hypr* ecosystem - hyprland.url = "github:hyprwm/hyprland"; + hyprland = { + url = "github:hyprwm/hyprland"; + inputs.systems.follows = "systems"; + }; hypridle = { url = "github:hyprwm/hypridle"; diff --git a/hosts/ooknode/default.nix b/hosts/ooknode/default.nix deleted file mode 100644 index 45572ef..0000000 --- a/hosts/ooknode/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ooknet.host = { - admin = { - name = "ooks"; - shell = "fish"; - homeManager = true; - }; - }; -} diff --git a/hosts/ooksdesk/default.nix b/hosts/ooksdesk/default.nix index 3ff6573..c237d08 100644 --- a/hosts/ooksdesk/default.nix +++ b/hosts/ooksdesk/default.nix @@ -10,6 +10,7 @@ ooknet = { host = { + syncthing.enable = true; admin = { name = "ooks"; shell = "fish"; @@ -19,11 +20,13 @@ workstation = { environment = "hyprland"; theme = "minimal"; - profiles = ["gaming" "media" "communication" "productivity"]; + profiles = ["creative" "virtualization" "gaming" "media" "communication" "productivity"]; default = { browser = "firefox"; - terminal = "foot"; + terminal = "ghostty"; }; + # FIXME + programs.ollama.enable = true; }; console = { profile = "standard"; diff --git a/hosts/ooksdesk/hardware.nix b/hosts/ooksdesk/hardware.nix index 2b9e7ef..94e6c27 100644 --- a/hosts/ooksdesk/hardware.nix +++ b/hosts/ooksdesk/hardware.nix @@ -1,17 +1,29 @@ { ooknet.hardware = { - cpu.type = "amd"; - cpu.amd.pstate.enable = true; + cpu = { + type = "amd"; + amd.pstate.enable = true; + cores = 16; + }; gpu.type = "amd"; features = ["printing" "ssd" "audio" "video"]; monitors = [ { - name = "DP-3"; + name = "DP-1"; primary = true; + width = 2560; + height = 1440; + refreshRate = 144; + x = 1920; + y = 100; + } + { + name = "DP-2"; width = 1920; height = 1080; refreshRate = 180; - workspace = "1"; + x = 840; + transform = 1; } ]; }; diff --git a/hosts/ooksmedia/default.nix b/hosts/ooksmedia/default.nix new file mode 100644 index 0000000..9acfcf5 --- /dev/null +++ b/hosts/ooksmedia/default.nix @@ -0,0 +1,30 @@ +{ + pkgs, + lib, + ... +}: { + imports = [ + ./file-system.nix + ./hardware.nix + ]; + + ooknet = { + host = { + syncthing.enable = true; + admin = { + name = "ooks"; + shell = "fish"; + homeManager = true; + }; + }; + console = { + profile = "standard"; + editor = "nvim"; + multiplexer = "zellij"; + }; + }; + + boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; + + system.stateVersion = lib.mkDefault "24.11"; +} diff --git a/hosts/ooksmedia/file-system.nix b/hosts/ooksmedia/file-system.nix new file mode 100644 index 0000000..9dfb8ed --- /dev/null +++ b/hosts/ooksmedia/file-system.nix @@ -0,0 +1,33 @@ +{ + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/50617edf-e788-49cc-9e0c-85a2f90a5550"; + fsType = "btrfs"; + options = ["subvol=root"]; + }; + "/nix" = { + device = "/dev/disk/by-uuid/50617edf-e788-49cc-9e0c-85a2f90a5550"; + fsType = "btrfs"; + options = ["subvol=nix"]; + }; + "/persist" = { + device = "/dev/disk/by-uuid/50617edf-e788-49cc-9e0c-85a2f90a5550"; + fsType = "btrfs"; + options = ["subvol=persist"]; + }; + "/swap" = { + device = "/dev/disk/by-uuid/50617edf-e788-49cc-9e0c-85a2f90a5550"; + fsType = "btrfs"; + options = ["subvol=swap"]; + }; + "/boot" = { + device = "/dev/disk/by-uuid/B511-09E2"; + fsType = "vfat"; + }; + "/jellyfin" = { + device = "/dev/disk/by-label/jellyfin"; + fsType = "btrfs"; + }; + }; + swapDevices = []; +} diff --git a/hosts/ooksmedia/hardware.nix b/hosts/ooksmedia/hardware.nix new file mode 100644 index 0000000..6ed6778 --- /dev/null +++ b/hosts/ooksmedia/hardware.nix @@ -0,0 +1,16 @@ +{ + ooknet.hardware = { + cpu.type = "intel"; + gpu.type = "nvidia"; + features = ["ssd" "audio" "video" "bluetooth"]; + monitors = [ + { + name = "DP-3"; + primary = true; + width = 1920; + height = 1080; + refreshRate = 180; + } + ]; + }; +} diff --git a/hosts/ookst480s/default.nix b/hosts/ookst480s/default.nix index cba1b03..2493c59 100644 --- a/hosts/ookst480s/default.nix +++ b/hosts/ookst480s/default.nix @@ -3,7 +3,11 @@ lib, ... }: { - imports = [./file-system.nix]; + imports = [ + ./file-system.nix + ./hardware.nix + ]; + ooknet = { host = { admin = { @@ -13,34 +17,13 @@ }; }; workstation = { - profiles = ["media" "gaming" "communication"]; + profiles = ["media" "communication"]; environment = "hyprland"; theme = "minimal"; }; console = { profile = "standard"; }; - hardware = { - cpu.type = "intel"; - gpu.type = "intel"; - features = [ - "bluetooth" - "backlight" - "battery" - "ssd" - "audio" - "video" - ]; - monitors = [ - { - primary = true; - name = "eDP-1"; - width = 1920; - height = 1080; - workspace = "1"; - } - ]; - }; }; boot.kernelPackages = pkgs.linuxKernel.packages.linux_zen; system.stateVersion = lib.mkDefault "23.11"; diff --git a/hosts/ookst480s/file-system.nix b/hosts/ookst480s/file-system.nix index 8516afa..30dbf89 100644 --- a/hosts/ookst480s/file-system.nix +++ b/hosts/ookst480s/file-system.nix @@ -1,63 +1,35 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. { - config, - lib, - modulesPath, - ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; - fsType = "btrfs"; - options = ["subvol=root"]; - }; - boot.initrd.luks.devices."cryptnix".device = "/dev/disk/by-uuid/014d725c-bf13-40a2-a9ab-0dd6185a95f6"; - fileSystems."/nix" = { - device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; - fsType = "btrfs"; - options = ["subvol=nix"]; - }; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; + fsType = "btrfs"; + options = ["subvol=root"]; + }; - fileSystems."/persist" = { - device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; - fsType = "btrfs"; - options = ["subvol=persist"]; - }; + "/nix" = { + device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; + fsType = "btrfs"; + options = ["subvol=nix"]; + }; - fileSystems."/swap" = { - device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; - fsType = "btrfs"; - options = ["subvol=swap"]; - }; + "/persist" = { + device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; + fsType = "btrfs"; + options = ["subvol=persist"]; + }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/F356-6F9C"; - fsType = "vfat"; - }; + "/swap" = { + device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283"; + fsType = "btrfs"; + options = ["subvol=swap"]; + }; + "/boot" = { + device = "/dev/disk/by-uuid/F356-6F9C"; + fsType = "vfat"; + }; + }; swapDevices = []; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp61s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wwan0.useDHCP = lib.mkDefault true; - - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/ookst480s/hardware.nix b/hosts/ookst480s/hardware.nix new file mode 100644 index 0000000..73dff74 --- /dev/null +++ b/hosts/ookst480s/hardware.nix @@ -0,0 +1,22 @@ +{ + ooknet.hardware = { + cpu.type = "intel"; + gpu.type = "intel"; + features = [ + "bluetooth" + "backlight" + "battery" + "ssd" + "audio" + "video" + ]; + monitors = [ + { + primary = true; + name = "eDP-1"; + width = 1920; + height = 1080; + } + ]; + }; +} diff --git a/hosts/ookst480s/host.nix b/hosts/ookst480s/host.nix deleted file mode 100644 index e69de29..0000000 diff --git a/hosts/ookst480s/workstation.nix b/hosts/ookst480s/workstation.nix deleted file mode 100644 index 39fce43..0000000 --- a/hosts/ookst480s/workstation.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - config = { - ooknet.workstation = { - appearance = { - theme = "minimal"; - }; - desktop = { - environment = "hyprland"; - }; - }; - }; -} diff --git a/modules/home/base/home-manager.nix b/modules/home/base/home-manager.nix index cfbf6eb..5431cc6 100644 --- a/modules/home/base/home-manager.nix +++ b/modules/home/base/home-manager.nix @@ -1,10 +1,8 @@ { - lib, config, osConfig, ... }: let - inherit (lib) mkDefault; inherit (osConfig.ooknet.host) admin; in { programs.home-manager.enable = true; @@ -13,7 +11,7 @@ in { home = { username = admin.name; homeDirectory = "/home/${config.home.username}"; - stateVersion = mkDefault "22.05"; + stateVersion = "22.05"; sessionPath = ["${config.home.homeDirectory}/.local/bin"]; }; diff --git a/modules/home/base/userDirs.nix b/modules/home/base/userDirs.nix index 000a2f2..87bb54a 100644 --- a/modules/home/base/userDirs.nix +++ b/modules/home/base/userDirs.nix @@ -6,18 +6,21 @@ dataHome = "${config.home.homeDirectory}/.local/share"; stateHome = "${config.home.homeDirectory}/.local/state"; - userDirs = { + userDirs = let + summit = "${config.home.homeDirectory}/Summit"; + in { enable = true; createDirectories = true; desktop = "${config.home.homeDirectory}/Desktop"; - documents = "${config.home.homeDirectory}/Documents"; - music = "${config.home.homeDirectory}/Media/Music"; - videos = "${config.home.homeDirectory}/Media/Videos"; - pictures = "${config.home.homeDirectory}/Media/Pictures"; + documents = "${summit}/Documents"; + music = "${summit}/Media/Music"; + videos = "${summit}/Media/Videos"; + pictures = "${summit}/Media/Pictures"; extraConfig = { XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots"; - XDG_CODE_DIR = "${config.home.homeDirectory}/Code"; + XDG_CODE_DIR = "${summit}/code"; XDG_RECORDINGS_DIR = "${config.xdg.userDirs.videos}/Recordings"; + XDG_NOTES_DIR = "${summit}/notes"; }; }; }; diff --git a/modules/home/console/shell/fish/aliases.nix b/modules/home/console/shell/fish/aliases.nix index bf6494c..16254ea 100644 --- a/modules/home/console/shell/fish/aliases.nix +++ b/modules/home/console/shell/fish/aliases.nix @@ -13,10 +13,12 @@ in { lst = "${getExe eza} -T -L 5 --icons --group-directories-first"; du = "${getExe dust}"; gitroot = "cd (git rev-parse --show-toplevel)"; + gitedit = "cd (git rev-parse --show-toplevel); nvim -c 'Telescope find_files'; cd -"; }; shellAbbrs = { f = "cd $FLAKE"; - fe = "$EDITOR $FLAKE"; + s = "cd $KUNZEN"; + fe = "$EDITOR (git rev-parse --show-toplevel) -c 'Telescope find_files'"; nswitch = "${getExe nh} os switch"; }; diff --git a/modules/home/console/shell/fish/binds.nix b/modules/home/console/shell/fish/binds.nix index 3d35402..8fb9f74 100644 --- a/modules/home/console/shell/fish/binds.nix +++ b/modules/home/console/shell/fish/binds.nix @@ -2,7 +2,7 @@ programs.fish = { functions = { fish_user_key_bindings = '' - bind --preset -M insert \cf nvim '+Telescope find_files' $FLAKE + bind --preset -M insert \cf gitedit bind --preset -M insert \ec fzf_cd_widget ''; }; diff --git a/modules/home/console/tools/btop.nix b/modules/home/console/tools/btop.nix index f23188f..7ea9550 100644 --- a/modules/home/console/tools/btop.nix +++ b/modules/home/console/tools/btop.nix @@ -1,14 +1,72 @@ { lib, osConfig, + hozen, ... }: let inherit (lib) mkIf; + inherit (hozen) color; cfg = osConfig.ooknet.console.tools.btop; in { config = mkIf cfg.enable { programs.btop = { enable = true; + settings = { + theme_background = false; + color_theme = "${color.slug}"; + rounded_corners = false; + proc_gradient = false; + }; }; + xdg.configFile."btop/themes/${color.slug}.theme".text = '' + theme[main_bg]="#${color.layout.body}" + theme[main_fg]="#${color.typography.text}" + + theme[title]="#${color.typography.text}" + theme[hi_fg]="#${color.primary.base}" + theme[selected_bg]="#${color.typography.text}" + theme[selected_fg]="#${color.typography.contrast-text}" + theme[inactive_fg]="#${color.typography.contrast-text}" + + theme[graph_text]="#${color.typography.text}" + theme[proc_misc]="#${color.green.base}" + + theme[cpu_box]="#${color.secondary.base}" + theme[mem_box]="#${color.secondary.base}" + theme[proc_box]="#${color.secondary.base}" + theme[net_box]="#${color.secondary.base}" + + theme[temp_start]="#${color.green.base}" + theme[temp_mid]="#${color.orange.base}" + theme[temp_end]="#${color.red.base}" + + theme[cpu_start]="#${color.teal.base}" + theme[cpu_mid]="#${color.teal.hard1}" + theme[cpu_end]="#${color.teal.hard2}" + + theme[free_start]="#${color.blue.base}" + theme[free_mid]="#${color.blue.hard1}" + theme[free_end]="#${color.blue.hard2}" + + theme[available_start]="#${color.orange.base}" + theme[available_mid]="#${color.orange.hard1}" + theme[available_end]="#${color.orange.hard2}" + + theme[used_start]="#${color.green.base}" + theme[used_mid]="#${color.green.soft1}" + theme[used_end]="#${color.green.soft2}" + + theme[download_start]="#${color.purple.base}" + theme[download_mid]="#${color.purple.hard1}" + theme[download_end]="#${color.purple.hard2}" + + theme[upload_start]="#${color.yellow.base}" + theme[upload_mid]="#${color.yellow.hard1}" + theme[upload_end]="#${color.yellow.hard2}" + + theme[process_start]="#${color.green.base}" + theme[process_mid]="#${color.orange.base}" + theme[process_end]="#${color.red.base}" + ''; }; } diff --git a/modules/home/console/tools/default.nix b/modules/home/console/tools/default.nix index a65e3b4..d79fdcf 100644 --- a/modules/home/console/tools/default.nix +++ b/modules/home/console/tools/default.nix @@ -1,6 +1,8 @@ { imports = [ ./bat.nix + ./vale.nix + ./networking.nix ./btop.nix ./git.nix ./fzf.nix diff --git a/modules/home/console/tools/editor/neovim.nix b/modules/home/console/tools/editor/neovim.nix index ef9f32b..5f55570 100644 --- a/modules/home/console/tools/editor/neovim.nix +++ b/modules/home/console/tools/editor/neovim.nix @@ -14,4 +14,3 @@ in { home.sessionVariables.EDITOR = mkIf (console.editor == "nvim") "nvim"; }; } - diff --git a/modules/home/console/tools/multiplexer/zellij/default.nix b/modules/home/console/tools/multiplexer/zellij/default.nix index fa85919..6e13853 100644 --- a/modules/home/console/tools/multiplexer/zellij/default.nix +++ b/modules/home/console/tools/multiplexer/zellij/default.nix @@ -1,54 +1,73 @@ { osConfig, - config, lib, - pkgs, + hozen, ... }: let - inherit (osConfig.ooknet.appearance.colorscheme) slug palette; + inherit (hozen) color; inherit (osConfig.ooknet) console; inherit (osConfig.ooknet.host) admin; inherit (lib) mkIf; cfg = osConfig.ooknet.console.tools.zellij; in { + imports = [./options.nix]; config = mkIf (cfg.enable || console.multiplexer == "zellij") { programs.zellij = { enable = true; settings = { - theme = "${slug}"; + theme = "${color.slug}"; default_shell = "${admin.shell}"; default_layout = "default"; pane_frames = false; scrollback_editor = "${console.editor}"; themes = { - "${slug}" = { - fg = "#${palette.base05}"; - bg = "#${palette.base00}"; - black = "#${palette.base00}"; - red = "#${palette.base08}"; - green = "#${palette.base0B}"; - yellow = "#${palette.base0A}"; - blue = "#${palette.base0D}"; - magenta = "#${palette.base0E}"; - cyan = "#${palette.base0C}"; - white = "#${palette.base05}"; - orange = "#${palette.base09}"; + "${color.slug}" = { + fg = "#${color.base05}"; + bg = "#${color.base00}"; + black = "#${color.base00}"; + red = "#${color.base08}"; + green = "#${color.base0B}"; + yellow = "#${color.base0A}"; + blue = "#${color.base0D}"; + magenta = "#${color.base0E}"; + cyan = "#${color.base0C}"; + white = "#${color.base05}"; + orange = "#${color.base09}"; }; }; }; - }; - # Layouts - xdg.configFile = { - # Default layout - "zellij/layouts/default.kdl" = import ./layouts/defaultLayout.nix {inherit pkgs config osConfig;}; - # Layout for bash scripts - "zellij/layouts/script.kdl" = import ./layouts/scriptLayout.nix {inherit pkgs config osConfig;}; - # Layout for configuring my flake - "zellij/layouts/flake.kdl" = import ./layouts/flakeLayout.nix {inherit pkgs config osConfig;}; - # Additional keybinds - "zellij/config.kdl".text = + # layout configurations + layouts = { + default = { + tabs = + #kdl + '' + tab name="terminal" focus=true { + pane name="term" focus=true + } + ''; + }; + flake = { + tabs = + # kdl + '' + tab name="terminal" focus=true { + pane name="term" cwd="$FLAKE" focus=true + } + tab name="editor" { + pane name="edit" edit="$FLAKE" + } + tab name="git" { + pane name="git" cwd="$FLAKE" command="lazygit" + } + ''; + }; + }; + + # keybind configuration + extraSettings = # kdl '' keybinds clear-defaults=true { @@ -56,7 +75,7 @@ in { bind "Alt 1" { GoToTab 1; } bind "Alt 2" { GoToTab 2; } bind "Alt 3" { GoToTab 3; } - bind "Alt 4" { GoToTab 4; } + bind "Alt 4" { GoToTab 4; } bind "Alt 5" { GoToTab 5; } bind "Alt 6" { GoToTab 6; } bind "Alt 7" { GoToTab 7; } diff --git a/modules/home/console/tools/multiplexer/zellij/layouts/defaultLayout.nix b/modules/home/console/tools/multiplexer/zellij/layouts/defaultLayout.nix deleted file mode 100644 index 81ecb4b..0000000 --- a/modules/home/console/tools/multiplexer/zellij/layouts/defaultLayout.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ - pkgs, - osConfig, - ... -}: let - inherit (osConfig.ooknet.appearance.colorscheme) palette; -in { - text = - # kdl - '' - layout { - default_tab_template { - pane size=2 borderless=true { - plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" { - format_left "{mode}" - format_right "{session} {command_git_branch} {datetime}" - format_center "#[fg=#${palette.base0D},bold] {tabs}" - format_space "" - - border_enabled "true" - border_char "─" - border_format "#[fg=#${palette.base05}]{char}" - border_position "bottom" - - hide_frame_for_single_pane "true" - - mode_normal "#[fg=#${palette.base0D}] " - mode_tmux "#[fg=#${palette.base0E}] " - mode_pane "#[fg=#${palette.base08}] " - mode_tab "#[fg=#${palette.base08}] " - mode_rename_tab "#[fg=#${palette.base08}] " - mode_rename_pane "#[fg=#${palette.base08}] " - mode_session "#[fg=#${palette.base08}] " - mode_locked "#[fg=#${palette.base05}] " - mode_move "#[fg=#${palette.base0B}] " - mode_resize "#[fg=#${palette.base0B}] " - mode_prompt "#[fg=#${palette.base0A}] " - mode_search "#[fg=#${palette.base0A}] " - mode_enter_search "#[fg=#${palette.base0A}] " - - tab_normal "#[bg=#${palette.base01}] {name} " - tab_active "#[bg=#${palette.base02}] {name} " - tab_separator " " - - command_git_branch_command "git rev-parse --abbrev-ref HEAD" - command_git_branch_format "#[fg=#${palette.base0C}] {stdout} " - command_git_branch_interval "10" - command_git_branch_rendermode "static" - - datetime "#[fg=#${palette.base05},bold] {format} " - datetime_format "%I:%M %p" - datetime_timezone "${osConfig.time.timeZone}" - } - } - children - } - tab name="terminal" focus=true { - pane name="term" focus=true - } - } - ''; -} diff --git a/modules/home/console/tools/multiplexer/zellij/layouts/flakeLayout.nix b/modules/home/console/tools/multiplexer/zellij/layouts/flakeLayout.nix deleted file mode 100644 index 565ba13..0000000 --- a/modules/home/console/tools/multiplexer/zellij/layouts/flakeLayout.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ - pkgs, - osConfig, - ... -}: let - inherit (osConfig.ooknet.appearance.colorscheme) palette; -in { - text = - /* - kdl - */ - '' - layout { - default_tab_template { - pane size=2 borderless=true { - plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" { - format_left "{mode}" - format_right "{session} {command_git_branch} {datetime}" - format_center "#[fg=#${palette.base0D},bold] {tabs}" - format_space "" - - border_enabled "true" - border_char "─" - border_format "#[fg=#${palette.base05}]{char}" - border_position "bottom" - - hide_frame_for_single_pane "true" - - mode_normal "#[fg=#${palette.base0D}] " - mode_tmux "#[fg=#${palette.base0E}] " - mode_pane "#[fg=#${palette.base08}] " - mode_tab "#[fg=#${palette.base08}] " - mode_rename_tab "#[fg=#${palette.base08}] " - mode_rename_pane "#[fg=#${palette.base08}] " - mode_session "#[fg=#${palette.base08}] " - mode_locked "#[fg=#${palette.base05}] " - mode_move "#[fg=#${palette.base0B}] " - mode_resize "#[fg=#${palette.base0B}] " - mode_prompt "#[fg=#${palette.base0A}] " - mode_search "#[fg=#${palette.base0A}] " - mode_enter_search "#[fg=#${palette.base0A}] " - - tab_normal "#[bg=#${palette.base01}] {name} " - tab_active "#[bg=#${palette.base02}] {name} " - tab_separator " " - - command_git_branch_command "git rev-parse --abbrev-ref HEAD" - command_git_branch_format "#[fg=#${palette.base0C}] {stdout} " - command_git_branch_interval "10" - command_git_branch_rendermode "static" - - datetime "#[fg=#${palette.base05},bold] {format} " - datetime_format "%I:%M %p" - datetime_timezone "${osConfig.time.timeZone}" - } - } - children - } - tab name="terminal" focus=true { - pane name="term" cwd="$FLAKE" focus=true - } - tab name="editor" { - pane name="edit" edit="$FLAKE" - } - tab name="git" { - pane name="git" cwd="$FLAKE" command="lazygit" - } - } - ''; -} diff --git a/modules/home/console/tools/multiplexer/zellij/layouts/scriptLayout.nix b/modules/home/console/tools/multiplexer/zellij/layouts/scriptLayout.nix deleted file mode 100644 index a1c7e9a..0000000 --- a/modules/home/console/tools/multiplexer/zellij/layouts/scriptLayout.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ - pkgs, - osConfig, - ... -}: let - inherit (osConfig.ooknet.appearance.colorscheme) palette; -in { - text = - /* - kdl - */ - '' - layout { - default_tab_template { - pane size=2 borderless=true { - plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" { - format_left "{mode}" - format_right "{session} {command_git_branch} {datetime}" - format_center "#[fg=#${palette.base0D},bold] {tabs}" - format_space "" - - border_enabled "true" - border_char "─" - border_format "#[fg=#${palette.base05}]{char}" - border_position "bottom" - - hide_frame_for_single_pane "true" - - mode_normal "#[fg=#${palette.base0D}] " - mode_tmux "#[fg=#${palette.base0E}] " - mode_pane "#[fg=#${palette.base08}] " - mode_tab "#[fg=#${palette.base08}] " - mode_rename_tab "#[fg=#${palette.base08}] " - mode_rename_pane "#[fg=#${palette.base08}] " - mode_session "#[fg=#${palette.base08}] " - mode_locked "#[fg=#${palette.base05}] " - mode_move "#[fg=#${palette.base0B}] " - mode_resize "#[fg=#${palette.base0B}] " - mode_prompt "#[fg=#${palette.base0A}] " - mode_search "#[fg=#${palette.base0A}] " - mode_enter_search "#[fg=#${palette.base0A}] " - - tab_normal "#[bg=#${palette.base01}] {name} " - tab_active "#[bg=#${palette.base02}] {name} " - tab_separator " " - - command_git_branch_command "git rev-parse --abbrev-ref HEAD" - command_git_branch_format "#[fg=#${palette.base0C}] {stdout} " - command_git_branch_interval "10" - command_git_branch_rendermode "static" - - datetime "#[fg=#${palette.base05},bold] {format} " - datetime_format "%I:%M %p" - datetime_timezone "${osConfig.time.timeZone}" - } - } - children - } - tab name="edit" focus=true { - pane edit="./" name="edit" focus=true size="85%" borderless=true - pane name="term" focus=false size="15%" borderless=false - } - tab name="git" focus=false { - pane name="git" focus=false command="lazygit" - } - } - ''; -} diff --git a/modules/home/console/tools/multiplexer/zellij/options.nix b/modules/home/console/tools/multiplexer/zellij/options.nix new file mode 100644 index 0000000..289bc6d --- /dev/null +++ b/modules/home/console/tools/multiplexer/zellij/options.nix @@ -0,0 +1,115 @@ +{ + lib, + config, + inputs', + osConfig, + hozen, + ... +}: let + inherit (hozen) color; + inherit (lib) optionalAttrs mapAttrs' nameValuePair mkIf mkOption; + inherit (lib.types) nullOr lines submodule str attrsOf; + + cfg = config.programs.zellij; + + mkZellijLayout = { + zjstatus, + icon ? "", + timeZone, + tabs ? '''', + }: + # kdl + '' + layout { + default_tab_template { + pane size=2 borderless=true { + plugin location="file:${zjstatus}" { + format_left "{mode}" + format_right "{session} {datetime}" + format_center "#[fg=#${color.base0D},bold] {tabs}" + format_space "" + + border_enabled "true" + border_char "─" + border_format "#[fg=#${color.base05}]{char}" + border_position "bottom" + + hide_frame_for_single_pane "true" + + mode_normal "#[fg=#${color.base0D}]${icon} " + mode_tmux "#[fg=#${color.base0E}]${icon} " + mode_pane "#[fg=#${color.base08}]${icon} " + mode_tab "#[fg=#${color.base08}]${icon} " + mode_rename_tab "#[fg=#${color.base08}]${icon} " + mode_rename_pane "#[fg=#${color.base08}]${icon} " + mode_session "#[fg=#${color.base08}]${icon} " + mode_locked "#[fg=#${color.base05}]${icon} " + mode_move "#[fg=#${color.base0B}]${icon} " + mode_resize "#[fg=#${color.base0B}]${icon} " + mode_prompt "#[fg=#${color.base0A}]${icon} " + mode_search "#[fg=#${color.base0A}]${icon} " + mode_enter_search "#[fg=#${color.base0A}]${icon} " + + tab_normal "#[bg=#${color.base01}] {name} " + tab_active "#[bg=#${color.base02}] {name} " + tab_separator " " + + datetime "#[fg=#${color.base05},bold] {format} " + datetime_format "%I:%M %p" + datetime_timezone "${timeZone}" + } + } + children + } + ${tabs} + } + ''; + + layoutModule = submodule { + options = { + icon = mkOption { + type = str; + description = "Icon to display on the status bar"; + default = ""; + }; + timeZone = mkOption { + type = str; + description = "Timezone for the datetime display"; + default = osConfig.time.timeZone; + }; + zjstatus = mkOption { + type = str; + default = "${inputs'.zjstatus.packages.default}/bin/zjstatus.wasm"; + }; + tabs = mkOption { + type = lines; + default = ''''; + description = "KDL configuration for layouts tabs"; + }; + }; + }; +in { + options.programs.zellij = { + # TODO: turn this into a binds options + extraSettings = mkOption { + type = nullOr lines; + default = null; + description = "Additional settings in KDL format"; + }; + layouts = mkOption { + type = attrsOf layoutModule; + description = "Zellij layouts with zjstatus"; + }; + }; + config = mkIf cfg.enable { + xdg.configFile = + mapAttrs' (name: layout: + nameValuePair "zellij/layouts/${name}.kdl" { + text = mkZellijLayout layout; + }) + cfg.layouts + // optionalAttrs (cfg.extraSettings != null) { + "zellij/config.kdl".text = cfg.extraSettings; + }; + }; +} diff --git a/modules/home/console/tools/networking.nix b/modules/home/console/tools/networking.nix new file mode 100644 index 0000000..b776e42 --- /dev/null +++ b/modules/home/console/tools/networking.nix @@ -0,0 +1,13 @@ +{pkgs, ...}: let + inherit (builtins) attrValues; +in { + home.packages = attrValues { + inherit + (pkgs) + traceroute + mtr + dig + nmap + ; + }; +} diff --git a/modules/home/console/tools/starship.nix b/modules/home/console/tools/starship.nix index deb4449..fbefb51 100644 --- a/modules/home/console/tools/starship.nix +++ b/modules/home/console/tools/starship.nix @@ -5,10 +5,13 @@ }: let cfg = osConfig.ooknet.console.tools.starship; inherit (lib) concatStrings mkIf; + inherit (osConfig.ooknet.host) admin; in { config = mkIf cfg.enable { programs.starship = { enable = true; + enableTransience = admin.shell == "fish"; + enableInteractive = false; settings = { format = concatStrings [ "$username" @@ -27,6 +30,14 @@ in { directory = { truncation_length = 0; truncate_to_repo = true; + substitutions = { + "Documents" = " Documents"; + "Downloads" = " Downloads"; + "Music" = " Music"; + "Pictures" = " Picures"; + "Screenshots" = "󰹑 Screenshots"; + "Summit" = " "; + }; }; fill = { @@ -51,9 +62,9 @@ in { elixir.symbol = " "; elm.symbol = " "; gcloud.symbol = " "; - git_branch.symbol = " "; + git_branch.symbol = ""; golang.symbol = " "; - hg_branch.symbol = " "; + hg_branch.symbol = ""; java.symbol = " "; julia.symbol = " "; memory_usage.symbol = "󰍛 "; diff --git a/modules/home/console/tools/utils.nix b/modules/home/console/tools/utils.nix index 5354ff6..641ab9c 100644 --- a/modules/home/console/tools/utils.nix +++ b/modules/home/console/tools/utils.nix @@ -15,32 +15,26 @@ in { inherit (pkgs) bc # Calculator - + # file utility - duf du-dust fd ripgrep # archive - zip unzip unrar # file transfer - rsync wget httpie # Better curl - + # resource manager - powertop #shell scripting - gum # audio ctrl - pamixer diffsitter # Better diff jq # JSON pretty printer and manipulator @@ -49,15 +43,14 @@ in { killall acpi # Notifications - libnotify # Nix tooling - alejandra + cachix ; #AI - inherit (self'.packages) repopack; + inherit (self'.packages) repomix; }; }; } diff --git a/modules/home/console/tools/vale.nix b/modules/home/console/tools/vale.nix new file mode 100644 index 0000000..206ed99 --- /dev/null +++ b/modules/home/console/tools/vale.nix @@ -0,0 +1,29 @@ +{self, ...}: { + imports = [ + self.homeManagerModules.vale + ]; + programs.vale = { + enable = true; + styles = [ + "microsoft" + "write-good" + "alex" + "readability" + "proselint" + ]; + globalSettings = { + MinAlertLevel = "suggestion"; + }; + formatSettings = { + "*.{md,txt,tex}" = { + BasedOnStyles = [ + "proselint" + "alex" + "Readability" + "Microsoft" + ]; + "Microsoft.Acronyms" = "NO"; + }; + }; + }; +} diff --git a/modules/home/workstation/appearance/default.nix b/modules/home/workstation/appearance/default.nix index 662d776..7a7f605 100644 --- a/modules/home/workstation/appearance/default.nix +++ b/modules/home/workstation/appearance/default.nix @@ -1,6 +1,6 @@ { imports = [ - ./qt.nix + ./qt ./gtk.nix ./fonts.nix ./cursor.nix diff --git a/modules/home/workstation/appearance/fonts.nix b/modules/home/workstation/appearance/fonts.nix index 2354d11..b2c21be 100644 --- a/modules/home/workstation/appearance/fonts.nix +++ b/modules/home/workstation/appearance/fonts.nix @@ -1,17 +1,22 @@ { osConfig, pkgs, + lib, ... }: let inherit (osConfig.ooknet.appearance.fonts) monospace regular; + inherit (lib) optionals; in { fonts.fontconfig.enable = true; - home.packages = [ - monospace.package - regular.package + home.packages = + [ + monospace.package + regular.package - pkgs.noto-fonts - pkgs.noto-fonts-cjk-sans - pkgs.noto-fonts-emoji - ]; + pkgs.noto-fonts + pkgs.noto-fonts-cjk-sans + pkgs.noto-fonts-emoji + pkgs.nerd-fonts.symbols-only + ] + ++ optionals (monospace.fallback != null) [monospace.fallback.package]; } diff --git a/modules/home/workstation/appearance/gtk.nix b/modules/home/workstation/appearance/gtk.nix index e6229d4..35ed7b5 100644 --- a/modules/home/workstation/appearance/gtk.nix +++ b/modules/home/workstation/appearance/gtk.nix @@ -1,11 +1,12 @@ { osConfig, + hozen, pkgs, ... }: let inherit (osConfig.ooknet.appearance) fonts; - gtkCss = import ./gtkCss.nix {inherit osConfig;}; + gtkCss = import ./gtkCss.nix {inherit hozen;}; in { config = rec { gtk = { @@ -30,7 +31,10 @@ in { gtk4.extraConfig.gtk-application-prefer-dark-theme = true; }; - dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; + dconf.settings = { + "org/gnome/desktop/interface".color-scheme = "prefer-dark"; + "org/gtk/Settings/Debug".enable-inspector-keybinding = true; + }; #TODO: add gtk css configuration diff --git a/modules/home/workstation/appearance/gtkCss.nix b/modules/home/workstation/appearance/gtkCss.nix index 6f72f40..ee93d39 100644 --- a/modules/home/workstation/appearance/gtkCss.nix +++ b/modules/home/workstation/appearance/gtkCss.nix @@ -1,94 +1,106 @@ -{osConfig}: let - inherit (osConfig.ooknet.appearance.colorscheme) palette; +{hozen}: let + inherit (hozen) color; in - with palette; - #css - '' + /* + css + */ + '' - @define-color accent_color #${green}; - @define-color accent_bg_color #${text}; - @define-color accent_fg_color #${mantle}; - @define-color destructive_color #${blue}; - @define-color destructive_bg_color #${dull-blue}; - @define-color destructive_fg_color #${text}; - @define-color success_color #${cyan}; - @define-color success_bg_color #${green}; - @define-color success_fg_color #${text}; - @define-color warning_color #${yellow}; - @define-color warning_bg_color #${red}; - @define-color warning_fg_color #${text}; - @define-color error_color #${red}; - @define-color error_bg_color #${dull-red}; - @define-color error_fg_color #${text}; - @define-color window_bg_color #${crust}; - @define-color window_fg_color #${text}; - @define-color view_bg_color #${mantle}; - @define-color view_fg_color #${text}; - @define-color sidebar_bg_color #${crust}; - @define-color sidebar_fg_color #${text}; - @define-color sidebar_backdrop_color @window_bg_color; - @define-color sidebar_shade_color rgba(0, 0, 0, 0.07); - @define-color secondary_sidebar_bg_color @sidebar_bg_color; - @define-color secondary_sidebar_fg_color @sidebar_fg_color; - @define-color secondary_sidebar_backdrop_color @sidebar_backdrop_color; - @define-color secondary_sidebar_shade_color @sidebar_shade_color; - @define-color headerbar_bg_color #${base}; - @define-color headerbar_fg_color #${text}; - @define-color headerbar_border_color #${text}; - @define-color headerbar_backdrop_color @window_bg_color; - @define-color headerbar_shade_color rgba(0, 0, 0, 0.36); - @define-color card_bg_color rgba(255, 255, 255, 0.08); - @define-color card_fg_color #${text}; - @define-color card_shade_color rgba(0, 0, 0, 0.36); - @define-color dialog_bg_color #${mantle}; - @define-color dialog_fg_color #${text}; - @define-color popover_bg_color #${mantle}; - @define-color popover_fg_color #${text}; - @define-color shade_color rgba(0,0,0,0.36); - @define-color scrollbar_outline_color rgba(0,0,0,0.5); - @define-color blue_1 #${blue}; - @define-color blue_2 #${blue}; - @define-color blue_3 #${blue}; - @define-color blue_4 #${blue}; - @define-color blue_5 #${blue}; - @define-color green_1 #b8bb26; - @define-color green_2 #b8bb26; - @define-color green_3 #b8bb26; - @define-color green_4 #b8bb26; - @define-color green_5 #b8bb26; - @define-color yellow_1 #fabd2f; - @define-color yellow_2 #fabd2f; - @define-color yellow_3 #fabd2f; - @define-color yellow_4 #fabd2f; - @define-color yellow_5 #fabd2f; - @define-color orange_1 #fe8019; - @define-color orange_2 #fe8019; - @define-color orange_3 #fe8019; - @define-color orange_4 #fe8019; - @define-color orange_5 #fe8019; - @define-color red_1 #fb4934; - @define-color red_2 #fb4934; - @define-color red_3 #fb4934; - @define-color red_4 #fb4934; - @define-color red_5 #fb4934; - @define-color purple_1 #d3869b; - @define-color purple_2 #d3869b; - @define-color purple_3 #d3869b; - @define-color purple_4 #d3869b; - @define-color purple_5 #d3869b; - @define-color brown_1 #d65d0e; - @define-color brown_2 #d65d0e; - @define-color brown_3 #d65d0e; - @define-color brown_4 #d65d0e; - @define-color brown_5 #d65d0e; - @define-color light_1 #${base05}; - @define-color light_2 #${base06}; - @define-color light_3 #${base07}; - @define-color light_4 #${base07}; - @define-color light_5 #${base07}; - @define-color dark_1 #${base00}; - @define-color dark_2 #${base01}; - @define-color dark_3 #${base02}; - @define-color dark_4 #${base03}; - @define-color dark_5 #${base04}; - '' + @define-color accent_color #${color.primary.base}; + @define-color accent_bg_color #${color.primary.soft1}; + @define-color accent_fg_color #${color.layout.menu}; + + @define-color destructive_color #${color.blue.base}; + @define-color destructive_bg_color #${color.blue.soft2}; + @define-color destructive_fg_color #${color.typography.text}; + + @define-color success_color #${color.success.base}; + @define-color success_bg_color #${color.success.bg}; + @define-color success_fg_color #${color.success.fg}; + + @define-color warning_color #${color.warning.base}; + @define-color warning_bg_color #${color.warning.bg}; + @define-color warning_fg_color #${color.warning.fg}; + + @define-color error_color #${color.error.base}; + @define-color error_bg_color #${color.error.bg}; + @define-color error_fg_color #${color.error.fg}; + + @define-color window_bg_color #${color.layout.menu}; + @define-color window_fg_color #${color.typography.text}; + + @define-color view_bg_color #${color.layout.body}; + @define-color view_fg_color #${color.typography.text}; + + @define-color sidebar_bg_color #${color.layout.menu}; + @define-color sidebar_fg_color #${color.typography.text}; + @define-color sidebar_backdrop_color @window_bg_color; + @define-color sidebar_shade_color rgba(0, 0, 0, 0.07); + @define-color secondary_sidebar_bg_color @sidebar_bg_color; + @define-color secondary_sidebar_fg_color @sidebar_fg_color; + @define-color secondary_sidebar_backdrop_color @sidebar_backdrop_color; + @define-color secondary_sidebar_shade_color @sidebar_shade_color; + @define-color headerbar_bg_color #${color.layout.header}; + @define-color headerbar_fg_color #${color.typography.text}; + @define-color headerbar_border_color #${color.border.base}; + @define-color headerbar_backdrop_color @window_bg_color; + @define-color headerbar_shade_color rgba(0, 0, 0, 0.36); + @define-color card_bg_color rgba(255, 255, 255, 0.08); + @define-color card_fg_color #${color.typography.text}; + @define-color card_shade_color rgba(0, 0, 0, 0.36); + @define-color dialog_bg_color #${color.layout.body}; + @define-color dialog_fg_color #${color.typography.text}; + @define-color popover_bg_color #${color.layout.menu}; + @define-color popover_fg_color #${color.typography.text}; + @define-color shade_color rgba(0,0,0,0.36); + @define-color scrollbar_outline_color rgba(0,0,0,0.5); + @define-color blue_1 #${color.blue.base}; + @define-color blue_2 #${color.blue.base}; + @define-color blue_3 #${color.blue.base}; + @define-color blue_4 #${color.blue.base}; + @define-color blue_5 #${color.blue.base}; + @define-color green_1 #${color.green.base}; + @define-color green_2 #${color.green.base}; + @define-color green_3 #${color.green.base}; + @define-color green_4 #${color.green.base}; + @define-color green_5 #${color.green.base}; + @define-color yellow_1 #${color.yellow.base}; + @define-color yellow_2 #${color.yellow.base}; + @define-color yellow_3 #${color.yellow.base}; + @define-color yellow_4 #${color.yellow.base}; + @define-color yellow_5 #${color.yellow.base}; + @define-color orange_1 #${color.orange.base}; + @define-color orange_2 #${color.orange.base}; + @define-color orange_3 #${color.orange.base}; + @define-color orange_4 #${color.orange.base}; + @define-color orange_5 #${color.orange.base}; + @define-color red_1 #${color.red.base}; + @define-color red_2 #${color.red.base}; + @define-color red_3 #${color.red.base}; + @define-color red_4 #${color.red.base}; + @define-color red_5 #${color.red.base}; + @define-color purple_1 #${color.purple.base}; + @define-color purple_2 #${color.purple.base}; + @define-color purple_3 #${color.purple.base}; + @define-color purple_4 #${color.purple.base}; + @define-color purple_5 #${color.purple.base}; + @define-color brown_1 #${color.brown.base}; + @define-color brown_2 #${color.brown.base}; + @define-color brown_3 #${color.brown.base}; + @define-color brown_4 #${color.brown.base}; + @define-color brown_5 #${color.brown.base}; + @define-color light_1 #${color.neutrals."250"}; + @define-color light_2 #${color.neutrals."200"}; + @define-color light_3 #${color.neutrals."150"}; + @define-color light_4 #${color.neutrals."100"}; + @define-color light_5 #${color.neutrals."50"}; + @define-color dark_1 #${color.neutrals."700"}; + @define-color dark_2 #${color.neutrals."750"}; + @define-color dark_3 #${color.neutrals."800"}; + @define-color dark_4 #${color.neutrals."850"}; + @define-color dark_5 #${color.neutrals."900"}; + + * { + border-radius: 0; + } + '' diff --git a/modules/home/workstation/appearance/qt.nix b/modules/home/workstation/appearance/qt.nix deleted file mode 100644 index 3ad74c8..0000000 --- a/modules/home/workstation/appearance/qt.nix +++ /dev/null @@ -1,16 +0,0 @@ -{pkgs, ...}: { - qt = { - enable = true; - style.name = "gtk2"; - platformTheme.name = "gtk2"; - }; - - home.packages = with pkgs; [ - libsForQt5.qt5.qtwayland - kdePackages.qtwayland - qt6.qtwayland - kdePackages.qqc2-desktop-style - libsForQt5.qtstyleplugins - qt6Packages.qt6gtk2 - ]; -} diff --git a/modules/home/workstation/appearance/qt/default.nix b/modules/home/workstation/appearance/qt/default.nix new file mode 100644 index 0000000..0a1e3d6 --- /dev/null +++ b/modules/home/workstation/appearance/qt/default.nix @@ -0,0 +1,426 @@ +{ + pkgs, + hozen, + lib, + ... +}: let + inherit (hozen) color; + mkKvconig = text: lib.generators.toINI {} text; + kvantumSVG = import ./gruv.nix {inherit color;}; + + theme = "KvHozen"; +in { + imports = [ + ./kdeglobals.nix + ]; + + qt = { + enable = true; + platformTheme.name = "qtct"; + style = { + name = "kvantum"; + }; + }; + + xdg.configFile = { + "Kvantum/kvantum.kvconfig".text = mkKvconig { + General = {inherit theme;}; + #Applications."${theme}" = "org.kde.dolphin, dolphin-emu, faster-project-plus"; + }; + "Kvantum/KvHozen/KvHozen.svg".text = kvantumSVG; + "Kvantum/KvHozen/KvHozen.kvconfig".text = mkKvconig { + # docs: + "%General" = { + author = "ooks"; + comment = "Hozen theme using Hozen color scheme"; + + # Window/Widget Behavior + respect_DE = true; + x11drag = "menubar_and_primary_toolbar"; + alt_mnemonic = true; + click_behavior = 0; + double_click = false; + inline_spin_indicators = true; + vertical_spin_indicators = false; + spin_button_width = 16; + combo_as_lineedit = true; + combo_menu = true; + hide_combo_checkboxes = true; + combo_focus_rect = true; + groupbox_top_label = true; + button_contents_shift = false; + fill_rubberband = false; + merge_menubar_with_toolbar = true; + toolbutton_style = 1; + + # compositing & effects + composite = true; + translucent_windows = true; + reduce_window_opacity = 10; + reduce_menu_opacity = 0; + blurring = false; + popup_blurring = true; + menu_blur_radius = 5; + tooltip_blur_radius = 5; + contrast = 1.00; + intensity = 1.00; + saturation = 1.00; + + # animations & visual feedback + animate_states = false; + no_inactiveness = false; + no_window_pattern = false; + + # menu configuration + menubar_mouse_tracking = true; + menu_shadow_depth = 7; + tooltip_shadow_depth = 6; + spread_menuitems = true; + submenu_overlap = 0; + spread_progressbar = true; + + # scrollbars & sliders + scroll_width = 8; + scroll_min_extent = 36; + scrollbar_in_view = false; + transient_scrollbar = true; + transient_groove = false; + slider_width = 4; + slider_handle_width = 18; + slider_handle_length = 18; + + # layout & sizing + layout_spacing = 2; + layout_margin = 4; + small_icon_size = 16; + large_icon_size = 32; + button_icon_size = 16; + toolbar_icon_size = 16; + + # widget specific + check_size = 16; + tooltip_delay = -1; + tree_branch_line = true; + progressbar_thickness = 8; + }; + + # color configuration + GeneralColors = { + # Base Colors + "window.color" = "#${color.layout.menu}"; + "inactive.window.color" = "#${color.layout.menu}"; + "base.color" = "#${color.layout.body}"; + "inactive.base.color" = "#${color.layout.body}"; + "alt.base.color" = "#${color.layout.body}"; + "button.color" = "#${color.layout.menu}"; + "light.color" = "#${color.secondary.base}"; + "mid.light.color" = "#${color.secondary.soft1}"; + "dark.color" = "#${color.secondary.hard1}"; + "mid.color" = "#${color.secondary.base}"; + + # Highlight Colors + "highlight.color" = "#${color.primary.base}"; + "inactive.highlight.color" = "#${color.primary.soft1}"; + + # Text Colors + "text.color" = "#${color.typography.text}"; + "inactive.text.color" = "#${color.typography.subtext}"; + "window.text.color" = "#${color.typography.text}"; + "inactive.window.text.color" = "#${color.typography.subtext}"; + "button.text.color" = "#${color.typography.text}"; + "disabled.text.color" = "#${color.typography.subtext}"; + "tooltip.text.color" = "#${color.typography.text}"; + "highlight.text.color" = "#${color.typography.contrast-text}"; + "link.color" = "#${color.blue.base}"; + "link.visited.color" = "#${color.purple.base}"; + "progress.indicator.text.color" = "#${color.typography.text}"; + "progress.inactive.indicator.text.color" = "#${color.typography.subtext}"; + }; + + # Widget-Specific Configurations + Hacks = { + transparent_dolphin_view = false; + blur_konsole = true; + transparent_ktitle_label = true; + transparent_menutitle = true; + respect_darkness = true; + force_size_grip = false; + iconless_pushbutton = true; + iconless_menu = false; + disabled_icon_opacity = 100; + normal_default_pushbutton = true; + tint_on_mouseover = 0; + blur_translucent = true; + kinetic_scrolling = false; + middle_click_scroll = false; + no_selection_tint = false; + }; + + # Button Configuration + PanelButtonCommand = { + frame = true; + "frame.element" = "button"; + "frame.expanded" = true; + interior = true; + "interior.element" = "button"; + "indicator.size" = 8; + "text.normal.color" = "#${color.typography.text}"; + "text.focus.color" = "#${color.typography.text}"; + "text.press.color" = "#${color.typography.text}"; + "text.toggle.color" = "#${color.typography.text}"; + "text.shadow" = false; + "text.margin" = 1; + "text.iconspacing" = 4; + "frame.expansion" = 6; + }; + + PanelButtonTool = { + inherits = "PanelButtonCommand"; + }; + + # Window Frames + GenericFrame = { + inherits = "PanelButtonCommand"; + frame = true; + "frame.element" = "common"; + interior = false; + "frame.top" = 3; + "frame.bottom" = 3; + "frame.left" = 3; + "frame.right" = 3; + }; + + # menu configuration + Menu = { + inherits = "PanelButtonCommand"; + "frame.element" = "menu"; + "interior.element" = "menu"; + "frame.top" = 3; + "frame.bottom" = 3; + "frame.left" = 3; + "frame.right" = 3; + }; + + MenuItem = { + inherits = "PanelButtonCommand"; + frame = true; + interior = true; + "interior.element" = "menuitem"; + "indicator.size" = 8; + "text.focus.color" = "#${color.typography.text}"; + "text.press.color" = "#${color.typography.text}"; + }; + + MenuBarItem = { + inherits = "PanelButtonCommand"; + "interior.element" = "menubaritem"; + frame = false; + "text.margin.top" = 3; + "text.margin.bottom" = 3; + "text.margin.left" = 5; + "text.margin.right" = 5; + }; + + MenuBar = { + inherits = "PanelButtonCommand"; + "frame.element" = "menubar"; + "interior.element" = "menubar"; + "frame.bottom" = 0; + "text.normal.color" = "#${color.typography.text}"; + }; + + # Scrollbars + ScrollbarSlider = { + inherits = "PanelButtonCommand"; + frame = true; + interior = false; + "frame.element" = "scrollbarslider"; + "indicator.element" = "grip"; + "indicator.size" = 13; + "frame.left" = 6; + "frame.right" = 6; + "frame.top" = 6; + "frame.bottom" = 6; + }; + + ScrollbarGroove = { + inherits = "PanelButtonCommand"; + interior = false; + frame = false; + }; + + # Sliders + Slider = { + inherits = "PanelButtonCommand"; + frame = false; + "interior.element" = "slider"; + "frame.top" = 3; + "frame.bottom" = 3; + "frame.left" = 3; + "frame.right" = 3; + }; + + SliderCursor = { + inherits = "PanelButtonCommand"; + frame = false; + "interior.element" = "slidercursor"; + }; + + # Progress Bars + Progressbar = { + inherits = "PanelButtonCommand"; + "frame.element" = "progress"; + "interior.element" = "progress"; + "text.margin" = 0; + "text.normal.color" = "#${color.typography.text}"; + "text.focus.color" = "#${color.typography.text}"; + "text.press.color" = "#${color.typography.contrast-text}"; + "text.toggle.color" = "#${color.typography.contrast-text}"; + }; + + ProgressbarContents = { + inherits = "PanelButtonCommand"; + frame = true; + "frame.element" = "progress-pattern"; + "interior.element" = "progress-pattern"; + }; + + # Tabs + TabBarFrame = { + inherits = "GenericFrame"; + frame = true; + "frame.element" = "tabBarFrame"; + interior = false; + "frame.top" = 4; + "frame.bottom" = 4; + "frame.left" = 4; + "frame.right" = 4; + }; + + TabFrame = { + inherits = "PanelButtonCommand"; + "frame.element" = "tabframe"; + "interior.element" = "tabframe"; + }; + + Tab = { + inherits = "PanelButtonCommand"; + "interior.element" = "tab"; + "frame.element" = "tab"; + "frame.top" = 2; + "frame.bottom" = 2; + "frame.left" = 2; + "frame.right" = 2; + "text.margin.left" = 8; + "text.margin.right" = 8; + "text.margin.top" = 2; + "text.margin.bottom" = 2; + }; + + # Line Edits + LineEdit = { + inherits = "PanelButtonCommand"; + "frame.element" = "lineedit"; + "interior.element" = "lineedit"; + "frame.top" = 3; + "frame.bottom" = 3; + "frame.left" = 3; + "frame.right" = 3; + "text.margin.top" = 2; + "text.margin.bottom" = 2; + "text.margin.left" = 2; + "text.margin.right" = 2; + }; + + # Combo Boxes + ComboBox = { + inherits = "PanelButtonCommand"; + "frame.element" = "combo"; + "interior.element" = "combo"; + "frame.top" = 3; + "frame.bottom" = 3; + "frame.left" = 3; + "frame.right" = 3; + "text.margin.top" = 2; + "text.margin.bottom" = 2; + "text.margin.left" = 2; + "text.margin.right" = 2; + "indicator.element" = "carrow"; + }; + + # Spinboxes + SpinBox = { + inherits = "ComboBox"; + "frame.element" = "spinbox"; + "interior.element" = "spinbox"; + "frame.top" = 3; + "frame.bottom" = 3; + "frame.left" = 3; + "frame.right" = 3; + "indicator.element" = "arrow"; + "indicator.size" = 8; + }; + + # Group Boxes + GroupBox = { + inherits = "GenericFrame"; + frame = true; + "frame.element" = "group"; + interior = false; + "frame.top" = 4; + "frame.bottom" = 4; + "frame.left" = 4; + "frame.right" = 4; + }; + + # tooltips + ToolTip = { + inherits = "PanelButtonCommand"; + "frame.top" = 3; + "frame.bottom" = 3; + "frame.left" = 3; + "frame.right" = 3; + interior = true; + "text.shadow" = false; + "text.margin" = 0; + "frame.element" = "tooltip"; + "interior.element" = "tooltip"; + "frame.expansion" = 0; + }; + + # window decorations + Window = { + interior = true; + "interior.element" = "window"; + "frame.element" = "window"; + "frame.top" = 0; + "frame.bottom" = 0; + "frame.left" = 0; + "frame.right" = 0; + }; + + Dialog = { + inherits = "Window"; + }; + }; + }; + home.packages = with pkgs; [ + libsForQt5.qt5.qtwayland + kdePackages.qtwayland + kdePackages.qqc2-desktop-style + kdePackages.qttools + qt6Packages.qt6gtk2 + qt6.qtwayland + + libsForQt5.qtstyleplugins + qt6Packages.qt6gtk2 + libsForQt5.qt5ct + kdePackages.qt6ct + + #libsForQt5.breeze-qt5 + #kdePackages.breeze-icons + # kvantum libraries + libsForQt5.qtstyleplugin-kvantum + qt6Packages.qtstyleplugin-kvantum + ]; +} diff --git a/modules/home/workstation/appearance/qt/gruv.nix b/modules/home/workstation/appearance/qt/gruv.nix new file mode 100644 index 0000000..66602ba --- /dev/null +++ b/modules/home/workstation/appearance/qt/gruv.nix @@ -0,0 +1,1960 @@ +{color}: '' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +'' diff --git a/modules/home/workstation/appearance/qt/kdeglobals.nix b/modules/home/workstation/appearance/qt/kdeglobals.nix new file mode 100644 index 0000000..2a5ca19 --- /dev/null +++ b/modules/home/workstation/appearance/qt/kdeglobals.nix @@ -0,0 +1,154 @@ +{ + lib, + hozen, + ... +}: let + inherit (hozen) color; +in { + xdg.configFile."kdeglobals".text = lib.generators.toINI {} { + "ColorEffects:Disabled" = { + Color = "#${color.layout.menu}"; + ColorAmount = "0.30000000000000004"; + ColorEffect = 2; + ContrastAmount = 0.1; + ContrastEffect = 0; + IntensityAmount = -1; + IntensityEffect = 0; + }; + "ColorEffects:Inactive" = { + ChangeSelectionColor = true; + Color = "#${color.layout.menu}"; + ColorAmount = 0.5; + ColorEffect = 3; + ContrastAmount = 0; + ContrastEffect = 0; + Enable = true; + IntensityAmount = 0; + IntensityEffect = 0; + }; + "Colors:Button" = { + BackgroundAlternate = "#${color.primary.base}"; + BackgroundNormal = "#${color.layout.body}"; + DecorationFocus = "#${color.primary.base}"; + DecorationHover = "#${color.layout.body}"; + ForegroundActive = "#${color.orange.base}"; + ForegroundInactive = "#${color.typography.subtext}"; + ForegroundLink = "#${color.primary.base}"; + ForegroundNegative = "#${color.error.base}"; + ForegroundNeutral = "#${color.yellow.base}"; + ForegroundNormal = "#${color.typography.text}"; + ForegroundPositive = "#${color.success.base}"; + ForegroundVisited = "#${color.purple.base}"; + }; + + "Colors:Complementary" = { + BackgroundAlternate = "#${color.neutrals."900"}"; + BackgroundNormal = "#${color.layout.dimmed}"; + DecorationFocus = "#${color.primary.base}"; + DecorationHover = "#${color.layout.body}"; + ForegroundActive = "#${color.orange.base}"; + ForegroundInactive = "#${color.typography.subtext}"; + ForegroundLink = "#${color.primary.base}"; + ForegroundNegative = "#${color.error.base}"; + ForegroundNeutral = "#${color.yellow.base}"; + ForegroundNormal = "#${color.typography.text}"; + ForegroundPositive = "#${color.success.base}"; + ForegroundVisited = "#${color.purple.base}"; + }; + + "Colors:Header" = { + BackgroundAlternate = "#${color.neutrals."900"}"; + BackgroundNormal = "#${color.layout.dimmed}"; + DecorationFocus = "#${color.primary.base}"; + DecorationHover = "#${color.layout.body}"; + ForegroundActive = "#${color.orange.base}"; + ForegroundInactive = "#${color.typography.subtext}"; + ForegroundLink = "#${color.primary.base}"; + ForegroundNegative = "#${color.error.base}"; + ForegroundNeutral = "#${color.yellow.base}"; + ForegroundNormal = "#${color.typography.text}"; + ForegroundPositive = "#${color.success.base}"; + ForegroundVisited = "#${color.purple.base}"; + }; + + "Colors:Selection" = { + BackgroundAlternate = "#${color.primary.base}"; + BackgroundNormal = "#${color.primary.base}"; + DecorationFocus = "#${color.primary.base}"; + DecorationHover = "#${color.layout.body}"; + ForegroundLink = "#${color.primary.base}"; + ForegroundInactive = "#${color.layout.dimmed}"; + ForegroundActive = "#${color.orange.base}"; + ForegroundNegative = "#${color.error.base}"; + ForegroundNeutral = "#${color.yellow.base}"; + ForegroundNormal = "#${color.neutrals."900"}"; + ForegroundPositive = "#${color.success.base}"; + ForegroundVisited = "#${color.purple.base}"; + }; + + "Colors:Tooltip" = { + BackgroundAlternate = "#${color.layout.dimmed}"; + BackgroundNormal = "#${color.layout.menu}"; + DecorationFocus = "#${color.primary.base}"; + DecorationHover = "#${color.layout.body}"; + ForegroundActive = "#${color.orange.base}"; + ForegroundInactive = "#${color.typography.subtext}"; + ForegroundLink = "#${color.primary.base}"; + ForegroundNegative = "#${color.error.base}"; + ForegroundNeutral = "#${color.yellow.base}"; + ForegroundNormal = "#${color.typography.text}"; + ForegroundPositive = "#${color.success.base}"; + ForegroundVisited = "#${color.purple.base}"; + }; + + "Colors:View" = { + BackgroundAlternate = "#${color.layout.dimmed}"; + BackgroundNormal = "#${color.layout.menu}"; + DecorationFocus = "#${color.primary.base}"; + DecorationHover = "#${color.layout.body}"; + ForegroundActive = "#${color.orange.base}"; + ForegroundInactive = "#${color.typography.subtext}"; + ForegroundLink = "#${color.primary.base}"; + ForegroundNegative = "#${color.error.base}"; + ForegroundNeutral = "#${color.yellow.base}"; + ForegroundNormal = "#${color.typography.text}"; + ForegroundPositive = "#${color.success.base}"; + ForegroundVisited = "#${color.purple.base}"; + }; + + "Colors:Window" = { + BackgroundAlternate = "#${color.neutrals."900"}"; + BackgroundNormal = "#${color.layout.dimmed}"; + DecorationFocus = "#${color.primary.base}"; + DecorationHover = "#${color.layout.body}"; + ForegroundActive = "#${color.orange.base}"; + ForegroundInactive = "#${color.typography.subtext}"; + ForegroundLink = "#${color.primary.base}"; + ForegroundNegative = "#${color.error.base}"; + ForegroundNeutral = "#${color.yellow.base}"; + ForegroundNormal = "#${color.typography.text}"; + ForegroundPositive = "#${color.success.base}"; + ForegroundVisited = "#${color.purple.base}"; + }; + + General = { + ColorScheme = "GruvboxMaterial"; + Name = "GruvboxMaterial"; + accentActiveTitlebar = false; + shadeSortColumn = true; + }; + + KDE = { + contrast = 4; + }; + + WM = { + activeBackground = "#${color.layout.menu}"; + activeBlend = "#${color.typography.text}"; + activeForeground = "#${color.typography.text}"; + inactiveBackground = "#${color.neutrals."900"}"; + inactiveBlend = "#${color.typography.subtext}"; + inactiveForeground = "#${color.typography.subtext}"; + }; + }; +} diff --git a/modules/home/workstation/binds.nix b/modules/home/workstation/binds.nix index 589ff86..3c2e9ee 100644 --- a/modules/home/workstation/binds.nix +++ b/modules/home/workstation/binds.nix @@ -13,6 +13,8 @@ in { browser = mkBind "No browser is enabled"; terminal = mkBind "No terminal is enabled"; terminalLaunch = mkBind "Failed to launch tui"; + terminalDropdown = mkBind "Terminal Dropdown not enabled"; + btop = mkBind "Btop binding not set"; fileManager = mkBind "No file manager is enabled."; notes = mkBind "No Notes app is enabled"; discord = mkBind "No Discord app is enabled"; @@ -20,6 +22,7 @@ in { powerMenu = mkBind "No power menu is enabled"; lock = mkBind "No screen locker enabled"; password = mkBind "No password manager enabled"; + quickpass = mkBind "1Password module is not enabled"; zellijMenu = mkBind "Zellij Menu is not enabled"; factorio = mkBind "Gaming module is not enabled"; volume = { diff --git a/modules/home/workstation/browser/firefox/default.nix b/modules/home/workstation/browser/firefox/default.nix index c9ffb27..560ed0e 100644 --- a/modules/home/workstation/browser/firefox/default.nix +++ b/modules/home/workstation/browser/firefox/default.nix @@ -3,12 +3,12 @@ lib, inputs', osConfig, + hozen, ... }: let inherit (lib) mkIf mkMerge; inherit (osConfig.ooknet.host) admin; - inherit (osConfig.ooknet.appearance) colorscheme fonts; - inherit (colorscheme) palette; + inherit (osConfig.ooknet.appearance) fonts; inherit (osConfig.ooknet.workstation) default; addons = inputs'.firefox-addons.packages; @@ -45,7 +45,7 @@ in { # onepassword-password-manager # cannot get this to work unfree issue. ]; settings = import ./settings/ooksJs.nix; - userChrome = import ./theme/ooksfox.nix {inherit fonts palette;}; + userChrome = import ./theme/ooksfox.nix {inherit fonts hozen;}; userContent = import ./theme/penguinFoxContent.nix; }; profiles.testing = { diff --git a/modules/home/workstation/browser/firefox/theme/ooksfox.nix b/modules/home/workstation/browser/firefox/theme/ooksfox.nix index 7445351..ca5276f 100644 --- a/modules/home/workstation/browser/firefox/theme/ooksfox.nix +++ b/modules/home/workstation/browser/firefox/theme/ooksfox.nix @@ -1,152 +1,226 @@ { - palette, + hozen, fonts, ... -}: -with palette; -#css +}: let + inherit (hozen) color; +in + #css '' - /* minimal firefox css ooks */ + :root { + + --clr-menu: #${color.layout.menu}; + --clr-fg: #${color.typography.text}; + --clr-secondary: #${color.secondary.base}; + + + --border: 1px solid var(--clr-fg); + --border-active: 1px solid var(--clr-fg); + --border-inactive: 1px solid var(--clr-secondary); + + --font-base: ${fonts.monospace.family}; - /* ===== Color Variables and Root Styles ===== */ - :root { - /* Fonts */ - --font-mono: ${fonts.monospace.family}, monospace; } - /* ===== General UI Modifications ===== */ - /* Hide status panel */ - #statuspanel { display: none !important; } + * { + border-radius: 0 !important; + font-family: ${fonts.monospace.family}; + } + #nav-bar { + border: var(--border) !important; + background-color: var(--clr-menu) !important; + margin-top: 0px !important; + } + #urlbar { + text-align: center; + } - /* Remove border radius from menus */ - menupopup, panel { --panel-border-radius: 0px !important; } - menu, menuitem, menucaption { border-radius: 0px !important; } + .browser-toolbar { + padding-bottom: 1px !important; + } - /* Hide navigation context menu items */ - menupopup > #context-navigation, - menupopup > #context-sep-navigation { display: none !important; } + #urlbar-background { + background-color: transparent !important; + border: unset !important; + box-shadow: unset !important; + } - /* Hide various toolbar buttons */ - #forward-button, - #reload-button, - #stop-button, - #home-button, - #library-button, - #PanelUI-button, - #unified-extensions-button, - #star-button, - #reader-mode-button, - #save-to-pocket-button, - #tracking-protection-icon-container, - #page-action-buttons, - #fxa-toolbar-menu-button, - #identity-box { display: none !important; } + #urlbar-container { + padding: 0 !important; + } - /* Hide customizable UI springs */ - #customizableui-special-spring1, - #customizableui-special-spring2 { display: none; } + .urlbarView { + text-align: start; + border: var(--border) !important; + margin: 0; + padding: 0 !important; + background-color: var(--clr-menu); + } - /* Hide Personal Toolbar */ - #PersonalToolbar { display: none !important; } + .urlbar-input-container { + margin: 0px !important; + } - /* ===== URL Bar Styling ===== */ - #urlbar-container { - margin-left: 0 !important; - margin-right: 0 !important; - padding-top: 0 !important; - padding-bottom: 0!important; - } + #identity-icon { + color: red !important; + } - #urlbar-background { - border: solid 1px !important; - border-radius: 0 !important; - outline: none !important; - background: #${crust} !important; - } + #forward-button, + #stop-button, + #star-button-box, + #translations-button, + #reload-button, + #identity-box, + #tracking-protection-icon-container, + #save-to-pocket-button, + .urlbar-page-action, + .urlbar-go-button, + /* firefox account button */ + #fxa-toolbar-menu-button, + /* hamburger menu icon */ + #PanelUI-button, + #PersonalToolbar + { + display: none; + } - #navigator-toolbox { - border: none !important; - border-bottom: solid 1px !important;\ - } + .titlebar-buttonbox-container, + .tab-close-button, + .titlebar-spacer, + #tabs-newtab-button, + #alltabs-button, + #firefox-view-button, + #new-tab-button { + display: none; + } - /* Hide URL bar go button */ - .urlbar-go-button { display: none !important; } - /* Remove navigation bar background */ - #nav-bar.browser-toolbar { background: none !important; } + #tabbrowser-tabs { + margin: 0 !important; + padding: 0 !important; - /* Position and style navigation bar */ + margin-inline: 0px !important; + border: unset !important; + border-bottom: var(--border-inactive) !important; + } - #nav-bar { - text-align: center; - min-height: 0 !important; - max-height: 0 !important; - height: 0 !important; - } + .tabbrowser-tab { + padding: 3px !important; + padding-left: 3px !important; + --tab-label-mask-size: unset !important; + } - /* Expand navigation bar on focus */ - #nav-bar:focus-within { - max-height: 40px !important; - height: 60px !important; - min-height: 15px !important; - } + .tabbrowser-tab[pinned] { + padding: 3px !important; + } - /* ===== Tab Bar Styling ===== */ - /* Hide title bar buttons and spacer */ - .titlebar-close, - .titlebar-spacer { display: none !important; } + #tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])[orient="horizontal"] > #tabbrowser-arrowscrollbox > .tabbrowser-tab:nth-child(1 of :not([pinned], [hidden])) { + margin-inline-start: 0px !important; + } - /* Remove tab margin */ - #titlebar { - --proton-tab-block-margin: 0px !important; - --tab-block-margin: 0px !important; - } + .tab-stack { + margin-inline: 0 !important; + } + .tab-background { + border-radius: 0px; + border: var(--border-inactive); + } + .tab-background[selected] { + border: var(--border-active); + } - /* Remove tab shadows */ - #tabbrowser-tabs:not([noshadowfortests]) .tab-background:is([selected], [multiselected]) { - box-shadow: none !important; - } + #TabsToolbar { + padding-left: 0px !important; + margin: 0; + padding: 0; + } - /* Hide tab-related buttons */ - #alltabs-button, - #tabs-newtab-button, - #firefox-view-button, - #new-tab-button, - .tab-close-button { display: none !important; } + /* https://github.com/MrOtherGuy/firefox-csshacks/blob/8957a709e3abb7242fa89339c684f8027e66774c/chrome/autohide_main_toolbar.css#L46 */ + :root{ + --uc-navbar-transform: -40px; + --uc-autohide-toolbar-delay: 1s; + --uc-autohide-toolbar-duration: 100ms; + } + :root[uidensity="compact"]{ --uc-navbar-transform: -34px } - /* Style tabs */ - tab { - font-family: var(--font-mono); - font-weight: bold; - } + #navigator-toolbox > div{ display: contents; } + :root[sessionrestored] :where(#nav-bar,#PersonalToolbar,#tab-notification-deck,.global-notificationbox){ + transform: translateY(var(--uc-navbar-transform)) + } + :root:is([customizing],[chromehidden*="toolbar"]) :where(#nav-bar,#PersonalToolbar,#tab-notification-deck,.global-notificationbox){ + transform: none !important; + opacity: 1 !important; + } - /* Set tab and tab bar height */ - #TabsToolbar, .tabbrowser-tab { - max-height: 35px !important; - background: #${crust} !important; - border: none; - } + #nav-bar:not([customizing]){ + opacity: 0; + transition: transform var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay), opacity var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay) !important; + position: relative; + z-index: 1; + } + #titlebar{ position: relative; z-index: 3 } - /* Center tabs when not overflowing */ - #tabbrowser-arrowscrollbox:not([overflowing]) { - --uc-flex-justify: center; - } + #navigator-toolbox, + #sidebar-box, + #sidebar-main, + #sidebar-splitter, + #tabbrowser-tabbox{ + z-index: auto !important; + } + /* Show when toolbox is focused, like when urlbar has received focus */ + #navigator-toolbox:focus-within > .browser-toolbar{ + transform: translateY(0); + opacity: 1; + transition-duration: var(--uc-autohide-toolbar-duration), var(--uc-autohide-toolbar-duration) !important; + transition-delay: 0s !important; + } + /* Show when toolbox is hovered */ + #titlebar:hover ~ .browser-toolbar, + .browser-titlebar:hover ~ :is(#nav-bar,#PersonalToolbar), + #nav-bar:hover, + #nav-bar:hover + #PersonalToolbar{ + transform: translateY(0); + opacity: 1; + transition-duration: var(--uc-autohide-toolbar-duration), var(--uc-autohide-toolbar-duration) !important; + transition-delay: 0s !important; + } + :root[sessionrestored] #urlbar[popover]{ + opacity: 0; + pointer-events: none; + transition: transform var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay), opacity var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay); + transform: translateY(var(--uc-navbar-transform)); + } + #mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts,#tab-preview-panel)) ~ toolbox #urlbar[popover], + .browser-titlebar:is(:hover,:focus-within) ~ #nav-bar #urlbar[popover], + #nav-bar:is(:hover,:focus-within) #urlbar[popover], + #urlbar-container > #urlbar[popover]:is([focused],[open]){ + opacity: 1; + pointer-events: auto; + transition-delay: 0ms; + transform: translateY(0); + } + #urlbar-container > #urlbar[popover]:is([focused],[open]){ + transition-duration: 100ms; /* Faster when focused */ + } + /* This ruleset is separate, because not having :has support breaks other selectors as well */ + #mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts,#tab-preview-panel)) ~ #navigator-toolbox > .browser-toolbar{ + transition-delay: 33ms !important; + transform: translateY(0); + opacity: 1; + } + /* If tabs are in sidebar then nav-bar doesn't normally have its own background - so we nee to add it back */ + #nav-bar.browser-titlebar{ + background: inherit; + } + #toolbar-menubar:not([autohide="true"]) ~ #nav-bar.browser-titlebar{ + background-position-y: -28px; /* best guess, could vary */ + border-top: none !important; + } - scrollbox[orient="horizontal"] { - justify-content: var(--uc-flex-justify, initial); - } + /* Bookmarks toolbar needs so extra rules */ + #PersonalToolbar{ transition: transform var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay) !important; position: relative; z-index: 1 } - /* Style selected tabs */ - #tabbrowser-tabs .tabbrowser-tab[selected] .tab-content { - border: solid 1px var(--base05) !important; - color: var(--base07); - background: var(--base02) - } - - /* Style non-selected tabs */ - tab:not([selected="true"]) { - /* border: solid 1px var(--base05) !important; */ - background: var(--base01) !important; - } + /* Move up the content view */ + :root[sessionrestored]:not([inFullscreen],[chromehidden~="toolbar"]) > body > #browser{ margin-top: var(--uc-navbar-transform); } '' diff --git a/modules/home/workstation/browser/firefox/tridactyl.nix b/modules/home/workstation/browser/firefox/tridactyl.nix index 761ae2f..86a6e31 100644 --- a/modules/home/workstation/browser/firefox/tridactyl.nix +++ b/modules/home/workstation/browser/firefox/tridactyl.nix @@ -1,11 +1,12 @@ { lib, osConfig, + hozen, ... }: let inherit (lib) mkIf; - inherit (osConfig.ooknet.appearance) colorscheme fonts; - inherit (colorscheme) palette; + inherit (osConfig.ooknet.appearance) fonts; + inherit (hozen) color; inherit (osConfig.ooknet.workstation) default; cfg = osConfig.ooknet.workstation.programs.firefox; in { @@ -55,17 +56,17 @@ in { '' :root { --font: ${fonts.monospace.family}; - --bg: #${palette.base00}; - --fg: #${palette.base05}; - --red: #${palette.base08}; - --green: #${palette.base0B}; - --blue: #${palette.base0D}; - --yellow: #${palette.base0A}; - --purple: #${palette.base0E}; - --orange: #${palette.base09}; - --cyan: #${palette.base0C}; - --comment: #${palette.base04}; - --selectedline: #${palette.base02}; + --bg: #${color.layout.menu}; + --fg: #${color.typography.text}; + --red: #${color.red.base}; + --green: #${color.green.base}; + --blue: #${color.blue.base}; + --yellow: #${color.yellow.base}; + --purple: #${color.purple.base}; + --orange: #${color.orange.base}; + --cyan: #${color.teal.base}; + --comment: #${color.typography.subtext}; + --selectedline: #${color.secondary.base}; --tridactyl-fg: var(--fg); diff --git a/modules/home/workstation/communication/default.nix b/modules/home/workstation/communication/default.nix index 1141ceb..e155b1b 100644 --- a/modules/home/workstation/communication/default.nix +++ b/modules/home/workstation/communication/default.nix @@ -1,5 +1,6 @@ { imports = [ ./vesktop + ./equicord ]; } diff --git a/modules/home/workstation/communication/equicord/default.nix b/modules/home/workstation/communication/equicord/default.nix new file mode 100644 index 0000000..226ae6e --- /dev/null +++ b/modules/home/workstation/communication/equicord/default.nix @@ -0,0 +1,4 @@ +{ + #imports = [./options.nix]; + #programs.equicord.enable = true; +} diff --git a/modules/home/workstation/communication/equicord/options.nix b/modules/home/workstation/communication/equicord/options.nix new file mode 100644 index 0000000..839f513 --- /dev/null +++ b/modules/home/workstation/communication/equicord/options.nix @@ -0,0 +1,710 @@ +{ + lib, + pkgs, + config, + ... +}: let + inherit (lib) mkIf mkOption mkEnableOption mkPackageOption; + inherit (lib.types) listOf str int enum numbers oneOf bool strMatching; + mkBoolOption = default: description: + mkOption { + type = bool; + inherit default description; + }; + + mkLabelOption = default: + mkOption { + type = str; + inherit default; + description = "${default} label"; + }; + + mkEquibopSelect = attr: v: attr.${v}; + listToString = sep: list: builtins.concatStringsSep sep list; + + rgbValue = ''([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])''; + rgbDecimal = strMatching ''${rgbValue}, *${rgbValue}, *${rgbValue}''; + hexColor = strMatching "#[[:xdigit:]]{6}"; + + mkHexColorOption = name: + mkOption { + type = oneOf [hexColor (enum [""])]; + default = ""; + description = "${name} color in hex format"; + example = "#ea6962"; + }; + + cfg = config.programs.equicord; +in { + options.programs.equicord = { + enable = mkEnableOption "Enable Equicord, for of Vencord"; + package = mkPackageOption pkgs "equibop" { + default = "equibop"; + example = pkgs.equicord; + }; + settings = { + autoUpdate = mkEnableOption "Enable auto updating for Equicord" // {default = true;}; + autoUpdateNotification = mkEnableOption "Notify when Equicord automatically updates"; + useQuickCss = mkEnableOption "Enable custom CSS"; + themeLinks = mkOption { + type = listOf str; + default = []; + description = "List of Discord CSS themes to install via link"; + example = ["https://refact0r.github.io/midnight-discord/midnight.css"]; + }; + enabledThemes = mkOption { + type = listOf str; + default = []; + description = "List of themes to enable from XDG_CONFIG_HOME/equibop/themes"; + }; + enableReactDevtools = mkEnableOption "Enable react dev tools extension"; + frameless = mkEnableOption "Enable frameless mode"; + transparent = mkEnableOption "Enable transparent mode. Requires a theme that supports transparency"; + disableMinSize = mkEnableOption "Disable minimum window size"; + notifications = { + timeout = mkOption { + type = int; + default = 5000; + description = "Notification timeout in ms, set to 0 to never automatically time out"; + example = 0; + }; + position = mkOption { + type = enum ["bottom-right" "top-right"]; + default = "bottom-right"; + description = "Position of notifications"; + example = "top-right"; + }; + useNative = mkOption { + type = enum ["always" "never" "not-focused"]; + default = "not-focused"; + description = "When should notifications be used"; + example = "always"; + }; + logLimit = mkOption { + type = int; + default = 50; + description = '' + The amount of notifications to save in the log until old ones are removed. + Set to 0 to disable log. Set to 0 to to disable notification log and 200 to + never automatically remove old notifcations + ''; + }; + }; + plugins = { + # API plugins + ChatInputButtonsAPI.enabled = mkBoolOption true "Chat Input API"; + CommandsAPI.enabled = mkBoolOption true ""; + DynamicImageModalAPI.enabled = mkBoolOption false ""; + MemberListDecoratorsAPI.enabled = mkBoolOption false ""; + MessageAccessoriesAPI.enabled = mkBoolOption true ""; + MessageDecorationsAPI.enabled = mkBoolOption false ""; + MessageEventsAPI.enabled = mkBoolOption false ""; + MessageUpdaterAPI.enabled = mkBoolOption false ""; + ServerListAPI.enabled = mkBoolOption false ""; + UserSettingsAPI.enabled = mkBoolOption true ""; + + AccountPanelServerProfile = { + enabled = mkEnableOption '' + Right click your account panel in the bottom left to + view your profile in the current server. + ''; + prioritizeServerProfile = mkEnableOption '' + Prioritize Server Profile when left clicking your account panel. + ''; + }; + AllCallTimers = { + enabled = mkEnableOption '' + Add call timer to all users in a server voice channel. + ''; + showWithoutHover = mkEnableOption '' + Always show the timer without needing to hover. + ''; + showRoleColor = mkEnableOption '' + Show the users role color. + ''; + trackSelf = mkEnableOption '' + Also track yourself. + ''; + showSeconds = mkEnableOption '' + Show seconds in the timer. + ''; + format = mkOption { + type = enum ["stopwatch" "human"]; + default = "human"; + description = '' + Compact or human readable format: + - stopwatch: 30:23:00:42 + - human: 30d 23h 00m 42s + ''; + }; + watchLargeGuilds = mkEnableOption '' + Track users in large guild. Warning this may cause lag if your in a lot + of guilds with active voice users. + ''; + }; + AltKrispSwitch.enabled = mkEnableOption '' + Makes the Noise Suppression Popout switch between None and Krisp instead + of Krisp and Strandard. + ''; + AlwaysAnimate = { + enable = mkEnableOption '' + Animates anything that can be animated. + ''; + }; + AlwaysExpandRoles = { + enabled = mkEnableOption "Always expand the role list in profile popouts."; + hideArrow = mkEnableOption "Hide Arrows."; + }; + AlwaysTrust = { + enabled = mkEnableOption '' + Remove the untrusted domain and suspicious file popup. + ''; + domain = mkEnableOption '' + Remove the untrusted domain popup when opening links. + ''; + file = mkEnableOption '' + Remove the "Potentially Dangerous Download" popup when opening links. + ''; + }; + AmITyping.enabled = mkEnableOption "Shows you if other people can see you typing."; + Anammox = { + enabled = mkEnableOption '' + A microbial process that plays an important part in the nitrogen cycle. + Hide various discord nitro excusive features. + ''; + dms = mkEnableOption "Remove shops above DMs list"; + billing = mkEnableOption "Remove billings settings"; + gift = mkEnableOption "Remove gift button"; + emojiList = mkEnableOption "Remove unavailable catagories from the emoji picker"; + }; + AnonymiseFileNames = { + enabled = mkEnableOption "Anonymise uploaded file names"; + anonymiseByDefault = mkEnableOption "Whether to anonymise file names by default"; + method = mkOption { + type = enum ["random characters" "consistant" "timestamp"]; + default = "random characters"; + apply = mkEquibopSelect { + "random characters" = 0; + "consistent" = 1; + "timestamp" = 2; + }; + }; + randomizedLength = mkOption { + type = int; + default = 7; + description = "Random character length."; + }; + consistent = mkOption { + type = str; + default = "image"; + description = "Consistant filename."; + # doesn't appear to be an option you can change + readOnly = true; + }; + }; + AtSomeone.enabled = mkEnableOption "Mention someone randomly."; + BANger = { + enabled = mkEnableOption "Replaces the GIF i nthe ban dialogue with a custom one."; + source = mkOption { + type = str; + default = ""; + description = "Source to replace ban GIF with (video or GIF)."; + example = "https://i.imgur.com/wp5q52C.mp4"; + }; + }; + BannersEverywhere = { + enabled = mkEnableOption "Display banners in the member list."; + animate = mkEnableOption "Animate banners."; + }; + BetterActivities = { + enabled = mkEnableOption '' + Shows activity icons in the member list and allows showing all activities. + ''; + memberList = mkEnableOption "Show activity icons in the member list"; + iconSize = mkOption { + type = int; + default = 15; + description = "Size of the activity icons."; + }; + specialFirst = mkEnableOption "Show special activities first (Currently Spotify and Twitch)."; + renderGifs = mkEnableOption "Allow rendering GIFs."; + showAppDescription = mkEnableOption "Show application descriptions in the activity tooltip."; + userPopout = mkEnableOption "Show all activities in the profile popout/sidebar."; + allActivitiesStyle = mkOption { + type = enum ["corousel" "list"]; + default = "corousel"; + description = "Style for showing all activities"; + }; + }; + BetterAudioPlayer = { + enabled = mkEnableOption '' + Adds a spectograph and oscilloscope visualizer to audio attachment players. + ''; + oscilloscope = mkEnableOption "Enable oscilloscope visualizer."; + spectograph = mkEnableOption "Enable spectograph visualizer."; + oscilloscopeSolidColor = mkEnableOption "Use colid color for oscilloscope."; + oscilloscopeColor = mkOption { + # not 100% sure if a hex color value can be set via json here + type = rgbDecimal; + default = "255, 255, 255"; + description = "RGB Color for the oscilloscope."; + example = "10, 200, 130"; + }; + spectographSolidColor = mkEnableOption "Use solid color for spectograph."; + spectographColor = mkOption { + type = rgbDecimal; + default = "33, 150, 243"; + example = "10, 200, 130"; + }; + }; + BetterBanReasons = { + enabled = mkEnableOption '' + Create custom reasons to use in the Discord Ban modal, and/or + show a test input by default instead of the options. + ''; + reasons = mkOption { + type = listOf str; + default = []; + description = "List of ban reasons"; + example = [ + "uses nix" + "arch user" + ]; + }; + textInputDefault = mkEnableOption '' + Shows a text input instead of a select menu by default. (Equivalent to clicking the "Other" option). + ''; + }; + BetterFolders = { + enabled = mkEnableOption '' + Shows server folders on dedicated sidebar and adds folder related improvements. + ''; + sidebar = mkEnableOption "Display servers from folder on dedicated sidebar."; + sidebarAnim = mkEnableOption "Animate opening the folder sidebar."; + closeAllFolders = mkEnableOption "Close all folders when selecting a server not in a folder."; + closeOthers = mkEnableOption "Close other folders when opening a folder."; + forceOpen = mkEnableOption "Force a folder to open when switching to a server of that folder."; + keepIcons = mkEnableOption '' + Keep showing guild icons in the primary guild bar folder when it's open + in the BetterFolders sidebar. + ''; + showFoldersIcon = mkOption { + type = enum ["never" "always" "when more than one folder is expanded"]; + default = "always"; + description = '' + Show the folder icon above the folder guilds in the BetterFolders sidebar. + Available options: + - "never" + - "always" + - "when more than one folder is expanded" + ''; + apply = mkEquibopSelect { + "never" = 0; + "always" = 1; + "when more than one folder is expanded" = 2; + }; + }; + }; + BetterGifAltText = mkEnableOption '' + Change GIF alt text from simply being 'GIF' to containing the gif tags/filename. + ''; + BetterGifPicker = mkEnableOption "Makes the GIF picker open the favourite category by default"; + BetterInvites = mkEnableOption '' + See invites expiration date, view inviter profile and preview discoverable servers before joining + by clicking their name. + ''; + BetterNotesBox = { + enabled = mkEnableOption "Hide notes or disable spellcheck."; + hide = mkEnableOption "Hide notes."; + noSpellCheck = mkEnableOption "Disable spellcheck in notes"; + }; + BetterQuickReact = { + enabled = mkEnableOption "Improves the quick react buttons in the message context menu"; + frequentEmojis = mkEnableOption "Use frequently used emojis instead of favorite emojis"; + rows = mkOption { + type = numbers.between 1 16; + default = 2; + description = "Rows of quick reactions to display. Number between 1-16"; + example = 4; + }; + columns = mkOption { + type = numbers.between 1 12; + default = 4; + description = "Columns of quick reactions to display. Number betwen 1-12"; + example = 6; + }; + compactMode = mkEnableOption '' + Scales the buttons to 75% of their original scale, whilst increasing the inner emoji to 125% scale. + Emojis will be 93.75% of the original size. Reccomended to have a minimum of 5 columns. + ''; + scroll = mkEnableOption "Enable scrolling the list of emojis"; + }; + BetterRoleContext = { + enabled = mkEnableOption '' + Adds options to copy role color / edit role / view role icon when right clicking roles in + in the user profile + ''; + roleIconFileFormat = mkOption { + type = enum ["webp" "png" "jpg"]; + default = "png"; + description = "File formate to use when viewing role icons"; + }; + }; + BetterRoleDot = { + enabled = mkEnableOption '' + Copy role colour on RoleDot (accessibility setting) click. Also allows using both + RoleDot and coloured names simultaneously. + ''; + bothStyles = mkEnableOption "Show both role dot and coloured names"; + copyRoleColorInProfilePopout = mkEnableOption "Allow click on role dot in profile popout to copy role color"; + }; + BetterSession = { + enabled = mkEnableOption '' + Enhances the sessions (devices) menu. Allows you to view exact timestamps, give each session a + custom name, and receive notifications about new sessions. + ''; + backgroundCheck = mkEnableOption '' + Check for new sessions in the background, and display notifications when they are detected. + ''; + checkInterval = mkOption { + type = int; + default = 20; + description = "How often to check for new sessions in the background (if enabled), in minutes."; + }; + }; + BetterSettings = { + enabled = mkEnableOption "Enhances your settings-menu-opening experience."; + disableFade = mkEnableOption "Disable the crossfade animation."; + organizeMenu = mkEnableOption "Organizes the settings cog context menu into categories."; + eagerLoad = mkEnableOption "Removes the loading delay when opening the menu for the first time."; + }; + BetterUploadButton.enabled = mkEnableOption "Upload with a single click, open menu with right click"; + BetterUserArea.enabled = mkEnableOption '' + Reworks the user area styling to fit more buttons and overall look nicer + ''; + BetterStreamPreview.enabled = mkEnableOption "Allows you to enlarge stream previews"; + BlockKeywords = { + enabled = mkEnableOption '' + Blocks messages containing specific user-defined keywords, as if the user sending them was blocked. + ''; + blockedWords = mkOption { + type = str; + default = ""; + description = "Comma-seperated list of words to block."; + example = "arch,home-manager"; + }; + useRegex = mkEnableOption "Use each value as a regular expression when checking message content (advanced)"; + caseSensitive = mkEnableOption "Whether to use a case sensitive search or not."; + ignoreBlockedMessages = mkEnableOption "Completely ignores (recent) new messages bar"; + }; + BlockKrisp.enabled = mkEnableOption "Prevent Krist from loading"; + BlurNSFW = { + enabled = mkEnableOption "Blur attachments in NSFW channels until hovered."; + blurAmount = mkOption { + type = int; + default = 10; + description = "Blur amount"; + }; + }; + BypassStatus = { + enabled = mkEnableOption '' + Still get notifications from specific sources when in do not disturb mode. + Right-click on users/channels/guilds to set them to bypass do not disturb mode. + ''; + guilds = mkOption { + type = listOf str; + default = []; + description = '' + Guilds to let bypass (notified when pinged anywhere in guild). + List of comma seperated guild IDs. + ''; + example = [ + "123451234512345123" + "456456456456456456" + ]; + apply = listToString ","; + }; + channels = mkOption { + type = listOf str; + default = []; + description = '' + channels to let bypass (notified when pinged anywhere in channel). + List of . + ''; + example = [ + "123451234512345123" + "456456456456456456" + ]; + apply = listToString ","; + }; + users = mkOption { + type = listOf str; + default = []; + description = '' + users to let bypass (notified when pinged anywhere in guild). + List of comma seperated user IDs. + ''; + example = [ + "123451234512345123" + "456456456456456456" + ]; + apply = listToString ","; + }; + notificationSound = mkEnableOption "Whether the notification sound should be played"; + statusToUse = mkOption { + type = enum ["dnd" "invisible" "idle"]; + default = "dnd"; + description = "Status to use for whitelist."; + }; + allowOutsideOfDm = mkEnableOption '' + Allow selected users to bypass status outside of DMs too + (acts like a channel/guild bypass, but it's for all messages sent by the selected users). + ''; + }; + CallTimer = { + enabled = mkEnableOption "Adds a timer to vcs."; + format = mkOption { + type = enum ["human" "stopwatch"]; + default = "human"; + description = "The timer format."; + }; + }; + ChannelBadges = { + enabled = mkEnableOption "Adds badges to channels based on their type."; + oneBadgePerChannel = mkEnableOption "Show only one badge per channel."; + showTextBadge = mkEnableOption "Show Text badge"; + showVoiceBadge = mkEnableOption "Show Voice badge"; + showCategoryBadge = mkEnableOption "Show Category badge"; + showDirectoryBadge = mkEnableOption "Show Directory badge"; + showAnnouncementThreadBadge = mkEnableOption "Show Announcement Thread badge"; + showPublicThreadBadge = mkEnableOption "Show Public Thread badge"; + showPrivateThreadBadge = mkEnableOption "Show Private Thread badge"; + showStageBadge = mkEnableOption "Show Stage badge"; + showAnnouncementBadge = mkEnableOption "Show Announcement badge"; + showForumBadge = mkEnableOption "Show Forum badge"; + showMediaBadge = mkEnableOption "Show Media badge"; + showNSFWBadge = mkEnableOption "Show NSFW badge"; + showLockedBadge = mkEnableOption "Show Locked badge"; + showRulesBadge = mkEnableOption "Show Rules badge"; + showUnknownBadge = mkEnableOption "Show Unknown badge"; + textBadgeLabel = mkLabelOption "Text"; + voiceBadgeLabel = mkLabelOption "Voice"; + categoryBadgeLabel = mkLabelOption "Category"; + announcementBadgeLabel = mkLabelOption "News"; + announcementThreadBadgeLabel = mkLabelOption "News Thread"; + publicThreadBadgeLabel = mkLabelOption "Thread"; + privateThreadBadgeLabel = mkLabelOption "Private Thread"; + stageBadgeLabel = mkLabelOption "Stage"; + directoryBadgeLabel = mkLabelOption "Directory"; + forumBadgeLabel = mkLabelOption "Forum"; + mediaBadgeLabel = mkLabelOption "Media"; + nsfwBadgeLabel = mkLabelOption "NSFW"; + lockedBadgeLabel = mkLabelOption "Locked"; + rulesBadgeLabel = mkLabelOption "Rules"; + unknownBadgeLabel = mkLabelOption "Unknown"; + lockedBadgeColor = mkHexColorOption "Locked badge"; + rulesBadgeColor = mkHexColorOption "Rules badge"; + unknownBadgeColor = mkHexColorOption "Unknown badge"; + nsfwBadgeColor = mkHexColorOption "NSFW badge"; + mediaBadgeColor = mkHexColorOption "Media badge"; + forumBadgeColor = mkHexColorOption "Forum badge"; + directoryBadgeColor = mkHexColorOption "Directory badge"; + stageBadgeColor = mkHexColorOption "Stage badge"; + privateThreadBadgeColor = mkHexColorOption "Private Thread badge"; + publicThreadBadgeColor = mkHexColorOption "Public Thread badge"; + announcementThreadBadgeColor = mkHexColorOption "Announcement Thread badge"; + announcementBadgeColor = mkHexColorOption "Announcement badge"; + categoryBadgeColor = mkHexColorOption "Category badge"; + voiceBadgeColor = mkHexColorOption "Voice badge"; + textBadgeColor = mkHexColorOption "Text Badge"; + }; + # doesn't seem to work for me. May require window decorations? + ChannelTabs.enabled = mkEnableOption '' + Group our commonly visited channels in tabs. Warning: this doesnt appear to be working. + ''; + CharacterCounter = { + enabled = mkEnableOption "Adds a character counter to the chat input."; + colorEffects = mkEnableOption "Turn on or off color effects for getting close to the character limit"; + position = mkEnableOption "Move the character counter to the left side of the chat input"; + }; + CleanChannelName.enabled = mkEnableOption "Remove all emoji and decor from channel names"; + ClearURLs.enabled = mkEnableOption "Remove tracking garbage from URLs"; + ClientSideBlock = { + enabled = mkEnableOption "Allows you to locally hide almost all content from any user"; + usersToBlock = mkOption { + type = listOf str; + default = []; + description = "List of User IDs to block"; + example = [ + "123456789" + "987654321" + ]; + apply = listToString ", "; + }; + hideBlockedUser = mkEnableOption "Should blocked users also be hidden everywhere."; + hideBlockedMessages = mkEnableOption "Should messages from blocked users be hidden fully."; + hideEmptyRoles = mkEnableOption "Should role headers be hidden if all of their member are blocked."; + blockedReplyDisplay = mkOption { + type = enum ["displayText" "hideReply"]; + default = "displayText"; + description = '' + What should display instead of the message when someone replies to someone you have hidden. + - "displayText": Display text saying a hidden message was replied to. + - "hideReply": Literally nothing + ''; + }; + guildBlackList = mkOption { + type = listOf str; + default = []; + description = "List of guild IDs to disable functionality in"; + apply = listToString ", "; + }; + guildWhiteList = mkOption { + type = listOf str; + default = []; + description = "List of guild IDs to enable functionality in"; + apply = listToString ", "; + }; + }; + ClientTheme = { + enabled = mkEnableOption "Recreation of the old client theme experiment. Add color to your Discord client theme"; + color = mkOption { + type = strMatching "[[:xdigit:]]{6}"; + description = "Themes Color"; + default = "282828"; + }; + }; + ColorSighted.enabled = mkEnableOption "Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord"; + CommandPalette = { + enabled = mkEnableOption "Allows you to navigate the UI with a keyboard."; + hotkey = mkOption { + # TODO: Regex this + type = listOf str; + default = [ + "control" + "shift" + "p" + ]; + description = "HotKey to toggle the command palette."; + example = [ + "control" + "h" + ]; + }; + }; + ConsoleJanitor = { + enabled = mkEnableOption "Disables annoying console messages/errors"; + disableLoggers = mkEnableOption "Disables Discord loggers"; + disableSpotifyLoggers = mkEnableOption "Disable the Spotify logger, which leaks account information and access token"; + whitlistedLoggers = mkOption { + type = listOf str; + default = [ + "GatewaySocket" + "Routing/Utils" + ]; + description = "List of loggers to allow even if others are hidden."; + apply = listToString "; "; + }; + }; + ConsoleShortcuts.enabled = mkEnableOption '' + Adds shorter Aliases for many things on the window. Run 'shortcutList' for a list. + ''; + CopyEmojiMarkdown = { + enabled = mkEnableOption "Allows you to copy emojis as formatted string (<:blobcatcozy:1026533070955872337>)."; + copyUnicode = mkEnableOption "Copy the raw unicode character instead of :name: for default emojis."; + }; + CopyFileContents.enabled = mkEnableOption "Adds a button to text file attachments to copy their contents."; + CopyUserMention.enabled = mkEnableOption '' + Adds a button to copy user's mention on the user context menu, works best with ValidUser. + ''; + CopyUserURLs.enabled = mkEnableOption "Adds a 'Copy User URL' option to the user context menu."; + CrashHandler = { + enabled = mkBoolOption true "Utility for handling and possibly recovering from chrashes without restart."; + attemptToPreventCrashes = mkBoolOption true "Whether to attempt to prevent Discord crashes."; + attemptToNavigateToHome = mkEnableOption "Whether to attempt to navigate to the home when preventing Discord crashes."; + }; + CtrlEnterSend = { + enabled = mkEnableOption "Use Ctrl+Enter to send messages (customizable)."; + submitRule = mkOption { + type = enum ["ctrl+enter" "shift+enter" "enter"]; + default = "ctrl+enter"; + description = '' + The way to send a messages. + Available options: + - "ctrl+enter" (Enter of Shift+Enter for new line) (cmd+enter on macOS) + - "shift+enter" (Enter for a new Line) + - "enter" (Shift+Enter for new line; Discord default) + ''; + }; + sendMessageInTheMiddleOfACodeBlock = mkEnableOption "Whether to send a message in the middle of a code block."; + }; + CustomIdle = { + enabled = mkEnableOption "Allows you to set the time before Discord goes idle (or disable auto-idle)"; + idleTimeout = { + type = numbers.between 0 60; + default = 20; + description = "Minutes before Discord goes idle (0 to disable auto-idle). 0.0 - 60.0"; + }; + remainInIdle = mkEnableOption "When you come back to Discord, remain idle until you confirm you want to go online"; + }; + CustomSounds.enabled = mkEnableOption "Replace Discord's sounds with your own, custom sounds must be defined via client"; + CustomTimestamps = let + mkTimestampOption = default: description: + mkOption { + type = str; + inherit default description; + }; + in { + enabled = mkEnableOption '' + Custom timestamps on mesages and tooltips. + See for documentation on formatting. + ''; + cozyFormat = mkTimestampOption "[calander]" "Time format to use in messages on cozy mode."; + compactFormat = mkTimestampOption "LT" "Time format on compact mode and hovering messages."; + tooltipFormat = mkTimestampOption "LLLL • [relative]" "Time format to use on tooltips."; + sameDayFormat = mkTimestampOption "HH:mm:ss" "[calander] format for today."; + lastDayFormat = mkTimestampOption "[yesterday] HH:mm:ss" "[calander] format for yesterday."; + lastWeekFormat = mkTimestampOption "ddd DD.MM.YYYY HH:mm:ss" "[calander] format for last week."; + sameElseFormat = mkTimestampOption "ddd DD.MM.YYYY HH:mm:ss" "[calander] format for older dates."; + }; + # why weebs, why + CuteAnimeBoys.enabled = mkEnableOption "Add a command to send cute anime boys in the chat"; + CuteNekos.enabled = mkEnableOption "Send Nekos to others"; + CutePats.enabled = mkEnableOption "Sending head pats."; + DeadMembers.enabled = mkEnableOption "Shows when the sender of a message has left the guild."; + Dearrow = { + enabled = mkEnableOption "Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow."; + hideButton = mkEnableOption "Hides the Dearrow button from Youtube embeds."; + replaceElements = mkOption { + type = enum ["everything" "titles" "thumbnails"]; + default = "everything"; + description = '' + Choose which elements of the embed will be replaced. + Available options: + - "everything" + - "titles" + - "thumbnails" + ''; + apply = mkEquibopSelect { + "everything" = 0; + "titles" = 1; + "thumbnails" = 2; + }; + }; + dearrowByDefault = mkEnableOption "Dearrow videos automatically"; + }; + DecodeBase64 = { + enabled = mkEnableOption "Decode base64 content of any message and copy the decoded content."; + clickMethod = mkOption { + type = enum ["Left" "Right"]; + default = "Left"; + }; + }; + }; + }; + }; + config = mkIf cfg.enable { + # test file until module is complete + xdg.configFile."equibop/test.json".text = builtins.toJSON cfg.settings; + }; +} diff --git a/modules/home/workstation/communication/vesktop/default.nix b/modules/home/workstation/communication/vesktop/default.nix index 00564aa..ecdeec5 100644 --- a/modules/home/workstation/communication/vesktop/default.nix +++ b/modules/home/workstation/communication/vesktop/default.nix @@ -1,13 +1,13 @@ { - config, osConfig, + hozen, lib, pkgs, ... }: let inherit (lib) mkIf elem; - inherit (osConfig.ooknet.appearance) colorscheme fonts; - inherit (colorscheme) palette; + inherit (hozen) color; + inherit (osConfig.ooknet.appearance) fonts; inherit (osConfig.ooknet.workstation) profiles; vesktopMime = {"x-scheme-handler/discord" = ["vesktop.desktop"];}; @@ -15,9 +15,8 @@ in { config = mkIf (elem "communication" profiles) { # home.packages = [ - (pkgs.vesktop.overrideAttrs (old: { - patches = (old.patches or []) ++ [./vesktop-patch.patch]; - })) + pkgs.vesktop + pkgs.equibop ]; xdg.configFile."vesktop/themes/nix.css".text = @@ -32,17 +31,17 @@ in { */ :root { - --nix-bg1: #${palette.base00}; - --nix-bg2: #${palette.base01}; - --nix-bg3: #${palette.base02}; + --nix-bg1: #${color.base00}; + --nix-bg2: #${color.base01}; + --nix-bg3: #${color.base02}; - --nix-fg1: #${palette.base05}; - --nix-fg2: #${palette.base07}; - --nix-fg3: #${palette.base03}; - --nix-link: #${palette.base0D}; + --nix-fg1: #${color.base05}; + --nix-fg2: #${color.base07}; + --nix-fg3: #${color.base03}; + --nix-link: #${color.base0D}; - --nix-accent: #${palette.base08}; - --nix-hi: #${palette.base0B}; + --nix-accent: #${color.base08}; + --nix-hi: #${color.base0B}; --font-mono: ${fonts.monospace.family}, monospace; --font-regular: ${fonts.regular.family}, sans serif; diff --git a/modules/home/workstation/communication/vesktop/vesktop-patch.patch b/modules/home/workstation/communication/vesktop/vesktop-patch.patch deleted file mode 100644 index 9e057be..0000000 --- a/modules/home/workstation/communication/vesktop/vesktop-patch.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/src/main/index.ts b/src/main/index.ts -index 2e0d6f7..70dabba 100644 ---- a/src/main/index.ts -+++ b/src/main/index.ts -@@ -35,7 +35,7 @@ function init() { - if (hardwareAcceleration === false) { - app.disableHardwareAcceleration(); - } else { -- enabledFeatures.push("VaapiVideoDecodeLinuxGL", "VaapiVideoEncoder", "VaapiVideoDecoder"); -+ enabledFeatures.push("VaapiVideoDecodeLinuxGL", "VaapiVideoEncoder", "VaapiVideoDecoder", "VulkanFromANGLE", "DefaultANGLEVulkan", "VaapiIgnoreDriverChecks", "PlatformHEVCDecoderSupport", "VaapiVP8Encoder", "VaapiVP9Encoder", "VaapiAV1Encoder", "WaylandWindowDecorations", "UseOzonePlatform", "WebRTCPipeWireCapturer"); - } - - if (disableSmoothScroll) { -@@ -48,6 +48,26 @@ function init() { - app.commandLine.appendSwitch("disable-renderer-backgrounding"); - app.commandLine.appendSwitch("disable-background-timer-throttling"); - app.commandLine.appendSwitch("disable-backgrounding-occluded-windows"); -+ app.commandLine.appendSwitch("disable-renderer-backgrounding"); -+ app.commandLine.appendSwitch("disable-background-timer-throttling"); -+ app.commandLine.appendSwitch("disable-backgrounding-occluded-windows"); -+ app.commandLine.appendSwitch("enable-zero-copy"); -+ app.commandLine.appendSwitch("use-gl=angle"); -+ app.commandLine.appendSwitch("use-angle=gl"); -+ app.commandLine.appendSwitch("use-vulkan"); -+ app.commandLine.appendSwitch("enable-oop-rasterization"); -+ app.commandLine.appendSwitch("enable-raw-draw"); -+ app.commandLine.appendSwitch("enable-gpu-rasterization"); -+ app.commandLine.appendSwitch("enable-gpu-compositing"); -+ app.commandLine.appendSwitch("enable-native-gpu-memory-buffers"); -+ app.commandLine.appendSwitch("enable-accelerated-2d-canvas"); -+ app.commandLine.appendSwitch("enable-accelerated-video-decode"); -+ app.commandLine.appendSwitch("enable-accelerated-mjpeg-decode"); -+ app.commandLine.appendSwitch("disable-gpu-vsync"); -+ app.commandLine.appendSwitch("disable-frame-rate-limit"); -+ app.commandLine.appendSwitch("ozone-platform-hint=auto"); -+ app.commandLine.appendSwitch("enable-webrtc-pipewire-capturer"); -+ app.commandLine.appendSwitch("ozone-platform=wayland"); - if (process.platform === "win32") { - disabledFeatures.push("CalculateNativeWinOcclusion"); - } - -diff --git a/src/renderer/components/ScreenSharePicker.tsx b/src/renderer/components/ScreenSharePicker.tsx -index c7403b9..9b454e6 100644 ---- a/src/renderer/components/ScreenSharePicker.tsx -+++ b/src/renderer/components/ScreenSharePicker.tsx -@@ -84,9 +84,9 @@ addPatch({ - const width = Math.round(height * (16 / 9)); - - Object.assign(opts, { -- bitrateMin: 500000, -- bitrateMax: 8000000, -- bitrateTarget: 600000 -+ bitrateMin: 10000000, -+ bitrateMax: 60000000, -+ bitrateTarget: 32000000 - }); - if (opts?.encode) { - Object.assign(opts.encode, { - -diff --git a/src/main/settings.ts b/src/main/settings.ts -index 6fad97f..dfc64e3 100644 ---- a/src/main/settings.ts -+++ b/src/main/settings.ts -@@ -26,8 +26,10 @@ function loadSettings(file: string, name: string) { - - const store = new SettingsStore(settings); - store.addGlobalChangeListener(o => { -- mkdirSync(dirname(file), { recursive: true }); -- writeFileSync(file, JSON.stringify(o, null, 4)); -+ try { -+ mkdirSync(dirname(file), { recursive: true }); -+ writeFileSync(file, JSON.stringify(o, null, 4)); -+ } catch {} - }); - - return store; diff --git a/modules/home/workstation/creative/aseprite.nix b/modules/home/workstation/creative/aseprite.nix new file mode 100644 index 0000000..14920f8 --- /dev/null +++ b/modules/home/workstation/creative/aseprite.nix @@ -0,0 +1,13 @@ +{ + lib, + osConfig, + pkgs, + ... +}: let + inherit (lib) mkIf elem; + inherit (osConfig.ooknet.workstation) profiles; +in { + config = mkIf (elem "creative" profiles) { + home.packages = [pkgs.aseprite]; + }; +} diff --git a/modules/home/workstation/creative/default.nix b/modules/home/workstation/creative/default.nix index def6f08..2c7c3ff 100644 --- a/modules/home/workstation/creative/default.nix +++ b/modules/home/workstation/creative/default.nix @@ -1,5 +1,6 @@ { imports = [ ./inkscape.nix + ./aseprite.nix ]; } diff --git a/modules/home/workstation/gaming/default.nix b/modules/home/workstation/gaming/default.nix index 048500d..4412448 100644 --- a/modules/home/workstation/gaming/default.nix +++ b/modules/home/workstation/gaming/default.nix @@ -10,6 +10,8 @@ in { ./wow.nix ./wine.nix ./bottles.nix + ./emulation.nix + ./project-plus ]; config = mkIf (elem "gaming" profiles) { ooknet.binds = { diff --git a/modules/home/workstation/gaming/emulation.nix b/modules/home/workstation/gaming/emulation.nix new file mode 100644 index 0000000..7b18cae --- /dev/null +++ b/modules/home/workstation/gaming/emulation.nix @@ -0,0 +1,29 @@ +{ + lib, + osConfig, + pkgs, + self', + ... +}: let + inherit (lib) mkIf elem; + inherit (builtins) attrValues; + inherit (osConfig.ooknet.workstation) profiles; +in { + config = mkIf (elem "gaming" profiles) { + home.packages = attrValues { + inherit + (pkgs) + ryujinx + ; + inherit + (self'.packages) + wii-u-gc-adapter + ; + }; + ooknet.gaming.project-plus = { + enable = true; + startFullscreen = true; + netplay.nickname = "ooks"; + }; + }; +} diff --git a/modules/home/workstation/gaming/project-plus/default.nix b/modules/home/workstation/gaming/project-plus/default.nix new file mode 100644 index 0000000..86e0060 --- /dev/null +++ b/modules/home/workstation/gaming/project-plus/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./options.nix + ]; +} diff --git a/modules/home/workstation/gaming/project-plus/options.nix b/modules/home/workstation/gaming/project-plus/options.nix new file mode 100644 index 0000000..2055b67 --- /dev/null +++ b/modules/home/workstation/gaming/project-plus/options.nix @@ -0,0 +1,140 @@ +{ + lib, + self', + config, + ... +}: let + inherit (lib) mkOption mkEnableOption mkIf; + inherit (lib.types) package str path attrsOf anything bool int; + cfg = config.ooknet.gaming.project-plus; +in { + options.ooknet.gaming.project-plus = { + enable = mkEnableOption "Enable Project Plus"; + package = mkOption { + type = package; + default = self'.packages.project-plus.override { + inherit (cfg) userDir; + }; + }; + userDir = mkOption { + type = str; + default = "${config.xdg.configHome}/project-plus"; + description = '' + Location of the Dolphin User directory, this is the path that the wrapped package + will use for User configuration. defaults to "\$\{config.xdg.configHome}/project-plus" + ''; + }; + + launcherSource = mkOption { + type = path; + default = "${self'.packages.fpp-launcher}/Launcher"; + description = '' + Location of the faster-project-plus launcher files. + ''; + }; + sdCardSource = mkOption { + type = path; + default = "${self'.packages.fpp-sd}/sd.raw"; + description = '' + Location of the faster-project-plus sd card + ''; + }; + userSource = mkOption { + type = path; + default = "${self'.packages.fpp-config}/Binaries/User"; + }; + + netplay = { + nickname = mkOption { + type = str; + default = "Player"; + description = "Netplay nickname displayed to other players"; + }; + disableMusic = mkOption { + type = bool; + default = true; + description = "Whether to disable music during netplay"; + }; + buffer = mkOption { + type = int; + default = 4; + description = "Default netplay buffer"; + }; + }; + + analytics = { + enable = mkEnableOption "Enable anaylytics"; + }; + + startFullscreen = mkEnableOption "Start emulated game fullscreen"; + + gamesDir = mkOption { + type = str; + default = "./Games"; + description = '' + Location of the directory that stores all game isos, this is where you should store + your brawl iso. Defaults to "./Brawl" (The . is relative to the User dolphin directory) + ''; + }; + + extraSettings = mkOption { + type = attrsOf anything; + default = {}; + description = '' + Additional settings for Dolphin.ini + ''; + }; + }; + config = mkIf cfg.enable { + home.packages = [cfg.package]; + xdg.configFile = { + "project-plus/Config/Dolphin.ini" = { + text = lib.generators.toINI {} { + # default settings to ensure project-plus works OOTB. + General = { + IsoPaths = 2; + IsoPath0 = "${cfg.userDir}/Games"; + IsoPath1 = "${cfg.userDir}/Launcher"; + WiiSDCardPath = "${cfg.userDir}/Wii/sd.raw"; + }; + Core = { + DefaultISO = "${cfg.userDir}/Games/brawl.iso"; + }; + Netplay = { + SelectedHostGame = "Project+ Netplay Launcher.dol"; + BufferSize = cfg.netplay.buffer; + Nickname = cfg.netplay.nickname; + MusicOff = cfg.netplay.disableMusic; + ListenPort = "0x0a42"; + HostPort = "0x0a42"; + ConnectPort = "0x0a42"; + HostCode = 00000000; + TraversalChoice = "traversal"; + }; + Analytics = { + Enabled = cfg.analytics.enable; + PermissionAsked = true; + }; + Display = { + Fullscreen = cfg.startFullscreen; + }; + }; + }; + # Copy dolphin GameSettings configuration from faster-project-plus config + # This includes various Gecko Code files to make for a better Netplay experience + "project-plus/GameSettings" = { + source = "${cfg.userSource}/GameSettings"; + recursive = true; + }; + "project-plus/Launcher" = { + source = "${cfg.launcherSource}"; + recursive = true; + }; + # Cant get this to work, does the sd card need to be writable for dolphin to use it? + # for now sd card will need to be manually placed in the SD directory + # "project-plus/Wii/sd.raw" = { + # source = cfg.sdCardSource; + # }; + }; + }; +} diff --git a/modules/home/workstation/gaming/world-of-warcraft.nix b/modules/home/workstation/gaming/world-of-warcraft.nix deleted file mode 100644 index 5bb944c..0000000 --- a/modules/home/workstation/gaming/world-of-warcraft.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: let - inherit (lib) mkIf mkEnableOption mkOption; - inherit (lib.types) str package; - inherit (config.ooknet) gaming; - gamesDir = config.xdg.userDirs.extraConfig.XDG_GAMES_DIR; - cfg = config.ooknet.gaming.world-of-warcraft; -in { - options.ooknet.gaming.world-of-warcraft = { - enable = mkEnableOption "Enable the World of Warcraft module"; - - proton = { - package = mkOption { - type = package; - default = pkgs.proton-ge-custom; - }; - prefix = { - path = mkOption { - type = str; - default = "${gaming.prefixPath}/WoW"; - }; - }; - compatDataPath = mkOption { - type = str; - default = "${gaming.compatDataPath}/"; - }; - }; - - gamePrefixPath = mkOption { - type = str; - default = "${cfg.winePrefixesPath}/WoW"; - description = "Location where the World of Warcraft prefix will be stored."; - }; - - gamePath = mkOption { - type = str; - default = "${cfg.world-of-warcraft.gamePrefixPath}/drive_c/Program Files (x86)/World of Warcraft"; - description = "Location where the World of Warcraft installation will be symlinked."; - }; - - gameSharedPath = mkOption { - type = str; - default = "${cfg.wineProgramsPath}/World Of Warcraft"; - description = "Location where World of Warcraft game files are stored."; - }; - }; - config = - mkIf cfg.enable { - }; -} - diff --git a/modules/home/workstation/gaming/wow.nix b/modules/home/workstation/gaming/wow.nix index 9ca101e..0c82934 100644 --- a/modules/home/workstation/gaming/wow.nix +++ b/modules/home/workstation/gaming/wow.nix @@ -2,7 +2,6 @@ lib, osConfig, pkgs, - self', ... }: let inherit (lib) mkIf elem; diff --git a/modules/home/workstation/hyprland/components/hyprlock.nix b/modules/home/workstation/hyprland/components/hyprlock.nix index a829f9b..bee1c9a 100644 --- a/modules/home/workstation/hyprland/components/hyprlock.nix +++ b/modules/home/workstation/hyprland/components/hyprlock.nix @@ -2,11 +2,13 @@ lib, osConfig, inputs', + hozen, ... }: let - inherit (osConfig.ooknet.appearance) colorscheme fonts; - inherit (colorscheme) palette; + inherit (osConfig.ooknet.appearance) fonts; inherit (osConfig.ooknet.workstation) environment; + inherit (osConfig.ooknet.hardware) primaryMonitor; + inherit (hozen) color; inherit (lib) mkIf; in { config = mkIf (environment == "hyprland") { @@ -29,10 +31,11 @@ in { background = { monitor = ""; path = ""; - color = "0xff${palette.base01}"; + color = "0xff${color.layout.body}"; }; input-field = { + monitor = primaryMonitor; size = "200, 30"; position = "0, 0"; @@ -42,18 +45,18 @@ in { rounding = 0; fade_on_empty = false; placeholder_text = ""; - outer_color = "0xff${palette.base03}"; - inner_color = "0xff${palette.base00}"; - font_color = "0xff${palette.base05}"; + outer_color = "0xff${color.secondary.base}"; + inner_color = "0xff${color.layout.menu}"; + font_color = "0xff${color.typography.text}"; }; label = { - monitor = ""; - text = " LOCKED"; + monitor = primaryMonitor; + text = "LOCKED"; position = "0, 150"; valign = "center"; halign = "center"; - color = "0xff${palette.base08}"; + color = "0xff${color.red.base}"; font_size = 30; font_family = "${fonts.monospace.family}"; }; diff --git a/modules/home/workstation/hyprland/components/mako.nix b/modules/home/workstation/hyprland/components/mako.nix index e0bfe08..74467b0 100644 --- a/modules/home/workstation/hyprland/components/mako.nix +++ b/modules/home/workstation/hyprland/components/mako.nix @@ -1,37 +1,42 @@ { osConfig, + hozen, lib, ... }: let - inherit (osConfig.ooknet.appearance) colorscheme fonts; - inherit (colorscheme) palette; + inherit (osConfig.ooknet.appearance) fonts; inherit (osConfig.ooknet.workstation) environment; + inherit (hozen) color; inherit (lib) mkIf; in { config = mkIf (environment == "hyprland") { services.mako = { enable = true; + layer = "overlay"; font = "${fonts.regular.family} 12"; - padding = "10,10"; anchor = "top-right"; width = 300; height = 100; borderSize = 2; defaultTimeout = 3000; - backgroundColor = "#${palette.base00}dd"; - borderColor = "#${palette.base05}dd"; - textColor = "#${palette.base05}dd"; + backgroundColor = "#${color.layout.menu}"; + borderColor = "#${color.border.active}"; + textColor = "#${color.typography.text}"; extraConfig = '' [app-name="system-notify"] - padding=3,3 + text-alignment=center + font=${fonts.regular.family} 16 + anchor=top-center width=100 height=100 + [app-name="spotify_player"] + border-color=#${color.green.base} [urgency=critical] padding=3,3 - width=100 + width=300 height=100 anchor=top-center - border-color=#${palette.base08}dd + border-color=#${color.red.base}dd ''; }; }; diff --git a/modules/home/workstation/hyprland/components/rofi.nix b/modules/home/workstation/hyprland/components/rofi.nix index 70b7ce3..e63aea1 100644 --- a/modules/home/workstation/hyprland/components/rofi.nix +++ b/modules/home/workstation/hyprland/components/rofi.nix @@ -2,13 +2,14 @@ lib, config, osConfig, + hozen, pkgs, ... }: let inherit (lib) mkIf; - inherit (osConfig.ooknet.appearance) colorscheme fonts; - inherit (colorscheme) palette; + inherit (osConfig.ooknet.appearance) fonts; inherit (osConfig.ooknet.workstation) environment; + inherit (hozen) color; inherit (config.lib.formats.rasi) mkLiteral; in { config = mkIf (environment == "hyprland") { @@ -19,10 +20,10 @@ in { terminal = "${config.home.sessionVariables.TERMINAL}"; theme = { "*" = { - background = mkLiteral "#${palette.base00}"; - foreground = mkLiteral "#${palette.base05}"; - selected = mkLiteral "#${palette.base0B}"; - message = mkLiteral "#${palette.base0D}"; + background = mkLiteral "#${color.layout.menu}"; + foreground = mkLiteral "#${color.typography.text}"; + selected = mkLiteral "#${color.primary.base}"; + message = mkLiteral "#${color.blue.base}"; background-color = mkLiteral "@background"; border-color = mkLiteral "@foreground"; diff --git a/modules/home/workstation/hyprland/components/waybar.nix b/modules/home/workstation/hyprland/components/waybar.nix index 7213faf..70b6c83 100644 --- a/modules/home/workstation/hyprland/components/waybar.nix +++ b/modules/home/workstation/hyprland/components/waybar.nix @@ -3,10 +3,11 @@ lib, pkgs, osConfig, + hozen, ... }: let - inherit (osConfig.ooknet.appearance) colorscheme fonts; - inherit (colorscheme) palette; + inherit (osConfig.ooknet.appearance) fonts; + inherit (hozen) color; inherit (osConfig.ooknet.hardware) monitors; inherit (osConfig.ooknet.workstation) environment; inherit (lib) mkIf head; @@ -22,7 +23,7 @@ in { settings.mainBar = { layer = "top"; position = "top"; - height = 30; + height = 32; width = monitorWidth; exclusive = true; margin-top = 10; @@ -89,8 +90,8 @@ in { '' * { font-family: "${fonts.monospace.family}"; - font-size: 19px; - border: solid #${palette.base05}; + font-size: ${toString fonts.monospace.size}px; + border: solid #${color.border.base}; } window#waybar { @@ -101,32 +102,32 @@ in { #clock, #battery, #workspaces { - background-color: #${palette.base00}; + background-color: #${color.layout.header}; padding-right: 10px; } #clock { padding-left: 10px; - border: 2px solid #${palette.base05}; + border: 2px solid #${color.border.base}; border-right: 0px; border-top-left-radius: 10px; } #battery { padding-left: 10px; - border-top: 2px solid #${palette.base05}; - border-bottom: 2px solid #${palette.base05}; + border-top: 2px solid #${color.border.base}; + border-bottom: 2px solid #${color.border.base}; border-left: 0px; } #battery.good { - color: #${palette.base0B}; + color: #${color.success.base}; } #battery.warning { - color: #${palette.base0A}; + color: #${color.warning.base}; } #battery.critical { - color: #${palette.base08}; + color: #${color.error.base}; } #tray { @@ -137,7 +138,7 @@ in { } #workspaces { - border: 2px solid #${palette.base05}; + border: 2px solid #${color.border.base}; border-left: 0; border-top-right-radius: 10px; } @@ -145,15 +146,15 @@ in { #workspace button, #workspaces button.active, #workspaces button.visible { - color: #${palette.base0B}; + color: #${color.primary.base}; } #workspaces button.urgent { - color: #${palette.base08}; + color: #${color.orange.base}; } #custom-hyprrecord { - color: #${palette.base08}; + color: #${color.red.base}; padding-right: 20px; } ''; diff --git a/modules/home/workstation/hyprland/default.nix b/modules/home/workstation/hyprland/default.nix index 0bf1580..ae350b1 100644 --- a/modules/home/workstation/hyprland/default.nix +++ b/modules/home/workstation/hyprland/default.nix @@ -18,7 +18,7 @@ in { enable = true; package = inputs'.hyprland.packages.hyprland; xwayland.enable = true; - systemd = { + systemd = mkIf (!osConfig.programs.uwsm.enable) { enable = true; variables = ["--all"]; }; @@ -28,7 +28,7 @@ in { CLUTTER_BACKEND = "wayland"; NIXOS_OZONE_WL = "1"; GDK_BACKEND = "wayland"; - QT_QPA_PLATFORM = "wayland"; + QT_QPA_PLATFORM = "wayland;xcb"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; DISABLE_QT5_COMPAT = "0"; QT_AUTO_SCREEN_SCALE_FACTOR = "1"; diff --git a/modules/home/workstation/hyprland/settings/appearance.nix b/modules/home/workstation/hyprland/settings/appearance.nix index 0b75aa7..9d46ed5 100644 --- a/modules/home/workstation/hyprland/settings/appearance.nix +++ b/modules/home/workstation/hyprland/settings/appearance.nix @@ -1,18 +1,23 @@ -{osConfig, ...}: let - inherit (osConfig.ooknet.appearance) colorscheme cursor; - inherit (colorscheme) palette; +{ + osConfig, + hozen, + ... +}: let + inherit (osConfig.ooknet.appearance) cursor; + inherit (hozen) color; in { wayland.windowManager.hyprland = { + #plugins = [inputs'.hyprland-plugins.packages.borders-plus-plus]; settings = { # cursor = { # inactive_timeout = 4; # }; general = { + border_size = 2; + "col.inactive_border" = "rgb(${color.neutrals."700"})"; + "col.active_border" = "rgb(${color.neutrals."650"})"; gaps_in = 10; gaps_out = 10; - border_size = 2; - "col.active_border" = "0xff${palette.base05}"; - "col.inactive_border" = "0xff${palette.base02}"; }; exec-once = [ @@ -30,14 +35,25 @@ in { enabled = false; ignore_opacity = true; }; - - drop_shadow = true; - shadow_range = 12; - shadow_offset = "3 3"; - "col.shadow" = "0x44000000"; - "col.shadow_inactive" = "0x66000000"; + shadow = { + enabled = true; + range = 2; + sharp = true; + offset = "2 2"; + color = "0xff${color.neutrals."850"}"; + color_inactive = "0xff${color.neutrals."850"}"; + }; }; - + # FIXME + #"plugin:borders-plus-plus" = { + # enabled = true; + # add_borders = 1; + # "col.border_1" = "rgb(${color.neutrals."600"})"; + # + # border_size_1 = 2; + # border_size_2 = 2; + # natural_rounding = false; + #}; animations = { enabled = false; }; diff --git a/modules/home/workstation/hyprland/settings/binds.nix b/modules/home/workstation/hyprland/settings/binds.nix index f579687..971147b 100644 --- a/modules/home/workstation/hyprland/settings/binds.nix +++ b/modules/home/workstation/hyprland/settings/binds.nix @@ -2,17 +2,20 @@ inherit (config.ooknet) binds; in { wayland.windowManager.hyprland.settings = { + # TODO: build better binds interface bind = [ # Program Launch "SUPER, b, exec, ${binds.browser}" "SUPER, return, exec, ${binds.terminal}" + "SUPERSHIFT, return, exec, ${binds.terminal} --title=dropdown" "SUPER, e, exec, ${binds.terminalLaunch} $EDITOR" "SUPERSHIFT, P, exec, ${binds.password}" + "SUPERCTRL, P, exec, ${binds.quickpass}" "SUPER, d, exec, ${binds.discord}" "SUPERSHIFT, e, exec, ${binds.fileManager}" "SUPERSHIFT, S, exec, ${binds.steam}" "SUPERSHIFT, n, exec, ${binds.notes}" - "SUPER, escape, exec, ${binds.terminalLaunch} --title=BTOP btop" + "SUPER, escape, exec, ${binds.btop}" "SUPER CTRL, return, exec, ${binds.zellijMenu}" "SUPER, delete, exec, ${binds.powerMenu}" "SUPERSHIFT, F, exec, ${binds.factorio}" diff --git a/modules/home/workstation/hyprland/settings/default.nix b/modules/home/workstation/hyprland/settings/default.nix index 7645edd..02c8304 100644 --- a/modules/home/workstation/hyprland/settings/default.nix +++ b/modules/home/workstation/hyprland/settings/default.nix @@ -8,5 +8,7 @@ ./monitor.nix ./gestures.nix ./appearance.nix + ./workspaces.nix + ./options ]; } diff --git a/modules/home/workstation/hyprland/settings/misc.nix b/modules/home/workstation/hyprland/settings/misc.nix index 064daf4..eb4cde6 100644 --- a/modules/home/workstation/hyprland/settings/misc.nix +++ b/modules/home/workstation/hyprland/settings/misc.nix @@ -8,7 +8,7 @@ enable_swallow = true; # TODO: use terminal/file-explorer module - swallow_regex = "foot|nemo"; + swallow_regex = "foot|nemo|com.mitchellh.ghostty"; focus_on_activate = true; }; diff --git a/modules/home/workstation/hyprland/settings/options/default.nix b/modules/home/workstation/hyprland/settings/options/default.nix new file mode 100644 index 0000000..d59c620 --- /dev/null +++ b/modules/home/workstation/hyprland/settings/options/default.nix @@ -0,0 +1,140 @@ +{ + lib, + config, + ... +}: let + inherit + (lib) + flatten + attrValues + concatStringsSep + filterAttrs + mapAttrsToList + boolToString + mkOption + isBool + ; + inherit + (lib.types) + listOf + attrsOf + submodule + nullOr + str + int + bool + oneOf + ; + + # our cursed regex types + hyprland = import ./rules.nix {inherit lib;}; + + _toString = type: val: + if isBool val + then + if type == "windowrule" + then + if val + then "1" + else "0" + else boolToString val # for workspace rules + else toString val; + + # format rules for hyprland + formatRules = type: rule: + concatStringsSep "," ( + mapAttrsToList (name: value: "${name}:${_toString type value}") + (filterAttrs (_: v: v != null) rule) + ); + + # workspace handling + mkWorkspaces = mapAttrsToList ( + selector: rules: "${selector},${formatRules "workspacerule" rules}" + ); + + # rule options + mkRuleOption = type: description: + mkOption { + type = nullOr type; + default = null; + inherit description; + }; + + # window rule matchers + windowRuleMatchers = submodule { + options = { + class = mkRuleOption str "Window class matcher"; + title = mkRuleOption str "Window title matcher"; + initialClass = mkRuleOption str "Initial window class matcher"; + initialTitle = mkRuleOption str "Initial window title matcher"; + tag = mkRuleOption str "Window tag matcher"; + xwayland = mkRuleOption bool "Match XWayland windows"; + floating = mkRuleOption bool "Match floating windows"; + fullscreen = mkRuleOption bool "Match fullscreen windows"; + workspace = mkRuleOption str "Match windows on specific workspace"; + }; + }; + + # Workspace rules submodule + workspaceRules = submodule { + options = { + name = mkRuleOption str "Default name of workspace"; + monitor = mkRuleOption str "Binds workspace to monitor"; + default = mkRuleOption bool "Set as default workspace for monitor"; + gapsin = mkRuleOption int "Gaps between windows"; + gapsout = mkRuleOption int "Gaps between windows and monitor edges"; + bordersize = mkRuleOption int "Border size around windows"; + border = mkRuleOption bool "Draw borders"; + shadow = mkRuleOption bool "Draw shadows"; + rounding = mkRuleOption bool "Draw rounded corners"; + decorate = mkRuleOption bool "Draw window decorations"; + persistent = mkRuleOption bool "Keep workspace alive when empty"; + on-created-empty = mkRuleOption str "Command to run when workspace created empty"; + }; + }; + + # Window rules type using our validated types from rules.nix + windowRuleType = listOf (oneOf (attrValues hyprland.types)); + + cfg = config.wayland.windowManager.hyprland; +in { + options.wayland.windowManager.hyprland = { + # Workspace configuration + workspaces = mkOption { + type = attrsOf workspaceRules; + default = {}; + description = "Workspace-specific configurations"; + }; + + # Window rules configuration + windowRules = mkOption { + type = listOf (submodule { + options = { + matches = mkOption { + type = windowRuleMatchers; + description = "Window matching criteria"; + }; + rules = mkOption { + type = windowRuleType; + description = "Rules to apply to matching windows"; + }; + }; + }); + default = []; + description = "Window-specific rules"; + }; + }; + + config.wayland.windowManager.hyprland.settings = { + workspace = mkWorkspaces cfg.workspaces; + windowrulev2 = let + # Convert rules to Hyprland format + formatWindowRule = rule: let + matches = formatRules "windowrule" rule.matches; + rules = map (r: "${r},${matches}") rule.rules; + in + rules; + in + flatten (map formatWindowRule cfg.windowRules); + }; +} diff --git a/modules/home/workstation/hyprland/settings/options/rules.nix b/modules/home/workstation/hyprland/settings/options/rules.nix new file mode 100644 index 0000000..99b5356 --- /dev/null +++ b/modules/home/workstation/hyprland/settings/options/rules.nix @@ -0,0 +1,241 @@ +{lib, ...}: let + inherit (lib) concatStringsSep attrValues; + inherit (lib.types) enum strMatching; + + # helper function for constructing regex patterns for hyprland rules + mkRegexTarget = { + name, + regex ? [], + extraRegex ? "", + optional ? false, + }: let + regexPart = concatStringsSep "|" regex; + parameterPart = + if optional + then "( (${regexPart}))?" + else " (${regexPart})"; + in + strMatching "${name}${parameterPart}${extraRegex}"; + + # basic windowrules that can be validated with simple enum + + basicWindowRules = enum [ + "float" + "tile" + "fullscreen" + "maximize" + "pseudo" + "noinitialfocus" + "pin" + "unset" + "nomaxsize" + "stayfocused" + ]; + + # toggleable options + toggleableRules = [ + # window decoration + "decorate" # window decorations + "noborder" # borders + "noshadow" # shadows + "norounding" # corner rounding + + # Visual effects + "noblur" # blur + "noanim" # animations + "nodim" # dimming + "opaque" # opacity enforcement + "forcergbx" # RGB handling + "xray" # blur xray mode + "immediate" # tearing mode + + # Behavior + "dimaround" # dim around window + "focusonactivate" # focus on activation request + "nofocus" # disable focus + "stayfocused" # keep focus + "keepaspectratio" # maintain aspect ratio + "nearestneighbor" # nearest neighbor filtering + "nomaxsize" # disable max size + "noshortcutsinhibit" # shortcut inhibiting + "allowsinput" # XWayland input forcing + "renderunfocused" # unfocused rendering + "syncfullscreen" # fullscreen sync + ]; + + # reusable regex pattens to be used in constructing our types + patterns = { + # toggles + onOpt = "1|true|on|yes|0|salse|off|no|toggle|unset"; + + # numbers + float = "[+-]?([0-9]*[.])?[0-9]+"; + int = "[0-9]+"; + alpha = ''(0|0?\.[[:digit:]]+|1|1\.0)''; + percentage = "[0-9]+(%)?"; + + # position + anchor = "100%-w?-[0-9]+"; + coordinate = "${patterns.percentage}|${patterns.anchor}"; + deg = "(0-360)"; + + # identification + numericId = "[1-9][0-9]*"; + sign = "[+-]"; + relative = "${patterns.sign}${patterns.numericId}"; + monitorPrefix = "(m|r)"; + monitorRelative = "${patterns.monitorPrefix}(${patterns.sign}${patterns.numericId}|~${patterns.numericId})"; + emptyModifiers = "[mn]*"; + empty = "empty${patterns.emptyModifiers}"; + mode = "(always|focus|fullscreen|none)"; + ident = "[A-Za-z0-9_][A-Za-z0-9_ -]*"; + name = "name:${patterns.ident}"; + special = "special(:[a-zA-Z0-9_-]+)?"; + previous = "previous(_per_monitor)?"; + openWorkspace = "e(${patterns.sign}${patterns.numericId}|~${patterns.numericId})"; + + # colors + rgbValue = ''([1-9]?[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])''; + rgbaHex = ''rgba\([[:xdigit:]]{8}\)''; + rgbaDecimal = ''rgba\(${patterns.rgbValue}, *${patterns.rgbValue}, *${patterns.rgbValue}, *${patterns.alpha}\)''; + rgbHex = ''rgb\([[:xdigit:]]{3}([[:xdigit:]]{3})?\)''; + rgbDecimal = ''rgb\(${patterns.rgbValue}, *${patterns.rgbValue}, *${patterns.rgbValue}\)''; + legacy = ''0x[[:xdigit:]]{8}''; + color = concatStringsSep "|" [ + patterns.rgbaHex + patterns.rgbaDecimal + patterns.rgbHex + patterns.rgbDecimal + patterns.legacy + ]; + }; + + mkToggleableRules = name: + mkRegexTarget { + inherit name; + regex = [patterns.onOpt]; + optional = true; + }; + + toggleTargets = builtins.listToAttrs (map (name: { + inherit name; + value = mkToggleableRules name; + }) + toggleableRules); + + # regex patterns to pass to the workspace rule + + types = + { + inherit basicWindowRules; + workspace = mkRegexTarget { + name = "workspace"; + regex = attrValues { + inherit (patterns) numericId relative monitorRelative empty name special previous openWorkspace; + }; + extraRegex = "( +silent)?"; + }; + + monitor = mkRegexTarget { + name = "monitor"; + regex = attrValues { + inherit (patterns) numericId ident; + }; + }; + + group = mkRegexTarget { + name = "group"; + regex = ["set|new|lock|barred|deny|invade|override|unset"]; + }; + + size = mkRegexTarget { + name = "size"; + regex = [ + "([0-9]+|[<>][0-9]+)(%|px)?( ([0-9]+|[<>][0-9]+)(%|px)?)?" + ]; + }; + + move = mkRegexTarget { + name = "move"; + regex = [ + "(${patterns.coordinate}) (${patterns.coordinate})" + "cursor (${patterns.percentage}) (${patterns.percentage})" + "onscreen cursor (${patterns.percentage}) (${patterns.percentage})" + ]; + }; + + bordercolor = mkRegexTarget { + name = "bordercolor"; + regex = [patterns.color]; + }; + + idleinhibit = mkRegexTarget { + name = "idleinhibit"; + regex = [patterns.mode]; + }; + + opacity = mkRegexTarget { + name = "opacity"; + regex = let + opacityValue = "${patterns.alpha}( override)?"; + in [ + opacityValue + "${opacityValue} ${opacityValue}" + "${opacityValue} ${opacityValue} ${opacityValue}" + ]; + }; + + center = mkRegexTarget { + name = "center"; + regex = ["[0-1]"]; + optional = true; + }; + + roundingpower = mkRegexTarget { + name = "roundingpower"; + regex = [patterns.float]; + }; + + bordersize = mkRegexTarget { + name = "bordersize"; + regex = [patterns.int]; + }; + + rounding = mkRegexTarget { + name = "rounding"; + regex = [patterns.int]; + }; + + scrollmouse = mkRegexTarget { + name = "scrollmouse"; + regex = [patterns.float]; + }; + + scrolltouchpad = mkRegexTarget { + name = "scrolltouchpad"; + regex = [patterns.float]; + }; + + tag = mkRegexTarget { + name = "tag"; + regex = [''[+-]?[[:alnum:]_]+\*?'']; + }; + + maxsize = mkRegexTarget { + name = "maxsize"; + regex = ["${patterns.int} ${patterns.int}"]; + }; + + minsize = mkRegexTarget { + name = "minsize"; + regex = ["${patterns.int} ${patterns.int}"]; + }; + animation = mkRegexTarget { + name = "animation"; + regex = ["(slide)( (left|right|up|down|top|bottom))?|(popin)( ([0-9]+%))?"]; + }; + } + // toggleTargets; +in { + inherit types; +} diff --git a/modules/home/workstation/hyprland/settings/rules.nix b/modules/home/workstation/hyprland/settings/rules.nix index cc79331..33ae20e 100644 --- a/modules/home/workstation/hyprland/settings/rules.nix +++ b/modules/home/workstation/hyprland/settings/rules.nix @@ -1,24 +1,75 @@ -{ - wayland.windowManager.hyprland.settings = { - windowrulev2 = [ - "float,move 191 15,size 924 396,class:^(1Password)$" +{osConfig, ...}: let + monitor = builtins.elemAt osConfig.ooknet.hardware.monitors 0; - "float, title:^(Picture-in-Picture)$" - "pin, title:^(Picture-in-Picture)$" - - "float,move 237 175, size 1200 720,title:^(File Upload)$" - - "workspace 4, title:^(Vesktop)$" - - # Floating BTOP - "float,title:^(BTOP)$" - "size 85%,title:^(BTOP)$" - "pin,title:^(BTOP)$" - "center,title:^(BTOP)$" - "stayfocused,title:^(BTOP)$" - - # Tearing - "immediate, title:^(TEKKEN™8)$" - ]; - }; + widthMinusGaps = toString (monitor.width - 23); +in { + wayland.windowManager.hyprland.windowRules = [ + # TODO tag games for immediate + { + matches = {initialTitle = "Syncthing Tray";}; + rules = ["float" "center 1" "size 50%"]; + } + { + matches = {class = "factorio";}; + rules = ["tag +games"]; + } + { + matches = {initialTitle = "World of Warcraft";}; + rules = ["tag +games"]; + } + { + matches = {title = "TEKKEN™8";}; + rules = ["tag +games"]; + } + { + matches = {initialTitle = "Dolphin";}; + rules = ["tag +games" "idleinhibit focus"]; + } + { + matches = {tag = "games";}; + rules = ["workspace 6" "immediate"]; + } + { + matches = {title = "Steam";}; + rules = ["workspace 5"]; + } + { + matches = {title = "Steam Settings";}; + rules = ["float" "size 50%" "center 1"]; + } + { + matches = {class = "firefox";}; + rules = ["idleinhibit fullscreen"]; + } + { + matches = {class = "1Password";}; + rules = ["center 1" "float" "size 50%"]; + } + { + matches = {title = "BTOP";}; + rules = ["float" "size 85%" "pin" "center 1" "stayfocused" "dimaround"]; + } + { + matches = {class = "vesktop";}; + rules = ["workspace 4 silent"]; + } + { + matches = {title = "^(Picture-in-Picture)$";}; + rules = ["float" "pin"]; + } + { + matches = {title = "^(Open Files)$";}; + rules = ["center 1" "float" "size 50%"]; + } + { + matches = {initialTitle = "dropdown";}; + rules = [ + "monitor 0" + "animation slide down" + "float" + "move 12 46" + "size ${widthMinusGaps} 30%" + ]; + } + ]; } diff --git a/modules/home/workstation/hyprland/settings/workspaces.nix b/modules/home/workstation/hyprland/settings/workspaces.nix new file mode 100644 index 0000000..952091b --- /dev/null +++ b/modules/home/workstation/hyprland/settings/workspaces.nix @@ -0,0 +1,37 @@ +{osConfig, ...}: let + inherit (osConfig.ooknet) hardware; + multiMonitor = builtins.length hardware.monitors > 1; + primary = hardware.primaryMonitor; + secondary = + if multiMonitor + then (builtins.elemAt hardware.monitors 1).name + else primary; +in { + wayland.windowManager.hyprland.workspaces = { + "1" = { + name = "terminal"; + monitor = primary; + default = true; + }; + "2" = { + name = "browser"; + monitor = primary; + }; + "3" = { + name = "media"; + monitor = secondary; + default = true; + }; + "4" = { + name = "discord"; + monitor = secondary; + }; + "5" = { + name = "gaming"; + monitor = primary; + }; + "r[6-9]" = { + monitor = primary; + }; + }; +} diff --git a/modules/home/workstation/media/music.nix b/modules/home/workstation/media/music.nix index f4b75e7..85ec603 100644 --- a/modules/home/workstation/media/music.nix +++ b/modules/home/workstation/media/music.nix @@ -3,17 +3,17 @@ pkgs, config, lib, + hozen, + self', ... }: let inherit (lib) mkIf getExe elem; inherit (builtins) attrValues; - inherit (osConfig.ooknet.appearance.colorscheme) palette; inherit (osConfig.networking) hostName; - inherit (osConfig.ooknet.console.tools) zellij; - inherit (osConfig.ooknet.console) multiplexer; inherit (osConfig.ooknet.workstation) profiles; inherit (osConfig.age.secrets) spotify_key; inherit (config.ooknet) binds; + inherit (hozen) color; in { config = mkIf (elem "media" profiles) { home.packages = attrValues { @@ -35,6 +35,7 @@ in { programs = { spotify-player = { enable = true; + package = self'.packages.spotify-player; settings = { theme = "default"; client_id_command = "cat ${spotify_key.path}"; @@ -58,14 +59,12 @@ in { pause_icon = "▌▌"; liked_icon = "♥"; playback_window_position = "Top"; - cover_img_length = 9; - cover_img_width = 5; playback_window_width = 6; device = { name = "${hostName}"; device_type = "speaker"; - volume = 100; + volume = 60; bitrate = 320; audio_cache = false; normalization = false; @@ -80,70 +79,35 @@ in { color = { gradient = 1; gradient_count = 5; - gradient_color_1 = "'#${palette.base0A}'"; - gradient_color_2 = "'#${palette.base0B}'"; - gradient_color_3 = "'#${palette.base0C}'"; - gradient_color_4 = "'#${palette.base0D}'"; - gradient_color_5 = "'#${palette.base0E}'"; + gradient_color_1 = "'#${color.primary.base}'"; + gradient_color_2 = "'#${color.primary.hard1}'"; + gradient_color_3 = "'#${color.primary.hard2}'"; + gradient_color_4 = "'#${color.primary.hard3}'"; + gradient_color_5 = "'#${color.primary.hard4}'"; }; }; }; }; - xdg.configFile."zellij/layouts/music.kdl".text = - mkIf (zellij.enable || multiplexer == "zellij") - /* - kdl - */ - '' - layout { - default_tab_template { - pane size=2 borderless=true { - plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" { - format_left "{mode}" - format_right "{session} {datetime}" - format_center "#[fg=#89B4FA,bold] {tabs}" - format_space "" - - border_enabled "true" - border_char "─" - border_format "#[fg=#${palette.base0D}]{char}" - border_position "bottom" - - hide_frame_for_single_pane "true" - - mode_normal "#[fg=${palette.base0D}]󰝚" - - tab_normal "#[bg=#${palette.base01}] {name} " - tab_active "#[bg=#${palette.base02}] {name} " - tab_separator " " - - datetime "#[fg=#${palette.base05},bold] {format} " - datetime_format "%I:%M %p" - datetime_timezone "${osConfig.time.timeZone}" - } + programs.zellij.layouts.music = { + icon = "󰝚"; + tabs = + # kdl + '' + tab name="spotify" focus=true { + pane name="spotify" { + borderless true + command "${getExe self'.packages.spotify-player}" + focus true } - children - } - - tab name="spotify" focus=true { - pane name="spotify" { - borderless true - command "${getExe pkgs.spotify-player}" - focus true - } - pane name="Visualizer" { - borderless false - split_direction "horizontal" - size "20%" - command "${getExe pkgs.cava}" - } + pane name="Visualizer" { + borderless false + split_direction "horizontal" + size "20%" + command "${getExe pkgs.cava}" } - } - ''; - - home.shellAliases = mkIf (zellij.enable || multiplexer == "zellij") { - zjm = "zellij --layout music"; + } + ''; }; }; } diff --git a/modules/home/workstation/productivity/obsidian.nix b/modules/home/workstation/productivity/obsidian.nix index 8a6bc4f..b9a68b2 100644 --- a/modules/home/workstation/productivity/obsidian.nix +++ b/modules/home/workstation/productivity/obsidian.nix @@ -10,7 +10,7 @@ # admin = osConfig.ooknet.host.admin; # TODO: use admin.githubUsername notesRepo = "git@github.com:ooks-io/notes.git"; - notesPath = "${config.xdg.userDirs.documents}/notes"; + notesPath = "${config.xdg.userDirs.extraConfig.XDG_NOTES_DIR}"; in { config = mkIf (elem "productivity" profiles) { home.packages = [pkgs.obsidian]; diff --git a/modules/home/workstation/productivity/zathura.nix b/modules/home/workstation/productivity/zathura.nix index cbec03d..e8fee5a 100644 --- a/modules/home/workstation/productivity/zathura.nix +++ b/modules/home/workstation/productivity/zathura.nix @@ -1,12 +1,13 @@ { lib, osConfig, + hozen, ... }: let inherit (lib) mkIf elem; - inherit (osConfig.ooknet.appearance.colorscheme) palette; inherit (osConfig.ooknet.appearance) fonts; inherit (osConfig.ooknet.workstation) profiles; + inherit (hozen) color; zathuraMime = {"application/pdf" = ["org.pwmt.zathura.desktop"];}; in { @@ -17,26 +18,26 @@ in { font = "${fonts.regular.family} 14"; recolor = true; selection-clipboard = "clipboard"; - default-bg = "#${palette.base00}"; - default-fg = "#${palette.base01}"; - statusbar-bg = "#${palette.base02}"; - statusbar-fg = "#${palette.base04}"; - inputbar-bg = "#${palette.base00}"; - inputbar-fg = "#${palette.base07}"; - notification-bg = "#${palette.base00}"; - notification-fg = "#${palette.base07}"; - notification-error-bg = "#${palette.base00}"; - notification-error-fg = "#${palette.base08}"; - notification-warning-bg = "#${palette.base00}"; - notification-warning-fg = "#${palette.base08}"; - highlight-color = "#${palette.base0A}"; - highlight-active-color = "#${palette.base0D}"; - completion-bg = "#${palette.base01}"; - completion-fg = "#${palette.base05}"; - completions-highlight-bg = "#${palette.base0D}"; - completions-highlight-fg = "#${palette.base07}"; - recolor-lightcolor = "#${palette.base00}"; - recolor-darkcolor = "#${palette.base06}"; + default-bg = "#${color.layout.body}"; + default-fg = "#${color.typography.text}"; + statusbar-bg = "#${color.layout.header}"; + statusbar-fg = "#${color.typography.text}"; + inputbar-bg = "#${color.layout.menu}"; + inputbar-fg = "#${color.typography.text-bright}"; + notification-bg = "#${color.layout.menu}"; + notification-fg = "#${color.typography.text}"; + notification-error-bg = "#${color.layout.menu}"; + notification-error-fg = "#${color.error.base}"; + notification-warning-bg = "#${color.layout.menu}"; + notification-warning-fg = "#${color.warning.base}"; + highlight-color = "#${color.primary.base}"; + highlight-active-color = "#${color.primary.hard1}"; + completion-bg = "#${color.layout.menu}"; + completion-fg = "#${color.typography.text}"; + completion-highlight-bg = "#${color.primary.base}"; + completion-highlight-fg = "#${color.typography.contrast-text}"; + recolor-lightcolor = "#${color.typography.text}"; + recolor-darkcolor = "#${color.layout.body}"; }; }; xdg.mimeApps = { diff --git a/modules/home/workstation/terminal/default.nix b/modules/home/workstation/terminal/default.nix index c21fc86..f13829f 100644 --- a/modules/home/workstation/terminal/default.nix +++ b/modules/home/workstation/terminal/default.nix @@ -1,5 +1,6 @@ { imports = [ ./foot.nix + ./ghostty.nix ]; } diff --git a/modules/home/workstation/terminal/foot.nix b/modules/home/workstation/terminal/foot.nix index b095dea..bfababf 100644 --- a/modules/home/workstation/terminal/foot.nix +++ b/modules/home/workstation/terminal/foot.nix @@ -1,12 +1,29 @@ { osConfig, lib, + hozen, ... }: let - inherit (osConfig.ooknet.appearance) colorscheme fonts; - inherit (colorscheme) palette; + inherit (osConfig.ooknet.appearance.fonts) monospace; + inherit (hozen) color; inherit (lib) mkMerge mkIf; inherit (osConfig.ooknet.workstation) default; + + mkFontConfig = font: style: let + mkFont = f: let + sizeAttr = + if f.bitmap + then "pixelsize" + else "size"; + familyStyle = f.variants.${style} or f.variants.regular; + in "${familyStyle}:${sizeAttr}=${toString font.size}"; + primary = mkFont font; + fallback = + if font.fallback != null + then ",${mkFont font.fallback}" + else ""; + in "${primary}${fallback}"; + cfg = osConfig.ooknet.workstation.programs.foot; in { config = mkMerge [ @@ -17,16 +34,17 @@ in { settings = { main = { term = "xterm-256color"; - font = "${fonts.monospace.family}:pixelsize=18:antialias=true"; - font-bold = "${fonts.monospace.family}:style=Bold:pixelsize=18:antialias=true"; - font-italic = "${fonts.monospace.family}:style=Italic:pixelsize=18:antialias=true"; - font-bold-italic = "${fonts.monospace.family}:style=Bold Italic:pixelsize=18:antialias=true"; - dpi-aware = "yes"; - letter-spacing = "-1px"; + font = mkFontConfig monospace "regular"; + font-bold = mkFontConfig monospace "bold"; + font-italic = mkFontConfig monospace "italic"; + font-bold-italic = mkFontConfig monospace "boldItalic"; + dpi-aware = false; + letter-spacing = "0"; bold-text-in-bright = "palette-based"; resize-delay-ms = "80"; pad = "9x9 center"; selection-target = "clipboard"; + font-size-adjustment = "1px"; }; tweak = { @@ -41,30 +59,30 @@ in { colors = { alpha = 1.0; - foreground = "${palette.base05}"; - background = "${palette.base00}"; - regular0 = "${palette.base00}"; # black - regular1 = "${palette.red}"; # red - regular2 = "${palette.green}"; # green - regular3 = "${palette.yellow}"; # yellow - regular4 = "${palette.blue}"; # blue - regular5 = "${palette.purple}"; # magenta - regular6 = "${palette.cyan}"; # cyan - regular7 = "${palette.base05}"; # white - bright0 = "${palette.base03}"; # bright black - bright1 = "${palette.bright-red}"; # bright red - bright2 = "${palette.bright-green}"; # bright green - bright3 = "${palette.bright-yellow}"; # bright yellow - bright4 = "${palette.bright-blue}"; # bright blue - bright5 = "${palette.bright-purple}"; # bright magenta - bright6 = "${palette.bright-cyan}"; # bright cyan - bright7 = "${palette.base07}"; # bright white - "16" = "${palette.base09}"; - "17" = "${palette.base0F}"; - "18" = "${palette.base01}"; - "19" = "${palette.base02}"; - "20" = "${palette.base04}"; - "21" = "${palette.base06}"; + foreground = "${color.base05}"; + background = "${color.base00}"; + regular0 = "${color.base00}"; # black + regular1 = "${color.base08}"; # red + regular2 = "${color.base0B}"; # green + regular3 = "${color.base0A}"; # yellow + regular4 = "${color.base0D}"; # blue + regular5 = "${color.base0E}"; # magenta + regular6 = "${color.base0C}"; # cyan + regular7 = "${color.base05}"; # white + bright0 = "${color.base03}"; # bright black + bright1 = "${color.base08}"; # bright red + bright2 = "${color.base0B}"; # bright green + bright3 = "${color.base0A}"; # bright yellow + bright4 = "${color.base0D}"; # bright blue + bright5 = "${color.base0E}"; # bright magenta + bright6 = "${color.base0C}"; # bright cyan + bright7 = "${color.base07}"; # bright white + "16" = "${color.base09}"; + "17" = "${color.base0F}"; + "18" = "${color.base01}"; + "19" = "${color.base02}"; + "20" = "${color.base04}"; + "21" = "${color.base06}"; }; }; }; @@ -73,7 +91,6 @@ in { (mkIf (default.terminal == "foot") { home.sessionVariables = { TERMINAL = "foot"; - TERM = "foot"; }; ooknet.binds.terminal = "foot"; ooknet.binds.terminalLaunch = "foot"; diff --git a/modules/home/workstation/terminal/ghostty.nix b/modules/home/workstation/terminal/ghostty.nix new file mode 100644 index 0000000..e381e82 --- /dev/null +++ b/modules/home/workstation/terminal/ghostty.nix @@ -0,0 +1,91 @@ +{ + lib, + hozen, + osConfig, + config, + ... +}: let + inherit (lib) mkIf mkMerge; + inherit (hozen) color; + inherit (osConfig.ooknet.host) admin; + inherit (osConfig.ooknet.appearance.fonts) monospace; + inherit (osConfig.ooknet.workstation) default; + + # getShader = shader: "${self'.packages.ghostty-shaders}/${shader}.glsl"; + + cfg = osConfig.ooknet.workstation.programs.ghostty; +in { + config = mkMerge [ + (mkIf (cfg.enable || default.terminal == "ghostty") { + programs.ghostty = { + enable = true; + enableFishIntegration = admin.shell == "fish"; + clearDefaultKeybinds = true; + settings = { + # defined below + theme = "hozen"; + + # font config + font-size = monospace.size; + font-family = monospace.family; + + # padding + window-padding-x = 9; + window-padding-y = 9; + + # box drawing glyph thickness + adjust-box-thickness = -10; # why where they so thick? + + # disable the decorations + gtk-titlebar = false; + window-decoration = false; + resize-overlay = "never"; + + # disable close terminal prompt + confirm-close-surface = false; + + keybind = [ + "ctrl+equal=increase_font_size:1" + "ctrl+minus=decrease_font_size:1" + "ctrl+zero=reset_font_size" + "ctrl+shift+v=paste_from_clipboard" + "ctrl+shift+c=copy_to_clipboard" + ]; + }; + themes.hozen = { + background = "${color.base00}"; + foreground = "${color.base05}"; + palette = [ + "0=#${color.base00}" # black + "1=#${color.base08}" # red + "2=#${color.base0B}" # green + "3=#${color.base0A}" # yellow + "4=#${color.base0D}" # blue + "5=#${color.base0E}" # magenta + "6=#${color.base0C}" # cyan + "7=#${color.base05}" # white + "8=#${color.base03}" # bright black + "9=#${color.base08}" # bright red + "10=#${color.base0B}" # bright green + "11=#${color.base0A}" # bright yellow + "12=#${color.base0D}" # bright blue + "13=#${color.base0E}" # bright magenta + "14=#${color.base0C}" # bright cyan + "15=#${color.base07}" # bright white + ]; + }; + }; + }) + (mkIf (default.terminal == "ghostty") { + home.sessionVariables = { + TERMINAL = "ghostty"; + }; + ooknet.binds = { + terminal = "ghostty"; + terminalLaunch = "ghostty -e"; + terminalDropdown = "ghostty --title=dropdown"; + btop = mkIf config.programs.btop.enable "ghostty --title=BTOP -e btop"; + }; + }) + ]; +} diff --git a/modules/home/workstation/tools/1password.nix b/modules/home/workstation/tools/1password.nix index 735a67e..4b8a57d 100644 --- a/modules/home/workstation/tools/1password.nix +++ b/modules/home/workstation/tools/1password.nix @@ -7,6 +7,9 @@ cfg = osConfig.programs._1password; in { config = mkIf cfg.enable { - ooknet.binds.password = "1password"; + ooknet.binds = { + password = "1password"; + quickpass = "1password --quick-access"; + }; }; } diff --git a/modules/home/workstation/tools/default.nix b/modules/home/workstation/tools/default.nix index ae307e7..55cb2b2 100644 --- a/modules/home/workstation/tools/default.nix +++ b/modules/home/workstation/tools/default.nix @@ -1,10 +1,16 @@ { imports = [ ./ookpower.nix + ./tailscale-applet.nix + ./live-buds-cli.nix + ./virt-manager.nix ./1password.nix ./ookvolume.nix ./kdeconnect.nix ./ookbrightness.nix ./zellijMenu.nix + ./syncthing-applet.nix + ./nemo.nix + ./qtscrcpy.nix ]; } diff --git a/modules/home/workstation/tools/live-buds-cli.nix b/modules/home/workstation/tools/live-buds-cli.nix new file mode 100644 index 0000000..03f5a4c --- /dev/null +++ b/modules/home/workstation/tools/live-buds-cli.nix @@ -0,0 +1,13 @@ +{ + osConfig, + self', + lib, + ... +}: let + inherit (lib) mkIf elem; + inherit (osConfig.ooknet.hardware) features; +in { + config = mkIf (elem "bluetooth" features) { + home.packages = [self'.packages.live-buds-cli]; + }; +} diff --git a/modules/home/workstation/tools/nemo.nix b/modules/home/workstation/tools/nemo.nix new file mode 100644 index 0000000..9c5a88a --- /dev/null +++ b/modules/home/workstation/tools/nemo.nix @@ -0,0 +1,12 @@ +{pkgs, ...}: let + nemoMime = { + "inode/directory" = ["nemo.desktop"]; + }; +in { + home.packages = [pkgs.nemo-with-extensions]; + xdg.mimeApps = { + associations.added = nemoMime; + defaultApplications = nemoMime; + }; + ooknet.binds.fileManager = "nemo"; +} diff --git a/modules/home/workstation/tools/ookpower.nix b/modules/home/workstation/tools/ookpower.nix index 23903ab..b8d4850 100644 --- a/modules/home/workstation/tools/ookpower.nix +++ b/modules/home/workstation/tools/ookpower.nix @@ -1,14 +1,177 @@ { lib, config, - inputs', + pkgs, ... }: let inherit (lib) mkIf; inherit (config.programs) rofi; + + powermenu = pkgs.writeShellApplication { + name = "powermenu"; + runtimeInputs = [pkgs.rofi-wayland]; + text = + # bash + '' + + pid_file="/tmp/my_countdown.pid" + + DRY= + COUNTDOWN= + + while [ $# -gt 0 ]; do + key="$1" + case $key in + -c | --countdown) + COUNTDOWN=true + shift + ;; + -d | --dry) + DRY=true + shift + ;; + *) + break + ;; + esac + done + + notify() { + notify-send -u critical -a system-notify -t 1000 -h string:x-canonical-private-synchronous:anything "$@" + } + + # Used for development, instead of running command, notifies if command was successful and exits. + dry_success() { + if [ "$DRY" == "true" ]; then + TITLE="Action Successful:" + notify "$TITLE" "$1" + exit 0 + fi + } + + cancel() { + if [ -f "$pid_file" ]; then + # Read the process ID from the file and kill the process + kill "$(cat "$pid_file")" &>/dev/null + notify-send "Action canceled" + rm -f "$pid_file" + else + echo "No countdown to cancel." + fi + } + + countdown() { + if [ "$COUNTDOWN" == "true" ]; then + msg="''${1:-doing something}" + echo $$ >"$pid_file" + for i in {5..1}; do + notify-send "$msg in $i" -h string:x-canonical-private-synchronous:anything + sleep 1 + done + echo "Countdown done" + rm -f "$pid_file" + fi + } + + action_logout() { + countdown "Logging out" + dry_success "Logged out" + PROCESS="Hyprland|\.Hyprland-wrapp" + if pgrep -x $PROCESS >/dev/null; then + hyprctl dispatch exit 0 + sleep 2 + if pgrep -x $PROCESS; then + pkill -9 $PROCESS + fi + fi + + } + + action_poweroff() { + countdown "Shutting down" + dry_success "Shutdown" + poweroff + } + + action_lock() { + dry_success "Screen Locked" + hyprlock + } + + action_reboot() { + countdown "Rebooting" + dry_success "Reboot" + reboot + } + + action_suspend() { + countdown "Suspending" + dry_success "Suspend" + suspend + } + + action_dmenu() { + selection=$(echo -e " Reboot\n Lock\n󰍃 Logout\n󰐥 Shutdown\n󰒲 Suspend" | rofi -dmenu -i) + + case "$selection" in + "󰐥 Shutdown") action_poweroff ;; + " Reboot") action_reboot ;; + " Lock") action_lock ;; + "󰍃 Logout") action_logout ;; + "󰒲 Suspend") action_suspend ;; + *) + echo "ERROR" "Invalid option" + exit 1 + ;; + esac + } + # Check if the script is already running and decide to cancel or start countdown + if [ -f "$pid_file" ]; then + cancel + else + ACTION=''${1:-usage} + case "$ACTION" in + logout) + action_logout + ;; + poweroff) + action_poweroff + ;; + reboot) + action_reboot + ;; + lock) + action_lock + ;; + usage) + echo " Usage: powermenu [OPTION]... [ACTION usage|dmenu|logout|poweroff|reboot|lock]" + echo "" + echo "Options:" + echo " -c, --countdown Enable 5 seconds countdown before action is performed" + echo " -d, --dry Print instead of perform action debug/development" + echo "" + echo "Actions:" + echo " usage Print help information" + echo " dmenu Open menu with rofi for selecting action" + echo " logout Kills current active Hyprland session" + echo " poweroff Shut down current host" + echo " reboot Restart current host" + echo " lock Locks current session with hyprlock" + echo "" + ;; + dmenu) + action_dmenu + ;; + *) + echo "Invalid action: $ACTION (expecting: usage|logout|poweroff|reboot|lock)" + ;; + esac + fi + ''; + }; in { config = mkIf rofi.enable { - home.packages = [inputs'.ooks-scripts.packages.powermenu]; + home.packages = [powermenu]; ooknet.binds.powerMenu = "powermenu -c dmenu"; }; } diff --git a/modules/home/workstation/tools/qtscrcpy.nix b/modules/home/workstation/tools/qtscrcpy.nix new file mode 100644 index 0000000..4008914 --- /dev/null +++ b/modules/home/workstation/tools/qtscrcpy.nix @@ -0,0 +1,5 @@ +{pkgs, ...}: { + home.packages = [ + pkgs.scrcpy + ]; +} diff --git a/modules/home/workstation/tools/syncthing-applet.nix b/modules/home/workstation/tools/syncthing-applet.nix new file mode 100644 index 0000000..0fa36f3 --- /dev/null +++ b/modules/home/workstation/tools/syncthing-applet.nix @@ -0,0 +1,15 @@ +{ + osConfig, + pkgs, + lib, + ook, + ... +}: let + inherit (lib) mkIf; + inherit (ook.lib.services) mkTrayService; + inherit (osConfig.ooknet.host) syncthing; +in { + config = mkIf syncthing.enable { + systemd.user.services."syncthing-applet" = mkTrayService "${pkgs.syncthingtray-minimal}/bin/syncthingtray --wait"; + }; +} diff --git a/modules/home/workstation/tools/tailscale-applet.nix b/modules/home/workstation/tools/tailscale-applet.nix new file mode 100644 index 0000000..723365d --- /dev/null +++ b/modules/home/workstation/tools/tailscale-applet.nix @@ -0,0 +1,20 @@ +{ + lib, + pkgs, + ook, + ... +}: let + inherit (ook.lib.services) mkGraphicalService; + inherit (lib) getExe; +in { + systemd.user.services.tailscale-applet = mkGraphicalService { + Unit = { + Description = "Tray applet for tailscale"; + Requires = ["tray.target"]; + }; + Service = { + ExecStart = "${getExe pkgs.tailscale-systray}"; + Restart = "on-abort"; + }; + }; +} diff --git a/modules/home/workstation/tools/virt-manager.nix b/modules/home/workstation/tools/virt-manager.nix new file mode 100644 index 0000000..18b96f7 --- /dev/null +++ b/modules/home/workstation/tools/virt-manager.nix @@ -0,0 +1,19 @@ +{ + lib, + osConfig, + ... +}: let + inherit (lib) elem mkIf; + inherit (osConfig.ooknet.workstation) profiles; +in { + config = mkIf (elem "virtualization" profiles) { + # setup connections for virt-manager + # see + dconf.settings = { + "org/virt-manager/virt-manager/connections" = { + autoconnect = ["qemu:///system"]; + uris = ["qemu:///system"]; + }; + }; + }; +} diff --git a/modules/home/workstation/tools/zellijMenu.nix b/modules/home/workstation/tools/zellijMenu.nix index 3bf4f76..7bdad83 100644 --- a/modules/home/workstation/tools/zellijMenu.nix +++ b/modules/home/workstation/tools/zellijMenu.nix @@ -10,7 +10,7 @@ inherit (config.ooknet) binds; zellijmenu = pkgs.writeShellApplication { name = "zellijmenu"; - runtimeInputs = with pkgs; [coreutils rofi-wayland]; + runtimeInputs = with pkgs; [zellij coreutils rofi-wayland]; text = /* bash @@ -91,7 +91,7 @@ echo "No layout given" continue fi - zellij_cmd -s "$session_name" --layout "$layout" + zellij_cmd --layout "$layout" attach -c "$session_name" break ;; "select") diff --git a/modules/nixos/appearance/options.nix b/modules/nixos/appearance/options.nix index b774998..ae3e5a4 100644 --- a/modules/nixos/appearance/options.nix +++ b/modules/nixos/appearance/options.nix @@ -1,29 +1,53 @@ -{ - config, - lib, - ... -}: let - inherit (lib) isString hasPrefix removePrefix mkOption mkOptionType; - inherit (lib.types) enum str nullOr package path int attrsOf coercedTo; - hexColorType = mkOptionType { - name = "hex-color"; - descriptionClass = "noun"; - description = "RGB color in hex format"; - check = x: isString x && !(hasPrefix "#" x); +{lib, ...}: let + inherit (lib) mkOption; + inherit (lib.types) str package path int bool submodule nullOr; + + mkVariantOption = { + regular = mkOption { + type = str; + default = ""; + }; + bold = mkOption { + type = str; + default = ""; + }; + italic = mkOption { + type = str; + default = ""; + }; + boldItalic = mkOption { + type = str; + default = ""; + }; }; - mkFontOption = { + mkBaseFontOption = { family = mkOption { type = str; default = ""; }; + variants = mkVariantOption; package = mkOption { type = package; default = null; }; + size = mkOption { + type = int; + default = 18; + }; + bitmap = mkOption { + type = bool; + default = false; + }; }; - - cfg = config.ooknet.appearance; + mkFontOption = + mkBaseFontOption + // { + fallback = mkOption { + type = nullOr (submodule {options = mkBaseFontOption;}); + default = null; + }; + }; in { # imports = [./palettes]; options.ooknet.appearance = { @@ -51,24 +75,5 @@ in { default = 22; }; }; - # Credit to github:misterio77/nix-colors - colorscheme = { - name = mkOption { - type = enum ["gruvbox-material-medium"]; - default = "gruvbox-material-medium"; - }; - variant = mkOption { - type = enum ["dark" "light"]; - default = "dark"; - }; - slug = mkOption { - type = str; - default = "${toString cfg.colorscheme.name}-${toString cfg.colorscheme.variant}"; - }; - palette = mkOption { - type = attrsOf (coercedTo str (removePrefix "#") hexColorType); - default = (import ./palettes/${config.ooknet.appearance.colorscheme.slug}.nix).colorscheme.palette; - }; - }; }; } diff --git a/modules/nixos/appearance/palettes/dark.nix b/modules/nixos/appearance/palettes/dark.nix deleted file mode 100644 index ca9285d..0000000 --- a/modules/nixos/appearance/palettes/dark.nix +++ /dev/null @@ -1,285 +0,0 @@ -let - /* - extended version of gruvbox/gruvbox material to support multiple frameworks: - - - tailwind - - base16/24 - - semantic - - references: - - shades - - - - colors - - - - */ - colors = { - #shades - - shade-50 = "#dfd2b3"; - shade-100 = "#d9c7a5"; - shade-150 = "#d4be98"; - shade-200 = "#c6b395"; - shade-250 = "#b4a288"; - shade-300 = "#a49384"; - shade-350 = "#99897a"; - shade-400 = "#8b7c6f"; - shade-450 = "#7d6f64"; - shade-500 = "#716860"; - shade-550 = "#645f59"; - shade-600 = "#585350"; - shade-650 = "#4d4947"; - shade-700 = "#3f3b3b"; - shade-750 = "#343232"; - shade-800 = "#282828"; - shade-850 = "#212121"; - shade-900 = "#1a1a1a"; - - # we use green as the primary color here. - primary = "#a9b665"; - - # color scale for our primary accent color. - primary-dark-1 = "#b1be74"; - primary-dark-2 = "${colors.primary-dark-1}"; - primary-dark-3 = "#b8c481"; - primary-dark-4 = "${colors.primary-dark-3}"; - primary-dark-5 = "#bec98c"; - primary-dark-6 = "${colors.primary-dark-4}"; - primary-dark-7 = "#c4ce96"; - - primary-light-1 = "#9aa55c"; - primary-light-2 = "${colors.primary-light-1}"; - primary-light-3 = "#8c9654"; - primary-light-4 = "${colors.primary-dark-3}"; - primary-light-5 = "#7f884c"; - primary-light-6 = "${colors.primary-dark-5}"; - primary-light-7 = "#69713f"; - - primary-alpha-10 = "${colors.primary}19"; - primary-alpha-20 = "${colors.primary}33"; - primary-alpha-30 = "${colors.primary}4b"; - primary-alpha-40 = "${colors.primary}66"; - primary-alpha-50 = "${colors.primary}80"; - primary-alpha-60 = "${colors.primary}99"; - primary-alpha-70 = "${colors.primary}b3"; - primary-alpha-80 = "${colors.primary}cc"; - primary-alpha-90 = "${colors.primary}e1"; - - primary-hover = "${colors.primary-light-2}"; - primary-active = "${colors.primary-light-4}"; - - # we use green as the secondary color here. - secondary = "${colors.shade-700}"; - - # color scale for our secondary accent color. - secondary-dark-1 = "${colors.shade-550}"; - secondary-dark-2 = "${colors.shade-500}"; - secondary-dark-3 = "${colors.shade-450}"; - secondary-dark-4 = "${colors.shade-400}"; - secondary-dark-5 = "${colors.shade-350}"; - secondary-dark-6 = "${colors.shade-300}"; - secondary-dark-7 = "${colors.shade-250}"; - secondary-dark-8 = "${colors.shade-200}"; - secondary-dark-9 = "${colors.shade-150}"; - secondary-dark-10 = "${colors.shade-100}"; - secondary-dark-11 = "${colors.shade-100}"; - secondary-dark-12 = "${colors.shade-100}"; - secondary-dark-13 = "${colors.shade-100}"; - - secondary-light-1 = "${colors.shade-650}"; - secondary-light-2 = "${colors.shade-700}"; - secondary-light-3 = "${colors.shade-750}"; - secondary-light-4 = "${colors.shade-800}"; - - secondary-alpha-10 = "${colors.secondary}19"; - secondary-alpha-20 = "${colors.secondary}33"; - secondary-alpha-30 = "${colors.secondary}4b"; - secondary-alpha-40 = "${colors.secondary}66"; - secondary-alpha-50 = "${colors.secondary}80"; - secondary-alpha-60 = "${colors.secondary}99"; - secondary-alpha-70 = "${colors.secondary}b3"; - secondary-alpha-80 = "${colors.secondary}cc"; - secondary-alpha-90 = "${colors.secondary}e1"; - - secondary-hover = "${colors.secondary-light-1}"; - secondary-active = "${colors.secondary-light-2}"; - - red-light = "#e57b76"; - red = "#ea6962"; - red-dark-1 = "#e7534b"; - red-dark-2 = "#e33e35"; - - orange-light = "#e69965"; - orange = "#e78a4e"; - orange-dark-1 = "#e07b38"; - orange-dark-2 = "#de732b"; - - yellow-light = "#d9b06d"; - yellow = "#d8a657"; - yellow-dark-1 = "#d09a43"; - yellow-dark-2 = "#c99136"; - - olive-light = "#beb874"; - olive = "#b9b25f"; - olive-dark-1 = "#ada652"; - olive-dark-2 = "#9b944b"; - - green-light = "#b1be74"; - green = "#a9b665"; - green-dark-1 = "#9aa55c"; - green-dark-2 = "#8c9654"; - - teal-light = "#9abb95"; - teal = "#89b482"; - teal-dark-1 = "#7aa573"; - teal-dark-2 = "#6c9a65"; - - blue-light = "#91b6ae"; - blue = "#7daea3"; - blue-dark-1 = "#6ea096"; - blue-dark-2 = "#63978d"; - - violet-light = "#dba3c7"; - violet = "#d892c1"; - violet-dark-1 = "#cd7eb3"; - violet-dark-2 = "#c86faa"; - - purple-light = "#d9a0af"; - purple = "#d3869b"; - purple-dark-1 = "#ca778d"; - purple-dark-2 = "#c26680"; - - pink-light = "#d8abcc"; - pink = "#cf91be"; - pink-dark-1 = "#c47eb1"; - pink-dark-2 = "#bc71a8"; - - brown-light = "#b18568"; - brown = "#a87757"; - brown-dark-1 = "#976b4e"; - brown-dark-2 = "#896248"; - - grey-light = "${colors.shade-350}"; - grey = "${colors.shade-450}"; - grey-dark-1 = "${colors.shade-500}"; - grey-dark-2 = "${colors.shade-550}"; - - black-light = "${colors.shade-700}"; - black = "${colors.shade-800}"; - black-dark-1 = "${colors.shade-850}"; - black-dark-2 = "${colors.shade-900}"; - - # semantic - body = "${colors.shade-700}"; - header = "${colors.shade-800}"; - text = "${colors.shade-150}"; - text-light = "${colors.shade-100}"; - text-lighter = "${colors.shade-50}"; - texter-dark = "${colors.shade-200}"; - text-darker = "${colors.shade-350}"; - footer = "${colors.shade-800}"; - menu = "${colors.shade-800}"; - border-active = "${colors.shade-150}"; - border-inactive = "${colors.shade-600}"; - - error-bg = "${colors.red}"; - error-bg-active = "${colors.red-dark-1}"; - error-bg-hover = "${colors.red-dark-2}"; - error-text = "${colors.shade-800}"; - error-border = "${colors.red-light}"; - - success-bg = "${colors.green}"; - success-bg-active = "${colors.green-dark-1}"; - success-bg-hover = "${colors.green-dark-2}"; - success-text = "${colors.shade-800}"; - success-border = "${colors.green-light}"; - - warning-bg = "${colors.yellow}"; - warning-bg-active = "${colors.yellow-dark-1}"; - warning-bg-hover = "${colors.yellow-dark-2}"; - warning-text = "${colors.shade-800}"; - warning-border = "${colors.yellow-light}"; - - info-bg = "${colors.blue}"; - info-bg-active = "${colors.blue-dark-1}"; - info-bg-hover = "${colors.blue-dark-2}"; - info-text = "${colors.shade-800}"; - info-border = "${colors.blue-light}"; - - tip-bg = "${colors.teal}"; - tip-bg-active = "${colors.teal-dark-1}"; - tip-bg-hover = "${colors.teal-dark-2}"; - tip-text = "${colors.shade-800}"; - tip-border = "${colors.teal-light}"; - - input-text = "${colors.text-light}"; - - # syntax - - syntax = { - string = "${colors.green}"; - number = "${colors.purple}"; - float = "${colors.purple}"; - boolean = "${colors.purple}"; - type = "${colors.yellow}"; - structure = "${colors.orange}"; - statement = "${colors.red}"; - label = "${colors.orange}"; - operator = "${colors.orange}"; - identifier = "${colors.blue}"; - function = "${colors.green}"; - storageClass = "${colors.orange}"; - constant = "${colors.teal}"; - exception = "${colors.red}"; - preproc = "${colors.purple}"; - include = "${colors.purple}"; - define = "${colors.purple}"; - macro = "${colors.teal}"; - preCondit = "${colors.purple}"; - special = "${colors.yellow}"; - specialChar = "${colors.yellow}"; - comment = "${colors.text-darker}"; - todo = "${colors.purple}"; - tag = "${colors.tag}"; - - mdH1 = "${colors.red}"; - mdH2 = "${colors.orange}"; - mdH3 = "${colors.yellow}"; - mdH4 = "${colors.green}"; - mdH5 = "${colors.blue}"; - mdH6 = "${colors.purple}"; - }; - - # base 16/24 - base00 = "${colors.shade-800}"; - base01 = "${colors.shade-700}"; - base02 = "${colors.shade-600}"; - base03 = "${colors.shade-450}"; - base04 = "${colors.shade-300}"; - base05 = "${colors.shade-150}"; - base06 = "${colors.shade-100}"; - base07 = "${colors.shade-50}"; - base08 = "${colors.red}"; - base09 = "${colors.orange}"; - base0A = "${colors.yellow}"; - base0B = "${colors.green}"; - base0C = "${colors.teal}"; - base0D = "${colors.blue}"; - base0E = "${colors.purple}"; - base0F = "${colors.brown}"; - base10 = "${colors.shade-850}"; - base11 = "${colors.shade-900}"; - base12 = "${colors.red-light}"; - base13 = "${colors.yellow-light}"; - base14 = "${colors.green-light}"; - base15 = "${colors.teal-light}"; - base16 = "${colors.blue-light}"; - base17 = "${colors.purple-light}"; - }; -in { - inherit colors; -} diff --git a/modules/nixos/appearance/palettes/gruvbox-material-medium-dark.nix b/modules/nixos/appearance/palettes/gruvbox-material-medium-dark.nix deleted file mode 100644 index a42c3ec..0000000 --- a/modules/nixos/appearance/palettes/gruvbox-material-medium-dark.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ - colorscheme = { - palette = { - crust = "#282828"; - mantle = "#32302f"; - base = "#3a3735"; - surface-0 = "#45403d"; - surface-1 = "#504945"; - surface-2 = "#5A524C"; - overlay-0 = "#696059"; - overlay-1 = "#70665C"; - overlay-2 = "#7C6F64"; - subtext-0 = "#928374"; - subtext-1 = "#A89984"; - text = "#d4be98"; - - red = "#ea6962"; - dull-red = "#D87974"; - bright-red = "#F47771"; - orange = "#e78a4e"; - dull-orange = "#D39063"; - bright-orange = "#F3995E"; - yellow = "#d8a657"; - dull-yellow = "#c2A16B"; - bright-yellow = "#E5B361"; - green = "#a9b665"; - dull-green = "#989F7A"; - bright-green = "#B8C86A"; - cyan = "#89b482"; - dull-cyan = "#93A790"; - bright-cyan = "#92C78A"; - blue = "#7daea3"; - dull-blue = "#939A98"; - bright-blue = "#85C1B4"; - purple = "#d3869b"; - dull-purple = "#C397A3"; - bright-purple = "#E193A8"; - - base00 = "#282828"; - base01 = "#32302f"; - base02 = "#504945"; - base03 = "#7C6F64"; - base04 = "#A89984"; - base05 = "#D4BE98"; - base06 = "#DDc7a1"; - base07 = "#FBF1C7"; - base08 = "#EA6962"; - base09 = "#E78A4E"; - base0A = "#d8a657"; - base0B = "#A9B665"; - base0C = "#89B482"; - base0D = "#7DAEA3"; - base0E = "#D3869B"; - base0F = "#E37B35"; - base10 = "#141617"; - base11 = "#050505"; - base12 = "#F47771"; - base13 = "#D8A657"; - base14 = "#B7C86A"; - base15 = "#92C78A"; - base16 = "#85C1B4"; - base17 = "#E193A8"; - }; - }; -} diff --git a/modules/nixos/appearance/palettes/readme.md b/modules/nixos/appearance/palettes/readme.md deleted file mode 100644 index 7fb9e86..0000000 --- a/modules/nixos/appearance/palettes/readme.md +++ /dev/null @@ -1,22 +0,0 @@ -# References: - -## Dark - -### Shades - -- (https://coolors.co/1a1a1a-212121-282828-343232-3f3b3b-4d4947-585350-645f59-716860-7d6f64)[Dark] -- (https://coolors.co/dfd2b3-d9c7a5-d4be98-c6b395-b4a288-a49384-99897a-8b7c6f)[light] - -### Colors - -- [https://coolors.co/69713f-737c45-7f884c-8c9654-9aa55c-a9b665-b1be74-b8c481-bec98c-c4ce96](Green) -- [https://coolors.co/e57b76-ea6962-e95149-e33e35](Red) -- [https://coolors.co/e69965-e78a4e-e07b38-de732b](Orange) -- [https://coolors.co/d9b06d-d8a657-d09a43-c99136](Yellow) -- [https://coolors.co/beb874-b9b25f-ada652-9b944b](Olive) -- [https://coolors.co/9abb95-89b482-7aa573-6c9a65](Teal) -- [https://coolors.co/91b6ae-7daea3-6ea096-63978d](Blue) -- [https://coolors.co/dba3c7-d892c1-cd7eb3-c86faa](Violet) -- [https://coolors.co/d9a0af-d3869b-ca778d-c26680](Purple) -- [https://coolors.co/d8abcc-cf91be-c47eb1-bc71a8](Pink) -- [https://coolors.co/b18568-a87757-976b4e-896248](Brown) diff --git a/modules/nixos/base/admin.nix b/modules/nixos/base/admin.nix index 64bf329..f3c5a61 100644 --- a/modules/nixos/base/admin.nix +++ b/modules/nixos/base/admin.nix @@ -1,11 +1,10 @@ { - lib, config, pkgs, - keys, ... }: let inherit (config.ooknet.host) admin; + inherit (config.ooknet.secrets) keys; ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups; in { diff --git a/modules/nixos/base/builder.nix b/modules/nixos/base/builder.nix deleted file mode 100644 index d37d94c..0000000 --- a/modules/nixos/base/builder.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - keys, - config, - ... -}: let - inherit (config.ooknet.host) admin; -in { - users = { - groups.builder = {}; - users.builder = (key: ''command="nix-daemon --stdio",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ${key}'') keys.users.${admin.name}; - }; -} diff --git a/modules/nixos/base/default.nix b/modules/nixos/base/default.nix index b039af3..efd876c 100644 --- a/modules/nixos/base/default.nix +++ b/modules/nixos/base/default.nix @@ -1,15 +1,16 @@ { imports = [ ./nix.nix + ./distributed-builds.nix ./home-manager.nix ./boot.nix ./admin.nix ./locale.nix ./options.nix - ./secrets.nix ./openssh.nix ./tailscale.nix ./networking.nix ./security + ./syncthing.nix ]; } diff --git a/modules/nixos/base/distributed-builds.nix b/modules/nixos/base/distributed-builds.nix new file mode 100644 index 0000000..b125c8f --- /dev/null +++ b/modules/nixos/base/distributed-builds.nix @@ -0,0 +1,60 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkIf; + inherit (config.ooknet.host) admin; + inherit (config.networking) hostName; + inherit (config.ooknet.secrets) keys; + + mkBuilderMachine = { + host, + speedFactor, + systems ? ["x86_64-linux"], + supportedFeatures ? ["big-parallel" "kvm" "nixos-test"], + maxJobs, + }: { + inherit speedFactor systems supportedFeatures maxJobs; + hostName = host; + protocol = "ssh-ng"; + sshKey = "/home/${admin.name}/.ssh/builder"; + }; + + builders = { + ooksdesk = mkBuilderMachine { + host = "ooksdesk"; + speedFactor = 16; + maxJobs = 4; + }; + ooksmedia = mkBuilderMachine { + host = "ooksmedia"; + speedFactor = 8; + maxJobs = 1; + }; + }; +in { + users = mkIf (hostName == "ooksdesk" || hostName == "ooksmedia") { + groups.builder = {}; + users.builder = { + createHome = false; + isSystemUser = true; + useDefaultShell = true; + group = "builder"; + openssh.authorizedKeys.keys = [ + '' + command="nix-daemon --stdio",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ${keys.users.${admin.name}} + '' + ]; + }; + }; + nix = { + distributedBuilds = true; + buildMachines = + if hostName == "ooksdesk" + then [] + else if hostName == "ooksmedia" + then [builders.ooksdesk] + else [builders.ooksdesk builders.ooksmedia]; + }; +} diff --git a/modules/nixos/base/home-manager.nix b/modules/nixos/base/home-manager.nix index ceed372..29bb102 100644 --- a/modules/nixos/base/home-manager.nix +++ b/modules/nixos/base/home-manager.nix @@ -5,6 +5,8 @@ self', lib, config, + hozen, + ook, ... }: let inherit (lib) mkIf; @@ -16,7 +18,7 @@ in { useUserPackages = true; backupFileExtension = "hm.old"; verbose = true; - extraSpecialArgs = {inherit inputs inputs' self self';}; + extraSpecialArgs = {inherit ook hozen inputs inputs' self self';}; users.${admin.name} = { imports = ["${self}/modules/home/base"]; }; diff --git a/modules/nixos/base/networking.nix b/modules/nixos/base/networking.nix index 6dfd0d9..4568c77 100644 --- a/modules/nixos/base/networking.nix +++ b/modules/nixos/base/networking.nix @@ -1,5 +1,11 @@ -{lib, ...}: let +{ + lib, + config, + pkgs, + ... +}: let inherit (lib) mkForce mkDefault; + inherit (config.ooknet) host; in { networking = { enableIPv6 = true; @@ -7,21 +13,21 @@ in { useDHCP = mkForce false; usePredictableInterfaceNames = mkDefault true; nameservers = [ - #quad9 IPv6 - "2620:fe::fe" - "2620:fe::9" - - #quad9 IPv4 - "9.9.9.9" - "149.112.112.112" + "8.8.8.8" + "8.8.4.4" ]; networkmanager = { enable = true; dns = "systemd-resolved"; plugins = mkForce []; wifi = { - macAddress = "random"; - scanRandMacAddress = true; + # why does my server have wifi? not sure. + # ensure my mac addr is static so I can reserve an IP + macAddress = + if host.role == "server" + then "permanent" + else "random"; + scanRandMacAddress = host.role != "server"; powersave = true; }; unmanaged = ["interface-name:tailscale*"]; @@ -32,8 +38,10 @@ in { enable = true; domains = ["~."]; - fallbackDns = ["9.9.9.9"]; #quad9 + fallbackDns = ["8.8.8.8"]; # google dns }; }; - systemd.services.NetworkManager-wait-online.enable = false; + # sometimes causes issues with network manager service never actually starting + # requiring me to manually start the service. fine on a workstation, not on a server + systemd.services.NetworkManager-wait-online.serviceConfig.ExecStart = ["" "${pkgs.networkmanager}/bin/nm-online -q"]; } diff --git a/modules/nixos/base/nix.nix b/modules/nixos/base/nix.nix index 411a097..2e06c36 100644 --- a/modules/nixos/base/nix.nix +++ b/modules/nixos/base/nix.nix @@ -1,5 +1,4 @@ { - inputs', inputs, pkgs, lib, @@ -7,11 +6,15 @@ ... }: let inherit (builtins) attrValues; - inherit (lib) mkIf mapAttrsToList; + inherit (lib) mkIf mapAttrs mapAttrsToList filterAttrs isType; inherit (config.ooknet.host) role admin; + + flakeInputs = filterAttrs (_: v: isType "flake" v) inputs; + paths = { - FLAKE = "/home/${admin.name}/.config/ooknet"; + FLAKE = "/home/${admin.name}/Summit/ooknet"; WEBSITE = "${paths.FLAKE}/outputs/pkgs/website"; + KUNZEN = "/home/${admin.name}/Summit/kunzen"; }; in { environment = { @@ -20,7 +23,6 @@ in { defaultPackages = []; systemPackages = attrValues { inherit (pkgs) git deadnix statix; - inherit (inputs'.agenix.packages) default; }; # location of the configuration flake @@ -35,28 +37,29 @@ in { dates = "Sun *-*-* 14:00"; options = "--delete-older-than 14d"; }; - registry = { - nixpkgs.flake = inputs.nixpkgs; - default.flake = inputs.nixpkgs; - }; - nixPath = mapAttrsToList (name: _: "${name}=${name}") config.nix.registry; + # from github:fufexan + registry = mapAttrs (_: v: {flake = v;}) flakeInputs; + nixPath = mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry; settings = { trusted-users = ["@wheel" "root" "builder"]; experimental-features = ["nix-command" "flakes"]; - accept-flake-config = true; + accept-flake-config = false; auto-optimise-store = true; + warn-dirty = false; # cache + builders-use-substitutes = true; substituters = [ "https://cache.nixos.org?priority=10" "https://nix-community.cachix.org" "https://neovim-flake.cachix.org" + "https://ooknet.cachix.org" ]; trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "neovim-flake.cachix.org-1:iyQ6lHFhnB5UkVpxhQqLJbneWBTzM8LBYOFPLNH4qZw=" + "ooknet.cachix.org-1:mtr4ue+8ux58b8mgTGRAG/txxHBnZvgX7Gi3amno+zs=" ]; - # TODO: setup builders -- builders-use-substitutes = true; }; }; nixpkgs = { @@ -73,7 +76,5 @@ in { # nix rebuild utililty programs.nh = mkIf (role == "workstation") { enable = true; - # sets an environment variable FLAKE that nh will refer to by default - flake = mkIf admin.homeManager "/home/${admin.name}/.config/ooknet"; }; } diff --git a/modules/nixos/base/options.nix b/modules/nixos/base/options.nix index 1eb9acf..ff3fcc6 100644 --- a/modules/nixos/base/options.nix +++ b/modules/nixos/base/options.nix @@ -3,7 +3,7 @@ pkgs, ... }: let - inherit (lib) mkOption; + inherit (lib) mkEnableOption mkOption; inherit (lib.types) str enum bool package; in { options.ooknet.host = { @@ -12,12 +12,16 @@ in { default = "ooks-generic"; }; type = mkOption { - type = enum ["desktop" "laptop"]; + type = enum ["vm" "desktop" "laptop"]; }; role = mkOption { type = enum ["workstation" "server"]; }; + syncthing = { + enable = mkEnableOption "Enable syncthing"; + }; + boot = { loader = mkOption { type = enum ["systemd" "grub"]; @@ -50,6 +54,10 @@ in { type = str; default = "ooks@protonmail.com"; }; + email = mkOption { + type = str; + default = "ooks@protonmail.com"; + }; homeManager = mkOption { type = bool; default = false; diff --git a/modules/nixos/base/secrets.nix b/modules/nixos/base/secrets.nix deleted file mode 100644 index 63406e2..0000000 --- a/modules/nixos/base/secrets.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ - config, - lib, - self, - ... -}: let - inherit (lib) mkIf; - - inherit (config.ooknet) host; - inherit (host) admin; - inherit (config.services) tailscale; -in { - age.identityPaths = [ - "/home/${admin.name}/.ssh/id_ed25519" - ]; - - age.secrets = { - tailscale-auth = mkIf tailscale.enable { - file = "${self}/secrets/tailscale-auth.age"; - mode = "444"; - }; - github_key = mkIf admin.homeManager { - file = "${self}/secrets/github_key.age"; - path = "/home/${admin.name}/.ssh/github_key"; - owner = "${admin.name}"; - group = "users"; - }; - ooknet_org = mkIf admin.homeManager { - file = "${self}/secrets/ooknet_org.age"; - path = "/home/${admin.name}/.ssh/ooknet_org"; - owner = "${admin.name}"; - group = "users"; - }; - spotify_key = mkIf admin.homeManager { - file = "${self}/secrets/spotify_key.age"; - owner = "${admin.name}"; - group = "users"; - }; - }; -} diff --git a/modules/nixos/base/syncthing.nix b/modules/nixos/base/syncthing.nix new file mode 100644 index 0000000..1967b32 --- /dev/null +++ b/modules/nixos/base/syncthing.nix @@ -0,0 +1,52 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkIf; + inherit (config.networking) hostName; + inherit (config.ooknet.host) admin syncthing; + inherit (config.ooknet.secrets) devices; + + key = config.age.secrets."${hostName}-syncthing-key"; + cert = config.age.secrets."${hostName}-syncthing-cert"; +in { + config = mkIf syncthing.enable { + services.syncthing = { + enable = true; + user = admin.name; + group = "users"; + openDefaultPorts = true; + configDir = "/home/${admin.name}/.config/syncthing"; + + # host credentials + key = key.path; + cert = cert.path; + + settings = { + # obfuscating device ids is not necessary, but i do it anyway + devices = { + "ooksdesk" = { + inherit (devices.ooksdesk) id addresses; + }; + "ooksmedia" = { + inherit (devices.ooksmedia) id addresses; + }; + }; + folders = { + "Summit" = { + path = "/home/${admin.name}/Summit"; + devices = [ + "ooksdesk" + "ooksmedia" + ]; + ignorePerms = false; + }; + }; + }; + }; + # Dont create default ~/Sync folder + # https://wiki.nixos.org/wiki/Syncthing + systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true"; + }; +} diff --git a/modules/nixos/hardware/features/audio.nix b/modules/nixos/hardware/features/audio.nix index 9fb0b20..6b93a05 100644 --- a/modules/nixos/hardware/features/audio.nix +++ b/modules/nixos/hardware/features/audio.nix @@ -9,7 +9,6 @@ in { # generic audio configuration config = mkIf (elem "audio" features) { - hardware.pulseaudio.enable = false; services = { pipewire = { enable = true; @@ -22,6 +21,7 @@ in { jack.enable = true; wireplumber.enable = true; }; + pulseaudio.enable = false; # realtime audio udev.extraRules = '' diff --git a/modules/nixos/hardware/features/bluetooth.nix b/modules/nixos/hardware/features/bluetooth.nix index 9ce0c5c..821f60f 100644 --- a/modules/nixos/hardware/features/bluetooth.nix +++ b/modules/nixos/hardware/features/bluetooth.nix @@ -2,7 +2,6 @@ config, lib, pkgs, - self, ... }: let inherit (lib) mkIf; @@ -16,7 +15,6 @@ in { }; environment.systemPackages = attrValues { - #inherit (self.packages.${pkgs.system}) live-buds-cli; inherit (pkgs) bluetuith; }; diff --git a/modules/nixos/hardware/features/default.nix b/modules/nixos/hardware/features/default.nix index 8704874..882edfd 100644 --- a/modules/nixos/hardware/features/default.nix +++ b/modules/nixos/hardware/features/default.nix @@ -6,6 +6,6 @@ ./battery.nix ./backlight.nix ./ssd.nix - # ./bluetooth.nix + ./bluetooth.nix ]; } diff --git a/modules/nixos/hardware/features/printing.nix b/modules/nixos/hardware/features/printing.nix index 334f8a1..ae79a21 100644 --- a/modules/nixos/hardware/features/printing.nix +++ b/modules/nixos/hardware/features/printing.nix @@ -12,7 +12,10 @@ in { services = { printing = { enable = true; - drivers = [pkgs.hplip pkgs.cnijfilter2]; + drivers = [ + pkgs.hplip + # FIXME: pkgs.cnijfilter2 + ]; }; avahi = { enable = true; diff --git a/modules/nixos/hardware/features/video.nix b/modules/nixos/hardware/features/video.nix index 5740b99..05a1ed2 100644 --- a/modules/nixos/hardware/features/video.nix +++ b/modules/nixos/hardware/features/video.nix @@ -1,7 +1,6 @@ { lib, config, - pkgs, ... }: let inherit (lib) mkIf; diff --git a/modules/nixos/hardware/gpu/amd.nix b/modules/nixos/hardware/gpu/amd.nix index 4c39252..64eb1fc 100644 --- a/modules/nixos/hardware/gpu/amd.nix +++ b/modules/nixos/hardware/gpu/amd.nix @@ -9,6 +9,13 @@ inherit (builtins) attrValues; in { config = mkIf (gpu.type == "amd") { + hardware.amdgpu = { + amdvlk = { + enable = true; + support32Bit.enable = true; + }; + opencl.enable = true; + }; hardware.graphics = { extraPackages = attrValues { inherit diff --git a/modules/nixos/hardware/options.nix b/modules/nixos/hardware/options.nix index 57aaece..864eba3 100644 --- a/modules/nixos/hardware/options.nix +++ b/modules/nixos/hardware/options.nix @@ -3,9 +3,14 @@ config, ... }: let + inherit (builtins) filter length head; inherit (lib) mkOption mkEnableOption; inherit (lib.types) nullOr enum bool submodule listOf int str; - inherit (config.ooknet) hardware; + + cfg = config.ooknet.hardware; + hasMonitors = length cfg.monitors != 0; + primaryAttr = filter (m: m.primary or false) cfg.monitors; + primaryCount = length primaryAttr; in { options.ooknet.hardware = { gpu = { @@ -21,6 +26,14 @@ in { default = null; }; amd.pstate.enable = mkEnableOption ""; + cores = mkOption { + type = int; + description = "Number of Physical CPU cores the system has"; + }; + threads = mkOption { + type = int; + description = "Number of cpu threads the cpu has"; + }; }; features = mkOption { @@ -39,6 +52,15 @@ in { # monitor module inspired by misterio77 # includes the addition of transform option + primaryMonitor = mkOption { + type = nullOr str; + default = + if !hasMonitors + then null + else (head primaryAttr).name; + description = "Name of the primary monitor, derived from the monitors list"; + readOnly = true; + }; monitors = mkOption { type = listOf (submodule { options = { @@ -78,10 +100,6 @@ in { type = bool; default = true; }; - workspace = mkOption { - type = nullOr str; - default = null; - }; }; }); default = []; @@ -91,10 +109,8 @@ in { config = { assertions = [ { - assertion = - ((lib.length hardware.monitors) != 0) - -> ((lib.length (lib.filter (m: m.primary) hardware.monitors)) == 1); - message = "At least 1 primary monitor is required"; + assertion = hasMonitors -> primaryCount == 1; + message = "Error: config.ooknet.hardware.monitors. When monitors are configured, exactly one monitor must be designated as primary (found ${toString primaryCount} primary monitors)"; } ]; }; diff --git a/modules/nixos/server/options.nix b/modules/nixos/server/options.nix index 2b437fd..eea6d9d 100644 --- a/modules/nixos/server/options.nix +++ b/modules/nixos/server/options.nix @@ -14,7 +14,7 @@ in { description = "The server profile the host will use as a base"; }; services = mkOption { - type = listOf (enum ["website" "forgejo"]); + type = listOf (enum ["media-server" "website" "forgejo" "ookflix"]); default = []; description = "List of services the server will host"; }; @@ -24,7 +24,10 @@ in { }; webserver = { - caddy.enable = mkEnableOption ""; + caddy = { + enable = mkEnableOption ""; + cloudflare.enable = mkEnableOption ""; + }; }; database = { postgresql.enable = mkEnableOption ""; diff --git a/modules/nixos/server/services/default.nix b/modules/nixos/server/services/default.nix index 6d19766..5bad467 100644 --- a/modules/nixos/server/services/default.nix +++ b/modules/nixos/server/services/default.nix @@ -2,5 +2,6 @@ imports = [ ./website ./forgejo + ./ookflix ]; } diff --git a/modules/nixos/server/services/forgejo/default.nix b/modules/nixos/server/services/forgejo/default.nix index c31731a..7cfd06e 100644 --- a/modules/nixos/server/services/forgejo/default.nix +++ b/modules/nixos/server/services/forgejo/default.nix @@ -1,10 +1,11 @@ { config, lib, + pkgs, ... }: let inherit (config.ooknet.server) services domain; - inherit (lib) mkIf elem; + inherit (lib) mkIf elem getExe; in { config = mkIf (elem "forgejo" services) { networking.firewall.allowedTCPPorts = [2222]; @@ -62,5 +63,24 @@ in { ''; }; }; + # credit to TLATER + # https://discourse.nixos.org/t/how-to-access-forgejo-cli/45370 + environment.systemPackages = let + cfg = config.services.forgejo; + forgejo-cli = pkgs.writeScriptBin "forgejo-cli" '' + #!${pkgs.runtimeShell} + cd ${cfg.stateDir} + sudo=exec + if [[ "$USER" != forgejo ]]; then + sudo='exec /run/wrappers/bin/sudo -u ${cfg.user} -g ${cfg.group} --preserve-env=GITEA_WORK_DIR --preserve-env=GITEA_CUSTOM' + fi + # Note that these variable names will change + export GITEA_WORK_DIR=${cfg.stateDir} + export GITEA_CUSTOM=${cfg.customDir} + $sudo ${getExe cfg.package} "$@" + ''; + in [ + forgejo-cli + ]; }; } diff --git a/modules/nixos/server/services/forgejo/options.nix b/modules/nixos/server/services/forgejo/options.nix new file mode 100644 index 0000000..ce2fcd6 --- /dev/null +++ b/modules/nixos/server/services/forgejo/options.nix @@ -0,0 +1,22 @@ +{ + lib, + config, + ... +}: let + inherit (config.services) forgejo; + inherit (lib) mkEnableOption mkOption; + inherit (lib.types) str; + mkColorOption = description: + mkOption { + type = str; + default = ""; + inherit description; + }; +in { + options.ooknet.server.forgejo.customTheme = { + enable = mkEnableOption; + light = { + primary = mkColorOption; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/default.nix b/modules/nixos/server/services/ookflix/default.nix new file mode 100644 index 0000000..8580bd0 --- /dev/null +++ b/modules/nixos/server/services/ookflix/default.nix @@ -0,0 +1,13 @@ +{ + imports = [ + ./streamers + ./monitors + ./networking + ./downloading + + ./shared.nix + ./podman.nix + ./options.nix + ./homepage.nix + ]; +} diff --git a/modules/nixos/server/services/ookflix/downloading/default.nix b/modules/nixos/server/services/ookflix/downloading/default.nix new file mode 100644 index 0000000..af0e115 --- /dev/null +++ b/modules/nixos/server/services/ookflix/downloading/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ./sonarr.nix + ./radarr.nix + ./prowlarr.nix + ./jellyseer.nix + ./qbittorrent.nix + ]; +} diff --git a/modules/nixos/server/services/ookflix/downloading/jellyseer.nix b/modules/nixos/server/services/ookflix/downloading/jellyseer.nix new file mode 100644 index 0000000..bf0b049 --- /dev/null +++ b/modules/nixos/server/services/ookflix/downloading/jellyseer.nix @@ -0,0 +1,38 @@ +{ + config, + lib, + ook, + self, + ... +}: let + ookflixLib = import ../lib.nix {inherit lib config self;}; + inherit (ookflixLib) mkServiceUser mkServiceStateDir; + inherit (lib) mkIf; + inherit (ook.lib.container) mkContainerLabel mkContainerEnvironment mkContainerPort; + inherit (config.ooknet.server.ookflix) groups; + inherit (config.ooknet.server.ookflix.services) jellyseerr; +in { + config = mkIf jellyseerr.enable { + # media requesting for jellyfin + users = mkServiceUser jellyseerr.user.name; + systemd.tmpfiles.settings.jellyseerrStateDir = mkServiceStateDir "jellyseerr"; + virtualisation.oci-containers.containers = { + jellyseerr = { + image = "ghcr.io/hotio/jellyseerr"; + autoStart = true; + hostname = "jellyseerr"; + ports = [(mkContainerPort jellyseerr.port)]; + volumes = ["${jellyseerr.stateDir}:/config"]; + labels = mkContainerLabel { + name = "jellyseerr"; + inherit (jellyseerr) domain port; + homepage = { + group = "media"; + description = "media-server requesting"; + }; + }; + environment = mkContainerEnvironment jellyseerr.user.id groups.media.id; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/downloading/prowlarr.nix b/modules/nixos/server/services/ookflix/downloading/prowlarr.nix new file mode 100644 index 0000000..7004aea --- /dev/null +++ b/modules/nixos/server/services/ookflix/downloading/prowlarr.nix @@ -0,0 +1,41 @@ +{ + config, + lib, + ook, + self, + ... +}: let + ookflixLib = import ../lib.nix {inherit lib config self;}; + inherit (ookflixLib) mkServiceUser mkServiceStateDir; + inherit (lib) mkIf; + inherit (ook.lib.container) mkContainerLabel mkContainerEnvironment mkContainerPort; + inherit (config.ooknet.server.ookflix) groups; + inherit (config.ooknet.server.ookflix.services) prowlarr; +in { + config = mkIf prowlarr.enable { + users = mkServiceUser prowlarr.user.name; + systemd.tmpfiles.settings.prowlarrStateDir = mkServiceStateDir "prowlarr"; + virtualisation.oci-containers.containers = { + prowlarr = { + image = "lscr.io/linuxserver/prowlarr:latest"; + autoStart = true; + hostname = "prowlarr"; + ports = [(mkContainerPort prowlarr.port)]; + volumes = ["${prowlarr.stateDir}:/config"]; + labels = mkContainerLabel { + name = "prowlarr"; + inherit (prowlarr) port domain; + homepage = { + group = "arr"; + description = "media-server indexer"; + }; + }; + environment = + mkContainerEnvironment prowlarr.user.id groups.media.id + // { + UMASK = "002"; + }; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/downloading/qbittorrent.nix b/modules/nixos/server/services/ookflix/downloading/qbittorrent.nix new file mode 100644 index 0000000..4117539 --- /dev/null +++ b/modules/nixos/server/services/ookflix/downloading/qbittorrent.nix @@ -0,0 +1,49 @@ +{ + config, + lib, + ook, + self, + ... +}: let + ookflixLib = import ../lib.nix {inherit lib config self;}; + inherit (ookflixLib) mkServiceUser mkServiceStateDir; + inherit (lib) mkIf; + inherit (ook.lib.container) mkContainerLabel mkContainerEnvironment; + inherit (config.ooknet.server.ookflix) groups volumes; + inherit (config.ooknet.server.ookflix.services) qbittorrent; +in { + config = mkIf qbittorrent.enable { + users = mkServiceUser qbittorrent.user.name; + systemd.tmpfiles.settings.qbittorrentStateDir = mkServiceStateDir "qbittorrent"; + virtualisation.oci-containers.containers = { + # Torrent client + qbittorrent = { + hostname = "qbittorrent"; + image = "ghcr.io/hotio/qbittorrent"; + dependsOn = ["gluetun"]; + volumes = [ + "${qbittorrent.stateDir}:/config" + "${volumes.torrents.root}:/data/torrents" + ]; + extraOptions = [ + "--network=container:gluetun" + ]; + labels = mkContainerLabel { + name = "qbittorrent"; + inherit (qbittorrent) port domain; + homepage = { + group = "downloads"; + description = "torrent client"; + }; + }; + environment = + mkContainerEnvironment qbittorrent.user.id groups.media.id + // { + UMASK = "002"; + WEBUI_PORTS = "${toString qbittorrent.port}/tcp,${toString qbittorrent.port}/udp"; + TORRENTING_PORT = "${toString qbittorrent.torrentPort}"; + }; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/downloading/radarr.nix b/modules/nixos/server/services/ookflix/downloading/radarr.nix new file mode 100644 index 0000000..4c1c432 --- /dev/null +++ b/modules/nixos/server/services/ookflix/downloading/radarr.nix @@ -0,0 +1,44 @@ +{ + config, + lib, + ook, + self, + ... +}: let + ookflixLib = import ../lib.nix {inherit lib config self;}; + inherit (ookflixLib) mkServiceUser mkServiceStateDir; + inherit (lib) mkIf; + inherit (ook.lib.container) mkContainerLabel mkContainerPort mkContainerEnvironment; + inherit (config.ooknet.server.ookflix) groups volumes; + inherit (config.ooknet.server.ookflix.services) radarr; +in { + config = mkIf radarr.enable { + users = mkServiceUser radarr.user.name; + systemd.tmpfiles.settings.radarrStateDir = mkServiceStateDir "radarr"; + virtualisation.oci-containers.containers = { + radarr = { + image = "ghcr.io/hotio/radarr"; + autoStart = true; + hostname = "radarr"; + ports = [(mkContainerPort radarr.port)]; + volumes = [ + "${radarr.stateDir}:/config" + "${volumes.data.root}:/data" + ]; + labels = mkContainerLabel { + name = "radarr"; + inherit (radarr) port domain; + homepage = { + group = "arr"; + description = "media-server movies downloader"; + }; + }; + environment = + mkContainerEnvironment radarr.user.id groups.media.id + // { + UMASK = "002"; + }; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/downloading/sonarr.nix b/modules/nixos/server/services/ookflix/downloading/sonarr.nix new file mode 100644 index 0000000..c9b8014 --- /dev/null +++ b/modules/nixos/server/services/ookflix/downloading/sonarr.nix @@ -0,0 +1,44 @@ +{ + config, + lib, + ook, + self, + ... +}: let + ookflixLib = import ../lib.nix {inherit lib config self;}; + inherit (ookflixLib) mkServiceUser mkServiceStateDir; + inherit (lib) mkIf; + inherit (ook.lib.container) mkContainerLabel mkContainerEnvironment mkContainerPort; + inherit (config.ooknet.server.ookflix) groups volumes; + inherit (config.ooknet.server.ookflix.services) sonarr; +in { + config = mkIf sonarr.enable { + users = mkServiceUser sonarr.user.name; + systemd.tmpfiles.settings.sonarrStateDir = mkServiceStateDir "sonarr"; + virtualisation.oci-containers.containers = { + sonarr = { + image = "ghcr.io/hotio/sonarr"; + autoStart = true; + hostname = "sonarr"; + ports = [(mkContainerPort sonarr.port)]; + volumes = [ + "${sonarr.stateDir}:/config" + "${volumes.data.root}:/data" + ]; + labels = mkContainerLabel { + name = "sonarr"; + inherit (sonarr) port domain; + homepage = { + group = "arr"; + description = "media-server tv downloader"; + }; + }; + environment = + mkContainerEnvironment sonarr.user.id groups.media.id + // { + UMASK = "002"; + }; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/homepage.nix b/modules/nixos/server/services/ookflix/homepage.nix new file mode 100644 index 0000000..586923e --- /dev/null +++ b/modules/nixos/server/services/ookflix/homepage.nix @@ -0,0 +1,34 @@ +{ + config, + lib, + ook, + self, + ... +}: let + ookflixLib = import ./lib.nix {inherit lib config self;}; + inherit (ookflixLib) mkServiceUser mkServiceStateDir; + inherit (lib) mkIf; + inherit (ook.lib.container) mkContainerLabel mkContainerEnvironment mkContainerPort; + inherit (config.ooknet.server.ookflix) groups; + inherit (config.ooknet.server.ookflix.services) homepage; +in { + config = mkIf homepage.enable { + # media requesting for jellyfin + users = mkServiceUser homepage.user.name; + systemd.tmpfiles.settings.homepageStateDir = mkServiceStateDir "homepage"; + virtualisation.oci-containers.containers = { + homepage = { + image = "ghcr.io/benphelps/homepage:latest"; + autoStart = true; + hostname = "homepage"; + ports = [(mkContainerPort homepage.port)]; + volumes = ["${homepage.stateDir}:/config"]; + labels = mkContainerLabel { + name = "homepage"; + inherit (homepage) domain port; + }; + environment = mkContainerEnvironment homepage.user.id groups.media.id; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/lib.nix b/modules/nixos/server/services/ookflix/lib.nix new file mode 100644 index 0000000..df29800 --- /dev/null +++ b/modules/nixos/server/services/ookflix/lib.nix @@ -0,0 +1,146 @@ +{ + lib, + config, + ... +}: let + inherit (lib) getExe nameValuePair mkOption mkEnableOption elem assertMsg; + inherit (builtins) attrValues; + inherit (lib.types) int path port str; + inherit (config.ooknet) server; + inherit (config.virtualisation) podman; + cfg = server.ookflix; + ookflixEnabled = elem "ookflix" server.services; + + mkSubdomainOption = name: description: example: + mkOption { + type = str; + default = "${name}.${server.domain}"; + inherit description example; + }; + + # check config.ids for static uid/gid based on service name, if available use that, if not, use fallback. + # check fallback doesnt conflict with existing static id + getId = idType: name: fallback: let + allNixosIds = attrValues config.ids.${idType}; + fallbackConflict = elem fallback allNixosIds; + in + mkOption { + type = int; + default = + config.ids.${idType}.${name} + or ( + assert assertMsg (!fallbackConflict) + "Fallback ${idType} ${toString fallback} for ${name} conflicts with NixOS static allocation"; fallback + ); + description = "${idType} of ${name} container"; + example = 224; + }; + + mkUserOption = name: fallback: { + name = mkOption { + type = str; + default = name; + description = "Name of ${name} container user"; + example = "${name}"; + }; + id = getId "uids" name fallback; + }; + + mkGroupOption = name: fallback: { + name = mkOption { + type = str; + default = name; + }; + id = getId "gids" name fallback; + }; + + mkPortOption = value: description: example: + mkOption { + type = port; + default = value; + inherit description example; + }; + + mkVolumeOption = rootPath: pathValue: + mkOption { + type = path; + default = + if rootPath == "state" + then "${cfg.volumes.state.root}/${pathValue}" + else if rootPath == "data" + then "${cfg.volumes.data.root}/${pathValue}" + else if rootPath == "media" + then "${cfg.volumes.media.root}/${pathValue}" + else if rootPath == "torrents" + then "${cfg.volumes.torrents.root}/${pathValue}" + else if rootPath == "usenet" + then "${cfg.volumes.usenet.root}/${pathValue}" + else if rootPath == "usenet/complete" + then "${cfg.volumes.usenet.complete.root}/${pathValue}" + else if rootPath == "root" + then pathValue + else throw "Invalid VolumeOption rootPath: ${rootPath}. Must be one of 'state' 'data' 'media' 'torrents' 'usenet' 'usenet/complete' 'root'"; + }; + + mkServiceOptions = name: { + port, + gid, + uid, + ... + } @ args: { + enable = mkEnableOption "Enable ${name} container" // {default = ookflixEnabled;}; + port = mkPortOption args.port "Port for ${name} container." 80; + domain = mkSubdomainOption name "Domain for ${name} container." "${name}.mydomain.com"; + stateDir = mkVolumeOption "state" name; + user = mkUserOption name args.uid; + group = mkGroupOption name args.gid; + }; + mkBasicServiceOptions = name: { + gid, + uid, + ... + } @ args: { + enable = mkEnableOption "Enable ${name} container" // {default = ookflixEnabled;}; + user = mkUserOption name args.uid; + group = mkGroupOption name args.gid; + }; + mkServiceUser = service: { + users.${service} = { + isSystemUser = true; + uid = cfg.services.${service}.user.id; + name = service; + group = service; + }; + groups.${service} = { + gid = cfg.services.${service}.group.id; + name = service; + }; + }; + mkServiceStateDir = service: { + "${cfg.services.${service}.stateDir}"."d" = { + mode = "0700"; + user = cfg.services.${service}.user.name; + group = cfg.services.${service}.group.name; + }; + }; + mkServiceStateFile = service: file: { + "${cfg.services.${service}.stateDir}/${file}"."f" = { + mode = "0600"; + user = cfg.services.${service}.user.name; + group = cfg.services.${service}.group.name; + }; + }; + + mkNetworkService = name: _network: + nameValuePair "podman-network-${name}" { + description = "Podman network ${name} for ookflix"; + serviceConfig = { + Type = "oneshot"; + RemainsAfterExit = true; + ExecStart = "${getExe podman.package} network create -d bridge ${name}"; + ExecStop = "${getExe podman.package} network rm -f ${name}"; + }; + }; +in { + inherit mkServiceStateFile mkBasicServiceOptions mkServiceOptions mkServiceStateDir mkServiceUser mkUserOption mkPortOption mkGroupOption mkVolumeOption mkSubdomainOption mkNetworkService; +} diff --git a/modules/nixos/server/services/ookflix/monitors/default.nix b/modules/nixos/server/services/ookflix/monitors/default.nix new file mode 100644 index 0000000..3a4ec4f --- /dev/null +++ b/modules/nixos/server/services/ookflix/monitors/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./tautulli.nix + ]; +} diff --git a/modules/nixos/server/services/ookflix/monitors/tautulli.nix b/modules/nixos/server/services/ookflix/monitors/tautulli.nix new file mode 100644 index 0000000..e012dd0 --- /dev/null +++ b/modules/nixos/server/services/ookflix/monitors/tautulli.nix @@ -0,0 +1,38 @@ +{ + config, + lib, + ook, + self, + ... +}: let + ookflixLib = import ../lib.nix {inherit lib config self;}; + inherit (ookflixLib) mkServiceUser mkServiceStateDir; + inherit (lib) mkIf; + inherit (ook.lib.container) mkContainerLabel mkContainerEnvironment mkContainerPort; + inherit (config.ooknet.server.ookflix) groups; + inherit (config.ooknet.server.ookflix.services) tautulli; +in { + config = mkIf tautulli.enable { + users = mkServiceUser tautulli.user.name; + systemd.tmpfiles.settings.tautulliStateDir = mkServiceStateDir "tautulli"; + virtualisation.oci-containers.containers = { + # plex monitoring service + tautulli = { + image = "lscr.io/linuxserver/tautulli:latest"; + autoStart = true; + hostname = "tautulli"; + ports = [(mkContainerPort tautulli.port)]; + volumes = ["${tautulli.stateDir}:/config"]; + labels = mkContainerLabel { + name = "tautulli"; + inherit (tautulli) port domain; + homepage = { + group = "monitoring"; + description = "media-server monitoring"; + }; + }; + environment = mkContainerEnvironment tautulli.user.id groups.media.id; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/networking/default.nix b/modules/nixos/server/services/ookflix/networking/default.nix new file mode 100644 index 0000000..9e862e6 --- /dev/null +++ b/modules/nixos/server/services/ookflix/networking/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./gluetun.nix + ./traefik.nix + # ./networks.nix + ]; +} diff --git a/modules/nixos/server/services/ookflix/networking/gluetun.nix b/modules/nixos/server/services/ookflix/networking/gluetun.nix new file mode 100644 index 0000000..91f500e --- /dev/null +++ b/modules/nixos/server/services/ookflix/networking/gluetun.nix @@ -0,0 +1,35 @@ +{ + config, + lib, + ook, + self, + ... +}: let + ookflixLib = import ../lib.nix {inherit self lib config;}; + inherit (ookflixLib) mkServiceUser; + inherit (lib) mkIf; + inherit (ook.lib.container) mkContainerEnvironment; + inherit (config.ooknet.server.ookflix.services) qbittorrent gluetun; +in { + config = mkIf gluetun.enable { + users = mkServiceUser gluetun.user.name; + virtualisation.oci-containers.containers = { + # vpn container + gluetun = mkIf gluetun.enable { + image = "qmcgaw/gluetun:latest"; + # should make this an option. + environmentFiles = [config.age.secrets.vpn_env.path]; + ports = [ + "${toString qbittorrent.exposedPort}:${toString qbittorrent.port}" + ]; + environment = mkContainerEnvironment gluetun.user.id gluetun.group.id; + extraOptions = [ + # give network admin permissions + "--cap-add=NET_ADMIN" + # pass the network tunnel device + "--device=/dev/net/tun" + ]; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/networking/networks.nix b/modules/nixos/server/services/ookflix/networking/networks.nix new file mode 100644 index 0000000..582c0be --- /dev/null +++ b/modules/nixos/server/services/ookflix/networking/networks.nix @@ -0,0 +1,27 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf getExe; + inherit (config.ooknet.server) ookflix; + inherit (config.virtualisation) podman; + podmanCommand = getExe podman.package; +in { + config = mkIf ookflix.enable { + systemd.services = { + "podman-ookflix-network" = { + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + SyslogIdentifier = "%N"; + }; + unitConfig = { + "RequiresMountsFor" = "%t/containers"; + }; + wantedBy = ["multi-user.target"]; + script = "${podmanCommand} network create --ignore --driver=bridge ookflix"; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/networking/traefik.nix b/modules/nixos/server/services/ookflix/networking/traefik.nix new file mode 100644 index 0000000..c976e7e --- /dev/null +++ b/modules/nixos/server/services/ookflix/networking/traefik.nix @@ -0,0 +1,79 @@ +{ + config, + lib, + ook, + self, + ... +}: let + ookflixLib = import ../lib.nix {inherit self lib config;}; + inherit (ookflixLib) mkServiceUser mkServiceStateDir mkServiceStateFile; + inherit (lib) mkIf; + inherit (ook.lib.container) mkContainerEnvironment mkContainerLabel mkContainerPort; + inherit (config.ooknet) server; + inherit (config.ooknet.server.ookflix.services) traefik; + inherit (config.ooknet.host) admin; +in { + config = mkIf traefik.enable { + users = mkServiceUser traefik.user.name; + systemd.tmpfiles.settings = { + traefikStateDir = mkServiceStateDir "traefik"; + traefikAcmeFile = mkServiceStateFile "traefik" "acme.json"; + }; + virtualisation.oci-containers.containers = { + # vpn container + traefik = mkIf traefik.enable { + autoStart = true; + image = "traefik:3.0"; + # should make this an option. + volumes = [ + "/run/podman/podman.sock:/var/run/docker.sock:ro" + "${traefik.stateDir}/acme.json:/acme.json" + ]; + ports = [ + "80:80" + "443:443" + (mkContainerPort traefik.port) + ]; + environmentFiles = [config.age.secrets.cf_creds.path]; + extraOptions = ["--security-opt=no-new-privileges:true"]; + cmd = [ + "--log.level=DEBUG" + "--api.insecure=true" + "--api.dashboard=true" + "--providers.docker=true" + "--providers.docker.exposedbydefault=false" + + "--certificatesresolvers.letsencrypt.acme.email=${admin.email}" + "--certificatesresolvers.letsencrypt.acme.storage=/acme.json" + "--certificatesresolvers.letsencrypt.acme.dnschallenge=true" + "--certificatesresolvers.letsencrypt.acme.dnschallenge.provider=cloudflare" + + "--entrypoints.web.address=:80" + "--entrypoints.websecure.address=:443" + "--entrypoints.traefik.address=:${toString traefik.port}" + + "--entrypoints.websecure.forwardedHeaders.trustedIPs=103.21.244.0/22,103.22.200.0/22,103.31.4.0/22" # Cloudflare IPs + + "--entrypoints.web.http.redirections.entrypoint.to=websecure" + "--entrypoints.web.http.redirections.entrypoint.scheme=https" + + "--entrypoints.websecure.http.tls=true" + "--entrypoints.websecure.http.tls.certResolver=letsencrypt" + "--entrypoints.websecure.http.tls.domains[0].main=${server.domain}" + "--entrypoints.websecure.http.tls.domains[0].sans=*.${server.domain}" + ]; + + labels = mkContainerLabel { + name = "traefik"; + inherit (traefik) domain port; + homepage = { + group = "proxy"; + description = "reverse proxy"; + }; + }; + + environment = mkContainerEnvironment traefik.user.id traefik.group.id; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/options.nix b/modules/nixos/server/services/ookflix/options.nix new file mode 100644 index 0000000..4b67c62 --- /dev/null +++ b/modules/nixos/server/services/ookflix/options.nix @@ -0,0 +1,127 @@ +{ + lib, + config, + self, + ... +}: let + ookflixLib = import ./lib.nix {inherit lib config self;}; + + inherit (ookflixLib) mkVolumeOption mkGroupOption mkServiceOptions mkBasicServiceOptions mkPortOption; + inherit (lib) mkOption mkEnableOption elem; + inherit (config.ooknet.server) services; + inherit (lib.types) enum; +in { + options.ooknet.server.ookflix = { + enable = + mkEnableOption "Enable ookflix a container based media server module" + // {default = elem "ookflix" services;}; + gpuAcceleration = { + enable = + mkEnableOption "Enable GPU acceleration for video streamers" + // {default = elem "ookflix" services;}; + type = mkOption { + type = enum ["nvidia" "intel" "amd"]; + default = config.ooknet.hardware.gpu.type; + description = '' + What GPU type to use for GPU acceleration. + Defaults to system GPU type (ooknet.hardware.gpu.type) + ''; + }; + }; + volumes = { + state.root = mkVolumeOption "root" "/var/lib/ookflix"; + data.root = mkVolumeOption "root" "/jellyfin"; + + torrents = { + root = mkVolumeOption "data" "torrents"; + tv = mkVolumeOption "torrents" "tv"; + movies = mkVolumeOption "torrents" "movies"; + books = mkVolumeOption "torrents" "books"; + }; + + usenet = { + root = mkVolumeOption "data" "usenet"; + incomplete = mkVolumeOption "usenet" "incomplete"; + complete = { + root = mkVolumeOption "usenet" "complete"; + tv = mkVolumeOption "usenet/complete" "tv"; + movies = mkVolumeOption "usenet/complete" "movies"; + books = mkVolumeOption "usenet/complete" "books"; + }; + }; + media = { + root = mkVolumeOption "data" "media"; + movies = mkVolumeOption "media" "movies"; + tv = mkVolumeOption "media" "tv"; + books = mkVolumeOption "media" "books"; + }; + }; + # Shared groups + groups = { + media = mkGroupOption "media" 992; + downloads = mkGroupOption "downloader" 981; + }; + + services = { + jellyfin = mkServiceOptions "jellyfin" { + port = 8096; + uid = 994; + gid = 994; + }; + plex = mkServiceOptions "plex" { + port = 32400; + uid = 195; + gid = 195; + }; + sonarr = mkServiceOptions "sonarr" { + port = 8989; + uid = 274; + gid = 274; + }; + radarr = mkServiceOptions "radarr" { + port = 7878; + uid = 275; + gid = 275; + }; + prowlarr = mkServiceOptions "prowlarr" { + port = 9696; + uid = 982; + gid = 987; + }; + qbittorrent = + mkServiceOptions "qbittorrent" { + port = 8080; + uid = 377; + gid = 377; + } + // { + torrentPort = mkPortOption 58080 "Torrenting Port for qbittorrent" 58080; + exposedPort = mkPortOption 8081 "Port exposed by qbittorrent" 8081; + }; + jellyseerr = mkServiceOptions "jellyseerr" { + port = 5055; + uid = 345; + gid = 345; + }; + tautulli = mkServiceOptions "tautulli" { + port = 8181; + uid = 355; + gid = 355; + }; + traefik = mkServiceOptions "traefik" { + port = 8080; + uid = 389; + gid = 389; + }; + homepage = mkServiceOptions "homepage" { + port = 3000; + uid = 400; + gid = 400; + }; + gluetun = mkBasicServiceOptions "gluetun" { + uid = 356; + gid = 357; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/podman.nix b/modules/nixos/server/services/ookflix/podman.nix new file mode 100644 index 0000000..963ab05 --- /dev/null +++ b/modules/nixos/server/services/ookflix/podman.nix @@ -0,0 +1,35 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf; + inherit (config.ooknet.host) admin; + inherit (config.ooknet.server) ookflix; +in { + config = mkIf ookflix.enable { + # add admin to podman group + users.groups.podman.members = [admin.name]; + virtualisation = { + # explicitly set this even though its the default value + # this enables the module below + oci-containers.backend = "podman"; + podman = { + # periodically prunes podman resources + # defaults to --all, weekly + autoPrune.enable = true; + + # aliases docker command to podman + dockerCompat = true; + + # makes the podman sockaet available in place of docker socket + dockerSocket.enable = true; + # settings for containers/networks/podman.json + defaultNetwork.settings = { + # allows udp port 53 on podmans network interface: podman+ + dns_enabled = true; + }; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/shared.nix b/modules/nixos/server/services/ookflix/shared.nix new file mode 100644 index 0000000..f8d61e1 --- /dev/null +++ b/modules/nixos/server/services/ookflix/shared.nix @@ -0,0 +1,76 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf; + inherit (config.ooknet.host) admin; + inherit (config.ooknet.server) ookflix; + inherit (config.ooknet.server.ookflix) volumes groups; + inherit (config.ooknet.server.ookflix.services) jellyfin plex sonarr radarr prowlarr qbittorrent; + dataDirPermissions = { + mode = "0775"; + user = admin.name; + group = groups.media.name; + }; + ifTheyExist = users: builtins.filter (user: builtins.hasAttr user config.users.users) users; +in { + config = mkIf ookflix.enable { + users.groups = { + ${groups.media.name} = { + inherit (groups.media) name; + gid = groups.media.id; + members = ifTheyExist [ + # need access to the media library + jellyfin.user.name + plex.user.name + + # need access to the media library and the torrent/usenet library + sonarr.user.name + radarr.user.name + prowlarr.user.name + + # need access to the torrent library + qbittorrent.user.name + ]; + }; + }; + systemd.tmpfiles.settings = { + ookflixDataDirs = { + /* + set up the entire directory structure it should look something like this: + data + ├── torrents + │ ├── movies + │ ├── books + │ └── tv + ├── usenet + │ ├── incomplete + │ └── complete + │ ├── books + │ ├── movies + │ └── tv + └── media + ├── movies + ├── books + └── tv + */ + "${volumes.data.root}"."d" = dataDirPermissions; + "${volumes.torrents.root}"."d" = dataDirPermissions; + "${volumes.torrents.movies}"."d" = dataDirPermissions; + "${volumes.torrents.tv}"."d" = dataDirPermissions; + "${volumes.torrents.books}"."d" = dataDirPermissions; + "${volumes.usenet.root}"."d" = dataDirPermissions; + "${volumes.usenet.incomplete}"."d" = dataDirPermissions; + "${volumes.usenet.complete.root}"."d" = dataDirPermissions; + "${volumes.usenet.complete.movies}"."d" = dataDirPermissions; + "${volumes.usenet.complete.tv}"."d" = dataDirPermissions; + "${volumes.usenet.complete.books}"."d" = dataDirPermissions; + "${volumes.media.root}"."d" = dataDirPermissions; + "${volumes.media.movies}"."d" = dataDirPermissions; + "${volumes.media.tv}"."d" = dataDirPermissions; + "${volumes.media.books}"."d" = dataDirPermissions; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/streamers/default.nix b/modules/nixos/server/services/ookflix/streamers/default.nix new file mode 100644 index 0000000..9431035 --- /dev/null +++ b/modules/nixos/server/services/ookflix/streamers/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./plex.nix + ./jellyfin.nix + ]; +} diff --git a/modules/nixos/server/services/ookflix/streamers/jellyfin.nix b/modules/nixos/server/services/ookflix/streamers/jellyfin.nix new file mode 100644 index 0000000..46ba406 --- /dev/null +++ b/modules/nixos/server/services/ookflix/streamers/jellyfin.nix @@ -0,0 +1,48 @@ +{ + config, + lib, + ook, + self, + ... +}: let + ookflixLib = import ../lib.nix {inherit lib config self;}; + inherit (ookflixLib) mkServiceStateDir mkServiceUser; + inherit (lib) mkIf optionalAttrs; + inherit (ook.lib.container) mkContainerLabel mkContainerEnvironment mkContainerPort; + inherit (config.ooknet.server.ookflix) volumes services groups gpuAcceleration; + inherit (config.ooknet.server.ookflix.services) jellyfin; +in { + config = mkIf services.jellyfin.enable { + hardware.nvidia-container-toolkit.enable = gpuAcceleration.enable && gpuAcceleration.type == "nvidia"; + users = mkServiceUser jellyfin.user.name; + systemd.tmpfiles.settings.jellyfinStateDir = mkServiceStateDir "jellyfin"; + virtualisation.oci-containers.containers = { + # media streaming server + # docs: + jellyfin = { + image = "lscr.io/linuxserver/jellyfin:latest"; + autoStart = true; + hostname = "jellyfin"; + ports = [(mkContainerPort jellyfin.port)]; + volumes = [ + "${volumes.media.root}:/data" + "${jellyfin.stateDir}:/config" + ]; + labels = mkContainerLabel { + name = "jellyfin"; + inherit (jellyfin) port domain; + homepage = { + group = "media"; + description = "media-server streamer"; + }; + }; + environment = + mkContainerEnvironment jellyfin.user.id groups.media.id + // {JELLYFIN_PublishedServerUrl = jellyfin.domain;} + // optionalAttrs (gpuAcceleration.enable && gpuAcceleration.type == "nvidia") { + NVIDIA_VISIBLE_DEVICES = "all"; + }; + }; + }; + }; +} diff --git a/modules/nixos/server/services/ookflix/streamers/plex.nix b/modules/nixos/server/services/ookflix/streamers/plex.nix new file mode 100644 index 0000000..9c1d2d5 --- /dev/null +++ b/modules/nixos/server/services/ookflix/streamers/plex.nix @@ -0,0 +1,51 @@ +{ + config, + lib, + ook, + self, + ... +}: let + ookflixLib = import ../lib.nix {inherit lib config self;}; + inherit (ookflixLib) mkServiceUser mkServiceStateDir; + inherit (lib) mkIf optionalAttrs; + inherit (ook.lib.container) mkContainerLabel mkContainerEnvironment mkContainerPort; + inherit (config.ooknet.server.ookflix) gpuAcceleration services volumes groups; + inherit (config.ooknet.server.ookflix.services) plex; +in { + config = mkIf plex.enable { + # not sure if this is needed for podman + hardware.nvidia-container-toolkit.enable = gpuAcceleration.enable && gpuAcceleration.type == "nvidia"; + + # users/group/directories configuration, see lib.nix + users = mkServiceUser plex.user.name; + systemd.tmpfiles.settings.plexStateDir = mkServiceStateDir "plex"; + + # container configuration + virtualisation.oci-containers.containers = { + # media streaming server + plex = { + image = "lscr.io/linuxserver/plex:latest"; + autoStart = true; + hostname = "plex"; + ports = [(mkContainerPort plex.port)]; + volumes = [ + "${volumes.media.root}:/data" + "${plex.stateDir}:/config" + ]; + labels = mkContainerLabel { + name = "plex"; + inherit (plex) domain port; + homepage = { + group = "media"; + description = "media-server streamer"; + }; + }; + environment = + mkContainerEnvironment plex.user.id groups.media.id + // optionalAttrs (gpuAcceleration.enable && gpuAcceleration.type == "nvidia") { + NVIDIA_VISIBLE_DEVICES = "all"; + }; + }; + }; + }; +} diff --git a/modules/nixos/server/services/website/default.nix b/modules/nixos/server/services/website/default.nix index af0bf4f..f9f64a1 100644 --- a/modules/nixos/server/services/website/default.nix +++ b/modules/nixos/server/services/website/default.nix @@ -7,13 +7,22 @@ inherit (lib) mkIf elem; inherit (config.ooknet.server) services; inherit (self'.packages) website; + + websitePermissions = { + group = "www"; + user = "caddy"; + mode = "0775"; + }; in { config = mkIf (elem "website" services) { - ooknet.server.webserver.caddy.enable = true; - systemd.tmpfiles.rules = [ - "d /var/www 0775 caddy www" - "d /var/www/ooknet.org 0775 caddy www" - ]; + ooknet.server.webserver.caddy = { + enable = true; + cloudflare.enable = true; + }; + systemd.tmpfiles.settings.websiteDirs = { + "/var/www"."d" = websitePermissions; + "/var/www/ooknet.org"."d" = websitePermissions; + }; # cursed activation script # need to find a better way @@ -39,29 +48,31 @@ in { }; # using caddy because it makes my life easy - services.caddy.virtualHosts = { - "ooknet.org".extraConfig = - # sh - '' - encode zstd gzip + services.caddy = { + virtualHosts = { + "ooknet.org".extraConfig = + # sh + '' + encode zstd gzip - header { - Strict-Transport-Security "max-age=31536000;" - X-XSS-Protection "1; mode=block" - X-Frame-Options "DENY" - X-Content-Type-Options "nosniff" - -Server + header { + Strict-Transport-Security "max-age=31536000;" + X-XSS-Protection "1; mode=block" + X-Frame-Options "DENY" + X-Content-Type-Options "nosniff" + -Server - Referrer-Policy: no-referrer - } + Referrer-Policy "no-referrer" + } - root * /var/www/ooknet.org/ - file_server + root * /var/www/ooknet.org/ + file_server + ''; + "www.ooknet.org".extraConfig = '' + redir https://ooknet.org{uri} permanent ''; - "www.ooknet.org".extraConfig = '' - redir https://ooknet.org{uri} - ''; + }; }; }; } diff --git a/modules/nixos/server/webserver/caddy.nix b/modules/nixos/server/webserver/caddy.nix index 99dd2b2..b17b89a 100644 --- a/modules/nixos/server/webserver/caddy.nix +++ b/modules/nixos/server/webserver/caddy.nix @@ -1,16 +1,35 @@ { config, lib, + pkgs, ... }: let - inherit (lib) mkIf; + inherit (lib) mkIf mkMerge; inherit (config.ooknet.server.webserver) caddy; in { config = mkIf caddy.enable { users.groups.www = {}; - services.caddy = { - enable = true; - group = "www"; - }; + services.caddy = mkMerge [ + { + enable = true; + group = "www"; + } + + (mkIf caddy.cloudflare.enable { + package = pkgs.caddy.withPlugins { + plugins = [ + "github.com/caddy-dns/cloudflare@v0.0.0-20240703190432-89f16b99c18e" + "github.com/WeidiDeng/caddy-cloudflare-ip@v0.0.0-20231130002422-f53b62aa13cb" + ]; + hash = "sha256-X3SNPfianAWLXnE0hpQpgaaCqIqHm0jgyp1clnQKmUg="; + }; + globalConfig = '' + servers { + metrics + trusted_proxies static private_ranges 173.245.48.0/20 103.21.244.0/22 103.22.200.0/22 103.31.4.0/22 141.101.64.0/18 108.162.192.0/18 190.93.240.0/20 188.114.96.0/20 197.234.240.0/22 198.41.128.0/17 162.158.0.0/15 104.16.0.0/13 104.24.0.0/14 172.64.0.0/13 131.0.72.0/22 + } + ''; + }) + ]; }; } diff --git a/modules/nixos/workstation/default.nix b/modules/nixos/workstation/default.nix index 8e3032b..fe1f519 100644 --- a/modules/nixos/workstation/default.nix +++ b/modules/nixos/workstation/default.nix @@ -14,6 +14,7 @@ in { ./programs ./gaming ./environment + ./virtualization ]; home-manager.users.${admin.name} = mkIf admin.homeManager { diff --git a/modules/nixos/workstation/environment/hyprland/default.nix b/modules/nixos/workstation/environment/hyprland/default.nix index e5b36fc..a303768 100644 --- a/modules/nixos/workstation/environment/hyprland/default.nix +++ b/modules/nixos/workstation/environment/hyprland/default.nix @@ -14,6 +14,7 @@ in { enable = true; package = hyprland; portalPackage = xdg-desktop-portal-hyprland; + withUWSM = false; #TODO }; xdg.portal = { @@ -42,7 +43,7 @@ in { "--time" "--remember" "--cmd" - (getExe hyprland) + "Hyprland" ]; user = "greeter"; }; diff --git a/modules/nixos/workstation/gaming/default.nix b/modules/nixos/workstation/gaming/default.nix index 22d0e4d..b415fc7 100644 --- a/modules/nixos/workstation/gaming/default.nix +++ b/modules/nixos/workstation/gaming/default.nix @@ -2,5 +2,7 @@ imports = [ ./steam.nix ./gamemode.nix + ./switch.nix + ./emulation.nix ]; } diff --git a/modules/nixos/workstation/gaming/emulation.nix b/modules/nixos/workstation/gaming/emulation.nix new file mode 100644 index 0000000..f4c3f30 --- /dev/null +++ b/modules/nixos/workstation/gaming/emulation.nix @@ -0,0 +1,32 @@ +{ + lib, + config, + pkgs, + ... +}: let + inherit (lib) mkIf elem; + inherit (config.ooknet.workstation) profiles; +in { + config = mkIf (elem "gaming" profiles) { + services.udev.packages = [ + pkgs.dolphin-emu + (pkgs.writeTextFile { + name = "99-nintendo-controller.rules"; + text = '' + SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \ + ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", \ + MODE="0666"; + ''; + destination = "/etc/udev/rules.d/40-nintendo-controller.rules"; + }) + ]; + boot.extraModulePackages = [ + config.boot.kernelPackages.gcadapter-oc-kmod + ]; + + # to autoload at boot: + boot.kernelModules = [ + "gcadapter_oc" + ]; + }; +} diff --git a/modules/nixos/workstation/gaming/switch.nix b/modules/nixos/workstation/gaming/switch.nix new file mode 100644 index 0000000..c627d7b --- /dev/null +++ b/modules/nixos/workstation/gaming/switch.nix @@ -0,0 +1,14 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf elem; + inherit (config.ooknet.workstation) profiles; +in { + config = mkIf (elem "gaming" profiles) { + programs.ns-usbloader = { + enable = true; + }; + }; +} diff --git a/modules/nixos/workstation/options.nix b/modules/nixos/workstation/options.nix index aa01f16..da3d19a 100644 --- a/modules/nixos/workstation/options.nix +++ b/modules/nixos/workstation/options.nix @@ -4,11 +4,11 @@ in { options.ooknet.workstation = { theme = mkOption { - type = nullOr (enum ["minimal"]); + type = nullOr (enum ["minimal" "hozen"]); default = null; }; profiles = mkOption { - type = listOf (enum ["gaming" "communication" "productivity" "creative" "media"]); + type = listOf (enum ["gaming" "communication" "productivity" "creative" "media" "virtualization"]); default = []; }; environment = mkOption { @@ -21,13 +21,15 @@ in { default = "firefox"; }; terminal = mkOption { - type = enum ["foot"]; - default = "foot"; + type = enum ["foot" "ghostty"]; + default = "ghostty"; }; }; programs = { firefox.enable = mkEnableOption ""; foot.enable = mkEnableOption ""; + ghostty.enable = mkEnableOption ""; + ollama.enable = mkEnableOption ""; }; }; } diff --git a/modules/nixos/workstation/programs/default.nix b/modules/nixos/workstation/programs/default.nix index 3caa312..b8be726 100644 --- a/modules/nixos/workstation/programs/default.nix +++ b/modules/nixos/workstation/programs/default.nix @@ -3,5 +3,6 @@ ./1password.nix ./dconf.nix ./kdeconnect.nix + ./waydroid.nix ]; } diff --git a/modules/nixos/workstation/programs/waydroid.nix b/modules/nixos/workstation/programs/waydroid.nix new file mode 100644 index 0000000..45d1c3d --- /dev/null +++ b/modules/nixos/workstation/programs/waydroid.nix @@ -0,0 +1,7 @@ +{ + virtualisation = { + waydroid = { + enable = true; + }; + }; +} diff --git a/modules/nixos/workstation/services/default.nix b/modules/nixos/workstation/services/default.nix index 0dce40b..a50d475 100644 --- a/modules/nixos/workstation/services/default.nix +++ b/modules/nixos/workstation/services/default.nix @@ -3,5 +3,6 @@ ./dbus.nix ./gnome-services.nix ./geoclue.nix + ./ollama.nix ]; } diff --git a/modules/nixos/workstation/services/ollama.nix b/modules/nixos/workstation/services/ollama.nix new file mode 100644 index 0000000..cff6844 --- /dev/null +++ b/modules/nixos/workstation/services/ollama.nix @@ -0,0 +1,21 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf; + cfg = config.ooknet.workstation.programs.ollama; +in { + config = mkIf cfg.enable { + # FIXME: + # https://github.com/NixOS/nixpkgs/issues/376930 + services.ollama = { + enable = false; + acceleration = "rocm"; + rocmOverrideGfx = "10.1.0"; + environmentVariables = { + HCC_AMDGPU_TARGET = "gfx1010"; + }; + }; + }; +} diff --git a/modules/nixos/workstation/themes/default.nix b/modules/nixos/workstation/themes/default.nix index a153a13..269af8e 100644 --- a/modules/nixos/workstation/themes/default.nix +++ b/modules/nixos/workstation/themes/default.nix @@ -1,5 +1,6 @@ { imports = [ ./minimal.nix + ./hozen.nix ]; } diff --git a/modules/nixos/workstation/themes/generated-wallpaper.nix b/modules/nixos/workstation/themes/generated-wallpaper.nix index 7009f07..f1c920c 100644 --- a/modules/nixos/workstation/themes/generated-wallpaper.nix +++ b/modules/nixos/workstation/themes/generated-wallpaper.nix @@ -2,9 +2,10 @@ { pkgs, config, + hozen, }: let inherit (config.ooknet.hardware) monitors; - inherit (config.ooknet.appearance) colorscheme; + inherit (hozen) color; largest = f: xs: builtins.head (builtins.sort (a: b: a > b) (map f xs)); largestWidth = largest (x: x.width) monitors; largestHeight = largest (x: x.height) monitors; @@ -13,21 +14,17 @@ in width ? largestWidth, height ? largestHeight, logoScale ? 4, - backgroundColor ? colorscheme.palette.mantle, - logoColor1 ? colorscheme.palette.yellow, - logoColor2 ? colorscheme.palette.green, + backgroundColor ? color.layout.body, + logoColor1 ? color.green.base, + logoColor2 ? color.yellow.base, }: pkgs.stdenv.mkDerivation { - name = "generated-nix-wallpaper-${colorscheme.slug}.png"; + name = "generated-nix-wallpaper-${color.slug}.png"; src = pkgs.writeTextFile { name = "template.svg"; text = '' - - + + diff --git a/modules/nixos/workstation/themes/hozen.nix b/modules/nixos/workstation/themes/hozen.nix new file mode 100644 index 0000000..083e0d8 --- /dev/null +++ b/modules/nixos/workstation/themes/hozen.nix @@ -0,0 +1,61 @@ +{ + config, + lib, + pkgs, + hozen, + ... +}: let + inherit (lib) mkIf; + inherit (config.ooknet.workstation) theme; + generatedWallpaper = import ./generated-wallpaper.nix {inherit hozen config pkgs;} {}; +in { + config = mkIf (theme == "hozen") { + ooknet.appearance = { + fonts = { + monospace = { + bitmap = true; + package = pkgs.monocraft; + size = 18; + family = "Monocraft"; + variants = { + regular = "Monocraft:style=Medium"; + bold = "Monocraft:style=Medium"; + italic = "Monocraft:style=Medium"; + boldItalic = "Monocraft:style=Medium"; + }; + fallback = { + family = "JetBrainsMono NFM"; + variants = { + regular = "JetBrainsMono NFM:style=Regular"; + bold = "JetBrainsMono NFM:style=Bold"; + italic = "JetBrainsMono NFM:style=Italic"; + boldItalic = "JetBrainsMono NFM:style=Bold Italic"; + }; + package = pkgs.nerd-fonts.jetbrains-mono; + size = 18; + }; + }; + regular = { + family = "Fira Sans"; + variants = { + regular = "Fira Sans:style=Regular"; + bold = "Fira Sans:style=Bold"; + italic = "Fira Sans:style=Italic"; + boldItalic = "Fira Sans:style=Bold Italic"; + }; + package = pkgs.fira; + }; + }; + + cursor = { + name = "Bibata-Modern-Ice"; + package = pkgs.bibata-cursors; + size = 22; + }; + + wallpaper = { + path = "${generatedWallpaper}"; + }; + }; + }; +} diff --git a/modules/nixos/workstation/themes/minimal.nix b/modules/nixos/workstation/themes/minimal.nix index 5fd8dcc..73f3484 100644 --- a/modules/nixos/workstation/themes/minimal.nix +++ b/modules/nixos/workstation/themes/minimal.nix @@ -2,22 +2,37 @@ config, lib, pkgs, + hozen, + inputs', ... }: let inherit (lib) mkIf; inherit (config.ooknet.workstation) theme; - generatedWallpaper = import ./generated-wallpaper.nix {inherit config pkgs;} {}; + generatedWallpaper = import ./generated-wallpaper.nix {inherit hozen config pkgs;} {}; in { config = mkIf (theme == "minimal") { ooknet.appearance = { fonts = { monospace = { - family = "JetBrainsMono Nerd Font"; - package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; + package = inputs'.secrets.packages.berkeley-nerd-mono; + size = 16; + family = "BerkeleyMono Nerd Font"; + variants = { + regular = "BerkeleyMono Nerd Font:style=Regular"; + bold = "BerkeleyMono Nerd Font:style=Bold"; + italic = "BerkeleyMono Nerd Font:style=Italic"; + boldItalic = "BerkeleyMono Nerd Font:style=Bold Italic"; + }; }; regular = { - family = "Fira Sans"; package = pkgs.fira; + family = "Fira Sans"; + variants = { + regular = "Fira Sans:style=Regular"; + bold = "Fira Sans:style=Bold"; + italic = "Fira Sans:style=Italic"; + boldItalic = "Fira Sans:style=Bold Italic"; + }; }; }; @@ -30,11 +45,6 @@ in { wallpaper = { path = "${generatedWallpaper}"; }; - - colorscheme = { - name = "gruvbox-material-medium"; - variant = "dark"; - }; }; }; } diff --git a/modules/nixos/workstation/virtualization/default.nix b/modules/nixos/workstation/virtualization/default.nix new file mode 100644 index 0000000..9c7be83 --- /dev/null +++ b/modules/nixos/workstation/virtualization/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./virt-manager.nix + ]; +} diff --git a/modules/nixos/workstation/virtualization/virt-manager.nix b/modules/nixos/workstation/virtualization/virt-manager.nix new file mode 100644 index 0000000..4b43c40 --- /dev/null +++ b/modules/nixos/workstation/virtualization/virt-manager.nix @@ -0,0 +1,59 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (builtins) attrValues; + inherit (lib) mkIf elem; + inherit (config.ooknet.workstation) profiles; +in { + config = mkIf (elem "virtualization" profiles) { + environment.systemPackages = attrValues { + inherit + (pkgs) + virt-viewer + qemu_kvm + qemu + spice + spice-protocol + # for windows virtualization + win-virtio + win-spice + adwaita-icon-theme # virt-manager needs this + remmina # for rdp + ; + }; + # sets up dconf settins for qemu and add virt-manager to systemPackages + programs.virt-manager = { + enable = true; + package = pkgs.virt-manager; + }; + virtualisation = { + # allow unprivileged users to pass usb devices to vm + spiceUSBRedirection.enable = true; + + # our virtualization daemon + libvirtd = { + enable = true; + + qemu = { + # by default this uses pkgs.qemu but since i do not need to emulate aarch64 currently i use + # qemu_kvm which only supports the hosts system architecture. + package = pkgs.qemu_kvm; + + # for emulating TPM + swtpm.enable = true; + + # UEFI secure boot + ovmf = { + enable = true; + packages = [pkgs.OVMFFull.fd]; + }; + # ensure virtiofsd is accessible to all domains + vhostUserPackages = [pkgs.virtiofsd]; + }; + }; + }; + }; +} diff --git a/modules/nixos/workstation/virtualization/winlab/default.nix b/modules/nixos/workstation/virtualization/winlab/default.nix new file mode 100644 index 0000000..3bc3069 --- /dev/null +++ b/modules/nixos/workstation/virtualization/winlab/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./networking.nix + ]; +} diff --git a/modules/nixos/workstation/virtualization/winlab/networking.nix b/modules/nixos/workstation/virtualization/winlab/networking.nix new file mode 100644 index 0000000..c16ce65 --- /dev/null +++ b/modules/nixos/workstation/virtualization/winlab/networking.nix @@ -0,0 +1,30 @@ +{ + pkgs, + lib, + config, + ... +}: let + inherit (lib) mkIf elem; + inherit (config.ooknet.workstation) profiles; + winlabNetwork = pkgs.writeText "winlab-network.xml" '' + + winlab-network + fed01297-b97b-49b0-beeb-8f30bc472017 + + + + + + + + + + + ''; +in { + config = mkIf (elem "virtualization" profiles) { + systemd.tmpfiles.settings.qemuNetworks."/var/lib/libvirt/qemu/networks/winlab-network.xml"."f" = { + argument = winlabNetwork; + }; + }; +} diff --git a/outputs/default.nix b/outputs/default.nix index e662224..560febe 100644 --- a/outputs/default.nix +++ b/outputs/default.nix @@ -2,10 +2,12 @@ imports = [ ./apps.nix ./lib + ./hozen ./hosts - ./keys.nix ./pkgs ./images.nix ./devshells + ./templates + ./modules ]; } diff --git a/outputs/hosts/servers.nix b/outputs/hosts/servers.nix index 70af570..842629d 100644 --- a/outputs/hosts/servers.nix +++ b/outputs/hosts/servers.nix @@ -15,5 +15,13 @@ in { profile = "linode"; services = ["website" "forgejo"]; }; + ooksmedia = mkServer { + inherit withSystem; + system = "x86_64-linux"; + hostname = "ooksmedia"; + domain = "ooknet.org"; + type = "desktop"; + services = ["ookflix"]; + }; }; } diff --git a/outputs/hozen/default.nix b/outputs/hozen/default.nix new file mode 100644 index 0000000..f7db3fd --- /dev/null +++ b/outputs/hozen/default.nix @@ -0,0 +1,83 @@ +{ook, ...}: let + inherit (ook.lib.color.utils) mkLightColorScheme mkDarkColorScheme; + + darkScheme = mkDarkColorScheme { + slug = "gruvbox-material-dark-medium"; + neutrals = { + "50" = "dfd2b3"; + "100" = "d9c7a5"; + "150" = "d4be98"; + "200" = "c6b395"; + "250" = "b4a288"; + "300" = "a49384"; + "350" = "99897a"; + "400" = "8b7c6f"; + "450" = "7d6f64"; + "500" = "716860"; + "550" = "645f59"; + "600" = "585350"; + "650" = "4d4947"; + "700" = "3f3b3b"; + "750" = "32302f"; + "800" = "282828"; + "850" = "212121"; + "900" = "1a1a1a"; + }; + primary = "a9b665"; + red = "ea6962"; + orange = "e78a4e"; + yellow = "d8a657"; + olive = "b9b25f"; + green = "a9b665"; + teal = "89b482"; + blue = "7daea3"; + violet = "d892c1"; + purple = "d3869b"; + pink = "cf91be"; + brown = "a87757"; + }; + + lightScheme = mkLightColorScheme { + slug = "gruvbox-material-light-soft"; + neutrals = { + "50" = "f7efda"; + "100" = "f4eac8"; + "150" = "f2e5bc"; + "200" = "e7d9b1"; + "250" = "ddcca6"; + "300" = "d3c19c"; + "350" = "c5b496"; + "400" = "b7a78f"; + "450" = "a89984"; + "500" = "a08e79"; + "550" = "9a826a"; + "600" = "91785f"; + "650" = "8a7056"; + "700" = "745a44"; + "750" = "6d4e3c"; + "800" = "654735"; + "850" = "5e4131"; + "900" = "51372a"; + }; + primary = "45707a"; + red = "be4141"; # contrast 4.55 + orange = "ad540b"; # contrast 4.52 + yellow = "966208"; # contrast 4.51 + olive = "707029"; # contrast 4.51 + green = "67732b"; # contrast 4.51 + teal = "497459"; # contrast 4.67 + blue = "45707a"; # contrast 4.75 + violet = "7d6198"; # contrast 4.54 + purple = "8f5b7c"; # contrast 4.63 + pink = "925d66"; # contrast 4.6 + brown = "654735"; # contrast 7.31 + }; + style = { + color = darkScheme; + light.color = lightScheme; + dark.color = darkScheme; + }; +in { + _module.args.hozen = style; + flake.hozen = style; +} diff --git a/outputs/images.nix b/outputs/images.nix index 40293f8..8e15f51 100644 --- a/outputs/images.nix +++ b/outputs/images.nix @@ -1,10 +1,4 @@ -{ - ook, - self, - ... -}: let - inherit (ook.lib.builders) mkImage; -in { +{self, ...}: { flake.images = { ooknode = self.nixosConfigurations.ooknode.config.system.build.image; }; diff --git a/outputs/keys.nix b/outputs/keys.nix deleted file mode 100644 index 7c84285..0000000 --- a/outputs/keys.nix +++ /dev/null @@ -1,6 +0,0 @@ -let - keys = import ../secrets/keys.nix; -in { - perSystem._module.args.keys = keys; - flake.keys = keys; -} diff --git a/outputs/lib/builders.nix b/outputs/lib/builders.nix index f088b69..0c9677a 100644 --- a/outputs/lib/builders.nix +++ b/outputs/lib/builders.nix @@ -7,9 +7,9 @@ inherit (inputs) nixpkgs; inherit (lib) singleton recursiveUpdate mkDefault; inherit (builtins) concatLists; - inherit (self) keys; + inherit (self) hozen ook; + inherit (inputs.secrets.nixosModules) secrets; hm = inputs.home-manager.nixosModules.home-manager; - agenix = inputs.agenix.nixosModules.default; nixosModules = "${self}/modules/nixos"; baseModules = nixosModules + "/base"; hardwareModules = nixosModules + "/hardware"; @@ -22,7 +22,7 @@ (baseModules + "/admin.nix") (baseModules + "/ssh.nix") ]; - core = [baseModules hardwareModules consoleModules appearanceModules hm agenix]; + core = [baseModules hardwareModules consoleModules appearanceModules hm secrets]; hostModules = "${self}/hosts"; mkNixos = nixpkgs.lib.nixosSystem; @@ -44,7 +44,7 @@ mkNixos { specialArgs = recursiveUpdate { - inherit keys lib inputs self inputs' self'; + inherit hozen ook lib inputs self inputs' self'; } specialArgs; modules = concatLists [ @@ -87,27 +87,33 @@ hostname, system, type, - profile, services, + profile ? null, domain ? "", additionalModules ? [], specialArgs ? {}, }: - mkBaseSystem { - inherit withSystem hostname system type specialArgs; - role = "server"; - additionalModules = concatLists [ - (singleton { - ooknet.server = { - inherit domain services; - }; - }) - core - [(serverModules + "/profiles/${profile}")] - [serverModules] - additionalModules - ]; - }; + assert lib.assertMsg (!(type == "vm" && profile == null)) + "Profile must be specified for VM servers"; + mkBaseSystem { + inherit withSystem hostname system type specialArgs; + role = "server"; + additionalModules = concatLists [ + (singleton { + ooknet.server = { + inherit domain services; + }; + }) + core + ( + if type == "vm" + then [(serverModules + "/profiles/${profile}")] + else [(hostModules + "/${hostname}")] + ) + [serverModules] + additionalModules + ]; + }; mkImage = { profile, @@ -117,7 +123,7 @@ ... }: mkNixos { - specialArgs = {inherit keys inputs lib self;}; + specialArgs = {inherit inputs lib self;}; modules = concatLists [ (singleton { networking.hostName = hostname; diff --git a/outputs/lib/color/check.nix b/outputs/lib/color/check.nix new file mode 100644 index 0000000..d76738e --- /dev/null +++ b/outputs/lib/color/check.nix @@ -0,0 +1,113 @@ +{lib, ...}: let + inherit (lib) toInt all min max; + inherit (builtins) mapAttrs elemAt isInt isFloat match getAttr hasAttr; + + # basic checks + range = a: b: v: (v <= max a b) && (v >= min a b); + number = v: isInt v || isFloat v; + unary = range 0.0 1.0; + hue = range 0.0 360.0; + + # type checking + hex = { + string = color: let + hexPatternWithHash = match "#[[:xdigit:]]{6}" color; + hexPatternNoHash = match "[[:xdigit:]]{6}" color; + isValid = hexPatternWithHash != null || hexPatternNoHash != null; + in + if !isValid + then abort "Invalid hex color format: ${color}" + else color; + + set = color: let + hasAttributes = all (k: hasAttr k color) ["r" "g" "b"]; + validPattern = all (k: let + v = getAttr k color; + in + match "[[:xdigit:]]{2}" v != null) ["r" "g" "b"]; + in + if !(hasAttributes && validPattern) + then abort "Invalid Hex values: r=${toString color.r}, g=${toString color.g}, b=${toString color.b}" + else color; + }; + + rgb = { + string = color: let + rgbPattern = match "([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3})" color; + toNum = str: let + num = toInt str; + in + num != null && range 0 255 num; + isValid = rgbPattern != null && all toNum rgbPattern; + in + if !isValid + then abort "Invalid RGB string: ${color}" + else color; + + set = color: let + hasAttributes = all (k: hasAttr k color) ["r" "g" "b"]; + validRanges = all ( + k: let + v = getAttr k color; + in + number v && range 0 255 v + ) ["r" "g" "b"]; + in + if !(hasAttributes && validRanges) + then abort "Invalid RGB set: r=${toString color.r}, g=${toString color.g}, b=${toString color.b}" + else color; + }; + hsl = { + string = color: let + hslPattern = match "([0-9]{1,3}),[ ]*([0-9]{1,3})%,[ ]*([0-9]{1,3})%" color; + # Convert matched values to numbers and check ranges + validateHSL = groups: let + h = toInt (elemAt groups 0); + s = toInt (elemAt groups 1); + l = toInt (elemAt groups 2); + in + h + != null + && h >= 0 + && h <= 360 + && s != null + && s >= 0 + && s <= 100 + && l != null + && l >= 0 + && l <= 100; + isValid = hslPattern != null && validateHSL hslPattern; + in + if !isValid + then abort "Invalid HSL string: ${color} (expected format: h(0-360),s(0-100%),l(0-100%))" + else color; + + set = color: let + hasAttributes = all (k: hasAttr k color) ["h" "s" "l"]; + validRanges = + color.h + >= 0 + && color.h <= 360 + && color.s >= 0 + && color.s <= 1.0 + && color.l >= 0 + && color.l <= 1.0; + in + if !(hasAttributes && validRanges) + then + abort '' + Invalid HSL set: h=${toString color.h}, s=${toString color.s}, l=${toString color.l} + Expected: + h: 0-360 + s: 0.0-1.0 + l: 0.0-1.0 + '' + else color; + }; + + # validate neutral hex values + neutrals = {neutrals, ...}: + mapAttrs (_: value: + hex.string value) + neutrals; +in {inherit neutrals range number unary hue hex rgb hsl;} diff --git a/outputs/lib/color/translate.nix b/outputs/lib/color/translate.nix new file mode 100644 index 0000000..9ad22a8 --- /dev/null +++ b/outputs/lib/color/translate.nix @@ -0,0 +1,207 @@ +{ + math, + types, + lib, +}: let + inherit (builtins) substring; + inherit (lib) min max; + hex = { + toSet = string: + types.hex.set { + r = substring 0 2 string; + g = substring 2 2 string; + b = substring 4 2 string; + }; + toRGB = let + dictionary = { + "0" = 0; + "1" = 1; + "2" = 2; + "3" = 3; + "4" = 4; + "5" = 5; + "6" = 6; + "7" = 7; + "8" = 8; + "9" = 9; + "a" = 10; + "b" = 11; + "c" = 12; + "d" = 13; + "e" = 14; + "f" = 15; + "A" = 10; + "B" = 11; + "C" = 12; + "D" = 13; + "E" = 14; + "F" = 15; + }; + in { + # Converts a hex pair directly to RGB value (0-255) + pair = hexPair: let + high = dictionary.${substring 0 1 hexPair}; + low = dictionary.${substring 1 1 hexPair}; + in + (high * 16) + low; + + # Converts a hex set to RGB set + set = hexSet: + types.rgb.set { + r = hex.toRGB.pair hexSet.r; + g = hex.toRGB.pair hexSet.g; + b = hex.toRGB.pair hexSet.b; + }; + string = hexStr: let + rgbSet = hex.toRGB.set (hex.toSet hexStr); + in + types.rgb.string rgbSet.r rgbSet.g rgbSet.b; + }; + toHSL = { + set = hexStr: let + rgbSet = hex.toRGB.set (hex.toSet hexStr); + in + rgb.toHSL.set rgbSet; + + string = hexStr: let + hslSet = hex.toHSL.set hexStr; + in + types.hsl.string hslSet.h hslSet.s hslSet.l; + }; + }; + rgb = { + toHex = { + set = rgbSet: let + # Convert decimal to two-digit hex + toHexPair = num: let + hex = lib.toLower (lib.toHexString num); + # Pad with leading zero if single digit + padded = + if (builtins.stringLength hex) == 1 + then "0${hex}" + else hex; + in + padded; + in + types.hex.set { + r = toHexPair rgbSet.r; + g = toHexPair rgbSet.g; + b = toHexPair rgbSet.b; + }; + + string = rgbStr: let + hexSet = rgb.toHex.set rgbStr; + in + types.hex.string hexSet.r hexSet.g hexSet.b; + }; + toHSL = { + set = rgbSet: let + # Normalize RGB values to 0-1 range + r = rgbSet.r / 255.0; + g = rgbSet.g / 255.0; + b = rgbSet.b / 255.0; + + # Find min, max and delta + c_max = max (max r g) b; + c_min = min (min r g) b; + delta = c_max - c_min; + + # Calculate HSL values + h = + if delta == 0.0 + then 0.0 + else if c_max == r + then 60.0 * (math.mod ((g - b) / delta) 6) + else if c_max == g + then 60.0 * ((b - r) / delta + 2) + else 60.0 * ((r - g) / delta + 4); + + l = (c_max + c_min) / 2; + + s = + if delta == 0.0 + then 0.0 + else delta / (1 - (math.abs (2 * l - 1))); + in + types.hsl.set { + inherit h; + s = math.clamp 0.0 1.0 s; + l = math.clamp 0.0 1.0 l; + }; + + string = rgbStr: let + hslSet = rgb.toHSL.set (hex.toRGB.set (hex.toSet rgbStr)); + in + types.hsl.string hslSet.h hslSet.s hslSet.l; + }; + }; + hsl = { + toRGB = { + set = hslSet: let + inherit (hslSet) h s l; + + # Calculate chroma + c = (1 - (math.abs (2 * l - 1))) * s; + # Calculate h prime (h') + hp = h / 60.0; + # Calculate x + x = c * (1 - math.abs ((math.mod hp 2) - 1)); + # Calculate m + m = l - c / 2; + + # Get initial RGB values based on h' + rgb' = + if hp <= 1 + then { + r = c; + g = x; + b = 0; + } + else if hp <= 2 + then { + r = x; + g = c; + b = 0; + } + else if hp <= 3 + then { + r = 0; + g = c; + b = x; + } + else if hp <= 4 + then { + r = 0; + g = x; + b = c; + } + else if hp <= 5 + then { + r = x; + g = 0; + b = c; + } + else { + r = c; + g = 0; + b = x; + }; + # Final RGB values + in + types.rgb.set { + r = math.round ((rgb'.r + m) * 255); + g = math.round ((rgb'.g + m) * 255); + b = math.round ((rgb'.b + m) * 255); + }; + + string = hslStr: let + rgbSet = hsl.toRGB.set hslStr; + in + types.rgb.string rgbSet.r rgbSet.g rgbSet.b; + }; + toHex = { + set = {}; + string = color: color; + }; + }; +in {inherit hex hsl rgb;} diff --git a/outputs/lib/color/types.nix b/outputs/lib/color/types.nix new file mode 100644 index 0000000..c3b9806 --- /dev/null +++ b/outputs/lib/color/types.nix @@ -0,0 +1,50 @@ +{ + check, + math, +}: let + inherit (math) round; + hex = { + set = { + r, + g, + b, + }: let + attrs = {inherit r g b;}; + in + check.hex.set attrs; + + string = r: g: b: let + str = "${r}${g}${b}"; + in + check.hex.string str; + }; + + rgb = { + string = r: g: b: let + str = "${toString r},${toString g},${toString b}"; + in + check.rgb.string str; + set = { + r, + g, + b, + }: let + attrs = {inherit r g b;}; + in + check.rgb.set attrs; + }; + hsl = { + string = h: s: l: let + str = "${toString (round h)}, ${toString (round (s * 100))}%, ${toString (round (l * 100))}%"; + in + check.hsl.string str; + set = { + h, + s, + l, + }: let + attrs = {inherit h s l;}; + in + check.hsl.set attrs; + }; +in {inherit hex hsl rgb;} diff --git a/outputs/lib/color/utils.nix b/outputs/lib/color/utils.nix new file mode 100644 index 0000000..47cff82 --- /dev/null +++ b/outputs/lib/color/utils.nix @@ -0,0 +1,322 @@ +{ + math, + types, + translate, + check, +}: let + # Base modification functions + modifyHSL = hexStr: modifications: let + hslSet = translate.hex.toHSL.set hexStr; + newHSL = types.hsl.set { + inherit (hslSet) h; + l = + if modifications ? absoluteL + then modifications.l + else math.clamp 0.0 1.0 (hslSet.l + (modifications.l or 0.0)); + s = + if modifications ? absoluteS + then modifications.l + else math.clamp 0.0 1.0 (hslSet.s + (modifications.s or 0.0)); + }; + rgbSet = translate.hsl.toRGB.set newHSL; + in + translate.rgb.toHex.string rgbSet; + + lighten = amount: hexStr: + modifyHSL hexStr {l = amount / 100.0;}; + + darken = amount: hexStr: + modifyHSL hexStr {l = (amount * -1) / 100.0;}; + + saturate = amount: hexStr: + modifyHSL hexStr {s = amount / 100.0;}; + + desaturate = amount: hexStr: + modifyHSL hexStr {s = (amount * -1) / 100.0;}; + + absoluteLum = amount: hexStr: + modifyHSL hexStr { + absoluteL = true; + l = amount / 100.0; + }; + + mkDarkColorScale = base: { + hard4 = lighten 12 base; + hard3 = lighten 9 base; + hard2 = lighten 6 base; + hard1 = lighten 3 base; + inherit base; + soft1 = darken 3 base; + soft2 = darken 6 base; + soft3 = darken 9 base; + soft4 = darken 12 base; + }; + + mkLightColorScale = base: { + soft4 = lighten 12 base; + soft3 = lighten 9 base; + soft2 = lighten 6 base; + soft1 = lighten 3 base; + inherit base; + hard1 = darken 3 base; + hard2 = darken 6 base; + hard3 = darken 9 base; + hard4 = darken 12 base; + }; + + mkAlert = color: { + fg = absoluteLum 19 color; + bg = absoluteLum 79 color; + border = color; + base = color; + }; + + # core color scheme generator + mkColorScheme = { + type ? "dark", + slug, + neutrals ? {}, + primary, + red, + orange, + yellow, + olive, + green, + teal, + blue, + violet, + purple, + pink, + brown, + } @ args: let + # Select scale function based on theme type + mkColorScale = + if type == "dark" + then mkDarkColorScale + else mkLightColorScale; + + validNeutrals = check.neutrals args; + + # Generate color scales + colors = { + red = mkColorScale args.red; + orange = mkColorScale args.orange; + yellow = mkColorScale args.yellow; + olive = mkColorScale args.olive; + green = mkColorScale args.green; + teal = mkColorScale args.teal; + blue = mkColorScale args.blue; + violet = mkColorScale args.violet; + purple = mkColorScale args.purple; + pink = mkColorScale args.pink; + brown = mkColorScale args.brown; + }; + + # Theme-specific configurations + theme = + if type == "dark" + then { + semantic = { + layout = { + body = args.neutrals."750"; + header = args.neutrals."800"; + footer = args.neutrals."800"; + menu = args.neutrals."800"; + selection = args.neutrals."650"; + dimmed = args.neutrals."850"; + }; + border = { + base = args.neutrals."650"; + active = args.neutrals."600"; + inactive = args.neutrals."700"; + }; + typography = { + text = args.neutrals."150"; + text-bright = args.neutrals."100"; + subtext = args.neutrals."300"; + contrast-text = args.neutrals."800"; + }; + }; + secondary = { + hard4 = args.neutrals."300"; + hard3 = args.neutrals."350"; + hard2 = args.neutrals."400"; + hard1 = args.neutrals."450"; + base = args.neutrals."500"; + soft1 = args.neutrals."550"; + soft2 = args.neutrals."600"; + soft3 = args.neutrals."650"; + soft4 = args.neutrals."700"; + }; + base00 = args.neutrals."800"; + base01 = args.neutrals."700"; + base02 = args.neutrals."600"; + base03 = args.neutrals."450"; + base04 = args.neutrals."300"; + base05 = args.neutrals."150"; + base06 = args.neutrals."100"; + base07 = args.neutrals."50"; + base10 = args.neutrals."850"; + base11 = args.neutrals."900"; + } + else { + semantic = { + layout = { + body = args.neutrals."50"; + header = args.neutrals."150"; + footer = args.neutrals."150"; + menu = args.neutrals."150"; + selection = args.neutrals."300"; + dimmed = args.neutrals."200"; + }; + border = { + base = args.neutrals."800"; + active = args.neutrals."800"; + inactive = args.neutrals."300"; + }; + typography = { + text = args.neutrals."800"; + text-bright = args.neutrals."850"; + subtext = args.neutrals."600"; + text-contrast = args.neutrals."50"; + }; + }; + secondary = { + hard4 = args.neutrals."400"; + hard3 = args.neutrals."350"; + hard2 = args.neutrals."300"; + hard1 = args.neutrals."250"; + base = args.neutrals."200"; + soft1 = args.neutrals."150"; + soft2 = args.neutrals."100"; + soft3 = args.neutrals."50"; + soft4 = args.neutrals."50"; + }; + base00 = args.neutrals."150"; + base01 = args.neutrals."250"; + base02 = args.neutrals."450"; + base03 = args.neutrals."550"; + base04 = args.neutrals."650"; + base05 = args.neutrals."800"; + base06 = args.neutrals."850"; + base07 = args.neutrals."900"; + base10 = args.neutrals."100"; + base11 = args.neutrals."50"; + }; + in { + inherit slug; + # Common structure for both themes + neutrals = { + inherit + (validNeutrals) + "50" + "100" + "150" + "200" + "250" + "300" + "350" + "400" + "450" + "500" + "550" + "600" + "650" + "700" + "750" + "800" + "850" + "900" + ; + }; + + error = mkAlert args.red; + warning = mkAlert args.yellow; + success = mkAlert args.green; + note = mkAlert args.blue; + tip = mkAlert args.teal; + + inherit + (colors) + red + orange + yellow + olive + green + teal + blue + violet + purple + pink + brown + ; + + primary = mkColorScale args.primary; + + inherit (theme) secondary; + inherit (theme.semantic) layout border typography; + + syntax = { + string = args.green; + number = args.purple; + float = args.purple; + boolean = args.purple; + type = args.yellow; + structure = args.orange; + statement = args.red; + label = args.orange; + operator = args.orange; + identifier = args.blue; + function = args.green; + storageClass = args.orange; + constant = args.teal; + exception = args.red; + preproc = args.purple; + include = args.purple; + define = args.purple; + macro = args.teal; + preCondit = args.purple; + special = args.yellow; + specialChar = args.yellow; + comment = "${theme.semantic.typography.subtext}"; + todo = args.purple; + tag = args.teal; + }; + + inherit + (theme) + base00 + base01 + base02 + base03 + base04 + base05 + base06 + base07 + base10 + base11 + ; + base08 = args.red; + base09 = args.orange; + base0A = args.yellow; + base0B = args.green; + base0C = args.teal; + base0D = args.blue; + base0E = args.purple; + base0F = args.brown; + base12 = "${colors.red.hard2}"; + base13 = "${colors.yellow.hard2}"; + base14 = "${colors.green.hard2}"; + base15 = "${colors.teal.hard2}"; + base16 = "${colors.blue.hard2}"; + base17 = "${colors.purple.hard2}"; + }; + + # wrappers + mkDarkColorScheme = args: mkColorScheme (args // {type = "dark";}); + mkLightColorScheme = args: mkColorScheme (args // {type = "light";}); +in { + inherit lighten darken saturate desaturate; + inherit mkDarkColorScale mkLightColorScale; + inherit mkColorScheme mkDarkColorScheme mkLightColorScheme; +} diff --git a/outputs/lib/containers.nix b/outputs/lib/containers.nix new file mode 100644 index 0000000..69c0906 --- /dev/null +++ b/outputs/lib/containers.nix @@ -0,0 +1,76 @@ +{lib, ...}: let + inherit (builtins) isBool; + inherit (lib) toUpper optionalAttrs mapAttrs' nameValuePair; + + # convert homepage attributes to labels + mkHomepageLabels = { + name, + domain, + group, + widget ? {}, + ... + } @ args: let + # common homepage labels + commonLabels = mapAttrs' (n: v: nameValuePair "homepage.${n}" (toString v)) { + inherit name group; + icon = "${name}.svg"; + href = domain; + description = args.description or name; + }; + + # process widget attributes, flattening them into label format + processWidget = attrs: + mapAttrs' (n: v: + nameValuePair "homepage.widget.${n}" ( + if isBool v + then + if v + then "true" + else "false" + else toString v + )) + attrs; + in + commonLabels // (processWidget widget); + + mkContainerLabel = {name, ...} @ args: let + homepage = args.homepage or {}; + baseWidget = homepage.widget or {}; + in + # traefik router labels + (optionalAttrs (args ? domain) { + "traefik.enable" = "true"; + "traefik.http.routers.${name}.rule" = "Host(`${args.domain}`)"; + "traefik.http.routers.${name}.entrypoints" = "websecure"; + "traefik.http.routers.${name}.tls" = "true"; + "traefik.http.routers.${name}.tls.certresolver" = "letsencrypt"; + }) + # traefik service labels + // (optionalAttrs ((args ? domain) && (args ? port)) { + "traefik.http.services.${name}.loadbalancer.server.port" = toString args.port; + }) + # homepage labels + // (optionalAttrs (args ? homepage) (mkHomepageLabels { + inherit name; + domain = "https://${args.domain}"; + group = args.homepage.group or name; + widget = + baseWidget + // { + type = name; + url = "https://${args.domain}"; + key = "{{HOMEPAGE_FILE_${toUpper name}}}"; + }; + })); + + mkContainerEnvironment = user: group: { + PUID = toString user; + PGID = toString group; + # TODO: I dont want to hard code this + TZ = "Antarctica/Macquarie"; + }; + + mkContainerPort = port: "${toString port}:${toString port}"; +in { + inherit mkContainerLabel mkContainerEnvironment mkContainerPort; +} diff --git a/outputs/lib/default.nix b/outputs/lib/default.nix index d458ab7..3991faf 100644 --- a/outputs/lib/default.nix +++ b/outputs/lib/default.nix @@ -2,13 +2,33 @@ lib, self, inputs, - pkgs, + config, ... }: let - # My person functions + # my scuffed lib ook-lib = { builders = import ./builders.nix {inherit self lib inputs;}; - mkNeovim = import ./mkNeovim.nix {inherit inputs;}; + math = import ./math.nix {inherit lib;}; + container = import ./containers.nix {inherit lib config;}; + services = import ./services.nix {inherit lib;}; + color = let + check = import ./color/check.nix {inherit lib;}; + types = import ./color/types.nix { + inherit (ook-lib) math; + inherit check; + }; + translate = import ./color/translate.nix { + inherit lib; + inherit (ook-lib) math; + inherit types; + }; + utils = import ./color/utils.nix { + inherit (ook-lib) math; + inherit check types translate; + }; + in { + inherit check types translate utils; + }; }; in { _module.args.ook.lib = ook-lib; diff --git a/outputs/lib/math.nix b/outputs/lib/math.nix new file mode 100644 index 0000000..ae66b6f --- /dev/null +++ b/outputs/lib/math.nix @@ -0,0 +1,46 @@ +{lib}: let + inherit (lib) min max; + inherit (builtins) floor ceil; + + # basic math functions + # credits to github:xddxdd/nix-math + + abs = x: + if x < 0 + then 0 - x + else x; + + clamp = a: b: v: min (max v (min a b)) (max a b); + + round = x: + if (x - floor x) < 0.5 + then floor x + else ceil x; + + hasFraction = x: let + splitted = lib.splitString "." (builtins.toString x); + in + builtins.length splitted >= 2 && builtins.length (builtins.filter (ch: ch != "0") (lib.stringToCharacters (builtins.elemAt splitted 1))) > 0; + + div = a: b: let + divideExactly = !(hasFraction (1.0 * a / b)); + offset = + if divideExactly + then 0 + else (0 - 1); + in + if b < 0 + then offset - div a (0 - b) + else if a < 0 + then offset - div (0 - a) b + else floor (1.0 * a / b); + + mod = a: b: + if b < 0 + then 0 - mod (0 - a) (0 - b) + else if a < 0 + then mod (b - mod (0 - a) b) b + else a - b * (div a b); +in { + inherit round mod abs hasFraction clamp; +} diff --git a/outputs/lib/mkNeovim.nix b/outputs/lib/mkNeovim.nix deleted file mode 100644 index 951d4f0..0000000 --- a/outputs/lib/mkNeovim.nix +++ /dev/null @@ -1,12 +0,0 @@ -{inputs, ...}: let - inherit (inputs.nvf.lib) neovimConfiguration; - - mkNeovim = pkgs: modules: - (neovimConfiguration { - inherit pkgs; - extraSpecialArgs = {inherit inputs;}; - inherit modules; - }) - .neovim; -in - mkNeovim diff --git a/outputs/lib/services.nix b/outputs/lib/services.nix new file mode 100644 index 0000000..a0dedf6 --- /dev/null +++ b/outputs/lib/services.nix @@ -0,0 +1,24 @@ +{lib, ...}: let + inherit (lib) recursiveUpdate; + mkGraphicalService = recursiveUpdate { + Unit = { + After = ["graphical-session.target"]; + PartOf = ["graphical-session.target"]; + }; + Install.WantedBy = ["graphical-session.target"]; + }; + + mkTrayService = exec: { + Unit = { + Requires = ["tray.target"]; + After = ["graphical-session-pre.target" "tray.target"]; + PartOf = ["graphical-session.target"]; + }; + Service = { + ExecStart = exec; + }; + Install = {WantedBy = ["graphical-session.target"];}; + }; +in { + inherit mkGraphicalService mkTrayService; +} diff --git a/outputs/modules/default.nix b/outputs/modules/default.nix new file mode 100644 index 0000000..73b1132 --- /dev/null +++ b/outputs/modules/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./home-manager + ]; +} diff --git a/outputs/modules/home-manager/default.nix b/outputs/modules/home-manager/default.nix new file mode 100644 index 0000000..4304d29 --- /dev/null +++ b/outputs/modules/home-manager/default.nix @@ -0,0 +1,5 @@ +{ + flake.homeManagerModules = { + vale = import ./vale; + }; +} diff --git a/outputs/modules/home-manager/vale/default.nix b/outputs/modules/home-manager/vale/default.nix new file mode 100644 index 0000000..8b26b1e --- /dev/null +++ b/outputs/modules/home-manager/vale/default.nix @@ -0,0 +1,119 @@ +{ + lib, + pkgs, + config, + ... +}: let + inherit (lib) filterAttrs mapAttrs mkEnableOption mkOption mkIf; + inherit (lib.generators) toINIWithGlobalSection; + inherit (lib.types) attrsOf submodule listOf str enum package nullOr; + + filterNullRec = let + # helper to check if a value should be kept + isNonNull = value: + if builtins.isAttrs value + then filterNullRec value != {} + else value != null; + in + attrs: + filterAttrs + (_: isNonNull) + (mapAttrs ( + name: value: + if builtins.isAttrs value + then filterNullRec value + else value + ) + attrs); + + listToStr = list: builtins.concatStringsSep "," list; + availableStyles = [ + "alex" + "google" + "joblint" + "proselint" + "write-good" + "readability" + "microsoft" + ]; + formatOptions = submodule { + freeformType = attrsOf str; + options = { + BasedOnStyles = mkOption { + type = nullOr (listOf str); + default = null; + apply = listToStr; + }; + BlockIgnores = mkOption { + type = nullOr str; + default = null; + }; + TokenIgnores = mkOption { + type = nullOr str; + default = null; + }; + CommentDelimiters = mkOption { + type = nullOr str; + default = null; + }; + Transform = mkOption { + type = nullOr str; + default = null; + }; + }; + }; + + cfg = config.programs.vale; +in { + options.programs.vale = { + enable = mkEnableOption "Enable vale linter"; + package = mkOption { + type = package; + default = pkgs.vale; + }; + styles = mkOption { + type = listOf (enum availableStyles); + default = []; + description = "Style packages to include."; + }; + globalSettings = { + MinAlertLevel = mkOption { + type = enum [ + "suggestion" + "warning" + "error" + ]; + default = "suggestion"; + description = "Set the minimum alert level that Vale will report."; + }; + IgnoredScopes = mkOption { + type = nullOr (listOf str); + default = null; + description = "Specifies inline-level HTML tags to ignore."; + apply = v: + if v != null + then listToStr + else null; + }; + }; + formatSettings = mkOption { + type = nullOr (attrsOf formatOptions); + default = null; + }; + }; + config = mkIf cfg.enable { + home.packages = [ + (cfg.package.withStyles ( + styles: + map (name: styles.${name}) config.programs.vale.styles + )) + ]; + xdg.configFile."vale/.vale.ini".text = toINIWithGlobalSection {} { + globalSection = filterNullRec cfg.globalSettings; + sections = + if cfg.formatSettings != null + then filterNullRec cfg.formatSettings + else {}; + }; + }; +} diff --git a/outputs/pkgs/caddy-with-cloudflare/default.nix b/outputs/pkgs/caddy-with-cloudflare/default.nix new file mode 100644 index 0000000..2957fb5 --- /dev/null +++ b/outputs/pkgs/caddy-with-cloudflare/default.nix @@ -0,0 +1,45 @@ +{ + buildGoModule, + cacert, + go, + lib, + stdenv, + xcaddy, + caddy, +}: +caddy.override { + buildGoModule = args: + buildGoModule (args + // { + src = stdenv.mkDerivation rec { + pname = "caddy-using-xcaddy-${xcaddy.version}"; + inherit (caddy) version; + dontUnpack = true; + dontFixup = true; + nativeBuildInputs = [cacert go]; + plugins = [ + "github.com/WeidiDeng/caddy-cloudflare-ip" + ]; + configurePhase = '' + export GOCACHE=$TMPDIR/go-cache + export GOPATH="$TMPDIR/go" + export XCADDY_SKIP_BUILD=1 + ''; + buildPhase = '' + ${xcaddy}/bin/xcaddy build "${caddy.src.rev}" ${ + lib.concatMapStringsSep " " (plugin: "--with ${plugin}") plugins + } + cd buildenv* + go mod vendor + ''; + installPhase = '' + cp -r --reflink=auto . $out + ''; + outputHash = "sha256-7FlCaHLuyESq+0YAkud7y83hY4oow7omJPTVVweEnJI="; + outputHashMode = "recursive"; + }; + subPackages = ["."]; + ldflags = ["-s" "-w"]; + vendorHash = null; + }); +} diff --git a/outputs/pkgs/default.nix b/outputs/pkgs/default.nix index 7290bf9..bbf6c24 100644 --- a/outputs/pkgs/default.nix +++ b/outputs/pkgs/default.nix @@ -1,16 +1,39 @@ -{ook, ...}: { +{ + inputs, + lib, + hozen, + ... +}: { perSystem = {pkgs, ...}: let - inherit (ook.lib) mkNeovim; - ook-vim-config = import ./ook-vim; - inherit (pkgs) callPackage; + inherit (pkgs) callPackage qt6Packages; + + projectPlus = { + fpp-config = callPackage ./project-plus/fpp-config.nix {}; + fpp-launcher = callPackage ./project-plus/fpp-launcher.nix {}; + fpp-sd = callPackage ./project-plus/fpp-sd.nix {}; + package = qt6Packages.callPackage ./project-plus { + inherit (projectPlus) fpp-config; + }; + }; in { packages = { - repopack = callPackage ./repopack {}; + repomix = callPackage ./repomix {}; live-buds-cli = callPackage ./live-buds-cli {}; - instawow-tsm = callPackage ./instawow/plugins/tsm.nix {}; website = callPackage ./website {}; + caddy-with-cloudflare = callPackage ./caddy-with-cloudflare {}; + wii-u-gc-adapter = callPackage ./wii-u-gc-adapter {}; + ghostty-shaders = callPackage ./ghostty-shaders {}; + ook-vim = callPackage ./ook-vim {inherit inputs pkgs lib hozen;}; - ook-vim = mkNeovim pkgs [ook-vim-config]; + inherit (projectPlus) fpp-config fpp-launcher fpp-sd; + project-plus = projectPlus.package; + + # disable spotify-player images due to jank with zellij + # put it here so it gets cached + spotify-player = pkgs.spotify-player.override { + withImage = false; + withSixel = false; + }; }; }; } diff --git a/outputs/pkgs/ghostty-shaders/default.nix b/outputs/pkgs/ghostty-shaders/default.nix new file mode 100644 index 0000000..8bd111f --- /dev/null +++ b/outputs/pkgs/ghostty-shaders/default.nix @@ -0,0 +1,18 @@ +{ + fetchFromGitHub, + stdenvNoCC, + ... +}: +stdenvNoCC.mkDerivation { + name = "ghostty-shaders"; + src = fetchFromGitHub { + owner = "m-ahdal"; + repo = "ghostty-shaders"; + rev = "ec29c83d81ebe7e9ca9250b3c799a2d700c1cca8"; + sha256 = "sha256-8D0H13JzCTzgzjzjERQG8ruayeHn1CPcRsd+KtC6nj4="; + }; + installPhase = '' + mkdir -p $out + mv *.glsl $out + ''; +} diff --git a/outputs/pkgs/instawow/default.nix b/outputs/pkgs/instawow/default.nix deleted file mode 100644 index 9584fab..0000000 --- a/outputs/pkgs/instawow/default.nix +++ /dev/null @@ -1,54 +0,0 @@ -# Credit github:seirl -# -{ - lib, - python3, - fetchFromGitHub, - plugins ? [], -}: -python3.pkgs.buildPythonApplication rec { - pname = "instawow"; - version = "4.7.0"; - pyproject = true; - - src = fetchFromGitHub { - owner = "layday"; - repo = pname; - rev = "refs/tags/v${version}"; - sha256 = "sha256-tk/Lugjdzufl8VPcpj7R2q81SBE/+KtS3VhsXQ2VKZM="; - }; - - extras = []; # Disable GUI, most dependencies are not packaged. - - nativeBuildInputs = with python3.pkgs; [ - hatchling - hatch-vcs - ]; - propagatedBuildInputs = with python3.pkgs; - [ - aiohttp - aiohttp-client-cache - attrs - cattrs - click - diskcache - iso8601 - loguru - packaging - pluggy - prompt-toolkit - rapidfuzz - truststore - typing-extensions - yarl - ] - ++ plugins; - - meta = with lib; { - homepage = "https://github.com/layday/instawow"; - description = "World of Warcraft add-on manager CLI and GUI"; - mainProgram = "instawow"; - license = licenses.gpl3; - maintainers = with maintainers; [seirl]; - }; -} diff --git a/outputs/pkgs/instawow/plugins/tsm.nix b/outputs/pkgs/instawow/plugins/tsm.nix deleted file mode 100644 index c26068a..0000000 --- a/outputs/pkgs/instawow/plugins/tsm.nix +++ /dev/null @@ -1,43 +0,0 @@ -# Credit github:seirl -# -{ - lib, - python3, - fetchFromGitHub, - instawow, -}: let - inherit (builtins) attrValues; -in - python3.pkgs.buildPythonPackage rec { - pname = "instawow-tsm"; - version = "72edf2ba3850eaaa5041d5aa1f55166aeee81409"; - - src = fetchFromGitHub { - owner = "seirl"; - repo = "instawow-tsm"; - rev = version; - sha256 = "sha256-+ojxVwPOfy3/3/raROEDS5pWCONAiALCdg7li+K6ZjI="; - }; - - pythonRemoveDeps = [ - "instawow" # Reverse the dependency - ]; - doCheck = false; # tests require dependencies - - nativeBuildInputs = [python3.pkgs.setuptools]; - propagatedBuildInputs = attrValues { - inherit - (python3.pkgs) - aiohttp - click - loguru - ; - }; - - meta = with lib; { - homepage = "https://github.com/seirl/instawow-tsm"; - description = "Instawow plugin for TradeSkillMaster"; - license = lib.licenses.gpl3; - maintainers = with maintainers; [seirl]; - }; - } diff --git a/outputs/pkgs/ook-vim/config/default.nix b/outputs/pkgs/ook-vim/config/default.nix new file mode 100644 index 0000000..3fe173b --- /dev/null +++ b/outputs/pkgs/ook-vim/config/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ./settings.nix + ./opts.nix + ./theme.nix + ./globals.nix + ./plugins + ]; +} diff --git a/outputs/pkgs/ook-vim/config/globals.nix b/outputs/pkgs/ook-vim/config/globals.nix new file mode 100644 index 0000000..74fcdc5 --- /dev/null +++ b/outputs/pkgs/ook-vim/config/globals.nix @@ -0,0 +1,6 @@ +{ + vim.globals = { + editorconfig = true; + mapleader = " "; + }; +} diff --git a/outputs/pkgs/ook-vim/config/opts.nix b/outputs/pkgs/ook-vim/config/opts.nix new file mode 100644 index 0000000..6be19b6 --- /dev/null +++ b/outputs/pkgs/ook-vim/config/opts.nix @@ -0,0 +1,9 @@ +{ + vim = { + options = { + tabstop = 2; + shiftwidth = 2; + autoindent = true; + }; + }; +} diff --git a/outputs/pkgs/ook-vim/plugins/cmp.nix b/outputs/pkgs/ook-vim/config/plugins/cmp.nix similarity index 100% rename from outputs/pkgs/ook-vim/plugins/cmp.nix rename to outputs/pkgs/ook-vim/config/plugins/cmp.nix diff --git a/outputs/pkgs/ook-vim/plugins/comments.nix b/outputs/pkgs/ook-vim/config/plugins/comments.nix similarity index 100% rename from outputs/pkgs/ook-vim/plugins/comments.nix rename to outputs/pkgs/ook-vim/config/plugins/comments.nix diff --git a/outputs/pkgs/ook-vim/plugins/default.nix b/outputs/pkgs/ook-vim/config/plugins/default.nix similarity index 93% rename from outputs/pkgs/ook-vim/plugins/default.nix rename to outputs/pkgs/ook-vim/config/plugins/default.nix index a1a72f6..6c6970f 100644 --- a/outputs/pkgs/ook-vim/plugins/default.nix +++ b/outputs/pkgs/ook-vim/config/plugins/default.nix @@ -11,5 +11,6 @@ ./languages ./statusline.nix ./snippets.nix + ./notes.nix ]; } diff --git a/outputs/pkgs/ook-vim/plugins/filetree.nix b/outputs/pkgs/ook-vim/config/plugins/filetree.nix similarity index 100% rename from outputs/pkgs/ook-vim/plugins/filetree.nix rename to outputs/pkgs/ook-vim/config/plugins/filetree.nix diff --git a/outputs/pkgs/ook-vim/plugins/git.nix b/outputs/pkgs/ook-vim/config/plugins/git.nix similarity index 100% rename from outputs/pkgs/ook-vim/plugins/git.nix rename to outputs/pkgs/ook-vim/config/plugins/git.nix diff --git a/outputs/pkgs/ook-vim/plugins/languages/bash.nix b/outputs/pkgs/ook-vim/config/plugins/languages/bash.nix similarity index 100% rename from outputs/pkgs/ook-vim/plugins/languages/bash.nix rename to outputs/pkgs/ook-vim/config/plugins/languages/bash.nix diff --git a/outputs/pkgs/ook-vim/plugins/languages/css.nix b/outputs/pkgs/ook-vim/config/plugins/languages/css.nix similarity index 100% rename from outputs/pkgs/ook-vim/plugins/languages/css.nix rename to outputs/pkgs/ook-vim/config/plugins/languages/css.nix diff --git a/outputs/pkgs/ook-vim/plugins/languages/default.nix b/outputs/pkgs/ook-vim/config/plugins/languages/default.nix similarity index 85% rename from outputs/pkgs/ook-vim/plugins/languages/default.nix rename to outputs/pkgs/ook-vim/config/plugins/languages/default.nix index a87b632..78552be 100644 --- a/outputs/pkgs/ook-vim/plugins/languages/default.nix +++ b/outputs/pkgs/ook-vim/config/plugins/languages/default.nix @@ -6,6 +6,9 @@ ./treesitter.nix ./html.nix ./ts.nix + ./go.nix + ./lua.nix + ./markdown.nix ]; vim.languages = { diff --git a/outputs/pkgs/ook-vim/config/plugins/languages/go.nix b/outputs/pkgs/ook-vim/config/plugins/languages/go.nix new file mode 100644 index 0000000..e208103 --- /dev/null +++ b/outputs/pkgs/ook-vim/config/plugins/languages/go.nix @@ -0,0 +1,5 @@ +{ + vim.languages.go = { + enable = true; + }; +} diff --git a/outputs/pkgs/ook-vim/plugins/languages/html.nix b/outputs/pkgs/ook-vim/config/plugins/languages/html.nix similarity index 100% rename from outputs/pkgs/ook-vim/plugins/languages/html.nix rename to outputs/pkgs/ook-vim/config/plugins/languages/html.nix diff --git a/outputs/pkgs/ook-vim/plugins/languages/lsp.nix b/outputs/pkgs/ook-vim/config/plugins/languages/lsp.nix similarity index 75% rename from outputs/pkgs/ook-vim/plugins/languages/lsp.nix rename to outputs/pkgs/ook-vim/config/plugins/languages/lsp.nix index a5cbb77..9afab91 100644 --- a/outputs/pkgs/ook-vim/plugins/languages/lsp.nix +++ b/outputs/pkgs/ook-vim/config/plugins/languages/lsp.nix @@ -4,5 +4,8 @@ lspkind.enable = true; lspSignature.enable = true; trouble = {enable = true;}; + null-ls = { + enable = true; + }; }; } diff --git a/outputs/pkgs/ook-vim/config/plugins/languages/lua.nix b/outputs/pkgs/ook-vim/config/plugins/languages/lua.nix new file mode 100644 index 0000000..c294207 --- /dev/null +++ b/outputs/pkgs/ook-vim/config/plugins/languages/lua.nix @@ -0,0 +1,5 @@ +{ + vim.languages.lua = { + enable = true; + }; +} diff --git a/outputs/pkgs/ook-vim/config/plugins/languages/markdown.nix b/outputs/pkgs/ook-vim/config/plugins/languages/markdown.nix new file mode 100644 index 0000000..e7a5855 --- /dev/null +++ b/outputs/pkgs/ook-vim/config/plugins/languages/markdown.nix @@ -0,0 +1,21 @@ +{ + vim = { + languages.markdown = { + enable = true; + vale.enable = true; + ltex.enable = true; + extensions = { + render-markdown-nvim = { + enable = true; + setupOpts = { + heading = { + width = "block"; + left_pad = 3; + right_pad = 4; + }; + }; + }; + }; + }; + }; +} diff --git a/outputs/pkgs/ook-vim/plugins/languages/nix.nix b/outputs/pkgs/ook-vim/config/plugins/languages/nix.nix similarity index 100% rename from outputs/pkgs/ook-vim/plugins/languages/nix.nix rename to outputs/pkgs/ook-vim/config/plugins/languages/nix.nix diff --git a/outputs/pkgs/ook-vim/plugins/languages/treesitter.nix b/outputs/pkgs/ook-vim/config/plugins/languages/treesitter.nix similarity index 94% rename from outputs/pkgs/ook-vim/plugins/languages/treesitter.nix rename to outputs/pkgs/ook-vim/config/plugins/languages/treesitter.nix index 33c3410..89c601c 100644 --- a/outputs/pkgs/ook-vim/plugins/languages/treesitter.nix +++ b/outputs/pkgs/ook-vim/config/plugins/languages/treesitter.nix @@ -6,6 +6,7 @@ kdl regex fish + yaml ]; }; } diff --git a/outputs/pkgs/ook-vim/plugins/languages/ts.nix b/outputs/pkgs/ook-vim/config/plugins/languages/ts.nix similarity index 100% rename from outputs/pkgs/ook-vim/plugins/languages/ts.nix rename to outputs/pkgs/ook-vim/config/plugins/languages/ts.nix diff --git a/outputs/pkgs/ook-vim/config/plugins/notes.nix b/outputs/pkgs/ook-vim/config/plugins/notes.nix new file mode 100644 index 0000000..1f0767a --- /dev/null +++ b/outputs/pkgs/ook-vim/config/plugins/notes.nix @@ -0,0 +1,19 @@ +{ + vim = { + notes = { + obsidianExtended = { + enable = true; + setupOpts = { + dir = "~/Summit/notes"; + daily_notes = { + folder = "~/Summit/notes/dailies"; + }; + templates = { + folder = "~/Summit/notes/templates"; + }; + ui.enable = false; + }; + }; + }; + }; +} diff --git a/outputs/pkgs/ook-vim/plugins/projects.nix b/outputs/pkgs/ook-vim/config/plugins/projects.nix similarity index 100% rename from outputs/pkgs/ook-vim/plugins/projects.nix rename to outputs/pkgs/ook-vim/config/plugins/projects.nix diff --git a/outputs/pkgs/ook-vim/plugins/snippets.nix b/outputs/pkgs/ook-vim/config/plugins/snippets.nix similarity index 100% rename from outputs/pkgs/ook-vim/plugins/snippets.nix rename to outputs/pkgs/ook-vim/config/plugins/snippets.nix diff --git a/outputs/pkgs/ook-vim/config/plugins/statusline.nix b/outputs/pkgs/ook-vim/config/plugins/statusline.nix new file mode 100644 index 0000000..b60c12c --- /dev/null +++ b/outputs/pkgs/ook-vim/config/plugins/statusline.nix @@ -0,0 +1,119 @@ +{ + vim.statusline.lualine = { + enable = true; + activeSection = { + # most of this are the default values provided by nvf + a = [ + #lua + '' + { + "mode", + icons_enabled = true, + seperator = {left = "", right = " ", } + } + '' + #lua + '' + { + draw_empty = true, + seperator = { left = " ", right = " " } + } + '' + ]; + b = [ + #lua + '' + { + "", + draw_empty = true, + } + '' + ]; + c = [ + #lua + '' + "%=", + { + "filename", + symbols = {modified = ' ', readonly = ' '}, + separator = {right = ' '}, + path = 1, + } + '' + ]; + x = [ + # lua + '' + { + "diagnostics", + sources = {'nvim_lsp', 'nvim_diagnostic', 'nvim_diagnostic', 'vim_lsp'}, + symbols = {error = '󰅙 ', warn = ' ', info = ' ', hint = '󰌵 '}, + colored = true, + update_in_insert = false, + always_visible = false, + diagnostics_color = { + color_error = { fg = 'red' }, + color_warn = { fg = 'yellow' }, + color_info = { fg = 'cyan' }, + } + } + '' + ]; + y = [ + #lua + '' + { + "", + draw_empty = true, + separator = { left = ' ', right = ' ' } + } + '' + '' + { + 'searchcount', + maxcount = 999, + timeout = 120, + separator = {left = ' '} + } + '' + '' + { + "branch", + icon = ' •', + separator = {left = ' '} + } + '' + ]; + z = [ + #lua + '' + { + "", + draw_empty = true, + separator = { left = ' ', right = ' ' } + } + '' + '' + { + "progress", + separator = {left = ' '} + } + '' + '' + {"location"} + '' + '' + { + "fileformat", + color = {fg='black'}, + symbols = { + unix = '', -- e712 + dos = '', -- e70f + mac = '', -- e711 + } + } + '' + ]; + }; + }; +} diff --git a/outputs/pkgs/ook-vim/plugins/telescope.nix b/outputs/pkgs/ook-vim/config/plugins/telescope.nix similarity index 100% rename from outputs/pkgs/ook-vim/plugins/telescope.nix rename to outputs/pkgs/ook-vim/config/plugins/telescope.nix diff --git a/outputs/pkgs/ook-vim/plugins/terminal.nix b/outputs/pkgs/ook-vim/config/plugins/terminal.nix similarity index 100% rename from outputs/pkgs/ook-vim/plugins/terminal.nix rename to outputs/pkgs/ook-vim/config/plugins/terminal.nix diff --git a/outputs/pkgs/ook-vim/plugins/ui.nix b/outputs/pkgs/ook-vim/config/plugins/ui.nix similarity index 87% rename from outputs/pkgs/ook-vim/plugins/ui.nix rename to outputs/pkgs/ook-vim/config/plugins/ui.nix index f709199..31512fa 100644 --- a/outputs/pkgs/ook-vim/plugins/ui.nix +++ b/outputs/pkgs/ook-vim/config/plugins/ui.nix @@ -14,14 +14,12 @@ }; # < https://github.com/NotAShelf/nvf/tree/main/modules/plugins/visuals > visuals = { - enable = true; - # icons that other plugins depend on. - nvimWebDevicons.enable = true; + nvim-web-devicons.enable = true; fidget-nvim.enable = true; # indent lines - indentBlankline = { + indent-blankline = { enable = true; setupOpts = { scope = { diff --git a/outputs/pkgs/ook-vim/plugins/utility.nix b/outputs/pkgs/ook-vim/config/plugins/utility.nix similarity index 54% rename from outputs/pkgs/ook-vim/plugins/utility.nix rename to outputs/pkgs/ook-vim/config/plugins/utility.nix index eea1e91..e913804 100644 --- a/outputs/pkgs/ook-vim/plugins/utility.nix +++ b/outputs/pkgs/ook-vim/config/plugins/utility.nix @@ -7,7 +7,13 @@ preview = { markdownPreview = { enable = true; - autoStart = true; + autoStart = false; + }; + }; + images.image-nvim = { + enable = true; + setupOpts = { + backend = "kitty"; }; }; }; diff --git a/outputs/pkgs/ook-vim/settings.nix b/outputs/pkgs/ook-vim/config/settings.nix similarity index 55% rename from outputs/pkgs/ook-vim/settings.nix rename to outputs/pkgs/ook-vim/config/settings.nix index 5c41a32..fef1b43 100644 --- a/outputs/pkgs/ook-vim/settings.nix +++ b/outputs/pkgs/ook-vim/config/settings.nix @@ -1,23 +1,16 @@ {pkgs, ...}: { vim = { package = pkgs.neovim-unwrapped; - leaderKey = " "; - tabWidth = 2; - autoIndent = true; searchCase = "smart"; enableLuaLoader = true; - enableEditorconfig = true; useSystemClipboard = true; autopairs.nvim-autopairs.enable = true; hideSearchHighlight = true; theme = { enable = false; }; + spellcheck = { + enable = true; + }; }; - # Additional sets can be added here - # vim.luaConfigRC.basic = - # entryAfter ["entryAfter"] #lua - # '' - # - # ''; } diff --git a/outputs/pkgs/ook-vim/config/theme.nix b/outputs/pkgs/ook-vim/config/theme.nix new file mode 100644 index 0000000..b269789 --- /dev/null +++ b/outputs/pkgs/ook-vim/config/theme.nix @@ -0,0 +1,31 @@ +{hozen, ...}: let + inherit (hozen) color; +in { + vim.gruvbox-material = { + enable = true; + contrast = "medium"; + italics = false; + transparent = false; + additionalHighlights = { + RenderMarkdownH1Bg = {bg = "#${color.layout.body}";}; + RenderMarkdownH2Bg = {bg = "#${color.layout.body}";}; + RenderMarkdownH3Bg = {bg = "#${color.layout.body}";}; + RenderMarkdownH4Bg = {bg = "#${color.layout.body}";}; + RenderMarkdownH5Bg = {bg = "#${color.layout.body}";}; + RenderMarkdownH6Bg = {bg = "#${color.layout.body}";}; + "@markup.heading.1" = { + fg = "#${color.green.base}"; + bold = true; + }; + "@markup.heading.2" = { + fg = "#${color.blue.base}"; + bold = true; + }; + + NoiceCmdlinePopupBorder = {fg = "#${color.border.active}";}; + NoiceCmdlinePopupBorderHelp = {fg = "#${color.yellow.base}";}; + NoiceCmdlineIcon = {fg = "#${color.green.base}";}; + NoiceCmdLinePopupTitle = {fg = "#${color.typography.text}";}; + }; + }; +} diff --git a/outputs/pkgs/ook-vim/default.nix b/outputs/pkgs/ook-vim/default.nix index c460a8c..0196c62 100644 --- a/outputs/pkgs/ook-vim/default.nix +++ b/outputs/pkgs/ook-vim/default.nix @@ -1,9 +1,16 @@ { - imports = [ - ./settings.nix - ./theme.nix - ./keymaps.nix - ./plugins - ./modules - ]; -} + inputs, + pkgs, + hozen, + ... +}: let + ooks-vim = inputs.nvf.lib.neovimConfiguration { + inherit pkgs; + extraSpecialArgs = {inherit inputs hozen;}; + modules = [ + ./config + ./modules + ]; + }; +in + ooks-vim.neovim diff --git a/outputs/pkgs/ook-vim/keymaps.nix b/outputs/pkgs/ook-vim/keymaps.nix deleted file mode 100644 index 2fbb68d..0000000 --- a/outputs/pkgs/ook-vim/keymaps.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - config.vim = { - globals.mapleader = " "; - }; -} diff --git a/outputs/pkgs/ook-vim/modules/plugins/default.nix b/outputs/pkgs/ook-vim/modules/plugins/default.nix index d4ef450..0fe0dd9 100644 --- a/outputs/pkgs/ook-vim/modules/plugins/default.nix +++ b/outputs/pkgs/ook-vim/modules/plugins/default.nix @@ -2,5 +2,8 @@ imports = [ ./gruvbox-material ./telescope + ./theme + ./notes + ./languages ]; } diff --git a/outputs/pkgs/ook-vim/modules/plugins/gruvbox-material/config.nix b/outputs/pkgs/ook-vim/modules/plugins/gruvbox-material/config.nix index d03cab7..a169102 100644 --- a/outputs/pkgs/ook-vim/modules/plugins/gruvbox-material/config.nix +++ b/outputs/pkgs/ook-vim/modules/plugins/gruvbox-material/config.nix @@ -1,13 +1,109 @@ { config, lib, - inputs, pkgs, ... }: let inherit (lib) mkOption mkIf boolToString; - inherit (lib.types) bool enum lines; - inherit (inputs.nvf.lib.nvim.dag) entryAfter; + inherit (lib.types) bool enum lines nullOr str submodule attrsOf; + inherit (lib.nvim.dag) entryBefore; + inherit (lib.nvim.lua) toLuaObject; + + # hack to get around nvf's handling of prefixed @ in toLuaObject + wrapHighlights = highlights: + lib.mapAttrs' ( + name: value: + if lib.hasPrefix "@" name + then lib.nameValuePair "hl_${name}" value + else lib.nameValuePair name value + ) + highlights; + + highlightOpts = submodule { + options = { + # https://neovim.io/doc/user/api.html#nvim_set_hl() + fg = mkOption { + type = nullOr str; + default = null; + description = "Foreground color"; + }; + bg = mkOption { + type = nullOr str; + default = null; + description = "Background color"; + }; + sp = mkOption { + type = nullOr str; + default = null; + description = "SP color"; + }; + blend = mkOption { + type = nullOr bool; + default = null; + description = "Blend attribute"; + }; + bold = mkOption { + type = nullOr bool; + default = null; + description = "Italic attribute"; + }; + standout = mkOption { + type = nullOr bool; + default = null; + description = "Standout attribute"; + }; + underline = mkOption { + type = nullOr bool; + default = null; + description = "underline attribute"; + }; + undercurl = mkOption { + type = nullOr bool; + default = null; + description = "Undercurl attribute"; + }; + underdouble = mkOption { + type = nullOr bool; + default = null; + description = "Underdouble attribute"; + }; + underdotted = mkOption { + type = nullOr bool; + default = null; + description = "Underdotted attribute"; + }; + underdashed = mkOption { + type = nullOr bool; + default = null; + description = "Underdashed attribute"; + }; + strikethrough = mkOption { + type = nullOr bool; + default = null; + description = "Strikethrough attribute"; + }; + italic = mkOption { + type = nullOr bool; + default = null; + description = "Bold attribute"; + }; + reverse = mkOption { + type = nullOr bool; + default = null; + description = "Reverse attribute"; + }; + nocombine = mkOption { + type = nullOr bool; + default = null; + description = "Nocombine attribute"; + }; + link = mkOption { + type = nullOr str; + default = null; + description = "Link attribute"; + }; + }; + }; cfg = config.vim.gruvbox-material; in { @@ -46,13 +142,18 @@ in { type = lines; description = "Additional lua configuration after"; }; + additionalHighlights = mkOption { + type = attrsOf highlightOpts; + default = {}; + description = "Additional highlight groups to be applied after theme setup."; + }; }; config = mkIf cfg.enable { vim = { startPlugins = [pkgs.vimPlugins.gruvbox-material-nvim]; luaConfigRC.theme = - entryAfter ["basic"] + entryBefore ["pluginConfigs" "lazyConfigs"] /* lua */ @@ -73,7 +174,14 @@ in { highlight = ${boolToString cfg.signsHighlight}, }, } - ${cfg.extraConfig} + + local extra_highlights = ${toLuaObject (wrapHighlights cfg.additionalHighlights)} + for group_name, settings in pairs(extra_highlights) do + -- Unwrap our prefixed names back to @ form + local actual_name = group_name:gsub("^hl_@", "@") + vim.api.nvim_set_hl(0, actual_name, settings) + end + ''; }; }; diff --git a/outputs/pkgs/ook-vim/modules/plugins/languages/default.nix b/outputs/pkgs/ook-vim/modules/plugins/languages/default.nix new file mode 100644 index 0000000..a50dfb6 --- /dev/null +++ b/outputs/pkgs/ook-vim/modules/plugins/languages/default.nix @@ -0,0 +1 @@ +{imports = [./markdown.nix];} diff --git a/outputs/pkgs/ook-vim/modules/plugins/languages/markdown.nix b/outputs/pkgs/ook-vim/modules/plugins/languages/markdown.nix new file mode 100644 index 0000000..73833c6 --- /dev/null +++ b/outputs/pkgs/ook-vim/modules/plugins/languages/markdown.nix @@ -0,0 +1,136 @@ +# modules/plugins/vale/default.nix +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.modules) mkIf mkMerge; + inherit (lib.types) package enum str; + + languages = [ + "auto" + "ar" + "ast-ES" + "be-BY" + "br-FR" + "ca-ES" + "ca-ES-valencia" + "da-DK" + "de" + "de-AT" + "de-CH" + "de-DE" + "de-DE-x-simple-language" + "el-GR" + "en" + "en-AU" + "en-CA" + "en-GB" + "en-NZ" + "en-US" + "en-ZA" + "eo" + "es" + "es-AR" + "fa" + "fr" + "ga-IE" + "gl-ES" + "it" + "ja-JP" + "km-KH" + "nl" + "nl-BE" + "pl-PL" + "pt" + "pt-AO" + "pt-BR" + "pt-MZ" + "pt-PT" + "ro-RO" + "ru-RU" + "sk-SK" + "sl-SI" + "sv" + "ta-IN" + "tl-PH" + "uk-UA" + "zh-CN" + ]; + + cfg = config.vim.languages.markdown; +in { + options.vim.languages.markdown = { + vale = { + enable = mkEnableOption "Vale linting support"; + package = mkOption { + type = package; + default = pkgs.vale.withStyles (styles: [ + styles.proselint + styles.microsoft + styles.write-good + styles.readability + styles.alex + ]); + description = "Vale package to use"; + }; + }; + ltex = { + enable = mkEnableOption "Enable ltex-ls"; + package = mkOption { + type = package; + default = pkgs.ltex-ls; + }; + language = mkOption { + type = enum languages; + default = "en"; + }; + modelPath = mkOption { + type = str; + default = "~/.config/nvf/models/ngrams/"; + }; + }; + }; + + config = mkMerge [ + (mkIf cfg.vale.enable { + vim.lsp.null-ls = { + enable = true; + sources.vale-lint = + # lua + '' + table.insert( + ls_sources, + null_ls.builtins.diagnostics.vale.with({ + command = "${cfg.vale.package}/bin/vale", + diagnostics_format = "#{m} [#{c}]" + }) + ) + ''; + }; + }) + (mkIf cfg.ltex.enable { + vim.lsp.lspconfig.enable = true; + vim.lsp.lspconfig.sources.ltex-lsp = + # lua + '' + lspconfig.ltex.setup{ + cmd = {"${cfg.ltex.package}/bin/ltex-ls"}, + capabilities = capabilities; + on_attach = default_on_attach; + flags = { debounce_text_changes = 300 }, + settings = { + ltex = { + language = "${cfg.ltex.language}", + additionalRules = { + languageModel = "${cfg.ltex.modelPath}", + }, + }, + }, + } + ''; + }) + ]; +} diff --git a/outputs/pkgs/ook-vim/modules/plugins/notes/default.nix b/outputs/pkgs/ook-vim/modules/plugins/notes/default.nix new file mode 100644 index 0000000..f8803b7 --- /dev/null +++ b/outputs/pkgs/ook-vim/modules/plugins/notes/default.nix @@ -0,0 +1,3 @@ +{ + imports = [./obsidian]; +} diff --git a/outputs/pkgs/ook-vim/modules/plugins/notes/obsidian/config.nix b/outputs/pkgs/ook-vim/modules/plugins/notes/obsidian/config.nix new file mode 100644 index 0000000..ca64f97 --- /dev/null +++ b/outputs/pkgs/ook-vim/modules/plugins/notes/obsidian/config.nix @@ -0,0 +1,38 @@ +{ + config, + lib, + options, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + inherit (lib.nvim.binds) mkKeymap pushDownDefault; + inherit (options.vim.notes.obsidianExtended) mappings; + + cfg = config.vim.notes.obsidianExtended; + keys = cfg.mappings; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = [ + "obsidian-nvim" + "vim-markdown" + "tabular" + ]; + + binds.whichKey.register = pushDownDefault { + "o" = "+Notes"; + }; + + pluginRC.obsidian = entryAnywhere '' + require("obsidian").setup(${toLuaObject cfg.setupOpts}) + ''; + keymaps = [ + (mkKeymap "n" keys.openNote "ObsidianOpen" {desc = mappings.openNote.description;}) + (mkKeymap "n" keys.findNote "ObsidianQuickSwitch" {desc = mappings.findNote.description;}) + (mkKeymap "n" keys.newNote "ObsidianNewFromTemplate" {desc = mappings.newNote.description;}) + ]; + }; + }; +} diff --git a/outputs/pkgs/ook-vim/modules/plugins/notes/obsidian/default.nix b/outputs/pkgs/ook-vim/modules/plugins/notes/obsidian/default.nix new file mode 100644 index 0000000..011b9b6 --- /dev/null +++ b/outputs/pkgs/ook-vim/modules/plugins/notes/obsidian/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./obsidian.nix + ]; +} diff --git a/outputs/pkgs/ook-vim/modules/plugins/notes/obsidian/obsidian.nix b/outputs/pkgs/ook-vim/modules/plugins/notes/obsidian/obsidian.nix new file mode 100644 index 0000000..5410f72 --- /dev/null +++ b/outputs/pkgs/ook-vim/modules/plugins/notes/obsidian/obsidian.nix @@ -0,0 +1,117 @@ +{ + lib, + config, + ... +}: let + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) str nullOr bool enum; + inherit (lib.generators) mkLuaInline; + inherit (lib.nvim.binds) mkMappingOption; + inherit (lib.nvim.types) mkPluginSetupOption luaInline; +in { + options.vim.notes.obsidianExtended = { + enable = mkEnableOption "Complementary neovim plugin for Obsidian editor"; + setupOpts = mkPluginSetupOption "Obsidian.nvim" { + dir = mkOption { + type = str; + default = "~/my-vault"; + description = "Location of Obsidian vault directory"; + }; + daily_notes = { + folder = mkOption { + type = nullOr str; + default = null; + description = "Directory in which daily notes should be created"; + }; + date_format = mkOption { + type = nullOr str; + default = null; + description = "Date format used for creating daily notes"; + }; + }; + completion = { + nvim_cmp = mkOption { + # If using nvim-cmp, otherwise set to false + type = bool; + description = "If using nvim-cmp, otherwise set to false"; + default = config.vim.autocomplete.nvim-cmp.enable; + }; + }; + new_notes_location = mkOption { + type = nullOr (enum ["current_dir" "notes_subdir"]); + default = null; + description = '' + Where to put new notes. Valid options are: + * "current_dir" - put notes in same directory as current buffer + * "notes_subdir" - put notes in the default notes subdirectory + + default option: "current_dir" + ''; + }; + templates = { + folder = mkOption { + type = nullOr str; + default = null; + description = "Obsidian templates directory"; + }; + date_format = mkOption { + type = nullOr str; + default = null; + description = "Date format used for templates"; + }; + time_format = mkOption { + type = nullOr str; + default = null; + description = "Time format used for templates"; + }; + }; + preferred_link_style = mkOption { + type = nullOr (enum ["wiki" "markdown"]); + default = null; + description = '' + Either "wiki" or "markdown" + ''; + }; + note_id_func = mkOption { + type = nullOr luaInline; + default = + mkLuaInline + # lua + '' + function(title) + return title + end + ''; + description = '' + Customize how a note ID is generated given an optional title + ''; + }; + follow_url_func = mkOption { + type = nullOr luaInline; + default = + mkLuaInline + # lua + '' + function(url) + vim.fn.jobstart({"xdg-open", url}) + end + ''; + }; + ui = { + enable = mkOption { + type = nullOr bool; + default = null; + description = '' + Set to false to disable all additional syntax features + ''; + }; + # TODO: add rest of ui options + }; + }; + mappings = { + openNote = mkMappingOption "Open note in obsidian" "oo"; + findNote = mkMappingOption "Open finder in obsidian vault" "of"; + newNote = mkMappingOption "Create new note" "on"; + }; + }; +} diff --git a/outputs/pkgs/ook-vim/modules/plugins/notes/render-markdown/render-markdown.nix b/outputs/pkgs/ook-vim/modules/plugins/notes/render-markdown/render-markdown.nix new file mode 100644 index 0000000..775447d --- /dev/null +++ b/outputs/pkgs/ook-vim/modules/plugins/notes/render-markdown/render-markdown.nix @@ -0,0 +1,423 @@ +{lib, ...}: let + inherit (lib) mkOption mkEnableOption; + inherit (lib.types) str nullOr bool enum listOf int float attrsOf submodule either; + inherit (lib.nvim.types) mkPluginSetupOption luaInline; + + # All possible Neovim modes + neovimModes = [ + "n" + "no" + "nov" + "noV" + "noCTRL-v" + "niI" + "niR" + "niV" + "nt" + "ntT" + "v" + "vs" + "V" + "Vs" + "CTRL-V" + "CTRL-Vs" + "s" + "S" + "CTRL-S" + "i" + "ic" + "ix" + "R" + "Rc" + "Rx" + "Rv" + "Rvc" + "Rvx" + "c" + "cr" + "cv" + "cvr" + "r" + "rm" + "r?" + "!" + "t" + ]; + + # Preset options + presetOptions = enum ["obsidian" "lazy" "none"]; + + # Log level options + logLevelOptions = enum ["error" "warn" "info" "debug" "trace"]; + + # Anti-conceal ignore options submodule + antiConcealIgnoreOptions = submodule { + options = { + head_icon = mkOption { + type = nullOr (listOf (enum neovimModes)); + default = null; + description = "Modes where head icon anti-conceal behavior will be ignored"; + }; + head_background = mkOption { + type = nullOr (listOf (enum neovimModes)); + default = null; + description = "Modes where head background anti-conceal behavior will be ignored"; + }; + head_border = mkOption { + type = nullOr (listOf (enum neovimModes)); + default = null; + description = "Modes where head border anti-conceal behavior will be ignored"; + }; + code_language = mkOption { + type = nullOr (listOf (enum neovimModes)); + default = null; + description = "Modes where code language anti-conceal behavior will be ignored"; + }; + code_background = mkOption { + type = nullOr bool; + default = true; + description = "Whether to ignore code background anti-conceal behavior"; + }; + code_border = mkOption { + type = nullOr (listOf (enum neovimModes)); + default = null; + description = "Modes where code border anti-conceal behavior will be ignored"; + }; + dash = mkOption { + type = nullOr (listOf (enum neovimModes)); + default = null; + description = "Modes where dash anti-conceal behavior will be ignored"; + }; + bullet = mkOption { + type = nullOr (listOf (enum neovimModes)); + default = null; + description = "Modes where bullet anti-conceal behavior will be ignored"; + }; + check_icon = mkOption { + type = nullOr (listOf (enum neovimModes)); + default = null; + description = "Modes where check icon anti-conceal behavior will be ignored"; + }; + check_scope = mkOption { + type = nullOr (listOf (enum neovimModes)); + default = null; + description = "Modes where check scope anti-conceal behavior will be ignored"; + }; + quote = mkOption { + type = nullOr (listOf (enum neovimModes)); + default = null; + description = "Modes where quote anti-conceal behavior will be ignored"; + }; + table_border = mkOption { + type = nullOr (listOf (enum neovimModes)); + default = null; + description = "Modes where table border anti-conceal behavior will be ignored"; + }; + callout = mkOption { + type = nullOr (listOf (enum neovimModes)); + default = null; + description = "Modes where callout anti-conceal behavior will be ignored"; + }; + link = mkOption { + type = nullOr (listOf (enum neovimModes)); + default = null; + description = "Modes where link anti-conceal behavior will be ignored"; + }; + sign = mkOption { + type = nullOr bool; + default = true; + description = "Whether to ignore sign anti-conceal behavior"; + }; + }; + }; + + # Injection options submodule + injectionOptions = submodule { + options = { + enabled = mkOption { + type = nullOr bool; + default = null; + description = "Whether this injection is enabled"; + }; + query = mkOption { + type = luaInline; + description = "Treesitter query for the injection"; + }; + }; + }; + + headingWidthType = enum ["block" "full"]; + + headingPositionType = enum ["right" "inline" "overlay"]; +in { + options.vim.notes.render-markdown-nvim = { + enable = mkEnableOption "Inline markdown rendering"; + setupOpts = mkPluginSetupOption "render-markdown" { + enabled = mkOption { + type = bool; + default = true; + description = "Whether Markdown should be rendered by default"; + }; + + render_modes = mkOption { + type = listOf (enum neovimModes); + default = ["n" "c" "t"]; + description = '' + Vim modes that will show a rendered view of the markdown file. + Individual components can be enabled for other modes. + ''; + }; + + max_file_size = mkOption { + type = float; + default = 10.0; + description = "Maximum file size (in MB) that this plugin will attempt to render"; + }; + + debounce = mkOption { + type = int; + default = 100; + description = "Milliseconds that must pass before updating marks"; + }; + + preset = mkOption { + type = presetOptions; + default = "none"; + description = "Pre-configured settings to mimic various target user experiences"; + }; + + log_level = mkOption { + type = logLevelOptions; + default = "error"; + description = "The level of logs to write to file"; + }; + + log_runtime = mkOption { + type = bool; + default = false; + description = "Print runtime of main update method"; + }; + + file_types = mkOption { + type = listOf str; + default = ["markdown"]; + description = "Filetypes this plugin will run on"; + }; + + injections = mkOption { + type = attrsOf injectionOptions; + default = { + gitcommit = { + enabled = true; + query = '' + ((message) @injection.content + (#set! injection.combined) + (#set! injection.include-children) + (#set! injection.language "markdown")) + ''; + }; + }; + description = "Language injections for known filetypes"; + }; + + anti_conceal = { + enabled = mkOption { + type = bool; + default = true; + description = "Enable hiding added text on the cursor line"; + }; + + ignore = mkOption { + type = antiConcealIgnoreOptions; + default = { + code_background = true; + sign = true; + }; + description = "Elements to always show, ignoring anti-conceal behavior"; + }; + + above = mkOption { + type = int; + default = 0; + description = "Number of lines above cursor to show"; + }; + + below = mkOption { + type = int; + default = 0; + description = "Number of lines below cursor to show"; + }; + }; + + padding = { + highlight = mkOption { + type = str; + default = "Normal"; + description = "Highlight to use when adding whitespace"; + }; + }; + + on = { + attach = mkOption { + type = nullOr luaInline; + default = null; + description = "Called when plugin initially attaches to a buffer"; + }; + + render = mkOption { + type = nullOr luaInline; + default = null; + description = "Called after plugin renders a buffer"; + }; + }; + + latex = { + enabled = mkOption { + type = nullOr bool; + default = null; + description = "Whether LaTeX should be rendered"; + }; + + render_modes = mkOption { + type = nullOr bool; + default = null; + description = "Additional modes to render LaTeX"; + }; + + converter = mkOption { + type = nullOr str; + default = null; + description = "Executable used to convert latex formula to rendered unicode"; + }; + + highlight = mkOption { + type = nullOr str; + default = null; + description = "Highlight for LaTeX blocks"; + }; + + top_pad = mkOption { + type = nullOr int; + default = null; + description = "Amount of empty lines above LaTeX blocks"; + }; + + bottom_pad = mkOption { + type = nullOr int; + default = null; + description = "Amount of empty lines below LaTeX blocks"; + }; + }; + + heading = { + enabled = mkOption { + type = nullOr bool; + default = null; + description = "Enable heading icon & background rendering"; + }; + + render_modes = mkOption { + type = nullOr bool; + default = null; + description = "Additional modes to render headings"; + }; + + sign = mkOption { + type = nullOr bool; + default = null; + description = "Turn on/off sign column related rendering"; + }; + + icons = mkOption { + type = nullOr (listOf str); + default = null; + description = "Icons for different heading levels"; + }; + + position = mkOption { + type = nullOr headingPositionType; + default = null; + description = "How icons fill available space"; + }; + + signs = mkOption { + type = nullOr (listOf str); + default = null; + description = "Signs added to the sign column if enabled"; + }; + + width = mkOption { + type = nullOr (either headingWidthType (listOf headingWidthType)); + default = null; + description = "Width of the heading background"; + }; + + left_margin = mkOption { + type = nullOr (either float (listOf float)); + default = null; + description = "Margin to add to left of headings"; + }; + + left_pad = mkOption { + type = nullOr (either float (listOf float)); + default = null; + description = "Padding to add to left of headings"; + }; + + right_pad = mkOption { + type = nullOr (either float (listOf float)); + default = null; + description = "Padding to add to right of headings when width is 'block'"; + }; + + min_width = mkOption { + type = nullOr (either int (listOf int)); + default = null; + description = "Minimum width for headings when width is 'block'"; + }; + + border = mkOption { + type = nullOr (either bool (listOf bool)); + default = null; + description = "Add border above and below headings"; + }; + + border_virtual = mkOption { + type = nullOr bool; + default = null; + description = "Always use virtual lines for heading borders"; + }; + + border_prefix = mkOption { + type = nullOr bool; + default = null; + description = "Highlight border start using foreground highlight"; + }; + + above = mkOption { + type = nullOr str; + default = null; + description = "Character used above heading for border"; + }; + + below = mkOption { + type = nullOr str; + default = null; + description = "Character used below heading for border"; + }; + + backgrounds = mkOption { + type = nullOr (listOf str); + default = null; + description = "Highlights for heading backgrounds per level"; + }; + + foregrounds = mkOption { + type = nullOr (listOf str); + default = null; + description = "Highlights for heading and sign icons per level"; + }; + }; + }; + }; +} diff --git a/outputs/pkgs/ook-vim/modules/plugins/theme/config.nix b/outputs/pkgs/ook-vim/modules/plugins/theme/config.nix new file mode 100644 index 0000000..07196cf --- /dev/null +++ b/outputs/pkgs/ook-vim/modules/plugins/theme/config.nix @@ -0,0 +1,48 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib) mkIf; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.theme.custom; + + themePlugin = pkgs.vimUtils.buildVimPlugin { + inherit (cfg) name; + src = pkgs.writeTextDir "colors/${cfg.name}.lua" '' + local M = {} + M.highlights = ${toLuaObject cfg.highlights} + + local function set_groups() + for group, settings in pairs(M.highlights) do + vim.api.nvim_set_hl(0, group, settings) + end + end + + function M.colorscheme() + vim.api.nvim_command("hi clear") + if vim.fn.exists("syntax_on") then + vim.api.nvim_command("syntax reset") + end + + vim.o.termguicolors = true + vim.g.colors_name = "${cfg.name}" + + set_groups() + end + + return M.colorscheme() + ''; + }; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = [themePlugin]; + luaConfigRC.customTheme = '' + vim.cmd.colorscheme("${cfg.name}") + ''; + }; + }; +} diff --git a/outputs/pkgs/ook-vim/modules/plugins/theme/custom-theme.nix b/outputs/pkgs/ook-vim/modules/plugins/theme/custom-theme.nix new file mode 100644 index 0000000..c666826 --- /dev/null +++ b/outputs/pkgs/ook-vim/modules/plugins/theme/custom-theme.nix @@ -0,0 +1,103 @@ +{lib, ...}: let + inherit (lib) mkOption mkEnableOption; + inherit (lib.types) nullOr str bool attrsOf submodule; + + highlightOpts = submodule { + options = { + # https://neovim.io/doc/user/api.html#nvim_set_hl() + fg = mkOption { + type = nullOr str; + default = null; + description = "Foreground color"; + }; + bg = mkOption { + type = nullOr str; + default = null; + description = "Background color"; + }; + sp = mkOption { + type = nullOr str; + default = null; + description = "SP color"; + }; + blend = mkOption { + type = nullOr bool; + default = null; + description = "Blend attribute"; + }; + bold = mkOption { + type = nullOr bool; + default = null; + description = "Italic attribute"; + }; + standout = mkOption { + type = nullOr bool; + default = null; + description = "Standout attribute"; + }; + underline = mkOption { + type = nullOr bool; + default = null; + description = "underline attribute"; + }; + undercurl = mkOption { + type = nullOr bool; + default = null; + description = "Undercurl attribute"; + }; + underdouble = mkOption { + type = nullOr bool; + default = null; + description = "Underdouble attribute"; + }; + underdotted = mkOption { + type = nullOr bool; + default = null; + description = "Underdotted attribute"; + }; + underdashed = mkOption { + type = nullOr bool; + default = null; + description = "Underdashed attribute"; + }; + strikethrough = mkOption { + type = nullOr bool; + default = null; + description = "Strikethrough attribute"; + }; + italic = mkOption { + type = nullOr bool; + default = null; + description = "Bold attribute"; + }; + reverse = mkOption { + type = nullOr bool; + default = null; + description = "Reverse attribute"; + }; + nocombine = mkOption { + type = nullOr bool; + default = null; + description = "Nocombine attribute"; + }; + link = mkOption { + type = nullOr str; + default = null; + description = "Link attribute"; + }; + }; + }; +in { + options.vim.theme.custom = { + enable = mkEnableOption "Enable custom theme"; + name = mkOption { + type = str; + default = "my-custom-theme"; + description = "Name of custom theme"; + }; + highlights = mkOption { + type = attrsOf highlightOpts; + default = {}; + }; + }; +} diff --git a/outputs/pkgs/ook-vim/modules/plugins/theme/default.nix b/outputs/pkgs/ook-vim/modules/plugins/theme/default.nix new file mode 100644 index 0000000..bf217ec --- /dev/null +++ b/outputs/pkgs/ook-vim/modules/plugins/theme/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./custom-theme.nix + ]; +} diff --git a/outputs/pkgs/ook-vim/plugins/languages/markdown.nix b/outputs/pkgs/ook-vim/plugins/languages/markdown.nix deleted file mode 100644 index 79e953e..0000000 --- a/outputs/pkgs/ook-vim/plugins/languages/markdown.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - vim = { - languages.markdown = { - enable = true; - format = true; - }; - utility = { - preview.markdownPreview = {enable = true;}; - }; - }; -} diff --git a/outputs/pkgs/ook-vim/plugins/statusline.nix b/outputs/pkgs/ook-vim/plugins/statusline.nix deleted file mode 100644 index f376a24..0000000 --- a/outputs/pkgs/ook-vim/plugins/statusline.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - vim.statusline.lualine = { - enable = true; - activeSection = { - a = [ - #lua - '' - { - "mode", - icons_enabled = true, - seperator = {left = "", right = " ", } - } - '' - #lua - '' - { - draw_empty = true, - seperator = { left = " ", right = " " } - } - '' - ]; - b = [ - #lua - '' - { - "", - draw_empty = true, - } - '' - ]; - c = ["filename"]; - x = [ - # lua - '' - { - "diagnostics", - sources = {'nvim_lsp', 'nvim_diagnostic', 'nvim_diagnostic', 'vim_lsp'}, - symbols = {error = '󰅙 ', warn = ' ', info = ' ', hint = '󰌵 '}, - colored = true, - update_in_insert = false, - always_visible = false, - diagnostics_color = { - color_error = { fg = 'red' }, - color_warn = { fg = 'yellow' }, - color_info = { fg = 'cyan' }, - } - } - '' - ]; - }; - }; -} diff --git a/outputs/pkgs/ook-vim/theme.nix b/outputs/pkgs/ook-vim/theme.nix deleted file mode 100644 index 3e0335d..0000000 --- a/outputs/pkgs/ook-vim/theme.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - vim.gruvbox-material = { - enable = true; - contrast = "medium"; - italics = false; - transparent = false; - extraConfig = - # lua - '' - local g_colors = require("gruvbox-material.colors") - local colors = g_colors.get(vim.o.background, "soft") - - -- Noice - vim.api.nvim_set_hl(0, "NoiceCmdlinePopupBorderHelp", { fg = colors.yellow }) - vim.api.nvim_set_hl(0, "NoiceCmdlinePopupBorder", { fg = colors.grey1 }) - vim.api.nvim_set_hl(0, "NoiceCmdlineIcon", { fg = colors.green }) - vim.api.nvim_set_hl(0, "NoiceCmdLinePopupTitle", { fg = colors.grey1 }) - ''; - }; -} diff --git a/outputs/pkgs/project-plus/default.nix b/outputs/pkgs/project-plus/default.nix new file mode 100644 index 0000000..eb756e3 --- /dev/null +++ b/outputs/pkgs/project-plus/default.nix @@ -0,0 +1,166 @@ +{ + fpp-config, + userDir ? "/home/ooks/.config/project-plus", + lib, + stdenv, + fetchFromGitHub, + cmake, + pkg-config, + wrapQtAppsHook, + fetchpatch, + copyDesktopItems, + alsa-lib, + bluez, + bzip2, + cubeb, + curl, + ffmpeg, + fmt_10, + glib, + gtk2, + gtk3, + gtest, + hidapi, + enet, + libevdev, + libGL, + libiconv, + libpulseaudio, + libspng, + libusb1, + libXdmcp, + libXext, + libXi, + libXrandr, + lz4, + lzo, + mbedtls_2, + miniupnpc, + minizip-ng, + openal, + pugixml, + qtbase, + qtsvg, + SDL2, + sfml, + udev, + vulkan-loader, + xorg, + xxHash, + xz, +}: let + rev = "f245e1ee105eeb5c18653657cd8b29415dc37243"; + version = "3.0.5"; +in + stdenv.mkDerivation { + pname = "project-plus"; + inherit version; + + src = fetchFromGitHub { + owner = "jlambert360"; + repo = "Ishiiruka"; + hash = "sha256-UmIaOBHMRsl9FnfowAQGBjB83wpVRhoO0gzLed09lmk"; + inherit rev; + }; + + patches = [ + (fetchpatch + { + url = "https://github.com/dolphin-emu/dolphin/commit/3da2e15e6b95f02f66df461e87c8b896e450fdab.patch"; + hash = "sha256-+8yGF412wQUYbyEuYWd41pgOgEbhCaezexxcI5CNehc="; + }) + ]; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + pkg-config + wrapQtAppsHook + copyDesktopItems + ]; + buildInputs = [ + bzip2 + cubeb + curl + enet + ffmpeg + fmt_10 + gtest + hidapi + libiconv + libpulseaudio + libspng + libXdmcp + libXi + lz4 + lzo + libusb1 + mbedtls_2 + miniupnpc + minizip-ng + openal + pugixml + qtbase + qtsvg + SDL2 + sfml + xxHash + xz + alsa-lib + bluez + libevdev + libGL + libXrandr + udev + vulkan-loader + libXext + glib + gtk2 + gtk3 + xorg.libXinerama + xorg.libXxf86vm + ]; + + cmakeFlags = [ + "-DLINUX_LOCAL_DEV=true" + "-DGTK3_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-3.0/include" + "-DGTK3_GDKCONFIG_INCLUDE_DIR=${gtk3.out}/lib/gtk-3.0/include" + "-DGTK3_INCLUDE_DIRS=${gtk3.out}/lib/gtk-3.0" + "-DENABLE_LTO=True" + "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include" + "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include" + "-DGTK2_INCLUDE_DIRS=${gtk2}/lib/gtk-2.0" + ]; + + qtWrapperArgs = [ + "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [vulkan-loader]}" + "--set QT_QPA_PLATFORM xcb" + "--add-flags -u" + "--add-flags ${toString userDir}" + ]; + + patchPhase = '' + sed -i 's|\$\\{GIT_EXECUTABLE} rev-parse HEAD|echo ${rev}|g' CMakeLists.txt # --set scm_rev_str everywhere to actual commit hash when downloaded + sed -i 's|\$\\{GIT_EXECUTABLE} describe --always --long --dirty|echo FM v${version}|g' CMakeLists.txt # ensures compatibility w/ netplay + sed -i 's|\$\\{GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD|echo HEAD|g' CMakeLists.txt + sed -i 's|#include |#include \n#include |g' Source/Core/DiscIO/DiscExtractor.h + cp Externals/wxWidgets3/include/wx Source/Core/ -r + cp Externals/wxWidgets3/wx/* Source/Core/wx/ + ''; + + installPhase = '' + runHook preInstall + + cp -rf ${fpp-config}/Binaries/Sys Binaries/ + chmod -R 755 Binaries/ + + mkdir -p $out + cp Binaries/ $out/ -r + + mkdir -p $out/bin + ln -s $out/Binaries/ishiiruka $out/bin/faster-project-plus + + runHook postInstall + ''; + } diff --git a/outputs/pkgs/project-plus/fpp-config.nix b/outputs/pkgs/project-plus/fpp-config.nix new file mode 100644 index 0000000..bf773a3 --- /dev/null +++ b/outputs/pkgs/project-plus/fpp-config.nix @@ -0,0 +1,19 @@ +{ + stdenv, + fetchzip, +}: +stdenv.mkDerivation { + name = "fpp-config"; + version = "2.28"; + + archiveName = "fppconfig.tar.gz"; + src = fetchzip { + url = "https://github.com/jlambert360/FPM-AppImage/raw/refs/heads/master/config/fppconfig.tar.gz"; + sha256 = "sha256-1+dQkNuZi2LXqmUuYJHI6RYuFUmI2wzVb4D2SYdZt1Y="; + }; + + installPhase = '' + mkdir -p $out/Binaries + cp -rf . $out/Binaries + ''; +} diff --git a/outputs/pkgs/project-plus/fpp-launcher.nix b/outputs/pkgs/project-plus/fpp-launcher.nix new file mode 100644 index 0000000..f291658 --- /dev/null +++ b/outputs/pkgs/project-plus/fpp-launcher.nix @@ -0,0 +1,20 @@ +{ + stdenv, + fetchzip, +}: let + version = "3.0.5"; +in + stdenv.mkDerivation { + inherit version; + name = "fpp-launcher"; + + src = fetchzip { + url = "https://github.com/jlambert360/FPM-AppImage/releases/download/v${version}/Launcher.tar.gz"; + sha256 = "sha256-Q3F4V/ggePaZRsGFM54hkGBkLb52PaIn2lQ31gYANW0="; + }; + + installPhase = '' + mkdir -p $out/Launcher + cp -rf . $out/Launcher + ''; + } diff --git a/outputs/pkgs/project-plus/fpp-sd.nix b/outputs/pkgs/project-plus/fpp-sd.nix new file mode 100644 index 0000000..dcea0b6 --- /dev/null +++ b/outputs/pkgs/project-plus/fpp-sd.nix @@ -0,0 +1,20 @@ +{ + stdenv, + fetchzip, +}: let + version = "3.0.5"; +in + stdenv.mkDerivation { + name = "fpp-sdcard"; + inherit version; + + src = fetchzip { + url = "https://github.com/jlambert360/FPM-AppImage/releases/download/v${version}/sd.tar.gz"; + sha256 = "sha256-9QrfAxY62x5RlELOUey+zfVzP3xuDB/sRe/0rVevV6A"; + }; + + installPhase = '' + mkdir -p $out + cp sd.raw $out + ''; + } diff --git a/outputs/pkgs/repomix/default.nix b/outputs/pkgs/repomix/default.nix new file mode 100644 index 0000000..459bd53 --- /dev/null +++ b/outputs/pkgs/repomix/default.nix @@ -0,0 +1,26 @@ +{ + buildNpmPackage, + fetchFromGitHub, +}: +buildNpmPackage rec { + pname = "repomix"; + version = "0.2.20"; + + src = fetchFromGitHub { + owner = "yamadashy"; + repo = "repomix"; + rev = "v${version}"; + hash = "sha256-ZfkaopnftD6wJ0KAScE1q2u3/jM36QVwx6CgPiS1nWY"; + }; + + npmDepsHash = "sha256-/ocQ5vp67w5U6Gx+1LgJzcObsvKeTVN9BOEKXSb6oU0"; + + meta = { + description = '' + A powerful tool that packs your entire repository into a + single, AI-friendly file. + ''; + homepage = "https://github.com/yamadashy/repomix"; + mainProgram = "repomix"; + }; +} diff --git a/outputs/pkgs/repopack/default.nix b/outputs/pkgs/repopack/default.nix deleted file mode 100644 index b9a67fd..0000000 --- a/outputs/pkgs/repopack/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - lib, - buildNpmPackage, - fetchFromGitHub, -}: -buildNpmPackage rec { - pname = "repopack"; - version = "0.1.24"; - - src = fetchFromGitHub { - owner = "yamadashy"; - repo = "repopack"; - rev = "v${version}"; - hash = "sha256-+UcpfxMcG47j4fSOAXBvNgwKy0nSC6UKJvNc5G8c6U0="; - }; - - npmDepsHash = "sha256-Jyp48JNRuqxGSNi6eLrnOkF4Z+OResbtfbTYHg1S1mU="; - - meta = { - description = '' - A powerful tool that packs your entire repository into a - single, AI-friendly file. - ''; - homepage = "https://github.com/yamadashy/repopack"; - mainProgram = "repopack"; - }; -} diff --git a/outputs/pkgs/wallpapers/generated-wallpaper.nix b/outputs/pkgs/wallpapers/generated-wallpaper.nix new file mode 100644 index 0000000..698ecd8 --- /dev/null +++ b/outputs/pkgs/wallpapers/generated-wallpaper.nix @@ -0,0 +1,66 @@ +{ + pkgs, + config, +}: let + inherit (config.ooknet.hardware) monitors; + inherit (config.ooknet.appearance) colorscheme; + largest = f: xs: builtins.head (builtins.sort (a: b: a > b) (map f xs)); + largestWidth = largest (x: x.width) monitors; + largestHeight = largest (x: x.height) monitors; +in + { + width ? largestWidth, + height ? largestHeight, + }: + # Credit to misterio77 + pkgs.stdenv.mkDerivation { + name = "generated-nix-wallpaper-${colorscheme.slug}.png"; + src = pkgs.writeTextFile { + name = "template.svg"; + text = '' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ''; + }; + buildInputs = [pkgs.inkscape]; + unpackPhase = "true"; + buildPhase = '' + inkscape --export-type="png" $src -w ${toString width} -h ${toString height} -o wallpaper.png + ''; + installPhase = "install -Dm0644 wallpaper.png $out"; + } diff --git a/outputs/pkgs/website/src/templates/home.html b/outputs/pkgs/website/src/templates/home.html index 0a192dd..704127e 100644 --- a/outputs/pkgs/website/src/templates/home.html +++ b/outputs/pkgs/website/src/templates/home.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% block home %}
@@ -35,6 +36,5 @@ -{% block home %} {{ section.content | safe }} {% endblock home %} diff --git a/outputs/pkgs/wii-u-gc-adapter/default.nix b/outputs/pkgs/wii-u-gc-adapter/default.nix new file mode 100644 index 0000000..e4a0af5 --- /dev/null +++ b/outputs/pkgs/wii-u-gc-adapter/default.nix @@ -0,0 +1,53 @@ +{ + lib, + stdenv, + fetchFromGitHub, + pkg-config, + libusb1, + udev, +}: +stdenv.mkDerivation { + pname = "wii-u-gc-adapter"; + version = "unstable-2020-01-20"; + + src = fetchFromGitHub { + owner = "ToadKing"; + repo = "wii-u-gc-adapter"; + rev = "fa098efa7f6b34f8cd82e2c249c81c629901976c"; + hash = "sha256-wm0vDU7QckFvpgI50PG4/elgPEkfr8xTmroz8kE6QMo"; + }; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + libusb1 + udev + ]; + + # Add -Wformat to CFLAGS to enable format checks + NIX_CFLAGS_COMPILE = "-Wformat"; + + # Disable hardening to prevent format security errors + hardeningDisable = ["format"]; + + makeFlags = ["PREFIX=${placeholder "out"}"]; + + # Add install phase since Makefile doesn't have one + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + cp wii-u-gc-adapter $out/bin/ + + runHook postInstall + ''; + + meta = with lib; { + description = "Tool for using the Wii U GameCube Adapter on Linux"; + homepage = "https://github.com/ToadKing/wii-u-gc-adapter"; + license = licenses.mit; + platforms = platforms.linux; + }; +} diff --git a/outputs/templates/basic/flake.nix b/outputs/templates/basic/flake.nix new file mode 100644 index 0000000..9db2f0c --- /dev/null +++ b/outputs/templates/basic/flake.nix @@ -0,0 +1,15 @@ +{ + description = "Description for the project"; + + inputs = { + flake-parts.url = "github:hercules-ci/flake-parts"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + systems.url = "github:nix-systems/default-linux"; + }; + + outputs = inputs @ {flake-parts, ...}: + flake-parts.lib.mkFlake {inherit inputs;} { + systems = import inputs.systems; + imports = [./outputs]; + }; +} diff --git a/outputs/templates/basic/outputs/default.nix b/outputs/templates/basic/outputs/default.nix new file mode 100644 index 0000000..ad0ccde --- /dev/null +++ b/outputs/templates/basic/outputs/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./shell.nix + ./pkgs.nix + ]; +} diff --git a/outputs/templates/basic/outputs/pkgs.nix b/outputs/templates/basic/outputs/pkgs.nix new file mode 100644 index 0000000..7300efe --- /dev/null +++ b/outputs/templates/basic/outputs/pkgs.nix @@ -0,0 +1,24 @@ +{self, ...}: { + perSystem = { + pkgs, + self', + lib, + ... + }: let + inherit (lib) getExe; + in { + packages.default = pkgs.stdenvNoCC.mkDerivation { + pname = "my package"; + version = "0.1.0"; + src = "${self}/src"; + nativeBuildInputs = []; + + buildPhase = ""; + dontInstall = true; + }; + apps.default = { + type = "app"; + program = "${getExe self'.packages.default}"; + }; + }; +} diff --git a/outputs/templates/basic/outputs/shell.nix b/outputs/templates/basic/outputs/shell.nix new file mode 100644 index 0000000..97f9514 --- /dev/null +++ b/outputs/templates/basic/outputs/shell.nix @@ -0,0 +1,10 @@ +{ + perSystem = {pkgs, ...}: { + devShells.default = pkgs.mkShellNoCC { + name = "project devshell"; + packages = + builtins.attrValues { + }; + }; + }; +} diff --git a/outputs/templates/default.nix b/outputs/templates/default.nix new file mode 100644 index 0000000..86152ca --- /dev/null +++ b/outputs/templates/default.nix @@ -0,0 +1,12 @@ +{ + flake.templates = { + default = { + path = ./basic; + description = "Default project template"; + }; + go = { + path = ./go; + description = "Basic go template"; + }; + }; +} diff --git a/outputs/templates/go/flake.nix b/outputs/templates/go/flake.nix new file mode 100644 index 0000000..9db2f0c --- /dev/null +++ b/outputs/templates/go/flake.nix @@ -0,0 +1,15 @@ +{ + description = "Description for the project"; + + inputs = { + flake-parts.url = "github:hercules-ci/flake-parts"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + systems.url = "github:nix-systems/default-linux"; + }; + + outputs = inputs @ {flake-parts, ...}: + flake-parts.lib.mkFlake {inherit inputs;} { + systems = import inputs.systems; + imports = [./outputs]; + }; +} diff --git a/outputs/templates/go/outputs/default.nix b/outputs/templates/go/outputs/default.nix new file mode 100644 index 0000000..ad0ccde --- /dev/null +++ b/outputs/templates/go/outputs/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./shell.nix + ./pkgs.nix + ]; +} diff --git a/outputs/templates/go/outputs/pkgs.nix b/outputs/templates/go/outputs/pkgs.nix new file mode 100644 index 0000000..32ebf2a --- /dev/null +++ b/outputs/templates/go/outputs/pkgs.nix @@ -0,0 +1,20 @@ +{self, ...}: { + perSystem = { + pkgs, + self', + lib, + ... + }: { + packages.default = pkgs.buildGoModule { + pname = "hello"; + version = "0.0.1"; + src = "${self}/src"; + meta.mainProgram = "hello"; + vendorHash = null; + }; + apps.default = { + type = "app"; + program = "${lib.getExe self'.packages.default}"; + }; + }; +} diff --git a/outputs/templates/go/outputs/shell.nix b/outputs/templates/go/outputs/shell.nix new file mode 100644 index 0000000..ccf8508 --- /dev/null +++ b/outputs/templates/go/outputs/shell.nix @@ -0,0 +1,10 @@ +{ + perSystem = {pkgs, ...}: { + devShells.default = pkgs.mkShellNoCC { + name = "project devshell"; + packages = builtins.attrValues { + inherit (pkgs) go gopls gotools go-tools; + }; + }; + }; +} diff --git a/outputs/templates/go/src/go.mod b/outputs/templates/go/src/go.mod new file mode 100644 index 0000000..37ae5b3 --- /dev/null +++ b/outputs/templates/go/src/go.mod @@ -0,0 +1,3 @@ +module hello + +go 1.23.2 diff --git a/outputs/templates/go/src/main.go b/outputs/templates/go/src/main.go new file mode 100644 index 0000000..b0ab032 --- /dev/null +++ b/outputs/templates/go/src/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("Hello World!") +} diff --git a/repomix.config.json b/repomix.config.json new file mode 100644 index 0000000..c0f1d48 --- /dev/null +++ b/repomix.config.json @@ -0,0 +1,25 @@ +{ + "output": { + "filePath": "repodump.xml", + "style": "xml", + "fileSummary": true, + "directoryStructure": true, + "removeComments": false, + "removeEmptyLines": false, + "topFilesLength": 5, + "showLineNumbers": false, + "copyToClipboard": false + }, + "include": [], + "ignore": { + "useGitignore": true, + "useDefaultPatterns": true, + "customPatterns": [] + }, + "security": { + "enableSecurityCheck": true + }, + "tokenCount": { + "encoding": "o200k_base" + } +} diff --git a/secrets/github_key.age b/secrets/github_key.age deleted file mode 100644 index a5ce29f..0000000 Binary files a/secrets/github_key.age and /dev/null differ diff --git a/secrets/keys.nix b/secrets/keys.nix deleted file mode 100644 index a3cf90f..0000000 --- a/secrets/keys.nix +++ /dev/null @@ -1,25 +0,0 @@ -let - users = { - ooks = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEx2kNirkcFrNji+qz7KX+zdRxpgJyOwK0vyBrx9Ae3c"; - }; - - hosts = { - ooksdesk = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBn3ff3HaZHIyH4K13k8Mwqu/o7jIABJ8rANK+r2PfJk"; - ooksmedia = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL7ttz1jTy+byfzi874vogy3ZPLW9+8W2o512tdsqUUV"; - ookst480s = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEWFZwTuHIITHa7s4Zp6KPF2suZIMXZbe085OiG0GRh5"; - ooksphone = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINredx07UAk2l1wUPujYnmJci1+XEmcUuSX0DIYg6Vzz"; - ooksmicro = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMUSu2iy3GvMXT5eEDAymIwSQe8UuVG5GH5FJ408JiG4"; - ooksx1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBR6Cyx64Qjth/4aS2x95scEkfiOnsCzufMZW5e41bfE"; - }; - - workstations = [ - hosts.ooksdesk - hosts.ooksmedia - hosts.ookst480s - hosts.ooksphone - hosts.ooksmicro - hosts.ooksx1 - ]; -in { - inherit users hosts workstations; -} diff --git a/secrets/ooknet_org.age b/secrets/ooknet_org.age deleted file mode 100644 index e957cac..0000000 Binary files a/secrets/ooknet_org.age and /dev/null differ diff --git a/secrets/secrets.nix b/secrets/secrets.nix deleted file mode 100644 index 10c1d7c..0000000 --- a/secrets/secrets.nix +++ /dev/null @@ -1,9 +0,0 @@ -let - keys = import ./keys.nix; - inherit (keys) users workstations; -in { - "tailscale-auth.age".publicKeys = [users.ooks] ++ workstations; - "github_key.age".publicKeys = [users.ooks] ++ workstations; - "spotify_key.age".publicKeys = [users.ooks] ++ workstations; - "ooknet_org.age".publicKeys = [users.ooks] ++ workstations; -} diff --git a/secrets/spotify_key.age b/secrets/spotify_key.age deleted file mode 100644 index 06f0b6b..0000000 --- a/secrets/spotify_key.age +++ /dev/null @@ -1,17 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 xeHnUA +isoneTG5GTQVZ2mkNWJMApJL0EbtlRg2lE7CFPVs0o -b0katAQ3DeRRTZZKzexJMM5JtcqY6pPpz1Z017ZmVBw --> ssh-ed25519 6HvatA Knq4A7wvjmXnWAikVSbv9BALW7f0lph2bQsiyUcilSo -SFHeWqjVO5jxnNW0cgE9qJrg0xG8SkEfZ87GpE77EZ8 --> ssh-ed25519 3DwG4w j7k+whyqKrKrkQCIMkOHl+EpCsIlJqtfqBShCc1ZGkk -vLwteoZ9DvjAecJJhPzcXvnMVsKWEDwHiL76fm2PTC0 --> ssh-ed25519 Nn8WxA ENSIpye6C7RaxwmUQP4fGD3NZ/mXh7Q0gyNsdvEGyxU -zhKepo7NqWe4NVTRcTcqKJavgZdHAXi5TK8nsHqRJNA --> ssh-ed25519 Gd+9pg wlz2TZrZVdNz9yBugvydWeUgc/430iOPpDP3+aJ0nDo -ST+uLYDvOg95qXN86vsvKmlr56sttg7Z7l4OAJfgytI --> ssh-ed25519 eMj+Jg XP+CWaVkKTzptg2lpmPcT0d+K3JoDTfmFjpyKouqwXk -WGrv56kthwxT88xXSyaPecLklfumxva9RxCoFNZwVTU --> ssh-ed25519 MQ/7Ew XgTs4XL6bGspzSFdT2IW4BW3MPjdP0YiLQqo0SDR+EI -18MBJWrgjk3J58EPZjwW/OwAo3bKG+jHztowqQeYG5M ---- nxPnfZNn24Q70LqqEO2Mo76xPcaBuZ7OEYXTO0Ac/wk -4V+_