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