diff --git a/.gitignore b/.gitignore index 5ff746b..9d8f60e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ leng.log leng.toml .DS_Store -result \ No newline at end of file +result +*.qcow2 diff --git a/flake.nix b/flake.nix index 26073b0..88a557f 100644 --- a/flake.nix +++ b/flake.nix @@ -160,6 +160,37 @@ ]; }; }; + + + # this is a simple NixOS VM that can be used for trying out the NixOS module outside of a NixOS test + nixosConfigurations.aarch-darwin-leng-test = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ + self.nixosModules.default + { + virtualisation.vmVariant.virtualisation.graphics = false; + virtualisation.vmVariant.virtualisation.host.pkgs = nixpkgs.legacyPackages.aarch64-darwin; + services.getty.autologinUser = "root"; + system.stateVersion = "24.11"; + # fileSystems."/" = { + # device = "rpool/local/root"; + # fsType = "zfs"; + # }; + networking.nameservers = [ "127.0.0.1" ]; + + + services.leng = { + enable = true; + configuration = { + api = "127.0.0.1:8080"; + metrics.enabled = true; + blocking.sourcesStore = "/var/lib/leng-sources"; + upstream.doh = "https://1.1.1.1/dns-query"; + }; + }; + } + ]; + }; }; }