1
0
forked from extern/nix-config

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.
This commit is contained in:
Donovan Glover 2023-08-31 14:08:35 -04:00
parent 596a9183f8
commit f4d23d6784
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -4,17 +4,11 @@
, ...
}:
{
systemd.tmpfiles.rules = [
"d /run/user/1000 0700 user users -"
];
containers.wine = {
let
template = {
privateNetwork = true;
ephemeral = true;
autoStart = true;
hostAddress = "192.168.100.34";
localAddress = "192.168.100.49";
bindMounts = {
"/mnt" = {
@ -44,6 +38,15 @@
node = "/dev/dri/renderD128";
}
];
};
in {
systemd.tmpfiles.rules = [
"d /run/user/1000 0700 user users -"
];
containers.wine = template // {
hostAddress = "192.168.100.34";
localAddress = "192.168.100.49";
config = { lib, pkgs, ... }: {
imports = [