xrsh-buildroot/nix/configuration.nix

44 lines
1.1 KiB
Nix

# /etc/nixos/configuration.nix
{ config, pkgs, ... }:
{
# Set the hostname of the system
networking.hostName = "nixos-minimal";
# Enable the OpenSSH service (optional, useful for remote access)
services.openssh.enable = false;
# Timezone configuration
time.timeZone = "UTC";
# Set the default shell to bash
users.defaultUserShell = pkgs.bash;
# Create a minimal user (replace "your-user" with desired username)
users.users.yourUser = {
isNormalUser = true;
shell = pkgs.bash;
initialPassword = "password"; # Replace with a hashed password for production
};
# Boot loader (for booting the system)
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.devices = [ "/dev/sda" ]; # Replace with your actual boot device
# Allow unfree packages (if needed)
nixpkgs.config.allowUnfree = true;
# Enable virtual console
console.useXkbConfig = true;
# Enable bash as a package (part of the basic system environment)
environment.systemPackages = with pkgs; [
bash
];
# Disable the display manager (minimal CLI system, no graphical interface)
services.xserver.enable = false;
}