-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
default.nix
44 lines (41 loc) · 875 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
config,
isWorkstation,
lib,
pkgs,
username,
...
}:
let
installFor = [ "martin" ];
hasNvidiaGPU = lib.elem "nvidia" config.services.xserver.videoDrivers;
in
lib.mkIf (lib.elem "${username}" installFor) {
#https://nixos.org/wiki/Podman
environment = {
systemPackages =
with pkgs;
[
act
distrobox
fuse-overlayfs
]
++ lib.optionals (isWorkstation && true == false) [
boxbuddy
pods
];
};
hardware.nvidia-container-toolkit.enable = hasNvidiaGPU;
virtualisation = {
containers.enable = true;
podman = {
defaultNetwork.settings = {
dns_enabled = true;
};
dockerCompat = true;
dockerSocket.enable = true;
enable = true;
};
};
users.users.${username}.extraGroups = lib.optional config.virtualisation.podman.enable "podman";
}