You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{inputs={nixpkgs.url="github:NixOS/nixpkgs/nixpkgs-unstable";generators.url="github:nix-community/nixos-generators";};outputs={self, ... }@inputs:
let# TODO add cross-platform buildplatform="x86_64";os="linux";system="${platform}-${os}";pkgs=importinputs.nixpkgs{inheritsystem;};lib={mkSystem=options:
letinherit(inputs.nixpkgs.lib)nixosSystem;inherit(inputs.generators)nixosGenerate;inherit(builtins)hasAttr;inifhasAttr"format"optionsthennixosGenerateoptionselsenixosSystemoptions;# TODO: find a faster way to run vm in devShellmkVirtualMachine=efi: name: args: pkgs.writeShellApplication{name="${name}-vm";text='' IMG="${name}-efi.img" BIOS="${name}-efi-bios.img" ARGS="${args}" cp -ui --reflink=auto ${pkgs.OVMF.fd}/FV/OVMF.fd "$BIOS" chmod a+w "$BIOS" cp -ui --reflink=auto ${efi}/nixos.img "$IMG" chmod a+w "$IMG" qemu-system-${platform} \ -bios "$BIOS" \ -drive file="$IMG",format=raw \ -m 2G \ $ARGS '';runtimeInputs=withpkgs;[qemu];};};machines=import./machines{inheritsystempkgslib;};in{nixosConfigurations={inherit(machines.recover)recover-os;inherit(machines.cache)cache-os;};packages.${system}={inherit(machines.recover)recover-efirecover-vmrecover-kvm;inherit(machines.cache)cache-eficache-vmcache-kvm;};devShells.${system}.default=pkgs.mkShell{packages=withmachines;[recover.recover-vmrecover.recover-kvmcache.cache-vmcache.cache-kvm];};};# --- Flake Local Nix Configuration ----------------------------nixConfig={extra-experimental-features="nix-command flakes";# This sets the flake to use nix cache.# Nix should ask for permission before using it,# but remove it here if you do not want it to.
The text was updated successfully, but these errors were encountered:
os/flake.nix
Line 9 in 8e98f01
The text was updated successfully, but these errors were encountered: