config/systems/base.nix

71 lines
1.6 KiB
Nix
Raw Normal View History

2024-11-17 20:28:14 +01:00
{
2024-11-17 21:14:36 +01:00
modulesPath,
lib,
pkgs,
...
}:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
2024-11-17 20:28:14 +01:00
2024-11-17 21:14:36 +01:00
config = {
2024-11-17 21:16:40 +01:00
time.timeZone = "Europe/Amsterdam";
i18n.defaultLocale = "en_US.UTF-8";
2024-11-17 21:14:36 +01:00
#Provide a default hostname
networking.hostName = lib.mkDefault "base";
# Enable QEMU Guest for Proxmox
services.qemuGuest.enable = lib.mkDefault true;
# Use the boot drive for grub
boot.loader.grub.enable = lib.mkDefault true;
2024-11-17 21:27:17 +01:00
boot.loader.grub.devices = [ "/dev/disk/by-label/nixos" ];
2024-11-17 21:14:36 +01:00
boot.growPartition = lib.mkDefault true;
# Allow remote updates with flakes and non-root users
nix.settings.trusted-users = [
"root"
"@wheel"
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Enable mDNS for `hostname.local` addresses
services.avahi.enable = true;
services.avahi.nssmdns = true;
services.avahi.publish = {
enable = true;
addresses = true;
};
# Some sane packages we need on every system
environment.systemPackages = with pkgs; [
vim
git
];
# Don't ask for passwords
security.sudo.wheelNeedsPassword = false;
# Enable ssh
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
};
programs.ssh.startAgent = true;
# Default filesystem
fileSystems."/" = lib.mkDefault {
device = "/dev/disk/by-label/nixos";
autoResize = true;
fsType = "ext4";
};
system.stateVersion = lib.mkDefault "24.05";
};
2024-11-17 20:28:14 +01:00
}