diff --git a/flake.lock b/flake.lock index 4c9d906..5b6d7de 100644 --- a/flake.lock +++ b/flake.lock @@ -198,6 +198,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1708594753, + "narHash": "sha256-c/gH7iXS/IYH9NrFOT+aJqTq+iEBkvAkpWuUHGU3+f0=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "3f7d0bca003eac1a1a7f4659bbab9c8f8c2a0958", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1702272962, @@ -253,6 +269,7 @@ "disko": "disko", "dns": "dns", "microvm": "microvm", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable" } diff --git a/flake.nix b/flake.nix index 6078051..f10eb34 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,7 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; deploy-rs.url = "github:serokell/deploy-rs"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; disko = { url = "github:nix-community/disko"; @@ -28,7 +29,7 @@ }; outputs = - { self, nixpkgs, deploy-rs, disko, agenix, nixpkgs-unstable, dns, microvm, ... }: + { self, nixpkgs, deploy-rs, disko, agenix, nixpkgs-unstable, dns, microvm, nixos-hardware, ... }: let pkgs = nixpkgs.legacyPackages."x86_64-linux"; lib = pkgs.lib; @@ -69,7 +70,7 @@ nixosConfigurations = mkNixosSystems (name: machine: { system = machine.arch; - specialArgs = { inherit machines machine dns microvm disko agenix; }; + specialArgs = { inherit machines machine dns microvm disko agenix nixos-hardware; }; modules = [ ./nixos { networking.hostName = name; } diff --git a/nixos/physical.nix b/nixos/physical.nix index df1e959..13251f3 100644 --- a/nixos/physical.nix +++ b/nixos/physical.nix @@ -1,7 +1,8 @@ -{ pkgs, config, lib, modulesPath, microvm, disko, agenix, machines, dns, machine, ... }: { +{ pkgs, config, lib, modulesPath, microvm, disko, agenix, machines, dns, machine, nixos-hardware, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") microvm.nixosModules.host + nixos-hardware.nixosModules.raspberry-pi-4 ]; config = { @@ -14,7 +15,11 @@ }; }; - boot.loader.grub.device = "/dev/sda"; + # boot.loader.grub.device = "/dev/sda"; + # boot.loader.grub.enable = true; + # boot.loader.grub.efiSupport = true; + # boot.loader.grub.efiInstallAsRemovable = true; + # boot.loader.grub.device = "nodev"; # boot = { # # kernelModules = [ "kvm-intel" ]; # kernelModules = [ ]; diff --git a/nixos/virtual/default.nix b/nixos/virtual/default.nix index f3bf85b..ad37f90 100644 --- a/nixos/virtual/default.nix +++ b/nixos/virtual/default.nix @@ -74,14 +74,14 @@ }]; services.openssh = { - hostKeys = [{ - path = "/etc/ssh/host_keys/ssh_host_ed25519_key"; - type = "ed25519"; - }]; + # hostKeys = [{ + # path = "/etc/ssh/host_keys/ssh_host_ed25519_key"; + # type = "ed25519"; + # }]; - extraConfig = '' - HostKey /etc/ssh/host_keys/ssh_host_ed25519_key - ''; + # extraConfig = '' + # HostKey /etc/ssh/host_keys/ssh_host_ed25519_key + # ''; }; microvm = {