Compare commits
2 Commits
old-master
...
c81d93dda2
| Author | SHA1 | Date | |
|---|---|---|---|
|
c81d93dda2
|
|||
|
365c508bd9
|
@@ -3,6 +3,7 @@
|
||||
{
|
||||
imports = [
|
||||
../common/ssf.nix
|
||||
./virtualization.nix
|
||||
];
|
||||
|
||||
# Select this using the ID to avoid mismatches
|
||||
|
||||
40
m/weasel/virtualization.nix
Normal file
40
m/weasel/virtualization.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# Enable common container config files in /etc/containers
|
||||
virtualisation.containers.enable = true;
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
|
||||
# Required for containers under podman-compose to be able to talk to each other.
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
# We cannot use /home since nfs does not support fileattrs needed by podman
|
||||
systemd.tmpfiles.settings = {
|
||||
"podman-users" = lib.mapAttrs' (
|
||||
name: value:
|
||||
lib.nameValuePair ("/var/lib/podman-users/" + name) {
|
||||
d = {
|
||||
group = value.group;
|
||||
mode = value.homeMode;
|
||||
user = name;
|
||||
};
|
||||
}
|
||||
) (lib.filterAttrs (_: x: x.isNormalUser) config.users.users);
|
||||
};
|
||||
|
||||
# Useful other development tools
|
||||
environment.systemPackages = with pkgs; [
|
||||
dive # look into docker image layers
|
||||
podman-tui # status of containers in the terminal
|
||||
podman-compose # start group of containers for dev
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user