140 lines
2.8 KiB
Nix
140 lines
2.8 KiB
Nix
{ pkgs, config, lib, modulesPath, ... }: {
|
|
imports = [
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
./modules
|
|
];
|
|
|
|
boot = {
|
|
kernelModules = [ "kvm-intel" ];
|
|
extraModulePackages = [ ];
|
|
|
|
initrd = {
|
|
availableKernelModules = [
|
|
"ahci"
|
|
"xhci_pci"
|
|
"nvme"
|
|
"usbhid"
|
|
"usb_storage"
|
|
"sd_mod"
|
|
"sdhci_pci"
|
|
];
|
|
kernelModules = [ ];
|
|
};
|
|
|
|
loader = {
|
|
systemd-boot.enable = true;
|
|
efi.canTouchEfiVariables = true;
|
|
};
|
|
};
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
i18n = {
|
|
defaultLocale = "en_US.UTF-8";
|
|
|
|
extraLocaleSettings = {
|
|
LC_ADDRESS = "nl_NL.UTF-8";
|
|
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
|
LC_MEASUREMENT = "nl_NL.UTF-8";
|
|
LC_MONETARY = "nl_NL.UTF-8";
|
|
LC_NAME = "nl_NL.UTF-8";
|
|
LC_NUMERIC = "nl_NL.UTF-8";
|
|
LC_PAPER = "nl_NL.UTF-8";
|
|
LC_TELEPHONE = "nl_NL.UTF-8";
|
|
LC_TIME = "nl_NL.UTF-8";
|
|
};
|
|
};
|
|
|
|
services = {
|
|
openssh = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
|
|
settings = {
|
|
PasswordAuthentication = false;
|
|
KbdInteractiveAuthentication = false;
|
|
};
|
|
};
|
|
|
|
xserver = {
|
|
layout = "us";
|
|
xkbVariant = "";
|
|
};
|
|
};
|
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOodpLr+FDRyKyHjucHizNLVFHZ5AQmE9GmxMnOsSoaw pimkunis@thinkpadpim"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINUZp4BCxf7uLa1QWonx/Crf8tYZ5MKIZ+EuaBa82LrV user@user-laptop"
|
|
];
|
|
|
|
programs = {
|
|
ssh = {
|
|
knownHosts = {
|
|
dmz = {
|
|
hostNames = [ "*.dmz" ];
|
|
publicKey =
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAX2IhgHNxC6JTvLu9cej+iWuG+uJFMXn4AiRro9533x";
|
|
certAuthority = true;
|
|
};
|
|
|
|
hypervisors = {
|
|
hostNames = [ "*.hyp" ];
|
|
publicKey =
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFzRkH3d/KVJQouswY/DMpenWbDFVOnI3Vut0xR0e1tb";
|
|
certAuthority = true;
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
neovim = {
|
|
enable = true;
|
|
vimAlias = true;
|
|
viAlias = true;
|
|
};
|
|
};
|
|
|
|
nixpkgs = {
|
|
config.allowUnfree = true;
|
|
hostPlatform = "x86_64-linux";
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
neofetch
|
|
wget
|
|
git
|
|
btop
|
|
htop
|
|
ripgrep
|
|
dig
|
|
tree
|
|
file
|
|
tcpdump
|
|
lsof
|
|
parted
|
|
];
|
|
|
|
hardware.cpu.intel.updateMicrocode =
|
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
age.identityPaths = [ "/etc/age_ed25519" ];
|
|
|
|
virtualisation.libvirtd.enable = true;
|
|
|
|
nix = {
|
|
package = pkgs.nixFlakes;
|
|
extraOptions = ''
|
|
experimental-features = nix-command flakes
|
|
'';
|
|
};
|
|
|
|
system = {
|
|
stateVersion = "23.05";
|
|
|
|
activationScripts.diff = ''
|
|
if [[ -e /run/current-system ]]; then
|
|
${pkgs.nix}/bin/nix store diff-closures /run/current-system "$systemConfig"
|
|
fi
|
|
'';
|
|
};
|
|
}
|