Compare commits

...
Sign in to create a new pull request.

1 commit
master ... rpi2

Author SHA1 Message Date
Paul-Henri Froidmont
d5dbab8d5b
wip 2022-09-15 22:01:56 +02:00
2 changed files with 23 additions and 2 deletions

View file

@ -1,10 +1,11 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-22.05";
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
}; };
outputs = { self, home-manager, nixpkgs }: { outputs = { self, home-manager, nixpkgs, nixpkgs-stable }: {
nixosConfigurations.nixos-desktop = nixpkgs.lib.nixosSystem { nixosConfigurations.nixos-desktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
@ -155,5 +156,25 @@
) )
]; ];
}; };
nixosConfigurations.rpi2 = nixpkgs-stable.lib.nixosSystem {
system = "armv7l-linux";
modules = [
"${nixpkgs-stable}/nixos/modules/installer/sd-card/sd-image-raspberrypi.nix"
{
networking.hostName = "rpi2";
nixpkgs.config.allowUnsupportedSystem = true;
nixpkgs.crossSystem.system = "armv7l-linux";
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keyFiles = [
./ssh_keys/phfroidmont-desktop.pub
./ssh_keys/phfroidmont-laptop.pub
];
system.stateVersion = "22.05";
}
];
};
images.rpi2 = self.nixosConfigurations.rpi2.config.system.build.sdImage;
}; };
} }

View file

@ -87,5 +87,5 @@
# Required for custom GTK themes # Required for custom GTK themes
services.dbus.packages = with pkgs; [ dconf ]; services.dbus.packages = with pkgs; [ dconf ];
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" "armv7l-linux" ];
} }