From 4ac8af3f28db17a0336c86b0e8439795293de91b Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Sat, 8 Feb 2025 16:51:17 -0600 Subject: [PATCH] kernel deck --- hosts/deck/boot.nix | 28 ++++++++++++++++++ hosts/deck/configuration.nix | 56 ++---------------------------------- hosts/deck/jovian.nix | 24 ++++++++++++++++ 3 files changed, 55 insertions(+), 53 deletions(-) create mode 100644 hosts/deck/boot.nix create mode 100644 hosts/deck/jovian.nix diff --git a/hosts/deck/boot.nix b/hosts/deck/boot.nix new file mode 100644 index 0000000..299cbc8 --- /dev/null +++ b/hosts/deck/boot.nix @@ -0,0 +1,28 @@ +{ pkgs, ... }: +let + kernel = pkgs.linuxPackages_latest; +in +{ + # Configure bootloader with lanzaboot and secureboot + boot = { + kernelModules = [ "nct6775" ]; + loader = { + systemd-boot.enable = true; + + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot"; + }; + }; + + kernelPackages = kernel; + + kernelParams = [ + "quiet" + "amdgpu.ppfeaturemask=0xffffffff" + ]; + + consoleLogLevel = 3; + bootspec.enable = true; + }; +} diff --git a/hosts/deck/configuration.nix b/hosts/deck/configuration.nix index 6f46c03..ba2760a 100644 --- a/hosts/deck/configuration.nix +++ b/hosts/deck/configuration.nix @@ -7,13 +7,11 @@ { imports = [ # Include the results of the hardware scan. + ./boot.nix + ./jovian.nix ./hardware-configuration.nix ]; - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - nixpkgs.config.allowUnfree = true; # Enable nix flakes and nix-command tools nix = { @@ -32,48 +30,11 @@ optimise.automatic = lib.mkDefault true; }; - jovian = { - steam = { - enable = true; - autoStart = true; - user = "deck"; - desktopSession = "plasma6"; - }; - - steamos = { - useSteamOSConfig = true; - }; - - devices = { - steamdeck = { - enable = true; - enableGyroDsuService = true; # If enabled, motion data from the gyroscope can be used in Cemu with Cemuhoo - }; - }; - - hardware.has.amd.gpu = true; - }; - - # networking.hostName = "nixos"; # Define your hostname. - # Pick only one of the below networking options. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. # Set your time zone. time.timeZone = "America/Chicago"; - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # useXkbConfig = true; # use xkb.options in tty. - # }; - # Enable the X11 windowing system. services.xserver.enable = false; @@ -86,20 +47,9 @@ enableQt5Integration = true; }; - # Configure keymap in X11 - # services.xserver.xkb.layout = "us"; - # services.xserver.xkb.options = "eurosign:e,caps:escape"; - # Enable CUPS to print documents. services.printing.enable = true; - # Enable sound. - # sound.enable = true; - # hardware.pulseaudio.enable = true; - - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.deck = { isNormalUser = true; @@ -139,7 +89,7 @@ # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you # accidentally delete configuration.nix. - # system.copySystemConfiguration = true; + system.copySystemConfiguration = true; # 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. diff --git a/hosts/deck/jovian.nix b/hosts/deck/jovian.nix new file mode 100644 index 0000000..004e38e --- /dev/null +++ b/hosts/deck/jovian.nix @@ -0,0 +1,24 @@ +{ ... }: +{ + jovian = { + steam = { + enable = true; + autoStart = true; + user = "deck"; + desktopSession = "plasma"; # plasma, plasmaX11, or gamescope-wayland + }; + + steamos = { + useSteamOSConfig = true; + }; + + devices = { + steamdeck = { + enable = true; + enableGyroDsuService = true; # If enabled, motion data from the gyroscope can be used in Cemu with Cemuhoo + }; + }; + + hardware.has.amd.gpu = true; + }; +} \ No newline at end of file