Add framework, calcs, power, obs

This commit is contained in:
Hunter Haugen 2025-05-03 09:44:14 -07:00
parent 7b953e9f11
commit 0aaf596af3
Signed by: hunner
GPG key ID: EF99694AA599DDAD
3 changed files with 115 additions and 2 deletions

View file

@ -2,15 +2,19 @@
{ config, pkgs, lib, ... }:
let
nixos-hardware = builtins.fetchTarball "https://github.com/NixOS/nixos-hardware/archive/master.tar.gz";
impermanence = builtins.fetchTarball "https://github.com/nix-community/impermanence/archive/master.tar.gz";
unstable = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") {
config = config.nixpkgs.config;
overlays = config.nixpkgs.overlays;
};
hp15c = pkgs.callPackage ./pkgs/hp15c/default.nix { inherit unstable; };
#nonpareil = pkgs.callPackage ./pkgs/nonpareil/default.nix { inherit pkgs; };
in
{
imports =
[
"${nixos-hardware}/framework/16-inch/7040-amd"
./hardware-configuration.nix
"${impermanence}/nixos.nix"
];
@ -27,6 +31,8 @@ in
"mem_sleep_default=deep"
];
};
services.fwupd.enable = true;
hardware.framework.enableKmod = true;
fileSystems = {
"/" = {
@ -124,6 +130,11 @@ in
hardware.bluetooth.enable = true;
services.blueman.enable = true;
services.logind = {
extraConfig = "HandlePowerKey=suspend";
lidSwitch = "suspend";
};
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
@ -143,7 +154,7 @@ in
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# 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.hunner = {
isNormalUser = true;
description = "Hunter Haugen";
@ -151,6 +162,7 @@ in
hashedPassword = "$y$j9T$hLqdzlz7dbJZgUnKs.eo3/$25s/2X18vGtDKj53qD1sn/.Omp/6CBJWbn7d9KAiOK7";
shell = pkgs.zsh;
packages = with pkgs; [
fzf
neovim
asdf-vm
pinentry-gtk2
@ -159,6 +171,9 @@ in
firefox-devedition
nodejs
slack
obs-studio
mplayer
ffmpeg
];
};
systemd.user.services = {
@ -227,6 +242,9 @@ in
pwvucontrol
pamixer
helvum
hp15c
#nonpareil
unstable.framework-tool
];
services.clipmenu.enable = true;
@ -290,6 +308,7 @@ in
enable = true;
packages = [ pkgs.polkit ];
};
programs.dconf.enable = true;
security.polkit.enable = true;
services.fprintd.enable = true;
@ -305,7 +324,7 @@ in
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).

View file

@ -0,0 +1,57 @@
{ stdenv, fetchzip, autoPatchelfHook, makeWrapper, lib, unstable }:
stdenv.mkDerivation rec {
pname = "hp15c";
version = "4.5.00";
src = fetchzip {
url = "https://www.hpcalc.org/other/pc/HP-15C_4.5.00_Linux_x86_64.zip";
sha256 = "15hxpckif4sab3lwkksqfnsf8agn545g2f5ijm6xrs2b23hdflmv";
stripRoot = false;
};
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
];
buildInputs = [
unstable.tcl
unstable.tk
];
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/share/hp15c
mkdir -p $out/share/fonts/truetype
# Install the binary
install -Dm755 HP-15C $out/bin/hp15c
# Install the font
install -Dm644 HP-15C_Simulator_Font.ttf $out/share/fonts/truetype/
# Install documentation
cp -r doc $out/share/hp15c/
cp "Read Me & Release Notes.html" $out/share/hp15c/
# Create a wrapper script that sets up the environment
makeWrapper $out/bin/hp15c $out/bin/hp15c-calculator \
--set FONTCONFIG_PATH /etc/fonts \
--set FONTCONFIG_FILE /etc/fonts/fonts.conf \
--prefix TCLLIBPATH : "${unstable.tcl}/lib" \
--prefix TCLLIBPATH : "${unstable.tk}/lib" \
--set TK_LIBRARY "${unstable.tk}/lib/tk8.6" \
--set TCL_LIBRARY "${unstable.tcl}/lib/tcl8.6" \
--prefix LD_LIBRARY_PATH : "${unstable.tcl}/lib" \
--prefix LD_LIBRARY_PATH : "${unstable.tk}/lib"
'';
meta = with lib; {
description = "HP-15C Calculator Simulator";
homepage = "https://www.hpcalc.org/other/pc/";
license = licenses.unfree; # You should check the actual license
platforms = [ "x86_64-linux" ];
maintainers = [ ];
};
}

View file

@ -0,0 +1,37 @@
{ stdenv, lib, fetchFromGitHub, pkg-config, autoreconfHook, pkgs }:
stdenv.mkDerivation rec {
pname = "nonpareil";
version = "unstable-2024-04-25";
src = fetchFromGitHub {
owner = "brouhaha";
repo = "nonpareil";
rev = "c347bc1ab20170c253512042f7aac0d952f304ea";
sha256 = "1d130hmsgvlmj8iy8sdd0frx9gzsc68wp84zdax6i8f7dhqdfxzx"; # You'll need to replace this
};
nativeBuildInputs = [
pkg-config
autoreconfHook
];
buildInputs = [
pkgs.gtk2
pkgs.glib
pkgs.libxml2
pkgs.SDL
];
configureFlags = [
"--with-gtk2"
];
meta = with lib; {
description = "Microcode-level simulation of HP calculators";
homepage = "https://github.com/brouhaha/nonpareil";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ ];
};
}