Nixos 22.11 Racoon #153
|
@ -1,19 +1,23 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
with lib;
|
lib,
|
||||||
let
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
psCfg = config.pub-solar;
|
psCfg = config.pub-solar;
|
||||||
cfg = config.pub-solar.docker;
|
cfg = config.pub-solar.docker;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.pub-solar.docker = {
|
options.pub-solar.docker = {
|
||||||
enable = mkEnableOption "Life in metal boxes";
|
enable = mkEnableOption "Life in metal boxes";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
users.users = with pkgs; pkgs.lib.setAttrByPath [ psCfg.user.name ] {
|
users.users = with pkgs;
|
||||||
extraGroups = [ "docker" ];
|
pkgs.lib.setAttrByPath [psCfg.user.name] {
|
||||||
};
|
extraGroups = ["docker"];
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
docker-compose
|
docker-compose
|
||||||
|
|
Loading…
Reference in a new issue