Added temporary notes on remote building, and modified hardware configuration to be specific to system for steamdeck, changing steamdeck.nix to its user specific config. Possibly pending modifications to configuration.nix under steamdeck.

This commit is contained in:
jeirmeister 2024-11-06 14:39:54 -08:00
parent 2a5e8b4711
commit 1b98613591
Signed by: jeirmeister
GPG Key ID: 33A40DF62D35C4A7
3 changed files with 139 additions and 82 deletions

31
On_Remote_Building.md Normal file
View File

@ -0,0 +1,31 @@
Yes, that's a good approach! You can test the build without actually applying it in a few ways:
1. Build without applying using `nixos-rebuild`:
```bash
# Build only, don't switch
nixos-rebuild build --flake .#steamdeck
# Build for a remote system
nixos-rebuild build --flake .#steamdeck --target-host root@remote-ip
```
2. Check evaluation:
```bash
# Check if the configuration evaluates without building
nix flake check
# More detailed evaluation
nix eval .#nixosConfigurations.steamdeck.config.system.build.toplevel
```
Since there's no sensitive data yet, it's a good time to test the basic structure. Secret management can be added later when needed.
Would you like help setting up the remote build testing? We would need to:
1. Ensure SSH access to the remote machine
2. Configure the remote builder
3. Set up necessary permissions/access
Also, there's a feature in nixos-rebuild called `--build-host` that could be useful - it lets you build on a more powerful machine while targeting another system.
Would you like me to provide the specific commands and configurations for any of these testing approaches?

View File

@ -1,39 +1,104 @@
# 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, modulesPath, ... }:
{ config
, lib
, pkgs
, inputs
, ...
}:
let
jovianNixosRev = "f6423d86bec22c25a576b23262495c5536b0d069";
jovianNixos = builtins.fetchTarball {
url = "https://github.com/Jovian-Experiments/Jovian-NixOS/archive/${jovianNixosRev}.tar.gz";
sha256 = "sha256:1frd1dfqd97idwf1rj29ab0wvyfa2nx2h3bp9hkbmfa1m802avmb";
};
in
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
./hardware-configuration.nix
(jovianNixos + "/modules")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
# Enable base system modules
modules = lib.utils.enable [
# Hardware support
"bluetooth"
"hardware-accel"
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f3cc4aae-428e-435d-b9f7-333f7dad06b2";
fsType = "ext4";
# Base system services
"pipewire"
"networkmanager"
"openssh"
"tailscale"
# Desktop environment
"plasma6"
];
# Steam Deck specific configuration
jovian = {
hardware.has.amd.gpu = true;
devices.steamdeck = {
enable = true;
enableControllerUdevRules = true;
enableDefaultStage1Modules = true;
enablePerfControlUdevRules = true;
enableOsFanControl = true;
enableSoundSupport = true;
enableXorgRotation = true;
enableKernelPatches = true;
enableFwupdBiosUpdates = false;
autoUpdate = false;
};
steam.enable = false;
workarounds.ignoreMissingKernelModules = true;
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/580E-5E90";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
# Basic system configuration
networking.hostName = "steamnix";
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8";
# Nix settings
nixpkgs = {
overlays = [ (import (jovianNixos + "/overlay.nix")) ];
config.allowUnfree = true;
};
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = [ "cache.nixos.org" ];
allowed-users = [ "@wheel" "jeirmeister" ];
auto-optimise-store = true;
};
# System services
systemd.services = {
jupiter-fan-control = {
path = [ pkgs.dmidecode ];
serviceConfig = lib.mkForce {
Environment = "PYTHONUNBUFFERED=1";
StandardOutput = "journal";
StandardError = "journal";
ExecStart = "${pkgs.jupiter-fan-control}/share/jupiter-fan-control/fancontrol.py --run";
ExecStopPost = "${pkgs.jupiter-fan-control}/share/jupiter-fan-control/fancontrol.py --stop";
OOMScoreAdjust = -1000;
Restart = "on-failure";
};
};
};
swapDevices = [ ];
# UDev rules
services.udev.extraRules = ''
SUBSYSTEM=="hwmon*", KERNEL=="hwmon*", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chmod a+rw /sys/%p/pwm1"
SUBSYSTEM=="hwmon*", KERNEL=="hwmon*", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chmod a+rw /sys/%p/fan1_input"
'';
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0f3u1u4u3.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# Essential system packages
environment.systemPackages = with pkgs; [
jupiter-fan-control
pciutils
usbutils
lm_sensors
dmidecode
];
}

View File

@ -11,12 +11,7 @@
python.enable = true;
rust.enable = false;
go.enable = false;
javascript = {
enable = false;
nodejs = false;
pnpm = false;
yarn = false;
};
javascript.enable = false;
};
# Module configuration
@ -48,7 +43,6 @@
development = {
enable = true;
vscode.enable = true;
sublime.enable = false;
};
gaming = {
enable = true;
@ -57,52 +51,19 @@
};
};
# Host-specific overrides or configurations
hostConfig = {
steamdeck = {
enable = true;
jovian = {
enable = true;
hardware.has.amd.gpu = true;
devices.steamdeck = {
enable = true;
enableControllerUdevRules = true;
enableDefaultStage1Modules = true;
enablePerfControlUdevRules = true;
enableOsFanControl = true;
enableSoundSupport = true;
enableXorgRotation = true;
enableKernelPatches = true;
enableFwupdBiosUpdates = false;
autoUpdate = false;
};
steam.enable = false;
workarounds.ignoreMissingKernelModules = true;
};
plasma6 = {
enable = true;
extraSessionCommands = ''
${pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 2 0;
'';
};
};
};
# User-specific packages
home.packages = with pkgs; [
# Development tools
git
nixfmt-rfc-style
# Steam Deck specific home-manager settings
home = {
# Steam Deck specific packages
packages = with pkgs; [
# System Tools
jupiter-fan-control
pciutils
usbutils
lm_sensors
dmidecode
binutils
# CLI utilities
wget
curl
tree
# Virtual Display
linuxPackages.v4l2loopback
v4l-utils
];
};
# Virtual Display tools
linuxPackages.v4l2loopback
v4l-utils
];
}