Compare commits

...

477 commits

Author SHA1 Message Date
afaa34df91 feat: use hypridle and hyprlock
All checks were successful
/ check (push) Successful in 5m27s
2024-12-21 17:10:45 -06:00
43c3db7f8a Center new floating windows
All checks were successful
/ check (push) Successful in 5m19s
2024-12-20 14:08:02 -06:00
4982ab72e3 Hopefully fix hyprland not waking from swayidle and use movewindow instead of swapwindow
All checks were successful
/ check (push) Successful in 5m11s
2024-12-20 13:18:26 -06:00
50c06ebd7f Merge remote-tracking branch 'origin/main'
All checks were successful
/ check (push) Successful in 5m15s
2024-12-20 11:08:06 -06:00
0baa4cadc7 Foxtrot bar 2024-12-20 11:07:57 -06:00
5149e4aef0 Fix memory icon
Some checks failed
/ check (push) Has been cancelled
2024-12-20 11:07:00 -06:00
7078e5b872 Add systray to eww bar
Some checks failed
/ check (push) Has been cancelled
2024-12-20 11:03:50 -06:00
cce109e79d Update xwaylandvideobridge windowrules
All checks were successful
/ check (push) Successful in 5m19s
2024-12-20 10:40:28 -06:00
43f35b76ce Fix window rules to work as intended, open initial apps on initial workspace
Some checks failed
/ check (push) Has been cancelled
2024-12-20 10:37:49 -06:00
4f8aea1ef4 Merge remote-tracking branch 'origin/main'
All checks were successful
/ check (push) Successful in 5m18s
2024-12-20 10:19:41 -06:00
0e38f4dd2a move dragon to hyprland, add wezterm long-command-finished notifications, update mako styles to be transparent and rounded, use mise by default 2024-12-20 10:14:12 -06:00
a49df451a2 Notifications are round
All checks were successful
/ check (push) Successful in 5m29s
2024-12-20 09:02:26 -06:00
df79b8dc4a Work on elixir template
All checks were successful
/ check (push) Successful in 5m24s
2024-12-19 21:39:53 -06:00
ebfe621f4c Simplify
All checks were successful
/ check (push) Successful in 5m19s
2024-12-19 20:36:06 -06:00
9fdea1fd17 Fix typo
Some checks failed
/ check (push) Has been cancelled
2024-12-19 20:34:17 -06:00
8c0dd0aa54 Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Has been cancelled
2024-12-19 20:31:28 -06:00
ab352eb08e Don't lock in templates during testing 2024-12-19 20:29:10 -06:00
d32bba279a Merge remote-tracking branch 'origin/main'
All checks were successful
/ check (push) Successful in 5m22s
2024-12-19 12:23:43 -06:00
9b24af3def Fix wezterm window changing size when font does 2024-12-19 12:23:24 -06:00
d5d4a1d96c Break up flake
All checks were successful
/ check (push) Successful in 5m16s
2024-12-18 09:30:00 -06:00
5481cdb362 Install jujutsu, disable emacs, bat for pager
All checks were successful
/ check (push) Successful in 5m31s
2024-12-16 10:44:00 -06:00
08f8e07f03 Forgejo style fixes
All checks were successful
/ check (push) Successful in 5m30s
2024-12-14 09:03:57 -06:00
76ee9ce49b Merge remote-tracking branch 'origin/main'
All checks were successful
/ check (push) Successful in 5m21s
2024-12-13 20:48:59 -06:00
78cfa9d619 Setup catppuccin forgejo/gitea theme 2024-12-13 20:48:40 -06:00
e0c8f39121 Enable asciidoc rendering in forgejo 2024-12-13 10:48:50 -06:00
46d30b8959 Merge remote-tracking branch 'origin/main'
All checks were successful
/ check (push) Successful in 5m35s
2024-12-12 18:55:06 -06:00
99b8097aa6 Fire 2024-12-12 18:54:56 -06:00
83e98441a7 Remove mako I hope?
Some checks failed
/ check (push) Has been cancelled
2024-12-12 10:35:51 -06:00
db9ec77114 HTPC updates
All checks were successful
/ check (push) Successful in 5m19s
2024-12-06 08:22:35 -06:00
b7ce066115 Thinker plasma
All checks were successful
/ check (push) Successful in 5m21s
2024-12-03 13:34:49 -06:00
7e8a92ddc7 Merge remote-tracking branch 'origin/main' 2024-12-03 13:29:05 -06:00
6ff76be7e4 Thablet graphics 2024-12-03 13:28:57 -06:00
3a7c517435 Wez
All checks were successful
/ check (push) Successful in 5m12s
2024-12-03 12:53:29 -06:00
6e4d4cfafc Re-activate the cache
All checks were successful
/ check (push) Successful in 5m14s
2024-12-02 20:09:05 -06:00
7373b9af7e Merge remote-tracking branch 'origin/main' 2024-12-02 19:58:23 -06:00
50b5b24d0f Merge 2024-12-02 19:58:12 -06:00
88e55cbd3a AMDGPU?
All checks were successful
/ check (push) Successful in 5m52s
2024-12-02 17:01:30 -06:00
a9b1a299cd Beef up
Some checks failed
/ check (push) Failing after 8s
2024-12-02 16:05:05 -06:00
849bb6bc9b Dragon up
Some checks failed
/ check (push) Has been cancelled
2024-12-02 13:31:59 -06:00
e9f6f85251 Home manager, too! 2024-12-02 13:27:49 -06:00
fd4d4ffa1a Update flake, nixos 24.11
Some checks failed
/ check (push) Failing after 9s
2024-12-02 13:05:36 -06:00
25d8cf48d5 No tmpfs for desktop since weird apps use /tmp weird
Some checks failed
/ check (push) Failing after 3m43s
2024-11-25 13:34:16 -06:00
196bd09206 Fix hyprland status in eww bar 2024-11-25 10:38:50 -06:00
c11e683a6a Bar
Some checks failed
/ check (push) Failing after 3m44s
2024-11-24 16:52:12 -06:00
fdc1fe0e16 Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Has been cancelled
2024-11-24 16:44:26 -06:00
787124b6fa Hyprland up 2024-11-24 16:44:17 -06:00
b43ada1c2b Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Failing after 3m32s
2024-11-24 08:56:34 -06:00
df933bdc6f oils 2024-11-24 08:55:26 -06:00
d8ed1f42ae Consistent tofi
All checks were successful
/ check (push) Successful in 4m42s
2024-11-22 08:22:14 -06:00
444502d6f1 Wezterm broken on wayland
Some checks failed
/ check (push) Has been cancelled
2024-11-22 08:13:16 -06:00
78daebdbb3 WIP WezTerm fixes
All checks were successful
/ check (push) Successful in 4m51s
2024-11-20 10:10:05 -06:00
c53d4b832b Fix flake check 2024-11-20 09:46:11 -06:00
724c4fdbda Disable jujutsu due to CVE
Some checks failed
/ check (push) Failing after 3m55s
2024-11-12 10:54:34 -06:00
c520b80cee Flake update
Some checks failed
/ check (push) Failing after 2m37s
2024-11-11 14:39:47 -06:00
57ae703b38 Update factorio server version
Some checks failed
/ check (push) Failing after 3m37s
2024-11-09 22:12:24 -06:00
f7b0b54871 Simplified UI
Some checks failed
/ check (push) Failing after 3m20s
2024-11-06 09:33:36 -06:00
f735072e34 Use more of zellij's defaults
Some checks failed
/ check (push) Failing after 3m31s
2024-11-05 09:08:59 -06:00
c5b0de57c4 Overlay zellij 0.41
Some checks failed
/ check (push) Has been cancelled
2024-11-05 09:04:54 -06:00
e32f46fa20 Lengths
Some checks failed
/ check (push) Failing after 3m24s
2024-11-03 14:48:41 -06:00
30cddbdc37 Flake 2024-11-03 11:08:49 -06:00
c7e033e1d6 Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Failing after 3m14s
2024-10-25 10:44:27 -05:00
48c8072611 Formatting
Some checks failed
/ check (push) Failing after 3m18s
2024-10-25 10:43:35 -05:00
7c057bf169 typo
Some checks failed
/ check (push) Has been cancelled
2024-10-25 10:42:32 -05:00
e5bde15acf Add a logo for funsies
Some checks failed
/ check (push) Has been cancelled
2024-10-25 10:41:45 -05:00
da5f4d9a9c Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Failing after 3m21s
2024-10-24 21:09:23 -05:00
13ad12efda Android? 2024-10-24 21:09:13 -05:00
f577a0bc73 Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Failing after 3m23s
2024-10-24 14:52:48 -05:00
bedc9dd741 Picocom 2024-10-24 14:52:40 -05:00
1f9860f39f Add daniel to kvm, upgrade factorio server
Some checks failed
/ check (push) Failing after 3m19s
2024-10-23 15:05:51 -05:00
8278796bb1 Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Failing after 3m21s
2024-10-18 10:30:26 -05:00
ffdbc3891d Add notification sound 2024-10-18 10:29:50 -05:00
5ad3a220a7 Fix soju account by updating password
Some checks failed
/ check (push) Failing after 3m20s
2024-10-15 10:43:21 -05:00
06427b694c Building jovian
Some checks failed
/ check (push) Failing after 3m48s
2024-10-15 10:10:28 -05:00
66c0f17e46 fix: game-password -> game_password
Some checks failed
/ check (push) Failing after 2m57s
2024-10-14 09:58:40 -05:00
c8bf3ae618 clean up since online works with lan=true
Some checks failed
/ check (push) Has been cancelled
2024-10-14 09:58:00 -05:00
8afad6f40c Add factorio server in preparation for 2.0 release
Some checks failed
/ check (push) Has been cancelled
2024-10-14 09:54:39 -05:00
0cfb985723 Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Failing after 2m59s
2024-10-10 11:46:27 -05:00
303ca8c871 Fix minecraft server so saving works
Some checks failed
/ check (push) Failing after 3m0s
2024-10-10 11:46:03 -05:00
e8dd91e345 Add radio tools module
Some checks failed
/ check (push) Failing after 3m4s
2024-10-09 13:44:02 -05:00
2b4b1c5850 Well, we tried
Some checks failed
/ check (push) Failing after 50s
2024-10-09 11:04:24 -05:00
a1acf60896 I think this will build an SD image with an installer?
Some checks failed
/ check (push) Failing after 57s
2024-10-09 10:05:14 -05:00
2c541801e6 Add image 2024-10-09 09:57:09 -05:00
352d4412f2 Use pkgsCross
Some checks failed
/ check (push) Failing after 3m1s
2024-10-09 09:44:36 -05:00
a3997d519a Update actual
Some checks failed
/ check (push) Failing after 2m58s
2024-10-08 21:06:11 -05:00
64e4c9c1b2 Started building at least...?
Some checks failed
/ check (push) Failing after 2m58s
2024-10-08 20:22:11 -05:00
337e587f92 Use nixpkgs-unstable (duh)
Some checks failed
/ check (push) Failing after 3m6s
2024-10-08 19:46:46 -05:00
1bb83efeef WIP pinephone
Some checks failed
/ check (push) Has been cancelled
2024-10-08 19:42:33 -05:00
a7b81162d5 We'll flatpak these
Some checks failed
/ check (push) Failing after 3m4s
2024-10-08 10:19:06 -05:00
1bec150b17 Fix bad polkit setting
Some checks failed
/ check (push) Has been cancelled
2024-10-08 10:17:56 -05:00
bec787e6ff Include PATH in sway systemd vars
Some checks failed
/ check (push) Has been cancelled
2024-10-08 10:17:22 -05:00
3eba3a553d Update actual to use the simplefin sync feature
Some checks failed
/ check (push) Failing after 3m0s
2024-10-07 10:24:28 -05:00
9630de5237 Hibernate delay
Some checks failed
/ check (push) Failing after 2m56s
2024-10-03 23:23:12 -05:00
a3fa043cb9 Add motd
Some checks failed
/ check (push) Failing after 3m2s
2024-10-03 09:41:10 -05:00
6624b11014 Peach, understand...
Some checks failed
/ check (push) Has been cancelled
2024-10-03 09:29:26 -05:00
226c7993b1 Add family minecraft servers
Some checks failed
/ check (push) Has been cancelled
2024-10-03 09:23:44 -05:00
ce00bd6fed bash -x -c for simpler command echoing
Some checks failed
/ check (push) Failing after 3m2s
2024-09-30 09:16:54 -05:00
556c58f0fb Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Has been cancelled
2024-09-30 09:16:13 -05:00
c007790ecf Add some snippy scripts for foxtrot quick switching between performance modes 2024-09-30 09:14:12 -05:00
095bfdddfc Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Failing after 3m0s
2024-09-23 15:01:52 -05:00
e8564cbae0 Fix bluetooth icon 2024-09-23 15:01:39 -05:00
9cc15d53fa Add comma
Some checks failed
/ check (push) Failing after 3m0s
2024-09-23 10:21:22 -05:00
a33de2c711 Some cleanup, plasma6 out by default
Some checks failed
/ check (push) Failing after 3m8s
2024-09-22 20:20:15 -05:00
9e8ce71b65 Add comma 2024-09-19 11:32:33 -05:00
1469810d2b laptop monitor above
All checks were successful
/ check (push) Successful in 3m50s
2024-09-18 09:43:31 -05:00
b8ac83f1a1 Add comment with pipewire profile for fw13 speakers
All checks were successful
/ check (push) Successful in 3m50s
2024-09-17 12:12:40 -05:00
f676b4d7a5 Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Has been cancelled
2024-09-17 12:06:43 -05:00
a733249377 Allow media keys even when sway is locked 2024-09-17 12:06:20 -05:00
494a9727c7 Rascale host
All checks were successful
/ check (push) Successful in 3m48s
2024-09-17 08:56:54 -05:00
8aab4b1056 Flake check
All checks were successful
/ check (push) Successful in 1m58s
2024-09-16 16:38:16 -05:00
035fdc710b Increase default timeout
Some checks failed
/ check (push) Failing after 3m21s
I need to investigate why these calls take so long:

1. Deno Deploy cold starts?
2. Netlify rate limits or slowness? Can I make some use of caching?
2024-09-14 09:51:07 -05:00
09b4567c92 Redact sensitive info from ddns client while also logging verbosely
All checks were successful
/ check (push) Successful in 2m9s
2024-09-14 09:49:35 -05:00
c2e03c50ae Try again
Some checks failed
/ check (push) Failing after 3m19s
2024-09-14 09:43:09 -05:00
379c26527a Dragon ddns
Some checks failed
/ check (push) Failing after 3m29s
2024-09-14 07:43:11 -05:00
3b7aefac96 Add foxtrot
Some checks failed
/ check (push) Failing after 3m26s
2024-09-14 07:37:41 -05:00
3df1eeecca dragon 2024-09-14 07:32:59 -05:00
529dcce37a Verbose logging, redact passwords
Some checks failed
/ check (push) Failing after 3m26s
2024-09-14 07:27:40 -05:00
fbdac308ec Fix second offsite backups
Some checks failed
/ check (push) Failing after 3m31s
2024-09-14 07:20:34 -05:00
c92314e731 Tweaks to waybar
Some checks failed
/ check (push) Failing after 3m27s
2024-09-13 14:17:45 -05:00
c2095697ef Make spark executable
Some checks failed
/ check (push) Failing after 3m25s
2024-09-13 13:54:12 -05:00
f247344b05 Add spark 2024-09-13 13:54:00 -05:00
637c4e4273 Add grafana root_url
Some checks failed
/ check (push) Failing after 3m25s
2024-09-13 13:25:34 -05:00
c20b5d540f Backgrounds are back
Some checks failed
/ check (push) Failing after 3m44s
2024-09-13 01:39:25 -05:00
20eaf3acbd Fix grafana dir permissions
Some checks failed
/ check (push) Failing after 3m22s
2024-09-13 00:50:31 -05:00
0ee453de49 Scale display
Some checks failed
/ check (push) Has been cancelled
2024-09-13 00:46:39 -05:00
5b80da7323 Router secrets
Some checks failed
/ check (push) Has been cancelled
2024-09-13 00:38:04 -05:00
8c77376e36 Actual
Some checks failed
/ check (push) Failing after 3m21s
2024-09-13 00:02:57 -05:00
8d0e080906 Specify version
Some checks failed
/ check (push) Failing after 3m17s
2024-09-12 23:52:06 -05:00
b72c71a272 Actual
Some checks failed
/ check (push) Failing after 3m19s
2024-09-12 23:45:03 -05:00
8bb7b4cac2 Comments
Some checks failed
/ check (push) Failing after 3m22s
2024-09-12 22:37:20 -05:00
262ef3bb45 Valerie
Some checks failed
/ check (push) Failing after 3m19s
2024-09-12 15:16:09 -05:00
2fc5333362 Working on backups to rascal...
Some checks failed
/ check (push) Failing after 3m20s
2024-09-12 14:47:21 -05:00
b7925c965e Fix GTK theme
All checks were successful
/ check (push) Successful in 3m49s
2024-09-12 13:24:57 -05:00
727a70d843 Comment
All checks were successful
/ check (push) Successful in 3m45s
2024-09-12 12:05:22 -05:00
a7ec834c6a Commenting
All checks were successful
/ check (push) Successful in 3m46s
2024-09-12 11:58:24 -05:00
a633ccc36f Bringing sway back
All checks were successful
/ check (push) Successful in 3m50s
2024-09-12 11:22:43 -05:00
e7ecd05161 Add family users to beefcake
All checks were successful
/ check (push) Successful in 3m43s
2024-09-12 10:36:29 -05:00
c520512399 Atuin up and running?
All checks were successful
/ check (push) Successful in 3m39s
2024-09-11 16:04:32 -05:00
4c07dcacc1 Forgot smtp host port
All checks were successful
/ check (push) Successful in 3m39s
2024-09-11 15:29:58 -05:00
9616fb1df0 Setup grafana smtp
Some checks failed
/ check (push) Has been cancelled
2024-09-11 15:28:52 -05:00
3d9a29b857 Grafana password
All checks were successful
/ check (push) Successful in 3m40s
2024-09-11 14:58:17 -05:00
11e159c7c9 Hide prometheus
All checks were successful
/ check (push) Successful in 3m43s
2024-09-11 14:31:48 -05:00
003b5516fe Cache is back 2024-09-11 13:39:57 -05:00
f6eb6a72ad Fix path
All checks were successful
/ check (push) Successful in 3m51s
2024-09-11 13:31:07 -05:00
cf2f2ecf0a Tweak backups - pretty sure passwords are wrong
Some checks failed
/ check (push) Failing after 29s
2024-09-11 12:03:55 -05:00
524a34d819 Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Has been cancelled
2024-09-11 11:57:46 -05:00
352e3d72a2 Re-initialize backups on beefcake 2024-09-11 11:57:27 -05:00
26f2784f0f Force umask when creating notes
All checks were successful
/ check (push) Successful in 3m41s
2024-09-09 10:16:11 -05:00
25abed953f Add todo script
All checks were successful
/ check (push) Successful in 3m41s
2024-09-09 10:08:38 -05:00
f8b68daf1e Merge remote-tracking branch 'origin/main'
Some checks failed
/ check (push) Has been cancelled
2024-09-09 10:05:52 -05:00
6ddc70bcaa Trouble 2024-09-09 10:05:45 -05:00
67fe4216f2 Add iftop to router 2024-09-09 10:05:23 -05:00
0ff4336088 Fix nix flake check failing
All checks were successful
/ check (push) Successful in 3m34s
2024-09-07 06:35:31 -05:00
66e96e2960 Fix audiobookshelf, add aria2 as a system package
Some checks failed
/ check (push) Failing after 3m37s
2024-09-06 20:45:10 -05:00
0984c7aef0 Merge branch 'beefcake-revival'
Some checks failed
/ check (push) Failing after 3m41s
2024-09-06 17:01:05 -05:00
efe20354ea Viable? 2024-09-06 16:57:30 -05:00
bbd09488ff Audiobookshelf 2024-09-06 16:48:59 -05:00
379adc7ec6 Fix postgres, enable atuin 2024-09-06 16:44:15 -05:00
639aad8c8a Jellyfin 2024-09-06 16:36:53 -05:00
da602beac6 Re-enable regular flake builds 2024-09-06 16:32:10 -05:00
a1a5aea93d Runner?
Some checks failed
/ check (push) Failing after 3m44s
2024-09-06 16:26:53 -05:00
98c46632a6 Forgejo up 2024-09-06 16:15:58 -05:00
e2c3b08fc7 Vaultwarden up 2024-09-06 16:05:29 -05:00
72a49c2f28 Prep git forge 2024-09-06 15:39:26 -05:00
6f1b5bb86d Add nix cache priv key secret 2024-09-06 15:36:23 -05:00
6c1120b992 Enable nix store 2024-09-06 15:35:50 -05:00
c297aff739 Data is flowing, hooked up to DDNS, capable off reloading from backups 2024-09-06 15:34:18 -05:00
d68b988bbe WIP ddns module 2024-09-06 09:04:32 -05:00
39eef52762 ZFS setup complete? 2024-09-06 08:39:30 -05:00
e7067bef8c No disko for beefcake for now 2024-09-06 06:56:28 -05:00
a84ea621bc Rascal is a linux 2024-09-04 11:28:57 -05:00
61ab5f0f58 Rascal tailscale and beefcake connection declarative 2024-09-04 11:25:02 -05:00
abd60eceef WIP beefcake disk setup 2024-09-04 10:31:06 -05:00
2ea8ff3ccc Beefcake is alive 2024-09-04 09:19:47 -05:00
de02a81c92 Somerthing
All checks were successful
/ check (push) Successful in 4m0s
2024-09-03 20:03:52 -05:00
6dfef5d07b More beef 2024-09-03 20:03:24 -05:00
6c85391b37 Badger badger badger badger badger badger badger 2024-08-30 13:03:23 -05:00
26a5d991c5 Merge remote-tracking branch 'origin/main' 2024-08-30 13:02:31 -05:00
2ad87cfe68 Stuff 2024-08-30 13:02:20 -05:00
e40ed7ce05 Build 2024-08-30 11:36:08 -05:00
d10f49780d Flake 2024-08-30 11:35:13 -05:00
e6bbf8acab Shell 2024-08-30 11:34:40 -05:00
32f412e195 Use wezterm flake 2024-08-30 11:24:53 -05:00
f1169c4b2b Builds in CI, update flake 2024-08-30 11:04:17 -05:00
befae3aad3 Merge remote-tracking branch 'origin/main' 2024-08-26 13:09:54 -05:00
662ccffa98 Add slides 2024-08-26 13:09:49 -05:00
411be6cac0 Game 2024-08-23 14:23:49 -05:00
2c7730d609 Unstable deck 2024-08-23 14:11:13 -05:00
7af174dd08 Match state version 2024-08-23 13:34:47 -05:00
14f39df41a ubstable for deck for ludusavi >=0.24 2024-08-23 13:33:33 -05:00
63ca02f6dc Deck 2 2024-08-23 09:39:36 -05:00
0fe9222e42 Merge remote-tracking branch 'origin/main' 2024-08-23 09:34:06 -05:00
6f643a1858 On deck 2024-08-23 09:33:50 -05:00
1952460606 tmpfs, irqbalance, etc. 2024-08-21 20:11:39 -05:00
5337459609 Add bigtower and video-tools module 2024-08-21 11:24:08 -05:00
85b37c83cf Ice cream time 2024-08-20 15:31:54 -05:00
f838affdb0 Binary tools 2024-08-19 19:29:18 -05:00
e7ac232b50 Permissions 2024-08-13 14:43:48 -05:00
1b09e32625 Setup audiobookshelf 2024-08-13 14:35:09 -05:00
20b836dd9d Merge remote-tracking branch 'origin/main' 2024-08-09 16:43:03 -05:00
1f793e5296 Stuff 2024-08-09 16:42:57 -05:00
ecd5caf514 Shhh there are secrets around 2024-08-07 20:17:16 -05:00
2a14742b5a kanidm client working 2024-08-06 15:55:07 -05:00
078f29bcbe Add some troubleshooting commands I guess 2024-08-06 14:15:05 -05:00
53f119285e WIP kanidm 2024-08-06 13:59:56 -05:00
e7b4d34399 Something is starting at least 2024-08-06 13:09:31 -05:00
7c1b5afc31 Merge remote-tracking branch 'origin/main' 2024-08-06 10:42:12 -05:00
46823d62e5 Add bigtower 2024-08-06 10:41:57 -05:00
e356a7ccba WIP kanidm 2024-08-06 10:33:09 -05:00
ab03e929d4 WIP kanidm deployment 2024-08-05 20:42:50 -05:00
63047aec55 Add todo for wezterm upgrade 2024-08-01 09:53:48 -05:00
2c801461fd Merge remote-tracking branch 'origin/main' 2024-07-31 21:13:50 -05:00
2563ecbfed Re-add cache 2024-07-31 21:13:37 -05:00
3b73fe8ca4 No slippi on thablet 2024-07-31 19:00:50 -05:00
12e6f87d1b Fix where we use hasAttr so that it actually works ;) 2024-07-31 10:26:13 -05:00
594078f84f Conditional on options as a mechanism for ensuring compatibility across NixOS versions? 2024-07-31 10:24:55 -05:00
dbabc70e2f maybe helpers? 2024-07-31 10:19:39 -05:00
afa7d0a5b6 helix: auto-format TOML 2024-07-31 10:06:11 -05:00
a6f5f6baa7 Add build status badge 2024-07-30 17:10:52 -05:00
dc5e526698 Update flake.lock 2024-07-30 17:08:52 -05:00
624229a035 Fix slippi input 2024-07-30 17:07:50 -05:00
5a20df95ba Generic runs-on for actions 2024-07-30 17:07:01 -05:00
8f09dd06b0 Make root a little more like me 2024-07-30 17:02:42 -05:00
0009ed8b19 Newline 2024-07-30 16:36:41 -05:00
c23487b544 Slippi 2024-07-30 15:16:46 -05:00
af7eaf7c57 Merge remote-tracking branch 'origin/unstable' into unstable 2024-07-29 11:29:39 -05:00
2ef8592e54 Plasma integration in firefox 2024-07-29 11:29:20 -05:00
37dc6efd14 Home manager unstable 2024-07-29 11:29:05 -05:00
8e9da1df88 Add unused remote unlock module 2024-07-29 10:43:11 -05:00
d2059a2845 Unstable starts building 2024-07-29 10:01:59 -05:00
48be7c8395 WIP unstable stuff 2024-07-28 08:31:45 -05:00
cec692bffc Try the zen kernel 2024-07-27 09:52:13 -05:00
b157935e93 Merge remote-tracking branch 'origin/main' 2024-07-26 11:30:11 -05:00
a33bc7e455 Beefatuin 2024-07-26 11:30:05 -05:00
c11035d929 Muuuuusic 2024-07-26 11:28:28 -05:00
f178ef477c Enable flatpaks and appimages for graphical workstation hosts 2024-07-26 10:50:59 -05:00
53df50c8d6 Add nix to action runner hostpackages 2024-07-24 13:37:04 -05:00
11948b8e2e Set in hostPackages config for action runner 2024-07-24 13:36:36 -05:00
69688a053e Add node to beefcake since it is needed to run forgejo actions on the host 2024-07-24 13:35:14 -05:00
14cd9f8006 Tweaks 2024-07-24 13:31:28 -05:00
fdcead0d7b Try with caching? 2024-07-24 13:23:51 -05:00
4361355794 Pass checks 2024-07-24 13:20:06 -05:00
58afc27d85 Comment 2024-07-24 13:10:49 -05:00
1b755432cc Socks 2024-07-24 13:05:09 -05:00
d87fe696e3 Checkout 2024-07-24 12:35:59 -05:00
93e4d760ff Tweaking action runner nix base image 2024-07-24 12:34:31 -05:00
1bbed3bfd6 Script 2024-07-24 12:15:00 -05:00
c56659cc56 Use homemade nix image 2024-07-24 12:14:01 -05:00
5273a5e9ff Maybe 2024-07-24 11:45:07 -05:00
c1c0a2cf26 Scope runner to just my forgejo user 2024-07-24 11:35:18 -05:00
53ae7cd68d No native label for now? Would want some kind of authz I think 2024-07-24 11:31:05 -05:00
b34ec46b56 Add nix label 2024-07-24 11:25:15 -05:00
bea284a645 Run flake check in actions 2024-07-24 11:23:27 -05:00
f655e43ec7 Runner 2024-07-24 11:21:31 -05:00
94966a089e gitea->forgejo 2024-07-24 10:13:15 -05:00
474e76ba18 Merge remote-tracking branch 'refs/remotes/origin/main' 2024-07-22 17:10:58 -05:00
462a0b8593 Update slippi, add emacs, update router config to route a.lyte.dev 2024-07-22 17:10:40 -05:00
803e78147a Musicbox 2024-07-19 12:15:39 -05:00
57cbceb82b Add lag alias 2024-07-18 16:24:19 -05:00
172a97176d Services are publically available again 2024-07-18 16:00:29 -05:00
7fbe64b448 Lan services? 2024-07-18 15:54:50 -05:00
9564cbc740 Add some comments 2024-07-18 10:01:56 -05:00
f4f9ed92e8 More config 2024-07-18 07:55:24 -05:00
a0d378a0e6 No extras because I don't understand disko yet 2024-07-17 22:14:31 -05:00
481e5909c9 What's an input, anyways 2024-07-17 22:08:32 -05:00
4a4a092940 Typos 2024-07-17 20:55:05 -05:00
93117c886b Hibernation
no breathing
2024-07-17 20:52:39 -05:00
3c4e5edd55 Supply my own args I guess 2024-07-17 20:49:12 -05:00
e21b0f019e Parameterize 2024-07-17 20:34:36 -05:00
78c2222162 Moving thinker back to nixos 2024-07-17 20:22:16 -05:00
1364e4b6e9 Things work nominally now, but IPv6 is lacking 2024-07-17 17:35:36 -05:00
a0b505e226 Getting there... 2024-07-17 16:27:54 -05:00
8c140dd3db Router 2024-07-17 15:19:41 -05:00
70499bc218 Allow ssh 2024-07-17 15:11:49 -05:00
e6553c3370 Redundant rules 2024-07-17 15:09:39 -05:00
eeda716b9b Work on firewall cleanup 2024-07-17 15:08:24 -05:00
a2c6a0fe93 Router alive, but not routing 2024-07-17 14:18:35 -05:00
e6e1225858 Scripting stuff 2024-07-16 22:54:36 -05:00
bebdd082d2 Stuff 2024-07-16 20:34:02 -05:00
2b34c907b7 Networking is a nightmare 2024-07-16 16:57:45 -05:00
55530d8b26 Back to the drawing board I guess 2024-07-16 16:46:10 -05:00
dff621fe42 Firewall? 2024-07-16 16:36:22 -05:00
cbe4b8619a Disable everything 2024-07-16 16:27:15 -05:00
cde4925ec1 Listen 2024-07-16 16:14:55 -05:00
696d77ca54 No bitwarden desktop on macos 2024-07-16 15:38:46 -05:00
a6052994f0 Router wip 2024-07-16 12:28:18 -05:00
5f4f69ae26 Merge remote-tracking branch 'origin/main' 2024-07-16 10:50:35 -05:00
5dfbcbebd3 Router has connectivity 2024-07-16 10:48:32 -05:00
cc44a2e793 ectool that works 2024-07-14 22:29:42 -05:00
8fb3ea82b7 Add "reset-wifi-module" as a useful example of writeShellApplication 2024-07-14 22:16:45 -05:00
2c6484f66a Merge remote-tracking branch 'origin/main' 2024-07-13 14:41:39 -05:00
8bb731e21c Router disko config 2024-07-13 14:41:30 -05:00
3b685c6d40 Thablet with passwords 2024-07-13 10:32:19 -05:00
fc7a7355ea Merge 2024-07-11 21:25:18 -05:00
27b94ccb51 Trying to upgrade router to NixOS 2024-07-11 12:51:51 -05:00
14fabcbe20 Passwords 2024-07-10 09:57:10 -05:00
14bf7cbb24 Merge remote-tracking branch 'origin/main' 2024-07-10 08:55:09 -05:00
464997aa5d Agents are annoying 2024-07-10 08:54:39 -05:00
2b86faa7fe Template 2024-07-09 11:12:55 -05:00
011d57c17d XRDP? 2024-06-29 03:57:06 -05:00
bb015fc244 Add grablet 2024-06-29 02:55:19 -05:00
3361c316b9 Add comment 2024-06-29 02:10:34 -05:00
3a4d389201 fw13 patch is borked after flake update, so just use latest kernel 2024-06-29 01:46:30 -05:00
098817dd79 Agent 2024-06-29 01:43:12 -05:00
6469c70d3b Add krdp for remote desktop 2024-06-29 01:40:25 -05:00
98f36353f4 More cleanup 2024-06-29 01:00:18 -05:00
a8c0774435 update flake 2024-06-29 00:51:22 -05:00
5c15f1f338 Gamez 2024-06-28 22:54:16 -05:00
52c3f11b41 Laptops building again 2024-06-28 22:04:37 -05:00
ed9ae0bd07 Various fixes 2024-06-28 21:36:19 -05:00
93173c3445 WIP cleanup 2024-06-28 17:06:53 -05:00
ed9d331f8d Cleanup modules groups into their own files 2024-06-28 16:10:06 -05:00
9ffbf37ca6 Fix rascal 2024-06-28 15:50:00 -05:00
e41fb2b1ea fix ssh 2024-06-28 15:03:41 -05:00
c8894d90d9 Add in other nixos configurations 2024-06-28 14:44:46 -05:00
d150f994ec Got gpg working 2024-06-28 14:37:13 -05:00
b9b14effff Dragon and beefcake build 2024-06-28 14:01:32 -05:00
8ebd884eb4 NixOS modules moved to flake root 2024-06-28 11:50:18 -05:00
985c365ed4 Move nixConfig between inputs and outputs 2024-06-28 09:51:53 -05:00
a783f6c146 flake root cleanup 2024-06-28 09:51:25 -05:00
f87fbad500 Cleanup 2024-06-25 09:38:00 -05:00
7efd72ded7 Fix common scripts not working 2024-06-24 10:03:00 -05:00
9f4edbe16d Ooops 2024-06-18 11:46:14 -05:00
41b16a7173 More steaminess 2024-06-18 11:46:03 -05:00
c5a473c557 Update 2024-06-17 13:00:23 -05:00
ada6443dd5 colors: simplify 2024-06-14 11:07:06 -05:00
5badc90690 nix: re-enable local nix cache 2024-06-14 09:30:11 -05:00
da2842e247 Merge remote-tracking branch 'origin/main' 2024-06-14 09:29:38 -05:00
688bf7bd41 backups: add another scheduled time for backups so that they can run during the day when internet is definitely active 2024-06-14 09:29:04 -05:00
deb34a3383 Steam 2024-06-13 18:51:38 -05:00
498caa4578 Fish formatting and ls aliases 2024-06-13 18:46:59 -05:00
c9787b39f8 steam: allow remote play ports 2024-06-13 18:46:46 -05:00
2b95f07c46 Reference patch by URL and hash 2024-06-10 10:00:16 -05:00
aad7afd5e5 Merge remote-tracking branch 'origin/main' 2024-06-10 09:56:31 -05:00
4c0760495f Fix foxtrot, add valerie, other fixes 2024-06-10 09:56:13 -05:00
ca023db81f GTK, appimage binfmt, and bluetooth 2024-06-06 10:53:21 -05:00
69c8c4777b Dragon for music 2024-06-04 12:02:27 -05:00
091a9e2485 Thablet bluetooth 2024-06-02 14:26:51 -05:00
12149bb2f6 Dragon upgraded 2024-06-01 21:25:58 -05:00
afe1bb4809 Font incoming 2024-06-01 21:12:10 -05:00
1286e23914 Don't worget to build woff2 2024-06-01 20:12:20 -05:00
f0973aa3cf Updating custom Iosevka package 2024-06-01 20:08:59 -05:00
5ef9bfb602 Stuff and things 2024-05-31 10:18:37 -05:00
dd1cf0685a Use new slippi flake 2024-05-29 14:58:10 -05:00
400b6cc066 Stuff that doesn't work 2024-05-29 13:42:13 -05:00
6888a2f3e1 Rebar3 2024-05-28 22:09:32 -05:00
f7949285f2 Merge remote-tracking branch 'origin/main' 2024-05-28 22:04:39 -05:00
453a635538 SSH agent go away 2024-05-28 10:41:54 -05:00
998fccd132 templates: add gleam 2024-05-28 10:14:04 -05:00
6156b6db72 No gnome, no mako 2024-05-26 09:48:52 -05:00
a86c25c85b Merge remote-tracking branch 'origin/main' 2024-05-23 09:43:50 -05:00
ed675db195 feat: postgres tcp/ip not explicitly enabled, firewall updates 2024-05-23 09:41:53 -05:00
18c2274529 chore: update flake 2024-05-23 09:41:15 -05:00
cfdcc4ae48 Thinker thinks 2024-05-15 19:29:46 -05:00
977b6940cf Moar ram 2024-05-07 01:04:52 -05:00
a236f88d02 Remove api.lyte.dev 2024-05-07 01:00:06 -05:00
7c588680e3 Add dawncraft server 2024-05-06 23:46:17 -05:00
b138325f45 Include openssh 2024-05-02 11:03:40 -05:00
bda77522db Build primary machines' configurations 2024-05-02 10:49:25 -05:00
f3072c8214 flake: update all inputs 2024-05-02 09:52:49 -05:00
f386180bb7 Cleanup countdown and at scripts 2024-04-26 11:35:28 -05:00
6b1654ea47 Stuff 2024-04-23 15:30:41 -05:00
ed7f780338 Allow any origin for files.lyte.dev to let git.lyte.dev use web font 2024-04-20 10:31:20 -05:00
6a379b4f82 Weird atuin fix 2024-04-14 10:49:34 -05:00
39e94c820f Wezterm pane/tab closing keys 2024-04-14 10:39:38 -05:00
0225aa2010 Update Elixir template to use overlay 2024-04-12 10:20:53 -05:00
d3996bb9e2 Monorepo doesn't play nice with git-hooks.nix 2024-04-11 11:05:59 -05:00
8226b5bc00 Experimenting with monorepo stuff 2024-04-11 10:19:24 -05:00
91e9d48c82 templates: init nim 2024-04-10 21:02:52 -05:00
867cacfe49 devtools: use home manager instead of packages 2024-04-10 12:12:46 -05:00
7630d503b6 Install jujutsu 2024-04-10 11:58:11 -05:00
0d49f191cf atuin: enable aliases 2024-04-10 11:42:05 -05:00
e42c330c06 atuin: sync records 2024-04-10 11:33:41 -05:00
fc54c447a8 No mako just plasma notifications 2024-04-05 11:39:35 -05:00
3607c2ffb6 Merge remote-tracking branch 'origin/main' 2024-04-05 11:21:33 -05:00
2784badab9 No mako since I'm chilling on Plasma 2024-04-05 11:21:20 -05:00
cfaa3e4c12 Merge remote-tracking branch 'origin/main' 2024-04-04 09:24:18 -05:00
3a3406c796 thinker: use tlp 2024-04-04 09:24:03 -05:00
bdddcdfcf9 Update helix to 24.3 2024-04-02 21:44:57 -05:00
2daa90de72 Merge remote-tracking branch 'origin/main' 2024-04-01 15:01:16 -05:00
c0f72cd01e No more logind config 2024-04-01 15:00:55 -05:00
038badd1a9 Thinker to plasma 2024-03-30 15:43:19 -05:00
98551750da Pinentry 2024-03-30 08:09:21 -05:00
1c0e1e04dc Sway for thablet 2024-03-30 08:05:13 -05:00
98b0ebdd51 Beefcake hosts? 2024-03-30 07:50:23 -05:00
f35bb3e43c Fix plausible 2024-03-29 16:25:33 -05:00
d50255b748 Code search in gitea 2024-03-29 15:04:34 -05:00
ccc3d17747 Plasma, steam, hot stuff is hot 2024-03-29 10:51:39 -05:00
1c6e73bc33 Cleanup 2024-03-29 10:18:49 -05:00
143c2f2508 Merge remote-tracking branch 'origin/main' 2024-03-29 10:16:14 -05:00
b489673f31 Mostly notes, dragon to plasma 2024-03-29 10:15:54 -05:00
f1ed65d50c Add resume commands for fixing foxtrot wifi 2024-03-29 10:14:41 -05:00
e1145f734c Back to plasma 2024-03-29 09:45:18 -05:00
4170c92d44 Working directory so builds can actually _go_ somewhere 2024-03-28 17:13:57 -05:00
213f531f7c Accept flake config when building 2024-03-28 17:00:09 -05:00
9c17acb9fd Take 2 to fix the flake build service 2024-03-28 16:58:56 -05:00
e8f498c5e9 Fix flake build service 2024-03-28 16:56:46 -05:00
06c57aa29f Leave myself some hyprland workspace script notes 2024-03-28 16:52:31 -05:00
7f6894bf39 Somewhat functional hyprland workspace indicator 2024-03-28 16:47:42 -05:00
9fba494811 Fix bad pinentry thing and fix htop config 2024-03-28 14:35:13 -05:00
5eb3516f18 Comment 2024-03-28 13:12:00 -05:00
9390153ffc Merge remote-tracking branch 'origin/main' 2024-03-28 13:11:12 -05:00
d571fabd4f Some cleanup, prep for stabilizing on 24.05 when it releases for server hosts 2024-03-28 13:10:51 -05:00
59bb4a9fb7 Batterytime 2024-03-28 10:47:17 -05:00
aa27b55609 Fix battery indicator on eww bar when charging 2024-03-28 09:57:18 -05:00
c6fdb6838a Pie and yuck 2024-03-27 23:01:40 -05:00
74635d6ef2 Eww 2024-03-27 17:10:36 -05:00
0dc4c8151c WIP hyprland workspaces script 2024-03-27 13:06:50 -05:00
92cd2922b2 Battery time 2024-03-27 12:39:22 -05:00
f514f5addc WIP eww smarts 2024-03-27 12:10:51 -05:00
57f9e3deba Fix wezterm tab colors 2024-03-27 11:06:26 -05:00
1b3e043e42 Add eww todos 2024-03-27 10:46:47 -05:00
a01dc19b5f Remove todo for dragon screensharing 2024-03-27 10:44:28 -05:00
4104af7f5e Don't use 10 bit color depth on dragon main monitor so that hyprland screen share works 2024-03-27 10:44:04 -05:00
afb5e5aa93 Mic mute og key 2024-03-27 10:38:30 -05:00
14949fb6d6 Wez for the dragon 2024-03-27 09:36:04 -05:00
ed5f8840b7 Stay on target 2024-03-27 09:12:02 -05:00
d2a5c90021 WIP 2024-03-26 11:51:35 -05:00
e209716a07 Use faster launcher, show battery in waybar, default to wezterm 2024-03-26 11:04:47 -05:00
fafd242e46 WIP wezterm and hypr 2024-03-25 09:44:55 -05:00
701be10014 I wanna be hypr 2024-03-24 20:39:24 -05:00
8c4a196883 Add gitui theme 2024-03-24 18:02:59 -05:00
580f59f820 Ayy 2024-03-24 17:48:15 -05:00
6e245ac69d Working foxtrot build 2024-03-24 17:48:02 -05:00
4665d93a1a Fprintdddd 2024-03-24 14:42:02 -05:00
a7dda92091 Fprintd fixes? 2024-03-24 14:34:44 -05:00
409f228586 add oil and nu shells, work in hyprland updates 2024-03-22 23:55:15 -05:00
57110ddd81 Implement overlay for catppuccin 2024-03-22 10:19:40 -05:00
85efa83e66 Currently, catppuccin-gtk fails to build, so simply avoid using it for now
https://github.com/NixOS/nixpkgs/issues/298043
2024-03-22 10:05:36 -05:00
7762e62809 Updating... 2024-03-22 09:54:00 -05:00
85fa907283 Merge remote-tracking branch 'origin/main' 2024-03-21 10:15:17 -05:00
5632cf75f5 Tools, binding for fzf cd 2024-03-21 10:14:58 -05:00
93f60a925e Various updates 2024-03-19 10:25:29 -05:00
a44fc2764e Merge remote-tracking branch 'origin/main' 2024-03-15 08:32:22 -05:00
06a7949edb Some template changes for deno work 2024-03-15 01:33:17 -05:00
bde0ce2e51 Moat tools 2024-03-14 14:04:31 -05:00
a602cc8ad2 Bash 2024-03-13 21:57:57 -05:00
f8ae2b7664 Add more tooooolz 2024-03-13 21:34:27 -05:00
0f33a266bd Beefcake modularization 2024-03-13 21:12:14 -05:00
884bc9f277 Add dns utils, initial setup for headscale for beefcake 2024-03-13 09:31:07 -05:00
6c82be899e COMMANDS 2024-03-11 21:29:38 -05:00
8865494eef Merge remote-tracking branch 'origin/main' 2024-03-09 10:43:38 -06:00
e75d54bcdd Printing for foxtrot 2024-03-09 10:43:27 -06:00
ca3d080775 Merge remote-tracking branch 'origin/main' 2024-03-09 10:38:45 -06:00
3d15c98a38 Steeeeam 2024-03-09 10:38:36 -06:00
9185ce668c I'll manage my own walls I think 2024-03-09 10:37:51 -06:00
1d192f702c No more managed wallpaper, WIP scanner stuff for samba share(s) 2024-03-07 10:26:58 -06:00
0c51d44c08
Samba 2024-03-04 12:08:18 -06:00
a1ae78113a Allow tailnet on smb 2024-03-04 10:09:05 -06:00
d3a881b597 Git config updates and disable wifi powersave for foxtrot 2024-03-01 09:01:14 -06:00
d035874f27
KDE on workstation 2024-02-29 09:51:49 -06:00
40abda7ae9
Fix flake check issues 2024-02-29 09:02:36 -06:00
ed94ea8c2a
Preserve kitty new os window hotkey, move "previous pane" hotkey to C-S-h 2024-02-29 06:10:18 -06:00
65eb9d2175
Add helix godot language server setup to godot template 2024-02-29 06:07:09 -06:00
f09bd37695
Add godot template, pin nixpkgs separately for iosevka-based font 2024-02-29 06:01:13 -06:00
b0e1def9dc
Plasma 6 2024-02-28 22:00:42 -06:00
006535e93e
Add alejandra to build inputs for nix flake template 2024-02-28 10:12:31 -06:00
f55594b02c
Add gitignore and envrc 2024-02-28 09:34:01 -06:00
7442479948
Add nix-flake template 2024-02-28 09:31:58 -06:00
5dc4873036
Merge remote-tracking branch 'origin/main' 2024-02-23 10:36:04 -06:00
b2f8891ebe
Implement pre-commit using the pre-commit-hooks flake 2024-02-23 10:35:41 -06:00
fd4757d697
prohibitpassword for root ssh though I doubt this actually changes anything 2024-02-22 15:28:52 -06:00
f78e1d5e7d
Merge remote-tracking branch 'origin/main' 2024-02-22 15:12:02 -06:00
86de1944fe
Make flanilla a family-friendly (creative and peaceful) server 2024-02-22 15:11:36 -06:00
f692217356
Thablet to kde 2024-02-22 14:36:21 -06:00
6a13c7421a
No up arrow for atuin 2024-02-21 23:47:45 -06:00
054cbfc93d
Atuin 2024-02-21 23:32:47 -06:00
44b0b89f64
Atuin stuff? 2024-02-21 22:59:49 -06:00
0711b7cbb1
Atuin 2024-02-21 22:36:05 -06:00
e7167055b2
Add flanilla user info 2024-02-21 22:32:05 -06:00
ac31bfe22d
Allow minecraft ports 2024-02-21 22:27:58 -06:00
7ee7c88315
Remove test modules 2024-02-21 22:25:14 -06:00
39090f4d45
Use unique port for flanilla 2024-02-21 22:22:40 -06:00
2219adcd53
Add flanilla minecraft server 2024-02-21 22:18:54 -06:00
a60f780361
Force api.lyte.dev hostname 2024-02-21 22:15:41 -06:00
4a1859a1f7
Fix apilytedev 2024-02-21 22:13:32 -06:00
a5bff82fb2
Merge remote-tracking branch 'beefcake/beefcake-good2' 2024-02-21 22:07:39 -06:00
8a24e59c78 Good2 2024-02-21 22:06:36 -06:00
148 changed files with 10923 additions and 5481 deletions

