Commit Graph

124 Commits

Author SHA1 Message Date
8e5d3c77c7 containers(wine): simplify networking
It turns out that having to do the `nat` shenanigans is no longer
necessary or was never necessary to begin with.

In either case, the simplified result is much easier to work with
due to no dependency on the localAddress.
2024-10-11 16:59:13 -04:00
043e901711 containers: add wordpress
This is the start of my fun attempt at using NixOS containers for web
services as a Docker replacement.

After spending some time on other servers I realized that I don't
actually *need* my dotfiles on those servers, so it becomes
significantly faster to build these containers without worrying about
home-manager and command-line programs I use on the host.

Main advantages include web service configuration with Nix instead of
Docker. Disadvantages include increased complexity for anything that
isn't already maintained by others in nixpkgs.
2024-10-11 16:39:11 -04:00
11c555d2c5 containers: merge default.nix with wine.nix
It turns out that I shouldn't actually need graphical container support
for most containers, which might also improve build times with multiple
containers.
2024-10-11 12:28:05 -04:00
8f61088347 containers: Update module list
Long-term this should allow for lighter containers and possibly decrease
evaluation time.
2024-09-18 14:30:51 -04:00
1b71076ca1 system: Disable root for containers by default
Notably removes the ability for non-containers to easily have root
disabled, although this shouldn't be wanted in most cases.
2024-09-02 12:18:39 -04:00
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
50f8c3eb00 meta: Replace desktop.container with config.boot.isContainer
No need to say that we're a container when NixOS already handles this.
2024-09-01 14:33:04 -04:00
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
45e7d727a0 chore: Run nix fmt 2024-08-09 13:29:15 -04:00
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
4cbceec89c containers: Format with nixfmt-rfc-style 2024-08-03 14:32:15 -04:00
ce67ffbf73 meta: Rename homeManagerModules attribute to homeModules
This fixes an issue where previously homeManagerModules would be an
unknown flake output. Note that this change is a part of Nix 2.22.3
but not Nix 2.23.3.
2024-07-18 19:43:11 -04:00
554630bf9a nix(containers): Prefer inheriting from outputs 2024-07-12 12:28:10 -04:00
f6fc80c1f0 nix: hardware.opengl.enable -> hardware.graphics.enable
hardware.opengl.enable is now deprecated.
2024-06-25 10:49:08 -04:00
5e5d7c0468 containers: Fix cursor by inheriting overlays
Previously the old phinger-cursors package was being used without the
overlay. This fixes that and ensures that all packages have their
appropriate overlays.
2024-06-02 23:41:51 -04:00
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
f9426b18c8 meta: Drop xcursor
This doesn't seem to change anything nowadays with Hyprland so it should
be okay to drop in 2024.

Edit: This seems to get set with pointerCursor in home-manager which
gets set by stylix, so it shouldn't matter either way.

See: ff1c364654/modules/config/home-cursor.nix (L172-L175)
And: b36fb34a9c/stylix/hm/cursor.nix (L15)
2024-04-18 21:17:38 -04:00
8fb6142ddd nix(wine): Remove "with pkgs;" usage 2024-04-07 12:29:59 -04:00
c6c49b62b5 chore: Improve formatting 2024-04-07 10:54:12 -04:00
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
ec496e1a69 meta: Rename shared.nix to default.nix
This should make it easier to tell that this is the default
configuration inherited by all containers.
2024-04-06 22:47:01 -04:00
006a3592e6 feat: Fix crackling audio inside containers
It turns out that enabling hyprland inside the container causes this to
happen. I've also disabled greetd for good measure.
2024-04-06 19:35:57 -04:00
534476e97b feat: Add option to disable root at the system level
Reduces complexity in the containers module.
2024-04-06 19:28:22 -04:00
2e366abf7d containers: Move wine config to separate file 2024-04-06 18:18:30 -04:00
00135526e7 desktop: Support japanese/wine by default
Simplifies things a bit since my target audience includes those
interested in the Japanese language. Opinionated defaults like this
makes it easier for end-users to be immediately productive without
having to spend time configuring things.
2024-04-06 13:43:28 -04:00
ae85377a72 chore: Remove redundant container configuration
Not needed due to the imports, although useful to remember that these
options would typically be necessary in a raw implementation.
2024-04-05 08:14:42 -04:00
e739239542 chore: Enable missing module options
Forgot to enable these earlier but now everything works.
2024-04-05 08:13:24 -04:00
5f58800cc9 containers: Remove old imports
The simplification process has overall made it easier to import core
modules without having to worry about exactly which modules to import.
2024-04-05 07:21:01 -04:00
7f05a66fa5 feat: Make username customizable
Now it's possible to use whatever username you want for your system. The
default value of "user" is good if you're concerned about information
disclosure attacks through things like the username being visible in
logs or other output.
2024-04-04 16:36:28 -04:00
558e0b1623 meta: Merge home-manager and user module with system
Makes it easier to create a working and pre-configured system with
minimal configuration.
2024-04-04 16:02:35 -04:00
af3b7c2bd3 containers: Remove old imports
Will continue simplifying this later.
2024-04-03 10:17:00 -04:00
24c4badf39 meta: Make containers a nixosModule
Makes it easier to use the containers in other configs.
2024-04-01 06:24:52 -04:00
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
23049a3e99 meta: Switch from joshuto to yazi
After almost a year of using joshuto, I have decided to switch to yazi.

The latest joshuto update broke my image preview configuration, and it
didn't make sense trying to figure out the issue with yazi already
having built-in image support and more.

Other notable improvements from this change include:

- Simplified configuration since defaults no longer have to be
  re-declared
- Faster directory loading, especially for /nix/store/ and symlinks to
  /nix/store/
- Text files are more likely to show previews without manual
  configuration
- Videos now have working previews again, similar to ranger
2024-03-30 18:20:01 -04:00
bb3792d748 fcitx: Use wayland front-end for GTK
Fixes the warning notification shown on boot.
2024-01-13 00:39:29 -05:00
bcf54f4cb4 wine: Downgrade from 9.0-rc1-staging to 8.2
Fixes an issue where the newer version of wine would cause my current
wine prefixes to crash with missing DLL errors. Might be fixable by
creating new prefixes with the new version, however it's much easier
for me to stick with what's known to work.

See: https://github.com/NixOS/nixpkgs/pull/273232
2023-12-15 02:31:32 -05:00
5046c0fa2e stylix: Style cursor with new option 2023-11-18 14:52:48 -05:00
72dbecfa78 feat: Update sakaya to latest commit
sakaya will now automatically choose 32-bit and 64-bit wine prefixes
based on the executable itself.
2023-10-29 15:19:57 -04:00
b18ccd3dfc chore: Improve formatting 2023-10-29 15:11:57 -04:00
4365aa59fd containers: Disable restartIfChanged
Makes it possible to use sakaya without worrying about the container
automatically restarting on config changes and closing all the wine
applications.

This was previously part of my personal nixpkgs branch but I turned it
into an option that should hopefully be upstreamed soon.
2023-10-10 18:55:31 -04:00
7db1ecda37 chore: Fix formatting 2023-08-31 14:16:29 -04:00
f4d23d6784 refactor(containers): Abstract common config
This makes it possible to create multiple containers without duplicating
code. This may be useful for having an internet container and a no
internet container.
2023-08-31 14:08:37 -04:00
596a9183f8 meta(containers): Rename common.nix to shared.nix
This makes it easier to tab complete the default.nix, which is edited
more often.
2023-08-31 13:49:13 -04:00
877341abe5 meta(containers): Move setup script to common.nix
This makes it easier to associate that the file is used by containers.
2023-08-31 13:48:02 -04:00
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
24b658ed4b meta(containers): Remove old default.nix 2023-08-31 13:46:06 -04:00
5c38772eca containers: Merge dev container with setup
This change further reduces build times, removes duplicate code, and
makes things simpler overall.
2023-08-31 13:24:27 -04:00
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
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
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