Skip to content

Commit

Permalink
Merge pull request #308 from nix-community/nixos-facter
Browse files Browse the repository at this point in the history
de-vendor nixos-facter
  • Loading branch information
Mic92 authored Dec 3, 2024
2 parents 5239c78 + c7ccaf5 commit a5e3e9e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 77 deletions.
2 changes: 1 addition & 1 deletion nix/installer.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
pkgs.rsync
# alternative to nixos-generate-config
# TODO: use nixpkgs again after next nixos release
(pkgs.callPackage ./nixos-facter.nix {})
pkgs.nixos-facter

pkgs.disko
];
Expand Down
7 changes: 2 additions & 5 deletions nix/kexec-installer/test.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ pkgs
, lib
, kexecTarball
, nixos-facter ? null
}:

pkgs.testers.runNixOSTest {
Expand Down Expand Up @@ -167,10 +166,8 @@ pkgs.testers.runNixOSTest {
host = ssh(["hostname"], stdout=subprocess.PIPE).stdout.strip()
assert host == "nixos-installer", f"hostname is {host}, not nixos-installer"
has_nixos_facter=${if nixos-facter != null then "True" else "False"}
if has_nixos_facter == True:
data = json.loads(ssh(["nixos-facter"], stdout=subprocess.PIPE).stdout)
assert data["virtualisation"] == "kvm", f"virtualisation is {data['virtualisation']}, not kvm"
data = json.loads(ssh(["nixos-facter"], stdout=subprocess.PIPE).stdout)
assert data["virtualisation"] == "kvm", f"virtualisation is {data['virtualisation']}, not kvm"
host_ed25519_after = ssh(["cat", "/etc/ssh/ssh_host_ed25519_key.pub"], stdout=subprocess.PIPE).stdout.strip()
assert host_ed25519_before == host_ed25519_after, f"'{host_ed25519_before}' != '{host_ed25519_after}'"
Expand Down
71 changes: 0 additions & 71 deletions nix/nixos-facter.nix

This file was deleted.

0 comments on commit a5e3e9e

Please sign in to comment.