2024-02-05 11:46:52 +01:00
|
|
|
{
|
|
|
|
nixos-hardware,
|
|
|
|
disko,
|
|
|
|
nix-ld-rs,
|
|
|
|
...
|
|
|
|
}:
|
2024-01-02 22:01:55 +01:00
|
|
|
{ pkgs, config, ... }:
|
2023-01-17 13:45:37 +01:00
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
|
|
|
|
disko.nixosModules.disko
|
|
|
|
|
|
|
|
./storage.nix
|
2024-01-02 22:01:55 +01:00
|
|
|
./network.nix
|
|
|
|
./virtualisation.nix
|
2024-04-26 11:58:54 +02:00
|
|
|
./promtail
|
2023-01-17 14:09:13 +01:00
|
|
|
../../users/erwin
|
|
|
|
../../users/root
|
2023-01-17 13:45:37 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
eboskma = {
|
|
|
|
users.erwin = {
|
|
|
|
enable = true;
|
2024-01-02 22:01:55 +01:00
|
|
|
server = true;
|
2023-01-17 13:45:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
base = {
|
|
|
|
plymouth.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nix-common = {
|
|
|
|
enable = true;
|
|
|
|
remote-builders = true;
|
|
|
|
};
|
|
|
|
|
2024-01-02 22:01:55 +01:00
|
|
|
# libvirtd.enable = true;
|
2023-01-17 13:45:37 +01:00
|
|
|
systemd.enable = true;
|
2024-01-02 22:01:55 +01:00
|
|
|
tailscale.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
security = {
|
|
|
|
sudo-rs = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
sudo.enable = false;
|
2024-07-30 12:10:31 +02:00
|
|
|
apparmor = {
|
2024-07-30 12:31:59 +02:00
|
|
|
enable = false;
|
2024-07-30 12:10:31 +02:00
|
|
|
};
|
2023-01-17 13:45:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
loader = {
|
|
|
|
systemd-boot = {
|
|
|
|
enable = true;
|
|
|
|
configurationLimit = 10;
|
|
|
|
};
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
initrd = {
|
2024-02-05 11:46:52 +01:00
|
|
|
availableKernelModules = [
|
|
|
|
"xhci_pci"
|
|
|
|
"thunderbolt"
|
|
|
|
"nvme"
|
|
|
|
"ahci"
|
|
|
|
"usb_storage"
|
|
|
|
"usbhid"
|
|
|
|
"sd_mod"
|
|
|
|
"virtio_blk"
|
|
|
|
"virtio_pci"
|
|
|
|
];
|
2024-01-02 22:01:55 +01:00
|
|
|
kernelModules = [ "kvm-intel" ];
|
2023-01-17 13:45:37 +01:00
|
|
|
};
|
|
|
|
|
2024-01-02 22:01:55 +01:00
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
2024-02-05 11:46:52 +01:00
|
|
|
kernelModules = [
|
|
|
|
"kvm-intel"
|
|
|
|
"dm-thin-pool"
|
|
|
|
"dm-snapshot"
|
|
|
|
];
|
2024-01-02 22:01:55 +01:00
|
|
|
# From PVE: ro quiet intel_iommu=on i915.enable_gvt=1 cpufreq.default_governor=ondemand
|
|
|
|
# kernelParams = [ "intel_iommu=on" "i915.enable_gvt=1" "cpufreq.default_governor=ondemand" ];
|
|
|
|
|
2024-08-14 14:20:27 +02:00
|
|
|
extraModulePackages = with config.boot.kernelPackages; [ gasket ];
|
2024-01-17 09:40:26 +01:00
|
|
|
|
|
|
|
kernel.sysctl = {
|
|
|
|
"net.core.rmem_max" = 2500000;
|
|
|
|
"net.core.wmem_max" = 2500000;
|
|
|
|
};
|
2023-01-17 13:45:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
hardware.enableAllFirmware = true;
|
|
|
|
|
2024-06-12 21:42:31 +02:00
|
|
|
users.users.consoledash = {
|
|
|
|
isSystemUser = true;
|
|
|
|
home = "/var/lib/consoledash";
|
|
|
|
group = "consoledash";
|
|
|
|
createHome = true;
|
|
|
|
# Stole this from here:
|
|
|
|
# https://github.com/mcdonc/.nixconfig/blob/66f427c029eb673c44bb7df919b78485ce3e8b01/videos/restricteduser/script.rst
|
|
|
|
# shell =
|
|
|
|
# let
|
|
|
|
# rbash = pkgs.runCommandNoCC "rbash-${pkgs.bashInteractive.version}" { } ''
|
|
|
|
# mkdir -p $out/bin
|
|
|
|
# ln -s ${pkgs.bashInteractive}/bin/bash $out/bin/rbash
|
|
|
|
# '';
|
|
|
|
|
|
|
|
# in
|
|
|
|
# "${rbash}/bin/rbash";
|
|
|
|
shell = "${pkgs.glances}/bin/glances";
|
|
|
|
ignoreShellProgramCheck = true;
|
|
|
|
hashedPassword = null;
|
|
|
|
};
|
|
|
|
users.groups.consoledash = { };
|
|
|
|
|
2024-01-10 21:54:54 +01:00
|
|
|
programs = {
|
2024-09-18 16:59:40 +02:00
|
|
|
bandwhich.enable = true;
|
2024-01-10 21:54:54 +01:00
|
|
|
nix-ld = {
|
2024-01-02 22:01:55 +01:00
|
|
|
enable = true;
|
2024-01-10 21:54:54 +01:00
|
|
|
package = nix-ld-rs.packages.${pkgs.hostPlatform.system}.nix-ld-rs;
|
2023-04-07 10:10:53 +02:00
|
|
|
};
|
2024-01-10 21:54:54 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
2024-06-12 21:42:31 +02:00
|
|
|
getty.autologinUser = "consoledash";
|
2024-01-10 21:54:54 +01:00
|
|
|
openssh.enable = true;
|
2024-01-02 22:01:55 +01:00
|
|
|
lvm = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2024-04-26 11:58:54 +02:00
|
|
|
prometheus.exporters = {
|
|
|
|
node = {
|
|
|
|
enable = true;
|
|
|
|
enabledCollectors = [ "systemd" ];
|
|
|
|
};
|
|
|
|
};
|
2024-06-11 15:26:14 +02:00
|
|
|
|
|
|
|
iperf3 = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
2024-09-23 13:40:47 +02:00
|
|
|
|
|
|
|
sysstat.enable = true;
|
2023-01-17 13:45:37 +01:00
|
|
|
};
|
2023-01-17 15:53:06 +01:00
|
|
|
|
2024-09-23 13:40:47 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
sysstat
|
|
|
|
];
|
|
|
|
|
2024-01-02 22:01:55 +01:00
|
|
|
system.stateVersion = "24.05";
|
2023-01-17 13:45:37 +01:00
|
|
|
}
|