Commit Graph

170 Commits

Author SHA1 Message Date
Donovan Glover
e739239542
chore: Enable missing module options
Forgot to enable these earlier but now everything works.
2024-04-05 08:13:24 -04:00
Donovan Glover
721ead4572
chore: Inherit builtins where possible
Possibly makes things easier to read.
2024-04-04 17:56:01 -04:00
Donovan Glover
a1b9cf218d
meta: Begin migrating packages to workflow-specific modules
Long-term this should make it easy to include all the GUI programs with
the desktop module and all the CLI programs with the shell module, as
well as the ability to easily disable sets of unneeded packages.
2024-04-04 08:12:16 -04:00
Donovan Glover
3da9c62869
meta: Add options for networking module
Now it's possible to use the system without mullvad vpn.
2024-04-04 05:28:54 -04:00
Donovan Glover
a18125eaf9
meta: Use mkIf for hardware-specific config
Should make it easier to use this config without pulling in
the hardware-specific stuff.
2024-04-04 00:25:08 -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
d21ae69f39
chore: Fix formatting 2024-04-01 18:47:33 -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
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
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
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
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
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
c85d2d45ba
meta(flake.nix): Add packages as outputs
This makes it possible to easily use packages from this repository in
your own separate nix-config flake. This also makes it easier to test
packages locally since `nix build .#package` can be used instead of
building the entire system derivation.
2024-03-30 07:32:49 -04:00
Donovan Glover
f9905b0ea0
chore: Simplify formatting
This should make it easier to introduce more nixosConfigurations in the
future.
2024-03-08 21:25:57 -05:00
Donovan Glover
f7df16b6a1
chore: Update to latest nixos-unstable release 2024-03-05 19:17:23 -05:00
Donovan Glover
6d047a9567
chore: Update to latest nixos-unstable-small release
cargo-audit has been dropped to fix an issue with libgit2, which should
be fixed in 1-2 weeks or so. Additionally, nvim-base16 has been renamed
to base16-nvim, which is currently only recognized on -small.
2024-02-19 08:28:34 -05:00
Donovan Glover
e34d70c20b
chore: Switch back to nixos-unstable
I've been running this for a few days now and everything works as
expected.
2024-02-08 22:37:38 -05:00
Donovan Glover
78387cc5ac
meta: Switch back to nixos-unstable-small
nixos-unstable currently has the AMD GPU bug, which is fixed in
nixos-unstable-small.

See: https://nixpk.gs/pr-tracker.html?pr=284487
2024-01-30 18:07:27 -05:00
Donovan Glover
dd3bc13383
chore: Switch from nixos-unstable-small to nixos-unstable
nixos-unstable is now up to date.
2024-01-29 04:43:43 -05:00
Donovan Glover
80a1027d26
chore: Update to latest nixos-unstable-small release 2024-01-25 19:42:06 -05:00
Donovan Glover
b7a9416e35
feat: Theme Qt applications with stylix
Most Qt/KDE applications look way better after this.
2024-01-25 17:35:37 -05:00
Donovan Glover
c7f4111055
chore: Update to latest nixos-unstable release 2024-01-19 00:59:55 -05:00
Donovan Glover
01cfcc43d2
chore: Update to latest nixos-unstable-small release
Notably includes Hyprland v0.34.0 for testing.
2024-01-12 04:07:22 -05:00
Donovan Glover
6a050b4302
flake.nix: Switch back to nix-community/home-manager
The docs patch is now merged upstream.
2023-12-12 18:29:57 -05:00
Donovan Glover
ea6ef79862
home-manager: Use docs branch
Fixes an issue where home-manager would show optionsDocBook warnings on
every nixos-rebuild.
2023-12-07 19:11:10 -05:00
Donovan Glover
e977687af6
feat: Use upstream nixos-unstable branch
Since my changes are now upstreamed, I no longer need to use a personal
nixos-unstable branch. This makes it easier to use the source code of
the repository and simplifies the updating process.
2023-10-25 13:22:11 -04:00
Donovan Glover
c45221add7
flake.nix: Use new personal-unstable branch
This one is a lot simpler without all the merge commits in the history.

I should be able to eventually upstream the changes I made to
nixos-containers once I understand how to make those changes
configuration options.
2023-09-12 16:31:40 -04:00
Donovan Glover
abadce3a96
flake.nix: Use stylix from upstream
Although I originally wanted to make some cool pull requests for stylix,
it turns out that adding such features would be non-trivial due to the
lack of home-manager support. Since I implemented the functionality I
wanted in my own config already, there's no need to maintain a separate
stylix branch.
2023-08-31 15:55:50 -04:00
Donovan Glover
d61f4b16a5
flake.nix: Use home-manager from upstream
Although maintaining my own home-manager repository was a nice learning
exercise, I don't contribute to home-manager enough to warrant having a
personal branch.

Since my pqiv pull request was merged upstream, my branch is basically
the same as upstream anyway.
2023-08-31 15:52:47 -04:00
Donovan Glover
2b56eb75db
flake.nix: Add sakaya to inputs
This makes it possible to run wine applications inside systemd-nspawn
containers with minimal to no overhead.
2023-08-08 14:13:25 -04:00
Donovan Glover
9ed706c2a5
hyprland: Downgrade to v0.27.0
The white flash when starting hyprland is a deal breaker for me
personally and I'd rather not have to deal with it. Should hopefully be
fixed in a later release since it seems to be a wlroots issue.
2023-08-01 19:06:20 -04:00
Donovan Glover
d1a78a7a57
meta: Remove hyprbars
Although this was cute, there are simply too many bugs and other
inconveniences to be worth it. For example, the bar cannot be focused
when a workspace has a fullscreen application.
2023-08-01 19:04:43 -04:00
Donovan Glover
e3cf378b31
meta: Try hyprbars fork
This was my test of the hyprbars fork. It turns out that the original
version is more useful, although both versions crash whenever reloading
the plugin after unloading it once.
2023-08-01 18:54:26 -04:00
Donovan Glover
b84bad3806
meta: Add hyprbars
May or may not be useful for a more mouse-centric workflow.
2023-08-01 16:22:54 -04:00
Donovan Glover
ed11061d61
hyprland: Use latest commit
This was the only way I could get plugins to work reliably. Might look
into this in the future, but v0.27.2 also includes some changes not
present in v0.27.0.
2023-08-01 16:21:10 -04:00
Donovan Glover
50ba2f9352
meta: Use personal branches for inputs
This lets me do things like only update inputs when I want to.
Additionally, it becomes easy for me to add my own functionality to
these projects and contribute to them upstream. Finally, it becomes
easier to verify changes to the system when pulling changes from
upstream.
2023-07-15 11:44:01 -04:00
Donovan Glover
afd6cce13c
meta: Remove nix-gaming
No longer needed since I understand how to implement this myself now.
2023-06-22 09:53:29 -04:00
Donovan Glover
7a5ceee759
meta: Remove hypr-contrib
Not needed anymore since grimblast is now in my personal nixpkgs branch.
2023-06-22 09:17:03 -04:00
Donovan Glover
0c0d455a6a
flake.nix: Remove variables
This configuration is specifically intended for x86_64-linux and likely
wouldn't work on aarch64-linux. Additionally, the configuration name may
be different than the hostname if desired.
2023-06-22 08:37:59 -04:00
Donovan Glover
0fd8411d36
meta: Use default.nix
Makes things simpler.
2023-06-22 05:36:48 -04:00
Donovan Glover
2b415d3bd4
flake.nix: Inputs before outputs 2023-06-21 02:41:44 -04:00
Donovan Glover
255a819504
meta: Use a personal nixpkgs branch
Now I don't have to wait for anything to be included in nixos-unstable
and can simply merge whatever I want whenever I want. This also has the
advantage of not having to specify which input is needed to get a
package from.
2023-06-20 10:26:04 -04:00
Donovan Glover
b310bb6e6d
meta: Replace go-thumbnailer with nixpkgs version
Now there is no need for a packages directory since all the packages I
maintain are upstreamed.
2023-06-20 09:55:34 -04:00
Donovan Glover
ec418619ab
meta: Replace crystal-flake with nixpkgs-crystalline 2023-06-20 08:30:20 -04:00
Donovan Glover
58d5e0737b
nix: Remove formatter from flake.nix
treefmt is used instead since it's faster and more customizable.
2023-06-18 08:34:24 -04:00
Donovan Glover
b105f87a13
nix-gaming: Use cachix
This avoids having to wait 40 minutes for wine to compile every time the
system is updated.
2023-06-16 14:15:37 -04:00
Donovan Glover
b0dd76886a
flakes: Remove hyprland
Not needed anymore since we can simply use the hyprland module in
nixpkgs.
2023-06-13 17:17:01 -04:00
Donovan Glover
b856e26b3a
nix: Formatting 2023-06-13 09:06:48 -04:00
Donovan Glover
44d296b2c7
nix: Replace formatter with nixpkgs-fmt 2023-06-11 09:46:26 -04:00
Donovan Glover
e268781e8e
nix: Simplify 2023-06-11 09:42:16 -04:00
Donovan Glover
43a07cc8d9
treewide: Switch from alejandra to nixpkgs-fmt
Neither nixfmt nor alejandra support the "standard" way to syntax
highlight multi-line strings in Nix, so nixpkgs-fmt is the only viable
solution.
2023-06-11 09:37:27 -04:00
Donovan Glover
feff455ddd
nix: Remove nixpkgs-master
Not needed anymore since waycorner and nwg-dock-hyprland are in
nixos-unstable.
2023-06-10 10:41:17 -04:00
Donovan Glover
48cb1ea542
packages: Use srb2 from fork 2023-06-08 18:30:38 -04:00
Donovan Glover
0bb8eca867
packages: Use hyprland-autoname-workspaces from fork 2023-06-08 18:19:02 -04:00
Donovan Glover
f86dafa900
neovim: Use vim-crystal from nixpkgs/master
Nix flakes makes it easy to mix and match packages from any git
repository, which includes being able to use multiple nixpkgs branches.
2023-06-08 16:51:57 -04:00
Donovan Glover
a5941a1701
meta: Use crystal-flake for crystal development
The current crystal binary in nixpkgs complains about not finding pcre
when you try to compile anything with it, so crystal-flake is necessary
to have a working crystal environment under NixOS.

crystal-flake additionally packages crystalline, which is nice since no
one has been able to successfully create a pull request for nixpkgs yet.

Reference: https://github.com/NixOS/nixpkgs/issues/129002
2023-06-08 15:13:46 -04:00
Donovan Glover
e47b456ff2
chore: Spacing 2023-06-06 10:17:15 -04:00
Donovan Glover
a0dae2344d
nix: Use hosts directory
This may be useful if I want to try NixOS on another host in the future.
2023-06-05 21:23:28 -04:00
Donovan Glover
5cd582cdac
meta: Use src directory
There's something cool about having a separate main.nix for your NixOS
configuration.
2023-06-05 21:16:20 -04:00
Donovan Glover
3119b789f8
nix: Format with alejandra
Alejandra is written in Rust, has more tests than nixfmt, and handles
non-trivial code examples in Nix better.
2023-06-05 20:50:10 -04:00
Donovan Glover
1077200205
flake.nix: Add alejandra to outputs.formatter
Now it's possible to format with alejandra with `nix fmt`.
2023-06-05 20:23:08 -04:00
Donovan Glover
3b6ab3f265
flake.nix: Put outputs before inputs
This makes it easier to see the main logic of the application at a
glance.
2023-06-05 19:26:52 -04:00
Donovan Glover
a48575f176
chore: Spacing 2023-06-05 19:18:46 -04:00
Donovan Glover
56c20d9d8e
meta: Only capitalize variables part
This should make creating and using variables less annoying.
2023-06-05 18:51:37 -04:00
Donovan Glover
24756ad683
meta: Capitalize variables
This should make it easier to identify and search for variables.
2023-06-05 18:48:56 -04:00
Donovan Glover
de11edb07c
flake.nix: Remove unused argument 2023-06-05 13:33:08 -04:00
Donovan Glover
814058fc13
nix: Add missing hardware-configuration.nix 2023-06-05 13:09:51 -04:00
Donovan Glover
f00d3538ef
nix: Rename variables file to variables.nix
No need for an "examples" directory.
2023-06-05 12:45:44 -04:00
Donovan Glover
84af6079e4
nix: Abstract logic outside of flake
Now flake.nix does *not* need to be edited when adjusting the
configuration unless actual changes need to be done to the inputs.
2023-06-05 12:00:18 -04:00
Donovan Glover
6542ff2abb
systemd-boot: Boot the default entry by default
Since I never use previous generations, booting the newest entry by
default seems ideal. In the case that something is broken, it should be
possible to return to the menu by pressing space at boot.
2023-06-04 16:37:01 -04:00
Donovan Glover
734c2c2db2
systemd-boot: Disable editor
Since I don't use this feature, disabling it seems to be the play.
2023-06-04 16:33:17 -04:00
Donovan Glover
f67a664a76
meta: Use tmpfs for /tmp
This should speed up some things.
2023-06-04 12:37:05 -04:00
Donovan Glover
4cdf7d0e04
nix: Simplify
This commit removes some premature modularization to make it easier to
see and manipulate everything at once.
2023-06-04 09:35:40 -04:00
Donovan Glover
a22b9355dd
nix: Use variables
This should make things easier to change and maintain over time, with
the ultimate goal of making it easy to provide example configurations
that can be expanded upon.
2023-06-03 13:51:43 -04:00
Donovan Glover
c9bcd57404
Add rar container
This puts rar in a rootless container with no access to the network of
the host.
2023-05-31 15:15:45 -04:00
Donovan Glover
a7087e2904
Add osu-stable
This works, and without putting wine directly in $PATH, which is kinda
cool.
2023-05-31 10:18:38 -04:00
Donovan Glover
83322580a2
nix: Move up common modules 2023-05-25 16:49:17 -04:00
Donovan Glover
644dffba42
nix: Simplify 2023-05-23 12:27:49 -04:00
Donovan Glover
436d1543df
Add grimblast through flake 2023-05-19 05:40:10 -04:00
Donovan Glover
844df06137
Revert "nix: Simplify"
Looks like this silently broke home-manager, so reverting for now.
2023-05-18 20:30:49 -04:00
Donovan Glover
936a47667a
nix: Simplify 2023-05-18 19:38:18 -04:00
Donovan Glover
f399280ff1
nix: Further categorization 2023-05-18 19:12:30 -04:00
Donovan Glover
e20be890d0
Remove distinction between home-manager files 2023-05-18 11:46:41 -04:00
Donovan Glover
3d8e6f356e
Merge fish module 2023-05-18 09:49:56 -04:00
Donovan Glover
343e0cf6e0
Use separate directories for all modules 2023-05-17 16:57:33 -04:00
Donovan Glover
e09febf522
Add user module 2023-05-17 15:58:08 -04:00
Donovan Glover
afc98ce47e
Remove configuration.nix
Not needed anymore since we know how to use nix modules.
2023-05-17 12:50:55 -04:00
Donovan Glover
a2d6373232
Make home.nix a proper module 2023-05-17 11:51:12 -04:00
Donovan Glover
4a7b603536
nix: Continue modularization 2023-05-17 10:02:36 -04:00
Donovan Glover
a9b7a93fd1
nix: Follow home-manager for stylix 2023-05-16 23:35:52 -04:00