Commit Graph

2631 Commits

Author SHA1 Message Date
Donovan Glover
39cdc4972e
meta(dual-function-keys): Improve readability
Adds a few variables to make things easier to reason about.
2024-04-02 17:19:07 -04:00
Donovan Glover
0f7c8678d9
chore(nix): Use string over float
Fixes an issue where Nix was unhappy with floats being inside strings.
2024-04-02 17:17:23 -04:00
Donovan Glover
42bcd16f65
meta(nix): Replace inline YAML with builtins.toJSON 2024-04-02 16:31:23 -04:00
Donovan Glover
fa98ead7ea
meta(hyprland): Drop stylix-specific values
Makes it possible to use the hyprland config without stylix.
2024-04-02 16:00:05 -04:00
Donovan Glover
dfcdd78291
meta(hyprland): Configure with Nix
This change lets us take advantage of hyprland's auto-reloading
functionality and lets us use the color scheme generated from stylix.
2024-04-02 15:49:34 -04:00
Donovan Glover
a4bdf7a076
chore(nix): Prefer builtins.toJSON where possible 2024-04-02 14:46:28 -04:00
Donovan Glover
6dde83cea9
fish(nix-collect-garbage): Delete user garbage as well
Fixes an issue where user-specific stuff never got cleaned up from the
nix store.
2024-04-02 14:34:48 -04:00
Donovan Glover
95b10ec3ef
meta: Begin writing tests in Nix
Now that I've figured out how to dynamically import modules and use
those modules as outputs, the next step is to ensure that these modules
work as intended when being used by end users.

NixOS offers a built-in testing solution that enables us to conveniently
spin up virtual machines with a given configuration, then verify their
correctness through python scripting.

The lib.nix file in particular is based on Jörg Thalheim's very useful
blog post that explains how to use the built-in testing functionality
with Nix flakes, which isn't covered in official documentation.

See: https://blog.thalheim.io/2023/01/08/how-to-use-nixos-testing-framework-with-flakes/
2024-04-02 05:20:42 -04:00
Donovan Glover
1d165d3068
neovim: Add syntax highlighting for glsl
Note that it may be easier to use treesitter highlighting by default.
2024-04-01 19:45:22 -04:00
Donovan Glover
35b677c46d
dual-function-keys: Change KEY_GRAVE to right alt
Should avoid conflicts where tapping the shift key in succession is
necessary.
2024-04-01 19:43:42 -04:00
Donovan Glover
d21ae69f39
chore: Fix formatting 2024-04-01 18:47:33 -04:00
Donovan Glover
c33ff6bd5e
feat(neovim): Add rainbow-delimiters.nvim
Rainbow parentheses were traditionally buggy with the plugins I used but
nowadays there are newer plugins available that use more flexible
technologies like treesitter.

See: https://github.com/hiphish/rainbow-delimiters.nvim
2024-04-01 15:04:33 -04:00
Donovan Glover
e2e9dde418
hyprland: Add activate linux toggle
Useful when wanting to have a little fun with screenshots. Seems to
affect performance of fullscreen applications since those receive some
sort of priority when there are no other visible layers on the screen.
2024-04-01 11:51:49 -04:00
Donovan Glover
1558b77796
feat(flake.nix): Separate outputs logic from variables
Reduces complexity and makes things easier to reason about.
2024-04-01 11:48:12 -04:00
Donovan Glover
dd6ab4cc97
chore(flake.nix): Prefer let-in over with
Should improve readability.
2024-04-01 11:15:10 -04:00
Donovan Glover
918f0dc44a
feat(flake.nix): Drastically simplify output generation
This makes it much easier to read the output expression.
2024-04-01 11:06:05 -04:00
Donovan Glover
dd171006b2
meta: Replace treefmt with flake formatter output
This makes the code base more portable by *only* depending on Nix as a
dependency.

