profiles/dev: separate containers and virtual machines setup

This commit is contained in:
Gabriel Arazas 2023-12-18 00:11:11 +08:00
parent 3d94c89bea
commit 40d286ac3a
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
3 changed files with 11 additions and 3 deletions

View File

@ -14,7 +14,8 @@ in
profiles.dev = { profiles.dev = {
enable = true; enable = true;
extras.enable = true; extras.enable = true;
virtualization.enable = true; containers.enable = true;
virtual-machines.enable = true;
neovim.enable = true; neovim.enable = true;
}; };

View File

@ -33,5 +33,5 @@
# Setting the development environment mainly for container-related work. # Setting the development environment mainly for container-related work.
profiles.dev.enable = true; profiles.dev.enable = true;
profiles.dev.virtualization.enable = true; profiles.dev.containers.enable = true;
} }

View File

@ -7,6 +7,7 @@ in {
enable = lib.mkEnableOption "basic configuration for software development"; enable = lib.mkEnableOption "basic configuration for software development";
extras.enable = lib.mkEnableOption "additional shell utilities"; extras.enable = lib.mkEnableOption "additional shell utilities";
containers.enable = lib.mkEnableOption "containers setup"; containers.enable = lib.mkEnableOption "containers setup";
virtual-machines.enable = lib.mkEnableOption "virtual machines setup";
neovim.enable = lib.mkEnableOption "Neovim setup"; neovim.enable = lib.mkEnableOption "Neovim setup";
}; };
@ -122,7 +123,7 @@ in {
}) })
# !!! Please add your user to the "libvirtd" group. # !!! Please add your user to the "libvirtd" group.
(lib.mkIf cfg.virtualization.enable { (lib.mkIf cfg.containers.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
dive # Dive into container images. dive # Dive into container images.
]; ];
@ -163,6 +164,12 @@ in {
"registry.opensuse.org" "registry.opensuse.org"
]; ];
}; };
})
(lib.mkIf cfg.virtual-machines.enable {
environment.systemPackages = with pkgs; [
virt-manager # An interface for those who are lazy to read a reference manual and create a 1000-line configuration per machine.
];
# Virtual machines, son. They open in response to physical needs to # Virtual machines, son. They open in response to physical needs to
# foreign environments. # foreign environments.