Add docker.
This commit is contained in:
parent
7bb7b89b82
commit
f843b7924f
@ -39,6 +39,7 @@
|
||||
./roles/bsnes
|
||||
./roles/ssh
|
||||
./roles/python
|
||||
./roles/docker
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = [
|
||||
|
39
nix/configuration/roles/docker/default.nix
Normal file
39
nix/configuration/roles/docker/default.nix
Normal 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";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user