All checks were successful
Run nix flake check / flake-check (push) Successful in 2m13s
Extract duplicated configuration from gunter and magicman into shared system modules. This eliminates ~116 lines of duplication and fixes a malformed gdm.wayland config in magicman. New shared modules: - boot.nix: systemd-boot, EFI, common kernel params - networking.nix: NetworkManager, nftables, firewall base - hyprland.nix: System-level Hyprland and display manager - xdg.nix: XDG session variables and portal setup - nix-config.nix: Nix daemon settings, binary caches, trusted users - nixpkgs-config.nix: allowUnfree and kernel packages default Updated modules: - locale.nix: Added timezone configuration Benefits: - Reduces duplication: net reduction of 53 lines - Magicman gains custom cache substituters for faster builds - Fixes malformed gdm.wayland config in magicman - Both hosts use identical base configuration - Host-specific config clearly stands out Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
124 lines
3.0 KiB
Nix
124 lines
3.0 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 ];
|
|
|
|
# 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" ];
|
|
|
|
# Install system-wide packages
|
|
environment.systemPackages = with pkgs; [
|
|
curl
|
|
git
|
|
libnotify
|
|
usbutils
|
|
vim
|
|
wget
|
|
v4l-utils
|
|
nmap
|
|
(lib.mkIf (config.system.name == "gunter") 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?
|
|
}
|