Note that the code base hasn't been migrated to nixfmt-rfc-style yet.
2024-04-01 09:54:20 -04:00
Donovan Glover
ba6806a37a
ironbar: Prefer non-latin characters
Goes with the aesthetic.
2024-04-01 09:50:00 -04:00
Donovan Glover
a193c91cd6
meta: Drop deno tests
These shouldn't be needed anymore now that I know how to dynamically
import modules and declare attribute sets with the built-in nix
functions.
2024-04-01 09:31:51 -04:00
Donovan Glover
297a46d08e
meta: Drop default.nix
Having a default.nix doesn't *really* make sense now that we're dealing
with multiple nixosConfigurations, some of which might not even be in
the same flake.
2024-04-01 07:17:53 -04:00
Donovan Glover
9b4d9c8bf5
meta: Make specializations a nixosModule
Now it's possible to use the specializations in arbitrary configs. Note
that specializations do slow things down a bit so they may be disabled
by default in the future.
2024-04-01 06:27:08 -04:00
Donovan Glover
24c4badf39
meta: Make containers a nixosModule
Makes it easier to use the containers in other configs.
2024-04-01 06:24:52 -04:00
Donovan Glover
12464e8b65
chore: Improve formatting
No need to write stylix so many times.
2024-04-01 06:17:02 -04:00
Donovan Glover
bc44af4825
meta: Switch to upstream stylix
Fixes an issue where the base16-schemes overlay wasn't being applied
presumably due to the separate nixosModule usage.

This removes Qt theming support, so it may be better to simply overlay
base16-schemes inside the module instead.
2024-04-01 05:35:27 -04:00
Donovan Glover
f59b724b77
meta: Drop default hardware
From a pragmatic perspective this never made sense since it would be
unlikely that we'd ever want to import multiple hardware configurations
at the same time.

An alternative solution would be to let users generate their own
hardware-configuration.nix that they can use with this nix-config, or
simply have them create their own nix-config that imports this flake and
uses the outputs they want.
2024-04-01 04:33:47 -04:00
Donovan Glover
e4fb9d62a6
meta(nix): Automatically import all packages
This is now possible with the dynamic flake.nix outputs.
2024-04-01 04:25:44 -04:00
Donovan Glover
0c29329080
meta(flake.nix): Add working DRY output generation
The code for this is extremely messy right now however it works and I'd
rather not accidentally break it while refactoring, so this commit
serves as documenting the working code.
2024-04-01 04:13:49 -04:00
Donovan Glover
c421fe245f
feat(nix): Use single expression for module/overlay outputs
This makes the code much DRYer overall.
2024-03-31 22:22:29 -04:00
Donovan Glover
e84d3bbf02
feat(nix): Remove .nix from module outputs 2024-03-31 20:23:59 -04:00
Donovan Glover
44422516d4
feat(nix): Automatically import module outputs
This drastically simplifies things since we no longer have to worry
about adding and removing files from a default.nix.
2024-03-31 19:23:12 -04:00
Donovan Glover
d1513228d0
feat(nix): Don't hardcode package outputs
In order to determine the name of a package you want to include in your
own nix-config, simply copy the filename without the .nix part.
2024-03-31 18:58:28 -04:00
Donovan Glover
5674d3ed81
feat(nix): Automatically output all overlays
Now that I have more experience with nix, I know how to write an
expression that automatically outputs all the overlays in the
repository, as well as automatically import them inside the nixos
configuration.
2024-03-31 18:51:17 -04:00
Donovan Glover
da0b9b3ae6
meta(nix): Derive attribute values of outputs
This makes it possible to programmatically use all the outputs in a
flake without having to manually specify each one individually, useful
for having one main nix-config that can be used with other flakes and
system configurations.
2024-03-31 17:49:09 -04:00
Donovan Glover
71fe986e34
meta: Prefer self in default.nix
I originally wrote default.nix files to "import all files in a given
directory" however this turns out to not be necessary when flakifying a
configuration and defining all modules, overlays, and packages as
outputs.

