Commit Graph

17 Commits

Author SHA1 Message Date
Donovan Glover
a7fad6beb9
containers: remove autostart with systemd.tmpfiles.rules
At some point this started causing the /run/user/1000 directory to be
deleted when changing container configurations, which was definitely not
ideal.

An alternative approach will have to be taken if we want the wine
container to auto-start on boot.
2024-10-11 16:46:45 -04:00
Donovan Glover
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
Donovan Glover
0238abd1e5
containers: simplify config 2024-10-11 15:13:08 -04:00
Donovan Glover
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
Donovan Glover
4495459229
meta: Move sakaya to containers module 2024-09-09 23:08:01 -04:00
Donovan Glover
a32f73a388
modules: Format with nixfmt-rfc-style 2024-08-03 14:40:07 -04:00
Donovan Glover
591747784e
phone: Move containers config out of container module
We should explicitly enable it instead of conditionally disable it.
2024-07-17 05:55:17 -04:00
Donovan Glover
3e5a395dc8
containers: Don't enable on phone
Fixes an issue where the build would previously fail.
2024-06-20 13:49:39 -04:00
Donovan Glover
c6c49b62b5
chore: Improve formatting 2024-04-07 10:54:12 -04:00
Donovan Glover
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
Donovan Glover
2e366abf7d
containers: Move wine config to separate file 2024-04-06 18:18:30 -04:00
Donovan Glover
3080c56023
containers: Fix warning when containers are disabled
Now it's possible to disable the containers without getting a warning
that containers.<name> is being defined.
2024-04-06 08:09:23 -04:00
Donovan Glover
59f557a3e5
feat: Pass nix-config as self to avoid infinite recursion
This change makes it possible to use this nix-config in all the
different ways imaginable (containers, bare metal, tests, and as a
separate flake input) *without* running into infinite recursion
issues with self.

It does this by using a trick similar to JavaScript in which
`var self = this;`, thus enabling the usage of "this" (or self, in
Nix's case) where it wouldn't otherwise be possible.

Note that this *only* works if the input for this repository is named
nix-config. This makes it impractical to combine with multiple
configurations that employ the same strategy.
2024-04-05 10:20:06 -04:00
Donovan Glover
b368817c52
feat: Simplify imports by importing with specialArgs
This change makes it possible to import the modules that are required
from the flake inputs in the output modules themselves, thus preventing
users from having to manually import those modules.

This simplifies things overall and was made possible by the specialArgs
option that allowed these flake inputs to be passed into our container.
2024-04-05 09:37:30 -04:00
Donovan Glover
83314da967
chore: Fix remaining hardcoded user values 2024-04-05 08:20:11 -04:00
Donovan Glover
a6f2c58d51
meta: Don't hardcode home directory
This is a much better way of handling things.
2024-04-04 19:39:35 -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