Add steam deck host
This commit is contained in:
parent
9b7af6f568
commit
73992afd4f
7 changed files with 163 additions and 1 deletions
34
hosts/nixos/deck/disk-config.nix
Normal file
34
hosts/nixos/deck/disk-config.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
};
|
||||
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
hosts/nixos/deck/hardware-configuration.nix
Normal file
14
hosts/nixos/deck/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
7
hosts/nixos/deck/home.nix
Normal file
7
hosts/nixos/deck/home.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../home-default.nix
|
||||
];
|
||||
}
|
||||
44
hosts/nixos/deck/system.nix
Normal file
44
hosts/nixos/deck/system.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../system-default.nix
|
||||
];
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.configurationLimit = 10;
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 3;
|
||||
};
|
||||
|
||||
jovian.devices.steamdeck.enable = true;
|
||||
|
||||
jovian.steam = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
user = "yanlin";
|
||||
};
|
||||
|
||||
jovian.steamos.useSteamOSConfig = true;
|
||||
|
||||
jovian.hardware.has.amd.gpu = true;
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
networking = {
|
||||
hostName = "deck";
|
||||
networkmanager.enable = true;
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
users.users.yanlin = {
|
||||
extraGroups = [ "networkmanager" "wheel" "video" "audio" "input" ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pciutils
|
||||
usbutils
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue