Extract a docker mixin
This commit is contained in:
parent
a4cacfd4de
commit
44d2685854
11 changed files with 20 additions and 46 deletions
|
@ -2,14 +2,12 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
../../modules/mixins/docker.nix
|
||||||
|
|
||||||
../common
|
../common
|
||||||
../../users/opdavies
|
../../users/opdavies
|
||||||
];
|
];
|
||||||
|
|
||||||
nixosModules = {
|
|
||||||
docker.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
wsl = {
|
wsl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultUser = username;
|
defaultUser = username;
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
./services.nix
|
./services.nix
|
||||||
|
|
||||||
|
../../modules/mixins/docker.nix
|
||||||
|
|
||||||
./modules/acme.nix
|
./modules/acme.nix
|
||||||
|
|
||||||
../common
|
../common
|
||||||
|
@ -17,7 +20,6 @@
|
||||||
|
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
audiobookshelf.enable = true;
|
audiobookshelf.enable = true;
|
||||||
docker.enable = true;
|
|
||||||
immich.enable = true;
|
immich.enable = true;
|
||||||
jellyfin.enable = true;
|
jellyfin.enable = true;
|
||||||
paperless.enable = true;
|
paperless.enable = true;
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
./users.nix
|
./users.nix
|
||||||
|
|
||||||
../../modules/mixins/bluetooth.nix
|
../../modules/mixins/bluetooth.nix
|
||||||
|
../../modules/mixins/docker.nix
|
||||||
./modules/docker.nix
|
|
||||||
|
|
||||||
../common
|
../common
|
||||||
../../users/opdavies
|
../../users/opdavies
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
}
|
|
|
@ -9,8 +9,6 @@
|
||||||
./services
|
./services
|
||||||
./users.nix
|
./users.nix
|
||||||
|
|
||||||
./modules/docker.nix
|
|
||||||
|
|
||||||
../common
|
../common
|
||||||
../../users/opdavies
|
../../users/opdavies
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
}
|
|
12
modules/mixins/docker.nix
Normal file
12
modules/mixins/docker.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
autoPrune = {
|
||||||
|
enable = true;
|
||||||
|
dates = "weekly";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.opdavies.extraGroups = [ "docker" ];
|
||||||
|
}
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./docker.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
|
||||||
options.nixosModules.docker.enable = mkEnableOption "Enable Docker";
|
|
||||||
|
|
||||||
config = mkIf config.nixosModules.docker.enable {
|
|
||||||
virtualisation.docker = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
autoPrune = {
|
|
||||||
enable = true;
|
|
||||||
dates = "weekly";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./cli
|
|
||||||
./desktop
|
./desktop
|
||||||
./gaming.nix
|
./gaming.nix
|
||||||
./homelab
|
./homelab
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{ lib, pkgs, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -16,7 +11,7 @@ with lib;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"wheel"
|
"wheel"
|
||||||
] ++ optionals config.virtualisation.docker.enable [ "docker" ];
|
];
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
qrencode
|
qrencode
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue