srid / nixos-config

KISS NixOS configuration based on Flakes & flake-parts (supports macOS too)
433 stars 17 forks source link

Reintroduce temp VMs #26

Closed srid closed 1 year ago

srid commented 1 year ago
          # For downloading stuff off internet in VPN.
          #
          # This is run in qemu only, which is useful to keep the host machine
          # directly connected to the network (for acccess from outside).
          #
          # > nixos-shell --flake github:srid/nixos-config#corsair
          corsair = pkgs.lib.makeOverridable nixpkgs.lib.nixosSystem {
            inherit system pkgs;
            specialArgs = { inherit system inputs; };
            modules = [
              inputs.nixos-shell.nixosModules.nixos-shell
              {
                virtualisation = {
                  memorySize = 8 * 1024;
                  cores = 2;
                  diskSize = 20 * 1024;
                };
                environment.systemPackages = with pkgs; [
                  protonvpn-cli
                  aria2
                ];
                nixos-shell.mounts = {
                  mountHome = false;
                  mountNixProfile = false;
                  extraMounts."/Downloads" = {
                    target = "/home/${userName}/Downloads";
                    cache = "none";
                  };
                };
              }
            ];
          };
        };