Commit Graph

122 Commits

Author SHA1 Message Date
Donovan Glover
784b3270f9
containers(wine): Replace x86_64-linux with pkgs.system 2023-08-03 12:40:46 -04:00
Donovan Glover
1cd6d698d6
containers(wine): Change sakaya-server to sakaya
sakaya is now only one binary.
2023-08-03 12:39:53 -04:00
Donovan Glover
c3d2b637ba
containers(wine): Use pkgs from host
May or may not make things faster.
2023-08-03 12:38:59 -04:00
Donovan Glover
6d390eb938
containers(wine): Add sakaya systemd service
This combined with su makes it possible to automatically start a user
environment with sakaya-server running, thus eliminating the need to
spawn a shell with machinectl.
2023-08-01 22:55:32 -04:00
Donovan Glover
d1cb8c5731
containers(wine): Autostart with tmpfiles
This change makes it possible to autostart the wine container without
receiving errors and not being able to use /run/user/1000.
2023-08-01 22:22:02 -04:00
Donovan Glover
01458011ab
containers(wine): Add sakaya
This works, which is pretty cool. One unfortunate consequence is that
networking with the host is required, thus an alternative approach needs
to be considered if one still wants to eliminate internet access from
certain wine applications.
2023-08-01 12:18:05 -04:00
Donovan Glover
d61e7b8a31
meta: Remove gui container
Although this was cool, it created some inconveniences that I'd rather
not have to deal with. For example, opening a document required manually
copying the file to the container mount first.

Instead of containerizing a subset of GUI applications, it's likely much
easier and more effective to spin up a virtual machine of the current
system. That way all GUI applications benefit from virtualization and
not simply containerization, which caused issues when certain programs
detected that they were already open from the wayland socket.

A final benefit of this change is that which container an application is
running in is no longer ambiguous. Although it was possible to use
custom GTK themes depending on which container an application belonged
to, containers for system-installed applications tend to bring a large
amount of overhead. Only using containers for applications that deal
with untrusted inputs and have a large attack surface seems better in
this case.
2023-08-01 10:41:32 -04:00
Donovan Glover
59b5f55e6d
srb2: Add hosting support 2023-07-15 17:03:48 -04:00
Donovan Glover
13e6407381
containers(wine): Use prefix from mnt
This is convenient, however the state of the wine prefix will change
over time as a result of this.
2023-07-11 07:54:10 -04:00
Donovan Glover
410e5f50bb
containers: Simplify
isReadOnly is true by default.
2023-07-07 05:26:52 -04:00
Donovan Glover
971dbec0f9
containers: Remove obsidian
After using Logseq for a few months, using Obsidian for just a little
bit is quite repulsive. Taking notes that aren't in outliner form feels
alien and not worth it for me personally.
2023-07-02 17:38:26 -04:00
Donovan Glover
51795a8829
meta: Use unrar instead of unrar-wrapper
Unfortunately, some functionality appears to only be available with
unrar.
2023-07-01 14:03:40 -04:00
Donovan Glover
128c6f619d
meta: Replace unrar with unrar-wrapper 2023-06-24 13:40:02 -04:00
Donovan Glover
9dc1d0043d
containers(dev): Enable gui usage 2023-06-24 12:06:13 -04:00
Donovan Glover
717fa0d9fb
chore: Formatting 2023-06-23 15:48:29 -04:00
Donovan Glover
dd6f43e02d
containers: Add iamb
iamb is a TUI matrix client written in Rust.
2023-06-23 10:40:00 -04:00
Donovan Glover
355eee4910
chore: Fix formatting from git 2023-06-22 15:12:24 -04:00
Donovan Glover
c6e59e9ecd
containers(wine): Add environment variables 2023-06-22 15:03:07 -04:00
Donovan Glover
7a07f70f7c
meta: Include fish/starship in all containers 2023-06-22 13:06:00 -04:00
Donovan Glover
1bfdcaa96c
containers(wine): Migrate to setup.nix 2023-06-22 12:51:35 -04:00
Donovan Glover
aca37da408
containers(obsidian): Migrate to setup.nix 2023-06-22 12:46:20 -04:00
Donovan Glover
c211bdca9b
containers(dev): Migrate to setup.nix 2023-06-22 12:44:25 -04:00
Donovan Glover
269b5143e4
setup.nix: Fix imports 2023-06-22 12:37:37 -04:00
Donovan Glover
28a55383b4
containers(srb2): Use setup.nix 2023-06-22 12:28:27 -04:00
Donovan Glover
9167763aeb
meta: Move containers config to setup.nix
The config sets up the containers, hence setup.nix.
2023-06-22 12:25:37 -04:00
Donovan Glover
505e35edcd
containers: Use more detailed common config
All containers can inherit a lot of the same settings since the main
feature is separating applications from the host and each other.
2023-06-22 12:19:03 -04:00
Donovan Glover
2f5a3f184a
containers(gui): Remove unused packages 2023-06-22 11:55:52 -04:00
Donovan Glover
0aaba9a591
meta: Remove variables from containers
Modules solve the variable problem in a nicer way.
2023-06-22 11:44:35 -04:00
Donovan Glover
1dcf95a7eb
pipewire: Inline low latency module
This removes the nix-gaming dependency to achieve low latency.
2023-06-22 09:51:15 -04:00
Donovan Glover
7b79bbae70
meta: Remove old osu container
No longer needed since I no longer intend to use nix-gaming. May add
another container later without it.
2023-06-22 09:27:44 -04:00
Donovan Glover
a75c20db5b
containers(wine): Switch to wineWowPackages.stagingFull
wineWowPackages.stagingFull has better compatibility than waylandFull
and runs more applications without black screens. The difference between
stagingFull and wine-ge is that wine-ge doesn't crash when encountering
an error like ELFCLASS64 and usually opens windows larger and
fullscreen-like.

