Compare commits

..

2 Commits

Author SHA1 Message Date
a512d9bc06 [live-usb] Add live-usb machine configuration 2025-07-29 12:01:38 -07:00
cc3d398963 [printing] Ensure Brother printer is found 2025-07-23 19:47:43 -07:00
3 changed files with 131 additions and 0 deletions

View File

@@ -74,6 +74,18 @@
];
};
# Live USB ISO configuration
nixosConfigurations.live-usb = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = baseModules ++ [
./machines/live-usb/configuration.nix
{
home-manager.users.johno = import ./home/home.nix;
home-manager.extraSpecialArgs = { inherit system; };
}
];
};
homeConfigurations."johno" = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages."x86_64-linux";
modules = [

View File

@@ -0,0 +1,112 @@
# Live USB ISO configuration for recovery and installation
{ pkgs, modulesPath, ... }:
{
imports = [
# Use minimal installation CD as base
(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
];
# Use roles structure for consistent configuration
roles = {
audio.enable = true;
bluetooth.enable = true;
users = {
enable = true;
extraGroups = [ "video" "wheel" "networkmanager" ];
};
};
# Allow unfree packages for broader hardware support
nixpkgs.config.allowUnfree = true;
# Essential packages for system recovery and installation
environment.systemPackages = with pkgs; [
# Text editors
neovim
nano
# System tools
git
curl
wget
htop
tree
lsof
strace
# Filesystem tools
btrfs-progs
e2fsprogs
xfsprogs
ntfs3g
dosfstools
# Network tools
networkmanager
wirelesstools
# Hardware tools
pciutils
usbutils
smartmontools
# Archive tools
unzip
p7zip
# Development tools (for quick fixes)
gcc
binutils
];
# Enable NetworkManager for easy wifi setup
networking.networkmanager.enable = true;
# Enable SSH daemon for remote access
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "yes";
PasswordAuthentication = true;
};
};
# Override default nixos user, set johno as the main user with password
users.users.nixos.enable = false;
users.users.johno = {
isNormalUser = true;
description = "John Ogle";
extraGroups = [ "wheel" "networkmanager" "audio" "video" ];
password = "nixos"; # Simple password for live environment
};
users.users.root.password = "nixos";
# Enable flakes and new nix command in live environment
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Copy this flake to the live system for easy access
system.extraDependencies = [ pkgs.git ];
# ISO customization
isoImage = {
compressImage = true;
volumeID = "NIXOS-LIVE";
};
# Helpful aliases and environment
environment.shellAliases = {
ll = "ls -la";
la = "ls -la";
rebuild = "sudo nixos-rebuild switch --flake";
install-nixos = "sudo nixos-install --flake";
};
# Enable some useful services
services.udisks2.enable = true; # For mounting USB drives
programs.fish.enable = true;
# Hardware support
hardware.enableAllFirmware = true;
hardware.enableRedistributableFirmware = true;
}

View File

@@ -19,5 +19,12 @@ in
nssmdns4 = true;
openFirewall = true;
};
hardware.printers.ensurePrinters = [{
name = "MFC-L8900CDW_series";
deviceUri = "dnssd://Brother%20MFC-L8900CDW%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-b422006699d8";
model = "everywhere";
}];
hardware.printers.ensureDefaultPrinter = "MFC-L8900CDW_series";
};
}