Add steam deck host
This commit is contained in:
parent
9b7af6f568
commit
73992afd4f
7 changed files with 163 additions and 1 deletions
44
flake.lock
generated
44
flake.lock
generated
|
|
@ -137,6 +137,27 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"jovian": {
|
||||||
|
"inputs": {
|
||||||
|
"nix-github-actions": "nix-github-actions",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1770366813,
|
||||||
|
"narHash": "sha256-q6dmMSV2EcA6/EXy2oJXoLgxSGjrKY0bixfYbK4fi/4=",
|
||||||
|
"owner": "Jovian-Experiments",
|
||||||
|
"repo": "Jovian-NixOS",
|
||||||
|
"rev": "2af374cd694b45c7d1773edda154081d0ee81f64",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Jovian-Experiments",
|
||||||
|
"repo": "Jovian-NixOS",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-darwin": {
|
"nix-darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
@ -158,6 +179,28 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-github-actions": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"jovian",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1729697500,
|
||||||
|
"narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=",
|
||||||
|
"owner": "zhaofengli",
|
||||||
|
"repo": "nix-github-actions",
|
||||||
|
"rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zhaofengli",
|
||||||
|
"ref": "matrix-name",
|
||||||
|
"repo": "nix-github-actions",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-homebrew": {
|
"nix-homebrew": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"brew-src": "brew-src"
|
"brew-src": "brew-src"
|
||||||
|
|
@ -236,6 +279,7 @@
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"firefox-addons": "firefox-addons",
|
"firefox-addons": "firefox-addons",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"jovian": "jovian",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nix-homebrew": "nix-homebrew",
|
"nix-homebrew": "nix-homebrew",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
|
|
||||||
20
flake.nix
20
flake.nix
|
|
@ -17,9 +17,11 @@
|
||||||
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
|
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
|
||||||
disko.url = "github:nix-community/disko";
|
disko.url = "github:nix-community/disko";
|
||||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
jovian.url = "github:Jovian-Experiments/Jovian-NixOS";
|
||||||
|
jovian.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, nixvim, claude-code, firefox-addons, nix-homebrew, disko }:
|
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, nixvim, claude-code, firefox-addons, nix-homebrew, disko, jovian }:
|
||||||
{
|
{
|
||||||
darwinConfigurations."macbook" = nix-darwin.lib.darwinSystem {
|
darwinConfigurations."macbook" = nix-darwin.lib.darwinSystem {
|
||||||
modules = [
|
modules = [
|
||||||
|
|
@ -62,6 +64,16 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixosConfigurations."deck" = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
jovian.nixosModules.default
|
||||||
|
disko.nixosModules.disko
|
||||||
|
./hosts/nixos/deck/system.nix
|
||||||
|
./hosts/nixos/deck/disk-config.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"yanlin@macbook" = home-manager.lib.homeManagerConfiguration {
|
"yanlin@macbook" = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
|
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
|
||||||
|
|
@ -92,6 +104,12 @@
|
||||||
modules = [ ./hosts/nixos/nfss/home.nix ];
|
modules = [ ./hosts/nixos/nfss/home.nix ];
|
||||||
extraSpecialArgs = { inherit claude-code nixvim; };
|
extraSpecialArgs = { inherit claude-code nixvim; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"yanlin@deck" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
|
modules = [ ./hosts/nixos/deck/home.nix ];
|
||||||
|
extraSpecialArgs = { inherit claude-code nixvim; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
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
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
"*" = {
|
"*" = {
|
||||||
addKeysToAgent = "yes";
|
addKeysToAgent = "yes";
|
||||||
|
identitiesOnly = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
"github.com" = {
|
"github.com" = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue