- Replaced repo2text with repo-to-text for more functionality

- Added in v4l2loopback configuratioins that may assist in ImmersedVR integration
- Reorganized configuration.nix
- Mounted SteamOS games filesystem with proper permissions
This commit is contained in:
jeirmeister 2024-10-30 02:05:29 -07:00
parent 5d6917f78d
commit c1f4c04ab2
9 changed files with 263 additions and 756 deletions

View File

@ -1,617 +0,0 @@
+--------------------------------------------+
| Dump tree for directory: . |
+--------------------------------------------+
├── home.nix
├── hosts
│ └── steamdeck
│ ├── configuration.nix
│ └── hardware-configuration.nix
└── users
└── jeirmeister
├── packages
│ ├── default.nix
│ └── repo2text.nix
└── programs
├── appimage.nix
├── default.nix
├── git.nix
├── gpg.nix
├── obsidian.nix
├── ssh.nix
├── sublime.nix
├── tailscale.nix
├── tmux.nix
├── vr.nix
├── vscode.nix
└── zsh.nix
--- Path: ./home.nix ---
# home.nix
{ config, pkgs, ... }:
let
customPackages = import ./users/jeirmeister/packages { inherit pkgs; };
in
{
imports = [
./users/jeirmeister/programs
];
home = {
username = "jeirmeister";
homeDirectory = "/home/jeirmeister";
stateVersion = "24.05";
packages = with pkgs; [
htop
fortune
ripgrep
fd
jq
tree
xclip
bitwarden-desktop
floorp
bitwarden-cli
immersed
nix-prefetch-git
customPackages.repo2text
];
};
programs.home-manager.enable = true;
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [
"openssl-1.1.1w"
];
};
};
}
--- Path: ./hosts/steamdeck/configuration.nix ---
{ config, pkgs, lib, ... }:
let
jovianNixosRev = "f6423d86bec22c25a576b23262495c5536b0d069";
jovianNixos = builtins.fetchTarball {
url = "https://github.com/Jovian-Experiments/Jovian-NixOS/archive/${jovianNixosRev}.tar.gz";
sha256 = "sha256:1frd1dfqd97idwf1rj29ab0wvyfa2nx2h3bp9hkbmfa1m802avmb";
};
in
{
imports = [
./hardware-configuration.nix
(jovianNixos + "/modules")
];
nixpkgs.overlays = [
(import (jovianNixos + "/overlay.nix"))
];
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = [
"https://cache.nixos.org"
];
allowed-users = [ "@wheel" "jeirmeister" ];
auto-optimise-store = true;
};
# Hardware detection
jovian.hardware.has.amd.gpu = true;
# Steam Deck Configuration
jovian = {
devices.steamdeck = {
enable = true;
# Hardware features
enableControllerUdevRules = true;
enableDefaultStage1Modules = true;
enablePerfControlUdevRules = true;
enableOsFanControl = true;
enableSoundSupport = true;
enableXorgRotation = true;
enableKernelPatches = true;
# Disable firmware updates temporarily
enableFwupdBiosUpdates = false;
autoUpdate = false;
};
# Steam Deck UI - disabled for now
steam.enable = false;
# Enable workarounds
workarounds.ignoreMissingKernelModules = true;
};
# Add explicit permissions for fan control
services.udev.extraRules = ''
# Steam Deck Fan Control
SUBSYSTEM=="hwmon*", KERNEL=="hwmon*", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chmod a+rw /sys/%p/pwm1"
SUBSYSTEM=="hwmon*", KERNEL=="hwmon*", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chmod a+rw /sys/%p/fan1_input"
'';
# Modify the fan control service
systemd.services.jupiter-fan-control = {
path = [ pkgs.dmidecode ];
serviceConfig = lib.mkForce {
Environment = "PYTHONUNBUFFERED=1";
StandardOutput = "journal";
StandardError = "journal";
ExecStart = "${pkgs.jupiter-fan-control}/share/jupiter-fan-control/fancontrol.py --run";
ExecStopPost = "${pkgs.jupiter-fan-control}/share/jupiter-fan-control/fancontrol.py --stop";
OOMScoreAdjust = -1000;
Restart = "on-failure";
};
};
# Hardware configuration
hardware = {
enableRedistributableFirmware = lib.mkForce true;
firmware = lib.mkForce [ pkgs.linux-firmware ];
graphics = {
enable = true;
enable32Bit = true;
};
};
# Boot configuration
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
initrd.kernelModules = [ "amdgpu" ];
kernelModules = [ "amdgpu" ];
};
# Network configuration
networking = {
hostName = "nixos";
networkmanager.enable = true;
};
# Time and Locale
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Display and Desktop
services = {
xserver = {
enable = true;
xkb = {
layout = "us";
variant = "";
};
};
desktopManager.plasma6.enable = true;
displayManager.sddm.enable = true;
# Important system services
pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
};
openssh = {
enable = true;
settings = {
PasswordAuthentication = true;
AllowUsers = [ "jeirmeister" ];
};
};
};
# User configuration
users.users.jeirmeister = {
isNormalUser = true;
description = "jeirmeister";
extraGroups = [
"networkmanager"
"wheel"
"input"
"video"
"audio"
"render"
"gamepad"
];
packages = with pkgs; [
kdePackages.kate
tailscale
];
};
users.groups = {
gamepad = {};
render = {};
};
programs.firefox.enable = true;
nixpkgs.config.allowUnfree = true;
services.tailscale.enable = true;
# System packages
environment.systemPackages = with pkgs; [
# Debugging tools
pciutils
usbutils
lm_sensors
dmidecode
# Basic utilities
tree
git
wget
curl
binutils
];
system.stateVersion = "24.05";
}
--- Path: ./hosts/steamdeck/hardware-configuration.nix ---
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ 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.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f3cc4aae-428e-435d-b9f7-333f7dad06b2";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/580E-5E90";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0f3u1u4u4.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
--- Path: ./users/jeirmeister/packages/default.nix ---
# users/jeirmeister/packages/default.nix
{ pkgs }:
{
repo2text = pkgs.callPackage ./repo2text.nix {};
}
--- Path: ./users/jeirmeister/packages/repo2text.nix ---
# users/jeirmeister/packages/repo2text.nix
{ pkgs }:
let
pythonEnv = pkgs.python3.withPackages (ps: with ps; [
# Add any future dependencies here if needed
]);
in
pkgs.stdenv.mkDerivation {
pname = "repo2text";
version = "0.1.0";
src = pkgs.fetchFromGitHub {
owner = "pde-rent";
repo = "repo2text";
rev = "2024b0eebebf739136401dc2f2df096be828558c";
hash = "sha256-80T28lXkk8hl/chzIy3Wvs1Jbs/rspxlnvWKa2DwJnU=";
};
buildInputs = [ pythonEnv ];
installPhase = ''
mkdir -p $out/bin
cp main.py $out/bin/repo2text
chmod +x $out/bin/repo2text
# Ensure it uses python interpreter
sed -i "1i#!${pythonEnv}/bin/python" $out/bin/repo2text
'';
meta = with pkgs.lib; {
description = "Tool to dump a repository into a single text file";
homepage = "https://github.com/pde-rent/repo2text";
license = licenses.mit;
maintainers = [];
};
}
--- Path: ./users/jeirmeister/programs/appimage.nix ---
# users/jeirmeister/programs/appimage.nix
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
# Required for AppImage support
appimage-run
# Optional but useful tools for AppImage management
zlib
fuse
fuse3
];
}
--- Path: ./users/jeirmeister/programs/default.nix ---
# users/jeirmeister/programs/default.nix
{ config, pkgs, ... }:
{
imports = [
./appimage.nix
./git.nix
./gpg.nix
./obsidian.nix
./ssh.nix
./sublime.nix
./tailscale.nix
./tmux.nix
./vscode.nix
./zsh.nix
];
}
--- Path: ./users/jeirmeister/programs/git.nix ---
# users/jeirmeister/programs/git.nix
{ config, pkgs, ... }:
{
programs.git = {
enable = true;
lfs.enable = true;
userName = "jeirmeister";
userEmail = "jeir@jeirslab.xyz";
extraConfig = {
init.defaultBranch = "main";
pull.rebase = false;
};
ignores = [
".DS_Store"
"*.swp"
".vscode/"
".idea/"
];
};
}
--- Path: ./users/jeirmeister/programs/gpg.nix ---
# users/jeirmeister/programs/gpg.nix
{ config, pkgs, ... }:
{
programs.gpg = {
enable = true;
# settings = {
# # Basic GPG settings
# default-key = "jeir@jeirslab.xyz"; # Replace with your key ID
# keyserver = "hkps://keys.openpgp.org";
# };
};
services.gpg-agent = {
enable = true;
defaultCacheTtl = 1800;
enableSshSupport = true;
# pinentryPackage = "curses"; # You can use "gtk2", "curses", or "tty" instead
};
# Make sure we have the tools we need
home.packages = with pkgs; [
gnupg
pinentry-qt # Change this based on your pinentryFlavor
];
}
--- Path: ./users/jeirmeister/programs/obsidian.nix ---
# users/jeirmeister/programs/obsidian.nix
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
obsidian
];
}
--- Path: ./users/jeirmeister/programs/ssh.nix ---
# users/jeirmeister/programs/ssh.nix
{ config, pkgs, ... }:
{
programs.ssh = {
enable = true;
# Add your SSH configurations here
# matchBlocks = {
# "github.com" = {
# hostname = "github.com";
# user = "git";
# identityFile = "~/.ssh/github";
# };
# };
};
}
--- Path: ./users/jeirmeister/programs/sublime.nix ---
# users/jeirmeister/programs/sublime.nix
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
sublime4
];
}
--- Path: ./users/jeirmeister/programs/tailscale.nix ---
# users/jeirmeister/programs/tailscale.nix
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
tailscale
];
}
--- Path: ./users/jeirmeister/programs/tmux.nix ---
# users/jeirmeister/programs/tmux.nix
{ config, pkgs, ... }:
{
programs.tmux = {
enable = true;
clock24 = true;
# Add your tmux configurations here
};
}
--- Path: ./users/jeirmeister/programs/vr.nix ---
{ config, pkgs, ... }:
{
programs.immersed.enable = true;
}
--- Path: ./users/jeirmeister/programs/vscode.nix ---
# users/jeirmeister/programs/vscode.nix
{ config, pkgs, ... }:
{
programs.vscode = {
enable = true;
package = pkgs.vscode;
# Uncomment when you know which extensions you want
# extensions = with pkgs.vscode-extensions; [
# vscodevim.vim
# yzhang.markdown-all-in-one
# bbenoist.nix
# ms-python.python
# ];
userSettings = {
"editor.fontSize" = 14;
"editor.fontFamily" = "FiraCode Nerd Font";
"editor.formatOnSave" = true;
"files.autoSave" = "onFocusChange";
};
};
}
--- Path: ./users/jeirmeister/programs/zsh.nix ---
# users/jeirmeister/programs/zsh.nix
{ config, pkgs, ... }:
{
programs.zsh = {
enable = true;
autosuggestion.enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
theme = "robbyrussell";
plugins = [ "git" "docker" "kubectl" ];
};
# Add this section to ensure home-manager paths are properly sourced
initExtra = ''
# Add home-manager applications to PATH
export PATH=$HOME/.nix-profile/bin:$PATH
# Ensure XDG directories are set
export XDG_DATA_HOME=$HOME/.local/share
export XDG_CONFIG_HOME=$HOME/.config
export XDG_CACHE_HOME=$HOME/.cache
'';
};
# Make zsh the default shell
home.sessionVariables = {
SHELL = "${pkgs.zsh}/bin/zsh";
};
}

View File

@ -25,9 +25,8 @@ in
bitwarden-desktop bitwarden-desktop
floorp floorp
bitwarden-cli bitwarden-cli
immersed
nix-prefetch-git nix-prefetch-git
(customPackages.repo2text) # Try wrapping in parentheses (customPackages.repo-to-text) # Try wrapping in parentheses
# Development tools # Development tools
nodejs nodejs

View File

@ -1,3 +1,4 @@
# Modify the kernel and v4l2loopback section in your configuration.nix
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
@ -6,34 +7,45 @@ let
url = "https://github.com/Jovian-Experiments/Jovian-NixOS/archive/${jovianNixosRev}.tar.gz"; url = "https://github.com/Jovian-Experiments/Jovian-NixOS/archive/${jovianNixosRev}.tar.gz";
sha256 = "sha256:1frd1dfqd97idwf1rj29ab0wvyfa2nx2h3bp9hkbmfa1m802avmb"; sha256 = "sha256:1frd1dfqd97idwf1rj29ab0wvyfa2nx2h3bp9hkbmfa1m802avmb";
}; };
# Custom v4l2loopback configuration for Steam Deck
v4l2loopback-options = {
options = {
exclusive_caps = 1;
video_nr = 0;
card_label = "Immersed Virtual Camera";
};
};
in in
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
(jovianNixos + "/modules") (jovianNixos + "/modules")
]; ];
nixpkgs.overlays = [ nixpkgs = {
(import (jovianNixos + "/overlay.nix")) overlays = [
]; (import (jovianNixos + "/overlay.nix"))
];
config.allowUnfree = true;
};
# Nix Configuration
nix.settings = { nix.settings = {
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" ];
substituters = [ substituters = [ "https://cache.nixos.org" ];
"https://cache.nixos.org" allowed-users = [ "@wheel" "jeirmeister" ];
];
allowed-users = [ "@wheel" "jeirmeister" ];
auto-optimise-store = true; auto-optimise-store = true;
}; };
# Hardware detection
jovian.hardware.has.amd.gpu = true;
# Steam Deck Configuration # Steam Deck Configuration
jovian = { jovian = {
# Hardware detection
hardware.has.amd.gpu = true;
devices.steamdeck = { devices.steamdeck = {
enable = true; enable = true;
# Hardware features # Hardware features
enableControllerUdevRules = true; enableControllerUdevRules = true;
enableDefaultStage1Modules = true; enableDefaultStage1Modules = true;
@ -48,94 +60,124 @@ in
autoUpdate = false; autoUpdate = false;
}; };
# Steam Deck UI - disabled for now
steam.enable = false; steam.enable = false;
# Enable workarounds
workarounds.ignoreMissingKernelModules = true; workarounds.ignoreMissingKernelModules = true;
}; };
# Add explicit permissions for fan control # Hardware Configuration
hardware = {
enableRedistributableFirmware = lib.mkForce true;
firmware = lib.mkForce [ pkgs.linux-firmware ];
graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
libva
vaapiVdpau # required for Immersed-VR
v4l-utils
];
};
};
# Boot Configuration
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
# Combined kernel modules configuration
initrd.kernelModules = [
"amdgpu"
# "v4l2loopback"
];
kernelModules = [
"amdgpu"
"v4l2loopback"
"snd-aloop"
];
# extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ];
extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
extraModprobeConfig = ''
options v4l2loopback exclusive_caps=1 video_nr=0 card_label="Immersed Virtual Camera"
'';
};
# System Services
systemd.services = {
# Fan Control Service
jupiter-fan-control = {
path = [ pkgs.dmidecode ];
serviceConfig = lib.mkForce {
Environment = "PYTHONUNBUFFERED=1";
StandardOutput = "journal";
StandardError = "journal";
ExecStart = "${pkgs.jupiter-fan-control}/share/jupiter-fan-control/fancontrol.py --run";
ExecStopPost = "${pkgs.jupiter-fan-control}/share/jupiter-fan-control/fancontrol.py --stop";
OOMScoreAdjust = -1000;
Restart = "on-failure";
};
};
# Immersed Video Service
# immersed-video = {
# description = "Load v4l2loopback module for Immersed";
# wantedBy = [ "multi-user.target" ];
# after = [ "systemd-modules-load.service" ];
# requires = [ "systemd-modules-load.service" ];
# serviceConfig = {
# Type = "oneshot";
# RemainAfterExit = true;
# ExecStartPre = "${pkgs.kmod}/bin/modprobe -r v4l2loopback || true";
# ExecStart = "${pkgs.kmod}/bin/modprobe v4l2loopback exclusive_caps=1 video_nr=0 card_label='Immersed Virtual Camera'";
# ExecStop = "${pkgs.kmod}/bin/rmmod v4l2loopback || true";
# };
# };
};
# Ensure module loading at boot
systemd.services."systemd-modules-load" = {
wantedBy = [ "multi-user.target" ];
restartIfChanged = true;
};
# UDev Rules
services.udev.extraRules = '' services.udev.extraRules = ''
# Steam Deck Fan Control # Steam Deck Fan Control
SUBSYSTEM=="hwmon*", KERNEL=="hwmon*", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chmod a+rw /sys/%p/pwm1" SUBSYSTEM=="hwmon*", KERNEL=="hwmon*", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chmod a+rw /sys/%p/pwm1"
SUBSYSTEM=="hwmon*", KERNEL=="hwmon*", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chmod a+rw /sys/%p/fan1_input" SUBSYSTEM=="hwmon*", KERNEL=="hwmon*", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chmod a+rw /sys/%p/fan1_input"
''; '';
# Modify the fan control service # Network Configuration
systemd.services.jupiter-fan-control = {
path = [ pkgs.dmidecode ];
serviceConfig = lib.mkForce {
Environment = "PYTHONUNBUFFERED=1";
StandardOutput = "journal";
StandardError = "journal";
ExecStart = "${pkgs.jupiter-fan-control}/share/jupiter-fan-control/fancontrol.py --run";
ExecStopPost = "${pkgs.jupiter-fan-control}/share/jupiter-fan-control/fancontrol.py --stop";
OOMScoreAdjust = -1000;
Restart = "on-failure";
};
};
# Hardware configuration
hardware = {
enableRedistributableFirmware = lib.mkForce true;
firmware = lib.mkForce [ pkgs.linux-firmware ];
graphics = {
enable = true;
enable32Bit = true;
};
};
# Boot configuration
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
initrd.kernelModules = [ "amdgpu" ];
kernelModules = [ "amdgpu" ];
};
# Network configuration
networking = { networking = {
hostName = "nixos"; hostName = "steamnix";
networkmanager.enable = true; networkmanager.enable = true;
}; };
# Time and Locale # Desktop Environment
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Display and Desktop
services = { services = {
xserver = { xserver = {
enable = true; enable = true;
xkb = { xkb.layout = "us";
layout = "us";
variant = "";
};
}; };
desktopManager.plasma6.enable = true; desktopManager.plasma6.enable = true;
displayManager.sddm.enable = true; displayManager.sddm.enable = true;
programs.Xwayland.enable = true;
# Important system services
# Audio
pipewire = { pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
pulse.enable = true; pulse.enable = true;
}; };
# SSH Server
openssh = { openssh = {
enable = true; enable = true;
settings = { settings = {
@ -143,43 +185,54 @@ in
AllowUsers = [ "jeirmeister" ]; AllowUsers = [ "jeirmeister" ];
}; };
}; };
# Tailscale VPN
tailscale.enable = true;
};
# User Configuration
users = {
users.jeirmeister = {
isNormalUser = true;
description = "jeirmeister";
group = "steamos";
extraGroups = [
"networkmanager"
"users"
"wheel"
"input"
"video"
"audio"
"render"
"gamepad"
];
packages = with pkgs; [
tailscale
];
};
groups = {
steamos.gid = 1000;
gamepad = {};
render = {};
};
}; };
# User configuration # System Programs and Packages
users.users.jeirmeister = {
isNormalUser = true;
description = "jeirmeister";
extraGroups = [
"networkmanager"
"wheel"
"input"
"video"
"audio"
"render"
"gamepad"
];
packages = with pkgs; [
kdePackages.kate
tailscale
];
};
users.groups = {
gamepad = {};
render = {};
};
programs.firefox.enable = true; programs.firefox.enable = true;
nixpkgs.config.allowUnfree = true;
services.tailscale.enable = true;
# System packages
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Debugging tools # Debugging tools
pciutils pciutils
usbutils usbutils
lm_sensors lm_sensors
dmidecode dmidecode
linuxPackages.v4l2loopback # Virtual display for ImmersedVR
v4l-utils
# Development tools
nixfmt-rfc-style
# Basic utilities # Basic utilities
tree tree
git git
@ -188,5 +241,22 @@ in
binutils binutils
]; ];
# Locale and Time
time.timeZone = "America/Los_Angeles";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
};
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View File

@ -23,8 +23,12 @@
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [ "fmask=0077" "dmask=0077" ];
}; };
# Mount SteamOS games from NVME
swapDevices = [ ]; fileSystems."/mnt/steamos" =
{ device = "/dev/disk/by-uuid/5261b393-9b3e-4334-9ddf-4a1eb9865905";
fsType = "ext4";
};
swapDevices = [ ]; #TODO: consider releasing the zram swapfile and utilizing the one already on steamos
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View File

@ -2,5 +2,5 @@
{ pkgs }: { pkgs }:
{ {
repo2text = pkgs.callPackage ./repo2text.nix {}; repo-to-text = pkgs.callPackage ./repo-to-text.nix {};
} }

View File

@ -0,0 +1,41 @@
# users/jeirmeister/packages/repo2text.nix
{ lib
, python3Packages
, fetchPypi
, tree
}:
python3Packages.buildPythonPackage rec {
pname = "repo_to_text"; # Changed to underscore for PyPI
version = "0.4.2";
format = "setuptools";
src = fetchPypi {
pname = "repo_to_text"; # Using underscore here too
inherit version;
sha256 = "d2oydJFP6PNUyPVZlrOtCkyMrFZyc1fkGRa/ZnqsCkQ=";
};
propagatedBuildInputs = with python3Packages; [
pyyaml
pyperclip
];
buildInputs = [
tree
];
pythonImportsCheck = [ "repo_to_text" ]; # Underscore here too
meta = with lib; {
description = "Convert directory/repository structure and contents into a single text file";
homepage = "https://github.com/kirill-markin/repo-to-text";
license = licenses.mit;
maintainers = [];
};
# This ensures the command is available as repo-to-text
postInstall = ''
mv $out/bin/repo_to_text $out/bin/repo-to-text || true
'';
}

