Initial commit

This commit is contained in:
august kline 2024-05-02 17:21:25 -04:00
commit bb99e90511
149 changed files with 620 additions and 0 deletions

297
configuration.nix Normal file
View File

@ -0,0 +1,297 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
let
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
packages = import (./packages);
in {
disabledModules = [ "services/hardware/undervolt.nix" ];
imports = [ # Include the results of the hardware scan.
<home-manager/nixos>
./hardware-configuration.nix
<nixos-unstable/nixos/modules/services/hardware/undervolt.nix>
];
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ packages ];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "x1-carbon-nixos"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager = {
enable = true; # Easiest to use and most distros use this by default.
wifi.powersave = true;
};
hardware.bluetooth.enable = false;
# Set your time zone.
time.timeZone = "America/New_York";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
# Enable the X11 windowing system.
# services.xserver.enable = true;
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
sound.enable = false;
security.rtkit.enable = true;
systemd.extraConfig = "StartLimitBurst=2";
services = {
#syncthing = {
# enable = true;
# relay.enable = true;
# user = "august";
# group = "wheel";
# settings = {
# devices = {
# pixel6 = {
# id =
# "OXDZ7H2-SZPRP56-7C3MHIE-RAKEL4C-EIKMJ4R-VK5YWTP-HW6FVW3-HB42PQX";
# autoAcceptFolders = true;
# };
# };
# folders = {
# "/home/august/sync" = {
# id = "Default";
# devices = [ "pixel6" ];
# };
# };
# };
#};
dbus = {
enable = true;
implementation = "broker";
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
openssh.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
programs.fish.enable = true;
security.pam.services.swaylock = { };
security.pam.services.swaylock.fprintAuth = true;
programs.hyprland.enable = true;
programs.hyprland.xwayland.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.august = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ]; # Enable sudo for the user.
packages = with pkgs; [
hyprshade
imagemagick
xdg-utils
transmission_4-gtk
gnome.gnome-font-viewer
networkmanager_dmenu
firefox
tree
unstable.alacritty
swaybg
pywal
eww-wayland
wl-clipboard
vimix-cursors
prismlauncher
p7zip
bashmount
fcp
unstable.kicad
gnome.gnome-tweaks
gnome.gnome-themes-extra
vlc
gnome.nautilus
gnome.sushi
colloid-gtk-theme
vscode-langservers-extracted
networkmanagerapplet
whitesur-icon-theme
whitesur-gtk-theme
adw-gtk3
starship
tea
gcc
jdk
jdk21
python3
python311Packages.pip
unzip
go
php
rustup
nodejs_21
prettierd
luarocks
luajit
bat
wofi
ydotool
wtype
wev
stylua
nixfmt
nil
lua-language-server
signal-desktop
acpi
unstable.pywalfox-native
swayfx
wofi-emoji
];
shell = pkgs.fish;
};
# home-manager.users.august = {pkgs, ...}: {
# wayland.windowManager.hyprland = {
# enable = true;
# xwayland.enable = true;
# #plugins = [unstable.hyprlandPlugins.hy3];
# settings = {
# };
# };
# home.stateVersion = "23.11";
# };
fonts = {
fontconfig = {
allowBitmaps = true;
defaultFonts = { emoji = [ "Apple Color Emoji" ]; };
};
packages = with pkgs; [
cozette
nerdfonts
noto-fonts-color-emoji
apple-fonts
apple-emoji
phosphor-icons
];
};
programs.light.enable = true;
programs.neovim = {
enable = true;
defaultEditor = true;
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment = {
systemPackages = with pkgs; [
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
eza
tmux
git
fish
fishPlugins.z
fishPlugins.tide
fishPlugins.sponge
fishPlugins.pisces
bluez
usbutils
ripgrep
fzf
sof-firmware
pulseaudio
powertop
ranger
];
sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1";
XCURSOR_THEME = "Vimix Cursors - White";
};
};
security.sudo = {
enable = true;
extraRules = [{
users = [ "august" ];
commands = [{
command = "ALL";
options = [ "NOPASSWD" ];
}];
}];
};
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
libxkbcommon
wayland
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
];
};
# Enable the OpenSSH daemon.
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11"; # Did you read the comment?
}

136
hardware-configuration.nix Normal file
View File