2
.envrc Normal file
View file

@ -0,0 +1,2 @@
nix_direnv_manual_reload
use flake

View file

@ -0,0 +1,37 @@
on: [push]
jobs:
check:
runs-on: nixos-host
steps:
- name: Checkout
uses: actions/checkout@v3
# cache not needed since we now run on the host directly
# - name: Load cached nix store
# id: cache-nix-store
# uses: actions/cache/restore@v4
# with:
# path: /nix/store
# key: ${{ runner.os }}-nix-store
- name: Build server
run: |
nix shell nixpkgs#nixos-rebuild -c nixos-rebuild build --flake .#beefcake
- name: Build router
run: |
nix shell nixpkgs#nixos-rebuild -c nixos-rebuild build --flake .#router
- name: Build desktop
run: |
nix shell nixpkgs#nixos-rebuild -c nixos-rebuild build --flake .#dragon
- name: Build laptop
run: |
nix shell nixpkgs#nixos-rebuild -c nixos-rebuild build --flake .#foxtrot
# - name: Save nix store
# uses: actions/cache/save@v4
# with:
# path: /nix/store
# key: ${{ steps.cache-nix-store.outputs.cache-primary-key }}

View file

@ -0,0 +1,25 @@
on: [push]
jobs:
check:
runs-on: nixos-host
steps:
- name: Checkout
uses: actions/checkout@v3
# cache not needed since we now run on the host directly
# - name: Load cached nix store
# id: cache-nix-store
# uses: actions/cache/restore@v4
# with:
# path: /nix/store
# key: ${{ runner.os }}-nix-store
- name: Check nix flake
run: |
nix flake check
# - name: Save nix store
# uses: actions/cache/save@v4
# with:
# path: /nix/store
# key: ${{ steps.cache-nix-store.outputs.cache-primary-key }}

6
.gitignore vendored
View file

@ -1,3 +1,7 @@
*.log /.direnv
result result
.pre-commit-config.yaml
*.log
*.qcow2 *.qcow2

View file

@ -1,6 +1,19 @@
keys: keys:
- &daniel age1stdue5q5teskee057ced6rh9pzzr93xsy66w4sc3zu49rgxl7cjshztt45 # pass age-key | rg '# pub' # list any public keys here
- &sshd-at-beefcake age1k8s590x34ghz7yrjyrgzkd24j252srf0mhfy34halp4frwr065csrlt2ev # ssh beefcake "nix-shell -p ssh-to-age --run 'cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age'"
# pass age-key | rg '# pub'
- &daniel age1stdue5q5teskee057ced6rh9pzzr93xsy66w4sc3zu49rgxl7cjshztt45
# per-host keys can be derived from a target host's ssh keys like so:
# ssh host "nix shell nixpkgs#ssh-to-age -c $SHELL -c 'cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age'"
- &sshd-at-beefcake age1etv56f7kf78a55lxqtydrdd32dpmsjnxndf4u28qezxn6p7xt9esqvqdq7
- &sshd-at-router age1zd7c3g5d20shdftq8ghqm0r92488dg4pdp4gulur7ex3zx2yq35ssxawpn
- &sshd-at-dragon age1ez4why08hdx0qf940cjzs6ep4q5rk2gqq7lp99pe58fktpwv65esx4xrht
- &ssh-foxtrot age1njnet9ltjuxasqv3ckn67r5natke6xgd8wlx8psf64pyc4duvurqhedw80
# after updating this file, you may need to update the keys for any associated files like so:
# sops updatekeys secrets.file
creation_rules: creation_rules:
- path_regex: secrets/[^/]+\.(ya?ml|json|env|ini)$ - path_regex: secrets/[^/]+\.(ya?ml|json|env|ini)$
key_groups: key_groups:
@ -11,3 +24,18 @@ creation_rules:
- age: - age:
- *daniel - *daniel
- *sshd-at-beefcake - *sshd-at-beefcake
- path_regex: secrets/router/[^/]+\.(ya?ml|json|env|ini)$
key_groups:
- age:
- *daniel
- *sshd-at-router
- path_regex: secrets/dragon/[^/]+\.(ya?ml|json|env|ini)$
key_groups:
- age:
- *daniel
- *sshd-at-dragon
- path_regex: secrets/foxtrot/[^/]+\.(ya?ml|json|env|ini)$
key_groups:
- age:
- *daniel
- *ssh-foxtrot

View file

@ -1,4 +1,85 @@
{ {lib, ...}: let
inherit (lib.attrsets) mapAttrs' filterAttrs;
in {
standardWithHibernateSwap = {
disks ? ["/dev/sda"],
swapSize,
...
}: {
/*
this is my standard partitioning scheme for my machines which probably want hibernation capabilities
a UEFI-compatible boot partition
it includes an LUKS-encrypted btrfs volume
a swap partition big enough to dump all the machine's RAM into
*/
disko.devices = {
disk = {
primary = {
type = "disk";
device = builtins.elemAt disks 0;
content = {
type = "gpt";
partitions = {
ESP = {
label = "EFI";
name = "ESP";
size = "4G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
swap = {
size = swapSize;
content = {
type = "swap";
discardPolicy = "both";
resumeDevice = true; # resume from hiberation from this device
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
extraOpenArgs = ["--allow-discards"];
# if you want to use the key for interactive login be sure there is no trailing newline
# for example use `echo -n "password" > /tmp/secret.key`
keyFile = "/tmp/secret.key"; # Interactive
# settings.keyFile = "/tmp/password.key";
# additionalKeyFiles = ["/tmp/additionalSecret.key"];
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"/nixos" = {
mountpoint = "/";
mountOptions = ["compress=zstd" "noatime"];
};
"/home" = {
mountpoint = "/home";
mountOptions = ["compress=zstd" "noatime"];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = ["compress=zstd" "noatime"];
};
};
};
};
};
};
};
};
};
};
};
standard = {disks ? ["/dev/vda"], ...}: { standard = {disks ? ["/dev/vda"], ...}: {
# this is my standard partitioning scheme for my machines: an LUKS-encrypted # this is my standard partitioning scheme for my machines: an LUKS-encrypted
# btrfs volume # btrfs volume
@ -61,67 +142,7 @@
}; };
}; };
}; };
# TODO: figure out what I can't have an optiona/default 'name' attribute here so I can DRY with "standard"
thinker = {disks ? ["/dev/vda"], ...}: {
disko.devices = {
disk = {
vdb = {
type = "disk";
device = builtins.elemAt disks 0;
content = {
type = "gpt";
partitions = {
ESP = {
label = "EFI";
name = "ESP";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
extraOpenArgs = ["--allow-discards"];
# if you want to use the key for interactive login be sure there is no trailing newline
# for example use `echo -n "password" > /tmp/secret.key`
keyFile = "/tmp/secret.key"; # Interactive
# settings.keyFile = "/tmp/password.key";
# additionalKeyFiles = ["/tmp/additionalSecret.key"];
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = ["compress=zstd" "noatime"];
};
"/home" = {
mountpoint = "/home";
mountOptions = ["compress=zstd" "noatime"];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = ["compress=zstd" "noatime"];
};
};
};
};
};
};
};
};
};
};
};
unencrypted = {disks ? ["/dev/vda"], ...}: { unencrypted = {disks ? ["/dev/vda"], ...}: {
disko.devices = { disko.devices = {
disk = { disk = {
@ -172,6 +193,203 @@
}; };
}; };
}; };
beefcake = let
zpools = {
zroot = {
/*
TODO: at the time of writing, disko does not support draid6
so I'm building/managing the array manually for the time being
the root pool is just a single disk right now
*/
name = "zroot";
config = {
type = "zpool";
# mode = "draid6";
rootFsOptions = {
compression = "zstd";
"com.sun:auto-snapshot" = "false";
};
mountpoint = "/";
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
datasets = {
zfs_fs = {
type = "zfs_fs";
mountpoint = "/zfs_fs";
options."com.sun:auto-snapshot" = "true";
};
zfs_unmounted_fs = {
type = "zfs_fs";
options.mountpoint = "none";
};
zfs_legacy_fs = {
type = "zfs_fs";
options.mountpoint = "legacy";
mountpoint = "/zfs_legacy_fs";
};
zfs_testvolume = {
type = "zfs_volume";
size = "10M";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/ext4onzfs";
};
};
encrypted = {
type = "zfs_fs";
options = {
mountpoint = "none";
encryption = "aes-256-gcm";
keyformat = "passphrase";
keylocation = "file:///tmp/secret.key";
};
# use this to read the key during boot
/*
postCreateHook = ''
zfs set keylocation="prompt" "zroot/$name";
'';
*/
};
"encrypted/test" = {
type = "zfs_fs";
mountpoint = "/zfs_crypted";
};
};
};
};
zstorage = {
/*
PARITY_COUNT=3 NUM_DRIVES=8 HOT_SPARES=2 sudo -E zpool create -f -O mountpoint=none -O compression=on -O xattr=sa -O acltype=posixacl -o ashift=12 -O atime=off -O recordsize=64K zstorage draid{$PARITY_COUNT}:{$NUM_DRIVES}c:{$HOT_SPARES}s /dev/disk/by-id/scsi-35000039548cb637c /dev/disk/by-id/scsi-35000039548cb7c8c /dev/disk/by-id/scsi-35000039548cb85c8 /dev/disk/by-id/scsi-35000039548d9b504 /dev/disk/by-id/scsi-35000039548da2b08 /dev/disk/by-id/scsi-35000039548dad2fc /dev/disk/by-id/scsi-350000399384be921 /dev/disk/by-id/scsi-35000039548db096c
sudo zfs create -o mountpoint=legacy zstorage/nix
sudo zfs create -o canmount=on -o mountpoint=/storage zstorage/storage
*/
name = "zstorage";
config = {};
};
};
diskClass = {
storage = {
type = "zfs";
pool = zpools.zroot.name;
};
boot = {
content = {
type = "gpt";
partitions = {
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
zfs = {
size = "100%";
content = {
type = "zfs";
pool = zpools.zroot.name;
};
};
};
};
};
};
bootDisks = {
"/dev/sdi" = {
name = "i";
enable = true;
};
"/dev/sdj" = {
name = "j";
enable = true;
}; # TODO: join current boot drive to new boot pool
};
storageDisks = {
"/dev/sda" = {
enable = true;
name = "a";
};
"/dev/sdb" = {
enable = true;
name = "b";
};
"/dev/sdc" = {
enable = true;
name = "c";
};
"/dev/sdd" = {
enable = true;
name = "d";
};
# TODO: start small
"/dev/sde" = {
enable = false;
name = "e";
};
"/dev/sdf" = {
enable = false;
name = "f";
};
"/dev/sdg" = {
enable = false;
name = "g";
};
"/dev/sdh" = {
enable = false;
name = "h";
};
# gap for two boot drives
"/dev/sdk" = {
enable = false;
name = "k";
};
"/dev/sdl" = {
enable = false;
name = "l";
};
"/dev/sdm" = {
enable = false;
name = "m";
};
"/dev/sdn" = {
# TODO: this is my holding cell for random stuff right now
enable = false;
name = "n";
};
};
diskoBoot = mapAttrs' (device: {name, ...}: {
name = "boot-${name}";
value = {
inherit device;
type = "disk";
content = diskClass.boot.content;
};
}) (filterAttrs (_: {enable, ...}: enable) bootDisks);
diskoStorage = mapAttrs' (device: {name, ...}: {
name = "storage-${name}";
value = {
inherit device;
type = "disk";
content = diskClass.storage.content;
};
}) (filterAttrs (_: {enable, ...}: enable) storageDisks);
in {
disko.devices = {
disk = diskoBoot // diskoStorage;
zpool = {
zroot = zpools.zroot.config;
};
};
};
legacy = {disks ? ["/dev/vda"], ...}: { legacy = {disks ? ["/dev/vda"], ...}: {
disko.devices = { disko.devices = {
disk = { disk = {

File diff suppressed because it is too large Load diff

928
flake.nix
View file

@ -1,158 +1,45 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
helix.url = "github:helix-editor/helix/master";
# I think if I force this to follow nixpkgs, I won't get caching benefits
# helix.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko/master"; disko.url = "github:nix-community/disko/master";
disko.inputs.nixpkgs.follows = "nixpkgs"; disko.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.url = "github:Mic92/sops-nix"; sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs"; sops-nix.inputs.nixpkgs.follows = "nixpkgs-unstable";
sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs"; # sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs";
git-hooks.url = "github:cachix/git-hooks.nix";
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
home-manager-unstable.url = "github:nix-community/home-manager";
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
helix.url = "github:helix-editor/helix/master";
hardware.url = "github:nixos/nixos-hardware"; hardware.url = "github:nixos/nixos-hardware";
# hardware.inputs.nixpkgs.follows = "nixpkgs"; hyprland.url = "github:hyprwm/Hyprland";
# hyprland.url = "github:hyprwm/Hyprland"; wezterm.url = "github:wez/wezterm?dir=nix";
# hyprland.inputs.nixpkgs.follows = "nixpkgs"; wezterm.inputs.nixpkgs.follows = "nixpkgs-unstable";
api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git"; slippi.url = "github:lytedev/slippi-nix";
api-lyte-dev.inputs.nixpkgs.follows = "nixpkgs"; # slippi.url = "git+file:///home/daniel/code/open-source/slippi-nix";
slippi.inputs.nixpkgs.follows = "nixpkgs-unstable";
slippi.inputs.home-manager.follows = "home-manager-unstable";
ssbm.url = "github:lytedev/ssbm-nix"; jovian.url = "github:Jovian-Experiments/Jovian-NixOS/development";
# I think if I force this to follow nixpkgs, I won't get caching benefits jovian.inputs.nixpkgs.follows = "nixpkgs-unstable";
ssbm.inputs.nixpkgs.follows = "nixpkgs";
# TODO: doesn't (can't?) support the forge mod loader yet # nnf.url = "github:thelegy/nixos-nftables-firewall?rev=71fc2b79358d0dbacde83c806a0f008ece567b7b";
# nix-minecraft.url = "github:Infinidoge/nix-minecraft";
};
outputs = { mobile-nixos = {
self, url = "github:lytedev/mobile-nixos";
nixpkgs, flake = false;
home-manager,
api-lyte-dev,
...
} @ inputs: let
inherit (self) outputs;
systems = [
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
colors = (import ./lib/colors.nix inputs).schemes.catppuccin-mocha-sapphire;
# colors = (import ./lib/colors.nix inputs).color-schemes.donokai;
font = {
name = "IosevkaLyteTerm";
size = 12;
}; };
# Your custom packages
# Acessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system: import ./pkgs {pkgs = nixpkgs.legacyPackages.${system};});
# Formatter for your nix files, available through 'nix fmt'
# Other options beside 'alejandra' include 'nixpkgs-fmt'
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
# Your custom packages and modifications, exported as overlays
overlays = import ./overlays {inherit inputs;};
# Reusable nixos modules you might want to export
# These are usually stuff you would upstream into nixpkgs
nixosModules = import ./modules/nixos;
# Reusable home-manager modules you might want to export
# These are usually stuff you would upstream into home-manager
homeManagerModules = import ./modules/home-manager;
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = builtins.mapAttrs (name: {
system,
modules,
...
}:
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs outputs system api-lyte-dev;
};
# extraSpecialArgs = {
# inherit inputs outputs system api-lyte-dev;
# };
modules =
[
self.nixosModules.common
]
++ modules;
}) (import ./nixos);
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
# TODO: non-system-specific home configurations?
"deck" = let
system = "x86_64-linux";
in
home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = {
inherit inputs outputs system;
inherit (outputs) colors font;
};
modules = with outputs.homeManagerModules; [
common
{
home.homeDirectory = "/home/deck";
home.username = "deck";
home.stateVersion = "24.05";
}
linux
];
};
workm1 = let
system = "aarch64-darwin";
in
home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = {
inherit inputs outputs system;
inherit (outputs) colors font;
};
modules = with outputs.homeManagerModules; [
common
{
home.homeDirectory = "/Users/daniel.flanagan";
home.username = "daniel.flanagan";
home.stateVersion = "24.05";
}
macos
];
};
};
# Disk partition schemes and functions
diskoConfigurations = import ./disko;
# Flake templates for easily setting up Nix in a project using common patterns I like
templates = import ./templates/all.nix;
# TODO: nix-on-droid for phone terminal usage?
# TODO: nix-darwin for work?
# TODO: nixos ISO?
}; };
nixConfig = { nixConfig = {
@ -161,17 +48,772 @@
extra-substituters = [ extra-substituters = [
"https://cache.nixos.org/" "https://cache.nixos.org/"
"https://helix.cachix.org" "https://helix.cachix.org"
"https://ssbm-nix.cachix.org"
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://nix.h.lyte.dev" "https://nix.h.lyte.dev"
"https://hyprland.cachix.org"
]; ];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
"ssbm-nix.cachix.org-1:YN104LKAWaKQIecOphkftXgXlYZVK/IRHM1UD7WAIew="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0=" "h.lyte.dev-2:te9xK/GcWPA/5aXav8+e5RHImKYMug8hIIbhHsKPN0M="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
}; };
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
disko,
sops-nix,
git-hooks,
wezterm,
home-manager,
home-manager-unstable,
helix,
hardware,
jovian,
mobile-nixos,
# nnf,
# hyprland,
slippi,
...
}: let
inherit (self) outputs;
inherit (outputs) nixosModules homeManagerModules overlays;
# TODO: make @ inputs unnecessary by making arguments explicit in all modules?
systems = ["aarch64-linux" "aarch64-darwin" "x86_64-darwin" "x86_64-linux"];
forSystems = nixpkgs.lib.genAttrs systems;
pkgsFor = system: (import nixpkgs {inherit system;}).extend overlays.default;
genPkgs = func: (forSystems (system: func (pkgsFor system)));
# pkg = callee: overrides: genPkgs (pkgs: pkgs.callPackage callee overrides);
unstable = {
forSystems = nixpkgs-unstable.lib.genAttrs systems;
pkgsFor = system: (import nixpkgs-unstable {inherit system;}).extend overlays.default;
genPkgs = func: (forSystems (system: func (pkgsFor system)));
pkg = callee: overrides: genPkgs (pkgs: pkgs.callPackage callee overrides);
};
style = {
colors = (import ./lib/colors.nix {inherit (nixpkgs) lib;}).schemes.catppuccin-mocha-sapphire;
font = {
name = "IosevkaLyteTerm";
size = 12;
};
};
/*
moduleArgs = {
# inherit style;
inherit helix slippi hyprland hardware disko home-manager;
inherit (outputs) nixosModules homeManagerModules diskoConfigurations overlays;
};
*/
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev";
in {
/*
kind of a quirk, but package definitions are actually in the "additions"
overlay I did this to work around some recursion problems
TODO: https://discourse.nixos.org/t/infinite-recursion-getting-started-with-overlays/48880
*/
packages = genPkgs (pkgs: {inherit (pkgs) iosevkaLyteTerm iosevkaLyteTermSubset nix-base-container-image;});
diskoConfigurations = import ./disko {inherit (nixpkgs) lib;};
templates = import ./templates;
formatter = genPkgs (p: p.alejandra);
checks = genPkgs ({system, ...}: {
git-hooks = git-hooks.lib.${system}.run {
src = ./.;
hooks = {
alejandra.enable = true;
};
};
});
devShells = genPkgs ({
system,
pkgs,
mkShell,
...
}: {
default = mkShell {
inherit (outputs.checks.${system}.git-hooks) shellHook;
packages = with pkgs; [
lua-language-server
nodePackages.bash-language-server
];
};
});
overlays = {
# the default overlay composes all the other overlays together
default = final: prev: {
overlays = with overlays; [
additions
modifications
unstable-packages
];
};
additions = final: prev: let
iosevkaLyteTerm = prev.callPackage ./packages/iosevkaLyteTerm.nix {};
in {
inherit iosevkaLyteTerm;
iosevkaLyteTermSubset = prev.callPackage ./packages/iosevkaLyteTermSubset.nix {
inherit iosevkaLyteTerm;
};
nix-base-container-image = final.dockerTools.buildImageWithNixDb {
name = "git.lyte.dev/lytedev/nix";
tag = "latest";
copyToRoot = with final; [
bash
coreutils
curl
gawk
gitFull
git-lfs
gnused
nodejs
wget
sudo
nixVersions.stable
cacert
gnutar
gzip
openssh
xz
(pkgs.writeTextFile {
name = "nix.conf";
destination = "/etc/nix/nix.conf";
text = ''
accept-flake-config = true
experimental-features = nix-command flakes
build-users-group =
substituters = https://nix.h.lyte.dev https://cache.nixos.org/
trusted-substituters = https://nix.h.lyte.dev https://cache.nixos.org/
trusted-public-keys = h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
'';
})
];
extraCommands = ''
# enable /usr/bin/env for scripts
mkdir -p usr
ln -s ../bin usr/bin
# create /tmp
mkdir -p tmp
# create HOME
mkdir -vp root
'';
config = {
Cmd = ["/bin/bash"];
Env = [
"LANG=en_GB.UTF-8"
"ENV=/etc/profile.d/nix.sh"
"BASH_ENV=/etc/profile.d/nix.sh"
"NIX_BUILD_SHELL=/bin/bash"
"PAGER=cat"
"PATH=/usr/bin:/bin"
"SSL_CERT_FILE=${final.cacert}/etc/ssl/certs/ca-bundle.crt"
"USER=root"
];
};
};
};
modifications = final: prev: let
wezterm-input = wezterm;
in rec {
helix = helix.outputs.packages.${prev.system}.helix;
final.helix = helix;
/*
TODO: would love to use a current wezterm build so I can make use of ssh/mux functionality without breakage
source: https://github.com/wez/wezterm/issues/3771
not-yet-merged (abandoned?): https://github.com/wez/wezterm/pull/4737
I did try using the latest code via the flake, but alas it did not resolve my issues with mux'ing
*/
wezterm = wezterm-input.outputs.packages.${prev.system}.default;
# wezterm = (import nixpkgs {inherit (prev) system;}).wezterm;
final.wezterm = wezterm;
# zellij = prev.zellij.overrideAttrs rec {
# version = "0.41.0";
# src = prev.fetchFromGitHub {
# owner = "zellij-org";
# repo = "zellij";
# rev = "v0.41.0";
# hash = "sha256-A+JVWYz0t9cVA8XZciOwDkCecsC2r5TU2O9i9rVg7do=";
# };
# cargoDeps = prev.zellij.cargoDeps.overrideAttrs (prev.lib.const {
# name = "zellij-vendor.tar.gz";
# inherit src;
# outputHash = "sha256-WxrMI7fV0pNsGjbNpXLr+xnMdWYkC4WxIeN4OK3ZPIE=";
# });
# };
# final.zellij = zellij;
};
unstable-packages = final: _prev: {
unstable-packages = import nixpkgs-unstable {
system = final.system;
config.allowUnfree = true;
};
};
};
nixosModules = import ./modules/nixos {
inherit home-manager home-manager-unstable helix nixosModules homeManagerModules pubkey overlays style sops-nix disko;
flakeInputs = self.inputs;
};
homeManagerModules = import ./modules/home-manager {
inherit home-manager home-manager-unstable helix nixosModules homeManagerModules pubkey overlays style;
inherit (nixpkgs) lib;
flakeInputs = self.inputs;
};
nixosConfigurations = {
beefcake = let
system = "x86_64-linux";
in
nixpkgs.lib.nixosSystem {
inherit system;
modules = with nixosModules; [
home-manager-defaults
# TODO: disko?
hardware.nixosModules.common-cpu-intel
outputs.nixosModules.deno-netlify-ddns-client
{
services.deno-netlify-ddns-client = {
enable = true;
username = "beefcake.h";
# TODO: router doesn't even do ipv6 yet...
ipv6 = false;
};
}
family-users
common
podman
troubleshooting-tools
virtual-machines
virtual-machines-gui
linux
fonts
./nixos/beefcake.nix
{
services.kanidm.package = (unstable.pkgsFor system).kanidm;
}
];
};
dragon = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
modules = with nixosModules; [
home-manager-unstable-defaults
outputs.diskoConfigurations.standard
hardware.nixosModules.common-cpu-amd
hardware.nixosModules.common-pc-ssd
common
password-manager
wifi
graphical-workstation
virtual-machines
virtual-machines-gui
music-production
# plasma6
gaming
slippi.nixosModules.default
outputs.nixosModules.deno-netlify-ddns-client
{
services.deno-netlify-ddns-client = {
enable = true;
username = "dragon.h";
# TODO: router doesn't even do ipv6 yet...
ipv6 = false;
};
}
./nixos/dragon.nix
{
home-manager.users.daniel = {
imports = with homeManagerModules; [
senpai
iex
cargo
firefox-no-tabs
linux-desktop-environment-config
slippi.homeManagerModules.default
];
};
}
];
};
bigtower = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
modules = with nixosModules; [
home-manager-unstable-defaults
outputs.diskoConfigurations.unencrypted
hardware.nixosModules.common-cpu-amd
hardware.nixosModules.common-pc-ssd
common
# wifi
graphical-workstation
music-production
gaming
./nixos/bigtower.nix
{
home-manager.users.daniel = {
imports = with homeManagerModules; [
firefox-no-tabs
linux-desktop-environment-config
];
};
}
];
};
htpc = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = with nixosModules; [
home-manager-defaults
hardware.nixosModules.common-pc-ssd
common
gaming
graphical-workstation
plasma6
./nixos/htpc.nix
{
home-manager.users.daniel = {
imports = with homeManagerModules; [
linux-desktop-environment-config
];
};
}
];
};
steamdeck1 = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
modules = with nixosModules; [
home-manager-unstable-defaults
outputs.diskoConfigurations.standard
hardware.nixosModules.common-pc-ssd
common
gaming
graphical-workstation
plasma6
jovian.outputs.nixosModules.jovian
{
networking.hostName = "steamdeck1";
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
hardware.bluetooth.enable = true;
networking.networkmanager.enable = true;
home-manager.users.daniel = {
imports = with homeManagerModules; [
firefox-no-tabs
linux-desktop-environment-config
];
};
}
];
};
foxtrot = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
modules = with nixosModules; [
home-manager-unstable-defaults
outputs.diskoConfigurations.standard
hardware.nixosModules.framework-13-7040-amd
common
kde-connect
password-manager
graphical-workstation
# plasma6
virtual-machines
virtual-machines-gui
laptop
gaming
cross-compiler
./nixos/foxtrot.nix
({pkgs, ...}: {
home-manager.users.daniel = {
imports = with homeManagerModules; [
senpai
iex
cargo
firefox-no-tabs
linux-desktop-environment-config
];
};
environment.systemPackages = with pkgs; [
fw-ectool
(writeShellApplication
{
name = "reset-wifi-module";
runtimeInputs = with pkgs; [kmod];
text = ''
modprobe -rv mt7921e
modprobe -v mt7921e
'';
})
(writeShellApplication
{
name = "perfmode";
# we use command -v $cmd here because we only want to invoke these calls _if_ the related package is installed on the system
# otherwise, they will likely have no effect anyways
text = ''
command -v powerprofilesctl &>/dev/null && bash -x -c 'powerprofilesctl set balanced'
command -v swaymsg &>/dev/null && bash -x -c 'swaymsg output eDP-1 mode 2880x1920@120Hz'
'';
})
(writeShellApplication
{
name = "battmode";
text = ''
command -v powerprofilesctl &>/dev/null && bash -x -c 'powerprofilesctl set power-saver'
command -v swaymsg &>/dev/null && bash -x -c 'swaymsg output eDP-1 mode 2880x1920@60Hz'
'';
})
];
})
];
};
thablet = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
modules = with nixosModules; [
home-manager-unstable-defaults
outputs.diskoConfigurations.standard
hardware.nixosModules.lenovo-thinkpad-x1-yoga
common
password-manager
graphical-workstation
plasma6
music-production
laptop
gaming
./nixos/thablet.nix
{
home-manager.users.daniel = {
imports = with homeManagerModules; [
senpai
iex
cargo
firefox-no-tabs
linux-desktop-environment-config
# slippi.homeManagerModules.default
];
};
}
];
};
/*
grablet = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = with nixosModules; [
common
outputs.diskoConfigurations.standard
hardware.nixosModules.common-cpu-intel-kaby-lake
hardware.nixosModules.common-pc-laptopp-ssd
graphical-workstation
laptop
gaming
./nixos/thablet.nix
{
home-manager.users.daniel = {
imports = with homeManagerModules; [
iex
cargo
linux-desktop-environment-config
];
};
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
}
];
};
*/
thinker = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
modules = with nixosModules; [
home-manager-unstable-defaults
{
_module.args = {
disks = ["/dev/nvme0n1"];
swapSize = "32G";
};
}
outputs.diskoConfigurations.standardWithHibernateSwap
hardware.nixosModules.lenovo-thinkpad-t480
hardware.nixosModules.common-pc-laptop-ssd
music-production
common
password-manager
graphical-workstation
plasma6
laptop
gaming
./nixos/thinker.nix
{
home-manager.users.daniel = {
imports = with homeManagerModules; [
senpai
iex
cargo
firefox-no-tabs
linux-desktop-environment-config
slippi.homeManagerModules.default
];
};
}
];
};
musicbox = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = with nixosModules; [
home-manager-defaults
{
_module.args = {
disks = ["/dev/sda"];
# swapSize = "8G";
};
}
outputs.diskoConfigurations.unencrypted
hardware.nixosModules.common-pc-laptop-ssd
music-production
common
graphical-workstation
wifi
# ./nixos/musicbox.nix
{
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
hardware.bluetooth.enable = true;
networking.networkmanager.enable = true;
home-manager.users.daniel = {
imports = with homeManagerModules; [
firefox-no-tabs
linux-desktop-environment-config
];
};
}
];
};
rascal = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = with nixosModules; [
home-manager-defaults
hardware.nixosModules.common-cpu-amd
common
linux
./nixos/rascal.nix
];
};
router = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = with nixosModules; [
home-manager-defaults
outputs.diskoConfigurations.unencrypted
common
linux
troubleshooting-tools
outputs.nixosModules.deno-netlify-ddns-client
{
services.deno-netlify-ddns-client = {
enable = true;
username = "router.h";
# TODO: ipv6
ipv6 = false;
};
}
/*
NOTE: maybe use this someday, but I think I need more concrete
networking knowledge before I know how to use it well. Additionally,
I can use my existing firewall configuration more easily if I manage
it directly.
nnf.nixosModules.default
*/
./nixos/router.nix
];
};
# pinephone-image =
# (import "${mobile-nixos}/lib/eval-with-configuration.nix" {
# configuration = with nixosModules; [
# linux
# home-manager-defaults
# # outputs.diskoConfigurations.unencrypted # can I even disko with an image-based installation?
# common
# wifi
# # TODO: how do I get a minimally useful mobile environment?
# # for me, this means an on-screen keyboard and suspend support I think?
# # I can live in a tty if needed and graphical stuff can all evolve later
# # not worried about modem
# # maybe/hopefully I can pull in or define my own sxmo via nix?
# ];
# device = "pine64-pinephone";
# pkgs = pkgsFor "aarch64-linux";
# })
# .outputs
# .disk-image;
pinephone = let
inherit (nixpkgs-unstable) lib;
in
lib.nixosSystem {
system = "aarch64-linux";
# lib.nixosSystem {
modules = with nixosModules; [
{
imports = [
(import "${mobile-nixos}/lib/configuration.nix" {
device = "pine64-pinephone";
})
];
# nixpkgs.hostPlatform.system = "aarch64-linux";
nixpkgs.buildPlatform = "x86_64-linux";
# TODO: quirk: since the pinephone kernel doesn't seem to have "rpfilter" support, firewall ain't working
networking.firewall.enable = lib.mkForce false;
# TODO: quirk: since git send-email requires perl support, which we don't seem to have on the pinephone, we're just disabling git for now
# TODO: would likely be easier/better to somehow ignore the assertion? probably a way to do that...
programs.git.enable = lib.mkForce false;
# this option is conflicted, presumably due to some assumption in my defaults/common config
# the sd-image module we're importing above has this set to true, so we better go with that?
# that said, I think the mobile-nixos bootloader module has this set to false, so...
# TODO: what does this mean?
boot.loader.generic-extlinux-compatible.enable = lib.mkForce true;
# another conflicting option since I think I default to NetworkManager and this conflicts with networking.wireless.enable
networking.networkmanager.enable = lib.mkForce false;
networking.wireless.enable = lib.mkForce true;
}
# TODO: how do I build this as a .img to flash to an SD card?
# for testing, this seems to work `nixos-rebuild build --impure --flake .#pinephone`
# TODO: would like to use the mobile-nixos installer?
"${nixpkgs-unstable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix"
linux
home-manager-unstable-defaults
# outputs.diskoConfigurations.unencrypted # can I even disko with an image-based installation?
common
wifi
{
system.stateVersion = "24.11";
}
{
# nixpkgs.buildPlatform = "x86_64-linux";
# nixpkgs.hostPlatform = lib.systems.examples.aarch64-multiplatform;
# nixpkgs.localSystem.system = lib.systems.examples.x86_64-linux;
# nixpkgs.crossSystem = lib.mkForce null;
}
];
};
};
images.pinephone = outputs.nixosConfigurations.pinephone.config.system.build.sdImage;
homeConfigurations = {
"deck" = let
system = "x86_64-linux";
pkgs = unstable.pkgsFor system;
in
home-manager-unstable.lib.homeManagerConfiguration {
inherit pkgs;
modules = with homeManagerModules; [
common
{
home = {
homeDirectory = "/home/deck";
username = "deck";
stateVersion = "24.11";
};
}
{
home.packages = with pkgs; [
ludusavi
rclone
];
}
linux
];
};
};
/*
TODO: nix-on-droid for phone terminal usage? mobile-nixos?
TODO: nix-darwin for work?
TODO: nixos ISO?
*/
};
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View file

@ -0,0 +1,380 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="141.5919mm"
height="122.80626mm"
viewBox="0 0 501.70361 435.14028"
id="svg2"
version="1.1"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
sodipodi:docname="Nix_snowflake_lytedev.svg"
inkscape:export-filename="Nix_snowflake_lytedev.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
id="linearGradient5562">
<stop
style="stop-color:#699ad7;stop-opacity:1"
offset="0"
id="stop5564" />
<stop
id="stop5566"
offset="0.24345198"
style="stop-color:#7eb1dd;stop-opacity:1" />
<stop
style="stop-color:#7ebae4;stop-opacity:1"
offset="1"
id="stop5568" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5053">
<stop
style="stop-color:#415e9a;stop-opacity:1"
offset="0"
id="stop5055" />
<stop
id="stop5057"
offset="0.23168644"
style="stop-color:#4a6baf;stop-opacity:1" />
<stop
style="stop-color:#5277c3;stop-opacity:1"
offset="1"
id="stop5059" />
</linearGradient>
<linearGradient
id="linearGradient5960"
inkscape:collect="always">
<stop
id="stop5962"
offset="0"
style="stop-color:#637ddf;stop-opacity:1" />
<stop
style="stop-color:#649afa;stop-opacity:1"
offset="0.23168644"
id="stop5964" />
<stop
id="stop5966"
offset="1"
style="stop-color:#719efa;stop-opacity:1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5867">
<stop
style="stop-color:#7363df;stop-opacity:1"
offset="0"
id="stop5869" />
<stop
id="stop5871"
offset="0.23168644"
style="stop-color:#6478fa;stop-opacity:1" />
<stop
style="stop-color:#719efa;stop-opacity:1"
offset="1"
id="stop5873" />
</linearGradient>
<linearGradient
y2="515.97058"
x2="282.26105"
y1="338.62445"
x1="213.95642"
gradientTransform="translate(983.36076,601.38885)"
gradientUnits="userSpaceOnUse"
id="linearGradient5855"
xlink:href="#linearGradient5960"
inkscape:collect="always" />
<linearGradient
y2="515.97058"
x2="282.26105"
y1="338.62445"
x1="213.95642"
gradientTransform="translate(-197.75174,-337.1451)"
gradientUnits="userSpaceOnUse"
id="linearGradient5855-8"
xlink:href="#linearGradient5867"
inkscape:collect="always" />
<linearGradient
y2="247.58188"
x2="-702.75317"
y1="102.74675"
x1="-775.20807"
gradientTransform="translate(983.36076,601.38885)"
gradientUnits="userSpaceOnUse"
id="linearGradient4544"
xlink:href="#linearGradient5960"
inkscape:collect="always" />
<clipPath
id="clipPath4501"
clipPathUnits="userSpaceOnUse">
<circle
r="241.06563"
cy="686.09473"
cx="335.13995"
id="circle4503"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#adadad;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
</clipPath>
<clipPath
id="clipPath5410"
clipPathUnits="userSpaceOnUse">
<circle
r="241.13741"
cy="340.98975"
cx="335.98114"
id="circle5412"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
</clipPath>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5053"
id="linearGradient5137"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(864.55062,-2197.497)"
x1="-584.19934"
y1="782.33563"
x2="-496.29703"
y2="937.71399" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5053"
id="linearGradient5147"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(864.55062,-2197.497)"
x1="-584.19934"
y1="782.33563"
x2="-496.29703"
y2="937.71399" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5562"
id="linearGradient5162"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(70.505061,-1761.3076)"
x1="200.59668"
y1="351.41116"
x2="290.08701"
y2="506.18814" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5562"
id="linearGradient5172"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(70.505061,-1761.3076)"
x1="200.59668"
y1="351.41116"
x2="290.08701"
y2="506.18814" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5562"
id="linearGradient5182"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(70.505061,-1761.3076)"
x1="200.59668"
y1="351.41116"
x2="290.08701"
y2="506.18814" />
<linearGradient
y2="506.18814"
x2="290.08701"
y1="351.41116"
x1="200.59668"
gradientTransform="translate(70.505061,-1761.3076)"
gradientUnits="userSpaceOnUse"
id="linearGradient5201"
xlink:href="#linearGradient5562"
inkscape:collect="always" />
<linearGradient
y2="937.71399"
x2="-496.29703"
y1="782.33563"
x1="-584.19934"
gradientTransform="translate(864.55062,-2197.497)"
gradientUnits="userSpaceOnUse"
id="linearGradient5205"
xlink:href="#linearGradient5053"
inkscape:collect="always" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98318225"
inkscape:cx="112.8987"
inkscape:cy="191.21582"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="2059"
inkscape:window-height="1588"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:snap-global="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:showpageshadow="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="print-logo"
inkscape:groupmode="layer"
id="layer1"
style="display:inline"
transform="translate(-156.33871,933.1905)">
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
id="path4861"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#df3c59;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 353.50926,-797.4433 -122.21756,211.6631 -28.53477,-48.37 32.93839,-56.6875 -65.41521,-0.1719 -13.9414,-24.1698 14.23637,-24.721 93.11177,0.2939 33.46371,-57.6903 z"
id="use4863"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#df3c59;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 362.88537,-628.243 244.41439,0.012 -27.62229,48.8968 -65.56199,-0.1817 32.55876,56.7371 -13.96098,24.1585 -28.52722,0.032 -46.3013,-80.7841 -66.69317,-0.1353 z"
id="use4865"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#df3c59;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 505.14318,-720.9886 -122.19683,-211.6751 56.15706,-0.5268 32.6236,56.8692 32.85645,-56.5653 27.90237,0.011 14.29086,24.6896 -46.81047,80.4902 33.22946,57.8256 z"
id="use4867"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="path4873"
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#8e293b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="use4875"
d="m 451.3364,-803.53264 -244.4144,-0.012 27.62229,-48.89685 65.56199,0.18175 -32.55875,-56.73717 13.96097,-24.15851 28.52722,-0.0315 46.3013,80.78414 66.69317,0.13524 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#8e293b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="use4877"
d="m 460.87178,-633.8425 122.21757,-211.66304 28.53477,48.37003 -32.93839,56.68751 65.4152,0.1718 13.9414,24.1698 -14.23636,24.7211 -93.11177,-0.294 -33.46371,57.6904 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#8e293b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<g
id="layer2"
inkscape:label="guides"
style="display:none"
transform="translate(72.039038,-1799.4476)">
<path
d="M 460.60629,594.72881 209.74183,594.7288 84.309616,377.4738 209.74185,160.21882 l 250.86446,1e-5 125.43222,217.255 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="true"
sodipodi:arg2="1.5707963"
sodipodi:arg1="1.0471976"
sodipodi:r2="217.25499"
sodipodi:r1="250.86446"
sodipodi:cy="377.47382"
sodipodi:cx="335.17407"
sodipodi:sides="6"
id="path6032"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.236;fill:#4e4d52;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
sodipodi:type="star" />
<path
transform="translate(0,-308.26772)"
sodipodi:type="star"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#4e4d52;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
id="path5875"
sodipodi:sides="6"
sodipodi:cx="335.17407"
sodipodi:cy="685.74158"
sodipodi:r1="100.83495"
sodipodi:r2="87.32563"
sodipodi:arg1="1.0471976"
sodipodi:arg2="1.5707963"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 385.59154,773.06721 -100.83495,0 -50.41747,-87.32564 50.41748,-87.32563 100.83495,10e-6 50.41748,87.32563 z" />
<path
transform="translate(0,-308.26772)"
sodipodi:nodetypes="ccccccccc"
inkscape:connector-curvature="0"
id="path5851"
d="m 1216.5591,938.53395 123.0545,228.14035 -42.6807,-1.2616 -43.4823,-79.7725 -39.6506,80.3267 -32.6875,-19.7984 53.4737,-100.2848 -37.1157,-73.88955 z"
style="fill:url(#linearGradient5855);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.415;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#c53a3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect5884"
width="48.834862"
height="226.22897"
x="-34.74221"
y="446.17056"
transform="rotate(-30)" />
<path
transform="translate(0,-308.26772)"
sodipodi:type="star"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.509;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="path3428"
sodipodi:sides="6"
sodipodi:cx="223.93674"
sodipodi:cy="878.63831"
sodipodi:r1="28.048939"
sodipodi:r2="24.291094"
sodipodi:arg1="0"
sodipodi:arg2="0.52359878"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 251.98568,878.63831 -14.02447,24.29109 h -28.04894 l -14.02447,-24.29109 14.02447,-24.2911 h 28.04894 z" />
<use
x="0"
y="0"
xlink:href="#rect5884"
id="use4252"
transform="rotate(60,268.29786,489.4515)"
width="100%"
height="100%" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.650794;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4254"
width="5.3947482"
height="115.12564"
x="545.71014"
y="467.07007"
transform="rotate(30,575.23539,-154.13386)" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -1,4 +1,4 @@
{nixpkgs, ...}: { {lib, ...}: {
schemes = let schemes = let
mkColorScheme = scheme @ { mkColorScheme = scheme @ {
scheme-name, scheme-name,
@ -22,7 +22,6 @@
}: let }: let
base = base =
{ {
# aliases?
text = fg; text = fg;
primary = blue; primary = blue;
urgent = red; urgent = red;
@ -50,14 +49,14 @@
} }
// scheme; // scheme;
in in
{ base
withHashPrefix = nixpkgs.lib.mapAttrs (_: value: "#${value}") base; // {
} withHashPrefix = lib.mapAttrs (_: value: "#${value}") base;
// base; };
in { in {
donokai = mkColorScheme { donokai = mkColorScheme {
scheme-name = "donokai"; scheme-name = "donokai";
bg = "111111"; bg = "110f0a";
bg2 = "181818"; bg2 = "181818";
bg3 = "222222"; bg3 = "222222";
bg4 = "292929"; bg4 = "292929";

View file

@ -80,6 +80,7 @@ nix-shell --packages git --run "sudo nix run \
# install # install
nix-shell --packages git \ nix-shell --packages git \
--run "sudo nixos-install \ --run "sudo nixos-install \
--no-write-lock-file \
--flake 'git+https://git.lyte.dev/lytedev/nix#${FLAKE_ATTR}' \ --flake 'git+https://git.lyte.dev/lytedev/nix#${FLAKE_ATTR}' \
--option trusted-substituters 'https://cache.nixos.org https://nix.h.lyte.dev' \ --option trusted-substituters 'https://cache.nixos.org https://nix.h.lyte.dev' \
--option trusted-public-keys 'cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0='" --option trusted-public-keys 'cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0='"

View file

@ -1,5 +0,0 @@
{outputs, ...}: {
imports = with outputs.homeManagerModules; [
sway
];
}

View file

@ -1,26 +0,0 @@
{
# pkgs,
# colors,
...
}: {
programs.bat = {
enable = true;
config = {
theme = "ansi";
};
# themes = {
# "Catppuccin-mocha" = builtins.readFile (pkgs.fetchFromGitHub
# {
# owner = "catppuccin";
# repo = "bat";
# rev = "477622171ec0529505b0ca3cada68fc9433648c6";
# sha256 = "6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
# }
# + "/Catppuccin-mocha.tmTheme");
# };
};
home.shellAliases = {
cat = "bat";
};
}

View file

@ -1,34 +0,0 @@
{colors, ...}: {
programs.broot = {
enable = true;
enableFishIntegration = true;
settings = {
modal = true; # vim mode?
verbs = [
{
invocation = "edit";
shortcut = "e";
execution = "$EDITOR {file}";
}
];
skin = with colors.withHashPrefix; {
status_normal_fg = fg;
status_normal_bg = bg;
status_error_fg = red;
status_error_bg = yellow;
tree_fg = red;
selected_line_bg = bg2;
permissions_fg = purple;
size_bar_full_bg = red;
size_bar_void_bg = bg;
directory_fg = yellow;
input_fg = blue;
flag_value_fg = yellow;
table_border_fg = red;
code_fg = yellow;
};
};
};
}

View file

@ -1,9 +0,0 @@
{config, ...}: {
home.file."${config.xdg.configHome}/cargo/config.toml" = {
enable = true;
text = ''
[build]
rustdocflags = ["--default-theme=ayu"];
'';
};
}

View file

@ -1,108 +0,0 @@
{
pkgs,
lib,
system,
inputs,
outputs,
config,
...
}: {
# TODO: fonts? right now they are only handled at the nixos-level (desktop-usage module)
# TODO: wallpaper?
imports = with outputs.homeManagerModules; [
# nix-colors.homeManagerModules.default
fish
bat
helix
git
zellij
broot
nnn
htop
tmux
];
programs.home-manager.enable = true;
home = {
username = lib.mkDefault "lytedev";
homeDirectory = lib.mkDefault "/home/lytedev";
stateVersion = lib.mkDefault "23.11";
sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
PAGER = "less";
MANPAGER = "less";
};
packages = [
# tools I use when editing nix code
pkgs.nil
pkgs.alejandra
# common scripts
(pkgs.buildEnv {
name = "my-scripts-common";
paths = [./scripts/common];
})
];
};
# TODO: not common?
# programs.password-store = {
# enable = true;
# package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
# };
# programs.gitui = {
# enable = true;
# };
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
programs.eza = {
enable = true;
package = inputs.nixpkgs.legacyPackages.${system}.eza;
};
programs.skim = {
# https://github.com/lotabout/skim/issues/494
enable = false;
enableFishIntegration = true;
defaultOptions = ["--no-clear-start" "--color=16"];
};
programs.atuin = {
enable = true;
enableBashIntegration = config.programs.bash.enable;
enableFishIntegration = config.programs.fish.enable;
enableZshIntegration = config.programs.zsh.enable;
enableNushellIntegration = config.programs.nushell.enable;
settings = {
};
};
programs.fzf = {
# using good ol' fzf until skim sucks less out of the box I guess
enable = true;
# enableFishIntegration = true;
# defaultCommand = "fd --type f";
# defaultOptions = ["--height 40%"];
# fileWidgetOptions = ["--preview 'head {}'"];
};
# TODO: regular cron or something?
programs.nix-index = {
enable = true;
enableBashIntegration = config.programs.bash.enable;
enableFishIntegration = config.programs.fish.enable;
enableZshIntegration = config.programs.zsh.enable;
};
}

File diff suppressed because it is too large Load diff

View file

@ -1,10 +0,0 @@
{
pkgs,
outputs,
...
}: {
imports = with outputs.homeManagerModules; [
kitty
wezterm
];
}

View file

@ -1,79 +0,0 @@
{
programs.eww = {
enable = true;
};
home.file.".config/eww/eww.yuck" = {
enable = true;
text = ''
(defwidget bar []
(centerbox :orientation "h"
(sidestuff)
(box)
(music)))
(defwindow bar
:monitor 0
:stacking "fg"
:exclusive true
:geometry
(geometry
:x "0%"
:y "0%"
:width "100%"
:height "31px"
:anchor "bottom center")
(bar))
(defwidget sidestuff []
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "start" :spacing 20
time
; TODO: idle inhibitor?
; TODO: get these to align properly?
(box :class "mic" (
box :class {micMuted == "false" ? "live" : "muted"} {micMuted == "false" ? " " : " "}
) {micVolume + "%"}
)
(box :class "vol" (
box :class {muted == "false" ? "live" : "muted"} {muted == "false" ? "󰕾 " : "󰖁 "}
) {volume + "%"}
)
{" " + round(EWW_CPU["avg"], 0) + "%"}
{" " + round(EWW_RAM["used_mem_perc"], 0) + "%"}
{isDesktop == "true" ? "" : " " + brightness + "%"}
{isDesktop == "true" ? "" : "󱊣 " + EWW_BATTERY["BAT0"]["capacity"] + "%/" + EWW_BATTERY["BAT1"]["capacity"] + "%"}
))
(defwidget music []
(box :class "music"
:orientation "h"
:halign "end"
:space-evenly false
{music != "" ? "''${music}" : ""}))
(deflisten music :initial ""
"playerctl --follow metadata --format '{{ title }} by {{ artist }}' || true")
(deflisten volume :initial "0"
"pamixer --get-volume; pactl subscribe | grep sink --line-buffered | while read i; do pamixer --get-volume; done")
(deflisten muted :initial "false"
"pamixer --get-mute; pactl subscribe | grep sink --line-buffered | while read i; do pamixer --get-mute; done")
(deflisten micVolume :initial "0"
"pamixer --default-source --get-volume; pactl subscribe | grep source --line-buffered | while read i; do pamixer --default-source --get-volume; done")
(deflisten micMuted :initial "false"
"pamixer --default-source --get-mute; pactl subscribe | grep source --line-buffered | while read i; do pamixer --default-source --get-mute; done")
(defpoll time :interval "1s"
"date '+%a %b %d %H:%M:%S'")
(defpoll isDesktop :interval "24h"
"if [ -d \"$HOME/.config/lytedev-env/host-desktop\" ]; then echo true; else echo false; fi")
(defpoll brightness :interval "10s"
"echo $(((100 * $(brightnessctl get)) / $(brightnessctl max)))")
'';
};
}

View file

@ -38,8 +38,8 @@ $rosewater: #f5e0dc;
font-size: 12.0pt; font-size: 12.0pt;
} }
.sidestuff slider { .leftsidestuff slider {
color: #ffd5cd; color: $sapphire;
} }
.metric {} .metric {}
@ -75,10 +75,34 @@ $rosewater: #f5e0dc;
.vol .muted, .vol .muted,
.mic .live { .mic .live {
color: #f38ba8; color: $red;
} }
.vol .live, .vol .live,
.mic .muted { .mic .muted {
color: #74c7ec; color: $sapphire;
} }
.workspace {
/* height: 100%; */
padding-left: 10px;
padding-right: 10px;
color: #666666;
}
.workspace.occupied {
color: $text;
}
.workspace.occupied.active,
.workspace.active {
color: $base;
background-color: $subtext1;
}
.workspace.occupied.focused.active,
.workspace.occupied.focused,
.workspace.focused {
color: $base;
background-color: $sapphire;
}

View file

@ -1,8 +1,9 @@
(defwidget bar [] (defwidget bar []
(centerbox :orientation "h" (centerbox :orientation "h"
(sidestuff) (leftsidestuff)
(box) (box)
(music))) (rightsidestuff)
))
(defwindow bar0 (defwindow bar0
:monitor 0 :monitor 0
@ -13,7 +14,7 @@
:x "0%" :x "0%"
:y "0%" :y "0%"
:width "100%" :width "100%"
:height "31px" :height "32px"
:anchor "bottom center") :anchor "bottom center")
(bar)) (bar))
@ -26,27 +27,35 @@
:x "0%" :x "0%"
:y "0%" :y "0%"
:width "100%" :width "100%"
:height "31px" :height "32px"
:anchor "bottom center") :anchor "bottom center")
(bar)) (bar))
(defwidget sidestuff [] (defwidget rightsidestuff []
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "start" :spacing 20 (box :class "rightsidestuff" :orientation "h" :space-evenly false :halign "end" :valign "center" :spacing 10
(music)
(systray)
))
(defwidget leftsidestuff []
(box :class "leftsidestuff" :orientation "h" :space-evenly false :halign "start" :valign "center" :spacing 10
time time
; TODO: idle inhibitor? ; TODO: idle inhibitor?
; TODO: get these to align properly? ; TODO: get these to align properly? icons seem lower than they should be?
(box :class "mic" ( (box :class "mic" (
box :class {micMuted == "false" ? "live" : "muted"} {micMuted == "false" ? " " : " "} box :class {micMuted == "false" ? "live" : "muted"} {micMuted == "false" ? " " : " "}
) {micVolume + "%"} ) {"${micVolume}%"}
) )
(box :class "vol" ( (box :class "vol" (
box :class {muted == "false" ? "live" : "muted"} {muted == "false" ? "󰕾 " : "󰖁 "} box :class {muted == "false" ? "live" : "muted"} {muted == "false" ? "󰕾 " : "󰖁 "}
) {volume + "%"} ) {"${volume}%"}
) )
{" " + round(EWW_CPU["avg"], 0) + "%"} {" ${round(EWW_CPU["avg"], 0)}%"}
{" " + round(EWW_RAM["used_mem_perc"], 0) + "%"} {" ${round(EWW_RAM["used_mem_perc"], 0)}%"}
{isDesktop == "true" ? "" : " " + brightness + "%"} ; TODO: have these "widgets" be omitted entirely instead of just empty strings
{isDesktop == "true" ? "" : "󱊣 " + EWW_BATTERY["BAT1"]["capacity"] + "%"} {(showBrightness == "true") ? (" ${brightness}%") : ""}
{(showBattery == "true") ? ("󱊣 ${EWW_BATTERY["BAT1"]["capacity"]}% (${batteryTime})") : ""}
(box :orientation "h" :space-evenly false :halign "start" :valign "center" (workspaces))
)) ))
(defwidget music [] (defwidget music []
@ -71,14 +80,26 @@
(deflisten micMuted :initial "false" (deflisten micMuted :initial "false"
"pamixer --default-source --get-mute; pactl subscribe | grep source --line-buffered | while read i; do pamixer --default-source --get-mute; done") "pamixer --default-source --get-mute; pactl subscribe | grep source --line-buffered | while read i; do pamixer --default-source --get-mute; done")
; "upower -d | rg '\\s*(time to empty|time to full):\\s*(\\d.*)\$' -r '\$2'; upower --monitor-detail | rg '\\s*(time to empty|time to full):\\s*(\\d.*)\$' -r '\$2'")
; (deflisten batteryTime :initial "unknown"
; "upower -d | rg '\s*time to empty:\s*(\d.*)\$' -r '\$1'; upower --monitor-detail | rg '\\s*time to empty:\\s*(\\d.*)\$' -r '\$1'")
(defpoll time :interval "1s" (defpoll time :interval "1s"
"date '+%a %b %d %H:%M:%S'") "date '+%a %b %d %H:%M:%S'")
(defpoll isDesktop :interval "24h" (defpoll showBrightness :interval "24h"
"if [ -d \"$HOME/.config/lytedev-env/host-desktop\" ]; then echo true; else echo false; fi") ; if we have at least one file in /sys/class/backlight, we should try and show brightness
"if [ \"$(find /sys/class/backlight -mindepth 1 -maxdepth 1 | head -n 1 | wc -l)\" == \"1\" ]; then echo true; else echo false; fi")
(defpoll showBattery :interval "24h"
; if we have at least one battery in /sys/class/power_supply, we should try and show battery levels
"if find /sys/class/power_supply -mindepth 1 -maxdepth 1 2>&1 | rg '\/sys\/class\/power_supply\/BAT' 2>&1 > /dev/null; then echo true; else echo false; fi")
(defpoll brightness :interval "10s" (defpoll brightness :interval "10s"
"echo $(((100 * $(brightnessctl get)) / $(brightnessctl max)))") "echo $(((100 * $(brightnessctl get)) / $(brightnessctl max)))")
(defpoll monitor :interval "60s" (deflisten batteryTime :initial "unknown" "scripts/battery-time.bash")
"echo $EWW_BAR_MON")
(deflisten workspace "scripts/hypr-workspaces.bash")
(defwidget workspaces [] (literal :content workspace))

View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
{ upower -d; upower --monitor-detail; } \
| rg '\s*time to.*:\s*(\d.*)\s*$' -r '$1'

View file

@ -0,0 +1,70 @@
#!/usr/bin/env bash
# TODO: we're mixing bash arrays and not-arrays - get it together
#define icons for workspaces 1-9
ic=(1 2 3 4 5 6 7 8 9)
occ() { export o"$1"="occupied"; }
unocc() { unset -v o"$1"; }
active() { export a"$1"="active"; }
unactive() { unset -v a"$1"; }
focus() { export f"$1"="focused"; }
unfocus() { unset -v f"$1"; }
workspaces() {
for num in 1 2 3 4 5 6 7 8 9; do
unfocus $num
unactive $num
unocc $num
done
# TODO: avoid recomputing these each time and actually listen to the events?
mons_json=$(hyprctl monitors -j)
for num in $(hyprctl workspaces -j | jq -r '.[] | select(.windows > 0) | .id'); do
occ "$num"
done
for num in $(echo "$mons_json" | jq -r '.[].activeWorkspace.id'); do
active "$num"
done
for num in $(echo "$mons_json" | jq -r '.[] | select(.focused) | .activeWorkspace.id'); do
focus "$num"
done
# TODO: would be nice to have monitors' workspaces show up in left-to-right
# order as laid out in physical/pixel space
# this would make glancing at the workspace indicator more intuitive
# TODO: might be nice to exclude certain windows as counting towards "occupation" such as xwaylandvideobridge or w/e
# NOTE: maybe I can group workspaces by their monitor with some mechanism for "unassigned" workspace to show up by a "primary" monitor
# render eww widget
echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" \
(box :class \"workspaces\" :orientation \"h\" :spacing 0 :space-evenly \"true\" \
(button :onclick \"hyprctl dispatch workspace 1\" :onrightclick \"hyprctl dispatch workspace 1\" :class \"workspace $a1 $o1 $f1\" \"${ic[0]}\") \
(button :onclick \"hyprctl dispatch workspace 2\" :onrightclick \"hyprctl dispatch workspace 2\" :class \"workspace $a2 $o2 $f2\" \"${ic[1]}\") \
(button :onclick \"hyprctl dispatch workspace 3\" :onrightclick \"hyprctl dispatch workspace 3\" :class \"workspace $a3 $o3 $f3\" \"${ic[2]}\") \
(button :onclick \"hyprctl dispatch workspace 4\" :onrightclick \"hyprctl dispatch workspace 4\" :class \"workspace $a4 $o4 $f4\" \"${ic[3]}\") \
(button :onclick \"hyprctl dispatch workspace 5\" :onrightclick \"hyprctl dispatch workspace 5\" :class \"workspace $a5 $o5 $f5\" \"${ic[4]}\") \
(button :onclick \"hyprctl dispatch workspace 6\" :onrightclick \"hyprctl dispatch workspace 6\" :class \"workspace $a6 $o6 $f6\" \"${ic[5]}\") \
(button :onclick \"hyprctl dispatch workspace 7\" :onrightclick \"hyprctl dispatch workspace 7\" :class \"workspace $a7 $o7 $f7\" \"${ic[6]}\") \
(button :onclick \"hyprctl dispatch workspace 8\" :onrightclick \"hyprctl dispatch workspace 8\" :class \"workspace $a8 $o8 $f8\" \"${ic[7]}\") \
(button :onclick \"hyprctl dispatch workspace 9\" :onrightclick \"hyprctl dispatch workspace 9\" :class \"workspace $a9 $o9 $f9\" \"${ic[8]}\") \
) \
)"
}
# initial render
workspaces
# listen to events and re-render
while true; do
# TODO: not sure why this socat | read invocation seems to stop?
socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do
workspaces "$line"
done
done
echo '(box "DONE")'

View file

@ -1,7 +0,0 @@
{pkgs, ...}: {
programs.eww = {
enable = true;
package = pkgs.eww-wayland;
configDir = ./eww;
};
}

View file

@ -1,22 +0,0 @@
{...}: {
programs.firefox = {
profiles = {
daniel = {
userChrome = ''
#TabsToolbar {
visibility: collapse;
}
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar>.toolbar-items {
opacity: 0;
pointer-events: none;
}
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
visibility: collapse !important;
}
'';
};
};
};
}