View File

@ -1,29 +0,0 @@
# users/jeirmeister/packages/repo2text.nix
{ lib
, python3Packages
, fetchPypi
}:
python3Packages.buildPythonPackage rec {
pname = "repo2text";
version = "0.1.1";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "nH/sLxittYMaIrlqh84PCxzMh7scSvYq7o6E3Edm9RI=";
};
propagatedBuildInputs = with python3Packages; [
gitpython
];
pythonImportsCheck = [ "repo2text" ];
meta = with lib; {
description = "Convert code repositories into text format for LLM processing";
homepage = "https://pypi.org/project/repo2text/";
license = licenses.mit;
maintainers = [];
};
}

View File

@ -13,6 +13,7 @@
./tailscale.nix ./tailscale.nix
./tmux.nix ./tmux.nix
./vscode.nix ./vscode.nix
./vr.nix
./zsh.nix ./zsh.nix
]; ];
} }

View File

@ -1,5 +1,43 @@
# users/jeirmeister/programs/vr.nix
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
programs.immersed.enable = true; home.packages = with pkgs; [
} immersed
];
systemd.user.services.immersed = {
Unit = {
Description = "Immersed VR Client";
After = [ "graphical-session.target" "network.target" ];
PartOf = [ "graphical-session.target" ];
Requires = [ "network.target" ];
};
Service = {
Type = "simple";
ExecStartPre = "${pkgs.coreutils}/bin/sleep 2"; # Give the video device time to initialize
ExecStart = "${pkgs.immersed}/bin/immersed";
Environment = [
"DISPLAY=:0"
"XDG_CURRENT_DESKTOP=KDE" # Since you're using Plasma
"QT_QPA_PLATFORM=xcb" # Force X11 mode for better compatibility
"XDG_RUNTIME_DIR=/run/user/1000"
"XDG_SESSION_TYPE=x11" # Force X11 mode
];
Restart = "on-failure";
RestartSec = 5;
StandardOutput = "journal";
StandardError = "journal";
DevicePolicy = "auto";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
# Create required directories
home.file.".local/share/immersed/.keep".text = "";
home.file.".config/immersed/.keep".text = "";
}