forked from clan/clan-core
Merge pull request 'nixosModules.installer: move into packages' (#18) from installer-ci-hotfix into main
Reviewed-on: clan/clan-core#18
This commit is contained in:
commit
d17ae02a43
@ -1,8 +1,11 @@
|
||||
{ self, ... }: {
|
||||
{ self, lib, ... }: {
|
||||
flake.packages.x86_64-linux = {
|
||||
inherit
|
||||
(self.nixosConfigurations.installer.config.formats)
|
||||
install-iso
|
||||
;
|
||||
install-iso = (lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
self.nixosModules.installer
|
||||
self.inputs.nixos-generators.nixosModules.all-formats
|
||||
];
|
||||
}).config.formats.install-iso;
|
||||
};
|
||||
}
|
||||
|
16
flake.nix
16
flake.nix
@ -12,8 +12,13 @@
|
||||
};
|
||||
|
||||
outputs = inputs @ { flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, config, ... }: {
|
||||
systems = lib.systems.flakeExposed;
|
||||
flake-parts.lib.mkFlake { inherit inputs; } ({ ... }: {
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
imports = [
|
||||
./flake-parts/packages.nix
|
||||
./flake-parts/formatting.nix
|
||||
@ -21,13 +26,6 @@
|
||||
./pkgs/clan-cli/flake-module.nix
|
||||
];
|
||||
flake = {
|
||||
nixosConfigurations.installer = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
config.flake.nixosModules.installer
|
||||
inputs.nixos-generators.nixosModules.all-formats
|
||||
];
|
||||
};
|
||||
nixosModules = {
|
||||
installer = {
|
||||
imports = [
|
||||
|
@ -1,10 +1,13 @@
|
||||
import sys
|
||||
|
||||
import clan_cli
|
||||
import pytest
|
||||
|
||||
import clan_cli
|
||||
|
||||
def test_no_args(capsys: pytest.CaptureFixture, monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
|
||||
def test_no_args(
|
||||
capsys: pytest.CaptureFixture, monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
monkeypatch.setattr(sys, "argv", [""])
|
||||
clan_cli.main()
|
||||
captured = capsys.readouterr()
|
||||
|
@ -11,7 +11,9 @@ def test_no_args(capsys: pytest.CaptureFixture) -> None:
|
||||
assert captured.out.startswith("usage:")
|
||||
|
||||
|
||||
def test_version(capsys: pytest.CaptureFixture, monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
def test_version(
|
||||
capsys: pytest.CaptureFixture, monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
monkeypatch.setattr(sys, "argv", ["", "--version"])
|
||||
my_tool.my_cli()
|
||||
captured = capsys.readouterr()
|
||||
|
Loading…
Reference in New Issue
Block a user