add vr and some changes

This commit is contained in:
Buliway 2025-01-08 21:53:18 +03:00
parent c7c2b72aab
commit 20cf4ffc72
7 changed files with 73 additions and 13 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { { pkgs, spkgs, ... }: {
programs.ranger = { # Файловый менеджер в терминале programs.ranger = { # Файловый менеджер в терминале
enable = true; enable = true;
@ -14,7 +14,7 @@
lynx # Preview html pages lynx # Preview html pages
poppler # Preview PDF poppler # Preview PDF
djvulibre # Preview djvu djvulibre # Preview djvu
calibre # Preview ebooks (or epub-thumbnailer) spkgs.calibre # Preview ebooks (or epub-thumbnailer)
catdoc # Preview XLS as csv conversion catdoc # Preview XLS as csv conversion
exiftool # Information about media files exiftool # Information about media files
odt2txt # For OpenDocument text files odt2txt # For OpenDocument text files

View file

@ -21,8 +21,15 @@
# Можно назвать аналогом "sudo pacman -Su", не "Syu", репу не обновляет # Можно назвать аналогом "sudo pacman -Su", не "Syu", репу не обновляет
upg = "sudo nixos-rebuild switch --impure --upgrade --flake ${flakeDir}"; # Обновить пакеты, но не репозиторий во fleke.lock upg = "sudo nixos-rebuild switch --impure --upgrade --flake ${flakeDir}"; # Обновить пакеты, но не репозиторий во fleke.lock
# Возможно это аналог "sudo pacman -Sy". Обновить репозиторий, чтоб потом на него обновиться? Пакеты не обновляет # Обновить все flake inputs до последних версий. Возможно это аналог "sudo pacman -Sy" на Arch Linux
upd = "nix flake update ${flakeDir}"; # Обновляет flake.lock на последние коммиты с гитхаба? upd = "sudo nix flake update --flake ${flakeDir}";
# Update Single flake input. Требует дописать имя инпута после команды
# Для my-lib.url надо писать `upds my-lib`
upds = "nix flake lock --update-input";
# Garbage collector. Удалить все не используемые пакеты (например после обновы)
grb = "sudo nix-collect-garbage -d";
pkgs = "nvim ${flakeDir}/nixos/packages.nix"; pkgs = "nvim ${flakeDir}/nixos/packages.nix";
@ -71,10 +78,9 @@
"fzf" # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/fzf "fzf" # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/fzf
# "gitignore" # Use https://gitignore.io from the command line # "gitignore" # Use https://gitignore.io from the command line
# "gpg-agent" # Enables GPG's gpg-agent if it is not running. Хз что это значит, мб пригодится # "gpg-agent" # Enables GPG's gpg-agent if it is not running. Хз что это значит, мб пригодится
"httpie" # Completion for HTTPie, a command line HTTP client, a friendlier cURL replacement. # "httpie" # Completion for HTTPie, a command line HTTP client, a friendlier cURL replacement.
# "isodate" # Completion for the ISO 8601, as well as some aliases for common Date commands. # "isodate" # Completion for the ISO 8601, as well as some aliases for common Date commands.
# "mise" # dev tools, env vars, task runner https://github.com/jdx/mise # "mise" # dev tools, env vars, task runner https://github.com/jdx/mise
"pass" # Completion for the pass password manager (вдруг добавит нечёткий поиск?)
"safe-paste" # Preventing any code from running while pasting, so you have a chance to review what was pasted "safe-paste" # Preventing any code from running while pasting, so you have a chance to review what was pasted
"ssh-agent" # Автостарт ssh-agent. Хз надо ли настраивать и если да, то как "ssh-agent" # Автостарт ssh-agent. Хз надо ли настраивать и если да, то как
"timer" # Показывает время выполнения команды "timer" # Показывает время выполнения команды

View file

@ -9,6 +9,7 @@
./sound.nix ./sound.nix
./stylix.nix ./stylix.nix
./virtualisation.nix ./virtualisation.nix
./vr.nix
./xserver.nix ./xserver.nix
]; ];
} }

