Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pxe boot #50

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "nixos-anywhere-pxe"
description = "Install NixOS with PXE"
dynamic = ["version"]
scripts = { nixos-anywhere-pxe = "nixos_anywhere_pxe:main"}

[tool.pytest.ini_options]
addopts = "--cov . --cov-report term --cov-fail-under=100 --no-cov-on-fail"

[tool.mypy]
python_version = "3.10"
warn_redundant_casts = true
disallow_untyped_calls = true
disallow_untyped_defs = true
no_implicit_optional = true

[[tool.mypy.overrides]]
module = "setuptools.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "pytest.*"
ignore_missing_imports = true

[tool.ruff]
line-length = 88

select = ["E", "F", "I"]
ignore = [ "E501" ]

[tool.black]
line-length = 88
target-version = ['py310']
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
# The following are specific to Black, you probably don't want those.
| blib2to3
| tests/data
| profiling
)/
'''
16 changes: 15 additions & 1 deletion src/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
, lib
, makeWrapper
, mkShellNoCC
, mypy
, pixiecore
, dnsmasq
, python3
, qemu_kvm
, OVMF
}:
let
runtimeDeps = [
Expand Down Expand Up @@ -47,7 +53,15 @@ stdenv.mkDerivation {

# Dependencies for our devshell
passthru.devShell = mkShellNoCC {
packages = runtimeDeps ++ [ openssh terraform-docs ];
OVMF = "${OVMF.fd}/FV/OVMF.fd";
packages = runtimeDeps ++ [
openssh
terraform-docs
mypy
pixiecore
dnsmasq
qemu_kvm
];
};

meta = with lib; {
Expand Down
3 changes: 2 additions & 1 deletion src/flake-module.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
perSystem = { config, pkgs, ... }: {
packages = {
packages = rec {
nixos-anywhere = pkgs.callPackage ./. { };
nixos-anywhere-pxe = pkgs.callPackage ./nixos_anywhere_pxe { inherit nixos-anywhere; };
default = config.packages.nixos-anywhere;
};
devShells.default = config.packages.nixos-anywhere.devShell;
Expand Down
Loading