mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-20 09:47:57 +02:00
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.
This commit is contained in:
parent
8ba4792d03
commit
3080c56023
@ -1,7 +1,9 @@
|
|||||||
{ config, nix-config, sakaya, ... }:
|
{ config, nix-config, sakaya, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (lib) mkIf;
|
||||||
inherit (config.modules.system) username;
|
inherit (config.modules.system) username;
|
||||||
|
inherit (config.boot) enableContainers;
|
||||||
|
|
||||||
template = {
|
template = {
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
@ -48,7 +50,8 @@ in
|
|||||||
"d /run/user/1000 0700 ${username} users -"
|
"d /run/user/1000 0700 ${username} users -"
|
||||||
];
|
];
|
||||||
|
|
||||||
containers.wine = template // {
|
containers = mkIf enableContainers {
|
||||||
|
wine = template // {
|
||||||
hostAddress = "192.168.100.34";
|
hostAddress = "192.168.100.34";
|
||||||
localAddress = "192.168.100.49";
|
localAddress = "192.168.100.49";
|
||||||
|
|
||||||
@ -113,4 +116,5 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user