Commit Graph

2805 Commits

Author SHA1 Message Date
Donovan Glover
a18a120634
system: Clean /tmp on boot
Necessary since /tmp is no longer a tmpfs.
2024-04-03 21:28:53 -04:00
Donovan Glover
d452e982e3
fish: Add nix flake check abbreviation
More useful now that it's also used for VM testing.
2024-04-03 20:07:35 -04:00
Donovan Glover
a3717c48f0
chore: Simplify fish module 2024-04-03 20:07:00 -04:00
Donovan Glover
582264f381
packages: Add mdopen
Discovered on r/rust and conveniently packaged with nix-init.
2024-04-03 19:47:20 -04:00
Donovan Glover
af3b7c2bd3
containers: Remove old imports
Will continue simplifying this later.
2024-04-03 10:17:00 -04:00
Donovan Glover
9ccdacaadf
chore: Simplify htop module 2024-04-03 10:12:54 -04:00
Donovan Glover
2048bc62f8
chore: Simplify thunar module 2024-04-03 09:59:32 -04:00
Donovan Glover
019603afc7
meta: Begin making system module customizable
These options are pretty important so it'd be cool to be able to change
them. Current strategy is to assume that configuration through the
module is preferred over overriding the NixOS option directly.
2024-04-03 09:44:57 -04:00
Donovan Glover
26348c28ea
chore(modules): Rename piper to hardware
Might rename again in the future, but for now this is an easy way to
keep track of all hardware-specific config.
2024-04-03 09:33:15 -04:00
Donovan Glover
1f80607ca0
meta: Merge zram module with system
Self-explanatory since zram is system-related. Doesn't seem to affect
containers which is good.
2024-04-03 09:16:24 -04:00
Donovan Glover
13d98c2c9f
meta: Merge nix and systemd modules with system
These are simple enough configurations that have benefits across many
different systems.
2024-04-03 08:06:04 -04:00
Donovan Glover
85ead9e779
meta: Merge boot module with system
This seems like it could fit with the hardware module as well, however
time will tell if we're able to keep this in system when importing it
into containers and virtual machines.

Note that boot.loader.efi.canTouchEfiVariables gets set to true during
the nixos-install process, so it should be okay to keep here.
2024-04-03 07:43:43 -04:00
Donovan Glover
cc3991a38a
meta: Merge timezone and locale with system
Usually one would want to define all of these options at the same time,
so it doesn't make sense to require importing several different modules.

For values that aren't needed, users can either override the configuration
in their own module or use an option that has been written upstream for the
module.
2024-04-03 07:15:30 -04:00
Donovan Glover
2452f61338
meta: Merge logind with piper
This is a part of putting hardware-related configs together so they
don't distract from the other shell-related and desktop-related configs.
2024-04-03 07:12:41 -04:00
Donovan Glover
2e64dbd3e3
meta: Drop docker (again)
Docker feels a bit too old school after being spoiled by the Nix
language and all the features that NixOS provides. Dockerfiles are not
as cool to write as Nix files and docker-compose.yml lacks many of the
reproducible benefits one gets from sticking with Nix.

Now that I have more experience with Nix, it should be possible for me
to build and run the services I want to run with Nix instead of Docker.
This should additionally reduce my personal machine's startup time,
which was already quite low with Hyprland.

As a final closing, expertise in Nix seems more useful than Docker for
my personal goals. I'd rather be able to control entire Linux systems
and their full environments with containers, virtual machines, and other
goodies than be restricted to the simplistic model that is Docker.
2024-04-03 07:05:40 -04:00
Donovan Glover
039cf97368
meta: Merge udev with piper
This is part of merging all hardware-specific config into one module.
2024-04-03 06:29:07 -04:00
Donovan Glover
7f97bb62c2
meta: Merge services.resolved.llmnr with networking
Link-Local Multicast Name Resolution is networking related and should be
of interest to users that are also interested in the networking module.
2024-04-03 06:19:08 -04:00
Donovan Glover
8e16a465e1
meta: Merge cdemu with wine
The cdemu module is wine-specific and should be enabled together with
the wine module, with an option for the user to disable it if desired.
2024-04-03 06:01:32 -04:00
Donovan Glover
942785cf5b
chore(nix): Clean up rofi module 2024-04-03 05:52:10 -04:00
Donovan Glover
e82b8d40f9
chore(nix): Clean up ncmpcpp module 2024-04-03 05:51:01 -04:00
Donovan Glover
ea4c8d16dd
specializations: Make opt-in with mkEnableOption
Specializations basically double the build time for each one added, so
requiring users to explicitly enable it means quicker build times for
those that prefer Hyprland (which is easier to configure declaratively).
2024-04-03 02:46:42 -04:00
Donovan Glover
9c95252be4
nix: Drop unnecessary xdg.configFile 2024-04-02 19:34:25 -04:00
Donovan Glover
d250e8520f
nix: Prefer dontUnpack over phony src
Prevents webp-thumbnailer from being rebuilt when the phony src changes.
2024-04-02 19:12:06 -04:00
Donovan Glover
b8ad062cec
nix: Use lib.singleton where possible 2024-04-02 18:53:56 -04:00
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