feat: Add python development services

This commit is contained in:
2025-12-04 15:56:34 -05:00
committed by Hunter Halloran
parent 2ad12ab729
commit 2f538ca018
4 changed files with 29 additions and 19 deletions

View File

@@ -22,4 +22,15 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# Suspend / logind behavior
services.upower.enable = true;
services.logind.settings = {
Login = {
HandleLidSwitch = "suspend";
HandleLidSwitchExternalPower = "suspend";
HandleLidSwitchDocked = "ignore";
};
};
} }

18
sw.nix
View File

@@ -21,9 +21,6 @@
pulse.enable = true; pulse.enable = true;
}; };
# Install firefox.
programs.firefox.enable = true;
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@@ -33,6 +30,7 @@
htop htop
binutils binutils
man man
chromium
lm_sensors lm_sensors
oh-my-posh oh-my-posh
zsh zsh
@@ -76,7 +74,7 @@
xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ]; xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
# Browsers # Browsers
programs.chromium.enable = true; programs.firefox.enable = true;
# Virtualization # Virtualization
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
@@ -85,16 +83,6 @@
# Sensors # Sensors
services.thermald.enable = true; services.thermald.enable = true;
# Suspend / logind behavior # Enable the OpenSSH daemon.
services.upower.enable = true;
services.logind.settings = {
Login = {
HandleLidSwitch = "suspend";
HandleLidSwitchExternalPower = "suspend";
HandleLidSwitchDocked = "ignore";
};
};
# Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
} }

View File

@@ -1,5 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
let
pythonPkgs = import ./python.nix { inherit pkgs; };
in
{ {
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users = { users.users = {
@@ -10,7 +12,7 @@
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [ packages = with pkgs; [
kdePackages.kate kdePackages.kate
]; ] ++ pythonPkgs;
hashedPassword = "$6$El6e2NhPrhVFjbFU$imlGZqUiizWw5fMP/ib0CeboOcFhYjIVb8oR1V1dP2NjDeri3jMoUm4ZABOB2uAF8UEDjAGHhFuZxhtbHg647/"; hashedPassword = "$6$El6e2NhPrhVFjbFU$imlGZqUiizWw5fMP/ib0CeboOcFhYjIVb8oR1V1dP2NjDeri3jMoUm4ZABOB2uAF8UEDjAGHhFuZxhtbHg647/";
}; };
@@ -20,11 +22,11 @@
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [ packages = with pkgs; [
kdePackages.kate kdePackages.kate
]; ] ++ pythonPkgs;
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
}; };
# Home Manager configs per user # Home Manager configs per user
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;

9
users/python.nix Normal file
View File

@@ -0,0 +1,9 @@
{ pkgs, ... }:
[
(pkgs.buildFHSEnv {
name = "pixi";
runScript = "pixi";
targetPkgs = pkgs: with pkgs; [ pixi ];
})
pkgs.uv
]