Commit Graph

47 Commits

Author SHA1 Message Date
Donovan Glover
2a3a3db055
containers: Remove graphical option
It seems like everything works fine without this, so this wasn't
(or is no longer) necessary.
2024-09-01 16:33:41 -04:00
Donovan Glover
6c34cce882
treewide(nix): Remove duplicate attribute name usage
Found thanks to nixd showing different colors for these.
2024-08-10 20:55:46 -04:00
Donovan Glover
45e7d727a0
chore: Run nix fmt 2024-08-09 13:29:15 -04:00
Donovan Glover
2297fb41e3
treewide: Drop usage of inherit (pkgs)
Having to change the package list in two places was a bit redundant. We
can also use `with` patterns now since nixd warns if there are escaping
variables being used.

Note that variables used in multiple places are kept to make it easier
to recognize that those variables must be changed together. Also note
that inherit (pkgs) inside of mkMerge are currently kept to reduce the
diff.
2024-08-07 16:40:58 -04:00
Donovan Glover
4cbceec89c
containers: Format with nixfmt-rfc-style 2024-08-03 14:32:15 -04:00
Donovan Glover
372811f651
modules(desktop): Add graphical option for containers
xserver is required to make GUI applications run inside containers.
2024-05-19 11:18:39 -04:00
Donovan Glover
8fb6142ddd
nix(wine): Remove "with pkgs;" usage 2024-04-07 12:29:59 -04:00
Donovan Glover
c6c49b62b5
chore: Improve formatting 2024-04-07 10:54:12 -04:00
Donovan Glover
dff7f88fc5
chore: Simplify wine container
Separate distinct containers seems useful, although I haven't measured
how much they'd increase the evaluation time yet.
2024-04-06 22:54:40 -04:00
Donovan Glover
2e366abf7d
containers: Move wine config to separate file 2024-04-06 18:18:30 -04:00
Donovan Glover
56fc0c0cff
meta(containers): Rename wine.nix to default.nix
Since this is now the only container, having it as default.nix makes
sense.
2023-08-31 13:46:50 -04:00
Donovan Glover
7e556f756e
containers(wine): Make unfree whitelist work
Unfortunately this is necessary to whitelist unfree packages inside the
container.
2023-08-31 11:55:24 -04:00
Donovan Glover
41b784ec9b
meta: Merge srb2 container with wine
This continues the process of reducing the amount of containers in order
to significantly reduce build times.
2023-08-31 10:20:18 -04:00
Donovan Glover
a28b33a2d9
meta: Merge iamb container with wine
Similar to the previous commit, I'm trying to reduce build times here.
Containers are great but each one increases the build time by a
non-trivial amount. By limiting the amount of containers and using
virtual machines for things that "absolutely need to be virtualized",
build times overall should be more productive.
2023-08-31 10:10:13 -04:00
Donovan Glover
8bf12e9f3b
meta: Merge rar container with wine
I'll rename this later, but basically I got tired of the vastly
increased build times due to having multiple containers, and would
rather combine containers where possible.

Although unfortunate, this should still be better than not using
containers at all, and by making the usage of such containers easier,
the probability of using them increases as well.
2023-08-31 10:09:09 -04:00
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
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
717fa0d9fb
chore: Formatting 2023-06-23 15:48:29 -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
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
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
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
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
b856e26b3a
nix: Formatting 2023-06-13 09:06:48 -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