This commit is contained in:
2026-02-17 04:35:03 +09:00
parent a0f0f7e726
commit ae82c16e0b
4 changed files with 54 additions and 3 deletions

0
NVIDIA-Linux-x86_64-535.288.01-grid.run Normal file → Executable file
View File

View File

@@ -1 +1 @@
sudo nixos-rebuild switch --flake .#mango --impure sudo nixos-rebuild switch --flake .#mango --impure --show-trace

View File

@@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }: { config, pkgs, inputs, ... }:
let let
nvidia_grid_version = "535.288.01"; nvidia_grid_version = "535.288.01";
@@ -19,10 +19,60 @@ in
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_6_12; boot.kernelPackages = pkgs.linuxPackages_6_12;
boot.blacklistedKernelModules = [ "nouveau" ]; boot.blacklistedKernelModules = [ "nouveau" ];
boot.kernelModules = [ "uinput" ];
boot.supportedFilesystems = [ "nfs" ]; boot.supportedFilesystems = [ "nfs" ];
services.rpcbind.enable = true; # needed for NFS services.rpcbind.enable = true; # needed for NFS
services.sunshine = {
enable = true;
autoStart = true;
capSysAdmin = true; # Sunshine이 가상 입력을 제어하기 위해 필요
openFirewall = true; # Sunshine 포트(47984-48010) 자동 허용
};
# 2. XDG Desktop Portal 설정 (libei의 통로 역할을 합니다)
xdg.portal = {
enable = true;
wlr.enable = true; # Sway(wlroots) 전용 포털
extraPortals = [
pkgs.xdg-desktop-portal-gtk
pkgs.libei # libei 패키지 명시적 포함
];
config.common.default = "*";
};
# 3. 환경 변수 추가 (Sway가 libei를 인식하도록 함)
environment.variables = {
"LIBEI_SOCKET" = "1";
"WLR_LIBSEAT_BACKEND" = "seatd";
};
services.udev.extraRules = ''
KERNEL=="uinput", GROUP="input", MODE="0666", OPTIONS+="static_node=uinput"
'';
systemd.user.services.mango = {
description = "mango Headless Session";
wantedBy = [ "default.target" ];
serviceConfig = {
# Wayland 헤드리스 백엔드 강제 사용
Environment = [
"WLR_BACKENDS=headless"
"WLR_LIBINPUT_NO_DEVICES=1"
"WLR_LIBSEAT_BACKEND=libseat"
"XDG_SESSION_TYPE=wayland"
"XDG_CURRENT_DESKTOP=mango"
];
# Sway 실행 (가상 디스플레이 1개 생성)
ExecStart = "dbus-run-session mango";
Restart = "always";
};
};
# 유저 세션이 로그아웃 되어도 서비스가 유지되도록 설정
users.users.bangae1.linger = true;
systemd.mounts = [{ systemd.mounts = [{
type = "nfs"; type = "nfs";
mountConfig = { mountConfig = {
@@ -111,7 +161,7 @@ in
users.users.bangae1 = { users.users.bangae1 = {
isNormalUser = true; isNormalUser = true;
description = "bangae1"; description = "bangae1";
extraGroups = [ "networkmanager" "wheel" "input" "video" ]; extraGroups = [ "networkmanager" "wheel" "input" "video" "seat" ];
packages = with pkgs; []; packages = with pkgs; [];
}; };

View File

@@ -1,3 +1,4 @@
# Auto start # Auto start
exec-once = noctalia-shell exec-once = noctalia-shell
exec-once = sunshine
exec = kime exec = kime