Compare commits

...

5 Commits

126 changed files with 2037 additions and 1358 deletions

41
.envrc.example Normal file
View File

@ -0,0 +1,41 @@
# Development environment configuration
export FLAKE_ROOT="$PWD"
# Installation target configuration
export TARGET_HOST="${TARGET_HOST:-""}" # e.g., "steamdeck" or "surface"
export TARGET_USER="${TARGET_USER:-""}" # e.g., "jeirmeister"
# Enable flakes and unfree packages for development shell
export NIX_CONFIG="
experimental-features = nix-command flakes
allow-unfree = true
accept-flake-config = true
"
# Development shell helper functions
build_system() {
if [ -z "$TARGET_HOST" ]; then
echo "ERROR: TARGET_HOST not set"
return 1
fi
nixos-rebuild build --flake ".#${TARGET_HOST}"
}
switch_system() {
if [ -z "$TARGET_HOST" ]; then
echo "ERROR: TARGET_HOST not set"
return 1
fi
sudo nixos-rebuild switch --flake ".#${TARGET_HOST}"
}
update_home() {
if [ -z "$TARGET_HOST" ] || [ -z "$TARGET_USER" ]; then
echo "ERROR: TARGET_HOST and TARGET_USER must be set"
return 1
fi
home-manager switch --flake ".#${TARGET_USER}@${TARGET_HOST}"
}
# Load the development shell
use flake

View File

@ -1,3 +0,0 @@
{
"users/jeirmeister/programs/shell/terminals/kitty.nix": "{ config, pkgs, ... }:\n\n{\n programs.kitty = {\n enable = true;\n settings = {\n font_family = \"JetBrains Mono\";\n font_size = 12;\n window_padding_width = 4;\n background_opacity = \"0.95\";\n hide_window_decorations = \"yes\";\n tab_bar_style = \"powerline\";\n \n # Dracula theme colors\n foreground = \"#F8F8F2\";\n background = \"#282A36\";\n selection_foreground = \"#ffffff\";\n selection_background = \"#44475a\";\n url_color = \"#8be9fd\";\n cursor = \"#f8f8f2\";\n\n # black\n color0 = \"#21222c\";\n color8 = \"#6272a4\";\n\n # red\n color1 = \"#ff5555\";\n color9 = \"#ff6e6e\";\n\n # green\n color2 = \"#50fa7b\";\n color10 = \"#69ff94\";\n\n # yellow\n color3 = \"#f1fa8c\";\n color11 = \"#ffffa5\";\n\n # blue\n color4 = \"#bd93f9\";\n color12 = \"#d6acff\";\n\n # magenta\n color5 = \"#ff79c6\";\n color13 = \"#ff92df\";\n\n # cyan\n color6 = \"#8be9fd\";\n color14 = \"#a4ffff\";\n\n # white\n color7 = \"#f8f8f2\";\n color15 = \"#ffffff\";\n\n # tab bar\n active_tab_foreground = \"#282a36\";\n active_tab_background = \"#f8f8f2\";\n inactive_tab_foreground = \"#282a36\";\n inactive_tab_background = \"#6272a4\";\n };\n };\n}"
}

View File

@ -1,32 +0,0 @@
#!/usr/bin/env bash
# README # ------
# Configure the config.json file in this same directory for an AI chatbot to
# Assist in making direct changes to files.
set -euo pipefail
# Make sure jq is available
if ! command -v jq &> /dev/null; then
echo "Error: jq is required but not installed"
exit 1
fi
# Make sure config.json exists
if [ ! -f "config.json" ]; then
echo "Error: config.json not found in current directory"
exit 1
fi
echo "Creating directories and files..."
# Process each key in the JSON configuration
for file in $(jq -r 'keys[]' config.json); do
# Create directory if it doesn't exist
dir=$(dirname "$file")
mkdir -p "$dir"
# Write content to file
jq -r --arg file "$file" '.[$file]' config.json > "$file"
echo "Created: $file"
done
echo "Configuration files have been created successfully!"

View File

@ -1,38 +0,0 @@
# NixOS Steam Deck Recovery Procedures
This documentation covers recovery procedures for NixOS on Steam Deck. It was created based on real recovery scenarios and provides practical solutions for common issues.
## Quick Reference
1. Boot Issues
- [Boot Recovery Guide](./boot-recovery.md)
- Common root causes: filesystem mounts, hardware configuration
2. Network Issues
- [Network Recovery Guide](./network-recovery.md)
- Essential for rebuilding with Jovian packages
3. Filesystem Issues
- [Filesystem Troubleshooting](./filesystem-issues.md)
- Handling mount points and permissions
## Emergency Recovery Steps
1. Boot into emergency mode
2. Establish network connectivity
3. Fix configuration issues
4. Rebuild system
5. Verify and reboot
## Prevention Strategies
1. Maintain separate configurations:
- Main configuration
- Minimal fallback configuration
- Hardware-specific configuration
2. Regular backups of working configurations
3. Testing changes in VM before applying
4. Maintaining recovery tools and scripts

View File

@ -1,19 +0,0 @@
# Recovery Scripts
This directory contains scripts for automating common recovery tasks.
## Available Scripts
1. `network-recovery.sh`
- Automates network setup in emergency environment
- Handles both ethernet and wifi configurations
- Usage: `sudo ./network-recovery.sh`
## Script Development Guidelines
1. All scripts should:
- Include clear documentation
- Handle errors gracefully
- Provide status feedback
- Support both automatic and interactive modes
- Create backups before making changes

View File

@ -1,146 +0,0 @@
#!/usr/bin/env bash
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Function to print status messages
print_status() {
echo -e "${GREEN}[*]${NC} $1"
}
print_error() {
echo -e "${RED}[!]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[!]${NC} $1"
}
# Find ethernet interface
find_interface() {
local interface=$(ip link show | grep enp | cut -d: -f2 | tr -d ' ' | head -n1)
if [ -z "$interface" ]; then
print_error "No ethernet interface found"
exit 1
}
echo "$interface"
}
# Prompt for network configuration
get_network_config() {
local default_interface=$(find_interface)
echo "Current network interfaces:"
ip link show
read -p "Enter interface name [$default_interface]: " interface
interface=${interface:-$default_interface}
read -p "Enter static IP address (e.g., 10.0.0.68): " static_ip
read -p "Enter gateway IP address (e.g., 10.0.0.1): " gateway_ip
# Validate IP addresses
if [[ ! $static_ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
print_error "Invalid static IP format"
exit 1
}
if [[ ! $gateway_ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
print_error "Invalid gateway IP format"
exit 1
}
}
# Configure network
setup_network() {
print_status "Setting up network interface $interface..."
# Clear any existing IP addresses
ip addr flush dev $interface
# Bring up interface
ip link set $interface up
if [ $? -ne 0 ]; then
print_error "Failed to bring up interface"
exit 1
}
# Add IP address
ip addr add $static_ip/24 dev $interface
if [ $? -ne 0 ]; then
print_error "Failed to set IP address"
exit 1
}
# Remove any existing default routes
ip route del default 2>/dev/null
# Add default route
ip route add default via $gateway_ip dev $interface
if [ $? -ne 0 ]; then
print_error "Failed to add default route"
exit 1
}
# Configure DNS
print_status "Configuring DNS..."
echo "nameserver $gateway_ip" > /etc/resolv.conf
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf
# Disable IPv6
print_status "Disabling IPv6..."
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
sysctl -w net.ipv6.conf.lo.disable_ipv6=1
}
# Test connectivity
test_connectivity() {
print_status "Testing connectivity..."
# Test local network
print_status "Pinging gateway..."
if ! ping -c 1 $gateway_ip >/dev/null 2>&1; then
print_error "Cannot ping gateway"
return 1
}
# Test DNS resolution
print_status "Testing DNS resolution..."
if ! ping -c 1 github.com >/dev/null 2>&1; then
print_warning "DNS resolution failed"
return 1
}
print_status "Network setup complete and functional!"
return 0
}
# Main execution
main() {
if [[ $EUID -ne 0 ]]; then
print_error "This script must be run as root"
exit 1
}
print_status "NixOS Network Recovery Script"
print_status "==============================="
get_network_config
setup_network
test_connectivity
if [ $? -eq 0 ]; then
print_status "You should now be able to run nixos-rebuild"
else
print_error "Network setup completed but connectivity test failed"
print_warning "Check your network settings and try again"
fi
}
# Run main function
main "$@"

