Compare commits
2 Commits
a5f747815f
...
d475f895a0
Author | SHA1 | Date | |
---|---|---|---|
d475f895a0 | |||
ff72e7ca4a |
1
home.nix
1
home.nix
@ -15,7 +15,6 @@ in
|
||||
|
||||
packages = with pkgs; [
|
||||
fortune
|
||||
(customPackages.repo-to-text)
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
# Modify the kernel and v4l2loopback section in your configuration.nix
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
jovianNixosRev = "f6423d86bec22c25a576b23262495c5536b0d069";
|
||||
@ -8,7 +7,6 @@ let
|
||||
sha256 = "sha256:1frd1dfqd97idwf1rj29ab0wvyfa2nx2h3bp9hkbmfa1m802avmb";
|
||||
};
|
||||
|
||||
# Custom v4l2loopback configuration for Steam Deck
|
||||
v4l2loopback-options = {
|
||||
options = {
|
||||
exclusive_caps = 1;
|
||||
@ -20,33 +18,51 @@ in
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
(jovianNixos + "/modules")
|
||||
];
|
||||
(jovianNixos + "/modules")
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# 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 Configuration
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
substituters = [ "https://cache.nixos.org" ];
|
||||
substituters = [ "cache.nixos.org" ];
|
||||
allowed-users = [ "@wheel" "jeirmeister" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
# Steam Deck Configuration
|
||||
# Steam Deck Specific Configuration
|
||||
jovian = {
|
||||
# Hardware detection
|
||||
hardware.has.amd.gpu = true;
|
||||
|
||||
devices.steamdeck = {
|
||||
enable = true;
|
||||
|
||||
# Hardware features
|
||||
enableControllerUdevRules = true;
|
||||
enableDefaultStage1Modules = true;
|
||||
enablePerfControlUdevRules = true;
|
||||
@ -54,20 +70,62 @@ in
|
||||
enableSoundSupport = true;
|
||||
enableXorgRotation = true;
|
||||
enableKernelPatches = true;
|
||||
|
||||
# Disable firmware updates temporarily
|
||||
enableFwupdBiosUpdates = false;
|
||||
autoUpdate = false;
|
||||
};
|
||||
|
||||
steam.enable = false;
|
||||
workarounds.ignoreMissingKernelModules = true;
|
||||
};
|
||||
|
||||
# Hardware and Display Configuration
|
||||
hardware.video = {
|
||||
displaylink.enable = true;
|
||||
};
|
||||
|
||||
# System Services
|
||||
# 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 = {
|
||||
# Fan Control Service
|
||||
jupiter-fan-control = {
|
||||
path = [ pkgs.dmidecode ];
|
||||
serviceConfig = lib.mkForce {
|
||||
@ -81,70 +139,18 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# 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";
|
||||
# };
|
||||
# };
|
||||
"systemd-modules-load" = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
restartIfChanged = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Ensure module loading at boot
|
||||
systemd.services."systemd-modules-load" = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
restartIfChanged = true;
|
||||
};
|
||||
|
||||
|
||||
# UDev Rules
|
||||
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"
|
||||
'';
|
||||
|
||||
# Network Configuration
|
||||
networking = {
|
||||
hostName = "steamnix";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
# Desktop Environment
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
xkb.layout = "us";
|
||||
};
|
||||
desktopManager.plasma6.enable = true;
|
||||
displayManager.sddm.enable = true;
|
||||
|
||||
# Audio
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# SSH Server
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = true;
|
||||
AllowUsers = [ "jeirmeister" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Tailscale VPN
|
||||
tailscale.enable = true;
|
||||
};
|
||||
# User Configuration
|
||||
users = {
|
||||
users.jeirmeister = {
|
||||
@ -179,43 +185,41 @@ in
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Debugging tools
|
||||
# System Tools
|
||||
pciutils
|
||||
usbutils
|
||||
lm_sensors
|
||||
dmidecode
|
||||
|
||||
linuxPackages.v4l2loopback # Virtual display for ImmersedVR
|
||||
v4l-utils
|
||||
|
||||
# Development tools
|
||||
nixfmt-rfc-style
|
||||
|
||||
# Basic utilities
|
||||
tree
|
||||
git
|
||||
wget
|
||||
curl
|
||||
binutils
|
||||
|
||||
# Virtual Display
|
||||
linuxPackages.v4l2loopback
|
||||
v4l-utils
|
||||
|
||||
# Development Tools
|
||||
nixfmt-rfc-style
|
||||
git
|
||||
|
||||
# Network Tools
|
||||
wget
|
||||
curl
|
||||
|
||||
# Utilities
|
||||
tree
|
||||
];
|
||||
|
||||
# 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";
|
||||
}
|
||||
# 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";
|
||||
# };
|
||||
# };
|
@ -1,7 +1,7 @@
|
||||
# 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, ... }:
|
||||
{ config, lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
|
@ -1,6 +0,0 @@
|
||||
# users/jeirmeister/packages/default.nix
|
||||
{ pkgs }:
|
||||
|
||||
{
|
||||
repo-to-text = pkgs.callPackage ./repo-to-text.nix {};
|
||||
}
|
@ -3,5 +3,6 @@
|
||||
{
|
||||
imports = [
|
||||
./floorp.nix
|
||||
./ungoogled-chromium.nix
|
||||
];
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
ungoogled-chromium
|
||||
];
|
||||
}
|
22
users/jeirmeister/programs/communication/default.nix
Normal file
22
users/jeirmeister/programs/communication/default.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ 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
|
||||
];
|
||||
}
|
@ -2,10 +2,13 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./browsers
|
||||
./communication
|
||||
./development
|
||||
./gaming
|
||||
./productivity
|
||||
./shell
|
||||
./system
|
||||
|
||||
];
|
||||
}
|
||||
|
17
users/jeirmeister/programs/development/env/common/default.nix
vendored
Normal file
17
users/jeirmeister/programs/development/env/common/default.nix
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
# 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)}
|
||||
''
|
||||
];
|
||||
}
|
43
users/jeirmeister/programs/development/env/common/paths.nix
vendored
Normal file
43
users/jeirmeister/programs/development/env/common/paths.nix
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
# users/jeirmeister/programs/development/env/common/paths.nix
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.sessionVariables = {
|
||||
# Tool-specific paths
|
||||
DEVELOPMENT_TOOLS_HOME = "${config.xdg.dataHome}/dev-tools";
|
||||
VIRTUALENV_HOME = "${config.xdg.dataHome}/virtualenvs";
|
||||
NODE_PACKAGES_DIR = "${config.xdg.dataHome}/node-packages";
|
||||
CARGO_HOME = "${config.xdg.dataHome}/cargo";
|
||||
GO_PATH = "${config.xdg.dataHome}/go";
|
||||
};
|
||||
|
||||
# Ensure directories exist
|
||||
home.file = {
|
||||
"${config.xdg.dataHome}/dev-tools/.keep".text = "";
|
||||
"${config.xdg.dataHome}/virtualenvs/.keep".text = "";
|
||||
"${config.xdg.dataHome}/node-packages/.keep".text = "";
|
||||
# Add standard cache directories
|
||||
"${config.xdg.cacheHome}/yarn/.keep".text = "";
|
||||
"${config.xdg.cacheHome}/pnpm/.keep".text = "";
|
||||
|
||||
# Add standard data directories
|
||||
"${config.xdg.dataHome}/node/.keep".text = "";
|
||||
"${config.xdg.dataHome}/python/.keep".text = "";
|
||||
"${config.xdg.dataHome}/cargo/.keep".text = "";
|
||||
};
|
||||
|
||||
# Add to env/common/paths.nix
|
||||
home.sessionPath = [
|
||||
"$HOME/.local/bin"
|
||||
"${config.home.sessionVariables.CARGO_HOME}/bin"
|
||||
"${config.home.sessionVariables.GO_PATH}/bin"
|
||||
"${config.home.sessionVariables.NODE_PACKAGES_DIR}/bin"
|
||||
];
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.xdg.enable;
|
||||
message = "XDG Base Directory support must be enabled";
|
||||
}
|
||||
];
|
||||
}
|
10
users/jeirmeister/programs/development/env/common/versions.nix
vendored
Normal file
10
users/jeirmeister/programs/development/env/common/versions.nix
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.sessionVariables = {
|
||||
PYTHON_VERSION = "3.11";
|
||||
NODE_VERSION = "20";
|
||||
GO_VERSION = "1.21";
|
||||
RUST_VERSION = "stable";
|
||||
};
|
||||
}
|
@ -3,6 +3,8 @@
|
||||
{
|
||||
imports = [
|
||||
./direnv.nix
|
||||
./common
|
||||
./languages
|
||||
];
|
||||
}
|
||||
|
||||
}
|
@ -9,9 +9,7 @@
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
GOPATH = "$HOME/go";
|
||||
GOBIN = "$HOME/go/bin";
|
||||
GOPATH = "${config.home.sessionVariables.GO_PATH}";
|
||||
GOBIN = "${config.home.sessionVariables.GO_PATH}/bin";
|
||||
};
|
||||
|
||||
home.file."go/bin/.keep".text = "";
|
||||
}
|
||||
}
|
@ -3,7 +3,6 @@
|
||||
{
|
||||
imports = [
|
||||
./node.nix
|
||||
./pnpm.nix
|
||||
./yarn.nix
|
||||
./package-managers
|
||||
];
|
||||
}
|
||||
}
|
@ -1,17 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
nodeVersion = if builtins.getEnv "NODE_VERSION" != ""
|
||||
then builtins.getEnv "NODE_VERSION"
|
||||
else "20";
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
nodejs_20
|
||||
nodePackages.npm
|
||||
nodePackages.node-gyp
|
||||
nodePackages.node-pre-gyp
|
||||
home.packages = [
|
||||
pkgs."nodejs_${nodeVersion}"
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
NODE_PATH = "$HOME/.npm-packages/lib/node_modules";
|
||||
NPM_CONFIG_PREFIX = "$HOME/.npm-packages";
|
||||
NODE_PATH = "${config.home.sessionVariables.NODE_PACKAGES_DIR}/lib/node_modules";
|
||||
};
|
||||
|
||||
home.file.".npmrc".text = "prefix=$HOME/.npm-packages";
|
||||
}
|
||||
}
|
9
users/jeirmeister/programs/development/env/languages/javascript/package-managers/default.nix
vendored
Normal file
9
users/jeirmeister/programs/development/env/languages/javascript/package-managers/default.nix
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./npm.nix
|
||||
./pnpm.nix
|
||||
./yarn.nix
|
||||
];
|
||||
}
|
13
users/jeirmeister/programs/development/env/languages/javascript/package-managers/npm.nix
vendored
Normal file
13
users/jeirmeister/programs/development/env/languages/javascript/package-managers/npm.nix
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{ 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}
|
||||
'';
|
||||
}
|
10
users/jeirmeister/programs/development/env/languages/javascript/package-managers/pnpm.nix
vendored
Normal file
10
users/jeirmeister/programs/development/env/languages/javascript/package-managers/pnpm.nix
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
{ 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
|
||||
'';
|
||||
}
|
9
users/jeirmeister/programs/development/env/languages/javascript/package-managers/yarn.nix
vendored
Normal file
9
users/jeirmeister/programs/development/env/languages/javascript/package-managers/yarn.nix
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ yarn ];
|
||||
|
||||
home.file.".yarnrc".text = ''
|
||||
cache-folder "${config.home.sessionVariables.XDG_CACHE_HOME}/yarn"
|
||||
'';
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
nodePackages.pnpm
|
||||
];
|
||||
|
||||
home.file.".pnpmrc".text = "
|
||||
pnpm-version=8.9.0
|
||||
store-dir=$HOME/.pnpm-store
|
||||
";
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
yarn
|
||||
];
|
||||
|
||||
home.file.".yarnrc".text = "
|
||||
cache-folder $HOME/.yarn-cache
|
||||
";
|
||||
}
|
22
users/jeirmeister/programs/development/env/languages/python/base.nix
vendored
Normal file
22
users/jeirmeister/programs/development/env/languages/python/base.nix
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
pythonVersion = builtins.replaceStrings ["."] [""]
|
||||
(if builtins.getEnv "PYTHON_VERSION" != ""
|
||||
then builtins.getEnv "PYTHON_VERSION"
|
||||
else "311");
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
pkgs."python${pythonVersion}"
|
||||
pkgs."python${pythonVersion}Packages"."pip"
|
||||
pkgs."python${pythonVersion}Packages"."setuptools"
|
||||
pkgs."python${pythonVersion}Packages"."wheel"
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
PYTHONDONTWRITEBYTECODE = 1;
|
||||
PYTHONIOENCODING = "UTF-8";
|
||||
VIRTUAL_ENV_DISABLE_PROMPT = 1;
|
||||
};
|
||||
}
|
@ -1,27 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./pipenv.nix
|
||||
./poetry.nix
|
||||
./pyenv.nix
|
||||
./base.nix
|
||||
./package-managers
|
||||
];
|
||||
|
||||
# Base Python installation
|
||||
home.packages = with pkgs; [
|
||||
python311
|
||||
python311Packages.pip
|
||||
python311Packages.setuptools
|
||||
python311Packages.wheel
|
||||
];
|
||||
|
||||
# Common Python environment variables
|
||||
home.sessionVariables = {
|
||||
PYTHONDONTWRITEBYTECODE = 1;
|
||||
PYTHONIOENCODING = "UTF-8";
|
||||
PYTHONUSERBASE = "$HOME/.local/python";
|
||||
};
|
||||
|
||||
# Create Python user directory
|
||||
home.file.".local/python/.keep".text = "";
|
||||
}
|
||||
}
|
10
users/jeirmeister/programs/development/env/languages/python/package-managers/default.nix
vendored
Normal file
10
users/jeirmeister/programs/development/env/languages/python/package-managers/default.nix
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
# Add to env/languages/python/package-managers/default.nix
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./pipenv.nix
|
||||
./poetry
|
||||
];
|
||||
|
||||
}
|
@ -1,18 +1,14 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
pipenv
|
||||
];
|
||||
home.packages = with pkgs; [ pipenv ];
|
||||
|
||||
home.sessionVariables = {
|
||||
PIPENV_VENV_IN_PROJECT = "1";
|
||||
WORKON_HOME = "$HOME/.local/share/virtualenvs";
|
||||
WORKON_HOME = "${config.home.sessionVariables.VIRTUALENV_HOME}";
|
||||
PIP_NO_CACHE_DIR = "off";
|
||||
PIPENV_SKIP_LOCK = "1";
|
||||
PIPENV_IGNORE_VIRTUALENVS = "1";
|
||||
PIPENV_MAX_DEPTH = "5";
|
||||
};
|
||||
|
||||
home.file.".local/share/virtualenvs/.keep".text = "";
|
||||
}
|
||||
}
|
32
users/jeirmeister/programs/development/env/languages/python/package-managers/poetry/default.nix
vendored
Normal file
32
users/jeirmeister/programs/development/env/languages/python/package-managers/poetry/default.nix
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
{ 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
|
||||
'';
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
repo-to-text = pkgs.callPackage ./repo-to-text.nix {};
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
repo-to-text
|
||||
];
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
poetry
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
POETRY_VIRTUALENVS_IN_PROJECT = "true";
|
||||
POETRY_CACHE_DIR = "$HOME/.cache/pypoetry";
|
||||
POETRY_IGNORE_ENVIRONMENT_VARIABLES = "1";
|
||||
};
|
||||
|
||||
home.file.".config/pypoetry/config.toml".text = ''
|
||||
[virtualenvs]
|
||||
in-project = true
|
||||
path = "{cache-dir}/virtualenvs"
|
||||
create = true
|
||||
clear = false
|
||||
|
||||
[repositories]
|
||||
'';
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
pyenv
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
PYENV_ROOT = "$HOME/.pyenv";
|
||||
PYENV_SHELL = "zsh";
|
||||
PYENV_VIRTUALENV_INIT = "1";
|
||||
};
|
||||
|
||||
home.file.".pyenv/version".text = "system";
|
||||
|
||||
programs.zsh.initExtra = ''
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init --path)"
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
'';
|
||||
}
|
@ -2,25 +2,16 @@
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# cargo is provided by rustup
|
||||
cargo-edit
|
||||
cargo-watch
|
||||
cargo-audit
|
||||
cargo-tarpaulin
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
CARGO_HOME = "$HOME/.cargo";
|
||||
};
|
||||
|
||||
programs.zsh.initExtra = ''
|
||||
export PATH="$CARGO_HOME/bin:$PATH"
|
||||
'';
|
||||
|
||||
home.file.".cargo/config.toml".text = ''
|
||||
[build]
|
||||
target-dir = "target"
|
||||
|
||||
|
||||
[cargo-new]
|
||||
vcs = "git"
|
||||
'';
|
||||
|
@ -3,6 +3,6 @@
|
||||
{
|
||||
imports = [
|
||||
./cargo.nix
|
||||
./rustup.nix
|
||||
./toolchain.nix
|
||||
];
|
||||
}
|
||||
|
@ -6,11 +6,11 @@
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
RUSTUP_HOME = "$HOME/.rustup";
|
||||
RUSTUP_HOME = "${config.home.sessionVariables.XDG_DATA_HOME}/rustup";
|
||||
};
|
||||
|
||||
home.file.".rustup/settings.toml".text = ''
|
||||
default_toolchain = "stable"
|
||||
default_toolchain = "${config.home.sessionVariables.RUST_VERSION}"
|
||||
profile = "default"
|
||||
'';
|
||||
}
|
||||
'';
|
||||
}
|
@ -3,21 +3,21 @@
|
||||
{
|
||||
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" = {
|
||||
@ -34,4 +34,5 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
home.file."${config.home.sessionVariables.XDG_DATA_HOME}/ssh/.keep".text = "";
|
||||
}
|
Loading…
Reference in New Issue
Block a user