2024-04-13 13:43:01 +00:00
|
|
|
{ pkgs, config, lib, machine, disko, agenix, nixos-hardware, ... }: {
|
2024-01-28 10:48:13 +00:00
|
|
|
imports = [
|
2024-04-13 15:28:31 +00:00
|
|
|
./nixos-modules
|
2024-01-28 10:48:13 +00:00
|
|
|
machine.nixosModule
|
|
|
|
disko.nixosModules.disko
|
|
|
|
agenix.nixosModules.default
|
2024-04-13 13:43:01 +00:00
|
|
|
] ++ lib.lists.optional (machine.isRaspberryPi) nixos-hardware.nixosModules.raspberry-pi-4;
|
2024-01-28 10:48:13 +00:00
|
|
|
|
|
|
|
config = {
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
2024-04-13 13:43:01 +00:00
|
|
|
hardware.cpu.intel.updateMicrocode = lib.mkIf (! machine.isRaspberryPi) config.hardware.enableRedistributableFirmware;
|
|
|
|
age.identityPaths = [ "/etc/age_ed25519" ];
|
2024-04-13 15:28:31 +00:00
|
|
|
nixpkgs.config.allowUnfree = true;
|
2024-01-28 10:48:13 +00:00
|
|
|
|
|
|
|
i18n = {
|
|
|
|
defaultLocale = "en_US.UTF-8";
|
|
|
|
|
2024-02-29 19:13:28 +00:00
|
|
|
extraLocaleSettings = let extraLocale = "nl_NL.UTF-8"; in {
|
|
|
|
LC_ADDRESS = extraLocale;
|
|
|
|
LC_IDENTIFICATION = extraLocale;
|
|
|
|
LC_MEASUREMENT = extraLocale;
|
|
|
|
LC_MONETARY = extraLocale;
|
|
|
|
LC_NAME = extraLocale;
|
|
|
|
LC_NUMERIC = extraLocale;
|
|
|
|
LC_PAPER = extraLocale;
|
|
|
|
LC_TELEPHONE = extraLocale;
|
|
|
|
LC_TIME = extraLocale;
|
2024-01-28 10:48:13 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
|
|
|
openssh = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
KbdInteractiveAuthentication = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOodpLr+FDRyKyHjucHizNLVFHZ5AQmE9GmxMnOsSoaw pimkunis@thinkpadpim"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINUZp4BCxf7uLa1QWonx/Crf8tYZ5MKIZ+EuaBa82LrV user@user-laptop"
|
|
|
|
];
|
|
|
|
|
2024-04-13 13:43:01 +00:00
|
|
|
programs.neovim = {
|
|
|
|
enable = true;
|
|
|
|
vimAlias = true;
|
|
|
|
viAlias = true;
|
2024-01-28 10:48:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
wget
|
|
|
|
git
|
|
|
|
btop
|
|
|
|
htop
|
|
|
|
ripgrep
|
|
|
|
dig
|
|
|
|
tree
|
|
|
|
file
|
|
|
|
tcpdump
|
|
|
|
lsof
|
|
|
|
parted
|
|
|
|
radvd
|
2024-01-29 21:21:15 +00:00
|
|
|
minicom
|
|
|
|
socat
|
2024-03-03 13:01:35 +00:00
|
|
|
pciutils
|
|
|
|
dmidecode
|
2024-03-19 21:56:52 +00:00
|
|
|
openssl
|
2024-03-22 21:19:44 +00:00
|
|
|
nfs-utils
|
2024-04-12 19:40:24 +00:00
|
|
|
rsync
|
2024-05-02 14:21:52 +00:00
|
|
|
fio
|
2024-05-11 13:16:41 +00:00
|
|
|
libva-utils
|
2024-05-25 12:26:59 +00:00
|
|
|
jq
|
2024-05-26 12:34:19 +00:00
|
|
|
tmux
|
2024-06-12 19:35:46 +00:00
|
|
|
fastfetch
|
2024-01-28 10:48:13 +00:00
|
|
|
];
|
2024-02-01 21:57:18 +00:00
|
|
|
|
2024-04-13 13:43:01 +00:00
|
|
|
boot = lib.mkIf (! machine.isRaspberryPi) {
|
|
|
|
kernelModules = [ "kvm-intel" ];
|
|
|
|
extraModulePackages = [ ];
|
|
|
|
|
|
|
|
initrd = {
|
|
|
|
kernelModules = [ ];
|
|
|
|
|
|
|
|
availableKernelModules = [
|
|
|
|
"ahci"
|
|
|
|
"xhci_pci"
|
|
|
|
"nvme"
|
|
|
|
"usbhid"
|
|
|
|
"usb_storage"
|
|
|
|
"sd_mod"
|
|
|
|
"sdhci_pci"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
loader = {
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = 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
|
|
|
|
'';
|
|
|
|
};
|
2024-01-28 10:48:13 +00:00
|
|
|
};
|
|
|
|
}
|