deploy-rs works for raspberrypi

This commit is contained in:
Pim Kunis 2024-02-27 20:14:53 +01:00
parent c2e2ed5ea8
commit 1683c4caa8
4 changed files with 34 additions and 11 deletions

View file

@ -198,6 +198,22 @@
"type": "github" "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1702272962, "lastModified": 1702272962,
@ -253,6 +269,7 @@
"disko": "disko", "disko": "disko",
"dns": "dns", "dns": "dns",
"microvm": "microvm", "microvm": "microvm",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable" "nixpkgs-unstable": "nixpkgs-unstable"
} }

View file

@ -5,6 +5,7 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
deploy-rs.url = "github:serokell/deploy-rs"; deploy-rs.url = "github:serokell/deploy-rs";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
disko = { disko = {
url = "github:nix-community/disko"; url = "github:nix-community/disko";
@ -28,7 +29,7 @@
}; };
outputs = outputs =
{ self, nixpkgs, deploy-rs, disko, agenix, nixpkgs-unstable, dns, microvm, ... }: { self, nixpkgs, deploy-rs, disko, agenix, nixpkgs-unstable, dns, microvm, nixos-hardware, ... }:
let let
pkgs = nixpkgs.legacyPackages."x86_64-linux"; pkgs = nixpkgs.legacyPackages."x86_64-linux";
lib = pkgs.lib; lib = pkgs.lib;
@ -69,7 +70,7 @@
nixosConfigurations = mkNixosSystems (name: machine: { nixosConfigurations = mkNixosSystems (name: machine: {
system = machine.arch; system = machine.arch;
specialArgs = { inherit machines machine dns microvm disko agenix; }; specialArgs = { inherit machines machine dns microvm disko agenix nixos-hardware; };
modules = [ modules = [
./nixos ./nixos
{ networking.hostName = name; } { networking.hostName = name; }

View file

@ -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 = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
microvm.nixosModules.host microvm.nixosModules.host
nixos-hardware.nixosModules.raspberry-pi-4
]; ];
config = { 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 = { # boot = {
# # kernelModules = [ "kvm-intel" ]; # # kernelModules = [ "kvm-intel" ];
# kernelModules = [ ]; # kernelModules = [ ];

View file

@ -74,14 +74,14 @@
}]; }];
services.openssh = { services.openssh = {
hostKeys = [{ # hostKeys = [{
path = "/etc/ssh/host_keys/ssh_host_ed25519_key"; # path = "/etc/ssh/host_keys/ssh_host_ed25519_key";
type = "ed25519"; # type = "ed25519";
}]; # }];
extraConfig = '' # extraConfig = ''
HostKey /etc/ssh/host_keys/ssh_host_ed25519_key # HostKey /etc/ssh/host_keys/ssh_host_ed25519_key
''; # '';
}; };
microvm = { microvm = {