From 28847f1d2a4463d2f5c251154f38b0a928a7007d Mon Sep 17 00:00:00 2001 From: Aditya Date: Wed, 10 Apr 2024 23:50:53 +0530 Subject: [PATCH] add virtualisation --- hosts/default/configuration.nix | 7 ------- modules/nixos/default.nix | 1 + modules/nixos/virtualisation/default.nix | 12 ++++++++++++ 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 modules/nixos/virtualisation/default.nix diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index e26b6e6..71c73bf 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -122,13 +122,6 @@ }; }; - virtualisation.libvirtd.enable = true; - virtualisation.waydroid.enable = true; - virtualisation.docker.enable = true; - virtualisation.lxc.enable = true; - virtualisation.lxc.lxcfs.enable = true; - virtualisation.incus.enable = true; - # Allow unfree packages nixpkgs.config = { allowUnfree = true; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 7ce3811..11fbeea 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -10,5 +10,6 @@ ./locale ./networking ./sound + ./virtualisation ]; } diff --git a/modules/nixos/virtualisation/default.nix b/modules/nixos/virtualisation/default.nix new file mode 100644 index 0000000..582c60a --- /dev/null +++ b/modules/nixos/virtualisation/default.nix @@ -0,0 +1,12 @@ +_: { + virtualisation = { + docker.enable = true; + incus.enable = true; + libvirtd.enable = true; + lxc = { + enable = true; + lxcfs.enable = true; + }; + waydroid.enable = true; + }; +}