View file

@ -23,7 +23,7 @@
# Ширина символов одинаковая # Ширина символов одинаковая
monospace = { # default = DejaVu Sans Mono monospace = { # default = DejaVu Sans Mono
package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrainsMono Nerd Font Mono"; name = "JetBrainsMono Nerd Font Mono";
}; };
@ -34,7 +34,7 @@
# Без засечек # Без засечек
sansSerif = { # default = DejaVu Sans sansSerif = { # default = DejaVu Sans
package = pkgs.nerdfonts.override {fonts = ["Noto"];}; package = pkgs.nerd-fonts.noto;
name = "NotoSans Nerd Font"; name = "NotoSans Nerd Font";
}; };
@ -71,6 +71,7 @@
## Так что поставлю руками грувбокс через qtct ## ## Так что поставлю руками грувбокс через qtct ##
################################################## ##################################################
# https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/2
qt = { qt = {
enable = true; enable = true;
style = "kvantum"; style = "kvantum";

40
modules/nixos/vr.nix Normal file
View file

@ -0,0 +1,40 @@
# Beat Saber является OpenXR игрой, что не поддерживается Alvr из коробки
# Возможно на X11 это можно исправить простой настройкой в SteamVR
# Но на Wayland мне приходилось качать разом весь этот софт на Arch
# Поэтому сразу поставил всё что надо и не пробовал найти необходимый минимум
# Мб пригодится поставить opencomposite для трансляции OpenVR в OpenXR
{ pkgs, ... }: {
services = {
# Open source XR runtime
monado = {
enable = true;
};
# An OpenXR streaming application to a standalone headset
# wivrn = {
# enable = true;
# openFirewall = true;
# };
};
programs = {
# Stream VR games from your PC to your headset via Wi-Fi
alvr = {
enable = true;
openFirewall = true;
};
# UI for Monado, the open source OpenXR runtime
# envision = {
# enable = true;
# openFirewall = true;
# };
};
}

View file

@ -42,6 +42,10 @@
options = "grp:caps_toggle"; # Менять язык на CapsLock options = "grp:caps_toggle"; # Менять язык на CapsLock
}; };
displayManager.sessionCommands = ''
xsetroot -cursor_name left_ptr
'';
# Мб видеодрайвер можно не указывать # Мб видеодрайвер можно не указывать
# https://discourse.nixos.org/t/amd-gpu-optimal-settings/27648/3 # https://discourse.nixos.org/t/amd-gpu-optimal-settings/27648/3

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).
{ pkgs, inputs, ... }: { pkgs, pkgs2, spkgs, inputs, ... }:
let let
username = "buliway"; username = "buliway";
@ -46,14 +46,17 @@ in {
isNormalUser = true; isNormalUser = true;
description = username; description = username;
extraGroups = [ "networkmanager" "wheel" "input" "libvirtd" "storage" "docker" "video" ]; extraGroups = [ "networkmanager" "wheel" "input" "libvirtd" "storage" "docker" "video" ];
# packages = with pkgs; []; # packages = with pkgs; [
# clang-tools
# ];
}; };
}; };
home-manager = { home-manager = {
# also pass inputs to home-manager modules # also pass inputs to home-manager modules
useGlobalPkgs = true; useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs; }; useUserPackages = true;
extraSpecialArgs = { inherit spkgs; inherit pkgs2; inherit inputs; };
users.${username} = import ./home.nix; users.${username} = import ./home.nix;
}; };
@ -71,7 +74,12 @@ in {
]; ];
}; };
nix.settings.experimental-features = ["nix-command" "flakes"]; nix.settings = {
experimental-features = ["nix-command" "flakes"];
# For nix-gaming
substituters = ["https://nix-gaming.cachix.org"];
trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="];
};
system.stateVersion = "24.05"; # Don't change it system.stateVersion = "24.05"; # Don't change it