Add initial Steam Deck fongi

This commit is contained in:
albert 2024-04-24 13:13:51 +09:00
parent 66efa565af
commit 28de149b9c
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A
5 changed files with 94 additions and 0 deletions

View file

@ -33,6 +33,7 @@ nix develop -c /etc/nixos/git/docs/setup.sh
| quitman-rpi4 | Raspberry Pi at my parents house. Headscale Exit Node | On Hold |
| bakersfield-rpi4 | Raspberry Pi at my brothers house. Headscale Exit Node | Complete |
| nuc-server | Second NUC server at my brothers house | On Hold |
| steamdeck | Valve Steam Deck, handheld gaming console | In Work |
# Images
| Name | Description | Build Commands |

View file

@ -47,6 +47,8 @@
compose2nix.inputs.nixpkgs.follows = "nixpkgs";
# Hyprland Flake
hyprland.url = "github:hyprwm/Hyprland";
# Steam Deck configs for NixOS
jovain.url = "github:Jovian-Experiments/Jovian-NixOS"
};
outputs = { self, nixpkgs, nixpkgs-wayland, home-manager, lanzaboote, nur, sops-nix, doom-emacs, nixos-generators, deploy-rs, ... } @inputs:
let
@ -66,6 +68,7 @@
piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; system = "aarch64-linux"; type = "small"; };
quitman-rpi4 = libx.mkHost { hostname = "quitman-rpi4"; system = "aarch64-linux"; type = "small"; };
bakersfield-rpi4 = libx.mkHost { hostname = "bakersfield-rpi4"; system = "aarch64-linux"; type = "small"; };
steamdeck = libx.mkHost { hostname = "steamdeck"; unfree = true; desktop = "plasma6"; repo = "nixpkgs-unfree"; };
};
homeConfigurations = {
"albert@osaka-linode-01" = libx.mkHome { hostname = "osaka-linode-01"; type = "small"; };
@ -78,6 +81,7 @@
"albert@piaware-rpi4" = libx.mkHome { hostname = "piaware-rpi4"; system = "aarch64-linux"; type = "small"; };
"albert@quitman-rpi4" = libx.mkHome { hostname = "quitman-rpi4"; system = "aarch64-linux"; type = "small"; };
"albert@bakersfield-rpi4" = libx.mkHome { hostname = "bakersfield-rpi4"; system = "aarch64-linux"; type = "small"; };
"albert@steamdeck" = libx.mkHome { hostname = "steamdeck"; desktop = "plasma6"; };
# Containers
"albert@rdesktop" = libx.mkHome { hostname = "rdesktop"; desktop = "xfce"; };
};

View file

@ -0,0 +1,3 @@
{
}

View file

@ -0,0 +1,36 @@
{ inputs, config, lib, username, pkgs, ... }: {
imports = [
inputs.jovian.nixosModules
./disks.nix
../../common/modules/boot.nix
../../common/services/tailscale-autoconnect.nix
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "acpi_call" ];
boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
networking.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# Set your time zone.
time.timeZone = "Asia/Tokyo";
# Set the networking hostname:
networking.hostName = "steamdeck";
jovian = {
decky-loader.enable = true;
steam.enable = true;
steam.autoStart = true;
steam.user = username;
steamos.useSteamOSConfig = true;
devices.steamdeck.enable = true;
hardwarhas.amd.gpu = true;
};
environment.systemPackages = with pkgs; [
jupiter-dock-updater-bin
steamdeck-firmware
];
}

View file

@ -0,0 +1,50 @@
{
services.btrfs.autoScrub.enable = true;
services.btrfs.autoScrub.interval = "weekly";
disko.devices.disk.nvme0 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
BOOT = {
priority = 1;
name = "BOOT";
start = "0%";
end = "550MiB";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
# https://github.com/nix-community/disko/issues/527
mountOptions = [ "umask=0077" ];
mountpoint = "/boot";
};
}; # partition 1 (ESP)
ROOT = {
start = "550MiB";
end = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ];
}; # root
"/home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" ];
}; # home
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ];
}; # nix
}; # subvolumes
}; # content
}; # partition 2 (/ BTRFS)
}; # partitions
}; # content
}; # disko.devices.disk.nvme0
} # root