diff --git a/flake.nix b/flake.nix index 49bb7a32..dcf41f47 100644 --- a/flake.nix +++ b/flake.nix @@ -38,13 +38,10 @@ inherit system; modules = [ (import test/demo.nix { - pkgs = nixpkgsFor.x86_64-linux; - home-manager = inputs.home-manager; - module = self.homeManagerModules.plasma-manager; - extraPackages = with self.packages.${system}; [ - rc2nix - ]; + home-manager-module = inputs.home-manager.nixosModules.home-manager; + plasma-module = self.homeManagerModules.plasma-manager; }) + (_: {environment.systemPackages = [ self.packages.${system}.rc2nix]; }) ]; }).config.system.build.vm; diff --git a/test/demo.nix b/test/demo.nix index e585230d..4097d28f 100644 --- a/test/demo.nix +++ b/test/demo.nix @@ -1,25 +1,13 @@ -{ pkgs -, home-manager -, module -, extraPackages +{ home-manager-module +, plasma-module }: -let - homeConfig = { - imports = [ ../example/home.nix ]; - }; - - user = import ./user.nix { - inherit module home-manager homeConfig; - }; - -in { modulesPath, ... }: { imports = [ (modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/virtualisation/qemu-vm.nix") - user + home-manager-module ]; config = { @@ -40,13 +28,11 @@ in ]; }; - virtualisation = { - forwardPorts = [{ - from = "host"; - host.port = 2222; - guest.port = 22; - }]; - }; + virtualisation.forwardPorts = [{ + from = "host"; + host.port = 2222; + guest.port = 22; + }]; services.xserver = { enable = true; @@ -57,6 +43,18 @@ in displayManager.autoLogin.user = "fake"; }; - environment.systemPackages = extraPackages; + system.stateVersion = "22.05"; + + users.users.fake = { + createHome = true; + isNormalUser = true; + password = "password"; + group = "users"; + }; + + home-manager.users.fake = { + home.stateVersion = "22.05"; + imports = [ plasma-module ]; + }; }; }