Add base system config
parent
66d38c26ec
commit
7eaaae3023
|
@ -13,7 +13,8 @@
|
|||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
"nix-test" = utils.mkSystem ./systems/nix-test.nix;
|
||||
"base" = utils.mkSystem [ ];
|
||||
"nix-test" = utils.mkSystem [ ./systems/nix-test.nix ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,70 @@
|
|||
{ ... }:
|
||||
{
|
||||
nix.settings = {
|
||||
# Enable flakes and new 'nix' command
|
||||
experimental-features = "nix-command flakes";
|
||||
# Deduplicate and optimize nix store
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
modulesPath,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
config = {
|
||||
#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;
|
||||
boot.loader.grub.devices = [ "nodev" ];
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue