Compare commits

...

213 commits

Author SHA1 Message Date
81377aef7d ollama: disable until fixed
Some checks failed
Nix Flake Check / Check Formatting (push) Waiting to run
Nix Flake Check / Check Dead Code (push) Waiting to run
Nix Flake Check / Check Flake (push) Waiting to run
Build packages and push to cache / build (caddy-with-cloudflare) (push) Has been cancelled
Build packages and push to cache / build (fpp-config) (push) Has been cancelled
Build packages and push to cache / build (fpp-launcher) (push) Has been cancelled
Build packages and push to cache / build (fpp-sd) (push) Has been cancelled
Build packages and push to cache / build (live-buds-cli) (push) Has been cancelled
Build packages and push to cache / build (ook-vim) (push) Has been cancelled
Build packages and push to cache / build (project-plus) (push) Has been cancelled
Build packages and push to cache / build (repomix) (push) Has been cancelled
Build packages and push to cache / build (spotify-player) (push) Has been cancelled
Build packages and push to cache / build (website) (push) Has been cancelled
Build packages and push to cache / build (wii-u-gc-adapter) (push) Has been cancelled
2025-01-30 23:26:33 +11:00
f55e861fdd modules: vale init 2025-01-29 23:16:46 +11:00
46cf664bb5 flake: bump secrets 2025-01-29 19:04:40 +11:00
85eb695499 wallpaper: credit 2025-01-29 19:04:33 +11:00
e2bb0b4a00 hyprland: hyprlock tweaks/syncthing tray window rules 2025-01-29 19:04:01 +11:00
c1a264e98e amd-gpu: use amdvlk and opencl modules 2025-01-29 17:26:31 +11:00
377bd48ee5 ollama: init 2025-01-29 17:26:11 +11:00
bf49665871 flake: update secrets 2025-01-28 19:59:57 +11:00
a31bebbf74 neovim: nvf options change enableconfig --> globals 2025-01-28 19:59:48 +11:00
48368d3be2 home: remove term env 2025-01-28 19:59:20 +11:00
9dd3ff1f8f starship: enable transience 2025-01-28 19:58:55 +11:00
8e84af98ac syncthing: init 2025-01-28 19:58:23 +11:00
84849d5b2d userDirs: Summit init 2025-01-28 19:56:06 +11:00
9bd427e365 docs: minor tweaks 2025-01-26 22:47:55 +11:00
68af92924f ci: ignore readme 2025-01-26 22:40:28 +11:00
ooks-io
28cbe5f554 docs: add screenshot to readme 2025-01-26 22:36:57 +11:00
b631904365 docs: readme 2025-01-26 21:57:49 +11:00
38c00f771b flake: bump all inputs 2025-01-26 15:38:10 +11:00
9dee07646d deadnix 2025-01-26 14:57:46 +11:00
1438b4f9f1 neovim: add debounce flag to ltex-ls 2025-01-25 20:53:22 +11:00
b98b3a1472 equicord: more options 2025-01-25 20:53:01 +11:00
5604745c78 neovim: add vale & ltex-lsp 2025-01-24 22:30:45 +11:00
aa3af5f0e5 ghostty: add basic keybinds & add to swallow regex 2025-01-22 20:16:07 +11:00
0749f112b0 ci: missing nix-install 2025-01-21 18:27:40 +11:00
e91fc01543 ci: consolidate check and format 2025-01-21 18:25:05 +11:00
8a0a7d444c ghostty: add shaders derivation 2025-01-21 17:02:04 +11:00
4ffecbac0c terminal: foot --> ghostty 2025-01-21 15:35:02 +11:00
512774da02 zellij: remove old layout configuration 2025-01-21 13:39:30 +11:00
7de6837bb6 docs: add comment on spotify-player package 2025-01-21 13:34:08 +11:00
b07798e0e8 zellij: rework layout configuration
extend the base zellij home-manager module to include the option to
define layouts with zjstatus, opinionated module; will never be
upstreamed in current state

also re-enable cava as build failure has been fixed in nixpkgs
2025-01-21 13:33:40 +11:00
602b82fb04 nix: add shortcut to kunzen repo 2025-01-21 13:31:41 +11:00
1ba4fd2d8d deadnix 2025-01-20 21:05:27 +11:00
d3d0ae8fcb refactor: move secrets off-shore 2025-01-20 20:57:53 +11:00
0ecc1cbf40 alejandra 2025-01-20 11:29:49 +11:00
6c644b8a80 deadnix 2025-01-20 11:17:12 +11:00
fcc280a41a ci: just use kunzen key 2025-01-19 23:38:26 +11:00
9f296a42cd ci: use ssh for check 2025-01-19 23:02:14 +11:00
dee0d03fad ci: add kunzen repo 2025-01-19 22:20:59 +11:00
475fe7769c ci: add some git debug output 2025-01-19 22:14:20 +11:00
7f3ee1d335 ci: debug private key 2025-01-19 22:09:23 +11:00
e0fc5903cd ci: app_id -> app-id 2025-01-19 22:00:37 +11:00
b940df6af7 ci: use github app 2025-01-19 21:58:06 +11:00
bc64202040 flake: kunzen allRefs 2025-01-19 17:06:16 +11:00
4e1310c367 ci: try with determinate systems github-token 2025-01-19 17:02:30 +11:00
bdf2b6d5ea ci: use kunzen token 2025-01-19 16:55:54 +11:00
7331571240 ci: try https 2025-01-19 16:07:25 +11:00
0055bb8146 flake: use https instead of ssh 2025-01-19 15:59:38 +11:00
214622f76f flake: reduce closure 2025-01-19 14:04:54 +11:00
2abc93421c ci: test token for check 2025-01-19 13:59:51 +11:00
c5fe176f38 ci: debug private flake input 2025-01-19 12:36:27 +11:00
8964a0c3a3 ci: run instead of use 2025-01-19 12:33:08 +11:00
af10032dcb flake: remove unused input 2025-01-19 12:29:30 +11:00
b48c99ab6f ci: add workflow dispatch trigger 2025-01-19 12:29:20 +11:00
07caf5671d neovim: add yaml ts grammar 2025-01-19 00:29:47 +11:00
3a3e949e64 music: disable sixel for spotify 2025-01-19 00:29:26 +11:00
082722b2a8 ci: add check and format workflows 2025-01-19 00:28:47 +11:00
6f3ab0b8d3 spotify-player: lower default volume and disable image 2025-01-18 21:09:51 +11:00
ccec508959 ci: multi-line string 2025-01-18 17:43:57 +11:00
ooks-io
aaf89fc568
ci: fix ci 2025-01-18 17:40:52 +11:00
4ae8e33508 project-plus: remove useless flags 2025-01-18 17:31:54 +11:00
c919b04614 ci: test 2025-01-18 17:29:31 +11:00
7109d9dcf2 ci: fix err 2025-01-18 17:23:58 +11:00
b8149a8beb ci: add packages path to cachix workflow 2025-01-18 17:21:59 +11:00
60730c1cd2 nix: add ooknet cachix cache 2025-01-18 17:21:27 +11:00
d0040b8a0f cachix: initial config 2025-01-18 15:48:49 +11:00
12d9089907 ci: garnix 2025-01-17 23:06:00 +11:00
374e91ebba project-plus: testing qt flags 2025-01-17 23:05:53 +11:00
910d6f99c6 qt: update kdeglobals 2025-01-17 23:05:37 +11:00
f10661f33f packages: repopack -> repomix 2025-01-17 23:05:05 +11:00
887507a022 appearance: add berkeley font 2025-01-17 19:47:56 +11:00
11f014919a hyprland: add animation option to windowrules module 2025-01-16 23:15:35 +11:00
a0eed0bcc1 foot: disable dpi aware 2025-01-16 23:15:08 +11:00
d8d1fc4b01 hyprland: add dropdown bar 2025-01-16 23:14:57 +11:00
5596951ab9 qt: implement kvantum 2025-01-16 23:14:32 +11:00
d91bb7c006 project-plus: add fullscreen/analytics option 2025-01-16 11:07:07 +11:00
0873f56c28 hyprland: workspace/rules module init
still some work too be done, the regex types are cursed.
2025-01-15 23:03:36 +11:00
0b8a730519 neovim: add follow_url_func option 2025-01-14 12:29:28 +11:00
25452b9540 neovim: enable spellchecker 2025-01-14 12:29:00 +11:00
3d1a0dc56f neovim: disable markdown preview auto-start 2025-01-14 12:28:51 +11:00
3207e27f1d ookst480s: disable gaming profile 2025-01-14 12:28:10 +11:00
249b68cb16 nix: add builders-use-substitutes setting 2025-01-13 21:13:18 +11:00
7f784a59fa nixos: use ssh-ng as default distributed builds protocol 2025-01-13 20:57:13 +11:00
ce67d0de9b hardware: remove monitor.workspace option, add primaryMonitor option 2025-01-13 20:56:22 +11:00
338e3a25a1 forgejo: add forgejo cli script 2025-01-13 13:27:56 +11:00
615cea9f50 caddy: use nixpkgs caddy.withPlugins helper 2025-01-13 13:27:56 +11:00
aa2d8c578e nixos: distributed builds config init 2025-01-13 13:25:23 +11:00
f020ae8902 hardware: add cpu cores option 2025-01-13 13:25:06 +11:00
4191eb50bf project-plus: remove sd and launcher from derivation 2025-01-11 20:19:32 +11:00
5aae9cdf5d gaming: nixos emulation module 2025-01-11 20:18:53 +11:00
f59c08deb5 project-plus: home-manager module init 2025-01-11 20:18:38 +11:00
1898815955 packages: project-plus; remove User config 2025-01-10 21:50:38 +11:00
35af389158 firefox: fix navbar css
add delay to when navbar collapses
2025-01-09 21:57:59 +11:00
1c29de52d3 nvf: add custom theme module \ 2025-01-09 21:57:30 +11:00
e2a4f1c4bb nvf: add obsidian newNote mapping 2025-01-09 21:56:58 +11:00
308f18cdcd packages: project plus init 2025-01-09 21:56:36 +11:00
5fee6a8970 packages: wii-u-gc-adapter init 2025-01-09 21:56:19 +11:00
4c08871afe neovim: center filename with lualine 2025-01-07 16:26:14 +11:00
b0cfbf184f fish: neovim telescope alias init 2025-01-07 16:25:55 +11:00
acb87b6bb1 neovim: add extended obsidian plugin module 2025-01-07 14:34:47 +11:00
928db722b4 neovim: enable markdown module 2025-01-06 21:55:23 +11:00
7174cbcd3d neovim: enable obsidian plugin module 2025-01-06 21:55:05 +11:00
779b437a13 neovim: mapping obsidian option init 2025-01-06 21:54:39 +11:00
c4053ad9c1 printing: remove canon printer packager, fails to build 2025-01-06 21:54:05 +11:00
728ef6ca9a audio: hardware.pulseaudio > services.pulseaudio 2025-01-06 21:53:32 +11:00
e95ae8039f hyprland: disable borders plus plus
not working as of hyprland v0.46.2
2025-01-06 21:53:08 +11:00
7ed3b8f63c firefox: update navbar css
issue with navbar auto-hide, hopefully resolved
2025-01-06 21:52:27 +11:00
7701446130 neovim: markdown plugins 2025-01-06 17:07:55 +11:00
78c70e0560 hyprlock: small text change
couldnt get the glyph to work correctly
2025-01-06 16:30:40 +11:00
09715c8570 vesktop: remove patch 2025-01-06 16:30:21 +11:00
caa0f0de74 flake: bump 2025-01-06 16:29:43 +11:00
0cb5596d22 ghostty: disable
wont be moving to ghostty for now
2025-01-06 16:29:34 +11:00
bcf9055675 networking: wait-online service fix 2025-01-06 16:29:04 +11:00
859ba27ce0 fonts: new nerd-font packages 2025-01-06 16:28:30 +11:00
8d9c2a0ed2 neovim: changes to how we access nvf.lib 2025-01-06 16:27:13 +11:00
7868ac1529 greetd: fix launch command 2025-01-06 13:19:09 +11:00
4d20cc82c4 themes: change minimal theme font size 2025-01-06 13:18:58 +11:00
f3a2f91254 colors: change border colors 2025-01-06 13:18:34 +11:00
c2d52a2683 templates: fix flake application module 2025-01-06 13:18:19 +11:00
45b6a907fb waybar: remove test component 2025-01-06 13:17:40 +11:00
34dbb54d6c tools: add scrcpy 2025-01-05 23:49:28 +11:00
f9958ab4f7 ooksdesk: swap to new monitor 2025-01-05 23:48:27 +11:00
e01e845a43 virt-manager: add remmina package 2025-01-05 22:09:47 +11:00
94f793b6ff gaming: add ns-usbloader module 2025-01-05 22:09:22 +11:00
625e67339e home: add emulation module 2025-01-05 22:08:50 +11:00
e9451f4a4a home: ghostty init 2024-12-29 22:12:07 +11:00
1fa7ae2a66 nixos: rework font options 2024-12-10 19:11:52 +11:00
c9f7e6b53c ooksdesk: swap back to minimal theme 2024-12-10 19:11:33 +11:00
3f11846977 nixos: initial bitmap font support 2024-12-08 23:04:16 +11:00
3cb560dfe1 flake: bump 2024-12-07 22:53:09 +11:00
4dd03e713b flake: switch to nvf main branch 2024-12-07 22:53:04 +11:00
aaa88d49d7 nvf: 0.7 changes 2024-12-07 22:52:48 +11:00
671da8f322 home: add aseprite package 2024-12-07 22:51:34 +11:00
664b22c2bb home: add tailscale-systray service 2024-12-06 13:52:32 +11:00
bf43fc8e64 nixos: pass ook args to home-manager 2024-12-06 13:52:09 +11:00
7c5bd43295 lib: add service helper function 2024-12-06 13:51:50 +11:00
0555fe90c4 nixos: remove service based media server 2024-12-06 13:51:34 +11:00
df9d1625d7 nixos: remove service based media server 2024-12-05 21:34:49 +11:00
4fbe8fcfbf secrets: add cloudflare credentials secret 2024-12-04 13:21:02 +11:00
6a3585e7e5 lib: fix mkLabel function 2024-12-04 13:20:48 +11:00
bee284691a ookflix: segment modules 2024-12-04 13:19:54 +11:00
4edb21607c nixos: add admin.email option 2024-12-04 13:19:18 +11:00
061713745e caddy: add cloudflare ipv4 addresses to trusted proxies 2024-12-02 19:34:21 +11:00
c6b06d5ba7 secrets: fix container secret helper function 2024-12-02 18:56:04 +11:00
a9ef09a8a4 website: caddy cloudflare package 2024-12-02 18:55:35 +11:00
c096dc295a ookflix: refactors FIX COMMIT 2024-12-02 18:55:06 +11:00
da77c223ff ooksmedia: remove ookflix from host conf 2024-12-02 18:54:26 +11:00
79a37fa8eb ookflix: add containers 2024-12-02 12:30:30 +11:00
4ee2e2a877 ookflix: add gluetun 2024-12-02 12:30:13 +11:00
7da5a6a4a6 winlab: init 2024-12-02 12:29:53 +11:00
8b8725d907 secrets: add container secret 2024-12-02 12:29:40 +11:00
4a2c8ccb39 hosts: enable ookflix service on ooksmedia 2024-12-02 12:29:09 +11:00
eb1d01174d server: rework service based media server 2024-12-02 12:28:46 +11:00
cf9a5b90bd secrets: use full mullvad file path 2024-12-02 12:28:22 +11:00
094a457045 ooksmedia: enable ookflix 2024-12-02 12:27:27 +11:00
eeb5472692 lib: pass ook arg to hosts via builder 2024-12-01 18:35:54 +11:00
d0ca588ece flake: bump 2024-12-01 18:35:29 +11:00
2d437acfbb ookflix: initial ookflix commit 2024-12-01 18:35:22 +11:00
9459f9e1f6 nixos: add server conditionals to network manager configuration
ensure wifi mac address is static if host is a server
2024-11-30 16:29:42 +11:00
4f20813139 ooksmedia: use jellyfin drive 2024-11-28 10:32:20 +11:00
048341b126 flake: add vpn-confinement 2024-11-27 22:47:20 +11:00
2565005fe0 secrets: add mullvad_wg conf file 2024-11-27 22:38:41 +11:00
33e5d8fbea media-server: add vpn module 2024-11-27 22:26:55 +11:00
54469932ca ooksmedia: add media-server mount 2024-11-27 22:26:41 +11:00
3ef446f9b3 website: use tmpfiles.settings 2024-11-25 23:50:06 +11:00
a98484b420 media-server: add streamer user config 2024-11-24 21:28:04 +11:00
7590d9af07 server: initial media server config 2024-11-23 14:58:05 +11:00
05274f898b nixos: enable bluetooth module 2024-11-22 11:58:26 +11:00
794fb16445 flake: update all inputs 2024-11-22 11:15:36 +11:00
6652e534a4 home: disable cava until build failure is fixed 2024-11-22 11:15:25 +11:00
4ac9af3ca8 ookst480s: update host modules 2024-11-22 11:14:55 +11:00
033588cb19 ooksmedia: hardware config 2024-11-22 11:13:22 +11:00
10816d1a0a hosts: add ooksmedia 2024-11-21 12:24:04 +11:00
f3895ce019 pkgs: remove instawow 2024-11-19 17:21:41 +11:00
9023bd2b64 nixos: remove colorscheme module 2024-11-19 17:15:41 +11:00
7274434d34 ook-vim: add go language module 2024-11-19 17:15:22 +11:00
757f268a10 flake: bump nvf 2024-11-19 17:15:06 +11:00
a83b2f7fa5 templates: add go files to go template 2024-11-19 17:14:58 +11:00
7a4216ae43 nixos: use hozen colors for generated wallpaper 2024-11-19 17:13:59 +11:00
151da369a0 templates: initial templates config 2024-11-19 11:26:21 +11:00
ecbb5c8700 home: coloscheme module -> hozen arg 2024-11-18 17:47:27 +11:00
edc99e84ef neovim: update plugin module names 2024-11-18 11:31:16 +11:00
a30e2a0bc1 lib: improve types/checks 2024-11-18 11:28:33 +11:00
10c1ed7ecb home: swap to hozen color system 2024-11-17 21:57:53 +11:00
df751735d3 ooksdesk: add creative profile 2024-11-16 22:50:59 +11:00
15a2488af9 home: tweaks to cover image scaling
spoiler, its still scuffed
2024-11-15 15:20:43 +11:00
0251c7883b firefox: rework useChrome theme 2024-11-15 15:20:11 +11:00
a99ae9e8b8 home: fix zellij menu to reflect changes to zellij cmd 2024-11-14 15:18:34 +11:00
8e7cd348b1 hyprland: swap back to mako from swaync 2024-11-14 15:18:09 +11:00
c2f10e1c47 virtualization: gnome.adwaita -> pkgs.adwaita 2024-11-13 12:56:52 +11:00
e00a70ca53 hozen: add slug arg 2024-11-13 12:55:59 +11:00
1874a33f84 flake: update all 2024-11-13 12:55:01 +11:00
c92c5be401 nixos: swap to google dns from quad 2024-11-13 12:54:46 +11:00
5284f668a2 home: add nemo file-manager 2024-11-13 12:54:25 +11:00
0d83bc4c2c hyprland: add 1password quick access bind
hyprland: add 1password quick access bind
2024-11-13 12:54:12 +11:00
0b671a4752 hyprland: update shadow configuration 2024-11-13 12:53:11 +11:00
86b4adb6e2 hyprland: add swaync init config 2024-11-13 12:52:48 +11:00
0be36da274 home: add networking tools to console 2024-11-13 12:52:16 +11:00
e84922c5f9 home: add btop theme 2024-11-13 12:51:58 +11:00
0329f7e485 ooksdesk: add virtualization profile 2024-11-13 12:51:39 +11:00
44d58268ac nixos: add virtualization module 2024-11-10 23:06:27 +11:00
e490c6be8e home: pass hozen arg to home-manager 2024-11-09 22:50:34 +11:00
5688d97e0c home: move foot color configuration -> hozen 2024-11-09 22:49:57 +11:00
dfc0084dd8 home: increase mako warning width 2024-11-09 22:49:38 +11:00
8e217a3768 workstation: add waydroid 2024-11-08 16:35:17 +11:00
11bd9a3671 hozen: add new color system 2024-11-08 16:35:01 +11:00
723bf4d367 test: generated docs 2024-11-07 13:35:07 +11:00
0621d2c448 test: generated docs 2024-11-07 13:30:00 +11:00
133b184e70 test: generated docs 2024-11-07 13:27:06 +11:00
9d5fcc0668 lib: add color function collection 2024-11-06 18:49:36 +11:00
3773a25ef1 colors: fix module option 2024-11-05 20:54:12 +11:00
c51a2d7fd4 fix: minimal theme colorscheme name 2024-11-04 19:51:47 +11:00
71e0903e63 nixos: temp nix_path fix 2024-11-04 19:51:23 +11:00
201041b835 docs: fix colors readme 2024-11-04 13:00:32 +11:00
251 changed files with 11924 additions and 2596 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

