Commit Graph

1921 Commits

Author SHA1 Message Date
Donovan Glover
185f6f605e
containers(dev): Remove unused packages 2023-06-20 08:31:17 -04:00
Donovan Glover
ec418619ab
meta: Replace crystal-flake with nixpkgs-crystalline 2023-06-20 08:30:20 -04:00
Donovan Glover
b61ed37b02
chore: Update flake inputs 2023-06-19 20:09:59 -04:00
Donovan Glover
209fb4d9ca
meta: Add hyprland-autoname-workspaces config
The new lines are unfortunately necessary since waybar uses GTK CSS, and
GTK CSS doesn't support modern CSS features like vertical text.
2023-06-19 16:24:43 -04:00
Donovan Glover
92300c6d9d
fix(neovim): Fix npm package name 2023-06-19 16:19:24 -04:00
Donovan Glover
3ea8860f7d
meta: Use grimblast over grim/slurp 2023-06-19 12:12:04 -04:00
Donovan Glover
b7ed04d1a2
meta: Move shards to neovim config
The neovim config has everything I need for software development, so
having shards there makes sense.
2023-06-19 12:10:59 -04:00
Donovan Glover
df92eb1eb4
chore: Remove unused packages 2023-06-19 12:10:22 -04:00
Donovan Glover
83b6ce6e2d
nix: Continue modularization 2023-06-19 05:13:04 -04:00
Donovan Glover
72bd18dcfc
npm: Use home-manager package instead of nixos module
Now that I am able to understand and read NixOS/nixpkgs source code, I
understand that the usage of the npm module isn't needed since I don't
configure npm at a global level.
2023-06-19 04:00:50 -04:00
Donovan Glover
76bfdf10b6
pipewire: Re-enable lowLatency
This was previously disabled when testing NixOS networks.
2023-06-18 15:52:47 -04:00
Donovan Glover
07bbb996e5
nix: Continue modularization of system modules 2023-06-18 15:52:03 -04:00
Donovan Glover
e60f7000b0
meta: Don't shutdown when power button is pressed
Since I always shut down the computer through the terminal, the power
button serves no use while the computer is on.
2023-06-18 15:31:29 -04:00
Donovan Glover
bbb0110a03
virtualization: Always use vmVariant
This works since we're no longer depending on a network of virtual
machines that use their own virtualization configurations.
2023-06-18 11:58:37 -04:00
Donovan Glover
f8d5b35464
meta: Don't use NixOS networks
Networks are a way to start multiple NixOS virtual machines at the same
time. Although cute, networks seem to be used more for "test scripts"
and ultimately don't support Nix flakes. This results in package
versions being outdated and the inability to use our existing
home-manager input and other flakes.

Multiple nixosConfigurations, on the other hand, enable us to setup
entire computers that don't *have* to be virtual machines, but can be
virtual machines if we want them to be. Additionally, it becomes trivial
to only run the configurations you want to run, without having to worry
about everything being tied to everything else. Finally, persistence is
optional and the resulting .qcow2 file is quite small.

Ultimately, Nix flakes are a more flexible solution to the older
nixos-build-vms command, and should be preferred over it in pretty much
all cases. To reiterate, if you're using flakes, there's no reason to
use the outdated nixos-build-vms command, which won't have the same
package versions as the ones in your flake.
2023-06-18 10:57:55 -04:00
Donovan Glover
d34ead9699
meta: Share directories with virtual machines
This *works*, and it's possible to edit files in one virtual machine
while having those files instantly be updated in all other virtual
machines. Note that the host will also have access to the files, which
ultimately means that directory sharing is quite useful (and convenient).
2023-06-18 10:44:44 -04:00
Donovan Glover
d28c0ec15b
meta: Make networks usable
This was a change to make networks somewhat usable, and it works to a
good extent, however I ultimately decided against using networks due to
their missing flake support.
2023-06-18 10:40:59 -04:00
Donovan Glover
f7110b3e06
fonts: Add liberation fonts
Unfortunately, this is necessary to prevent certain websites from
completely breaking due to Noto fonts having wider width overall.
2023-06-18 10:04:34 -04:00
Donovan Glover
93295369c0
gnome: mkForce hyprland defaults
This should be a temporary solution until modules are selectively
imported and hyprland isn't included.
2023-06-18 09:20:47 -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
bd7c1d553b
meta: Add network example
This is a working example of using the modules in our existing
configuration to start a network of virtual machines with
nixos-build-vms. Note that VMs take longer to start up in this case than
nixos-rebuild build-vm, and that said VMs may lack certain functionality
(such as dynamic resolution in GNOME) that would otherwise be present
with build-vm.

Although networks are certainly cute (and I'm glad that I feel familiar
with them thanks to my better understanding of Nix), they do seem less
convenient than nixos-rebuild build-vm and don't appear to support Nix
flakes. Networks therefore seem more useful for running multiple one-off
services that couldn't otherwise be ran in a container.
2023-06-18 08:09:44 -04:00
Donovan Glover
168134bcf3
qemu: Add audio support to virtual machines
This fixes an issue where virtual machines would previously use dummy
output. More specifically, pulseaudio is used since pipewire supports
it, and intel hd audio (hda) is used since it's generally regarded as
one of the better options based on information available online.

Note that -audio is used instead of the outdated -audiodev and -soundhw
options. This setup also avoids the choppy audio observed with other
solutions like alsa.