View File

@ -1,51 +0,0 @@
# Common Issues and Solutions
## Network Configuration Issues
### Symptoms
- Unable to fetch packages
- No internet connectivity in emergency mode
### Solution
1. Use network-recovery.sh script
2. Manual network configuration:
```bash
ip link set INTERFACE up
ip addr add IP_ADDRESS/24 dev INTERFACE
ip route add default via GATEWAY
echo "nameserver 8.8.8.8" > /etc/resolv.conf
```
## Filesystem Mount Issues
### Symptoms
- Read-only filesystem errors
- Unable to modify configuration
- Failed mounts during boot
### Solution
1. Identify problematic mounts:
```bash
mount | grep ro
lsblk -f
```
2. Remount filesystems:
```bash
mount -o remount,rw /
mount -o remount,rw /nix/store
```
3. Check/modify hardware-configuration.nix
## DBus Issues
### Symptoms
- Failed to connect to bus
- Service startup failures
### Solution
1. Setup minimal DBus environment:
```bash
mkdir -p /run/dbus
mount -t tmpfs tmpfs /run
dbus-daemon --system --fork
```

View File

@ -1,29 +0,0 @@
# Jovian NixOS Specific Issues
## Package Fetching Issues
### Symptoms
- Unable to fetch Jovian packages
- Build failures related to Jovian components
### Solution
1. Ensure network connectivity
2. Verify Jovian configuration:
```nix
jovian = {
hardware.has.amd.gpu = true;
devices.steamdeck.enable = true;
};
```
3. Check Jovian cache availability
## Hardware Detection Issues
### Symptoms
- Missing Steam Deck specific features
- Hardware not properly recognized
### Solution
1. Verify hardware configuration
2. Check kernel modules
3. Review Jovian hardware settings

64
flake.lock Normal file
View File

@ -0,0 +1,64 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1730837930,
"narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2f607e07f3ac7e53541120536708e824acccfaa8",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1730785428,
"narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"systems": "systems"
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

56
flake.nix Normal file
View File

@ -0,0 +1,56 @@
{
description = "Jeirmeister's NixOS Configuration";
inputs = {
# Core dependencies
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default-linux";
# Add other inputs as needed, e.g.:
# hardware.url = "github:nixos/nixos-hardware"; # If you need specific hardware support
};
outputs = { self, nixpkgs, home-manager, ... } @ inputs: let
lib = nixpkgs.lib.extend (
final: prev: import ./lib {
inherit inputs self;
lib = final;
}
) // home-manager.lib;
in {
nixosConfigurations = {
# Your systems
steamdeck = lib.mkHost "steamdeck" {
username = "jeirmeister";
system = "x86_64-linux";
stateVersion = "24.05"; # Updated version
};
surface4 = lib.mkHost "surface" {
username = "jeirmeister";
system = "x86_64-linux";
stateVersion = "24.05"; # Updated version
};
};
# Standalone home-manager configurations
homeConfigurations = {
"jeirmeister@steamdeck" = lib.mkHome "jeirmeister@steamdeck" {
inherit (self) nixosConfigurations;
stateVersion = "24.05";
};
"jeirmeister@surface" = lib.mkHome "jeirmeister@surface" {
inherit (self) nixosConfigurations;
stateVersion = "24.05";
};
};
# Add basic overlays and packages outputs
# overlays = import ./overlays { inherit self; };
packages = lib.forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
};
}

View File

@ -1,31 +0,0 @@
{ 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; [
fortune
];
};
programs.home-manager.enable = true;
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [
"openssl-1.1.1w"
];
};
};
}

View File

@ -1,19 +1,10 @@
{ pkgs, lib, ... }:
{ config, lib, pkgs, ... }:
let
jovianNixosRev = "f6423d86bec22c25a576b23262495c5536b0d069";
jovianNixos = builtins.fetchTarball {
url = "https://github.com/Jovian-Experiments/Jovian-NixOS/archive/${jovianNixosRev}.tar.gz";
sha256 = "sha256:1frd1dfqd97idwf1rj29ab0wvyfa2nx2h3bp9hkbmfa1m802avmb";
};
v4l2loopback-options = {
options = {
exclusive_caps = 1;
video_nr = 0;
card_label = "Immersed Virtual Camera";
};
};
in
{
imports = [
@ -21,44 +12,31 @@ in
(jovianNixos + "/modules")
];
# Basic System Configuration
system.stateVersion = "24.05";
networking = {
hostName = "steamnix";
networkmanager.enable = true;
};
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";
};
modules = {
system = {
enable = true;
hostname = "steamnix";
timeZone = "America/Los_Angeles";
stateVersion = "24.05";
};
# Nix Package Manager Configuration
nixpkgs = {
overlays = [
(import (jovianNixos + "/overlay.nix"))
desktop = {
enable = true;
plasma6 = {
enable = true;
wayland = {
enable = true;
scaling = 1.5;
};
extraPackages = with pkgs; [
plasma-browser-integration
kalendar
];
config.allowUnfree = true;
};
};
};
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = [ "cache.nixos.org" ];
allowed-users = [ "@wheel" "jeirmeister" ];
auto-optimise-store = true;
};
# Steam Deck Specific Configuration
# Steam Deck specific system configuration
jovian = {
hardware.has.amd.gpu = true;
devices.steamdeck = {
@ -77,26 +55,25 @@ in
workarounds.ignoreMissingKernelModules = true;
};
# Hardware and Display Configuration
hardware.video = {
displaylink.enable = true;
# Host-specific Nix settings
nixpkgs = {
overlays = [
(import (jovianNixos + "/overlay.nix"))
];
config.allowUnfree = true;
};
# Desktop Environment and Display Configuration
# Desktop Environment Configuration
services.xserver = {
enable = true;
xkb.layout = "us";
videoDrivers = [ "displaylink" "modesetting" ];
desktopManager.plasma6 = {
enable = true;
extraSessionCommands = ''
${pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 2 0;
'';
};
displayManager = {
sddm = {
enable = true;
wayland = true;
wayland = {
enable = true; # Fixed: proper wayland config
};
};
sessionCommands = ''
${lib.getBin pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 2 0
@ -104,27 +81,8 @@ in
};
};
# System Services Configuration
services = {
# Audio Configuration
pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
};
# Network Services
openssh = {
enable = true;
settings = {
PasswordAuthentication = true;
AllowUsers = [ "jeirmeister" ];
};
};
tailscale.enable = true;
};
# Systemd Services
# Steam Deck specific services
systemd.services = {
jupiter-fan-control = {
path = [ pkgs.dmidecode ];
@ -138,88 +96,20 @@ in
Restart = "on-failure";
};
};
"systemd-modules-load" = {
wantedBy = [ "multi-user.target" ];
restartIfChanged = true;
};
};
# UDev Rules
services.udev.extraRules = ''
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"
'';
# 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 = {};
};
};
# System Programs and Packages
programs = {
firefox.enable = true;
};
# Steam Deck specific packages
environment.systemPackages = with pkgs; [
# System Tools
# Steam Deck specific
jupiter-fan-control
linuxPackages.v4l2loopback
v4l-utils
# System utilities
pciutils
usbutils
lm_sensors
dmidecode
binutils
# Virtual Display
linuxPackages.v4l2loopback
v4l-utils
# Development Tools
nixfmt-rfc-style
git
# Network Tools
wget
curl
# Utilities
tree
];
}
# TODO: Incorporate this part later
# 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";
# };
# };

View File

@ -1,39 +1,54 @@
# 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, modulesPath, ... }:
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
# Hardware-specific settings
boot = {
loader = {
systemd-boot = {
enable = true;
consoleMode = "max";
};
efi.canTouchEfiVariables = true;
timeout = 3;
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f3cc4aae-428e-435d-b9f7-333f7dad06b2";
initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" ];
kernelModules = [ "kvm-amd" "amdgpu" ];
kernelParams = [
"amd_pstate=active"
"amdgpu.gttsize=8128"
"spi_amd.speed_dev=1"
];
kernelPackages = pkgs.linuxPackages_latest;
};
# Hardware-specific services
hardware = {
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
opengl.enable = true;
steam-hardware.enable = true;
# video.displaylink.enable = true;
};
# Steam Deck specific udev rules
services.udev.extraRules = ''
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"
'';
# File systems (retain your actual UUIDs)
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/...";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/580E-5E90";
"/boot" = {
device = "/dev/disk/by-uuid/...";
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.enp4s0f3u1u4u3.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;
};
}

View File

@ -0,0 +1,225 @@
{ pkgs, lib, ... }:
let
jovianNixosRev = "f6423d86bec22c25a576b23262495c5536b0d069";
jovianNixos = builtins.fetchTarball {
url = "https://github.com/Jovian-Experiments/Jovian-NixOS/archive/${jovianNixosRev}.tar.gz";
sha256 = "sha256:1frd1dfqd97idwf1rj29ab0wvyfa2nx2h3bp9hkbmfa1m802avmb";
};
v4l2loopback-options = {
options = {
exclusive_caps = 1;
video_nr = 0;
card_label = "Immersed Virtual Camera";
};
};
in
{
imports = [
./hardware-configuration.nix
(jovianNixos + "/modules")
];
# Basic System Configuration
system.stateVersion = "24.05";
networking = {
hostName = "steamnix";
networkmanager.enable = true;
};
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";
};
};
# Nix Package Manager Configuration
nixpkgs = {
overlays = [
(import (jovianNixos + "/overlay.nix"))
];
config.allowUnfree = true;
};
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = [ "cache.nixos.org" ];
allowed-users = [ "@wheel" "jeirmeister" ];
auto-optimise-store = true;
};
# Steam Deck Specific Configuration
jovian = {
hardware.has.amd.gpu = true;
devices.steamdeck = {
enable = true;
enableControllerUdevRules = true;
enableDefaultStage1Modules = true;
enablePerfControlUdevRules = true;
enableOsFanControl = true;
enableSoundSupport = true;
enableXorgRotation = true;
enableKernelPatches = true;
enableFwupdBiosUpdates = false;
autoUpdate = false;
};
steam.enable = false;
workarounds.ignoreMissingKernelModules = true;
};
# Hardware and Display Configuration
hardware.video = {
displaylink.enable = true;
};
# Desktop Environment and Display Configuration
services.xserver = {
enable = true;
xkb.layout = "us";
videoDrivers = [ "displaylink" "modesetting" ];
desktopManager.plasma6 = {
enable = true;
extraSessionCommands = ''
${pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 2 0;
'';
};
displayManager = {
sddm = {
enable = true;
wayland = true;
};
sessionCommands = ''
${lib.getBin pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 2 0
'';
};
};
# System Services Configuration
services = {
# Audio Configuration
pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
};
# Network Services
openssh = {
enable = true;
settings = {
PasswordAuthentication = true;
AllowUsers = [ "jeirmeister" ];
};
};
tailscale.enable = true;
};
# Systemd Services
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";
};
};
"systemd-modules-load" = {
wantedBy = [ "multi-user.target" ];
restartIfChanged = true;
};
};
# UDev Rules
services.udev.extraRules = ''
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"
'';
# 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 = {};
};
};
# System Programs and Packages
programs = {
firefox.enable = true;
};
environment.systemPackages = with pkgs; [
# System Tools
pciutils
usbutils
lm_sensors
dmidecode
binutils
# Virtual Display
linuxPackages.v4l2loopback
v4l-utils
# Development Tools
nixfmt-rfc-style
git
# Network Tools
wget
curl
# Utilities
tree
];
}
# TODO: Incorporate this part later
# 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";
# };
# };

View File

@ -0,0 +1,39 @@
# 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, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "usbhid" "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.enp4s0f3u1u4u3.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;
}

42
lib/default.nix Normal file
View File

@ -0,0 +1,42 @@
flake @ { inputs
, self
, lib
, ...
}:
let
# Helper function to import and configure with lib
importWith = file: args: import file ((args // { inherit lib; }));
# Import utilities with proper dependencies
utilsLib = importWith ./utils.nix { };
utilModsLib = importWith ./utilMods.nix { };
# Re-export inputs to make them available to all lib functions
exports = {
# Library functions
utils = utilsLib;
utilMods = utilModsLib;
# Core builders with flake inputs
mkHost = import ./mkHost.nix (flake // { inherit lib; });
mkHome = import ./mkHome.nix (flake // { inherit lib utilsLib; });
mkUnfreeNixpkgs = import ./mkUnfreeNixpkgs.nix;
# Helper function to enable modules based on host config
mkHostModules = hostname: username: enabledModules:
let
# Convert the list of enabled module paths to actual imports
moduleImports = map
(modulePath:
../modules + "/${modulePath}"
)
enabledModules;
in
moduleImports;
# Export utility functions directly for convenience
inherit (utilsLib) enable disable enableIf;
inherit (utilModsLib) mkModule mkModule' mkEnabledModule mkEnabledModule';
};
in
exports

35
lib/mkHome.nix Normal file
View File

@ -0,0 +1,35 @@
flake @ {
inputs,
self,
lib,
...
}: let
# Helper functions we don't plan on exporting past this file
internals = {
atSignSplit = string:
lib.splitString "@" string;
# Grab everything before the @ in "username@hostname"
guessUsername = userhost:
if lib.length (internals.atSignSplit userhost) == 2
then lib.elemAt (internals.atSignSplit userhost) 0
else throw "Invalid userhost format: ${userhost}. Expected format: username@hostname";
# Grab everything after the @ in "username@hostname"
guessHostname = userhost:
if lib.length (internals.atSignSplit userhost) == 2
then lib.elemAt (internals.atSignSplit userhost) 1
else throw "Invalid userhost format: ${userhost}. Expected format: username@hostname";
};
# Helper function for creating the system config for Home-Manager
mkHome = userhost: {
nixosConfigurations,
username ? internals.guessUsername userhost,
hostname ? internals.guessHostname userhost,
stateVersion ? "24.05",
}:
# Use the NixOS system configuration's home-manager setup
nixosConfigurations.${hostname}.config.home-manager.users.${username}.home;
in
mkHome

45
lib/mkHost.nix Normal file
View File

@ -0,0 +1,45 @@
flake @ { inputs
, self
, lib
, ...
}:
let
# Simplified helper function for creating the system config
mkHost = hostname: { username
, system
, stateVersion ? "24.05"
}:
lib.nixosSystem {
inherit system;
specialArgs = flake // { inherit hostname username system stateVersion; };
modules = [
# Set up nixpkgs
{
nixpkgs.pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
}
# Core system configuration
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${username} = import ../users/${username}/home.nix;
};
}
# Host-specific configurations
../hosts/${hostname}/configuration.nix
../hosts/${hostname}/hardware-configuration.nix
# System modules
../modules/core
../modules/desktop
../modules/system
];
};
in
mkHost

16
lib/mkUnfreeNixpkgs.nix Normal file
View File

@ -0,0 +1,16 @@
# Credit goes to Frontear and llakala for this solution!
{
path,
runCommandLocal,
...
}:
# Configure the given nixpkgs input to use unfree, so `nix run` commands using the flake registry can use unfree packages
runCommandLocal "nixpkgs-configured" {src = path;}
''
mkdir -p $out
substitute $src/flake.nix $out/flake.nix \
--replace-fail "{ inherit system; }" "{ inherit system; config.allowUnfree = true; config.joypixels.acceptLicense = true; }"
cp --update=none -Rt $out $src/*
''

42
lib/utilMods.nix Normal file
View File

@ -0,0 +1,42 @@
{ lib, ... }:
let
# Helper for creating home-manager modules
mkHmModule = name: module: { config, lib, pkgs, ... }: {
config = lib.mkIf (config.modules.${name}.enable or false)
(if builtins.isFunction module
then module { inherit config lib pkgs; }
else {
home-manager.users.${config.user.name} = module;
});
};
# Helper for creating desktop/user modules
mkUserModule = category: name: module:
mkHmModule "${category}.${name}" module;
exports = {
# Main module creation helper
mkModule = category: name: module:
mkUserModule category name (
if builtins.isAttrs module
then { home.packages = module.packages or [ ]; }
else module
);
# Helpers for enabling/disabling modules
enable = elems: builtins.listToAttrs (map
(name: {
inherit name;
value.enable = true;
})
elems);
disable = elems: builtins.listToAttrs (map
(name: {
inherit name;
value.enable = false;
})
elems);
};
in
exports

109
lib/utils.nix Normal file
View File

@ -0,0 +1,109 @@
{lib, ...}: let
exports = {
# Enable all modules in the list elems
enable = elems:
builtins.listToAttrs (map (name: {
inherit name;
value.enable = true;
})
elems);
# Disable all modules in the list elems
disable = elems:
builtins.listToAttrs (map (name: {
inherit name;
value.enable = false;
})
elems);
# Conditionally enable/disable all modules in the list elems
enableIf = cond: elems:
if cond
then (exports.enable elems)
else (exports.disable elems);
mkOptionStr = name: default: description: lib.mkOption {
type = lib.types.str;
inherit default description;
};
mkOptionBool = name: default: description: lib.mkOption {
type = lib.types.bool;
inherit default description;
};
# Hardware configuration helpers
isAmdCpu = config: config.hardware.cpu.manufacturer == "amd";
isIntelCpu = config: config.hardware.cpu.manufacturer == "intel";
# GPG command for checking if there is a hardware key present
isGpgUnlocked = pkgs: "${pkgs.procps}/bin/pgrep 'gpg-agent' &> /dev/null && ${pkgs.gnupg}/bin/gpg-connect-agent 'scd getinfo card_list' /bye | ${pkgs.gnugrep}/bin/grep SERIALNO -q";
# Concatinatinates all file paths in a given directory into one list.
# It recurses through subdirectories. If it detects a default.nix, only that
# file will be considered.
concatImports = {
path ? null,
paths ? [],
include ? [],
exclude ? [],
recursive ? true,
filterDefault ? true,
}:
with lib;
with fileset; let
excludedFiles = filter pathIsRegularFile exclude;
excludedDirs = filter pathIsDirectory exclude;
isExcluded = path:
if elem path excludedFiles
then true
else
(filter (excludedDir: outputs.lib.path.hasPrefix excludedDir path)
excludedDirs)
!= [];
myFiles = unique ((filter (file:
pathIsRegularFile file
&& hasSuffix ".nix" (builtins.toString file)
&& !isExcluded file) (concatMap (_path:
if recursive
then toList _path
else
mapAttrsToList (name: type:
_path
+ (
if type == "directory"
then "/${name}/default.nix"
else "/${name}"
)) (builtins.readDir _path))
(unique (
if path == null
then paths
else [path] ++ paths
))))
++ (
if recursive
then concatMap toList (unique include)
else unique include
));
dirOfFile = builtins.map (file: builtins.dirOf file) myFiles;
dirsWithDefaultNix =
builtins.filter (dir: builtins.elem dir dirOfFile)
(builtins.map (file: builtins.dirOf file) (builtins.filter (file:
builtins.match "default.nix" (builtins.baseNameOf file) != null)
myFiles));
filteredFiles = builtins.filter (file:
! builtins.elem (builtins.dirOf file) dirsWithDefaultNix
|| builtins.match "default.nix" (builtins.baseNameOf file) != null)
myFiles;
in
if filterDefault
then filteredFiles
else myFiles;
};
in
exports

View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
{
options.modules.core.aliases = {
enable = lib.mkEnableOption "shell aliases";
};
config = lib.mkIf config.modules.core.aliases.enable {
programs.zsh.shellAliases = {
ll = "ls -la";
update = "sudo nixos-rebuild switch";
hm = "home-manager";
hms = "home-manager switch";
};
};
}

16
modules/core/default.nix Normal file
View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
{
imports = [
./aliases
./direnv.nix
./git.nix
./gpg.nix
./ssh.nix
./zsh.nix
];
options.modules.core = {
enable = lib.mkEnableOption "core configuration";
};
}

15
modules/core/direnv.nix Normal file
View File

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
{
options.modules.core.direnv = {
enable = lib.mkEnableOption "direnv configuration";
};
config = lib.mkIf config.modules.core.direnv.enable {
programs.direnv = {
enable = true;
nix-direnv.enable = true;
enableZshIntegration = true;
};
};
}

21
modules/core/git.nix Normal file
View File

@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
{
options.modules.core.git = {
enable = lib.mkEnableOption "git configuration";
};
config = lib.mkIf config.modules.core.git.enable {
programs.git = {
enable = true;
package = pkgs.git;
lfs.enable = true;
credential = {
helper = "${pkgs.git-credential-manager}/bin/git-credential-manager";
credentialStore = "plaintext";
interactive = false;
};
safe.directory = "*";
};
};
}

41
modules/core/gpg.nix Normal file
View File

@ -0,0 +1,41 @@
{ config, lib, pkgs, ... }:
{
options.modules.core.gpg = {
enable = lib.mkEnableOption "gpg configuration";
};
config = lib.mkIf config.modules.core.gpg.enable {
programs.gpg = {
enable = true;
settings = {
trust-model = "tofu+pgp";
tofu-default-policy = "auto";
keyserver-options = "auto-key-retrieve";
personal-cipher-preferences = "AES256 AES192 AES";
personal-digest-preferences = "SHA512 SHA384 SHA256";
personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
};
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
defaultCacheTtl = 1800;
maxCacheTtl = 7200;
pinentryPackage = pkgs.pinentry-qt;
extraConfig = ''
allow-preset-passphrase
allow-loopback-pinentry
'';
};
home.packages = with pkgs; [
gnupg
pinentry-qt
paperkey
pgpdump
];
};
}

23
modules/core/ssh.nix Normal file
View File

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
{
options.modules.core.ssh = {
enable = lib.mkEnableOption "ssh configuration";
};
config = lib.mkIf config.modules.core.ssh.enable {
programs.ssh = {
enable = true;
extraConfig = ''
AddKeysToAgent yes
UseKeychain yes
IdentitiesOnly yes
HashKnownHosts yes
'';
serverAliveInterval = 60;
serverAliveCountMax = 2;
};
home.file."${config.home.sessionVariables.XDG_DATA_HOME}/ssh/.keep".text = "";
};
}

18
modules/core/zsh.nix Normal file
View File

@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }:
{
options.modules.core.zsh = {
enable = lib.mkEnableOption "zsh configuration";
};
config = lib.mkIf config.modules.core.zsh.enable {
programs.zsh = {
enable = true;
initExtra = ''
export PATH=$HOME/.nix-profile/bin:$PATH
'';
};
home.sessionVariables.SHELL = "${pkgs.zsh}/bin/zsh";
};
}

View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
{
options.modules.desktop.appimage = {
enable = lib.mkEnableOption "appimage support";
};
config = lib.mkIf config.modules.desktop.appimage.enable {
home.packages = with pkgs; [
appimage-run
zlib
fuse
fuse3
];
};
}

View File

@ -0,0 +1,21 @@
# modules/desktop/browsers/default.nix
{ config, lib, pkgs, ... }:
let
inherit (lib.utilMods) mkModule;
in
mkModule "desktop" "browsers" {
packages = with pkgs; [
(lib.mkIf config.modules.desktop.browsers.floorp.enable floorp)
(lib.mkIf config.modules.desktop.browsers.chromium.enable ungoogled-chromium)
];
};
# modules/desktop/productivity/obsidian.nix
{ config, lib, pkgs, ... }:
let
inherit (lib.utilMods) mkModule;
in mkModule "desktop" "productivity.obsidian" {
packages = [ pkgs.obsidian ];
};

View File

@ -0,0 +1,32 @@
{ config, lib, pkgs, ... }:
{
home-manager.users.${config.user.name} = { # Use home-manager.users path
options.modules.desktop.communication = {
enable = lib.mkEnableOption "communication apps";
};
config = lib.mkIf config.modules.desktop.communication.enable {
home.packages = with pkgs; [
# Signal
signal-cli
signal-export
signal-desktop
# Telegram
telegram-desktop
telegram-bot-api
tg
tdl
# WhatsApp
whatsapp-for-linux
whatsapp-chat-exporter
# Video conferencing
zoom-us
];
};
};
}

View File

@ -0,0 +1,27 @@
{ config, lib, pkgs, ... }:
let
inherit (lib.utilMods) mkModule;
in
{
imports = [
./browsers
./communication
./development
./gaming
./multiplexers
./productivity
./terminals
./plasma6
./appimage.nix
];
options.modules.desktop = {
enable = lib.mkEnableOption "desktop environment";
};
# All desktop modules will automatically be wrapped in home-manager configuration
config = lib.mkIf config.modules.desktop.enable {
home-manager.enable = true;
};
}

View File

@ -0,0 +1,17 @@
# modules/desktop/development/default.nix
{ config, lib, pkgs, ... }:
{
imports = [
./editors
];
options.modules.desktop.development = {
enable = lib.mkEnableOption "development tools";
vscode.enable = lib.mkEnableOption "VSCode";
};
config = lib.mkIf config.modules.desktop.development.enable {
# Base development packages will be configured in tools.nix
};
}

View File

@ -2,7 +2,6 @@
{
imports = [
./sublime.nix
./vscode.nix
];
}

View File

@ -0,0 +1,61 @@
{ config, lib, pkgs, ... }:
{
config = lib.mkIf config.modules.desktop.development.vscode.enable {
home-manager.users.${config.user.name} = { # Use home-manager.users path
programs.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
ms-vsliveshare.vsliveshare
ms-python.python
rust-lang.rust-analyzer
ms-azuretools.vscode-docker
pkief.material-icon-theme
dracula-theme.theme-dracula
jnoortheen.nix-ide
];
userSettings = {
"editor.fontSize" = 14;
"editor.fontFamily" = "FiraCode Nerd Font";
"editor.formatOnSave" = true;
"files.autoSave" = "onFocusChange";
"workbench.colorTheme" = "Dracula";
"editor.minimap.enabled" = false;
"editor.rulers" = [ 80 120 ];
"files.trimTrailingWhitespace" = true;
"editor.bracketPairColorization.enabled" = true;
"git.enabled" = true;
"git.autofetch" = true;
"git.confirmSync" = false;
"git.enableSmartCommit" = true;
"git.path" = "${pkgs.git}/bin/git";
"git.openRepositoryInParentFolders" = "never";
"gitlens.hovers.currentLine.over" = "line";
"gitlens.currentLine.enabled" = true;
"gitlens.hovers.enabled" = true;
"gitlens.mode.active" = "zen";
"git.terminalAuthentication" = true;
"git.credential.helper" = "${pkgs.git-credential-manager}/bin/git-credential-manager";
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nil";
"nix.formatterPath" = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
"[nix]" = {
"editor.defaultFormatter" = "jnoortheen.nix-ide";
"editor.formatOnSave" = true;
};
};
};
home.packages = with pkgs; [
nixpkgs-fmt
nil
];
};
};
}

View File

@ -0,0 +1,19 @@
{ config, lib, pkgs, ... }:
{
imports = [
./vr
];
options.modules.desktop.gaming = {
enable = lib.mkEnableOption "gaming support";
steam.enable = lib.mkEnableOption "Steam gaming platform";
vr.enable = lib.mkEnableOption "VR support";
};
config = lib.mkIf config.modules.desktop.gaming.enable {
home.packages = with pkgs; [
(lib.mkIf config.modules.desktop.gaming.steam.enable steam)
];
};
}

View File

@ -0,0 +1,46 @@
{ config, lib, pkgs, ... }:
{
config = lib.mkIf config.modules.desktop.gaming.vr.enable {
home-manager.users.${config.user.name} = { # Use home-manager.users path
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";
ExecStart = "${pkgs.immersed}/bin/immersed";
Environment = [
"DISPLAY=:0"
"XDG_CURRENT_DESKTOP=KDE"
"QT_QPA_PLATFORM=xcb"
"XDG_RUNTIME_DIR=/run/user/1000"
"XDG_SESSION_TYPE=x11"
];
Restart = "on-failure";
RestartSec = 5;
StandardOutput = "journal";
StandardError = "journal";
DevicePolicy = "auto";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
home.file.".local/share/immersed/.keep".text = "";
home.file.".config/immersed/.keep".text = "";
};
};
}

View File

@ -0,0 +1,12 @@
{ config, lib, pkgs, ... }:
{
imports = [
./tmux.nix
];
options.modules.desktop.multiplexers = {
enable = lib.mkEnableOption "terminal multiplexers";
tmux.enable = lib.mkEnableOption "tmux";
};
}

View File

@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }:
{
config = lib.mkIf config.modules.desktop.multiplexers.tmux.enable {
home-manager.users.${config.user.name} = { # Use home-manager.users path
programs.tmux = {
enable = true;
clock24 = true;
baseIndex = 1;
escapeTime = 0;
terminal = "screen-256color";
historyLimit = 10000;
keyMode = "vi";
customPaneNavigationAndResize = true;
extraConfig = ''
set -g mouse on
set -g prefix C-a
unbind C-b
bind C-a send-prefix
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
'';
};
};
};
}

View File

@ -0,0 +1,108 @@
{ config, lib, pkgs, ... }:
let
cfg = config.modules.desktop.plasma6;
in {
options.modules.desktop.plasma6 = {
enable = lib.mkEnableOption "KDE Plasma 6 desktop environment";
wayland = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable Wayland support for Plasma";
};
scaling = lib.mkOption {
type = lib.types.float;
default = 1.0;
description = "Global scaling factor for Wayland";
};
};
extraPackages = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [];
description = "Additional KDE/Plasma packages to install";
};
};
config = lib.mkIf cfg.enable {
services.xserver = {
enable = true;
displayManager = {
sddm = {
enable = true;
wayland = {
enable = cfg.wayland.enable; # Fixed: wayland is an attribute set
};
};
defaultSession = "plasma";
};
desktopManager.plasma6.enable = true;
};
environment.sessionVariables = lib.mkIf cfg.wayland.enable {
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
QT_QPA_PLATFORM = "wayland;xcb";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
GDK_BACKEND = "wayland,x11";
XDG_SESSION_TYPE = "wayland";
QT_SCALE_FACTOR = toString cfg.wayland.scaling;
};
environment.systemPackages = with pkgs; [
kate
konsole
dolphin
ark
okular
spectacle
plasma-pa
plasma-nm
kdeconnect
wayland
plasma5Packages.kwayland
plasma5Packages.kwayland-integration
qt6.qtwayland
] ++ cfg.extraPackages;
services = {
power-profiles-daemon.enable = true;
upower.enable = true;
accounts-daemon.enable = true;
gnome.gnome-keyring.enable = true;
gvfs.enable = true;
udisks2.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
};
security = {
rtkit.enable = true;
polkit.enable = true;
pam.services.sddm.enableKwallet = true;
};
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
fira-code
fira-code-symbols
];
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-kde
];
};
};
}

View File

@ -0,0 +1,14 @@
{ config, lib, pkgs, ... }:
{
config = lib.mkIf config.modules.desktop.productivity.bitwarden.enable {
home-manager.users.${config.user.name} = { # Use home-manager.users path
home.packages = with pkgs; [
bitwarden-desktop
bitwarden-cli
];
};
};
}

View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
{
imports = [
# ./obsidian.nix
./bitwarden.nix
# ./todoist.nix
];
options.modules.desktop.productivity = {
enable = lib.mkEnableOption "productivity tools";
# obsidian.enable = lib.mkEnableOption "Obsidian";
bitwarden.enable = lib.mkEnableOption "Bitwarden";
# todoist.enable = lib.mkEnableOption "Todoist";
};
}

View File

@ -0,0 +1,9 @@
{ config, lib, pkgs, ... }:
{
config = lib.mkIf config.modules.desktop.productivity.obsidian.enable {
home.packages = with pkgs; [
obsidian
];
};
}

View File

@ -0,0 +1,13 @@
{ config, lib, pkgs, ... }:
{
config = lib.mkIf config.modules.desktop.productivity.todoist.enable {
home-manager.users.${config.user.name} = { # Use home-manager.users path
home.packages = with pkgs; [
todoist
todoist-electron
];
};
};
}

View File

@ -0,0 +1,12 @@
{ config, lib, pkgs, ... }:
{
imports = [
./kitty.nix
];
options.modules.desktop.terminals = {
enable = lib.mkEnableOption "terminal emulators";
kitty.enable = lib.mkEnableOption "kitty terminal";
};
}

View File

@ -0,0 +1,52 @@
{ config, lib, pkgs, ... }:
{
config = lib.mkIf config.modules.desktop.terminals.kitty.enable {
home-manager.users.${config.user.name} = { # Use home-manager.users path
programs.kitty = {
enable = true;
settings = {
font_family = "JetBrains Mono";
font_size = 12;
window_padding_width = 4;
background_opacity = "0.95";
hide_window_decorations = "yes";
tab_bar_style = "powerline";
# Dracula theme colors
foreground = "#F8F8F2";
background = "#282A36";
selection_foreground = "#ffffff";
selection_background = "#44475a";
url_color = "#8be9fd";
cursor = "#f8f8f2";
# Colors
color0 = "#21222c";
color8 = "#6272a4";
color1 = "#ff5555";
color9 = "#ff6e6e";
color2 = "#50fa7b";
color10 = "#69ff94";
color3 = "#f1fa8c";
color11 = "#ffffa5";
color4 = "#bd93f9";
color12 = "#d6acff";
color5 = "#ff79c6";
color13 = "#ff92df";
color6 = "#8be9fd";
color14 = "#a4ffff";
color7 = "#f8f8f2";
color15 = "#ffffff";
# Tab bar
active_tab_foreground = "#282a36";
active_tab_background = "#f8f8f2";
inactive_tab_foreground = "#282a36";
inactive_tab_background = "#6272a4";
};
};
};
};
}

148
modules/system/default.nix Normal file
View File

@ -0,0 +1,148 @@
# modules/system/default.nix
{ config, lib, pkgs, ... }:
let
cfg = config.modules.system;
in {
options.modules.system = {
# Base system options
enable = lib.mkEnableOption "system configuration";
# System identification
stateVersion = lib.mkOption {
type = lib.types.str;
default = "24.05";
description = "The NixOS state version for this system";
};
hostname = lib.mkOption {
type = lib.types.str;
description = "The hostname of this system";
};
# Locale and time
timeZone = lib.mkOption {
type = lib.types.str;
default = "America/Los_Angeles";
description = "The timezone for this system";
};
# Nix specific options
nix = {
autoGc = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable automatic garbage collection";
};
gcDays = lib.mkOption {
type = lib.types.int;
default = 7;
description = "Days between automatic garbage collection";
};
extraOptions = lib.mkOption {
type = lib.types.attrs;
default = {};
description = "Additional Nix settings";
};
};
# Security options
security = {
sudo.askPass = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Whether sudo should ask for a password";
};
polkit.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable polkit for privilege escalation";
};
};
};
config = lib.mkIf cfg.enable {
# Basic system configuration
system.stateVersion = cfg.stateVersion;
networking.hostName = cfg.hostname;
time.timeZone = cfg.timeZone;
# Locale settings
i18n = {
defaultLocale = "en_US.UTF-8";
supportedLocales = [
"en_US.UTF-8/UTF-8"
"C.UTF-8/UTF-8"
];
};
# Nix configuration
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
allowed-users = [ "@wheel" ];
auto-optimise-store = true;
warn-dirty = false;
} // cfg.nix.extraOptions;
gc = lib.mkIf cfg.nix.autoGc {
automatic = true;
dates = "weekly";
options = "--delete-older-than ${toString cfg.nix.gcDays}d";
};
};
# Security configuration
security = {
sudo.wheelNeedsPassword = cfg.security.sudo.askPass;
polkit.enable = cfg.security.polkit.enable;
rtkit.enable = true;
};
# Essential system packages
environment.systemPackages = with pkgs; [
# Basic utilities
coreutils
curl
wget
git
vim
# System utilities
htop
lsof
tree
file
which
# Hardware utilities
pciutils
usbutils
lshw
];
# Basic system services
services = {
# Time synchronization
timesyncd.enable = true;
# USB device management
udev.enable = true;
# DBus
dbus = {
enable = true;
packages = with pkgs; [ dconf ];
};
};
# System-wide environment settings
environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; # For Electron apps
XDG_SESSION_TYPE = lib.mkDefault "wayland";
};
};
}

14
pkgs/common/default.nix Normal file
View File

@ -0,0 +1,14 @@
{ config, pkgs, lib, ... }:
let
# Helper function to conditionally import language support
importIf = cond: path: if cond then [ path ] else [ ];
in
{
imports =
(importIf config.languages.python.enable ../languages/python) ++
(importIf config.languages.rust.enable ../languages/rust) ++
(importIf config.languages.go.enable ../languages/go) ++
(importIf config.languages.javascript.enable ../languages/javascript) ++
[ ./paths.nix ./versions.nix ];
}

View File

@ -1,6 +1,9 @@
{ config, pkgs, ... }:
{
imports = [
./tools.nix
];
home.packages = with pkgs; [
go
gopls

View File

@ -0,0 +1,38 @@
{ config, pkgs, ... }:
let
nodeVersion =
if builtins.getEnv "NODE_VERSION" != ""
then builtins.getEnv "NODE_VERSION"
else "20";
in
{
home.packages = with pkgs; [
# Node.js
pkgs."nodejs_${nodeVersion}"
# Package managers and tools
nodePackages.npm
nodePackages.node-gyp
nodePackages.node-pre-gyp
nodePackages.pnpm
yarn
];
home.sessionVariables = {
NODE_PATH = "${config.home.sessionVariables.NODE_PACKAGES_DIR}/lib/node_modules";
};
home.file.".npmrc".text = ''
prefix=${config.home.sessionVariables.NODE_PACKAGES_DIR}
'';
home.file.".pnpmrc".text = ''
pnpm-version=8.9.0
store-dir=${config.home.sessionVariables.XDG_DATA_HOME}/pnpm
'';
home.file.".yarnrc".text = ''
cache-folder "${config.home.sessionVariables.XDG_CACHE_HOME}/yarn"
'';
}

View File

@ -1,7 +1,7 @@
{ pkgs, ... }:
let
pythonVersion = builtins.replaceStrings ["."] [""]
pythonVersion = builtins.replaceStrings [ "." ] [ "" ]
(if builtins.getEnv "PYTHON_VERSION" != ""
then builtins.getEnv "PYTHON_VERSION"
else "311");

View File

@ -0,0 +1,3 @@
{ config, pkgs, ... }:
{ }

View File

@ -3,6 +3,10 @@
{
home.packages = with pkgs; [
rustup
cargo-edit
cargo-watch
cargo-audit
cargo-tarpaulin
];
home.sessionVariables = {
@ -13,4 +17,13 @@
default_toolchain = "${config.home.sessionVariables.RUST_VERSION}"
profile = "default"
'';
home.file.".cargo/config.toml".text = ''
[build]
target-dir = "target"
[cargo-new]
vcs = "git"
'';
}

View File

@ -0,0 +1,3 @@
{ config, pkgs, ... }:
{ }

11
pkgs/packages/default.nix Normal file
View File

@ -0,0 +1,11 @@
# NOTE TO CLAUDE: I think that here we want to impliment the ability to declare in our users/[user]/[host].nix file which custom packages we want to install
{ config, pkgs, ... }:
let
repo-to-text = pkgs.callPackage ./repo-to-text.nix { };
in
{
home.packages = [
repo-to-text
];
}

72
shell.nix Normal file
View File

@ -0,0 +1,72 @@
{ pkgs ? import <nixpkgs> { } }:
let
# Import core module configurations
coreModule = import ./modules/core {
inherit pkgs;
config = { };
lib = pkgs.lib;
};
# Development shell tools on top of core tools
extraPackages = with pkgs; [
# Nix tools
nixos-install-tools
nixos-generate-config
nix-prefetch-git
nixpkgs-fmt
nil # Nix LSP
# System tools
gparted
parted
cryptsetup
# Installation tools
git
curl
wget
rsync
# Hardware info
lshw
dmidecode
pciutils
usbutils
# Disk utilities
gptfdisk
hdparm
# Network tools
iw
wirelesstools
ethtool
# Debugging tools
htop
btop
];
in
pkgs.mkShell {
# Combine core packages with extra development tools
packages = coreModule.home.packages ++ extraPackages;
# Shell environment setup
shellHook = ''
# Source environment variables if .envrc exists
if [ -f .envrc ]; then
source .envrc
else
echo "Warning: .envrc file not found. Copy .envrc.example to .envrc and modify as needed."
fi
# Print available tools
echo "NixOS configuration development shell loaded with the following tools:"
echo "- Core tools from modules/core"
echo "- Installation and development tools"
echo ""
echo "Use 'nix develop' or 'nix-shell' to enter this environment"
'';
}

View File

@ -0,0 +1,11 @@
{ config, pkgs, ... }:
{
imports = [
./git.nix
./gpg.nix
./ssh.nix
./tailscale.nix
./zsh.nix
];
}

View File

@ -0,0 +1,13 @@
{ config, pkgs, lib, ... }:
{
programs.git = {
userName = "jeirmeister";
userEmail = "jeir@jeirslab.xyz";
extraConfig = {
init.defaultBranch = "main";
pull.rebase = false;
};
};
}

View File

@ -0,0 +1,18 @@
{ config, pkgs, ... }:
{
programs.gpg = {
settings = {
keyserver = "hkps://keys.openpgp.org";
};
# If you have specific public keys to trust, add them here
publicKeys = [
{
# source = ./path/to/key.pub;
# trust = "ultimate";
}
];
};
}

View File

@ -2,8 +2,6 @@
{
programs.ssh = {
enable = true;
extraConfig = ''
AddKeysToAgent yes
UseKeychain yes

View File

@ -0,0 +1,93 @@
{ config
, pkgs
, lib
, ...
}: {
# Enable the Tailscale service
services.tailscale = {
enable = true;
# Package to use (optional, defaults to pkgs.tailscale)
package = pkgs.tailscale;
# Authentication key for automated setup (optional)
# authKeyFile = "/path/to/tailscale/authkey";
# Interface name (optional, defaults to "tailscale0")
# interfaceName = "tailscale0";
# Port for the tailscale daemon (optional, defaults to 41641)
# port = 41641;
# Additional daemon arguments (optional)
extraUpFlags = [
"--hostname=steamnix"
"--advertise-tags=tag:nixos"
# "--advertise-exit-node"
# "--accept-dns=true"
# "--accept-routes=true"
# "--shields-up"
];
# systemd service configuration (optional)
serviceConfig = {
# Restart policy
Restart = "always";
RestartSec = "5";
# Security settings
ProtectSystem = "strict";
ProtectHome = true;
PrivateTmp = true;
# Resource limits
MemoryMax = "512M";
TasksMax = 4096;
# Network settings
NetworkNamespacePath = "";
# Additional environment variables
# Environment = [
# "TS_DEBUG_LOG_PATH=/var/log/tailscale/debug.log"
# "TS_NO_LOGS_NO_SUPPORT=true"
# ];
};
# Tailscale configuration files location (optional)
stateDir = "/var/lib/tailscale";
# Routes configuration (optional)
routes = {
# Enable exit node functionality
exitNode = false;
# Enable subnet routing
# advertiseRoutes = [
# "10.0.0.0/24"
# "192.168.1.0/24"
# ];
};
};
# Additional recommended networking settings
networking = {
# Enable IP forwarding for Tailscale subnet routing
firewall = {
enable = true;
allowedTCPPorts = [ 41641 ]; # Tailscale port
checkReversePath = "loose"; # Important for Tailscale
trustedInterfaces = [ "tailscale0" ];
};
# Enable IPv4 forwarding
nat = {
enable = true;
enableIPv6 = true;
externalInterface = "eth0";
internalInterfaces = [ "tailscale0" ];
};
};
environment.systemPackages = [ pkgs.tailscale ];
}

View File

@ -2,7 +2,6 @@
{
programs.zsh = {
enable = true;
autosuggestion.enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;

View File

@ -1,8 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./floorp.nix
./ungoogled-chromium.nix
];
}

View File

@ -1,22 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
# Signal
signal-cli
signal-export
signal-desktop
# Telegram
telegram-desktop
telegram-bot-api
tg
tdl
# WhatsApp
whatsapp-for-linux
whatsapp-chat-exporter
# Video conferencing
zoom-us
];
}

View File

@ -1,14 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./browsers
./communication
./development
./gaming
./productivity
./shell
./system
];
}

View File

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./editors
./env
./tools.nix
./docs.nix
];
}

View File

@ -1,7 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
tldr
];
}

View File

@ -1,7 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
sublime4
];
}

View File

@ -1,66 +0,0 @@
{ config, pkgs, ... }:
{
programs.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
# Existing extensions
ms-vsliveshare.vsliveshare
ms-python.python
rust-lang.rust-analyzer
ms-azuretools.vscode-docker
pkief.material-icon-theme
dracula-theme.theme-dracula
# Add Nix support
jnoortheen.nix-ide # Comprehensive Nix IDE support
# or alternatively: bbenoist.nix
];
userSettings = {
# Existing settings
"editor.fontSize" = 14;
"editor.fontFamily" = "FiraCode Nerd Font";
"editor.formatOnSave" = true;
"files.autoSave" = "onFocusChange";
"workbench.colorTheme" = "Dracula";
"editor.minimap.enabled" = false;
"editor.rulers" = [ 80 120 ];
"files.trimTrailingWhitespace" = true;
"editor.bracketPairColorization.enabled" = true;
# Git settings (unchanged)
"git.enabled" = true;
"git.autofetch" = true;
"git.confirmSync" = false;
"git.enableSmartCommit" = true;
"git.path" = "${pkgs.git}/bin/git";
"git.openRepositoryInParentFolders" = "never";
# GitLens settings (unchanged)
"gitlens.hovers.currentLine.over" = "line";
"gitlens.currentLine.enabled" = true;
"gitlens.hovers.enabled" = true;
"gitlens.mode.active" = "zen";
# Credential manager integration (unchanged)
"git.terminalAuthentication" = true;
"git.credential.helper" = "${pkgs.git-credential-manager}/bin/git-credential-manager";
# Nix formatting settings
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nil";
"nix.formatterPath" = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
"[nix]" = {
"editor.defaultFormatter" = "jnoortheen.nix-ide";
"editor.formatOnSave" = true;
};
};
};
# Ensure nixpkgs-fmt is available in the environment
home.packages = with pkgs; [
nixpkgs-fmt
nil # Nix language server
];
}

View File

@ -1,17 +0,0 @@
# Add to common/default.nix
{ config, pkgs, lib, ... }:
{
imports = [ ./paths.nix ./versions.nix ];
# Helper function for path concatenation
_module.args.pathJoin = fragments:
lib.concatStringsSep "/" fragments;
programs.zsh.initExtra = lib.concatStrings [
''
# Environment Setup
${builtins.concatStringsSep "\n" (map (path: "export PATH=\"${path}:$PATH\"") config.home.sessionPath)}
''
];
}

View File

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./direnv.nix
./common
./languages
];
}

View File

@ -1,9 +0,0 @@
{ config, pkgs, ... }:
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
enableZshIntegration = true;
};
}

View File

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./go
./javascript
./python
./rust
];
}

View File

@ -1,7 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./tools.nix
];
}

View File

@ -1,8 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./node.nix
./package-managers
];
}

View File

@ -1,16 +0,0 @@
{ config, pkgs, ... }:
let
nodeVersion = if builtins.getEnv "NODE_VERSION" != ""
then builtins.getEnv "NODE_VERSION"
else "20";
in
{
home.packages = [
pkgs."nodejs_${nodeVersion}"
];
home.sessionVariables = {
NODE_PATH = "${config.home.sessionVariables.NODE_PACKAGES_DIR}/lib/node_modules";
};
}

View File

@ -1,9 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./npm.nix
./pnpm.nix
./yarn.nix
];
}

View File

@ -1,13 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
nodePackages.npm
nodePackages.node-gyp
nodePackages.node-pre-gyp
];
home.file.".npmrc".text = ''
prefix=${config.home.sessionVariables.NODE_PACKAGES_DIR}
'';
}

View File

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [ nodePackages.pnpm ];
home.file.".pnpmrc".text = ''
pnpm-version=8.9.0
store-dir=${config.home.sessionVariables.XDG_DATA_HOME}/pnpm
'';
}

View File

@ -1,9 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [ yarn ];
home.file.".yarnrc".text = ''
cache-folder "${config.home.sessionVariables.XDG_CACHE_HOME}/yarn"
'';
}

View File

@ -1,8 +0,0 @@
{ pkgs, ... }:
{
imports = [
./base.nix
./package-managers
];
}

View File

@ -1,10 +0,0 @@
# Add to env/languages/python/package-managers/default.nix
{ config, pkgs, ... }:
{
imports = [
./pipenv.nix
./poetry
];
}

View File

@ -1,14 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [ pipenv ];
home.sessionVariables = {
PIPENV_VENV_IN_PROJECT = "1";
WORKON_HOME = "${config.home.sessionVariables.VIRTUALENV_HOME}";
PIP_NO_CACHE_DIR = "off";
PIPENV_SKIP_LOCK = "1";
PIPENV_IGNORE_VIRTUALENVS = "1";
PIPENV_MAX_DEPTH = "5";
};
}

View File

@ -1,32 +0,0 @@
{ config, pkgs, ... }:
let
poetry2nix = import (pkgs.fetchFromGitHub {
owner = "nix-community";
repo = "poetry2nix";
rev = "1.0.0";
sha256 = "15mdb0lr7027qpm9s1v1d9sdb8abmcdrpqsv4zvinif8a8liqxkq";
}) { inherit pkgs; };
in
{
home.packages = with pkgs; [
poetry
];
imports = [
./packages
];
home.sessionVariables = {
POETRY_VIRTUALENVS_IN_PROJECT = "true";
POETRY_CACHE_DIR = "${config.home.sessionVariables.XDG_CACHE_HOME}/pypoetry";
};
home.file.".config/pypoetry/config.toml".text = ''
[virtualenvs]
in-project = true
path = "${config.home.sessionVariables.VIRTUALENV_HOME}/poetry"
create = true
clear = false
'';
}

View File

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
let
repo-to-text = pkgs.callPackage ./repo-to-text.nix {};
in
{
home.packages = [
repo-to-text
];
}

View File

@ -1,18 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
cargo-edit
cargo-watch
cargo-audit
cargo-tarpaulin
];
home.file.".cargo/config.toml".text = ''
[build]
target-dir = "target"
[cargo-new]
vcs = "git"
'';
}

View File

@ -1,8 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./cargo.nix
./toolchain.nix
];
}

View File

@ -1,17 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
git
gh
gnumake
gcc
cmake
# Python development tools
python311Packages.black
python311Packages.pylint
python311Packages.mypy
python311Packages.pytest
python311Packages.pytest-cov
];
}

View File

@ -1,7 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./vr
];
}

View File

@ -1,42 +0,0 @@
{ config, pkgs, ... }:
{
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 = "";
}

View File

@ -1,8 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
bitwarden-desktop
bitwarden-cli
];
}

View File

@ -1,9 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./obsidian.nix
./bitwarden.nix
./todoist.nix
];
}

View File

@ -1,7 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
obsidian
];
}

View File

@ -1,8 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
todoist
todoist-electron
];
}

View File

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./terminals
./multiplexers
./shells
./utilities
];
}

Some files were not shown because too many files have changed in this diff Show More