@ -0,0 +1,136 @@
# 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, ... }:
# let unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
# in
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
<nixos-hardware/lenovo/thinkpad/x1/7th-gen>
# <nixos-unstable/nixos/modules/services/hardware/thermald.nix>
];
# disabledModules = [ "services/hardware/thermald.nix" ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "nvme" "usb_storage" "sd_mod" "thinkpad_acpi" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" "thinkpad_acpi" ];
boot.kernelPackages = pkgs.linuxPackages_latest;
#boot.kernelParams = [ "i915.force_probe=3ea0" "intel_pstate=disable" ];
boot.kernelParams = [ "i915.force_probe=3ea0" "intel_pstate=no_hwp" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/74437b9e-4505-4263-a688-1341827822a0";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5D25-EACA";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/e637bf0c-36dd-4bb0-8828-3b3eb2058909"; }];
# 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.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
# hardware.enableAllFirmware = true;
nixpkgs.config.packageOverrides = pkgs: {
intel-vaapi-driver =
pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
};
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
services = {
#tlp = {
# enable = true;
# settings = {
# CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
# CPU_ENERGY_PERF_POLICY_ON_BAT = "powersave";
# CPU_SCALING_GOVERNOR_ON_AC = "performance";
# CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
# # CPU_MIN_PERF_ON_AC = 0;
# # CPU_MAX_PERF_ON_AC = 100;
# # CPU_MIN_PERF_ON_BAT = 0;
# # CPU_MAX_PERF_ON_BAT = 20;
# # Optional helps save long term battery health
# START_CHARGE_THRESH_BAT0 = 50; # 40 and bellow it starts to charge
# STOP_CHARGE_THRESH_BAT0 = 90; # 80 and above it stops charging
# };
#};
#upower.enable = true;
#thermald = {
# enable = true;
# ignoreCpuidCheck = true;
#};
#auto-cpufreq = {
# enable = true;
# settings = {
# battery = {
# governor = "conservative";
# turbo = "never";
# };
# charger = {
# governor = "performance";
# turbo = "auto";
# };
# };
#};
#undervolt = {
# enable = true;
# tempAc = 100;
# tempBat = 80;
# gpuOffset = -50;
# coreOffset = -50;
#};
fprintd = {
enable = true;
tod.enable = true;
tod.driver = pkgs.libfprint-2-tod1-goodix;
};
fwupd.enable = true;
#system76-scheduler = {
# enable = true;
# useStockConfig = true;
# settings.cfsProfiles.enable = true;
#};
power-profiles-daemon.enable = true;
};
#powerManagement = {
# enable = true;
# powertop.enable = true;
# # cpuFreqGovernor = "conservative";
#};
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD";
}; # Force intel-media-driver
}

View File

@ -0,0 +1,27 @@
{ lib, stdenvNoCC, fetchurl }:
stdenvNoCC.mkDerivation {
pname = "apple-emoji";
version = "latest";
src = fetchurl {
url =
"https://github.com/samuelngs/apple-emoji-linux/releases/latest/download/AppleColorEmoji.ttf";
hash = "sha256-SG3JQLybhY/fMX+XqmB/BKhQSBB0N1VRqa+H6laVUPE=";
};
unpackPhase = ":";
installPhase = ''
install -Dm644 $src -t $out/share/fonts/truetype
'';
meta = with lib; {
description = "Apple color emoji";
homepage = "https://github.com/samuelngs/apple-emoji-linux";
#changelog = "https://github.com/slavfox/Cozette/blob/v.${version}/CHANGELOG.md";
license = licenses.mit;
platforms = platforms.all;
# maintainers = with maintainers; [ brettlyons marsam ];
};
}

View File

@ -0,0 +1,33 @@
{ lib, stdenvNoCC, xorg }:
stdenvNoCC.mkDerivation {
pname = "apple-fonts";
version = "1.0";
dontBuild = true;
dontUnpack = true;
src = ./.;
nativeBuildInputs = [ xorg.mkfontscale ];
# read install --help to find -Dm644 meaning
installPhase = ''
runHook preInstall
mkdir -p $out/usr/share/fonts/opentype
for folder in $src/fonts/*; do
install -Dm644 "$folder"/*.otf -t $out/usr/share/fonts/opentype
done
mkfontdir "$out/usr/share/fonts/opentype"
runHook postInstall
'';
meta = with lib; {
homepage = "https://developer.apple.com/fonts/";
description = "Apple Fonts package for nixOS";
longDescription = ''
Get the typefaces you need to design interfaces for your apps on Apple platforms.
These typefaces are designed to optimally display text at a variety of sizes
and in a wide range of languages across multiple interfaces.
'';
platforms = platforms.all;
};
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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