47
.github/workflows/cachix.yaml vendored Normal file
View file

@ -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

47
.github/workflows/check.yaml vendored Normal file
View file

@ -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

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
repodump.xml

5
.repomixignore Normal file
View file

@ -0,0 +1,5 @@
*.lock
**/equicord/options.nix
**/gruv.nix
.repomixignore
repomix*

152
README.md Normal file
View file

@ -0,0 +1,152 @@
<h1 align=center> ooknet </h1>
<p align= center>A monorepo for all my nix expressions powered by flake-parts.</p>
## 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
<img src=".github/assets/2025-01-26T21:52:48,481278761+11:00.png" />
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/)

2511
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -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";
secrets = {
url = "git+ssh://git@github.com/ooks-io/kunzen";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
systems.follows = "systems";
};
ooknet-website = {
url = "git+ssh://git@github.com/ooks-io/website";
inputs.nixpkgs.follows = "nixpkgs";
};
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";

View file

@ -1,9 +0,0 @@
{
ooknet.host = {
admin = {
name = "ooks";
shell = "fish";
homeManager = true;
};
};
}

View file

@ -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";

View file

@ -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;
}
];
};

View file

@ -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";
}

View file

@ -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 = [];
}

View file

@ -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;
}
];
};
}

View file

@ -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";

