add docker module, add common modules to hsots/common

This commit is contained in:
Anthony Rodriguez 2024-09-08 15:57:30 +02:00
parent c84c184119
commit 606e41d3ee
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
5 changed files with 23 additions and 5 deletions

View file

@ -5,4 +5,9 @@ _:
./syncthing
./sops.nix
];
modules.gnome.enable = true;
modules.stylix.enable = true;
modules.docker.enable = true;
modules.pipewire.enable = true;
}

View file

@ -33,11 +33,8 @@
];
};
modules.gnome.enable = true;
modules.stylix.enable = true;
modules.nvidia.enable = true;
modules.gaming.enable = true;
modules.pipewire.enable = true;
stylix.image = ../../wallpapers/lucy-edgerunners-wallpaper.jpg;
}

View file

@ -22,7 +22,5 @@
};
};
};
modules.gnome.enable = true;
modules.stylix.enable = true;
}

View file

@ -1,6 +1,7 @@
_:
{
imports = [
./docker.nix
./pipewire.nix
./nvidia.nix
./gnome.nix

17
modules/docker.nix Normal file
View file

@ -0,0 +1,17 @@
{ config, lib, ... }:
let
cfg = config.modules.docker;
in
{
options.modules.docker.enable = lib.mkEnableOption "docker module";
config = lib.mkIf cfg.enable {
virtualisation.docker = {
enable = true;
rootless = {
enable = true;
setSocketVariable = true;
};
};
users.users.nezia.extraGroups = [ "docker" ];
};
}