Testing rpi4 images
This commit is contained in:
parent
890d6008c6
commit
832799e18a
3 changed files with 45 additions and 5 deletions
11
flake.nix
11
flake.nix
|
@ -19,6 +19,9 @@
|
|||
libx = import ./lib { inherit inputs outputs stateVersion hmStateVersion; };
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
# Generic Images
|
||||
nixos-rpi4-img = libx.mkHost { hostname = "nixos-rpi4-img"; platform = "aarch64-linux"; };
|
||||
# Host Specific Configs
|
||||
nixos-laptop = libx.mkHost { hostname = "nixos-laptop"; desktop = "hyprland"; gpu = "intel"; theme = "gruvbox"; };
|
||||
nixos-framework = libx.mkHost { hostname = "nixos-framework"; desktop = "hyprland"; gpu = "amd"; theme = "gruvbox"; };
|
||||
nixos-rpi4-01 = libx.mkHost { hostname = "nixos-rpi4-01"; platform = "aarch64-linux"; };
|
||||
|
@ -26,16 +29,14 @@
|
|||
nixos-rpi4-03 = libx.mkHost { hostname = "nixos-rpi4-03"; platform = "aarch64-linux"; };
|
||||
};
|
||||
homeConfigurations = {
|
||||
# Generic Images
|
||||
"albert@nixos-rpi4-img" = libx.mkHome { hostname = "nixos-rpi4-img"; platform = "aarch64-linux"; };
|
||||
# Host Specific Configs
|
||||
"albert@nixos-laptop" = libx.mkHome { hostname = "nixos-laptop"; desktop = "hyprland"; theme = "gruvbox"; };
|
||||
"albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "hyprland"; theme = "gruvbox"; };
|
||||
"albert@nixos-rpi4-01" = libx.mkHome { hostname = "nixos-rpi4-01"; platform = "aarch64-linux"; };
|
||||
"albert@nixos-rpi4-02" = libx.mkHome { hostname = "nixos-rpi4-01"; platform = "aarch64-linux"; };
|
||||
"albert@nixos-rpi4-03" = libx.mkHome { hostname = "nixos-rpi4-01"; platform = "aarch64-linux"; };
|
||||
};
|
||||
images = {
|
||||
nixos-rpi4-01 = nixosConfigurations.nixos-rpi4-01.config.system.build.sdImage;
|
||||
nixos-rpi4-02 = nixosConfigurations.nixos-rpi4-02.config.system.build.sdImage;
|
||||
nixos-rpi4-03 = nixosConfigurations.nixos-rpi4-03.config.system.build.sdImage;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -29,6 +29,7 @@
|
|||
specialArgs = { inherit inputs outputs desktop hostname username stateVersion gpu platform theme; };
|
||||
modules = [
|
||||
../nixos
|
||||
inputs.nixpkgs.nixos.modules.installer.sd-card.sd-image-raspberrypi
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
] ++ (inputs.nixpkgs.lib.optionals (installer != null) [ installer ]);
|
||||
|
|
38
nixos/hosts/nixos-rpi4-img/default.nix
Normal file
38
nixos/hosts/nixos-rpi4-img/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
|
||||
];
|
||||
#####################################################################################
|
||||
# BEGIN hardware config
|
||||
#####################################################################################
|
||||
|
||||
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
||||
boot.loader.grub.enable = false;
|
||||
# Enables the generation of /boot/extlinux/extlinux.conf
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
networking.hostName = "nixos-rpi4-img";
|
||||
#####################################################################################
|
||||
# END hardware config
|
||||
#####################################################################################
|
||||
# Temporary
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
}
|
Loading…
Reference in a new issue