Instead of making these "default.nix" files the source of truth for all
imports, it should be more useful to make the flake.nix the source of
truth and programmatically use attribute values as needed.
2024-03-31 17:28:12 -04:00
Donovan Glover
93caf691d3
chore(nix): Remove useless self
Not needed due to the 3 dots at the end.
2024-03-31 16:27:18 -04:00
Donovan Glover
94a43d1888
fonts: Fix fontconfig mono font
Might remove this later since stylix is used for the fonts instead.
2024-03-31 15:35:14 -04:00
Donovan Glover
18acfd0749
meta(flake.nix): Add overlays as outputs
Should make it easier for other repositories to use the overlays from
this repository.
2024-03-31 06:21:47 -04:00
Donovan Glover
efec942be0
hyprland(swww): Use seasonal backgrounds
It's that time of year again. This time spring style.
2024-03-30 18:41:11 -04:00
Donovan Glover
993179c4fd
ironbar: Cleanup launcher favorites
Removed a few less used applications.
2024-03-30 18:29:50 -04:00
Donovan Glover
9ee9d1c927
ironbar: Add new mullvad location
Should continue adding these as they come up.
2024-03-30 18:25:32 -04:00
Donovan Glover
23049a3e99
meta: Switch from joshuto to yazi
After almost a year of using joshuto, I have decided to switch to yazi.

The latest joshuto update broke my image preview configuration, and it
didn't make sense trying to figure out the issue with yazi already
having built-in image support and more.

Other notable improvements from this change include:

- Simplified configuration since defaults no longer have to be
  re-declared
- Faster directory loading, especially for /nix/store/ and symlinks to
  /nix/store/
- Text files are more likely to show previews without manual
  configuration
- Videos now have working previews again, similar to ranger
2024-03-30 18:20:01 -04:00
Donovan Glover
6cab0f25a5
chore: Update packages
Dropped GUI programs I no longer use and added qdirstat as a cool
alternative to windirstat.
2024-03-30 16:44:28 -04:00
Donovan Glover
491e0aca38
overlays(kitty): Patch wlroots copying bug
This fixes an issue where copying text would break until changing
workspaces and consequently windows.

This *was* fixed in 0.32.0 as a result of [1], however kitty 0.33.1 with
the recent fontconfig workaround patch[2] ends up showing CJK characters
with a very thin weight, causing them to be inconsistent relative to the
surrounding text and more difficult to read.

[1]: https://github.com/kovidgoyal/kitty/issues/6890
[2]: d2c21ee297
2024-03-30 15:12:40 -04:00
Donovan Glover
3374dde006
ironbar: Add overview button for hycov
Note that on_mouse_enter is used instead of on_click_left to avoid an
issue where the focus of hycov is lost after clicking on the bar.
2024-03-30 12:28:57 -04:00
Donovan Glover
251581d3a8
librewolf: Ensure warning on close when multiple tabs
Don't know when the default option for this was changed but it should
help prevent accidentally closing the browser.
2024-03-30 12:24:48 -04:00
Donovan Glover
93fae8e1f9
hyprland(hycov): Use hotarea_size 0 to persist mouse events
Fixes an issue where disabling the hot area would break mouse events
when interacting with the hycov overview.
2024-03-30 12:00:34 -04:00
Donovan Glover
a7d9cff7eb
hyprland(hycov): Prefer Super+Tab over Alt+Tab
Prevents applications like Librewolf from reacting to the Alt key being
pressed.
2024-03-30 11:32:00 -04:00
Donovan Glover
2e3d395eb3
packages: Update osu-backgrounds
Spring is in the air.
2024-03-30 11:31:13 -04:00
Donovan Glover
e236ab2dae
chore: Improve formatting 2024-03-30 11:30:33 -04:00
Donovan Glover
98e88cd6a7
tests: Improve internal docs 2024-03-30 08:33:53 -04:00