michaelnet/thonkpad/nixhost/configuration.nix

101 lines
2.9 KiB
Nix
Raw Normal View History

2023-10-01 08:45:16 -07:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Kernel options - text-only b/c QEMU
boot.kernelParams = [ "console=ttyS0" ];
# Use the GRUB 2 boot loader with BIOS ONLY.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
# NOTE: Because we are in a headless VM, removed:
# i18n, networking, X11, sound, CUPS/printing, touchpad
# Set your time zone.
# time.timeZone = "Europe/Amsterdam";
# Define a user account. Don't forget to set a password with passwd.
users.users.nixuser = {
isNormalUser = true;
home = "/home/nixuser";
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [
python311
htop
bat
zsh
oh-my-zsh
starship
];
};
users.defaultUserShell = pkgs.zsh;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
tree
neofetch
curl
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
programs.zsh = {
enable = true;
ohMyZsh = {
enable = true;
plugins = [ "git" ];
theme = "robbyrussell";
};
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings.PubkeyAuthentication = true;
settings.PasswordAuthentication = false;
settings.PermitRootLogin = "no";
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
}