The reason stagingFull is preferred over wine-ge in this case is that
stagingFull is a part of nixpkgs and doesn't suffer from a black screen
bug when a hidden menu pushes the content in the window viewport down.

Additionally, although wine-ge avoids crashes in more cases, this
results in applications running that may or may not fully work, and
sometimes results in black screens where there should be graphics
instead.
2023-06-21 11:39:57 -04:00
Donovan Glover
e0f1521899
containers(wine): Use wine-ge
This was a different wine version that let me achieve better
compatibility with Unity3D programs. Although it doesn't crash when
encountering a ELFCLASS64 error, for example, it does have other issues
like a black screen flash when opening a hidden menu (the kind that
become available with the alt key on a keyboard).
2023-06-21 11:23:17 -04:00
Donovan Glover
7760a7028b
containers(dev): Add htop
Might make htop available to all containers in the future.
2023-06-20 18:52:13 -04:00
Donovan Glover
db22c24905
containers(dev): Add nix
Useful for running nix shells.
2023-06-20 18:51:51 -04:00
Donovan Glover
aa15dc00ee
containers: Use separate default.nix 2023-06-20 18:42:56 -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
185f6f605e
containers(dev): Remove unused packages 2023-06-20 08:31:17 -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
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
Donovan Glover
a179de4afa
containers(gui): Add libreoffice
Unfortunately, some files may require the use of document editing
software like libreoffice. Fortunately, systemd-nspawn containers enable
us to ensure that these documents do not have access to the internet.
2023-06-16 14:14:18 -04:00
Donovan Glover
6c45d79f1c
containers: Fix module imports 2023-06-16 14:05:23 -04:00
Donovan Glover
036ec4a733
containers(dev): Update module paths 2023-06-16 13:15:44 -04:00
Donovan Glover
39e206a89b
chore: Move home-manager modules to ./home 2023-06-16 08:23:49 -04:00
Donovan Glover
181ea09092
meta: Use separate directory for home-manager modules 2023-06-16 08:13:34 -04:00
Donovan Glover
cac5d0c159
Switch from wine-staging to wineWowPackages.waylandFull
This causes more programs to work and seems to be the most popular
package for wine on NixOS, so it should be preferred in all cases.
2023-06-16 07:58:36 -04:00
Donovan Glover
69bd0757d2
containers(dev): Use home manager module 2023-06-16 07:47:21 -04:00
Donovan Glover
f08e4ca34f
chore: Run nixpkgs-fmt 2023-06-16 07:31:39 -04:00
Donovan Glover
57d6e3ea14
meta: Don't autostart containers
Unfortunately not possible (at least non-trivially) since containers may
depend on a graphical instance already running.
2023-06-15 11:11:08 -04:00
Donovan Glover
4fdfb6b94b
containers(osu): Remove gamemode
gamemode is started from the host, so this isn't needed.
2023-06-13 17:28:21 -04:00
Donovan Glover
b856e26b3a
nix: Formatting 2023-06-13 09:06:48 -04:00
Donovan Glover
0f1ea26e84
containers(osu): Fix audio 2023-06-12 23:38:37 -04:00
Donovan Glover
a642433003
containers: Add osu 2023-06-12 23:38:28 -04:00
Donovan Glover
9b55087bf4
containers: Use graphics from host
As alluded to earlier, this significantly increases the performance of
graphical applications running inside containers.
2023-06-12 20:56:14 -04:00
Donovan Glover
8ce1e73531
containers: Add srb2 container
Previously I decided against using srb2 in a container due to the poor
performance I experienced. Since I figured out how to use the graphics
from the host inside of the container, performance is no longer an
issue.
2023-06-12 20:52:17 -04:00
Donovan Glover
48c2f322bd
meta: Add stylix to gui container
This lets us use different color schemes for different containers, as
well as maintain decent styles and fonts with applications inside of
containers.
2023-06-12 18:54:03 -04:00
Donovan Glover
8f131a64e7
Only import internal container configs
Sharing external container configs seems non-trivial and, although
possible, it may be better to simply manage containers independently.
2023-06-12 18:52:29 -04:00
Donovan Glover
ef0e1acfc7
containers: Add gui container 2023-06-12 18:09:57 -04:00
Donovan Glover
7d79840d3d
containers(dev): Add fish-starship 2023-06-12 15:10:13 -04:00
Donovan Glover
cbdd5998ec
meta: Add dev container
Note that this container uses home-manager from the Nix flake on the
host system, which is pretty cool.

Currently modules in this repository *don't* differentiate between
home-manager and nixos, but this could be changed in the future to
support e.g. my home-manager neovim config on a non-nixos system.
2023-06-12 14:54:40 -04:00
Donovan Glover
ce57cd1433
containers: Remove hostCfg
This shouldn't be needed since there are many other ways to share
configuration from the host, and I never used opengl.extraPackages
anyway.
2023-06-12 03:07:03 -04:00
Donovan Glover
d06d47f76a
nix: Simplify 2023-06-11 09:55:44 -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
4ca1f03f76
variables: Add stateVersion to containers 2023-06-06 22:14:48 -04:00
Donovan Glover
4d9a6b6877
variables: Add username 2023-06-06 10:50:42 -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
b2cfc66516
meta: Don't autostart containers with NixOS
This fixes an issue where containers caused the boot process to slow
down, especially those that relied on mounting directories only
available once a graphical session has already started.
2023-06-04 17:19:59 -04:00
Donovan Glover
8a80c37aa8
Make wine container support display output
This *works*, and I was surprised that I needed to change little to
nothing at all.
2023-06-03 15:36:38 -04:00
Donovan Glover
6985903631
Add base wine container
I figured out how to get wine working on Nix, and it works surprisingly
well, however I'd like to avoid programs from writing wherever they want
and don't want to rely on a solution like firejail.

As it turns out, systemd-nspawn containers enable us to run wine applications
in a reasonably private container without access to neither the files of the
host nor its internet connection.
2023-06-03 15:29:50 -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