References:
- https://www.qemu.org/docs/master/system/qemu-manpage.html
- https://github.com/NixOS/nixpkgs/issues/175378
- https://superuser.com/questions/1337570
- https://en.wikipedia.org/wiki/Intel_High_Definition_Audio
- https://gitlab.com/qemu-project/qemu/-/issues/1519
- https://lists.nongnu.org/archive/html/qemu-discuss/2020-04/msg00089.html
2023-06-18 07:02:19 -04:00
Donovan Glover
b2ff95f11b
udiskie: Only enable if hyprland
Conditional imports like this could make it easier to import everything
at once and selectively exclude as needed.
2023-06-17 22:46:29 -04:00
Donovan Glover
42699b6985
containers: Add obsidian
Mainly a proof of concept. Eventually I'll devise an easy way to view
notes in a pretty way and edit them with neovim (likely through your
typical web framework tools).
2023-06-17 22:43:01 -04:00
Donovan Glover
798aa35edf
meta: Use separate module for plasma
This enables plasma to be used as both a specialization and as a desktop
environment in a virtual machine.
2023-06-17 22:23:25 -04:00
Donovan Glover
0bd8f69705
fix(fonts): Explicitly reject default fonts
This fixes an issue where the default fonts were included by default
from another module in the system configuration.
2023-06-17 21:05:12 -04:00
Donovan Glover
446a2c1647
meta: Enable network-manager to manage dns
This enables virtual machines to make DNS queries without having to
manually set things up.
2023-06-17 20:59:41 -04:00
Donovan Glover
77956b181b
fix(fonts): Don't enable default fonts
This fixes an issue where some applications were using the default fonts
from nixpkgs instead of the fonts specified in the system configuration.
Notably, this led to the use of "TeX Gyre Heros" for body text, which
made distinguishing between i/I/l problematic at smaller font sizes.
2023-06-17 20:58:28 -04:00
Donovan Glover
692093da7d
meta: Flatten packages directory 2023-06-17 20:55:32 -04:00
Donovan Glover
fb2acae89a
specializations: Add plasma
This *works*, and the best part is I didn't have to do *anything* (besides
write this configuration file, that is).

Thanks to NixOS, it is possible to have GNOME, Plasma, Hyprland, and
whatever else you want installed on the same computer without those
desktop environments conflicting with each other. This configuration is
done in a fully reproducible and declarative setup with minimal code,
without having to modify any external files or run any imperative
commands.
2023-06-17 19:11:27 -04:00
Donovan Glover
f9fdac4925
fix(neovim): Only import fcitx-vim if fcitx5 enabled
This fixes an issue where fcitx-vim would error on systems without
fcitx5 enabled.
2023-06-17 12:30:30 -04:00
Donovan Glover
a725e0c2da
meta: Add gnome specialization
This makes it possible to boot into either Hyprland (the default) or
GNOME. Having separate configurations implemented in combination with
home-manager and impermanence guarantees that desktop environments don't
conflict withe each other, so this could also be used to implement a
Plasma specialization in the future.
2023-06-17 12:17:51 -04:00
Donovan Glover
18084be856
fix(swaylock): Add missing pkgs attribute 2023-06-17 11:20:26 -04:00
Donovan Glover
9a71c94b8a
fix(home): Add missing import 2023-06-17 11:18:58 -04:00
Donovan Glover
b26702d052
meta: Use host network inside vms
This enables VMs built with nixos-rebuild build-vm to use the internet
of the host.
2023-06-17 11:17:05 -04:00
Donovan Glover
ebd96d805e
htop: Use better settings for NixOS
Although many people have tried to make more modern top-like programs,
my favorite is still htop *by far*. NixOS includes htop-vim in its
official repositories, which is great, and this change removes the
/nix/store prefixes from all the processes, making htop overall much
easier to read and navigate.
2023-06-17 10:51:11 -04:00
Donovan Glover
f9a851cda2
meta: Add hyprland-specific setup to hyprland module 2023-06-17 09:42:53 -04:00
Donovan Glover
0e6ed0aa93
meta: Add back gnome module
Possibly useful for setting up computers with GNOME. The main advantage
GNOME has is the ability to have a consistent environment in both X11
and Wayland, which is useful to test whether or not something only works
in X11.
2023-06-17 09:19:07 -04:00
Donovan Glover
6b496fb529
modules: Add greetd 2023-06-17 02:43:26 -04:00
Donovan Glover
e00a88bfea
nix: Continue home separation 2023-06-16 23:00:15 -04:00
Donovan Glover
a7102b5b67
fish: Move user config to ./home 2023-06-16 20:17:51 -04:00
Donovan Glover
ef109a9472
swaylock: Move to ./home 2023-06-16 20:16:19 -04:00
Donovan Glover
c0966633d8
librewolf: Move to ./home 2023-06-16 20:15:45 -04:00
Donovan Glover
79003388c2
starship: Separate from fish 2023-06-16 20:13:32 -04:00
Donovan Glover
2dd6a9f5c3
fcitx: Move to ./home 2023-06-16 20:09:34 -04:00
Donovan Glover
3e6f8e6563
hyprland: Move home-specific parts to ./home
Note that the modules are separated more to make it easier to use parts
of the graphical configuration in NixOS containers.
2023-06-16 20:02:45 -04:00
Donovan Glover
da93580ccf
containers(wine): Use Japanese locale
Necessary for many applications to work properly.
2023-06-16 14:24:47 -04:00
Donovan Glover
89361952a8
containers(wine): Passthrough /dev/dri
Enables the wine container to have native graphics performance on the
host.
2023-06-16 14:23:53 -04:00
Donovan Glover
62feee858b
containers(wine): Implement impermanence
Useful to avoid certain things working due to a certain state, then
forgetting what was changed over time.
2023-06-16 14:21:24 -04:00
Donovan Glover
aad7424764
containers(wine): Enable pipewire
Seems to fix an issue where audio could randomly stop working when
closing applications and opening new ones.
2023-06-16 14:20:30 -04:00