154 lines
3.8 KiB
Nix
154 lines
3.8 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
inputs,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [
|
|
./hardware-configuration.nix
|
|
../../system/monitoring
|
|
];
|
|
|
|
# Sops stuff
|
|
sops.defaultSopsFile = ../../secrets/gunter/secrets.yaml;
|
|
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
|
|
sops.age.generateKey = true;
|
|
sops.secrets."gotify_tokens/backup-home" = { };
|
|
|
|
# Enable microcode updates
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
# Bootloader stuff
|
|
boot = {
|
|
blacklistedKernelModules = [
|
|
"mt7921e"
|
|
"mt7921_common"
|
|
"mt792x_lib"
|
|
"mt76_connac_lib"
|
|
"mt76"
|
|
];
|
|
# Kernel stuff
|
|
# kernelPackages = lib.warn "Pinned to kernel 6.12 due to issues" pkgs.linuxPackages_6_12;
|
|
kernelParams = [ "module_blacklist=amdgpu" ];
|
|
|
|
kernel.sysctl = {
|
|
"vm.max_map_count" = 262144;
|
|
};
|
|
|
|
extraModprobeConfig = ''
|
|
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
|
|
'';
|
|
|
|
# Bootloader stuff
|
|
loader.systemd-boot = {
|
|
configurationLimit = 10;
|
|
memtest86.enable = true;
|
|
};
|
|
supportedFilesystems = [ "nfs" ];
|
|
};
|
|
|
|
# Networking stuff
|
|
networking.hostName = "gunter"; # Define your hostname.
|
|
networking.firewall.allowedTCPPorts = [ 8989 ];
|
|
|
|
# Additional nix caches for homelab and CUDA
|
|
nix.settings = {
|
|
substituters = [
|
|
"https://nix-cache.home.2rjus.net"
|
|
"https://cuda-maintainers.cachix.org"
|
|
];
|
|
|
|
trusted-substituters = [
|
|
"https://nix-cache.home.2rjus.net"
|
|
"https://cuda-maintainers.cachix.org"
|
|
];
|
|
|
|
trusted-public-keys = [
|
|
"nix-cache02.home.2rjus.net-1:QyT5FAvJtV+EPQrgQQ6iV9JMg1kRiWuIAJftM35QMls="
|
|
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
|
];
|
|
};
|
|
|
|
# Enable graphics
|
|
hardware.graphics = {
|
|
enable = true;
|
|
extraPackages = with pkgs; [
|
|
libva-vdpau-driver
|
|
nvidia-vaapi-driver
|
|
];
|
|
};
|
|
|
|
# Nvidia stuff
|
|
hardware.nvidia = {
|
|
modesetting.enable = true;
|
|
powerManagement.enable = false;
|
|
powerManagement.finegrained = false;
|
|
open = true;
|
|
nvidiaSettings = false;
|
|
|
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
|
# package =
|
|
# lib.warn "nvidia driver override to use 580.82.07"
|
|
# config.boot.kernelPackages.nvidiaPackages.mkDriver
|
|
# {
|
|
# version = "580.82.07";
|
|
# sha256_64bit = "sha256-Bh5I4R/lUiMglYEdCxzqm3GLolQNYFB0/yJ/zgYoeYw=";
|
|
# sha256_aarch64 = lib.fakeHash;
|
|
# openSha256 = "sha256-8/7ZrcwBMgrBtxebYtCcH5A51u3lAxXTCY00LElZz08=";
|
|
# settingsSha256 = lib.fakeHash;
|
|
# persistencedSha256 = lib.fakeSha256;
|
|
# };
|
|
};
|
|
|
|
# Setup nvidia video drivers
|
|
# nixpkgs.overlays = [
|
|
# (self: super: {
|
|
# hyprland = super.hyprland.override {
|
|
# debug = true;
|
|
# };
|
|
# })
|
|
# ];
|
|
services.xserver.videoDrivers = [ "nvidia" ];
|
|
|
|
# Host capabilities
|
|
host.capabilities = {
|
|
hasCuda = true;
|
|
hasBattery = false;
|
|
formFactor = "desktop";
|
|
volumeScrollStep = 5;
|
|
enableArrhist = true;
|
|
hasEduroamAccess = false;
|
|
backupRepository = "rest:http://10.69.12.52:8000/gunter.home.2rjus.net";
|
|
backupPassword = "gunter.home.2rjus.net";
|
|
};
|
|
|
|
# Install system-wide packages
|
|
environment.systemPackages = with pkgs; [
|
|
curl
|
|
git
|
|
libnotify
|
|
usbutils
|
|
vim
|
|
wget
|
|
v4l-utils
|
|
nmap
|
|
pciutils
|
|
|
|
# X shit
|
|
# xorg.xorgserver
|
|
# xorg.xinit
|
|
# xorg.xf86inputevdev
|
|
# xorg.xf86inputlibinput
|
|
# xorg.xinit
|
|
];
|
|
|
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|
# and migrated your data accordingly.
|
|
#
|
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
system.stateVersion = "23.11"; # Did you read the comment?
|
|
}
|