Compare commits
4 Commits
05eb3e60f0
...
e01c50fdde
| Author | SHA1 | Date | |
|---|---|---|---|
|
e01c50fdde
|
|||
|
8b220c3657
|
|||
|
9710fbf69c
|
|||
|
1bf68ee9bf
|
@@ -60,6 +60,8 @@ in
|
||||
"video"
|
||||
"pipewire"
|
||||
"wheel"
|
||||
"input"
|
||||
"audio"
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
boot = {
|
||||
resumeDevice = "/dev/disk/by-uuid/56ad966f-3268-4b59-999a-48a082bb8052";
|
||||
plymouth.enable = true;
|
||||
|
||||
initrd = {
|
||||
verbose = true;
|
||||
@@ -37,6 +38,7 @@
|
||||
kernelParams = [
|
||||
"usbcore.autosuspend=-1"
|
||||
"quiet"
|
||||
"splash"
|
||||
"modeset"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -38,6 +38,9 @@ in
|
||||
|
||||
services = {
|
||||
printing.ricoh.enable = true;
|
||||
printing.enable = false;
|
||||
printing.cups-pdf.enable = false;
|
||||
|
||||
calibre-web = {
|
||||
enable = true;
|
||||
user = "fenix";
|
||||
@@ -64,6 +67,8 @@ in
|
||||
"video"
|
||||
"pipewire"
|
||||
"wheel"
|
||||
"input"
|
||||
"audio"
|
||||
];
|
||||
});
|
||||
groups = {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
boot = {
|
||||
binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
resumeDevice = "/dev/disk/by-uuid/56ad966f-3268-4b59-999a-48a082bb8052";
|
||||
plymouth.enable = true;
|
||||
|
||||
initrd = {
|
||||
verbose = true;
|
||||
@@ -35,6 +36,7 @@
|
||||
kernelParams = [
|
||||
"usbcore.autosuspend=-1"
|
||||
"quiet"
|
||||
"splash"
|
||||
"modeset"
|
||||
];
|
||||
};
|
||||
@@ -150,4 +152,5 @@
|
||||
}
|
||||
];
|
||||
|
||||
hardware.amdgpu.initrd.enable = true;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.printing.enable {
|
||||
config = {
|
||||
virtualisation.oci-containers.containers = lib.mkIf config.services.printing.ricoh.enable {
|
||||
ricoh = {
|
||||
image = "ricoh-cups:latest";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
enable32Bit = true;
|
||||
};
|
||||
};
|
||||
|
||||
fonts.fontconfig.cache32Bit = true;
|
||||
services.pipewire.alsa.support32Bit = true;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ in
|
||||
drivers = with pkgs; [
|
||||
gutenprint
|
||||
];
|
||||
cups-pdf.enable = true;
|
||||
cups-pdf.enable = lib.mkDefault true;
|
||||
browsing = lib.mkDefault true;
|
||||
};
|
||||
|
||||
@@ -192,5 +192,10 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.enable = lib.mkDefault true;
|
||||
xdg.portal.extraPortals = lib.mkDefault [
|
||||
pkgs.kdePackages.xdg-desktop-portal-kde
|
||||
pkgs.xdg-desktop-portal-gnome
|
||||
];
|
||||
xdg.portal.config.common.default = lib.mkDefault "*";
|
||||
}
|
||||
|
||||
93
roles/steamos.nix
Normal file
93
roles/steamos.nix
Normal file
@@ -0,0 +1,93 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
steamos = {
|
||||
amdvlk = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
users.users.steam = {
|
||||
isNormalUser = true;
|
||||
uid = 1010;
|
||||
password = "steam";
|
||||
extraGroups = [
|
||||
"video"
|
||||
"input"
|
||||
"audio"
|
||||
"networkmanager"
|
||||
];
|
||||
shell = pkgs.bash;
|
||||
};
|
||||
|
||||
services.xserver.enable = false;
|
||||
|
||||
# Современные видеодрайверы
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
amdgpu.amdvlk = lib.mkIf config.steamos.amdvlk {
|
||||
enable = true;
|
||||
support32Bit.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
};
|
||||
};
|
||||
services.getty.autologinUser = "steam";
|
||||
environment = {
|
||||
loginShellInit = ''
|
||||
[[ "$(tty)" = "/dev/tty1" ]] && ./gs.sh
|
||||
'';
|
||||
};
|
||||
|
||||
home-manager.users.steam = {
|
||||
home.file."gs.sh" = {
|
||||
text = ''
|
||||
#!/usr/bin/env bash
|
||||
set -xeuo pipefail
|
||||
|
||||
gamescopeArgs=(
|
||||
--adaptive-sync # VRR support
|
||||
--hdr-enabled
|
||||
--rt
|
||||
--steam
|
||||
-S DP-1
|
||||
)
|
||||
steamArgs=(
|
||||
-pipewire-dmabuf
|
||||
-tenfoot
|
||||
--console
|
||||
)
|
||||
|
||||
exec gamescope "$${gamescopeArgs[@]}" -- steam "$${steamArgs[@]}"
|
||||
'';
|
||||
executable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -54,7 +54,7 @@
|
||||
];
|
||||
};
|
||||
extraPortals = lib.mkForce [
|
||||
pkgs.kdePackages.xdg-desktop-portal-kde
|
||||
pkgs.xdg-desktop-portal-gnome
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user