View file

@ -1,40 +0,0 @@
{pkgs, ...}: {
programs.firefox = {
# TODO: this should be able to work on macos, no?
# TODO: enable dark theme by default
enable = true;
# TODO: uses nixpkgs.pass so pass otp doesn't work
package = pkgs.firefox.override {nativeMessagingHosts = [pkgs.passff-host];};
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [
# ublock-origin
# ]; # TODO: would be nice to have _all_ my firefox stuff managed here instead of Firefox Sync maybe?
profiles = {
daniel = {
id = 0;
settings = {
"general.smoothScroll" = true;
"browser.zoom.siteSpecific" = false;
};
extraConfig = ''
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
// user_pref("full-screen-api.ignore-widgets", true);
user_pref("media.ffmpeg.vaapi.enabled", true);
user_pref("media.rdd-vpx.enabled", true);
'';
userChrome = ''
#webrtcIndicator {
display: none;
}
'';
# userContent = ''
# '';
};
};
};
}

View file

@ -1,84 +0,0 @@
{pkgs, ...}: {
home = {
packages = [
pkgs.gawk # used in prompt
];
};
programs.fish = {
enable = true;
# I load long scripts from files for a better editing experience
shellInit = builtins.readFile ./fish/shellInit.fish;
interactiveShellInit = builtins.readFile ./fish/interactiveShellInit.fish;
loginShellInit = "";
functions = {
# TODO: I think these should be loaded from fish files too for better editor experience?
d = ''
# --wraps=cd --description "Quickly jump to NICE_HOME (or given relative or absolute path) and list files."
if count $argv > /dev/null
cd $argv
else
cd $NICE_HOME
end
la
'';
c = ''
if count $argv > /dev/null
cd $NICE_HOME && d $argv
else
d $NICE_HOME
end
'';
ltl = ''
set d $argv[1] .
set -l l ""
for f in $d[1]/*
if test -z $l; set l $f; continue; end
if command test $f -nt $l; and test ! -d $f
set l $f
end
end
echo $l
'';
has_command = "command --quiet --search $argv[1]";
};
shellAbbrs = {};
shellAliases = {
l = "br";
ls = "eza --group-directories-first --classify";
la = "eza -la --group-directories-first --classify";
lA = "eza -la --all --group-directories-first --classify";
tree = "eza --tree --level=3";
lt = "eza -l --sort=modified";
lat = "eza -la --sort=modified";
lc = "lt --sort=accessed";
lT = "lt --reverse";
lC = "lc --reverse";
lD = "la --only-dirs";
"cd.." = "d ..";
"cdc" = "d $XDG_CONFIG_HOME";
"cdn" = "d $NOTES_PATH";
"cdl" = "d $XDG_DOWNLOAD_DIR";
"cdg" = "d $XDG_GAMES_DIR";
".." = "d ..";
"..." = "d ../..";
"...." = "d ../../..";
"....." = "d ../../../..";
"......" = "d ../../../../..";
"......." = "d ../../../../../..";
"........" = "d ../../../../../../..";
"........." = "d ../../../../../../../..";
p = "ping";
dc = "docker compose";
pc = "podman-compose";
k = "kubectl";
kg = "kubectl get";
v = "$EDITOR";
sv = "sudo $EDITOR";
kssh = "kitty +kitten ssh";
};
};
}

View file

@ -1,128 +1,138 @@
# prompt # prompt
function get_hostname function get_hostname
if test (uname) = Linux || test (uname) = Darwin if test (uname) = Linux || test (uname) = Darwin
has_command hostname && hostname | cut -d. -f1 || cat /etc/hostname has_command hostname && hostname | cut -d. -f1 || cat /etc/hostname
else else
# assume bsd # assume bsd
hostname | head -n 1 | cut -d. -f1 hostname | head -n 1 | cut -d. -f1
end end
end end
function fish_greeting function fish_greeting
_prompt_prefix _prompt_prefix
printf "%s\n" (date) printf "%s\n" (date)
end end
function preprocess_pwd function preprocess_pwd
test (pwd) = / && echo "/" && return 1 test (pwd) = / && echo / && return 1
test (pwd) = $NICE_HOME && echo "~" && return 0 test (pwd) = $NICE_HOME && echo "~" && return 0
pwd \ pwd \
| cut -c2- \ | cut -c2- \
| gawk '{n=split($0,p,"/");for(i=1;i<=n;i++){if(i==n){printf "/%s",p[i]}else{printf "/%.3s",p[i]}}}' | gawk '{n=split($0,p,"/");for(i=1;i<=n;i++){if(i==n){printf "/%s",p[i]}else{printf "/%.3s",p[i]}}}'
end end
function _maybe_sudo_prefix function _maybe_elevated_access_prefix
if set -q SUDO_USER if set -q SUDO_USER
set_color -b yellow black set_color -b yellow black
printf " SUDO " printf " SUDO "
set_color -b normal normal set_color -b normal normal
printf " " printf " "
end else if test $USER = root
set_color -b red black
printf " ROOT "
set_color -b normal normal
printf " "
end
end end
function _maybe_aws_profile function _maybe_aws_profile
if set -q AWS_PROFILE && test $AWS_PROFILE = prd if set -q AWS_PROFILE && test $AWS_PROFILE = prd
printf " " printf " "
set_color -b yellow black set_color -b yellow black
printf " AWS_PROFILE=prd " printf " AWS_PROFILE=prd "
set_color -b normal normal set_color -b normal normal
end end
end end
function _user_and_host function _user_and_host
if test $argv[1] -eq 0 if test $argv[1] -eq 0
set_color -b normal blue set_color -b normal blue
else else
set_color -b normal red set_color -b normal red
end end
printf "%s@%s" $USER (get_hostname) printf "%s@%s" $USER (get_hostname)
end end
function _cur_work_dir function _cur_work_dir
set_color -b normal magenta set_color -b normal magenta
printf " %s" (preprocess_pwd) printf " %s" (preprocess_pwd)
end end
function _last_cmd_duration function _last_cmd_duration
set_color -b normal green set_color -b normal green
set -q CMD_DURATION && printf " %dms" $CMD_DURATION set -q CMD_DURATION && printf " %dms" $CMD_DURATION
if test $CMD_DURATION -gt 5000
printf "\e]777;notify;%s;%s\e\\" "WezTerm: Command Finished" (history --max 1)
end
end end
function _maybe_jobs_summary function _maybe_jobs_summary
if jobs -q if jobs -q
set_color -b normal cyan set_color -b normal cyan
printf " &%d" (jobs -p | wc -l) printf " &%d" (jobs -p | wc -l)
end end
end end
function _user_prompt function _user_prompt
printf "\n" printf "\n"
set_color brblack set_color brblack
if test (id -u) -eq 0 if test (id -u) -eq 0
printf '# ' printf '# '
else else
printf '$ ' printf '$ '
end end
set_color -b normal normal set_color -b normal normal
end end
function _maybe_git_summary function _maybe_git_summary
set_color -b normal yellow set_color -b normal yellow
set cur_sha (git rev-parse --short HEAD 2>/dev/null) set cur_sha (git rev-parse --short HEAD 2>/dev/null)
if test $status = 0 if test $status = 0
set num_changes (git status --porcelain | wc -l | string trim) set num_changes (git status --porcelain | wc -l | string trim)
if test $num_changes = 0 if test $num_changes = 0
set num_changes "✔" set num_changes "✔"
else else
set num_changes "+$num_changes" set num_changes "+$num_changes"
end end
printf " %s %s %s" (git branch --show-current) $cur_sha $num_changes printf " %s %s %s" (git branch --show-current) $cur_sha $num_changes
end end
end end
function _prompt_marker function _prompt_marker
# printf "%b133;A%b" "\x1b\x5d" "\x1b\x5c" # printf "%b133;A%b" "\x1b\x5d" "\x1b\x5c"
end end
function _prompt_continuation_marker function _prompt_continuation_marker
# printf "%b133;A;k=s%b" "\x1b\x5d" "\x1b\x5c" # printf "%b133;A;k=s%b" "\x1b\x5d" "\x1b\x5c"
end end
function cmd_marker --on-variable _ function cmd_marker --on-variable _
# printf "%b133;C%b" "\x1b\x5d" "\x1b\x5c" # printf "%b133;C%b" "\x1b\x5d" "\x1b\x5c"
end end
function _prompt_prefix function _prompt_prefix
set_color -b normal brblack set_color -b normal brblack
printf "# " printf "# "
end end
function fish_prompt function fish_prompt
set last_cmd_status $status set last_cmd_status $status
_prompt_marker _prompt_marker
_prompt_prefix _prompt_prefix
_maybe_sudo_prefix _maybe_elevated_access_prefix
_user_and_host $last_cmd_status _user_and_host $last_cmd_status
_cur_work_dir _cur_work_dir
_maybe_git_summary _maybe_git_summary
_maybe_aws_profile _maybe_aws_profile
_last_cmd_duration _last_cmd_duration
_maybe_jobs_summary _maybe_jobs_summary
_user_prompt _user_prompt
end end
function fish_mode_prompt; end function fish_mode_prompt
function fish_right_prompt; end end
function fish_right_prompt
end
# key bindings # key bindings
fish_vi_key_bindings fish_vi_key_bindings
@ -137,13 +147,17 @@ bind --mode insert --sets-mode default jk repaint
bind --mode insert --sets-mode default jK repaint bind --mode insert --sets-mode default jK repaint
bind --mode insert --sets-mode default Jk repaint bind --mode insert --sets-mode default Jk repaint
bind --mode insert --sets-mode default JK repaint bind --mode insert --sets-mode default JK repaint
bind --mode insert --sets-mode default jj repaint # bind --mode insert --sets-mode default jj repaint
bind --mode insert --sets-mode default jJ repaint # bind --mode insert --sets-mode default jJ repaint
bind --mode insert --sets-mode default Jj repaint # bind --mode insert --sets-mode default Jj repaint
bind --mode insert --sets-mode default JJ repaint # bind --mode insert --sets-mode default JJ repaint
if has_command skim if has_command skim
bind -M insert \cg skim-cd-widget bind -M insert \cg skim-cd-widget
end
if has_command fzf
bind -M insert \cg fzf-cd-widget
end end
bind -M insert \cp up-or-search bind -M insert \cp up-or-search
@ -155,7 +169,7 @@ bind -M insert \cv edit_command_buffer
bind -M default \cv edit_command_buffer bind -M default \cv edit_command_buffer
test $PWD = $HOME && begin test $PWD = $HOME && begin
cd $NICE_HOME || cd cd $NICE_HOME || cd
end end
# tmux has issues when pasting sometimes where it seems to interpret a newline # tmux has issues when pasting sometimes where it seems to interpret a newline

View file

@ -1,10 +1,10 @@
# paths # paths
if not set --query NICE_HOME if not set --query NICE_HOME
set --export --universal NICE_HOME $HOME set --export --universal NICE_HOME $HOME
# if HOME ends with a dir called .home, assume that NICE_HOME is HOME's parent dir # if HOME ends with a dir called .home, assume that NICE_HOME is HOME's parent dir
test (basename $HOME) = .home \ test (basename $HOME) = .home \
&& set --export --universal NICE_HOME (realpath $HOME/..) && set --export --universal NICE_HOME (realpath $HOME/..)
end end
set --export --universal XDG_CONFIG_HOME $HOME/.config set --export --universal XDG_CONFIG_HOME $HOME/.config
@ -33,15 +33,17 @@ set --export --universal EXA_COLORS '*=0'
set --export --universal ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000" set --export --universal ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000"
set --export --universal BROWSER firefox set --export --universal BROWSER (which firefox)
set --export --universal SOPS_AGE_KEY_FILE "$XDG_CONFIG_HOME/sops/age/keys.txt" set --export --universal SOPS_AGE_KEY_FILE "$XDG_CONFIG_HOME/sops/age/keys.txt"
if has_command skim if has_command skim
set --export --universal SKIM_ALT_C_COMMAND "fd --hidden --type directory" set --export --universal SKIM_ALT_C_COMMAND "fd --hidden --type directory"
set --export --universal SKIM_CTRL_T_COMMAND "fd --hidden" set --export --universal SKIM_CTRL_T_COMMAND "fd --hidden"
end end
set --export --universal NEWT_COLORS "root=black,black:border=black,blue"
# colors # colors
set -U fish_color_normal normal # default color set -U fish_color_normal normal # default color
set -U fish_color_command white # base command being run (>ls< -la) set -U fish_color_command white # base command being run (>ls< -la)
@ -67,17 +69,20 @@ set -U fish_pager_color_progress white\x1e\x2d\x2dbackground\x3d333 # status ind
# set -U fish_pager_color_secondary \x2d\x2dbackground\x3d181818 # alternating rows # set -U fish_pager_color_secondary \x2d\x2dbackground\x3d181818 # alternating rows
if test -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish' if test -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish'
source '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish' source '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish'
end end
function has_command --wraps=command --description "Exits non-zero if the given command cannot be found" function has_command --wraps=command --description "Exits non-zero if the given command cannot be found"
command --quiet --search $argv[1] command --quiet --search $argv[1]
end end
if has_command rtx if has_command rtx
rtx activate fish | source rtx activate fish | source
end end
for dir in ~/.cargo/bin ~/.nimble/bin ~/.local/bin /opt/homebrew/bin for dir in ~/.cargo/bin ~/.nimble/bin ~/.local/bin /opt/homebrew/bin
test -d $dir && fish_add_path $dir test -d $dir && fish_add_path $dir
end end
# don't let other users read my files by default
umask 077

View file

@ -1,12 +0,0 @@
{...}: {
home-manager = {
users.flanfam = {
imports = [./common.nix];
home = {
username = "flanfam";
homeDirectory = "/home/flanfam";
stateVersion = "23.11";
};
};
};
}

View file

@ -1,12 +0,0 @@
{...}: {
home-manager = {
users.flanfamkiosk = {
imports = [./common.nix];
home = {
username = "flanfamkiosk";
homeDirectory = "/home/flanfamkiosk";
stateVersion = "23.11";
};
};
};
}

View file

@ -1,91 +0,0 @@
{lib, ...}: let
email = lib.mkDefault "daniel@lyte.dev";
in {
programs.git = {
enable = true;
userEmail = email;
userName = lib.mkDefault "Daniel Flanagan";
delta = {
enable = true;
options = {};
};
lfs = {
enable = true;
};
signing = {
signByDefault = true;
key = email;
};
aliases = {
a = "add -A";
ac = "commit -a";
b = "rev-parse --symbolic-full-name HEAD";
c = "commit";
cm = "commit -m";
cnv = "commit --no-verify";
co = "checkout";
d = "diff";
ds = "diff --staged";
dt = "difftool";
f = "fetch";
l = "log --graph --abbrev-commit --decorate --oneline --all";
plainlog = " log --pretty=format:'%h %ad%x09%an%x09%s' --date=short --decorate";
ls = "ls-files";
mm = "merge master";
p = "push";
pf = "push --force-with-lease";
pl = "pull";
rim = "rebase -i master";
s = "status";
};
# TODO: https://blog.scottlowe.org/2023/12/15/conditional-git-configuration/
extraConfig = {
init = {
defaultBranch = "main";
};
merge.conflictstyle = "zdiff3";
push = {
autoSetupRemote = true;
};
branch = {
autoSetupMerge = true;
};
sendemail = {
smtpserver = "smtp.mailgun.org";
smtpuser = email;
smtrpencryption = "tls";
smtpserverport = 587;
};
url = {
# TODO: how to have per-machine not-in-git configuration?
"git@git.hq.bill.com:" = {
insteadOf = "https://git.hq.bill.com";
};
};
};
};
programs.fish.functions = {
g = {
wraps = "git";
body = ''
if test (count $argv) -gt 0
git $argv
else
git status
end
'';
};
};
}

View file

@ -1,7 +0,0 @@
{...}: {
dconf.settings = {
"org/gnome/mutter" = {
experimental-features = ["scale-monitor-framebuffer"];
};
};
}

View file

@ -1,510 +0,0 @@
{
pkgs,
inputs,
colors,
...
}: let
inherit (pkgs) system;
in {
programs.helix = {
enable = true;
package = inputs.helix.packages.${system}.helix;
languages = {
language-server = {
lexical = {
command = "lexical";
args = ["start"];
};
# next-ls = {
# command = "next-ls";
# args = ["--stdout"];
# };
# deno = {
# command = "deno";
# args = ["lsp"];
# config = {
# enable = true;
# lint = true;
# unstable = true;
# };
# };
};
language = [
# {
# name = "heex";
# scope = "source.heex";
# injection-regex = "heex";
# language-servers = ["lexical"]; # "lexical" "next-ls" ?
# auto-format = true;
# file-types = ["heex"];
# roots = ["mix.exs" "mix.lock"];
# indent = {
# tab-width = 2;
# unit = " ";
# };
# }
# {
# name = "elixir";
# language-servers = ["lexical"]; # "lexical" "next-ls" ?
# auto-format = true;
# }
{
name = "html";
file-types = ["html"];
scope = "source.html";
auto-format = false;
}
{
name = "nix";
file-types = ["nix"];
scope = "source.nix";
auto-format = true;
formatter = {
command = "alejandra";
args = ["-"];
};
}
{
name = "fish";
file-types = ["fish"];
scope = "source.fish";
auto-format = true;
indent = {
tab-width = 2;
unit = "\t";
};
}
{
name = "javascript";
file-types = ["js" "mjs"];
scope = "source.js";
auto-format = true;
}
{
name = "typescript";
file-types = ["ts" "mts"];
scope = "source.ts";
auto-format = true;
}
{
name = "jsx";
file-types = ["jsx"];
scope = "source.jsx";
auto-format = true;
}
{
name = "tsx";
file-types = ["tsx"];
scope = "source.tsx";
auto-format = true;
}
{
name = "jsonc";
file-types = ["jsonc"];
scope = "source.jsonc";
auto-format = true;
}
# {
# name = "javascript";
# language-id = "javascript";
# grammar = "javascript";
# scope = "source.js";
# injection-regex = "^(js|javascript)$";
# file-types = ["js" "mjs"];
# shebangs = ["deno"];
# language-servers = ["deno"];
# roots = ["deno.jsonc" "deno.json"];
# formatter = {
# command = "deno";
# args = ["fmt"];
# };
# auto-format = true;
# comment-token = "//";
# indent = {
# tab-width = 2;
# unit = "\t";
# };
# }
# {
# name = "typescript";
# language-id = "typescript";
# grammar = "typescript";
# scope = "source.ts";
# injection-regex = "^(ts|typescript)$";
# file-types = ["ts"];
# shebangs = ["deno"];
# language-servers = ["deno"];
# roots = ["deno.jsonc" "deno.json"];
# formatter = {
# command = "deno";
# args = ["fmt"];
# };
# auto-format = true;
# comment-token = "//";
# indent = {
# tab-width = 2;
# unit = "\t";
# };
# }
# {
# name = "jsonc";
# language-id = "json";
# grammar = "jsonc";
# scope = "source.jsonc";
# injection-regex = "^(jsonc)$";
# roots = ["deno.jsonc" "deno.json"];
# file-types = ["jsonc"];
# language-servers = ["deno"];
# indent = {
# tab-width = 2;
# unit = " ";
# };
# auto-format = true;
# }
];
};
settings = {
theme = "custom";
editor = {
soft-wrap.enable = true;
auto-pairs = false;
# auto-save = false;
# completion-trigger-len = 1;
# color-modes = false;
bufferline = "multiple";
# scrolloff = 8;
rulers = [81 121];
cursorline = true;
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
file-picker.hidden = false;
indent-guides = {
render = true;
character = "";
};
lsp = {
display-messages = true;
# display-inlay-hints = true;
};
statusline = {
separator = " ";
mode = {
"normal" = "N";
"insert" = "I";
"select" = "S";
};
left = [
"file-name"
"mode"
# "selections"
# "primary-selection-length"
# "position"
# "position-percentage"
"spinner"
"diagnostics"
"workspace-diagnostics"
];
};
# center = ["file-name"];
# right = ["version-control" "total-line-numbers" "file-encoding"];
# };
};
keys = {
insert = {
j = {
k = "normal_mode";
j = "normal_mode";
K = "normal_mode";
J = "normal_mode";
};
};
normal = {
"C-k" = "jump_view_up";
"C-j" = "jump_view_down";
"C-h" = "jump_view_left";
"C-l" = "jump_view_right";
"C-q" = ":quit-all!";
# "L" = "repeat_last_motion";
space = {
q = ":reflow 80";
Q = ":reflow 120";
C = ":bc!";
h = ":toggle lsp.display-inlay-hints";
# O = ["select_textobject_inner WORD", ":pipe-to xargs xdg-open"];
};
};
select = {
space = {
q = ":reflow 80";
Q = ":reflow 120";
};
# "L" = "repeat_last_motion";
};
};
};
themes = with colors.withHashPrefix; {
custom = {
"type" = orange;
"constructor" = blue;
"constant" = orange;
"constant.builtin" = orange;
"constant.character" = yellow;
"constant.character.escape" = orange;
"string" = green;
"string.regexp" = orange;
"string.special" = blue;
"comment" = {
fg = fgdim;
modifiers = ["italic"];
};
"variable" = text;
"variable.parameter" = {
fg = red;
modifiers = ["italic"];
};
"variable.builtin" = red;
"variable.other.member" = text;
"label" = blue;
"punctuation" = fgdim;
"punctuation.special" = blue;
"keyword" = purple;
"keyword.storage.modifier.ref" = yellow;
"keyword.control.conditional" = {
fg = purple;
modifiers = ["italic"];
};
"operator" = blue;
"function" = blue;
"function.macro" = purple;
"tag" = purple;
"attribute" = blue;
"namespace" = {
fg = blue;
modifiers = ["italic"];
};
"special" = blue;
"markup.heading.marker" = {
fg = orange;
modifiers = ["bold"];
};
"markup.heading.1" = blue;
"markup.heading.2" = yellow;
"markup.heading.3" = green;
"markup.heading.4" = orange;
"markup.heading.5" = red;
"markup.heading.6" = fg3;
"markup.list" = purple;
"markup.bold" = {modifiers = ["bold"];};
"markup.italic" = {modifiers = ["italic"];};
"markup.strikethrough" = {modifiers = ["crossed_out"];};
"markup.link.url" = {
fg = red;
modifiers = ["underlined"];
};
"markup.link.text" = blue;
"markup.raw" = red;
"diff.plus" = green;
"diff.minus" = red;
"diff.delta" = blue;
"ui.linenr" = {fg = fgdim;};
"ui.linenr.selected" = {fg = fg2;};
"ui.statusline" = {
fg = fgdim;
bg = bg;
};
"ui.statusline.inactive" = {
fg = fg3;
bg = bg2;
};
"ui.statusline.normal" = {
fg = bg;
bg = purple;
modifiers = ["bold"];
};
"ui.statusline.insert" = {
fg = bg;
bg = green;
modifiers = ["bold"];
};
"ui.statusline.select" = {
fg = bg;
bg = red;
modifiers = ["bold"];
};
"ui.popup" = {
fg = text;
bg = bg2;
};
"ui.window" = {fg = fgdim;};
"ui.help" = {
fg = fg2;
bg = bg2;
};
"ui.bufferline" = {
fg = fgdim;
bg = bg2;
};
"ui.bufferline.background" = {bg = bg2;};
"ui.text" = text;
"ui.text.focus" = {
fg = text;
bg = bg3;
modifiers = ["bold"];
};
"ui.text.inactive" = {fg = fg2;};
"ui.virtual" = fg2;
"ui.virtual.ruler" = {bg = bg3;};
"ui.virtual.indent-guide" = bg3;
"ui.virtual.inlay-hint" = {
fg = bg3;
bg = bg;
};
"ui.selection" = {bg = bg5;};
"ui.cursor" = {
fg = bg;
bg = text;
};
"ui.cursor.primary" = {
fg = bg;
bg = red;
};
"ui.cursor.match" = {
fg = orange;
modifiers = ["bold"];
};
"ui.cursor.primary.normal" = {
fg = bg;
bg = text;
};
"ui.cursor.primary.insert" = {
fg = bg;
bg = text;
};
"ui.cursor.primary.select" = {
fg = bg;
bg = text;
};
"ui.cursor.normal" = {
fg = bg;
bg = fg;
};
"ui.cursor.insert" = {
fg = bg;
bg = fg;
};
"ui.cursor.select" = {
fg = bg;
bg = fg;
};
"ui.cursorline.primary" = {bg = bg3;};
"ui.highlight" = {
bg = bg3;
fg = bg;
modifiers = ["bold"];
};
"ui.menu" = {
fg = fg3;
bg = bg2;
};
"ui.menu.selected" = {
fg = text;
bg = bg3;
modifiers = ["bold"];
};
"diagnostic.error" = {
underline = {
color = red;
style = "curl";
};
};
"diagnostic.warning" = {
underline = {
color = orange;
style = "curl";
};
};
"diagnostic.info" = {
underline = {
color = blue;
style = "curl";
};
};
"diagnostic.hint" = {
underline = {
color = blue;
style = "curl";
};
};
error = red;
warning = orange;
info = blue;
hint = yellow;
"ui.background" = {
bg = bg;
fg = fgdim;
};
# "ui.cursorline.primary" = { bg = "default" }
# "ui.cursorline.secondary" = { bg = "default" }
"ui.cursorcolumn.primary" = {bg = bg3;};
"ui.cursorcolumn.secondary" = {bg = bg3;};
"ui.bufferline.active" = {
fg = primary;
bg = bg3;
underline = {
color = primary;
style = "";
};
};
};
};
};
}

View file

@ -1,14 +0,0 @@
{
programs.htop = {
enable = true;
settings = {
hide_kernel_threads = 1;
hide_userland_threads = 1;
show_program_path = 0;
header_margin = 0;
show_cpu_frequency = 1;
highlight_base_name = 1;
tree_view = 0;
};
};
}

View file

@ -1,12 +1,18 @@
{ {
outputs, pkgs,
colors, style,
config, config,
lib, lib,
# font, # font,
... ...
}: { }: let
imports = [outputs.homeManagerModules.ewwbar]; inherit (style) colors;
in {
# TODO: Hyprland seems to sometimes use a ton of CPU?
home.packages = with pkgs; [
swayosd
];
home.file."${config.xdg.configHome}/hypr/hyprpaper.conf" = { home.file."${config.xdg.configHome}/hypr/hyprpaper.conf" = {
enable = true; enable = true;
@ -23,8 +29,6 @@
monitor = [ monitor = [
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
",preferred,auto,auto" ",preferred,auto,auto"
"desc:LG Display 0x0521,3840x2160@120,0x0,1"
"desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,3"
]; ];
xwayland = { xwayland = {
@ -34,57 +38,39 @@
exec-once = [ exec-once = [
"hyprpaper" "hyprpaper"
"mako" "mako"
"eww daemon && eww open bar$EWW_BAR_MON" "swayosd-server"
"firefox" "eww daemon"
"kitty --single-instance" "[workspace 1 silent] firefox"
# "wezterm" "[workspace 1 silent] wezterm"
(lib.concatStringsSep " " [ "xwaylandvideobridge"
"swayidle -w" "systemctl --user import-environment QT_QPA_PLATFORMTHEME"
"timeout 300 'notify-send \"Idling in 300 seconds\"' resume 'notify-send \"Idling cancelled.\"'" "hypridle"
"timeout 480 'notify-send -u critical \"Idling in 120 seconds\"'"
"timeout 510 'notify-send -u critical \"Idling in 90 seconds\"'"
"timeout 540 'notify-send -u critical \"Idling in 60 seconds!\"'"
"timeout 570 'notify-send -u critical \"Idling in 30 seconds!\"'"
"timeout 590 'notify-send -u critical \"Idling in 10 seconds!\"'"
"timeout 591 'notify-send -u critical \"Idling in 9 seconds!\"'"
"timeout 592 'notify-send -u critical \"Idling in 8 seconds!\"'"
"timeout 593 'notify-send -u critical \"Idling in 7 seconds!\"'"
"timeout 594 'notify-send -u critical \"Idling in 6 seconds!\"'"
"timeout 595 'notify-send -u critical \"Idling in 5 seconds!\"'"
"timeout 596 'notify-send -u critical \"Idling in 4 seconds!\"'"
"timeout 597 'notify-send -u critical \"Idling in 3 seconds!\"'"
"timeout 598 'notify-send -u critical \"Idling in 2 seconds!\"'"
"timeout 599 'notify-send -u critical \"Idling in 1 second!\"'"
"timeout 600 'swaylock --daemonize'"
"timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on'"
"after-resume 'maybe-good-morning'"
"before-sleep 'swaylock --daemonize'"
])
''swayidle -w timeout 600 'notify-send "Locking in 30 seconds..."' timeout 630 'swaylock -f' timeout 660 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on && maybe-good-morning' before-sleep 'swaylock -f'"''
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
]; ];
env = [ env = [
"XCURSOR_SIZE,24" "XCURSOR_SIZE,24"
"EWW_BAR_MON,0"
]; ];
input = { input = {
kb_layout = "us"; kb_layout = "us";
kb_options = "ctrl:nocaps"; kb_options = "ctrl:nocaps";
# kb_variant =
# kb_model = /*
# kb_rules = kb_variant =
kb_model =
kb_rules =
*/
follow_mouse = 2; follow_mouse = 2;
repeat_delay = 200; repeat_delay = 180;
repeat_rate = 60; repeat_rate = 120;
touchpad = { touchpad = {
natural_scroll = "yes"; natural_scroll = "yes";
tap-to-click = true; tap-to-click = true;
middle_button_emulation = true; middle_button_emulation = true;
disable_while_typing = false;
}; };
}; };
@ -97,6 +83,10 @@
allow_workspace_cycles = true; allow_workspace_cycles = true;
}; };
cursor = {
no_warps = true;
};
general = { general = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
"col.active_border" = "0xff${colors.primary} 0xff${colors.green} 45deg"; "col.active_border" = "0xff${colors.primary} 0xff${colors.green} 45deg";
@ -105,7 +95,6 @@
gaps_in = 3; gaps_in = 3;
gaps_out = 6; gaps_out = 6;
border_size = 2; border_size = 2;
no_cursor_warps = true;
resize_on_border = true; resize_on_border = true;
no_focus_fallback = true; no_focus_fallback = true;
@ -113,107 +102,112 @@
}; };
decoration = { decoration = {
rounding = 3; rounding = 5;
# blur = "no";
# blur_size = 3
# blur_passes = 1
# blur_new_optimizations = on
drop_shadow = "yes"; /*
shadow_range = 4; blur = "no";
shadow_render_power = 3; blur_size = 3
"col.shadow" = "rgba(1a1a1aee)"; blur_passes = 1
blur_new_optimizations = on
*/
shadow = {
enabled = true;
color = "rgba(1a1a1aee)";
range = 4;
render_power = 3;
};
dim_inactive = false; dim_inactive = false;
}; };
"$mainMod" = "SUPER"; "$mod" = "SUPER";
bind = [ bind = [
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
# "$mainMod, return, exec, wezterm" /*
# "$mainMod SHIFT, return, exec, wezterm" "$mod, return, exec, wezterm"
"$mainMod, return, exec, kitty --single-instance" "$mod SHIFT, return, exec, wezterm"
"$mainMod SHIFT, return, exec, kitty" */
"$mainMod, U, exec, firefox" "$mod, return, exec, wezterm"
"$mainMod, space, exec, wofi --show drun" "$mod SHIFT, return, exec, kitty"
"$mainMod, C, killactive," "$mod, U, exec, firefox"
"$mainMod, M, exit," "$mod, space, exec, tofi-run | xargs hyprctl dispatch exec --"
"$mainMod, E, exec, dolphin" "$mod, C, killactive,"
"$mainMod, F, togglefloating," "$mod SHIFT, E, exit,"
"$mainMod SHIFT, F, fullscreen," "$mod, E, exec, dolphin"
"$mainMod, R, exec, anyrun" "$mod, F, togglefloating,"
"$mainMod, S, pseudo, # dwindle" "$mod SHIFT, F, fullscreen,"
"$mainMod, P, togglesplit, # dwindle" "$mod, R, exec, anyrun"
"$mod, S, pseudo, # dwindle"
"$mod, P, togglesplit, # dwindle"
# Move focus with mod + arrow keys
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod SHIFT, H, movewindow, l"
"$mod SHIFT, L, movewindow, r"
"$mod SHIFT, K, movewindow, u"
"$mod SHIFT, J, movewindow, d"
"$mod SHIFT, V, exec, swayosd-client --input-volume mute-toggle"
", XF86AudioMicMute, exec, swayosd-client --input-volume mute-toggle"
", XF86AudioMute, exec, swayosd-client --output-volume mute-toggle"
", XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise"
", XF86AudioLowerVolume, exec, swayosd-client --output-volume lower"
", XF86MonBrightnessUp, exec, swayosd-client --brightness raise"
", XF86MonBrightnessDown, exec, swayosd-client --brightness lower"
# Move focus with mainMod + arrow keys
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
"$mainMod, h, movefocus, l"
"$mainMod, l, movefocus, r"
"$mainMod, k, movefocus, u"
"$mainMod, j, movefocus, d"
"$mainMod SHIFT, H, swapwindow, l"
"$mainMod SHIFT, L, swapwindow, r"
"$mainMod SHIFT, K, swapwindow, u"
"$mainMod SHIFT, J, swapwindow, d"
"$mainMod SHIFT, V, exec, pamixer --default-source --toggle-mute"
"$mainMod, F1, exec, pamixer --default-source --toggle-mute"
", XF86AudioMicMute, exec, pamixer --default-source --toggle-mute"
", XF86AudioMute, exec, pamixer --toggle-mute"
", XF86AudioRaiseVolume, exec, pamixer --increase 5"
", XF86AudioLowerVolume, exec, pamixer --decrease 5"
"CTRL, XF86AudioRaiseVolume, exec, pamixer --increase 1"
"CTRL, XF86AudioLowerVolume, exec, pamixer --decrease 1"
", XF86AudioPlay, exec, playerctl play-pause" ", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioNext, exec, playerctl next" ", XF86AudioNext, exec, playerctl next"
", XF86AudioPrev, exec, playerctl previous" ", XF86AudioPrev, exec, playerctl previous"
"$mainMod, tab, workspace, previous"
# Switch workspaces with mainMod + [0-9] "$mod, tab, workspace, previous"
"$mainMod, 1, workspace, 1" "ALT, tab, workspace, previous"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
"$mainMod, 5, workspace, 5"
"$mainMod, 6, workspace, 6"
"$mainMod, 7, workspace, 7"
"$mainMod, 8, workspace, 8"
"$mainMod, 9, workspace, 9"
"$mainMod, 0, workspace, 10"
# Move active window to a workspace with mainMod + SHIFT + [0-9] # Switch workspaces with mod + [0-9]
"$mainMod SHIFT, 1, movetoworkspace, 1" "$mod, 1, workspace, 1"
"$mainMod SHIFT, 2, movetoworkspace, 2" "$mod, 2, workspace, 2"
"$mainMod SHIFT, 3, movetoworkspace, 3" "$mod, 3, workspace, 3"
"$mainMod SHIFT, 4, movetoworkspace, 4" "$mod, 4, workspace, 4"
"$mainMod SHIFT, 5, movetoworkspace, 5" "$mod, 5, workspace, 5"
"$mainMod SHIFT, 6, movetoworkspace, 6" "$mod, 6, workspace, 6"
"$mainMod SHIFT, 7, movetoworkspace, 7" "$mod, 7, workspace, 7"
"$mainMod SHIFT, 8, movetoworkspace, 8" "$mod, 8, workspace, 8"
"$mainMod SHIFT, 9, movetoworkspace, 9" "$mod, 9, workspace, 9"
"$mainMod SHIFT, 0, movetoworkspace, 10" "$mod, 0, workspace, 10"
", XF86MonBrightnessDown, exec, brightnessctl set 10%-"
", XF86MonBrightnessUp, exec, brightnessctl set +10%"
"SHIFT, XF86MonBrightnessDown, exec, brightnessctl set 1%"
"SHIFT, XF86MonBrightnessUp, exec, brightnessctl set 100%"
"CTRL, XF86MonBrightnessDown, exec, brightnessctl set 1%-"
"CTRL, XF86MonBrightnessUp, exec, brightnessctl set +1%"
"$mainMod SHIFT, S, exec, clipshot"
# Scroll through existing workspaces with mainMod + scroll # Move active window to a workspace with mod + SHIFT + [0-9]
"$mainMod, mouse_down, workspace, e+1" "$mod SHIFT, 1, movetoworkspace, 1"
"$mainMod, mouse_up, workspace, e-1" "$mod SHIFT, 2, movetoworkspace, 2"
"CTRL SHIFT $mainMod, L, exec, swaylock" "$mod SHIFT, 3, movetoworkspace, 3"
"$mainMod CTRL, space, exec, makoctl dismiss" "$mod SHIFT, 4, movetoworkspace, 4"
"$mainMod SHIFT CTRL, space, exec, makoctl restore" "$mod SHIFT, 5, movetoworkspace, 5"
"$mainMod SHIFT, space, exec, makoctl invoke" "$mod SHIFT, 6, movetoworkspace, 6"
"$mainMod, E, exec, thunar" "$mod SHIFT, 7, movetoworkspace, 7"
"$mod SHIFT, 8, movetoworkspace, 8"
"$mod SHIFT, 9, movetoworkspace, 9"
"$mod SHIFT, 0, movetoworkspace, 10"
"$mod SHIFT, S, exec, clipshot"
# Scroll through existing workspaces with mod + scroll
"$mod, mouse_down, workspace, e+1"
"$mod, mouse_up, workspace, e-1"
"CTRL SHIFT $mod, L, exec, hyprlock"
"$mod CTRL, space, exec, makoctl dismiss"
"$mod SHIFT CTRL, space, exec, makoctl restore"
"$mod SHIFT, space, exec, makoctl invoke default"
"$mod, E, exec, thunar"
]; ];
# Move/resize windows with mainMod + LMB/RMB and dragging # Move/resize windows with mod + LMB/RMB and dragging
bindm = ["$mainMod, mouse:272, movewindow" "$mainMod, mouse:273, resizewindow"]; bindm = ["$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow"];
}; };
extraConfig = '' extraConfig = ''
@ -233,15 +227,15 @@
dwindle { dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
# master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below # master switch for pseudotiling. Enabling is bound to mod + P in the keybinds section below
pseudotile = yes pseudotile = yes
preserve_split = 1 preserve_split = 1
no_gaps_when_only = true # no_gaps_when_only = true
} }
master { master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true # new_is_master = true
} }
gestures { gestures {
@ -249,14 +243,178 @@
workspace_swipe = on workspace_swipe = on
} }
# Example per-device config ## Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more ## See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
# device:epic-mouse-v1 { ## device:epic-mouse-v1 {
# sensitivity = -0.5 ## sensitivity = -0.5
# } ## }
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more ## See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# windowrulev2 = float,class:^.*(kitty|firefox|org.wezfurlong.wezterm).*$ windowrulev2 = idleinhibit,class:^.*([Ss]lippi).*$
windowrulev2 = float,class:^.*$
windowrulev2 = tile,class:^.*([Kk]itty|[Ff]irefox|[Ww]ezterm|[Dd]iscord|[Ss]potify|[Ss]lack).*$
windowrulev2 = opacity 1.0 0.95,class:^.*$
windowrulev2 = center 1,floating:1
windowrulev2 = opacity 0.0 override, class:^(xwaylandvideobridge)$
windowrulev2 = noanim, class:^(xwaylandvideobridge)$
windowrulev2 = noinitialfocus, class:^(xwaylandvideobridge)$
windowrulev2 = maxsize 1 1, class:^(xwaylandvideobridge)$
windowrulev2 = noblur, class:^(xwaylandvideobridge)$
windowrulev2 = nofocus, class:^(xwaylandvideobridge)$
''; '';
}; };
programs.hyprlock = {
enable = true;
settings = {
# docs: https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock
general = {
grace = 0;
no_face_out = true;
};
input-field = [
{
monitor = "";
fade_on_empty = false;
placeholder_text = "Locked";
rounding = 5;
font_size = 20;
font_color = "rgba(255, 255, 255, 1.0)";
inner_color = "rgba(31, 31, 47, 0.95)";
outer_color = "0xff74c7ec 0xff74c7ec 45deg";
outline_thickness = 3;
position = "0, -200";
dots_size = 0.1;
size = "300 75";
font_family = "IosevkaLyteTerm";
shadow_passes = 3;
shadow_size = 8;
shadow_color = "rgba(0, 0, 0, 1.0)";
shadow_boost = 0.8;
}
];
background = [
{
path = "~/.wallpaper";
blur_passes = 2;
}
];
label = [
{
monitor = "";
font_size = 64;
halign = "center";
valign = "center";
text_align = "center";
# rotate = 10;
position = "0, 200";
font_family = "IosevkaLyteTerm";
text = ''Locked for <span foreground="##74c7ec">$USER</span>'';
shadow_passes = 1;
shadow_size = 8;
shadow_color = "rgba(0, 0, 0, 1.0)";
shadow_boost = 0.5;
}
{
monitor = "";
font_size = 20;
halign = "center";
valign = "center";
text_align = "center";
color = "rgba(255, 255, 255, 0.5)";
position = "0 120";
font_family = "IosevkaLyteTerm";
text = "cmd[update:1000] date '+%a %b %d %H:%M:%S'";
shadow_passes = 3;
shadow_size = 1;
shadow_color = "rgba(0, 0, 0, 1.0)";
shadow_boost = 1.0;
}
{
monitor = "";
font_size = 200;
halign = "center";
valign = "center";
text_align = "center";
color = "rgba(220, 240, 255, 0.8)";
position = "0 500";
font_family = "NerdFontSymbolsOnly";
text = "󰍁";
shadow_passes = 3;
shadow_size = 1;
shadow_color = "rgba(0, 0, 0, 1.0)";
shadow_boost = 1.0;
}
];
};
};
services.hypridle = let
secondsPerMinute = 60;
lockSeconds = 10 * secondsPerMinute;
in {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
before_sleep_cmd = "loginctl lock-session";
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || hyprlock";
};
listener = [
{
timeout = lockSeconds - 300;
on-timeout = ''notify-send "Auto-locking in 5 minutes"'';
on-resume = ''notify-send "Auto-locking cancelled"'';
}
{
timeout = lockSeconds - 180;
on-timeout = ''notify-send "Auto-locking in 3 minutes"'';
}
{
timeout = lockSeconds - 120;
on-timeout = ''notify-send "Auto-locking in 2 minutes"'';
}
{
timeout = lockSeconds - 60;
on-timeout = ''notify-send "Auto-locking in 1 minute"'';
}
{
timeout = lockSeconds - 30;
on-timeout = ''notify-send "Auto-locking in 30 seconds"'';
}
{
timeout = lockSeconds - 10;
on-timeout = ''notify-send -u critical "Auto-locking in 10 seconds"'';
}
{
timeout = lockSeconds;
on-timeout = ''loginctl lock-session'';
}
{
timeout = lockSeconds + 5;
on-timeout = ''hyprctl dispatch dpms off'';
on-resume = ''hyprctl dispatch dpms on'';
}
];
};
};
} }

