{ config, pkgs, inputs, lib, homeActivationPackage, ... }: { # Pre-activate standalone home-manager for the live environment system.activationScripts.home-manager-activate = { text = '' USER_HOME="/home/nixos" if [ ! -d "$USER_HOME" ]; then mkdir -p "$USER_HOME" chown nixos:users "$USER_HOME" fi # Run activation as the nixos user ${pkgs.sudo}/bin/sudo -u nixos ${homeActivationPackage}/activate ''; deps = [ "users" ]; }; environment.systemPackages = with pkgs; [ git gum alacritty parted btrfs-progs cryptsetup inputs.disko.packages.${pkgs.stdenv.hostPlatform.system}.disko (pkgs.makeDesktopItem { name = "install-nomarchy"; desktopName = "Install Nomarchy"; exec = "alacritty -e sudo /etc/install.sh"; terminal = false; categories = [ "System" ]; }) ]; # Ensure the live environment user has the necessary groups for graphical acceleration and audio users.users.nixos.extraGroups = [ "wheel" "video" "render" "audio" "networkmanager" ]; # Graphics support for live environment boot.initrd.kernelModules = [ "amdgpu" "radeon" "nouveau" "i915" ]; services.xserver.videoDrivers = [ "amdgpu" "radeon" "nouveau" "modesetting" "fbdev" ]; environment.etc."install.sh" = { source = ../installer/install.sh; mode = "0755"; }; environment.etc."disko-golden.nix" = { source = ../installer/disko-golden.nix; }; environment.etc."nomarchy".source = inputs.self; }