From 8ac79169d94ee4144ec922f075b9f39b9d13e1b1 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Fri, 10 Apr 2026 16:43:33 -0700 Subject: [PATCH] feat: add gym-box --- flake.nix | 12 ++++ machines/gym-box/configuration.nix | 74 +++++++++++++++++++++ machines/gym-box/hardware-configuration.nix | 31 +++++++++ 3 files changed, 117 insertions(+) create mode 100644 machines/gym-box/configuration.nix create mode 100644 machines/gym-box/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 4bc9bf3..c424c9f 100644 --- a/flake.nix +++ b/flake.nix @@ -178,6 +178,18 @@ ]; }; + nixosConfigurations.gym-box = nixpkgs.lib.nixosSystem rec { + system = "x86_64-linux"; + modules = nixosModules ++ [ + ./machines/gym-box/configuration.nix + { + home-manager.users.johno = import ./home/home-media-center.nix; + home-manager.users.kodi = import ./home/home-kodi.nix; + home-manager.extraSpecialArgs = { inherit system; }; + } + ]; + }; + nixosConfigurations.zix790prors = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; modules = nixosModules ++ [ diff --git a/machines/gym-box/configuration.nix b/machines/gym-box/configuration.nix new file mode 100644 index 0000000..01f6412 --- /dev/null +++ b/machines/gym-box/configuration.nix @@ -0,0 +1,74 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). + +{ lib, pkgs, ... }: + +with lib; + +{ + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + roles = { + audio.enable = true; + bluetooth.enable = true; + desktop = { + enable = true; + gaming.enable = true; + kde = true; + sddm = true; + wayland = true; + }; + plasma-bigscreen = { + enable = true; + autologin = true; + jellyfinScaleFactor = 1.0; + appLauncherServer.enable = true; + }; + nfs-mounts.enable = true; + users.enable = true; + }; + + # Enable KDE Wallet PAM integration for auto-unlock + security.pam.services.sddm = { + kwallet = { + enable = true; + package = pkgs.kdePackages.kwallet-pam; + }; + }; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "gym-box"; + networking.networkmanager.enable = true; + + services.xserver.videoDrivers = [ "amdgpu" ]; + hardware.graphics.enable = true; + hardware.graphics.enable32Bit = true; + # RADV (AMD's Vulkan driver) is now enabled by default, amdvlk was removed + + # This option defines the first version of NixOS you have installed on this particular machine, + # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. + # + # Most users should NEVER change this value after the initial install, for any reason, + # even if you've upgraded your system to a new NixOS release. + # + # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, + # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how + # to actually do that. + # + # This value being lower than the current NixOS release does NOT mean your system is + # out of date, out of support, or vulnerable. + # + # 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 = "24.05"; # Did you read the comment? + +} diff --git a/machines/gym-box/hardware-configuration.nix b/machines/gym-box/hardware-configuration.nix new file mode 100644 index 0000000..3c05bc2 --- /dev/null +++ b/machines/gym-box/hardware-configuration.nix @@ -0,0 +1,31 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "uas" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/59c0df78-c6fa-415d-8592-13547a3fada6"; + fsType = "btrfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/DC66-D04C"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}