View file

@ -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.luks.devices."cryptnix".device = "/dev/disk/by-uuid/014d725c-bf13-40a2-a9ab-0dd6185a95f6";
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" = {
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" = {
"/nix" = {
device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283";
fsType = "btrfs";
options = ["subvol=nix"];
};
fileSystems."/persist" = {
"/persist" = {
device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283";
fsType = "btrfs";
options = ["subvol=persist"];
};
fileSystems."/swap" = {
"/swap" = {
device = "/dev/disk/by-uuid/19e4cf0f-b5ac-4544-a44b-c017b23fd283";
fsType = "btrfs";
options = ["subvol=swap"];
};
fileSystems."/boot" = {
"/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.<interface>.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;
}

View file

@ -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;
}
];
};
}

View file

@ -1,12 +0,0 @@
{
config = {
ooknet.workstation = {
appearance = {
theme = "minimal";
};
desktop = {
environment = "hyprland";
};
};
};
}

View file

@ -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"];
};

View file

@ -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";
};
};
};

View file

@ -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";
};

View file

@ -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
'';
};

View file

@ -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}"
'';
};
}

View file

@ -1,6 +1,8 @@
{
imports = [
./bat.nix
./vale.nix
./networking.nix
./btop.nix
./git.nix
./fzf.nix

View file

@ -14,4 +14,3 @@ in {
home.sessionVariables.EDITOR = mkIf (console.editor == "nvim") "nvim";
};
}

View file

@ -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 {

View file

@ -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
}
}
'';
}

View file

@ -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"
}
}
'';
}

View file

@ -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"
}
}
'';
}

View file

@ -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;
};
};
}

View file

@ -0,0 +1,13 @@
{pkgs, ...}: let
inherit (builtins) attrValues;
in {
home.packages = attrValues {
inherit
(pkgs)
traceroute
mtr
dig
nmap
;
};
}

View file

@ -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 = "󰍛 ";

View file

@ -17,30 +17,24 @@ in {
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;
};
};
}

View file

@ -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";
};
};
};
}

View file

@ -1,6 +1,6 @@
{
imports = [
./qt.nix
./qt
./gtk.nix
./fonts.nix
./cursor.nix

View file

@ -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 = [
home.packages =
[
monospace.package
regular.package
pkgs.noto-fonts
pkgs.noto-fonts-cjk-sans
pkgs.noto-fonts-emoji
];
pkgs.nerd-fonts.symbols-only
]
++ optionals (monospace.fallback != null) [monospace.fallback.package];
}

View file

@ -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

View file

@ -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 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 #${base};
@define-color headerbar_fg_color #${text};
@define-color headerbar_border_color #${text};
@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 #${text};
@define-color card_fg_color #${color.typography.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 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 #${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 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;
}
''

View file

@ -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
];
}

View file

@ -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: <https://github.com/tsujan/Kvantum/blob/master/Kvantum/doc/Theme-Config>
"%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
];
}

File diff suppressed because it is too large Load diff

View file

@ -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}";
};
};
}

View file

@ -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 = {

View file

@ -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 = {

View file

@ -1,152 +1,226 @@
{
palette,
hozen,
fonts,
...
}:
with palette;
#css
}: let
inherit (hozen) color;
in
#css
''
/* minimal firefox css ooks */
/* ===== Color Variables and Root Styles ===== */
:root {
/* Fonts */
--font-mono: ${fonts.monospace.family}, monospace;
--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};
}
/* ===== 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; }
/* Hide navigation context menu items */
menupopup > #context-navigation,
menupopup > #context-sep-navigation { display: none !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; }
/* Hide customizable UI springs */
#customizableui-special-spring1,
#customizableui-special-spring2 { display: none; }
/* Hide Personal Toolbar */
#PersonalToolbar { display: none !important; }
/* ===== URL Bar Styling ===== */
#urlbar-container {
margin-left: 0 !important;
margin-right: 0 !important;
padding-top: 0 !important;
padding-bottom: 0!important;
.browser-toolbar {
padding-bottom: 1px !important;
}
#urlbar-background {
border: solid 1px !important;
border-radius: 0 !important;
outline: none !important;
background: #${crust} !important;
background-color: transparent !important;
border: unset !important;
box-shadow: unset !important;
}
#navigator-toolbox {
border: none !important;
border-bottom: solid 1px !important;\
#urlbar-container {
padding: 0 !important;
}
/* Hide URL bar go button */
.urlbar-go-button { display: none !important; }
/* Remove navigation bar background */
#nav-bar.browser-toolbar { background: none !important; }
/* Position and style navigation bar */
#nav-bar {
text-align: center;
min-height: 0 !important;
max-height: 0 !important;
height: 0 !important;
.urlbarView {
text-align: start;
border: var(--border) !important;
margin: 0;
padding: 0 !important;
background-color: var(--clr-menu);
}
/* Expand navigation bar on focus */
#nav-bar:focus-within {
max-height: 40px !important;
height: 60px !important;
min-height: 15px !important;
.urlbar-input-container {
margin: 0px !important;
}
/* ===== Tab Bar Styling ===== */
/* Hide title bar buttons and spacer */
.titlebar-close,
.titlebar-spacer { display: none !important; }
/* Remove tab margin */
#titlebar {
--proton-tab-block-margin: 0px !important;
--tab-block-margin: 0px !important;
#identity-icon {
color: red !important;
}
/* Remove tab shadows */
#tabbrowser-tabs:not([noshadowfortests]) .tab-background:is([selected], [multiselected]) {
box-shadow: none !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;
}
/* Hide tab-related buttons */
#alltabs-button,
.titlebar-buttonbox-container,
.tab-close-button,
.titlebar-spacer,
#tabs-newtab-button,
#alltabs-button,
#firefox-view-button,
#new-tab-button,
.tab-close-button { display: none !important; }
/* Style tabs */
tab {
font-family: var(--font-mono);
font-weight: bold;
#new-tab-button {
display: none;
}
/* Set tab and tab bar height */
#TabsToolbar, .tabbrowser-tab {
max-height: 35px !important;
background: #${crust} !important;
border: none;
#tabbrowser-tabs {
margin: 0 !important;
padding: 0 !important;
margin-inline: 0px !important;
border: unset !important;
border-bottom: var(--border-inactive) !important;
}
/* Center tabs when not overflowing */
#tabbrowser-arrowscrollbox:not([overflowing]) {
--uc-flex-justify: center;
.tabbrowser-tab {
padding: 3px !important;
padding-left: 3px !important;
--tab-label-mask-size: unset !important;
}
scrollbox[orient="horizontal"] {
justify-content: var(--uc-flex-justify, initial);
.tabbrowser-tab[pinned] {
padding: 3px !important;
}
/* Style selected tabs */
#tabbrowser-tabs .tabbrowser-tab[selected] .tab-content {
border: solid 1px var(--base05) !important;
color: var(--base07);
background: var(--base02)
#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])[orient="horizontal"] > #tabbrowser-arrowscrollbox > .tabbrowser-tab:nth-child(1 of :not([pinned], [hidden])) {
margin-inline-start: 0px !important;
}
/* Style non-selected tabs */
tab:not([selected="true"]) {
/* border: solid 1px var(--base05) !important; */
background: var(--base01) !important;
.tab-stack {
margin-inline: 0 !important;
}
.tab-background {
border-radius: 0px;
border: var(--border-inactive);
}
.tab-background[selected] {
border: var(--border-active);
}
#TabsToolbar {
padding-left: 0px !important;
margin: 0;
padding: 0;
}
/* 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 }
#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;
}
#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 }
#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;
}
/* 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 }
/* Move up the content view */
:root[sessionrestored]:not([inFullscreen],[chromehidden~="toolbar"]) > body > #browser{ margin-top: var(--uc-navbar-transform); }
''

View file

@ -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);

View file

@ -1,5 +1,6 @@
{
imports = [
./vesktop
./equicord
];
}

View file

@ -0,0 +1,4 @@
{
#imports = [./options.nix];
#programs.equicord.enable = true;
}

View file

@ -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 <https://momentjs.com/docs/#/displaying/format/> 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;
};
}

View file

@ -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) {
# <https://github.com/AlephNought0/Faery/blob/main/Home/Programs/Vesktop/patchedvesktop.patch>
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;

View file

@ -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<T extends object = any>(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;

View file

@ -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];
};
}

View file

@ -1,5 +1,6 @@
{
imports = [
./inkscape.nix
./aseprite.nix
];
}

View file

@ -10,6 +10,8 @@ in {
./wow.nix
./wine.nix
./bottles.nix
./emulation.nix
./project-plus
];
config = mkIf (elem "gaming" profiles) {
ooknet.binds = {

View file

@ -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";
};
};
}

View file

@ -0,0 +1,5 @@
{
imports = [
./options.nix
];
}

View file

@ -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;
# };
};
};
}

View file

@ -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 {
};
}

View file

@ -2,7 +2,6 @@
lib,
osConfig,
pkgs,
self',
...
}: let
inherit (lib) mkIf elem;

View file

@ -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}";
};

View file

@ -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
'';
};
};

View file

@ -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";

View file

@ -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;
}
'';

View file

@ -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";

View file

@ -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;
};

View file

@ -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}"

View file

@ -8,5 +8,7 @@
./monitor.nix
./gestures.nix
./appearance.nix
./workspaces.nix
./options
];
}

View file

@ -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;
};

View file

@ -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);
};
}

View file

@ -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;
}

View file

@ -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:^(TEKKEN8)$"
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 = "TEKKEN8";};
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%"
];
}
];
};
}

View file

@ -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;
};
};
}

View file

@ -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,56 +79,25 @@ 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
*/
programs.zellij.layouts.music = {
icon = "󰝚";
tabs =
# 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}"
}
}
children
}
tab name="spotify" focus=true {
pane name="spotify" {
borderless true
command "${getExe pkgs.spotify-player}"
command "${getExe self'.packages.spotify-player}"
focus true
}
pane name="Visualizer" {
@ -139,11 +107,7 @@ in {
command "${getExe pkgs.cava}"
}
}
}
'';
home.shellAliases = mkIf (zellij.enable || multiplexer == "zellij") {
zjm = "zellij --layout music";
};
};
}

View file

@ -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];

View file

@ -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 = {

View file

@ -1,5 +1,6 @@
{
imports = [
./foot.nix
./ghostty.nix
];
}

View file

@ -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";

View file

@ -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";
};
})
];
}

View file

@ -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";
};
};
}

View file

@ -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
];
}

View file

@ -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];
};
}

View file

@ -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";
}

View file

@ -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";
};
}

View file

@ -0,0 +1,5 @@
{pkgs, ...}: {
home.packages = [
pkgs.scrcpy
];
}

View file

@ -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";
};
}

View file

@ -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";
};
};
}

View file

@ -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 <https://nixos.wiki/wiki/Virt-manager>
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
};
};
}

View file

@ -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")

View file

@ -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;
};
};
mkFontOption =
mkBaseFontOption
// {
fallback = mkOption {
type = nullOr (submodule {options = mkBaseFontOption;});
default = null;
};
};
cfg = config.ooknet.appearance;
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;
};
};
};
}

View file

@ -1,285 +0,0 @@
let
/*
extended version of gruvbox/gruvbox material to support multiple frameworks:
- tailwind
- base16/24
- semantic
references:
shades
<https://coolors.co/dfd2b3-d9c7a5-d4be98-c6b395-b4a288-a49384-99897a-8b7c6f>
<https://coolors.co/1a1a1a-212121-282828-343232-3f3b3b-4d4947-585350-645f59-716860-7d6f64>
colors
<https://coolors.co/69713f-737c45-7f884c-8c9654-9aa55c-a9b665-b1be74-b8c481-bec98c-c4ce96>
<https://coolors.co/e57b76-ea6962-e95149-e33e35>
<https://coolors.co/e69965-e78a4e-e07b38-de732b>
*/
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;
}

View file

@ -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";
};
};
}

View file

@ -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)

View file

@ -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 {

View file

@ -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};
};
}

View file

@ -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
];
}

View file

@ -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];
};
}

View file

@ -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"];
};

View file

@ -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"];
}

View file

@ -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";
};
}

Some files were not shown because too many files have changed in this diff Show more