Update NixOS config.

This commit is contained in:
Elias Gasparis 2025-01-05 08:59:42 +08:00
parent fc8352ee4c
commit 195383e6d9
3 changed files with 30 additions and 17 deletions

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
{
imports =
@ -6,8 +6,13 @@
./gnome.nix
./systemd.nix
./fonts.nix
#module test
./nixosModules/docker.nix
];
# Enable/Disable Modules
dockerModule.enable = true;
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

24
nixosModules/docker.nix Normal file
View file

@ -0,0 +1,24 @@
{ pkgs, lib, config, ... }:
# enable docker
# not all systems need this
{
options = {
dockerModule.enable =
lib.mkEnableOption "enables Docker Module";
};
config = lib.mkIf config.dockerModule.enable {
# Enable Docker
virtualisation.docker = {
enable = true;
autoPrune = {
enable = true;
};
};
};
}

View file

@ -1,16 +0,0 @@
{ pkgs, lib, config, ... }:
# enable docker
# not all systems need this
{
options = {
};
config = {
# Enable Docker
virtualisation.docker.enable = true;
};
}