diff options
| author | Stefan Kreutz <mail@skreutz.com> | 2026-04-11 00:00:31 +0200 |
|---|---|---|
| committer | Stefan Kreutz <mail@skreutz.com> | 2026-04-11 00:00:31 +0200 |
| commit | 3aff7ec4e612535e81e8625ce8eba59895df76e3 (patch) | |
| tree | 3f87404c18eaafd62dd48d0cadab9bce22b71ad0 | |
| parent | d230cf732d0b17b0ac7d3a8b645072539345a9da (diff) | |
| download | autoinstall-openbsd-on-qemu-3aff7ec4e612535e81e8625ce8eba59895df76e3.tar.gz | |
Add experimental Nix flake and direnv config
| -rw-r--r-- | .envrc | 1 | ||||
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | flake.lock | 61 | ||||
| -rw-r--r-- | flake.nix | 42 |
4 files changed, 105 insertions, 0 deletions
@@ -0,0 +1 @@ +use flake @@ -3,3 +3,4 @@ /site /disk.qcow2 /tmp +/.direnv diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..a94c2d1 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1775087534, + "narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1775763530, + "narHash": "sha256-BuTK9z1QEwWPOIakQ1gCN4pa4VwVJpfptYCviy2uOGc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b0188973b4b2a5b6bdba8b65381d6cd09a533da0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1774748309, + "narHash": "sha256-+U7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "333c4e0545a6da976206c74db8773a1645b5870a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..5d59de4 --- /dev/null +++ b/flake.nix @@ -0,0 +1,42 @@ +{ + description = "Auto-install OpenBSD on QEMU"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + }; + + outputs = + inputs@{ + self, + nixpkgs, + flake-parts, + ... + }: + flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + perSystem = + { pkgs, system, ... }: + { + devShells.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + curl + python3 + qemu + rsync + signify + socat + ]; + }; + + # nix fmt + formatter = pkgs.nixfmt-tree; + }; + }; +} |