Compare commits

...

1 Commits
main ... vm

Author SHA1 Message Date
ef51ac1642 Add box derivation to build a vm 2024-07-10 22:56:31 +02:00
3 changed files with 47 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.swp
result
*.qcow2

37
flake.lock generated
View File

@ -21,6 +21,42 @@
"type": "github"
}
},
"nixlib": {
"locked": {
"lastModified": 1719708727,
"narHash": "sha256-XFNKtyirrGNdehpg7lMNm1skEcBApjqGhaHc/OI95HY=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "1bba8a624b3b9d4f68db94fb63aaeb46039ce9e6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixos-generators": {
"inputs": {
"nixlib": "nixlib",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1720055043,
"narHash": "sha256-SKizewU4UeYrkZWPUjur8EoxscGoNb0pGcrNL4YzAIg=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "168b220231a70e47cc1f0919048fa5914415fb18",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-generators",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1720553833,
@ -40,6 +76,7 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs"
}
}

View File

@ -5,9 +5,13 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, ...}:
outputs = { self, nixpkgs, home-manager, nixos-generators,...}:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
@ -28,5 +32,9 @@
modules = [ ./home/rothe.nix ];
};
};
box = nixos-generators.nixosGenerate {
system = "x86_64-linux";
format = "vm";
};
};
}