diff options
author | Aria <me@aria.rip> | 2023-11-03 14:03:47 +0000 |
---|---|---|
committer | Aria <me@aria.rip> | 2023-11-03 14:03:47 +0000 |
commit | 318522a2613ec7242b2559be66b5edf466a2e5ef (patch) | |
tree | d7f77f065e51e8d28130dad9e7799c8b84b32dfe /tardis-new/flake.nix | |
parent | c6d0cb4950e9d1737a977b134c79a57b37e3327a (diff) |
mess around with tardis stuff
Diffstat (limited to 'tardis-new/flake.nix')
-rw-r--r-- | tardis-new/flake.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tardis-new/flake.nix b/tardis-new/flake.nix new file mode 100644 index 0000000..a72caf1 --- /dev/null +++ b/tardis-new/flake.nix @@ -0,0 +1,47 @@ +{ + description = "NixOS in MicroVMs"; + + inputs = { + nixos.url = "github:nixos/nixpkgs/nixos-23.05"; + + microvm.url = "github:astro/microvm.nix"; + microvm.inputs.nixpkgs.follows = "nixos"; + }; + + outputs = inputs @ { + self, + nixos, + microvm, + }: let + system = (import ./lib/consts.nix).system; + overlays = [ + # Access helpful variables from nixpkgs + (_: prev: prev // {inherit inputs overlays;}) + + # Add our custom library functions + (final: prev: prev // {lib = prev.lib // import ./lib final;}) + ]; + pkgs = import nixos {inherit system overlays;}; + in { + packages.${system} = { + my-microvm = self.nixosConfigurations.my-microvm.config.microvm.declaredRunner; + }; + + nixosConfigurations = { + my-microvm = nixos.lib.nixosSystem { + inherit (pkgs) system; + inherit pkgs; + specialArgs = {inherit (pkgs) lib;}; + modules = [ + {nixpkgs.overlays = pkgs.overlays;} + microvm.nixosModules.microvm + ./modules/common.nix + { + networking.hostName = "test"; + users.users.root.password = "1234"; + } + ]; + }; + }; + }; +} |