115 lines
2.7 KiB
Nix
115 lines
2.7 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
username,
|
|
inputs,
|
|
site_config,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
../../modules/desktop-common.nix
|
|
../../modules/desktop-steam-update.nix
|
|
../../modules/no-rgb.nix
|
|
./disk.nix
|
|
./impermanence.nix
|
|
./vr.nix
|
|
|
|
inputs.impermanence.nixosModules.impermanence
|
|
inputs.jovian-nixos.nixosModules.default
|
|
];
|
|
|
|
fileSystems."/media/games" = {
|
|
device = "/dev/disk/by-uuid/1878136e-765d-4784-b204-3536ab4fdac8";
|
|
fsType = "f2fs";
|
|
options = [ "nofail" ];
|
|
};
|
|
|
|
systemd.targets = {
|
|
sleep.enable = false;
|
|
suspend.enable = false;
|
|
hibernate.enable = false;
|
|
hybrid-sleep.enable = false;
|
|
};
|
|
|
|
networking.hostId = "abf570f9";
|
|
|
|
# Static IP for consistent SSH access
|
|
networking.networkmanager.ensureProfiles.profiles.enp7s0-static = {
|
|
connection = {
|
|
id = "enp7s0-static";
|
|
type = "ethernet";
|
|
interface-name = "enp7s0";
|
|
autoconnect = true;
|
|
};
|
|
ipv4 = {
|
|
method = "manual";
|
|
address1 = "${site_config.hosts.yarn.ip}/24,${site_config.lan.gateway}";
|
|
dns = lib.concatMapStrings (n: "${n};") site_config.dns_servers;
|
|
};
|
|
ipv6.method = "disabled";
|
|
};
|
|
|
|
services.openssh = {
|
|
enable = true;
|
|
ports = [ 22 ];
|
|
settings = {
|
|
PasswordAuthentication = false;
|
|
PermitRootLogin = "yes";
|
|
};
|
|
};
|
|
|
|
users.users.${username}.openssh.authorizedKeys.keys = [
|
|
site_config.ssh_keys.laptop
|
|
];
|
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
site_config.ssh_keys.laptop
|
|
site_config.ssh_keys.ci_deploy
|
|
];
|
|
|
|
programs.steam = {
|
|
remotePlay.openFirewall = true;
|
|
localNetworkGameTransfers.openFirewall = true;
|
|
};
|
|
|
|
# LACT (Linux AMDGPU Configuration Tool): https://github.com/ilya-zlobintsev/LACT
|
|
environment.systemPackages = with pkgs; [
|
|
lact
|
|
jovian-stubs
|
|
];
|
|
systemd.packages = with pkgs; [ lact ];
|
|
systemd.services.lactd.wantedBy = [ "multi-user.target" ];
|
|
|
|
systemd.services.lactd.serviceConfig.ExecStartPre = "${lib.getExe pkgs.bash} -c \"sleep 3s\"";
|
|
|
|
nixpkgs.config.allowUnfreePredicate =
|
|
pkg:
|
|
builtins.elem (lib.getName pkg) [
|
|
"steamdeck-hw-theme"
|
|
"steam-jupiter-unwrapped"
|
|
"steam"
|
|
"steam-original"
|
|
"steam-unwrapped"
|
|
"steam-run"
|
|
];
|
|
|
|
jovian = {
|
|
devices.steamdeck.enable = false;
|
|
steam = {
|
|
enable = true;
|
|
autoStart = true;
|
|
desktopSession = "niri";
|
|
user = username;
|
|
};
|
|
};
|
|
|
|
# Jovian-NixOS requires sddm
|
|
# https://github.com/Jovian-Experiments/Jovian-NixOS/commit/52f140c07493f8bb6cd0773c7e1afe3e1fd1d1fa
|
|
services.displayManager.sddm.wayland.enable = true;
|
|
|
|
# Disable gamescope from common.nix to avoid conflict with jovian-nixos
|
|
programs.gamescope.enable = lib.mkForce false;
|
|
}
|