mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-24 17:23:09 +01:00
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:
parent
596a9183f8
commit
f4d23d6784
@ -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 = [
|
||||
|
Loading…
Reference in New Issue
Block a user