mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 01:44:40 +02:00
system/docker: modularize
This commit is contained in:
parent
082478e688
commit
19520eae7f
5 changed files with 40 additions and 15 deletions
|
@ -1,13 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker
|
||||
docker-compose
|
||||
];
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
autoPrune.enable = true;
|
||||
};
|
||||
}
|
|
@ -6,10 +6,9 @@
|
|||
./dyndns.nix
|
||||
./services.nix
|
||||
./syncthing.nix
|
||||
./system.nix
|
||||
./wifi.nix
|
||||
../../legacy/modules/avahi.nix
|
||||
../../legacy/modules/docker.nix
|
||||
../../legacy/modules/nix.nix
|
||||
../../legacy/modules/webapps/bazarr.nix
|
||||
../../legacy/modules/webapps/prowlarr.nix
|
||||
../../legacy/modules/webapps/radarr.nix
|
||||
|
|
10
machines/serverle/system.nix
Normal file
10
machines/serverle/system.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
# enabled system services
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
secrets = config.sops.secrets;
|
||||
in
|
||||
{
|
||||
my.system = {
|
||||
docker.enable = true;
|
||||
};
|
||||
}
|
7
modules/system/default.nix
Normal file
7
modules/system/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./docker
|
||||
];
|
||||
}
|
||||
|
22
modules/system/docker/default.nix
Normal file
22
modules/system/docker/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Docker related settings
|
||||
{ config, inputs, lib, options, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.system.docker;
|
||||
in
|
||||
{
|
||||
options.my.system.docker = with lib; {
|
||||
enable = mkEnableOption "docker configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker
|
||||
docker-compose
|
||||
];
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
autoPrune.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue