File tree Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Expand file tree Collapse file tree 1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change 1717 nixpkgs ,
1818 ...
1919 } @ inputs : let
20- inherit ( nixpkgs . lib ) getAttrs mapAttrs ;
20+ inherit ( nixpkgs . lib ) getAttrs mapAttrs nixosSystem ;
2121 pkgsFor = getAttrs [ "x86_64-linux" "aarch64-linux" ] nixpkgs . legacyPackages ;
2222 eachSystem = fn : mapAttrs fn pkgsFor ;
23+ specialArgs = { inherit inputs self ; } ;
2324 in {
2425 checks = eachSystem ( _ : pkgs : {
25- hjem-test = pkgs . callPackage ./nix/test {
26- specialArgs = { inherit inputs self ; } ;
27- } ;
26+ hjem-test = pkgs . callPackage ./nix/test { inherit specialArgs ; } ;
2827 } ) ;
2928
3029 hjemModules = {
3130 hjem-impure = ./nix/module.nix ;
3231 default = self . hjemModules . hjem-impure ;
3332 } ;
33+
34+ # $ nixos-rebuild --flake .#testVm build-vm
35+ # $ ./result/bin/run-nixos-vm
36+ nixosConfigurations . testVm = nixosSystem {
37+ system = "x86_64-linux" ;
38+ inherit specialArgs ;
39+ modules = [
40+ ./nix/test/config.nix
41+ ( { modulesPath , ...} : {
42+ imports = [
43+ ( modulesPath + "/profiles/qemu-guest.nix" )
44+ ( modulesPath + "/virtualisation/qemu-vm.nix" )
45+ ] ;
46+
47+ virtualisation . graphics = false ;
48+ users . users . kokomi . initialPassword = "kokomi" ;
49+ hjem . users . kokomi . clobberFiles = true ;
50+ } )
51+ ] ;
52+ } ;
3453 } ;
3554}
You can’t perform that action at this time.
0 commit comments