Added basic configurations, imported repo2txt as custom package

This commit is contained in:
jeirmeister 2024-10-29 23:11:22 -07:00
commit ed7a59b56d
19 changed files with 1203 additions and 0 deletions

617
.-dump.txt Normal file
View File

@ -0,0 +1,617 @@
+--------------------------------------------+
| Dump tree for directory: . |
+--------------------------------------------+
├── home.nix
├── hosts
│ └── steamdeck
│ ├── configuration.nix
│ └── hardware-configuration.nix
└── users
└── jeirmeister
├── packages
│ ├── default.nix
│ └── repo2txt.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.repo2txt
];
};
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 }:
{
repo2txt = pkgs.callPackage ./repo2txt.nix {};
}
--- Path: ./users/jeirmeister/packages/repo2txt.nix ---
# users/jeirmeister/packages/repo2txt.nix
{ pkgs }:
let
pythonEnv = pkgs.python3.withPackages (ps: with ps; [
# Add any future dependencies here if needed
]);
in
pkgs.stdenv.mkDerivation {
pname = "repo2txt";
version = "0.1.0";
src = pkgs.fetchFromGitHub {
owner = "pde-rent";
repo = "repo2txt";
rev = "2024b0eebebf739136401dc2f2df096be828558c";
hash = "sha256-80T28lXkk8hl/chzIy3Wvs1Jbs/rspxlnvWKa2DwJnU=";
};
buildInputs = [ pythonEnv ];
installPhase = ''
mkdir -p $out/bin
cp main.py $out/bin/repo2txt
chmod +x $out/bin/repo2txt
# Ensure it uses python interpreter
sed -i "1i#!${pythonEnv}/bin/python" $out/bin/repo2txt
'';
meta = with pkgs.lib; {
description = "Tool to dump a repository into a single text file";
homepage = "https://github.com/pde-rent/repo2txt";
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";
};
}

66
home.nix Normal file
View File

@ -0,0 +1,66 @@
# 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.repo2txt
# Development tools
nodejs
yarn
python3
gcc
rustup
# System tools
btop # Better top
neofetch
bat # Better cat
fzf # Fuzzy finder
# Network tools
mtr
iperf3
nmap
# File management
unzip
p7zip
file
];
};
programs.home-manager.enable = true;
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [
"openssl-1.1.1w"
];
};
};
}

View File

@ -0,0 +1,192 @@
{ 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";
}

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, 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;
}

View File

@ -0,0 +1,6 @@
# users/jeirmeister/packages/default.nix
{ pkgs }:
{
repo2txt = pkgs.callPackage ./repo2txt.nix {};
}

View File

@ -0,0 +1,24 @@
# users/jeirmeister/packages/repo2txt.nix
{ pkgs }:
pkgs.python3Packages.buildPythonPackage rec {
pname = "repo2txt";
version = "1.0.3"; # Check PyPI for latest version
format = "pyproject";
src = pkgs.python3Packages.fetchPypi {
inherit pname version;
hash = "sha256-t62YxDNb7xWCpR70QeVHjkWLAXZ2bHxiPtYbz2jnSjE="; # You might need to update this
};
# Add any runtime dependencies if needed in the future
propagatedBuildInputs = with pkgs.python3Packages; [ ];
pythonImportsCheck = [ "repo2txt" ];
meta = with pkgs.lib; {
description = "Tool to dump repository contents into a single text file";
homepage = "https://pypi.org/project/repo2txt/";
license = licenses.mit;
};
}

View File

@ -0,0 +1,14 @@
# 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
];
}

View File

@ -0,0 +1,18 @@
# users/jeirmeister/programs/default.nix
{ config, pkgs, ... }:
{
imports = [
./appimage.nix
./direnv.nix
./git.nix
./gpg.nix
./obsidian.nix
./ssh.nix
./sublime.nix
./tailscale.nix
./tmux.nix
./vscode.nix
./zsh.nix
];
}

View File

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

View File

@ -0,0 +1,21 @@
# 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/"
];
};
}

View File

@ -0,0 +1,51 @@
# users/jeirmeister/programs/gpg.nix
{ config, pkgs, ... }:
{
programs.gpg = {
enable = true;
settings = {
keyserver = "hkps://keys.openpgp.org";
# Trust model settings
trust-model = "tofu+pgp";
tofu-default-policy = "auto";
# Better key discovery
keyserver-options = "auto-key-retrieve";
# Modern cipher preferences
personal-cipher-preferences = "AES256 AES192 AES";
personal-digest-preferences = "SHA512 SHA384 SHA256";
personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
# Default key preferences
default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
};
# If you have specific public keys to trust, add them here
publicKeys = [
# Example:
# {
# source = ./path/to/key.pub;
# trust = "ultimate";
# }
];
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
defaultCacheTtl = 1800;
maxCacheTtl = 7200;
# For KDE/Plasma, use pinentry-qt
pinentryPackage = "qt";
extraConfig = ''
allow-preset-passphrase
allow-loopback-pinentry
'';
};
# Make sure we have the right packages
home.packages = with pkgs; [
gnupg
pinentry-qt
paperkey # Backup GPG keys on paper
pgpdump # Analyze PGP/GPG keys and packets
];
}

View File

@ -0,0 +1,8 @@
# users/jeirmeister/programs/obsidian.nix
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
obsidian
];
}

View File

@ -0,0 +1,38 @@
# users/jeirmeister/programs/ssh.nix
{ config, pkgs, ... }:
{
programs.ssh = {
enable = true;
extraConfig = ''
AddKeysToAgent yes
UseKeychain yes
IdentitiesOnly yes
HashKnownHosts yes
'';
# For better security
serverAliveInterval = 60;
serverAliveCountMax = 2;
# Manage known hosts
userKnownHostsFile = "~/.ssh/known_hosts";
# Example host configurations
matchBlocks = {
"github.com" = {
hostname = "github.com";
user = "git";
identityFile = "~/.ssh/github";
extraOptions = {
PreferredAuthentications = "publickey";
};
};
"*" = {
compression = true;
serverAliveInterval = 60;
};
};
};
}

View File

@ -0,0 +1,8 @@
# users/jeirmeister/programs/sublime.nix
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
sublime4
];
}

View File

@ -0,0 +1,8 @@
# users/jeirmeister/programs/tailscale.nix
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
tailscale
];
}

View File

@ -0,0 +1,10 @@
# users/jeirmeister/programs/tmux.nix
{ config, pkgs, ... }:
{
programs.tmux = {
enable = true;
clock24 = true;
# Add your tmux configurations here
};
}

View File

@ -0,0 +1,5 @@
{ config, pkgs, ... }:
{
programs.immersed.enable = true;
}

View File

@ -0,0 +1,36 @@
{ config, pkgs, ... }:
{
programs.vscode = {
extensions = with pkgs.vscode-extensions; [
# Essential
vscodevim.vim
ms-vsliveshare.vsliveshare
github.copilot
# Languages
bbenoist.nix
ms-python.python
rust-lang.rust-analyzer
# Tools
eamodio.gitlens
ms-azuretools.vscode-docker
# Theme & UI
pkief.material-icon-theme
dracula-theme.theme-dracula
];
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;
};
};
}

View File

@ -0,0 +1,33 @@
# 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";
};
}