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 = {
|
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 {
|
bootstrap = nixpkgs-stable.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
|
@ -45,11 +51,25 @@
|
||||||
];
|
];
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
};
|
};
|
||||||
foureighty = mkWorkstation nixpkgs-stable "x86_64-linux" "foureighty";
|
# nix build .#nixosConfigurations.raspiimage.config.system.build.sdImage
|
||||||
skinnyv = mkWorkstation nixpkgs-stable "x86_64-linux" "skinnyv";
|
raspiimage = nixpkgs-stable.lib.nixosSystem {
|
||||||
thinky = mkWorkstation nixpkgs-stable "x86_64-linux" "thinky";
|
system = "aarch64-linux";
|
||||||
bolty = mkServer nixpkgs-stable "x86_64-linux" "bolty";
|
modules = [
|
||||||
vultr1 = mkServer nixpkgs-stable "x86_64-linux" "vultr1";
|
(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 = {
|
inputs = {
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
options = [ "compress=zstd" ];
|
options = [ "compress=zstd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
|
|
||||||
zramSwap = {
|
zramSwap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
algorithm = "zstd";
|
algorithm = "zstd";
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
../../backups.nix
|
../../backups.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest_hardened;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
time.timeZone = "Europe/London";
|
time.timeZone = "Europe/London";
|
||||||
|
|
Loading…
Reference in a new issue