Add docker.

This commit is contained in:
Tom Alexander 2025-01-01 14:10:08 -05:00
parent 7bb7b89b82
commit f843b7924f
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 40 additions and 0 deletions

View File

@ -39,6 +39,7 @@
./roles/bsnes ./roles/bsnes
./roles/ssh ./roles/ssh
./roles/python ./roles/python
./roles/docker
]; ];
nix.settings.experimental-features = [ nix.settings.experimental-features = [

View File

@ -0,0 +1,39 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [ ];
virtualisation.docker.enable = true;
virtualisation.docker.rootless = {
enable = true;
setSocketVariable = true;
};
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
hideMounts = true;
directories = [
{
directory = "/var/lib/docker";
user = "root";
group = "root";
mode = "0740";
}
];
users.talexander = {
directories = [
{
directory = ".local/share/docker";
user = "talexander";
group = "talexander";
mode = "0740";
}
];
};
};
}