View file

@ -1,35 +0,0 @@
{
home.file.".iex.exs" = {
enable = true;
text = ''
Application.put_env(:elixir, :ansi_enabled, true)
# PROTIP: to break, `#iex:break`
IEx.configure(
colors: [enabled: true],
inspect: [
pretty: true,
printable_limit: :infinity,
limit: :infinity,
charlists: :as_lists
],
default_prompt: [
# ANSI CHA, move cursor to column 1
# "\e[G",
:magenta,
# IEx prompt variable
"%prefix",
"#",
# IEx prompt variable
"%counter",
# plain string
">",
:reset
]
|> IO.ANSI.format()
|> IO.chardata_to_string()
)
'';
};
}

View file

@ -1,6 +0,0 @@
{
services.kdeconnect = {
enable = true;
indicator = true;
};
}

View file

@ -54,7 +54,7 @@
tab_bar_align = "left"; tab_bar_align = "left";
tab_bar_style = "separator"; tab_bar_style = "separator";
tab_separator = ''""''; tab_separator = ''""'';
tab_bar_edge = "top"; tab_bar_edge = "bottom";
tab_title_template = ''"{fmt.fg.tab}{fmt.bg.tab} {activity_symbol}{title} "''; tab_title_template = ''"{fmt.fg.tab}{fmt.bg.tab} {activity_symbol}{title} "'';
active_tab_font_style = "normal"; active_tab_font_style = "normal";
@ -168,7 +168,7 @@
"ctrl+l" = "neighboring_window right"; "ctrl+l" = "neighboring_window right";
"ctrl+k" = "neighboring_window up"; "ctrl+k" = "neighboring_window up";
"ctrl+j" = "neighboring_window down"; "ctrl+j" = "neighboring_window down";
"ctrl+shift+n" = "nth_window -1"; "ctrl+shift+h" = "nth_window -1";
"ctrl+shift+space>u" = "kitten hints --type=url --program @"; "ctrl+shift+space>u" = "kitten hints --type=url --program @";
"ctrl+shift+z" = "toggle_layout stack"; "ctrl+shift+z" = "toggle_layout stack";

View file

@ -1,32 +0,0 @@
{
pkgs,
outputs,
# font,
...
}: {
imports = with outputs.homeManagerModules; [
linux
desktop
firefox
];
gtk = {
enable = true;
theme = {
name = "Catppuccin-Mocha-Compact-Sapphire-Dark";
package = pkgs.catppuccin-gtk.override {
accents = ["sapphire"];
size = "compact";
tweaks = ["rimless"];
variant = "mocha";
};
};
};
home.pointerCursor = {
name = "Bibata-Modern-Classic";
package = pkgs.bibata-cursors;
size = 64; # TODO: this doesn't seem to work -- at least in Sway
# some icons are also missing (hand2?)
};
}

View file

@ -1,34 +0,0 @@
{pkgs, ...}: {
home = {
sessionVariables = {
MOZ_ENABLE_WAYLAND = "1";
};
};
programs.fish = {
shellAliases = {
# TODO: these aren't working?
sctl = "sudo systemctl";
bt = "bluetoothctl";
pa = "pulsemixer";
sctlu = "systemctl --user";
};
functions = {
pp = ''
if test (count $argv) -gt 0
while true; ping -O -i 1 -w 5 -c 10000000 $argv; sleep 1; end
else
while true; ping -O -i 1 -w 5 -c 10000000 1.1.1.1; sleep 1; end
end
'';
};
};
home.packages = [
(pkgs.buildEnv {
name = "my-linux-scripts";
paths = [./scripts/linux];
})
];
}

View file

@ -1,15 +0,0 @@
{outputs, ...}: {
imports = with outputs.homeManagerModules; [
desktop
pass
];
# TODO: pinentry curses?
/*
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "gnome3";
enableSSHSupport = true;
};
*/
}

View file

@ -1,29 +0,0 @@
{
colors,
font,
...
}: {
services.mako = with colors.withHashPrefix; {
enable = true;
borderSize = 1;
maxVisible = 5;
defaultTimeout = 15000;
font = "Symbols Nerd Font ${toString font.size},${font.name} ${toString font.size}";
# TODO: config
backgroundColor = bg;
textColor = text;
borderColor = primary;
progressColor = primary;
anchor = "top-right";
extraConfig = ''
[urgency=high]
border-color=${urgent}
[urgency=high]
background-color=${urgent}
border-color=${urgent}
text-color=${bg}
'';
};
}

View file

@ -1,13 +0,0 @@
{inputs, ...}: {
imports = [
{nixpkgs.overlays = [inputs.ssbm.overlay];}
# inputs.ssbm.homeManagerModules.default
];
# ssbm = {
# slippi-launcher = {
# enable = false;
# launchMeleeOnPlay = false;
# };
# };
}

View file

@ -1,5 +0,0 @@
{...}: {
programs.nnn = {
enable = true;
};
}

View file

@ -1,6 +0,0 @@
{pkgs, ...}: {
programs.password-store = {
enable = true;
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
};
}

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
usage() { usage() {
echo "at - waits until after the specified datetime" echo "at - exit after the specified datetime"
echo "Usage:" echo "Usage:"
echo " at <DATETIME> && command..." echo " at <DATETIME> && command..."
echo echo
@ -9,13 +9,17 @@ usage() {
echo " at 15:00:00 && echo \"it is 3 o'clock\"" echo " at 15:00:00 && echo \"it is 3 o'clock\""
} }
[[ -z "$1" ]] && { echo "Error: No DATE argument provided." >&2; usage; exit 1; } [[ -z "$1" ]] && { echo "error: no DATE argument provided" >&2; usage; exit 1; }
d="$(date -d "${@}" +%s)" d="$(date -d "${@}" +%s)"
_dt=$((d - $(date +%s)))
days=$((_dt / 86400))
printf 'Started at %s (with duration %sd %s)\n' "$(date)" "$days" "$(date -u --date @$((_dt)) +%H:%M:%S)"
while [[ "$d" -ge "$(date +%s)" ]]; do while [[ "$d" -ge "$(date +%s)" ]]; do
_dt=$((d - $(date +%s))) _dt=$((d - $(date +%s)))
days=$((_dt / 86400)) days=$((_dt / 86400))
echo -ne "\rTime Remaining: ${days}d $(date -u --date @$((_dt)) +%H:%M:%S) "; printf "\r%sd %s " "$days" "$(date -u --date @$((_dt)) +%H:%M:%S)";
sleep 0.1 sleep 0.1
done done
exit 0 exit 0

View file

@ -1,15 +1,24 @@
#!/usr/bin/env bash #!/usr/bin/env bash
[[ $# -lt 1 ]] && { echo "No argument provided." >&2 ; exit 1; } function usage {
echo "countdown - exit after a certain amount of time has passed"
echo " Usage:"
echo " countdown <SECONDS> && command..."
echo
echo " Examples:"
echo ' countdown 120 && echo "Two minutes has elapsed!"'
}
[[ $# -lt 1 ]] && { printf "error: no SECONDS argument provided\n" >&2; usage; exit 1; }
d=$(($(date +%s) + $1)); d=$(($(date +%s) + $1));
echo "Countdown started at $(date)" printf 'Started at %s\n' "$(date)"
while [[ "$d" -ge "$(date +%s)" ]]; do while [[ "$d" -ge "$(date +%s)" ]]; do
_dt=$((d - $(date +%s))) _dt=$((d - $(date +%s)))
days=$((_dt / 86400)) days=$((_dt / 86400))
echo -ne "\r${days}d $(date -u --date @$((_dt)) +%H:%M:%S) "; printf "\r%sd %s " "$days" "$(date -u --date @$((_dt)) +%H:%M:%S)";
sleep 0.1 sleep 0.1
done done
echo -ne "\rCountdown finished $(date)\n" printf "\rCountdown finished %s\n" "$(date)"

View file

@ -1,4 +1,4 @@
#!/usr/bin/env -S deno run --allow-read --allow-run --allow-net #!/usr/bin/env -S nix shell nixpkgs#deno --command deno run --allow-read --allow-run --allow-net
import * as path from "https://deno.land/std@0.181.0/path/mod.ts"; import * as path from "https://deno.land/std@0.181.0/path/mod.ts";

View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
N journal

View file

@ -1,5 +1,6 @@
#!/usr/bin/env sh #!/usr/bin/env sh
umask 0077
SUBDIR="${2:-./}" SUBDIR="${2:-./}"
mkdir -p "$NOTES_PATH/$SUBDIR" mkdir -p "$NOTES_PATH/$SUBDIR"
cd "$NOTES_PATH/$SUBDIR" || exit 1 cd "$NOTES_PATH/$SUBDIR" || exit 1

View file

@ -0,0 +1,127 @@
#!/usr/bin/env bash
#
# spark
# https://github.com/holman/spark
#
# Generates sparklines for a set of data.
#
# Here's a good web-based sparkline generator that was a bit of inspiration
# for spark:
#
# https://datacollective.org/sparkblocks
#
# spark takes a comma-separated or space-separated list of data and then prints
# a sparkline out of it.
#
# Examples:
#
# spark 1 5 22 13 53
# # => ▁▁▃▂▇
#
# spark 0 30 55 80 33 150
# # => ▁▂▃▅▂▇
#
# spark -h
# # => Prints the spark help text.
# Generates sparklines.
#
# $1 - The data we'd like to graph.
_echo()
{
if [ "X$1" = "X-n" ]; then
shift
printf "%s" "$*"
else
printf "%s\n" "$*"
fi
}
spark()
{
local n numbers=
# find min/max values
local min=0xffffffff max=0
for n in ${@//,/ }
do
# on Linux (or with bash4) we could use `printf %.0f $n` here to
# round the number but that doesn't work on OS X (bash3) nor does
# `awk '{printf "%.0f",$1}' <<< $n` work, so just cut it off
n=${n%.*}
(( n < min )) && min=$n
(( n > max )) && max=$n
numbers=$numbers${numbers:+ }$n
done
# print ticks
local ticks=(▁ ▂ ▃ ▄ ▅ ▆ ▇ █)
# use a high tick if data is constant
(( min == max )) && ticks=(▅ ▆)
local f=$(( (($max-$min)<<8)/(${#ticks[@]}-1) ))
(( f < 1 )) && f=1
for n in $numbers
do
_echo -n ${ticks[$(( ((($n-$min)<<8)/$f) ))]}
done
_echo
}
# If we're being sourced, don't worry about such things
if [ "$BASH_SOURCE" == "$0" ]; then
# Prints the help text for spark.
help()
{
local spark=$(basename $0)
cat <<EOF
USAGE:
$spark [-h|--help] VALUE,...
EXAMPLES:
$spark 1 5 22 13 53
▁▁▃▂█
$spark 0,30,55,80,33,150
▁▂▃▄▂█
echo 9 13 5 17 1 | $spark
▄▆▂█▁
EOF
}
# show help for no arguments if stdin is a terminal
if { [ -z "$1" ] && [ -t 0 ] ; } || [ "$1" == '-h' ] || [ "$1" == '--help' ]
then
help
exit 0
fi
spark ${@:-`cat`}
fi
# source: https://github.com/holman/spark/commit/ab88ac6f8f33698f39ece2f109b1117ef39a68eb
# The MIT License
#
# Copyright (c) Zach Holman, https://zachholman.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
N todo

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
N todo

View file

@ -1,18 +0,0 @@
{config, ...}: {
programs.senpai = {
enable = true;
config = {
addr = "a";
nick = "a";
};
};
home.file."${config.xdg.configHome}/senpai/senpai.scfg" = {
enable = true;
text = ''
address irc+insecure://beefcake:6667
nickname lytedev
password-cmd pass soju
'';
};
}

View file

@ -1,51 +1,27 @@
{ {
colors, style,
outputs,
lib, lib,
config, config,
# font,
... ...
}: { }: {
imports = with outputs.homeManagerModules; [
waybar
mako
swaylock
linux-desktop
];
programs.wofi = {
enable = true;
settings = {
width = "640";
height = "360";
};
style = ''
* {
border-radius: 0;
}
window {
margin: 0px;
padding: 8px;
}
#outer-box {
margin: 8px;
}
#outer-box, #inner-box {
margin-top: 8px;
}
'';
};
programs.foot = { programs.foot = {
enable = true; enable = true;
}; };
xdg = {
enable = true;
mimeApps = {
enable = true;
defaultApplications = {
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
};
};
};
wayland.windowManager.sway = { wayland.windowManager.sway = {
/* /*
TODO: TODO:
+ Super+r should rotate the selected group of windows. + Super+r should rotate the selected group of windows.
+ Super+Control+{1-9} should control the size of the preselect space. + Super+Control+{1-9} should control the size of the preselect space.
+ Super+Shift+b should balance the size of all selected nodes. + Super+Shift+b should balance the size of all selected nodes.
@ -66,6 +42,17 @@
systemd = { systemd = {
enable = true; enable = true;
variables = [
"DISPLAY"
"WAYLAND_DISPLAY"
"SWAYSOCK"
"XDG_CURRENT_DESKTOP"
"XDG_SESSION_TYPE"
"NIXOS_OZONE_WL"
"XCURSOR_THEME"
"XCURSOR_SIZE"
"PATH"
];
}; };
# TODO: stuff is opening on workspace 10 (0?) # TODO: stuff is opening on workspace 10 (0?)
@ -74,7 +61,7 @@
swaymsg "workspace 1" swaymsg "workspace 1"
} }
set $tilers "(wezterm.*|kitty.*|firefox.*|slack.*|Slack.*|thunar.*|Alacritty.*|alacritty.*|Discord.*|discord.*)" set $tilers "(wezterm.*|kitty.*|firefox.*|[Ss]lack.*|thunar.*|[Aa]lacritty.*|[Dd]iscord.*)"
for_window [title=".*"] floating enable for_window [title=".*"] floating enable
for_window [app_id=$tilers] floating disable for_window [app_id=$tilers] floating disable
''; '';
@ -89,12 +76,6 @@
*/ */
]; ];
output = {
"*" = {
background = "$HOME/.wallpaper fill";
};
};
# TODO: popup_during_fullscreen smart # TODO: popup_during_fullscreen smart
focus = { focus = {
wrapping = "no"; # maybe workspace? wrapping = "no"; # maybe workspace?
@ -119,6 +100,14 @@
}; };
startup = [ startup = [
{command = "kdeconnect-indicator";}
{command = "mako";}
{
command = "swaybg -i $HOME/.wallpaper";
}
{
command = "swayosd-server";
}
{ {
command = "waybar"; command = "waybar";
} }
@ -147,7 +136,6 @@
} }
# {command = "firefox";} # {command = "firefox";}
# {command = "wezterm";} # {command = "wezterm";}
{command = "kitty --single-instance";}
]; ];
modes = { modes = {
@ -170,13 +158,13 @@
input = { input = {
"type:keyboard" = { "type:keyboard" = {
xkb_options = "ctrl:nocaps"; xkb_options = "ctrl:nocaps";
repeat_delay = "200"; repeat_delay = "180";
repeat_rate = "60"; repeat_rate = "100";
}; };
"type:pointer" = { "type:pointer" = {
accel_profile = "flat"; accel_profile = "flat";
pointer_accel = "0"; pointer_accel = "0.5";
}; };
"type:touchpad" = { "type:touchpad" = {
@ -189,17 +177,19 @@
}; };
keybindings = let keybindings = let
mod = config.wayland.windowManager.sway.config.modifier; mod = config.wayland.windowManager.sway.config.modifier;
menu = "tofi-run | xargs swaymsg exec --";
in { in {
# bindsym $mod+shift+space exec wofi --show drun
"${mod}+control+space" = "exec makoctl dismiss"; "${mod}+control+space" = "exec makoctl dismiss";
"${mod}+shift+space" = "exec makoctl invoke"; "${mod}+shift+space" = "exec makoctl invoke";
# "${mod}+return" = "exec kitty --single-instance"; # "${mod}+return" = "exec kitty --single-instance";
"${mod}+return" = "exec kitty"; "${mod}+return" = "exec wezterm";
"${mod}+shift+return" = "exec floating-term"; "${mod}+shift+return" = "exec floating-term";
"${mod}+shift+alt+return" = "exec kitty"; "${mod}+shift+alt+return" = "exec kitty";
"${mod}+c" = "kill"; "${mod}+c" = "kill";
"${mod}+shift+c" = "kill # TODO: kill -9?"; "${mod}+shift+c" = "kill # TODO: kill -9?";
"${mod}+space" = "exec wofi --show drun"; "${mod}+alt+space" = "exec wofi --show drun";
"${mod}" = "exec ${menu}";
"${mod}+space" = "exec ${menu}";
"${mod}+shift+s" = "exec clipshot"; "${mod}+shift+s" = "exec clipshot";
"${mod}+e" = "exec thunar"; "${mod}+e" = "exec thunar";
"${mod}+shift+r" = "reload"; "${mod}+shift+r" = "reload";
@ -276,12 +266,45 @@
# TODO: this should also reset the horizontal and vertical gaps? # TODO: this should also reset the horizontal and vertical gaps?
"${mod}+control+equal" = "gaps inner current set 0"; "${mod}+control+equal" = "gaps inner current set 0";
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%"; "${mod}+shift+v" = "exec swayosd-client --input-volume mute-toggle";
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%"; "${mod}+F1" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise";
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower";
"XF86AudioMute" = "exec swayosd-client --output-volume mute-toggle";
"XF86AudioMicMute" = "exec swayosd-client --input-volume mute-toggle";
"XF86MonBrightnessUp" = "exec swayosd-client --brightness raise";
"XF86MonBrightnessDown" = "exec swayosd-client --brightness lower";
"control+XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +1%"; "control+XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +1%";
"control+XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -1%"; "control+XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -1%";
"XF86AudioPlay" = "exec playerctl play-pause";
"XF86AudioNext" = "exec playerctl next";
"XF86AudioPrev" = "exec playerctl previous";
"--locked ${mod}+shift+v" = "exec swayosd-client --input-volume mute-toggle";
"--locked ${mod}+F1" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
"--locked XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise";
"--locked XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower";
"--locked XF86AudioMute" = "exec swayosd-client --output-volume mute-toggle";
"--locked XF86AudioMicMute" = "exec swayosd-client --input-volume mute-toggle";
"--locked XF86MonBrightnessUp" = "exec swayosd-client --brightness raise";
"--locked XF86MonBrightnessDown" = "exec swayosd-client --brightness lower";
"--locked control+XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +1%";
"--locked control+XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -1%";
"--locked XF86AudioPlay" = "exec playerctl play-pause";
"--locked XF86AudioNext" = "exec playerctl next";
"--locked XF86AudioPrev" = "exec playerctl previous";
/*
"XF86MonBrightnessUp" = " exec swayosd-client --brightness 10";
"XF86MonBrightnessDown" = "exec swayosd-client --brightness -10";
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle"; "XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
"${mod}+F1" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle"; "XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume 15";
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume -15";
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise --max-volume 120";
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower --max-volume 120";
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume +10 --device alsa_output.pci-0000_11_00.4.analog-stereo.monitor";
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume -10 --device alsa_output.pci-0000_11_00.4.analog-stereo.monitor";
"XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle"; "XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86MonBrightnessDown" = "exec brightnessctl set 10%-"; "XF86MonBrightnessDown" = "exec brightnessctl set 10%-";
"XF86MonBrightnessUp" = "exec brightnessctl set +10%"; "XF86MonBrightnessUp" = "exec brightnessctl set +10%";
@ -289,10 +312,8 @@
"shift+XF86MonBrightnessUp" = "exec brightnessctl set 100%"; "shift+XF86MonBrightnessUp" = "exec brightnessctl set 100%";
"control+XF86MonBrightnessDown" = "exec brightnessctl set 1%-"; "control+XF86MonBrightnessDown" = "exec brightnessctl set 1%-";
"control+XF86MonBrightnessUp" = "exec brightnessctl set +1%"; "control+XF86MonBrightnessUp" = "exec brightnessctl set +1%";
"XF86AudioPlay" = "exec playerctl play-pause";
"XF86AudioNext" = "exec playerctl next";
"XF86AudioPrev" = "exec playerctl previous";
"${mod}+shift+v" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle"; "${mod}+shift+v" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
*/
"${mod}+control+shift+l" = "exec swaylock"; "${mod}+control+shift+l" = "exec swaylock";
@ -300,7 +321,7 @@
}; };
assigns = {}; assigns = {};
bars = []; bars = [];
colors = with colors; { colors = with style.colors; {
background = bg; background = bg;
focused = { focused = {
background = bg; background = bg;

View file

@ -1,14 +1,10 @@
{ {style, ...}: {
font,
# colors,
...
}: {
programs.swaylock = { programs.swaylock = {
enable = true; enable = true;
settings = { settings = {
color = "ffffffff"; color = "ffffffff";
image = "~/.wallpaper"; image = "~/.wallpaper";
font = font.name; font = style.font.name;
show-failed-attempts = true; show-failed-attempts = true;
ignore-empty-password = true; ignore-empty-password = true;

View file

@ -1,7 +0,0 @@
{outputs, ...}: {
imports = with outputs.homeManagerModules; [
sway
sway-laptop
hyprland
];
}

View file

@ -1,126 +0,0 @@
{
# colors,
# font,
...
}: {
programs.tmux = {
enable = true;
baseIndex = 1;
clock24 = true;
extraConfig = ''
unbind C-b
set -g prefix C-s
# enable tmux to support helix colors
set -g default-terminal "tmux-256color"
set -g terminal-overrides ",xterm-256color:RGB"
set -g update-environment "WAYLAND_DISPLAY DISPLAY"
bind R source-file "$HOME/.tmux.conf" \; display-message "Reloaded $HOME/.tmux.conf"
bind o display-message "Saved pane output to #(tmux-save-buffer '#S')"
bind O run "tmux-edit-buffer"
bind D attach-session -t . -c '#{pane_current_path}' \; display-message "Set session path to #{pane_current_path}"
bind H set -s status # toggle status bar
bind v split-window -h -c "#{pane_current_path}"
bind b split-window -c "#{pane_current_path}"
bind h split-window -c "#{pane_current_path}"
bind -n C-l select-pane -R
bind -n C-k select-pane -U
bind -n C-j select-pane -D
# enabling a ^J hotkey causes breakage when pasting anything that start with a newline, since it triggers the hotkey and some weird interaction with bracketed paste causes the pane to enter a broken state
bind -n C-h select-pane -L
bind -n C-M-l split-window -h -c "#{pane_current_path}"
bind -n C-M-j split-window -v -c "#{pane_current_path}"
# tab creation
bind -n C-t new-window
# tab nav is the default p and n binds
# window and session switcher is the default w bind
set -g mouse on
set -g escape-time 0
set -g monitor-activity on
set -g visual-bell off
set -g bell-action other
set -g activity-action none
set -g mode-keys vi
set -g history-limit 1000000
set -g status on
set -g status-position bottom
set -g status-style "fg=colour8 bg=default"
set -g status-interval 5
set -g status-left-length 50
set -g window-status-style "fg=colour8 bg=default"
set -g window-status-format "#W"
set -g window-status-separator " "
set -g window-status-activity-style "fg=colour7 bg=default"
set -g window-status-bell-style "fg=colour1 bg=default"
set -g window-status-current-style "fg=colour4 bg=default"
set -g window-status-current-format " #W "
set -g status-left "#{client_user}@#h:#S "
set -g status-right "#(kubeline && printf ' ')"
set -g status-left-length 1000
set -g message-style "fg=colour7 bg=default"
set -g pane-active-border-style fg=blue
set -g pane-border-style fg=colour0
set -g clock-mode-colour colour8
set -g base-index 1
set -g pane-base-index 1
set -g window-status-current-format "#W"
# present a menu of urls to open from the visible pane
# TODO: fuzzy search this
# bind u capture-pane \;\
# save-buffer /tmp/tmux-buffer \;\
# split-window -l 10 "urlscan /tmp/tmux-buffer"
bind -T copy-mode-vi "y" send-keys -X copy-pipe-no-clear 'clip' \; display-message 'Copied to clipboard!'
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear 'clip' \; display-message 'Copied to clipboard!'
bind K kill-pane
bind C-S-k kill-window
# Activate OFF mode
bind -n M-o \
set prefix None \;\
set key-table off \;\
set -ag status-right " OFF"
# Disable OFF mode
bind -T off M-O \
set -u prefix \;\
set -u key-table \;\
source-file "$HOME/.config/tmux/tmux.conf"
# set -g @plugin 'tmux-plugins/tpm'
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-continuum'
# set -g @resurrect-capture-pane-contents 'on'
# set -g @resurrect-processes 'helix hx vi vim nvim emacs man less more tail top htop btm irssi weechat mutt "git log" iex mix deno watchexec mosh-client ssh senpai broot nnn iex mix'
# bind A run-shell "#{@resurrect-save-script-path}"
# bind L run-shell "#{@resurrect-restore-script-path}"
# set -g @continuum-restore 'on'
# set -g @continuum-save-interval '120'
'';
};
home.shellAliases = {
t = "tmux";
};
}

View file

@ -1,26 +0,0 @@
{
pkgs,
lib,
...
}: {
systemd.user.services.variety = {
Unit = {
Description = "Wallapaper downloader and changer";
After = ["graphical-session.target"];
};
Install.WantedBy = ["graphical-session.target"];
Service = {
Environment = [
"PATH=${lib.makeBinPath (with pkgs; [
variety
dbus
(lib.getBin pkgs.plasma5Packages.qttools)
libsForQt5.kdialog
])}"
];
ExecStart = ''
${pkgs.variety}/bin/variety
'';
};
};
}

View file

@ -1,6 +1,6 @@
{ {
colors, pkgs,
font, style,
... ...
}: { }: {
programs.waybar = { programs.waybar = {
@ -10,38 +10,41 @@
"layer" = "top"; "layer" = "top";
"position" = "bottom"; "position" = "bottom";
"output" = ["eDP-1" "DP-3"]; "output" = ["eDP-1" "DP-3"];
"height" = 32; "height" = 50;
"modules-left" = ["clock" "sway/window"]; "modules-left" = [
"modules-center" = ["sway/workspaces"];
"modules-right" = [
"mpris"
"idle_inhibitor" "idle_inhibitor"
"bluetooth" "sway/workspaces"
# "wireplumber", "sway/window"
];
"modules-center" = [];
"modules-right" = [
"privacy"
"power-profiles-daemon"
"mpris"
## "disk"
## TODO: will need a custom module for Disk IO
## "wireplumber" # pulseaudio module is more featureful
"pulseaudio" "pulseaudio"
# "network", "network"
"cpu" "cpu"
"memory" "memory"
# "temperature", "temperature"
"backlight" "backlight"
"battery" "battery"
"bluetooth"
"tray" "tray"
"clock"
]; ];
"bluetooth" = { "bluetooth" = {
"format" = "<span</span>"; "format" = "<span></span>";
"format-connected" = "<span></span>"; "on-click" = "${pkgs.blueman}/bin/blueman-manager";
"format-connected-battery" = "<span></span>"; };
# "format-device-preference" = [ "device1", "device2" ], # preference list deciding the displayed devic; "wireplumber" = {
"tooltip-format" = "{controller_alias}@{controller_address} ({num_connections} connected)"; "format" = "{volume}% {icon}";
"tooltip-format-connected" = "{controller_alias}@{controller_address} ({num_connections} connected)\n{device_enumerate}"; "on-click" = "helvum";
"tooltip-format-enumerate-connected" = "{device_alias}@{device_address}";
"tooltip-format-enumerate-connected-battery" = "{device_alias}@{device_address} (󰁹 {device_battery_percentage}%)";
}; };
# "wireplumber" = ;
# "format" = "{volume}% {icon}";
# "format-muted" = "";
# "on-click" = "helvum;
# },
"sway/workspaces" = { "sway/workspaces" = {
"disable-scroll" = false; "disable-scroll" = false;
"persistent_workspaces" = { "persistent_workspaces" = {
@ -59,31 +62,40 @@
"tray" = { "tray" = {
"icon-size" = 24; "icon-size" = 24;
"spacing" = 4; "spacing" = 4;
"show-passive-items" = true;
}; };
"clock" = { "clock" = {
"interval" = 1; "interval" = 1;
"format" = "{:%a %b %d %H:%M:%S}"; "format" = "{:%a %b %d\n%H:%M:%S}";
"justify" = "center";
}; };
"cpu" = { "cpu" = {
"format" = "{usage} <span></span>"; "format" = "{usage}%\nCPU";
"tooltip" = true; "tooltip" = true;
"interval" = 3; "interval" = 5;
"justify" = "center";
}; };
"memory" = { "memory" = {
"format" = "{} 󰍛"; "format" = "{}%\nRAM";
"tooltip" = true;
"interval" = 5;
"justify" = "center";
}; };
"temperature" = { "temperature" = {
# "thermal-zone" = 2; /*
# "hwmon-path" = "/sys/class/hwmon/hwmon2/temp1_input"; "thermal-zone" = 2;
"hwmon-path" = "/sys/class/hwmon/hwmon2/temp1_input";
"format-critical" = "{temperatureC}°C {icon}";
*/
"critical-threshold" = 80; "critical-threshold" = 80;
# "format-critical" = "{temperatureC}°C {icon}"; "format" = "{temperatureC}\n°C";
"format" = "{temperatureC}°C {icon}"; "justify" = "center";
"format-icons" = ["" "" ""];
}; };
"backlight" = { "backlight" = {
# "device" = "acpi_video1"; # "device" = "acpi_video1";
"format" = "{percent}% {icon}"; "format" = "{percent}%\n{icon}";
"format-icons" = ["" ""]; "format-icons" = ["" ""];
"justify" = "center";
}; };
"battery" = { "battery" = {
"states" = { "states" = {
@ -91,55 +103,55 @@
"warning" = 30; "warning" = 30;
"critical" = 1; "critical" = 1;
}; };
"format" = "{capacity}% {icon}"; "tooltip-format" = "{timeTo}\n{power} watts\n{health}% health\n{cycles} cycles";
"format-charging" = "{capacity}% 󱐋"; "format" = "{icon}{capacity}%-\n{time}";
"format-plugged" = "{capacity}% 󰚥"; "format-charging" = "{capacity}%+\n{time}";
"format-alt" = "{time} {icon}"; "format-plugged" = "{capacity}%=\n{time}";
"format-good" = ""; # An empty format will hide the modul; "format-alt" = "{capacity}%";
"format-full" = "󰁹"; "format-good" = ""; # An empty format will hide the module
"format-icons" = ["󰂎" "󰁻" "󰁽" "󰁿" "󰂂"]; "format-time" = "{H}:{m}";
"justify" = "center";
}; };
"network" = { "network" = {
"format-wifi" = "{essid} ({signalStrength}%) "; "format-wifi" = "{bandwidthUpBits} up \n{bandwidthDownBits} down";
"format-ethernet" = "{ifname}: {ipaddr}/{cidr} "; "format-ethernet" = "{bandwidthUpBits} up \n{bandwidthDownBits} down";
"format-linked" = "{ifname} (No IP) "; "format-linked" = "{bandwidthUpBits} up \n{bandwidthDownBits} down";
"format-disconnected" = "Disconnected "; "format-disconnected" = "No Network {icon}";
"format-alt" = "{ifname}: {ipaddr}/{cidr}"; "format-alt" = "{bandwidthUpBits} up \n{bandwidthDownBits} down";
"interval" = 5;
"justify" = "right";
}; };
"mpris" = { "mpris" = {
"format" = "{title} by {artist}"; "format" = "{title}\nby {artist}";
"title-len" = 64;
"artist-len" = 61;
"justify" = "center";
}; };
"pulseaudio" = { "pulseaudio" = {
# "scroll-step" = 1, # %, can be a floa; /*
"format" = "{volume} {icon} <span>{format_source}</span>"; "scroll-step" = 1, # %, can be a floa;
#"format" = "{volume}% {icon} {format_source}"; "format" = "{volume}% {icon} {format_source}";
#"format-bluetooth" = "{volume}% {icon} {format_source}"; "format-muted" = " {format_source}";
#"format-bluetooth-muted" = " {icon} {format_source}"; */
#"format-muted" = " {format_source}"; "format" = "{volume}%\n{format_source}";
"format-muted" = "󰝟 {format_source}"; "format-muted" = "MUTE\n{format_source}";
"format-source" = ""; "format-bluetooth" = "{volume}%\n{format_source}";
"format-source-muted" = ""; "format-bluetooth-muted" = "MUTE\n{format_source}";
"format-icons" = { "format-source" = "MIC ON";
"headphones" = ""; "format-source-muted" = "MIC OFF";
"handsfree" = "󱥋";
"headset" = "󰋎";
"phone" = "";
"portable" = "";
"car" = "";
"default" = ["" "" ""];
};
# TODO: toggle mute? # TODO: toggle mute?
"on-click" = "pavucontrol"; "on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
"justify" = "center";
}; };
}; };
}; };
style = let style = let
border-width = "0px"; border-width = "0px";
in in
with colors.withHashPrefix; '' with style.colors.withHashPrefix; ''
* { * {
border-radius: 0; border-radius: 0;
font-family: "${font.name}", "Symbols Nerd Font Mono", sans-serif; font-family: "${style.font.name}", "Symbols Nerd Font Mono", sans-serif;
font-size: 16px; font-size: 16px;
} }

View file

@ -1,10 +0,0 @@
{
# font,
# colors,
...
}: {
programs.wezterm = {
enable = true;
extraConfig = builtins.readFile ./wezterm/config.lua;
};
}

View file

@ -1,44 +1,34 @@
local wezterm = require'wezterm' local wezterm = require 'wezterm'
-- rough duplication of colors.nix and font values from flake.nix
FONT = {
name = "IosevkaLyteTerm";
size = 12;
}
COLORS = {
};
local config = {} local config = {}
if wezterm.config_builder then if wezterm.config_builder then
config = wezterm.config_builder() config = wezterm.config_builder()
end end
local font_spec = { family = FONT.name, weight = 'Medium', italic = false } config.adjust_window_size_when_changing_font_size = false
local font_size = tostring(FONT.size); config.font = wezterm.font_with_fallback {
{ family = "IosevkaLyteTerm", weight = 'Medium', italic = false },
local font = wezterm.font_with_fallback{
font_spec,
{ family = 'Symbols Nerd Font Mono', weight = 'Regular', italic = false }, { family = 'Symbols Nerd Font Mono', weight = 'Regular', italic = false },
'Noto Color Emoji', 'Noto Color Emoji',
} }
config.font_size = 12.0
-- config.disable_default_key_bindings = true
config.default_cursor_style = 'BlinkingBar'
config.font = font
config.font_size = font_size
config.hide_tab_bar_if_only_one_tab = true
config.use_fancy_tab_bar = false
config.tab_bar_at_bottom = false
config.window_background_opacity = 1.0
config.enable_kitty_keyboard = true
-- config.window_frame.font = config.font -- config.window_frame.font = config.font
-- config.window_frame.font_size = font_size -- config.window_frame.font_size = font_size
config.default_cursor_style = 'BlinkingBar'
-- config.disable_default_key_bindings = true
config.hide_tab_bar_if_only_one_tab = true
config.use_fancy_tab_bar = false
config.tab_bar_at_bottom = true
config.window_background_opacity = 1.0
config.enable_kitty_keyboard = true
config.show_new_tab_button_in_tab_bar = true
config.notification_handling = "SuppressFromFocusedTab"
-- config.front_end = "WebGpu"
-- config.webgpu_power_preference = 'HighPerformance'
config.enable_wayland = true
-- config.use_ime = true
local function tab_title(tab_info) local function tab_title(tab_info)
local title = tab_info.tab_title local title = tab_info.tab_title
if title and #title > 0 then if title and #title > 0 then
@ -48,106 +38,13 @@ local function tab_title(tab_info)
end end
-- wezterm.on('format-tab-title', function (tab, tabs, panes, config, hover, max_width) -- wezterm.on('format-tab-title', function (tab, tabs, panes, config, hover, max_width)
wezterm.on('format-tab-title', function (tab, _, _, _, _, max_width) wezterm.on('format-tab-title', function(tab, _, _, _, _, max_width)
local title = tab_title(tab) local title = tab_title(tab)
return ' ' .. string.sub(title, 0, max_width - 2) .. ' ' return ' ' .. string.sub(title, 0, max_width - 2) .. ' '
end) end)
-- TODO: port colors -- see nix module which has home manager create this color scheme file
config.colors = { config.color_scheme = 'catppuccin-mocha-sapphire';
foreground = '${fg}',
background = '${bg}',
cursor_bg = '${text}',
cursor_fg = '${bg}',
cursor_border = '${text}',
selection_fg = '${bg}',
selection_bg = '${yellow}',
scrollbar_thumb = '${bg2}',
split = '${bg5}',
ansi = {
'${colors.withHashPrefix."0"}',
'${colors.withHashPrefix."1"}',
'${colors.withHashPrefix."2"}',
'${colors.withHashPrefix."3"}',
'${colors.withHashPrefix."4"}',
'${colors.withHashPrefix."5"}',
'${colors.withHashPrefix."6"}',
'${colors.withHashPrefix."7"}',
},
brights = {
'${colors.withHashPrefix."8"}',
'${colors.withHashPrefix."9"}',
'${colors.withHashPrefix."10"}',
'${colors.withHashPrefix."11"}',
'${colors.withHashPrefix."12"}',
'${colors.withHashPrefix."13"}',
'${colors.withHashPrefix."14"}',
'${colors.withHashPrefix."15"}',
},
tab_bar = {
background = '${bg3}',
active_tab = {
bg_color = '${primary}',
fg_color = '${bg}',
italic = false,
},
inactive_tab = {
bg_color = '${bg2}',
fg_color = '${fgdim}',
italic = false,
},
inactive_tab_hover = {
bg_color = '${bg3}',
fg_color = '${primary}',
italic = false,
},
new_tab = {
bg_color = '${bg2}',
fg_color = '${fgdim}',
italic = false,
},
new_tab_hover = {
bg_color = '${bg3}',
fg_color = '${primary}',
italic = false,
},
},
-- Arbitrary colors of the palette in the range from 16 to 255
indexed = { [136] = '#af8700' },
-- Since: 20220319-142410-0fcdea07
-- When the IME, a dead key or a leader key are being processed and are effectively
-- holding input pending the result of input composition, change the cursor
-- to this color to give a visual cue about the compose state.
compose_cursor = 'orange',
-- Colors for copy_mode and quick_select
-- available since: 20220807-113146-c2fee766
-- In copy_mode, the color of the active text is:
-- 1. copy_mode_active_highlight_* if additional text was selected using the mouse
-- 2. selection_* otherwise
copy_mode_active_highlight_bg = { Color = '#000000' },
-- use `AnsiColor` to specify one of the ansi color palette values
-- (index 0-15) using one of the names "Black", "Maroon", "Green",
-- "Olive", "Navy", "Purple", "Teal", "Silver", "Grey", "Red", "Lime",
-- "Yellow", "Blue", "Fuchsia", "Aqua" or "White".
copy_mode_active_highlight_fg = { AnsiColor = 'Black' },
copy_mode_inactive_highlight_bg = { Color = '#52ad70' },
copy_mode_inactive_highlight_fg = { AnsiColor = 'White' },
quick_select_label_bg = { Color = 'peru' },
quick_select_label_fg = { Color = '#ffffff' },
quick_select_match_bg = { AnsiColor = 'Navy' },
quick_select_match_fg = { Color = '#ffffff' },
}
config.inactive_pane_hsb = { config.inactive_pane_hsb = {
saturation = 0.8, saturation = 0.8,
@ -158,63 +55,73 @@ config.keys = {
{ {
key = 'Insert', key = 'Insert',
mods = 'SHIFT', mods = 'SHIFT',
action = wezterm.action.PasteFrom'Clipboard' action = wezterm.action.PasteFrom 'Clipboard'
}, },
{ {
key = 'v', key = 'v',
mods = 'CTRL|SHIFT', mods = 'CTRL|SHIFT',
action = wezterm.action.PasteFrom'PrimarySelection' action = wezterm.action.PasteFrom 'PrimarySelection'
}, },
{ {
key = 't', key = 't',
mods = 'CTRL|SHIFT', mods = 'CTRL|SHIFT',
action = wezterm.action.SpawnTab'CurrentPaneDomain' action = wezterm.action.SpawnTab 'CurrentPaneDomain'
}, },
{ {
key = 'h', key = 'h',
mods = 'CTRL', mods = 'CTRL',
action = wezterm.action.ActivatePaneDirection'Left' action = wezterm.action.ActivatePaneDirection 'Left'
}, },
{ {
key = 'l', key = 'l',
mods = 'CTRL', mods = 'CTRL',
action = wezterm.action.ActivatePaneDirection'Right' action = wezterm.action.ActivatePaneDirection 'Right'
}, },
{ {
key = 'k', key = 'k',
mods = 'CTRL', mods = 'CTRL',
action = wezterm.action.ActivatePaneDirection'Up' action = wezterm.action.ActivatePaneDirection 'Up'
}, },
{ {
key = 'j', key = 'j',
mods = 'CTRL', mods = 'CTRL',
action = wezterm.action.ActivatePaneDirection'Down' action = wezterm.action.ActivatePaneDirection 'Down'
}, },
{ {
key = 'j', key = 'j',
mods = 'CTRL|SHIFT', mods = 'CTRL|SHIFT',
action = wezterm.action.SplitVertical{domain='CurrentPaneDomain'} action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' }
}, },
{ {
key = 'l', key = 'l',
mods = 'CTRL|SHIFT', mods = 'CTRL|SHIFT',
action = wezterm.action.SplitHorizontal{domain='CurrentPaneDomain'} action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' }
}, },
{ {
key = 'k', key = 'k',
mods = 'CTRL|SHIFT', mods = 'CTRL|SHIFT',
action = wezterm.action.SplitVertical{args={'top'},domain='CurrentPaneDomain'} action = wezterm.action.SplitVertical { args = { 'top' }, domain = 'CurrentPaneDomain' }
}, },
{ {
key = 'h', key = 'h',
mods = 'CTRL|SHIFT', mods = 'CTRL|SHIFT',
action = wezterm.action.SplitHorizontal{args={'right'},domain='CurrentPaneDomain'} action = wezterm.action.SplitHorizontal { args = { 'right' }, domain = 'CurrentPaneDomain' }
}, },
{ {
key = 'p', key = 'p',
mods = 'CTRL|SHIFT', mods = 'CTRL|SHIFT',
action = wezterm.action.ActivateCommandPalette action = wezterm.action.ActivateCommandPalette
}, },
{
key = 'w',
mods = 'CTRL|SHIFT',
action = wezterm.action.CloseCurrentPane { confirm = true },
},
{
key = 'w',
mods = 'CTRL|ALT|SHIFT',
action = wezterm.action.CloseCurrentTab { confirm = true },
},
{ {
key = 'l', key = 'l',
mods = 'CTRL|SHIFT|ALT', mods = 'CTRL|SHIFT|ALT',
@ -223,15 +130,15 @@ config.keys = {
{ {
key = 'r', key = 'r',
mods = 'CTRL|SHIFT|ALT', mods = 'CTRL|SHIFT|ALT',
action = wezterm.action.RotatePanes'Clockwise' action = wezterm.action.RotatePanes 'Clockwise'
}, },
} }
-- config.unix_domains = { -- config.unix_domains = {
-- { -- {
-- name = 'unix', -- name = 'unix',
-- local_echo_threshold_ms = 10, -- local_echo_threshold_ms = 10,
-- }, -- },
-- } -- }
-- config.default_gui_startup_args = { 'connect', 'unix' } -- config.default_gui_startup_args = { 'connect', 'unix' }

View file

@ -1,513 +0,0 @@
{
colors,
lib,
...
}: {
# zellij does not support modern terminal keyboard input:
# https://github.com/zellij-org/zellij/issues/735
programs.zellij = {
# uses home manager's toKDL generator
enable = true;
# enableFishIntegration = true;
settings = {
pane_frames = false;
simplified_ui = true;
default_mode = "locked";
mouse_mode = true;
copy_clipboard = "primary";
copy_on_select = true;
mirror_session = false;
keybinds = with builtins; let
binder = bind: let
keys = elemAt bind 0;
action = elemAt bind 1;
argKeys = map (k: "\"${k}\"") (lib.lists.flatten [keys]);
in {
name = "bind ${concatStringsSep " " argKeys}";
value = action;
};
layer = binds: (listToAttrs (map binder binds));
in {
# _props = {clear-defaults = true;};
normal = {};
locked = layer [
[["Ctrl g"] {SwitchToMode = "Normal";}]
[["Ctrl L"] {NewPane = "Right";}]
[["Ctrl Z"] {NewPane = "Right";}]
[["Ctrl J"] {NewPane = "Down";}]
[["Ctrl h"] {MoveFocus = "Left";}]
[["Ctrl l"] {MoveFocus = "Right";}]
[["Ctrl j"] {MoveFocus = "Down";}]
[["Ctrl k"] {MoveFocus = "Up";}]
];
resize = layer [
[["Ctrl n"] {SwitchToMode = "Normal";}]
[["h" "Left"] {Resize = "Increase Left";}]
[["j" "Down"] {Resize = "Increase Down";}]
[["k" "Up"] {Resize = "Increase Up";}]
[["l" "Right"] {Resize = "Increase Right";}]
[["H"] {Resize = "Decrease Left";}]
[["J"] {Resize = "Decrease Down";}]
[["K"] {Resize = "Decrease Up";}]
[["L"] {Resize = "Decrease Right";}]
[["=" "+"] {Resize = "Increase";}]
[["-"] {Resize = "Decrease";}]
];
pane = layer [
[["Ctrl p"] {SwitchToMode = "Normal";}]
[["h" "Left"] {MoveFocus = "Left";}]
[["l" "Right"] {MoveFocus = "Right";}]
[["j" "Down"] {MoveFocus = "Down";}]
[["k" "Up"] {MoveFocus = "Up";}]
[["p"] {SwitchFocus = [];}]
[
["n"]
{
NewPane = [];
SwitchToMode = "Normal";
}
]
[
["d"]
{
NewPane = "Down";
SwitchToMode = "Normal";
}
]
[
["r"]
{
NewPane = "Right";
SwitchToMode = "Normal";
}
]
[
["x"]
{
CloseFocus = [];
SwitchToMode = "Normal";
}
]
[
["f"]
{
ToggleFocusFullscreen = [];
SwitchToMode = "Normal";
}
]
[
["z"]
{
TogglePaneFrames = [];
SwitchToMode = "Normal";
}
]
[
["w"]
{
ToggleFloatingPanes = [];
SwitchToMode = "Normal";
}
]
[
["e"]
{
TogglePaneEmbedOrFloating = [];
SwitchToMode = "Normal";
}
]
[
["c"]
{
SwitchToMode = "RenamePane";
PaneNameInput = 0;
}
]
];
move = layer [
[["Ctrl h"] {SwitchToMode = "Normal";}]
[["n" "Tab"] {MovePane = [];}]
[["p"] {MovePaneBackwards = [];}]
[["h" "Left"] {MovePane = "Left";}]
[["j" "Down"] {MovePane = "Down";}]
[["k" "Up"] {MovePane = "Up";}]
[["l" "Right"] {MovePane = "Right";}]
];
tab = layer [
[["Ctrl t"] {SwitchToMode = "Normal";}]
[
["r"]
{
SwitchToMode = "RenameTab";
TabNameInput = 0;
}
]
[["h" "Left" "Up" "k"] {GoToPreviousTab = [];}]
[["l" "Right" "Down" "j"] {GoToNextTab = [];}]
[
["n"]
{
NewTab = [];
SwitchToMode = "Normal";
}
]
[
["x"]
{
CloseTab = [];
SwitchToMode = "Normal";
}
]
[
["s"]
{
ToggleActiveSyncTab = [];
SwitchToMode = "Normal";
}
]
[
["1"]
{
GoToTab = 1;
SwitchToMode = "Normal";
}
]
[
["2"]
{
GoToTab = 2;
SwitchToMode = "Normal";
}
]
[
["3"]
{
GoToTab = 3;
SwitchToMode = "Normal";
}
]
[
["4"]
{
GoToTab = 4;
SwitchToMode = "Normal";
}
]
[
["5"]
{
GoToTab = 5;
SwitchToMode = "Normal";
}
]
[
["6"]
{
GoToTab = 6;
SwitchToMode = "Normal";
}
]
[
["7"]
{
GoToTab = 7;
SwitchToMode = "Normal";
}
]
[
["8"]
{
GoToTab = 8;
SwitchToMode = "Normal";
}
]
[
["9"]
{
GoToTab = 9;
SwitchToMode = "Normal";
}
]
[["Tab"] {ToggleTab = [];}]
];
scroll = layer [
[["Ctrl s"] {SwitchToMode = "Normal";}]
[
["e"]
{
EditScrollback = [];
SwitchToMode = "Normal";
}
]
[
["s"]
{
SwitchToMode = "EnterSearch";
SearchInput = 0;
}
]
[
["Ctrl c"]
{
ScrollToBottom = [];
SwitchToMode = "Normal";
}
]
[["j" "Down"] {ScrollDown = [];}]
[["k" "Up"] {ScrollUp = [];}]
[["Ctrl f" "PageDown" "Right" "l"] {PageScrollDown = [];}]
[["Ctrl b" "PageUp" "Left" "h"] {PageScrollUp = [];}]
[["d"] {HalfPageScrollDown = [];}]
[["u"] {HalfPageScrollUp = [];}]
# uncomment this and adjust key if using copy_on_select=false
# bind "Alt c" { Copy; }
];
search = layer [
[["Ctrl s"] {SwitchToMode = "Normal";}]
[
["Ctrl c"]
{
ScrollToBottom = [];
SwitchToMode = "Normal";
}
]
[["j" "Down"] {ScrollDown = [];}]
[["k" "Up"] {ScrollUp = [];}]
[["Ctrl f" "PageDown" "Right" "l"] {PageScrollDown = [];}]
[["Ctrl b" "PageUp" "Left" "h"] {PageScrollUp = [];}]
[["d"] {HalfPageScrollDown = [];}]
[["u"] {HalfPageScrollUp = [];}]
[["n"] {Search = "down";}]
[["p"] {Search = "up";}]
[["c"] {SearchToggleOption = "CaseSensitivity";}]
[["w"] {SearchToggleOption = "Wrap";}]
[["o"] {SearchToggleOption = "WholeWord";}]
];
entersearch = layer [
[["Ctrl c" "Esc"] {SwitchToMode = "Scroll";}]
[["Enter"] {SwitchToMode = "Search";}]
];
renametab = layer [
[["Ctrl c"] {SwitchToMode = "Normal";}]
[
["Esc"]
{
UndoRenameTab = [];
SwitchToMode = "Tab";
}
]
];
renamepane = layer [
[["Ctrl c"] {SwitchToMode = "Normal";}]
[
["Esc"]
{
UndoRenamePane = [];
SwitchToMode = "Pane";
}
]
];
session = layer [
[["Ctrl o"] {SwitchToMode = "Normal";}]
[["Ctrl s"] {SwitchToMode = "Scroll";}]
[["d"] {Detach = [];}]
];
tmux = layer [
[["["] {SwitchToMode = "Scroll";}]
[
["Ctrl b"]
{
Write = 2;
SwitchToMode = "Normal";
}
]
[
["\\\""]
{
NewPane = "Down";
SwitchToMode = "Normal";
}
]
[
["%"]
{
NewPane = "Right";
SwitchToMode = "Normal";
}
]
[
["z"]
{
ToggleFocusFullscreen = [];
SwitchToMode = "Normal";
}
]
[
["c"]
{
NewTab = [];
SwitchToMode = "Normal";
}
]
[[","] {SwitchToMode = "RenameTab";}]
[
["p"]
{
GoToPreviousTab = [];
SwitchToMode = "Normal";
}
]
[
["n"]
{
GoToNextTab = [];
SwitchToMode = "Normal";
}
]
[
["Left"]
{
MoveFocus = "Left";
SwitchToMode = "Normal";
}
]
[
["Right"]
{
MoveFocus = "Right";
SwitchToMode = "Normal";
}
]
[
["Down"]
{
MoveFocus = "Down";
SwitchToMode = "Normal";
}
]
[
["Up"]
{
MoveFocus = "Up";
SwitchToMode = "Normal";
}
]
[
["h"]
{
MoveFocus = "Left";
SwitchToMode = "Normal";
}
]
[
["l"]
{
MoveFocus = "Right";
SwitchToMode = "Normal";
}
]
[
["j"]
{
MoveFocus = "Down";
SwitchToMode = "Normal";
}
]
[
["k"]
{
MoveFocus = "Up";
SwitchToMode = "Normal";
}
]
[["o"] {FocusNextPane = [];}]
[["d"] {Detach = [];}]
[["Space"] {NextSwapLayout = [];}]
[
["x"]
{
CloseFocus = [];
SwitchToMode = "Normal";
}
]
];
"shared_except \"locked\"" = layer [
[["Ctrl g"] {SwitchToMode = "Locked";}]
[["Ctrl q"] {Quit = [];}]
[["Alt n"] {NewPane = [];}]
[["Alt h" "Alt Left"] {MoveFocusOrTab = "Left";}]
[["Alt l" "Alt Right"] {MoveFocusOrTab = "Right";}]
[["Alt j" "Alt Down"] {MoveFocus = "Down";}]
[["Alt k" "Alt Up"] {MoveFocus = "Up";}]
[["Alt ]" "Alt +"] {Resize = "Increase";}]
[["Alt -"] {Resize = "Decrease";}]
[["Alt ["] {PreviousSwapLayout = [];}]
[["Alt ]"] {NextSwapLayout = [];}]
];
"shared_except \"normal\" \"locked\"" = layer [
[["Enter" "Esc"] {SwitchToMode = "Normal";}]
];
"shared_except \"pane\" \"locked\"" = layer [
[["Ctrl p"] {SwitchToMode = "Pane";}]
];
"shared_except \"resize\" \"locked\"" = layer [
[["Ctrl n"] {SwitchToMode = "Resize";}]
];
"shared_except \"scroll\" \"locked\"" = layer [
[["Ctrl s"] {SwitchToMode = "Scroll";}]
];
"shared_except \"session\" \"locked\"" = layer [
[["Ctrl o"] {SwitchToMode = "Session";}]
];
"shared_except \"tab\" \"locked\"" = layer [
[["Ctrl t"] {SwitchToMode = "Tab";}]
];
"shared_except \"move\" \"locked\"" = layer [
[["Ctrl h"] {SwitchToMode = "Move";}]
];
"shared_except \"tmux\" \"locked\"" = layer [
[["Ctrl b"] {SwitchToMode = "Tmux";}]
];
};
default_layout = "compact";
theme = "match";
themes = {
match = with colors.withHashPrefix; {
fg = fg;
bg = bg;
black = bg;
white = fg;
red = red;
green = green;
yellow = yellow;
blue = blue;
magenta = purple;
cyan = blue;
orange = orange;
};
};
# TODO: port config
plugins = {
# tab-bar = {path = "tab-bar";};
# compact-bar = {path = "compact-bar";};
};
ui = {
pane_frames = {
rounded_corners = true;
hide_session_name = true;
};
};
};
};
home.shellAliases = {
z = "zellij";
};
}

View file

@ -1,9 +0,0 @@
{
# enable mDNS and discovery
services.avahi = {
enable = true;
reflector = true;
openFirewall = true;
nssmdns4 = true;
};
}

View file

@ -1,309 +0,0 @@
{
config,
lib,
inputs,
outputs,
pkgs,
modulesPath,
...
}: let
inherit (pkgs) system;
in {
networking.hostName = lib.mkDefault "nixoslyte";
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
inputs.sops-nix.nixosModules.sops
inputs.disko.nixosModules.disko
inputs.home-manager.nixosModules.home-manager
]
++ (with outputs.nixosModules; [
avahi
daniel
]);
hardware.enableRedistributableFirmware = true;
services.journald.extraConfig = "SystemMaxUse=1G";
home-manager.useGlobalPkgs = true;
environment = {
variables = {
EDITOR = "hx";
VISUAL = "hx";
PAGER = "less";
MANPAGER = "less";
};
systemPackages = with pkgs;
[
# age
# bat
# bc
# bind
# bottom
# btrfs-progs
# cue
curl
# dogdns
dua
eza
fd
file
fzf
gnumake
# gron
# hexyl
iputils
# jq
killall
less
mosh
# nmap
nettools
nodePackages.bash-language-server
openssl
# pciutils
# pv
# rclone
# restic
ripgrep
rsync
# rtx
sd
shellcheck
shfmt
# sops
smartmontools
# sqlite
# skim
# sysstat
unzip
# usbutils
# watchexec
wget
# xh
zellij
# zstd
]
++ (with inputs.home-manager.packages.${system}; [
home-manager
])
++ (with inputs.helix.packages.${system}; [
helix
]);
};
users.groups.daniel = {};
users.users = {
daniel = {
isNormalUser = true;
home = "/home/daniel/.home";
createHome = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
];
group = "daniel";
extraGroups = ["users" "wheel" "video" "dialout" "uucp"];
packages = [];
};
root = {
openssh.authorizedKeys.keys = config.users.users.daniel.openssh.authorizedKeys.keys;
};
};
i18n = {
defaultLocale = "en_US.UTF-8";
};
programs.mosh = {
enable = true;
openFirewall = true;
};
services = {
xserver.xkb = {
layout = "us";
options = "ctrl:nocaps";
};
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "yes";
};
openFirewall = lib.mkDefault true;
# listenAddresses = [
# { addr = "0.0.0.0"; port = 22; }
# ];
};
tailscale = {
enable = true;
useRoutingFeatures = lib.mkDefault "client";
};
fwupd.enable = true;
smartd.enable = true;
};
console = {
# font = "Lat2-Terminus16";
useXkbConfig = true;
earlySetup = true;
colors = with outputs.colors; [
bg
red
green
orange
blue
purple
yellow
fg3
fgdim
red
green
orange
blue
purple
yellow
fg
];
};
networking = {
useDHCP = lib.mkDefault true;
firewall = {
enable = lib.mkDefault true;
allowPing = lib.mkDefault true;
allowedTCPPorts = lib.mkDefault [22];
allowedUDPPorts = lib.mkDefault [];
};
extraHosts = ''
::1 host.docker.internal
127.0.0.1 host.docker.internal
::1 host.containers.internal
127.0.0.1 host.containers.internal
'';
};
programs = {
fish = {
enable = true;
};
tmux = {
enable = true;
clock24 = true;
};
traceroute.enable = true;
git = {
enable = true;
package = pkgs.gitFull;
lfs = {
enable = true;
};
};
# https://github.com/nix-community/home-manager/issues/3113
dconf.enable = true;
};
time = {
timeZone = "America/Chicago";
};
users = {
defaultUserShell = pkgs.fish;
};
# TODO: should not be in common?
# services.udev.extraRules = ''
# # https://betaflight.com/docs/wiki/archive/Installing-Betaflight#step-1
# # ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", MODE="0664", GROUP="uucp"
# # ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="uucp"'
# '';
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
};
nix = {
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome!
# Not sure why I would need this...
# nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
# registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
settings = {
trusted-users = ["root" "daniel"];
experimental-features = lib.mkDefault ["nix-command" "flakes"];
substituters = [
"https://cache.nixos.org/"
"https://helix.cachix.org"
"https://nix-community.cachix.org"
"https://nix.h.lyte.dev"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0="
];
auto-optimise-store = false;
};
};
# # TODO: regular cron or something?
# programs.nix-index = {
# enable = true;
# # enableFishIntegration = true;
# };
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
system.stateVersion = lib.mkDefault "23.11";
}

View file

@ -1,47 +0,0 @@
{
pkgs,
inputs,
outputs,
...
}: let
inherit (pkgs) system;
in {
home-manager = {
extraSpecialArgs = {
inherit inputs outputs system;
inherit (outputs) colors font;
};
users.daniel = {
accounts.email.accounts = {
primary = {
primary = true;
address = "daniel@lyte.dev";
};
legacy = {
address = "wraithx2@gmail.com";
};
io = {
# TODO: finalize deprecation
address = "daniel@lytedev.io";
};
# TODO: may need to use a sops secret? put in another module?
# work = {
# address = "REDACTED";
# };
};
home = {
username = "daniel";
homeDirectory = "/home/daniel/.home";
};
imports = with outputs.homeManagerModules; [
common
gnome
senpai
iex
cargo
];
};
};
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,93 @@
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkOption types mkIf;
inherit (lib.strings) optionalString;
cfg = config.services.deno-netlify-ddns-client;
in {
options.services.deno-netlify-ddns-client = {
enable = mkEnableOption "Enable the deno-netlify-ddns client.";
username = mkOption {
type = types.str;
};
passwordFile = mkOption {
type = types.str;
};
endpoint = mkOption {
type = types.str;
default = "https://netlify-ddns.deno.dev";
};
ipv4 = mkOption {
type = types.bool;
default = true;
};
ipv6 = mkOption {
type = types.bool;
default = true;
};
requestTimeout = mkOption {
type = types.int;
description = "The maximum number of seconds before the HTTP request times out.";
default = 180;
};
afterBootTime = mkOption {
type = types.str;
description = "A systemd.timers timespan. This option corresponds to the OnBootSec field in the timerConfig.";
default = "5m";
};
every = mkOption {
type = types.str;
description = "A systemd.timers timespan. This option corresponds to the OnUnitActiveSec field in the timerConfig.";
default = "5m";
};
};
config = {
systemd.timers.deno-netlify-ddns-client = {
enable = mkIf cfg.enable true;
after = ["network.target"];
wantedBy = ["timers.target"];
timerConfig = {
OnBootSec = cfg.afterBootTime;
OnUnitActiveSec = cfg.every;
Unit = "deno-netlify-ddns-client.service";
};
};
systemd.services.deno-netlify-ddns-client = {
enable = mkIf cfg.enable true;
after = ["network.target"];
script = ''
set -eu
password="$(cat "${cfg.passwordFile}")"
${optionalString cfg.ipv4 ''
"${pkgs.curl}/bin/curl" -4 -s \
-vvv \
-X POST \
--max-time ${toString cfg.requestTimeout} \
-u "${cfg.username}:''${password}" \
-L "${cfg.endpoint}/v1/netlify-ddns/replace-all-relevant-user-dns-records" 2>&1 \
| "${pkgs.sd}/bin/sd" --fixed-strings "''${password}" "[REDACTED]" \
| "${pkgs.sd}/bin/sd" -f i "Authorization: .*" "Authorization: [REST OF LINE REDACTED]"
''}
${optionalString cfg.ipv6 ''
${pkgs.curl}/bin/curl -6 -s \
-vvv \
-X POST \
--max-time ${toString cfg.requestTimeout} \
-u "${cfg.username}:''${password}" \
-L "${cfg.endpoint}/v1/netlify-ddns/replace-all-relevant-user-dns-records" 2>&1 \
| "${pkgs.sd}/bin/sd" --fixed-strings "''${password}" "[REDACTED]" \
| "${pkgs.sd}/bin/sd" -f i "Authorization: .*" "Authorization: [REST OF LINE REDACTED]"
''}
'';
serviceConfig = {
Type = "oneshot";
User = "root";
};
};
};
}

View file

@ -1,19 +0,0 @@
{
imports = [
./sway.nix
# ./hyprland.nix
# ./plasma.nix
# ./gnome.nix
./fonts.nix
./user-installed-applications.nix
./kde-connect.nix
];
hardware = {
opengl = {
enable = true;
driSupport32Bit = true;
driSupport = true;
};
};
}

View file

@ -1,3 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [eww-wayland];
}

View file

@ -1,17 +0,0 @@
{...}: {
users.groups.flanfam = {};
users.users = {
flanfam = {
isNormalUser = true;
home = "/home/flanfam";
createHome = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
];
group = "flanfam";
extraGroups = ["users" "video"];
packages = [];
};
};
}

View file

@ -1,17 +0,0 @@
{...}: {
users.groups.flanfamkiosk = {};
users.users = {
flanfamkiosk = {
isNormalUser = true;
home = "/home/flanfamkiosk";
createHome = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
];
group = "flanfamkiosk";
extraGroups = ["users" "video"];
packages = [];
};
};
}

View file

@ -1,7 +0,0 @@
{pkgs, ...}: {
# fonts.packages if unstable?
fonts.packages = with pkgs; [
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
pkgs.iosevka-lyteterm
];
}

View file

@ -5,10 +5,16 @@
}: { }: {
imports = [./pipewire.nix]; imports = [./pipewire.nix];
# mkForce is used liberally to take precedence over KDE Plasma
# so I can have both "usable" at once
services.xserver.enable = lib.mkDefault true; services.xserver.enable = lib.mkDefault true;
services.xserver.displayManager.gdm = { services.xserver.displayManager.gdm = {
enable = lib.mkDefault true; enable = lib.mkForce true; # take precedence over KDE's SDDM
}; };
services.displayManager.execCmd = lib.mkForce "exec ${pkgs.gnome.gdm}/bin/gdm";
services.displayManager.defaultSession = lib.mkForce "gnome";
programs.ssh.askPassword = "${pkgs.gnome.seahorse}/libexec/seahorse/ssh-askpass";
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
@ -22,12 +28,6 @@
''; '';
}; };
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "gnome3";
enableSSHSupport = true;
};
xdg.portal = { xdg.portal = {
enable = true; enable = true;
}; };
@ -40,7 +40,6 @@
environment = { environment = {
variables = { variables = {
GTK_THEME = "Catppuccin-Mocha-Compact-Sapphire-Dark";
VISUAL = "hx"; VISUAL = "hx";
PAGER = "less"; PAGER = "less";
MANPAGER = "less"; MANPAGER = "less";
@ -50,36 +49,35 @@
gnome.gnome-power-manager gnome.gnome-power-manager
brightnessctl brightnessctl
feh feh
# gimp
grim grim
# inkscape
# krita
libinput libinput
libinput-gestures libinput-gestures
libnotify libnotify
# lutris
# nil
# nixpkgs-fmt
noto-fonts noto-fonts
pamixer pamixer
# pavucontrol
playerctl playerctl
# pulseaudio
pulsemixer pulsemixer
# rclone
# restic
slurp slurp
# steam
swaybg swaybg
swayidle swayidle
swaylock swaylock
# vlc
# vulkan-tools
waybar waybar
# weechat
# wine
wl-clipboard wl-clipboard
zathura zathura
/*
gimp
inkscape
krita
pavucontrol
pulseaudio
rclone
restic
steam
vlc
vulkan-tools
weechat
wine
*/
]; ];
}; };
} }

View file

@ -1,8 +0,0 @@
{pkgs, ...}: {
imports = [
./ewwbar.nix
./pipewire.nix
];
programs.hyprland.enable = true;
environment.systemPackages = with pkgs; [hyprpaper];
}

View file

@ -1,25 +0,0 @@
{
lib,
config,
pkgs,
...
}: {
nixpkgs.config = {
packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
};
};
hardware = {
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
opengl = {
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
vaapiVdpau
libvdpau-va-gl
];
};
};
}

View file

@ -1,20 +0,0 @@
{
programs.kdeconnect = {
enable = true;
};
networking.firewall = {
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
}
];
allowedUDPPortRanges = [
{
from = 1714;
to = 1764;
}
];
};
}

View file

@ -1,58 +0,0 @@
{
pkgs,
lib,
...
}: {
imports = [./pipewire.nix];
# qt.platformTheme = "gnome";
services.xserver.displayManager.defaultSession = "plasmawayland";
services.xserver.enable = lib.mkDefault true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
hardware.pulseaudio.enable = false;
qt = {
enable = true;
# platformTheme = "gnome";
# style = "adwaita-dark";
};
programs.dconf.enable = true;
services.dbus.enable = true;
environment = {
variables = {
GTK_THEME = "Catppuccin-Mocha-Compact-Sapphire-Dark";
VISUAL = "hx";
PAGER = "less";
MANPAGER = "less";
};
systemPackages = with pkgs; [
inkscape
krita
noto-fonts
vlc
wl-clipboard
libsForQt5.kate
libsForQt5.kdenlive
libsForQt5.merkuro
libsForQt5.kcalc
libsForQt5.neochat
libsForQt5.filelight
libsForQt5.krdc
libsForQt5.krfb
libsForQt5.kclock
libsForQt5.kweather
libsForQt5.ktorrent
libsForQt5.kdevelop
libsForQt5.kdialog
libsForQt5.kdeplasma-addons
];
};
}

View file

@ -1,14 +0,0 @@
{pkgs, ...}: {
environment = {
systemPackages = with pkgs; [
(
lutris.override {
extraPkgs = pkgs: [
# List package dependencies here
wineWowPackages.waylandFull
];
}
)
];
};
}

View file

@ -1,16 +0,0 @@
{inputs, ...}: {
imports = [
{nixpkgs.overlays = [inputs.ssbm.overlay];}
inputs.ssbm.nixosModules.default
];
ssbm = {
cache.enable = true;
# overlay.enable = true;
gcc = {
rules.enable = true;
oc-kmod.enable = true;
};
};
}

View file

@ -1,16 +0,0 @@
{...}: {
environment.etc = {
"pipewire/pipewire.conf.d/92-low-latency.conf".text = ''
context.properties = {
default.clock.rate = 48000
default.clock.quantum = 128
default.clock.min-quantum = 128
default.clock.max-quantum = 128
}
jack.properties = {
node.latency = 128/48000
}
'';
};
}

View file

@ -1,29 +0,0 @@
{...}: {
sound.enable = true;
services.pipewire = {
enable = true;
wireplumber.enable = true;
pulse.enable = true;
jack.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
};
hardware = {
pulseaudio = {
enable = false;
support32Bit = true;
};
};
security = {
# I forget why I need these exactly...
polkit.enable = true;
rtkit.enable = true;
};
}

View file

@ -1,5 +0,0 @@
{...}: {
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
}

View file

@ -1,23 +0,0 @@
{pkgs, ...}: {
environment = {
systemPackages = with pkgs; [
podman-compose
];
};
virtualisation = {
podman = {
enable = true;
# Create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
};
oci-containers = {
backend = "podman";
};
};
}

View file

@ -1,39 +0,0 @@
{pkgs, ...}: {
# this is really just for development usage
services.postgresql = {
enable = true;
ensureDatabases = ["daniel"];
ensureUsers = [
{
name = "daniel";
ensureDBOwnership = true;
}
];
enableTCPIP = true;
package = pkgs.postgresql_15;
authentication = pkgs.lib.mkOverride 10 ''
#type database DBuser auth-method
local all postgres peer map=superuser_map
local all daniel peer map=superuser_map
local sameuser all peer map=superuser_map
# lan ipv4
host all all 10.0.0.0/24 trust
host all all 127.0.0.1/32 trust
# tailnet ipv4
host all all 100.64.0.0/10 trust
'';
identMap = ''
# ArbitraryMapName systemUser DBUser
superuser_map root postgres
superuser_map postgres postgres
superuser_map daniel postgres
# Let other names login as themselves
superuser_map /^(.*)$ \1
'';
};
}

View file

@ -1,13 +0,0 @@
{pkgs, ...}: {
services.printing.enable = true;
services.printing.browsing = true;
services.printing.browsedConf = ''
BrowseDNSSDSubTypes _cups,_print
BrowseLocalProtocols all
BrowseRemoteProtocols all
CreateIPPPrinterQueues All
BrowseProtocols all
'';
services.printing.drivers = [pkgs.gutenprint];
}

View file

@ -1,86 +0,0 @@
{pkgs, ...}: {
imports = [
./pipewire.nix
];
# services.xserver.libinput.enable = true;
services.gnome.gnome-keyring.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
# settings = {
# pinentry-program = "/run/current-system/sw/bin/pinentry";
# };
};
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
];
};
services.dbus.enable = true;
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [thunar-archive-plugin thunar-volman];
};
services.gvfs = {
enable = true;
};
environment = {
variables = {
GTK_THEME = "Catppuccin-Mocha-Compact-Sapphire-Dark";
VISUAL = "hx";
PAGER = "less";
MANPAGER = "less";
};
systemPackages = with pkgs; [
brightnessctl
feh
# gimp
grim
# inkscape
# krita
libinput
libinput-gestures
libnotify
# lutris
# nil
# nixpkgs-fmt
noto-fonts
pamixer
# pavucontrol
playerctl
pulseaudio
pulsemixer
# rclone
# restic
slurp
# steam
swaybg
swayidle
swaylock
# vlc
# vulkan-tools
waybar
# weechat
# wine
wl-clipboard
zathura
];
};
}

View file

@ -1,14 +0,0 @@
{pkgs, ...}: {
# enable flatpaks
services.flatpak.enable = true;
# enable appimages
boot.binfmt.registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
recognitionType = "magic";
offset = 0;
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
magicOrExtension = ''\x7fELF....AI\x02'';
};
}

View file

@ -1,10 +0,0 @@
{lib, ...}: let
inherit (lib) mkDefault;
in {
networking.networkmanager.enable = mkDefault true;
systemd.services.NetworkManager-wait-online.enable = mkDefault false;
# TODO: networking.networkmanager.wifi.backend = "iwd"; ?
# TODO: powersave?
# TODO: can I pre-configure my usual wifi networks with SSIDs and PSKs loaded from secrets?
}

File diff suppressed because it is too large Load diff

137
nixos/bigtower.nix Normal file
View file

@ -0,0 +1,137 @@
{
pkgs,
lib,
config,
...
}: {
imports = [
{
system.stateVersion = "24.05";
home-manager.users.daniel.home.stateVersion = "24.05";
networking.hostName = "bigtower";
}
];
hardware.graphics.extraPackages = [
# pkgs.rocmPackages.clr.icd
pkgs.amdvlk
# encoding/decoding acceleration
pkgs.libvdpau-va-gl
pkgs.vaapiVdpau
];
boot = {
# kernelPackages = pkgs.linuxPackages_zen;
loader.efi.canTouchEfiVariables = true;
loader.systemd-boot.enable = true;
initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci" "usbhid"];
kernelModules = ["kvm-amd"];
supportedFilesystems = ["ntfs"];
};
hardware.bluetooth = {
enable = true;
# package = pkgs.bluez;
settings = {
General = {
AutoConnect = true;
MultiProfile = "multiple";
};
};
};
/*
networking = {
firewall = let
terraria = 7777;
stardew-valley = 24642;
web-dev-lan = 18888;
ports = [
terraria
stardew-valley
web-dev-lan
];
in {
allowedTCPPorts = ports;
allowedUDPPorts = ports;
};
};
*/
environment.systemPackages = with pkgs; [
radeontop
# godot_4
prismlauncher
];
home-manager.users.daniel = {
/*
slippi-launcher = {
enable = true;
# isoPath = "${config.home-manager.users.daniel.home.homeDirectory}/../games/roms/dolphin/melee.iso";
launchMeleeOnPlay = false;
};
*/
# TODO: monitor config module?
/*
wayland.windowManager.hyprland = {
settings = {
env = [
"EWW_BAR_MON,1"
];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
monitor = [
# "DP-2,3840x2160@60,-2160x0,1,transform,3"
"DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1"
## HDR breaks screenshare? "DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1,bitdepth,10"
## "desc:LG Display 0x0521,3840x2160@120,0x0,1"
## "desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,1"
"DP-2,3840x2160@60,0x0,1.5,transform,1"
];
input = {
force_no_accel = true;
sensitivity = 1; # -1.0 - 1.0, 0 means no modification.
};
};
};
wayland.windowManager.sway = {
config = {
output = {
"GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307" = {
mode = "3840x2160@120Hz";
position = "${toString (builtins.ceil (2160 / 1.5))},0";
};
"Dell Inc. DELL U2720Q D3TM623" = {
# desktop left vertical monitor
mode = "3840x2160@60Hz";
transform = "90";
scale = "1.5";
position = "0,0";
};
};
workspaceOutputAssign =
(
map
(ws: {
output = "GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307";
workspace = toString ws;
})
(lib.range 1 7)
)
++ (
map
(ws: {
output = "Dell Inc. DELL U2720Q D3TM623";
workspace = toString ws;
})
(lib.range 8 9)
);
};
};
*/
};
}

View file

@ -1,20 +0,0 @@
with builtins; (listToAttrs (map (name: {
name = name;
value = {
system = "x86_64-linux";
specialArgs = {
};
modules = [./${name}.nix];
};
}) [
"base"
"htpc"
"beefcake"
"dragon"
"foxtrot"
"musicbox"
"rascal"
"router"
"thablet"
"thinker"
]))

View file

@ -1,84 +1,138 @@
{ {
# config,
inputs,
outputs,
lib,
pkgs, pkgs,
lib,
config,
... ...
}: { }: {
networking.hostName = "dragon"; imports = [
# support interacting with the windows drive
boot.supportedFilesystems = ["ntfs"];
imports = with outputs.nixosModules; [
outputs.diskoConfigurations.standard
inputs.hardware.nixosModules.common-cpu-amd
inputs.hardware.nixosModules.common-pc-ssd
outputs.nixosModules.pipewire-low-latency
({
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.services.myservice;
in {
options.services.myservice = {
enable = mkEnableOption "Enables the api.lyte.dev service";
};
config = mkIf cfg.enable {
networking.hostName = "anything-to-test";
};
})
{ {
services.myservice.enable = true; system.stateVersion = "24.11";
home-manager.users.daniel.home.stateVersion = "24.05";
networking.hostName = "dragon";
} }
desktop-usage {
podman # sops secrets config
postgres sops = {
wifi defaultSopsFile = ../secrets/dragon/secrets.yml;
hyprland age = {
printing sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
ewwbar keyFile = "/var/lib/sops-nix/key.txt";
melee generateKey = true;
};
};
}
{
sops.secrets = {
ddns-pass = {mode = "0400";};
};
services.deno-netlify-ddns-client = {
passwordFile = config.sops.secrets.ddns-pass.path;
};
}
];
hardware.amdgpu = {
amdvlk = {
enable = true;
support32Bit = {
enable = true;
};
};
};
hardware.graphics.extraPackages = [
# pkgs.rocmPackages.clr.icd
pkgs.amdvlk
# encoding/decoding acceleration
pkgs.libvdpau-va-gl
pkgs.vaapiVdpau
]; ];
programs.steam.enable = true; boot = {
programs.steam.remotePlay.openFirewall = true; kernelPackages = pkgs.linuxPackages_latest;
loader.efi.canTouchEfiVariables = true;
loader.systemd-boot.enable = true;
initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci" "usbhid"];
kernelModules = ["kvm-amd"];
supportedFilesystems = ["ntfs"];
};
hardware.bluetooth = {
enable = true;
# package = pkgs.bluez;
settings = {
General = {
AutoConnect = true;
MultiProfile = "multiple";
};
};
};
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
# dragon firewall
# TODO: maybe should go in the gaming module?
networking = {
firewall = let
terraria = 7777;
stardew-valley = 24642;
web-dev-lan = 18888;
ports = [
terraria
stardew-valley
web-dev-lan
];
in {
allowedTCPPorts = ports;
allowedUDPPorts = ports;
};
};
environment.systemPackages = with pkgs; [
radeontop
godot_4
prismlauncher
];
home-manager.users.daniel = { home-manager.users.daniel = {
imports = with outputs.homeManagerModules; [ slippi-launcher = {
sway enable = true;
pass isoPath = "${config.home-manager.users.daniel.home.homeDirectory}/../games/roms/dolphin/melee.iso";
firefox-no-tabs launchMeleeOnPlay = false;
melee };
# hyprland
];
# ssbm = {
# slippi-launcher = {
# isoPath = "${config.home-manager.users.daniel.home.homeDirectory}/../games/roms/dolphin/melee.iso";
# };
# };
# TODO: monitor config module?
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
settings = { settings = {
env = [ exec-once = [
"EWW_BAR_MON,1" "eww open bar1"
]; ];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
monitor = [ monitor = [
"DP-3,3840x2160@120,0x0,1" # "DP-2,3840x2160@60,-2160x0,1,transform,3"
"DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1"
# TODO: HDR breaks screenshare?
/*
"DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1,bitdepth,10"
"desc:LG Display 0x0521,3840x2160@120,0x0,1"
"desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,1"
*/
"DP-1,3840x2160@60,0x0,1.5,transform,1"
]; ];
input = { input = {
force_no_accel = true; force_no_accel = true;
sensitivity = 1; # -1.0 - 1.0, 0 means no modification. sensitivity = 1; # -1.0 - 1.0, 0 means no modification.
}; };
workspace = [
"1, monitor:DP-3, default:true"
"2, monitor:DP-3, default:false"
"3, monitor:DP-3, default:false"
"4, monitor:DP-3, default:false"
"5, monitor:DP-3, default:false"
"6, monitor:DP-3, default:false"
"7, monitor:DP-3, default:false"
"8, monitor:DP-1, default:true"
"9, monitor:DP-1, default:false"
];
}; };
}; };
@ -93,7 +147,7 @@
"Dell Inc. DELL U2720Q D3TM623" = { "Dell Inc. DELL U2720Q D3TM623" = {
# desktop left vertical monitor # desktop left vertical monitor
mode = "3840x2160@60Hz"; mode = "3840x2160@60Hz";
transform = "90"; transform = "270";
scale = "1.5"; scale = "1.5";
position = "0,0"; position = "0,0";
}; };
@ -119,42 +173,4 @@
}; };
}; };
}; };
services.printing.enable = true;
# TODO: https://nixos.wiki/wiki/Remote_LUKS_Unlocking
# hardware
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci"];
boot.kernelModules = ["kvm-amd"];
hardware.bluetooth.enable = true;
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
environment = {
systemPackages = with pkgs; [
radeontop
];
};
networking = {
firewall = {
enable = true;
allowPing = true;
allowedTCPPorts = [22 7777];
allowedUDPPorts = [];
};
};
services.udev.packages = [
pkgs.platformio
pkgs.openocd
];
programs.adb.enable = true;
users.users.daniel.extraGroups = ["adbusers"];
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.11";
} }

View file

@ -0,0 +1,14 @@
{
"x86_64-linux": {
"headless": {
"stable": {
"name": "factorio_headless_x64-2.0.15.tar.xz",
"needsAuth": false,
"sha256": "cLRBy4B4EaYFhsARBySMHY164EO9HyNnX8kk+6qlONg=",
"tarDirectory": "x64",
"url": "https://factorio.com/get-download/2.0.15/headless/linux64",
"version": "2.0.15"
}
}
}
}

View file

@ -1,86 +1,321 @@
{ {pkgs, ...}:
api-lyte-dev, /*
inputs, ## source: https://community.frame.work/t/speakers-sound-quality/1078/82
outputs, let
pkgs, pipewire-speakers-profile-json = ''{
... "output": {
}: let "blocklist": [],
scale = 1.25; "equalizer": {
in { "balance": 0.0,
networking.hostName = "foxtrot"; "bypass": false,
"input-gain": 0.0,
imports = with outputs.nixosModules; [ "left": {
({ "band0": {
config, "frequency": 100.0,
pkgs, "gain": 0.0,
lib, "mode": "RLC (BT)",
... "mute": false,
}: "q": 1.0,
with lib; let "slope": "x4",
cfg = config.services.myservice; "solo": false,
in { "type": "Hi-pass"
options.services.myservice = { },
enable = mkEnableOption "Enables the api.lyte.dev service"; "band1": {
}; "frequency": 150.0,
"gain": 4.02,
config = "mode": "RLC (BT)",
mkIf cfg.enable { "mute": false,
}; "q": 3.0,
}) "slope": "x1",
{ "solo": false,
services.myservice.enable = true; "type": "Bell"
},
"band2": {
"frequency": 600.0,
"gain": -5.07,
"mode": "RLC (BT)",
"mute": false,
"q": 4.000000000000008,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band3": {
"frequency": 1200.0,
"gain": -3.49,
"mode": "RLC (BT)",
"mute": false,
"q": 4.17,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band4": {
"frequency": 2000.0,
"gain": 1.43,
"mode": "RLC (BT)",
"mute": false,
"q": 4.0,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band5": {
"frequency": 5300.0,
"gain": 3.84,
"mode": "RLC (BT)",
"mute": false,
"q": 2.64,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band6": {
"frequency": 6000.0,
"gain": 4.02,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Hi-shelf"
},
"band7": {
"frequency": 7500.0,
"gain": -2.09,
"mode": "RLC (BT)",
"mute": false,
"q": 3.0,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band8": {
"frequency": 8000.0,
"gain": 2.01,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band9": {
"frequency": 900.0,
"gain": -4.12,
"mode": "RLC (BT)",
"mute": false,
"q": 5.909999999999967,
"slope": "x1",
"solo": false,
"type": "Bell"
}
},
"mode": "IIR",
"num-bands": 10,
"output-gain": -1.5,
"pitch-left": 0.0,
"pitch-right": 0.0,
"right": {
"band0": {
"frequency": 100.0,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 1.0,
"slope": "x4",
"solo": false,
"type": "Hi-pass"
},
"band1": {
"frequency": 150.0,
"gain": 4.02,
"mode": "RLC (BT)",
"mute": false,
"q": 3.0,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band2": {
"frequency": 600.0,
"gain": -5.07,
"mode": "RLC (BT)",
"mute": false,
"q": 4.000000000000008,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band3": {
"frequency": 1200.0,
"gain": -3.49,
"mode": "RLC (BT)",
"mute": false,
"q": 4.17,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band4": {
"frequency": 2000.0,
"gain": 1.43,
"mode": "RLC (BT)",
"mute": false,
"q": 4.0,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band5": {
"frequency": 5300.0,
"gain": 3.84,
"mode": "RLC (BT)",
"mute": false,
"q": 2.64,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band6": {
"frequency": 6000.0,
"gain": 4.02,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Hi-shelf"
},
"band7": {
"frequency": 7500.0,
"gain": -2.09,
"mode": "RLC (BT)",
"mute": false,
"q": 3.0,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band8": {
"frequency": 8000.0,
"gain": 2.01,
"mode": "RLC (BT)",
"mute": false,
"q": 4.36,
"slope": "x1",
"solo": false,
"type": "Bell"
},
"band9": {
"frequency": 900.0,
"gain": -4.12,
"mode": "RLC (BT)",
"mute": false,
"q": 5.909999999999967,
"slope": "x1",
"solo": false,
"type": "Bell"
}
},
"split-channels": false
},
"loudness": {
"bypass": false,
"clipping": false,
"clipping-range": 6.0,
"fft": "4096",
"input-gain": 0.0,
"output-gain": 0.0,
"std": "ISO226-2003",
"volume": 6.999999999999991
},
"plugins_order": [
"loudness",
"equalizer"
]
}
}'';
in
*/
{
imports = [
{
system.stateVersion = "24.05";
home-manager.users.daniel.home.stateVersion = "24.05";
networking.hostName = "foxtrot";
}
{
swapDevices = [
# TODO: move this to disko?
# NOTE(oninstall):
/*
sudo btrfs subvolume create /swap
sudo btrfs filesystem mkswapfile --size 32g --uuid clear /swap/swapfile
sudo swapon /swap/swapfile
*/
{device = "/swap/swapfile";}
];
# findmnt -no UUID -T /swap/swapfile
boot.resumeDevice = "/dev/disk/by-uuid/81c3354a-f629-4b6b-a249-7705aeb9f0d5";
# systemd.sleep.extraConfig = "HibernateDelaySec=180m";
services.fwupd.enable = true;
services.fwupd.extraRemotes = ["lvfs-testing"];
} }
outputs.diskoConfigurations.standard
inputs.hardware.nixosModules.framework-13-7040-amd
desktop-usage
# gnome
kde-plasma
podman
lutris
# postgres
wifi
# hyprland
]; ];
services.xserver.enable = true;
programs.steam.enable = true;
programs.steam.remotePlay.openFirewall = true;
environment = { environment = {
systemPackages = with pkgs; [ systemPackages = with pkgs; [
spotify easyeffects
discord
slack
godot_4 godot_4
fractal fractal
prismlauncher prismlauncher
variety # wallpaper switcher that I use with GNOME upower
acpi
prismlauncher
radeontop radeontop
sops sops
obs-studio xh
]; ];
}; };
home-manager.users.daniel = { home-manager.users.daniel = {
imports = with outputs.homeManagerModules; [
sway
pass
firefox-no-tabs
wallpaper-manager
# hyprland
];
home = { home = {
stateVersion = "24.05"; pointerCursor = {
size = 40;
};
};
services.easyeffects = {
enable = true;
preset = "philonmetal";
# clone from https://github.com/ceiphr/ee-framework-presets
# then `cp *.json ~/.config/easyeffects/output`
# TODO: nixify this
};
services.hypridle = let
secondsPerMinute = 60;
lockSeconds = 10 * secondsPerMinute;
in {
settings = {
listener = [
{
timeout = lockSeconds + 55;
on-timeout = ''systemctl suspend'';
}
];
};
}; };
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
settings = { settings = {
exec-once = [
"eww open bar0"
];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
monitor = [ monitor = [
"eDP-1,2256x1504@60,0x0,${toString scale}" "eDP-1,2880x1920@120Hz,0x0,1.66667"
]; ];
}; };
}; };
@ -88,6 +323,19 @@ in {
wayland.windowManager.sway = { wayland.windowManager.sway = {
config = { config = {
output = { output = {
"BOE NE135A1M-NY1 Unknown" = {
mode = "2880x1920@120Hz";
position = "1092,2160";
scale = toString (5 / 3);
};
"Dell Inc. DELL U2720Q CWTM623" = {
mode = "3840x2160@60Hz";
position = "0,0";
scale = toString 1.25;
};
/*
"BOE 0x0BCA Unknown" = { "BOE 0x0BCA Unknown" = {
mode = "2256x1504@60Hz"; mode = "2256x1504@60Hz";
position = "0,0"; position = "0,0";
@ -101,92 +349,13 @@ in {
# scale = "1.5"; # scale = "1.5";
position = "${toString (builtins.floor (2256 / scale))},0"; position = "${toString (builtins.floor (2256 / scale))},0";
}; };
*/
}; };
}; };
}; };
}; };
services.upower.enable = true; hardware.graphics.extraPackages = [
# use updated ppd for framework 13:
# source: https://community.frame.work/t/tracking-ppd-v-tlp-for-amd-ryzen-7040/39423/137?u=lytedev
nixpkgs.overlays = [
(
final: prev: {
power-profiles-daemon = prev.power-profiles-daemon.overrideAttrs (
old: {
version = "0.13-1";
patches =
(old.patches or [])
++ [
(prev.fetchpatch {
url = "https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/127.patch";
sha256 = "sha256-jnq5yJvWQHOlZ78SE/4/HqiQfF25YHQH/T4wwDVRHR0=";
})
(prev.fetchpatch {
url = "https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/128.patch";
sha256 = "sha256-YD9wn9IQlCp02r4lmwRnx9Eur2VVP1JfC/Bm8hlzF3Q=";
})
(prev.fetchpatch {
url = "https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/129.patch";
sha256 = "sha256-9T+I3BAUW3u4LldF85ctE0/PLu9u+KBN4maoL653WJU=";
})
];
# explicitly fetching the source to make sure we're patching over 0.13 (this isn't strictly needed):
src = prev.fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "hadess";
repo = "power-profiles-daemon";
rev = "0.13";
sha256 = "sha256-ErHy+shxZQ/aCryGhovmJ6KmAMt9OZeQGDbHIkC0vUE=";
};
}
);
}
)
];
swapDevices = [
# TODO: move this to disko?
# NOTE(oninstall):
# sudo btrfs subvolume create /swap
# sudo btrfs filesystem mkswapfile --size 32g --uuid clear /swap/swapfile
# sudo swapon /swap/swapfile
{device = "/swap/swapfile";}
];
# findmnt -no UUID -T /swap/swapfile
boot.resumeDevice = "/dev/disk/by-uuid/81c3354a-f629-4b6b-a249-7705aeb9f0d5";
services.logind = {
lidSwitch = "suspend-then-hibernate";
# HandleLidSwitchDocked=ignore
extraConfig = ''
HandlePowerKey=suspend-then-hibernate
IdleActionSec=10m
IdleAction=suspend-then-hibernate
'';
};
systemd.sleep.extraConfig = "HibernateDelaySec=30m";
services.fwupd.enable = true;
# source: https://github.com/NixOS/nixos-hardware/tree/master/framework/13-inch/7040-amd#getting-the-fingerprint-sensor-to-work
# we need fwupd 1.9.7 to downgrade the fingerprint sensor firmware
# services.fwupd.package =
# (import (builtins.fetchTarball {
# url = "https://github.com/NixOS/nixpkgs/archive/bb2009ca185d97813e75736c2b8d1d8bb81bde05.tar.gz";
# sha256 = "sha256:003qcrsq5g5lggfrpq31gcvj82lb065xvr7bpfa8ddsw8x4dnysk";
# }) {
# inherit (pkgs) system;
# })
# .fwupd;
services.fwupd.extraRemotes = ["lvfs-testing"];
hardware.opengl.extraPackages = [
# pkgs.rocmPackages.clr.icd # pkgs.rocmPackages.clr.icd
pkgs.amdvlk pkgs.amdvlk
@ -195,12 +364,34 @@ in {
pkgs.vaapiVdpau pkgs.vaapiVdpau
]; ];
hardware.wirelessRegulatoryDatabase = true; hardware.amdgpu = {
amdvlk = {
enable = true;
support32Bit = {
enable = true;
};
};
};
networking.networkmanager.wifi.powersave = false;
hardware.framework.amd-7040.preventWakeOnAC = true; hardware.framework.amd-7040.preventWakeOnAC = true;
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; # kernelPackages = pkgs.linuxPackages_latest;
# https://github.com/void-linux/void-packages/issues/50417#issuecomment-2131802836 fix framework 13 not shutting down
/*
kernelPatches = [
{
name = "framework13shutdownfix";
patch = builtins.fetchurl {
url = "https://github.com/void-linux/void-packages/files/15445612/0001-Add-hopefully-a-solution-for-shutdown-regression.PATCH";
sha256 = "sha256:10zcnzy5hkam2cnxx441b978gzhvnqlcc49k7bpz9dc28xyjik50";
};
}
];
*/
loader = { loader = {
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
@ -208,11 +399,12 @@ in {
}; };
# NOTE(oninstall): # NOTE(oninstall):
# sudo filefrag -v /swap/swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}' /*
# the above won't work for btrfs, instead you need sudo filefrag -v /swap/swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}'
# btrfs inspect-internal map-swapfile -r /swap/swapfile the above won't work for btrfs, instead you need btrfs inspect-internal map-swapfile -r /swap/swapfile
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
# many of these come from https://wiki.archlinux.org/title/Framework_Laptop_13#Suspend many of these come from https://wiki.archlinux.org/title/Framework_Laptop_13#Suspend
*/
kernelParams = [ kernelParams = [
"rtc_cmos.use_acpi_alarm=1" "rtc_cmos.use_acpi_alarm=1"
"amdgpu.sg_display=0" "amdgpu.sg_display=0"
@ -225,46 +417,84 @@ in {
]; ];
initrd.availableKernelModules = ["xhci_pci" "nvme" "thunderbolt"]; initrd.availableKernelModules = ["xhci_pci" "nvme" "thunderbolt"];
kernelModules = ["kvm-amd"]; kernelModules = ["kvm-amd"];
extraModprobeConfig = ''
options cfg80211 ieee80211_regdom="US"
'';
}; };
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
# TODO: when resuming from hibernation, it would be nice if this would # TODO: when resuming from hibernation, it would be nice if this would
# simply resume the power state at the time of hibernation # simply resume the power state at the time of hibernation
powerOnBoot = false; powerOnBoot = false;
package = pkgs.bluez.overrideAttrs (finalAttrs: previousAttrs: rec {
version = "5.78";
src = pkgs.fetchurl {
url = "mirror://kernel/linux/bluetooth/bluez-${version}.tar.xz";
sha256 = "sha256-gw/tGRXF03W43g9eb0X83qDcxf9f+z0x227Q8A1zxeM=";
};
patches = [];
buildInputs =
previousAttrs.buildInputs
++ [
pkgs.python3Packages.pygments
];
});
}; };
powerManagement.cpuFreqGovernor = "ondemand"; powerManagement.cpuFreqGovernor = "ondemand";
/*
powerManagement.resumeCommands = ''
modprobe -rv mt7921e
modprobe -v mt7921e
'';
*/
services.power-profiles-daemon = { services.power-profiles-daemon = {
enable = true; enable = true;
}; };
services.fprintd = { services.fprintd = {
enable = true; enable = false;
# tod.enable = true; package = pkgs.fprintd.overrideAttrs {
# tod.driver = pkgs.libfprint-2-tod1-goodix; # Source: https://github.com/NixOS/nixpkgs/commit/87ca2dc071581aea0e691c730d6844f1beb07c9f
mesonCheckFlags = [
# PAM related checks are timing out
"--no-suite"
"fprintd:TestPamFprintd"
];
};
}; };
# services.tlp = { /*
# enable = true; services.tlp = {
# settings = { enable = true;
# CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; settings = {
# CPU_SCALING_GOVERNOR_ON_BAT = "ondemand"; CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
# CPU_MIN_PERF_ON_BAT = 0; CPU_SCALING_GOVERNOR_ON_BAT = "ondemand";
# CPU_MAX_PERF_ON_BAT = 80; CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 80;
# CPU_SCALING_GOVERNOR_ON_AC = "performance"; CPU_SCALING_GOVERNOR_ON_AC = "performance";
# CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
# CPU_MIN_PERF_ON_AC = 0; CPU_MIN_PERF_ON_AC = 0;
# CPU_MAX_PERF_ON_AC = 100; CPU_MAX_PERF_ON_AC = 100;
# }; };
# }; };
*/
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = let
stardewValley = 24642;
factorio = 34197;
in [
8000 # dev stuff 8000 # dev stuff
factorio
stardewValley
7777
];
networking.firewall.allowedUDPPorts = let
stardewValley = 24642;
factorio = 34197;
in [
8000 # dev stuff
factorio
stardewValley
7777
]; ];
system.stateVersion = "24.05";
} }

