Add raspberry image builder flake
This commit is contained in:
parent
92f1230a7e
commit
85d1ea4d4d
3 changed files with 28 additions and 6 deletions
30
flake.nix
30
flake.nix
|
@ -38,6 +38,12 @@
|
|||
|
||||
{
|
||||
nixosConfigurations = {
|
||||
foureighty = mkWorkstation nixpkgs-stable "x86_64-linux" "foureighty";
|
||||
skinnyv = mkWorkstation nixpkgs-stable "x86_64-linux" "skinnyv";
|
||||
thinky = mkWorkstation nixpkgs-stable "x86_64-linux" "thinky";
|
||||
bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty";
|
||||
vultr1 = mkServer nixpkgs-stable "x86_64-linux" "vultr1";
|
||||
|
||||
bootstrap = nixpkgs-stable.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
|
@ -45,11 +51,25 @@
|
|||
];
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
foureighty = mkWorkstation nixpkgs-stable "x86_64-linux" "foureighty";
|
||||
skinnyv = mkWorkstation nixpkgs-stable "x86_64-linux" "skinnyv";
|
||||
thinky = mkWorkstation nixpkgs-stable "x86_64-linux" "thinky";
|
||||
bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty";
|
||||
vultr1 = mkServer nixpkgs-stable "x86_64-linux" "vultr1";
|
||||
# nix build .#nixosConfigurations.raspiimage.config.system.build.sdImage
|
||||
raspiimage = nixpkgs-stable.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
(import "${inputs.nixpkgs-stable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix")
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = inputs.nixpkgs-stable.lib.mkForce "prohibit-password";
|
||||
passwordAuthentication = false;
|
||||
};
|
||||
users.extraUsers.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE5Ejx5CAPUfHVXi4GL4WmnZaG8eiiOmsW/a0o1bs1GF cyryl@foureighty"
|
||||
];
|
||||
sdImage.compressImage = false;
|
||||
}
|
||||
];
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
};
|
||||
};
|
||||
inputs = {
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
options = [ "compress=zstd" ];
|
||||
};
|
||||
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
../../backups.nix
|
||||
];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest_hardened;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
time.timeZone = "Europe/London";
|
||||
|
|
Loading…
Reference in a new issue