2023-11-22 17:54:05 +00:00
|
|
|
{ pkgs, config, lib, modulesPath, ... }: {
|
2023-11-22 17:28:55 +00:00
|
|
|
imports = [
|
2023-11-22 17:54:05 +00:00
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
2023-12-29 12:41:01 +00:00
|
|
|
./modules
|
2023-11-22 17:28:55 +00:00
|
|
|
];
|
2023-11-05 17:43:32 +00:00
|
|
|
|
2023-11-22 17:54:05 +00:00
|
|
|
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;
|
|
|
|
};
|
2023-11-05 17:43:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
2023-12-26 12:44:59 +00:00
|
|
|
openFirewall = true;
|
|
|
|
|
2023-11-05 17:43:32 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2023-11-22 15:53:34 +00:00
|
|
|
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;
|
|
|
|
};
|
2023-11-05 17:43:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2023-11-22 15:53:34 +00:00
|
|
|
neovim = {
|
|
|
|
enable = true;
|
|
|
|
vimAlias = true;
|
|
|
|
viAlias = true;
|
|
|
|
};
|
2023-11-05 17:43:32 +00:00
|
|
|
};
|
|
|
|
|
2023-11-22 17:54:05 +00:00
|
|
|
nixpkgs = {
|
|
|
|
config.allowUnfree = true;
|
|
|
|
hostPlatform = "x86_64-linux";
|
|
|
|
};
|
2023-11-05 17:43:32 +00:00
|
|
|
|
2023-11-22 15:53:34 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
neofetch
|
|
|
|
wget
|
|
|
|
git
|
|
|
|
btop
|
|
|
|
htop
|
|
|
|
ripgrep
|
|
|
|
dig
|
|
|
|
tree
|
|
|
|
file
|
2024-01-01 12:16:11 +00:00
|
|
|
tcpdump
|
2024-01-06 19:17:45 +00:00
|
|
|
lsof
|
|
|
|
parted
|
2023-11-22 15:53:34 +00:00
|
|
|
];
|
2023-11-05 17:43:32 +00:00
|
|
|
|
|
|
|
|
2023-11-22 17:54:05 +00:00
|
|
|
hardware.cpu.intel.updateMicrocode =
|
|
|
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
2023-11-24 12:52:51 +00:00
|
|
|
|
|
|
|
age.identityPaths = [ "/root/age_ed25519" ];
|
2023-11-29 09:02:50 +00:00
|
|
|
|
2023-12-14 20:42:58 +00:00
|
|
|
virtualisation.libvirtd.enable = true;
|
2023-12-16 14:45:17 +00:00
|
|
|
|
|
|
|
nix = {
|
|
|
|
package = pkgs.nixFlakes;
|
|
|
|
extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
|
|
|
};
|
2023-12-16 15:02:41 +00:00
|
|
|
|
2023-12-30 14:20:16 +00:00
|
|
|
system = {
|
|
|
|
stateVersion = "23.05";
|
|
|
|
|
|
|
|
activationScripts.diff = ''
|
|
|
|
if [[ -e /run/current-system ]]; then
|
|
|
|
${pkgs.nix}/bin/nix store diff-closures /run/current-system "$systemConfig"
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
};
|
2023-11-05 17:43:32 +00:00
|
|
|
}
|