View file

@ -1,147 +1,44 @@
{ {
pkgs, pkgs,
config,
lib, lib,
inputs,
outputs,
modulesPath,
... ...
}: { }: {
nixpkgs.hostPlatform = "x86_64-linux";
networking.hostName = "htpc"; networking.hostName = "htpc";
imports = with outputs.nixosModules; [
(modulesPath + "/installer/scan/not-detected.nix")
inputs.hardware.nixosModules.raspberry-pi-4
# inputs.hardware.nixosModules.common-cpu-intel-kaby-lake
# inputs.hardware.nixosModules.common-pc-ssd
# inputs.hardware.nixosModules.common-pc
desktop-usage
gnome
wifi
flanfam
flanfamkiosk
];
hardware = {
raspberry-pi."4".apply-overlays-dtmerge.enable = true;
deviceTree = {
enable = true;
filter = "*rpi-4-*.dtb";
};
};
console.enable = false;
services.gnome.gnome-remote-desktop.enable = true;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
home-manager.users.daniel = { boot.loader.grub.enable = true;
imports = with outputs.homeManagerModules; [linux-desktop];
};
environment.systemPackages = with pkgs;
#with pkgs;
[
libcec
variety
libraspberrypi
raspberrypi-eeprom
];
programs.steam.enable = true;
programs.steam.remotePlay.openFirewall = true;
services.xserver = {
enable = true;
displayManager = {
# lightdm.enable = true;
autoLogin.enable = true;
autoLogin.user = "daniel";
};
desktopManager.gnome.enable = true;
videoDrivers = ["fbdev"];
};
hardware.raspberry-pi."4".fkms-3d.enable = true;
hardware.raspberry-pi."4".audio.enable = true;
nixpkgs.overlays = [
# nixos-22.05
# (self: super: { libcec = super.libcec.override { inherit (self) libraspberrypi; }; })
# nixos-22.11
(self: super: {libcec = super.libcec.override {withLibraspberrypi = true;};})
];
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
# hardware
systemd.targets.sleep.enable = false;
systemd.targets.suspend.enable = false;
systemd.targets.hibernate.enable = false;
systemd.targets.hybrid-sleep.enable = false;
powerManagement.enable = false;
# boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda"; boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = ["8821au" "8812au"];
boot.kernelModules = [ boot.kernelModules = ["kvm-intel"];
# "kvm-intel" boot.extraModulePackages = [
# pkgs.rtl8811au
config.boot.kernelPackages.rtl8812au
config.boot.kernelPackages.rtl8821au
]; ];
boot.extraModulePackages = [];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/0f4e5814-0002-43f0-bfab-8368e3fe5b8a"; device = "/dev/disk/by-uuid/86d8ded0-1c6f-4a79-901c-2d59c11b5ca8";
fsType = "ext4"; fsType = "ext4";
}; };
networking = { swapDevices = [];
# useDHCP = true;
firewall = { hardware.bluetooth = {
enable = true; enable = true;
allowPing = true; # package = pkgs.bluez;
allowedTCPPorts = [22 5900]; settings = {
allowedUDPPorts = [5900]; General = {
AutoConnect = true;
MultiProfile = "multiple";
};
}; };
}; };
services.udev.extraRules = '' nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
# allow access to raspi cec device for video group (and optionally register it as a systemd device, used below) hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
SUBSYSTEM=="vchiq", GROUP="video", MODE="0660", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/vchiq"
'';
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# optional: attach a persisted cec-client to `/run/cec.fifo`, to avoid the CEC ~1s startup delay per command
# scan for devices: `echo 'scan' &gt; /run/cec.fifo ; journalctl -u cec-client.service`
# set pi as active source: `echo 'as' &gt; /run/cec.fifo`
systemd.sockets."cec-client" = {
after = ["dev-vchiq.device"];
bindsTo = ["dev-vchiq.device"];
wantedBy = ["sockets.target"];
socketConfig = {
ListenFIFO = "/run/cec.fifo";
SocketGroup = "video";
SocketMode = "0660";
};
};
systemd.services."cec-client" = {
after = ["dev-vchiq.device"];
bindsTo = ["dev-vchiq.device"];
wantedBy = ["multi-user.target"];
serviceConfig = {
ExecStart = ''${pkgs.libcec}/bin/cec-client -d 1'';
ExecStop = ''/bin/sh -c "echo q &gt; /run/cec.fifo"'';
StandardInput = "socket";
StandardOutput = "journal";
Restart = "no";
};
};
system.stateVersion = "23.11";
} }

144
nixos/htpifour.nix Normal file
View file

@ -0,0 +1,144 @@
{
pkgs,
lib,
hardware,
outputs,
modulesPath,
...
}: {
nixpkgs.hostPlatform = "aarch64-linux";
networking.hostName = "htpifour";
imports = with outputs.nixosModules; [
(modulesPath + "/installer/scan/not-detected.nix")
hardware.nixosModules.raspberry-pi-4
outputs.diskoConfigurations.unencrypted
desktop-usage
# gnome
kde-plasma
wifi
flanfam
flanfamkiosk
];
hardware = {
raspberry-pi."4".apply-overlays-dtmerge.enable = true;
deviceTree = {
enable = true;
filter = "*rpi-4-*.dtb";
};
};
console.enable = false;
home-manager.users.daniel = {
imports = with outputs.homeManagerModules; [linux-desktop wallpaper-manager];
};
environment.systemPackages = with pkgs;
#with pkgs;
[
# libcec
libraspberrypi
raspberrypi-eeprom
];
programs.steam.enable = true;
programs.steam.remotePlay.openFirewall = true;
services.xserver = {
displayManager = {
# lightdm.enable = true;
autoLogin.enable = true;
autoLogin.user = "daniel";
};
# videoDrivers = ["fbdev"];
};
hardware.raspberry-pi."4".fkms-3d.enable = true;
hardware.raspberry-pi."4".audio.enable = true;
nixpkgs.overlays = [
/*
nixos-22.05
(self: super: { libcec = super.libcec.override { inherit (self) libraspberrypi; }; })
nixos-22.11
(self: super: {libcec = super.libcec.override {withLibraspberrypi = true;};})
*/
];
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
/*
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
*/
# hardware
systemd.targets.sleep.enable = false;
systemd.targets.suspend.enable = false;
systemd.targets.hibernate.enable = false;
systemd.targets.hybrid-sleep.enable = false;
powerManagement.enable = false;
boot = {
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
initrd.availableKernelModules = ["xhci_pci" "usbhid" "usb_storage"];
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
};
networking = {
networkmanager.enable = true;
# useDHCP = true;
firewall = {
enable = true;
allowPing = true;
allowedTCPPorts = [
22 # ssh
];
allowedUDPPorts = [];
};
};
/*
services.udev.extraRules = ''
# allow access to raspi cec device for video group (and optionally register it as a systemd device, used below)
SUBSYSTEM=="vchiq", GROUP="video", MODE="0660", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/vchiq"
'';
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
optional: attach a persisted cec-client to `/run/cec.fifo`, to avoid the CEC ~1s startup delay per command
scan for devices: `echo 'scan' &gt; /run/cec.fifo ; journalctl -u cec-client.service`
set pi as active source: `echo 'as' &gt; /run/cec.fifo`
systemd.sockets."cec-client" = {
after = ["dev-vchiq.device"];
bindsTo = ["dev-vchiq.device"];
wantedBy = ["sockets.target"];
socketConfig = {
ListenFIFO = "/run/cec.fifo";
SocketGroup = "video";
SocketMode = "0660";
};
};
systemd.services."cec-client" = {
after = ["dev-vchiq.device"];
bindsTo = ["dev-vchiq.device"];
wantedBy = ["multi-user.target"];
serviceConfig = {
ExecStart = ''${pkgs.libcec}/bin/cec-client -d 1'';
ExecStop = ''/bin/sh -c "echo q &gt; /run/cec.fifo"'';
StandardInput = "socket";
StandardOutput = "journal";
Restart = "no";
};
};
*/
hardware.graphics.driSupport32Bit = lib.mkForce false;
system.stateVersion = "24.05";
}

View file

@ -1,22 +0,0 @@
{
outputs,
# lib,
# config,
# pkgs,
...
}: {
networking.hostName = "musicbox";
imports = with outputs.nixosModules; [
outputs.diskoConfigurations.unencrypted
desktop-usage
wifi
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
hardware.bluetooth.enable = true;
networking.networkmanager.enable = true;
system.stateVersion = "23.05";
}

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