More nonsense not worth describing

This commit is contained in:
lulusilly 2025-09-01 00:32:34 -04:00
parent 6e81c396c4
commit 68d7df796e
12 changed files with 4 additions and 29 deletions

View file

View file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View file

@ -0,0 +1,173 @@
{ config, lib, pkgs, inputs, ... }:
{
imports =
[
./hardware-configuration.nix
];
# Enable automatic system updates
system.autoUpgrade = {
enable = true;
flake = inputs.self.outPath;
flags = [
"--update-input"
"nixpkgs"
"-L" # print build logs
];
dates = "weekly";
randomizedDelaySec = "45min";
};
# Allow non-free software (RMS will be mad at me :<)
nixpkgs.config.allowUnfree = true;
# Enable nix-command and flakes
nix.settings.experimental-features = [ "nix-command" "flakes"];
# SystemD-boot is good enough
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
systemd.tpm2.enable = false;
networking.hostName = "mecca"; # Change for given system
networking.networkmanager.enable = true;
# Timezone => AST
time.timeZone = "America/St_Thomas";
stylix = {
enable = true;
image = ./bg.jpg;
};
# Hyprland looks nice so I'm using it
programs.hyprland = {
enable = true;
withUWSM = true;
xwayland.enable = true;
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";
xdg.portal.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
# using piprewire cuz embrace muh modernity
services.pipewire = {
enable = true;
pulse.enable = true;
};
services.libinput.enable = true; # for laptop touchpad
# Laptop battery optimizations
# NOTE: Comment out if on PC/Not required for your rig
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 20;
START_CHARGE_THRESH_BAT0 = 40; # 40 and below it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
services.auto-cpufreq.enable = true;
services.auto-cpufreq.settings = {
battery = {
governor = "powersave";
turbo = "never";
};
charger = {
governor = "performance";
turbo = "auto";
};
};
powerManagement.powertop.enable = true;
# Kanata setup
# Mostly copied from https://dev.to/shanu-kumawat/how-to-set-up-kanata-on-nixos-a-step-by-step-guide-1jkc
boot.kernelModules = [ "uinput" ]; # Enable uinput kernel module
hardware.uinput.enable = true; # Enable uinput
# Set up udev rules for uinput
services.udev.extraRules = ''
KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"
'';
users.groups.uinput = { }; # ensure uinput group exists
# Add Kanata service user to necessary groups
systemd.services.kanata-internalKeyboard.serviceConfig = {
SupplementaryGroups = [
"input"
"uinput"
];
};
# Kanata configuration
services.kanata = {
enable = true;
keyboards = {
internalKeyboard = {
devices = [
"/dev/input/by-path/platform-i8042-serio-0-event-kbd"
];
configFile = builtins.fetchurl {
url = https://git.luluslly.xyz/lulusilly/dotfiles/raw/branch/master/.config/kanata/conf.kbd;
sha256 = "1jv6051igv4yxwr9bxzil6qrynvg3imlnh65lxhjdfcvpnmlcy6p";
};
};
};
};
# Default user account
users.users.lunita = {
isNormalUser = true;
extraGroups = [ "wheel" ];
shell = pkgs.zsh;
};
# Enabling Emacs server
services.emacs = {
enable = true;
package = pkgs.emacs-gtk;
};
# Enable zsh
programs.zsh.enable = true;
# Going with FF for now. Might switch over to Zen eventually
programs.firefox.enable = true;
# Enable Tailscale for homeserver stuff
services.tailscale.enable = true;
# Enable syncthing for Obsidian & KeePass DB sync across devices
services.syncthing.enable = true;
environment.systemPackages = with pkgs; [
# home-manager # For using Nix Home Manager
zsh # Default user shell
minecraftia # font
jetbrains-mono # font
terminus_font # font
neovim # Terminal text editor
wget # coreutil for some script compatibility
htop # Resource manager
waybar # Status bar
libnotify # Desktop notifications
swww # Wallpaper manager
brightnessctl # For laptop backlight brightness control
grim # screenshot utility
slurp # select utility
wl-clipboard # xclip alternative
rofi-wayland # Dmenu replacement for Wayland
ghostty # Terminal emulator
];
# Enable OpenSSH SSH Daemon
services.openssh.enable = true;
# Copy sysconf in case this file is deleted or corrupted
# NOTE: Doesn't work with flakes enabled.
# system.copySystemConfiguration = true;
system.stateVersion = "25.05";
}

View file

@ -0,0 +1,41 @@
# 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 = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9c7f9128-0371-4b7b-b0fb-86aeabe0491a";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/BE22-C08F";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/8380ab37-d79c-4b25-888b-d457596dcfae"; }
];
# 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.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1,128 @@
{ config, pkgs, ... }:
{
home.username = "lunita";
home.homeDirectory = "/home/lunita";
home.stateVersion = "25.05";
programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
c = "clear";
nf = "neofetch";
hmc = "nvim ~/.config/home-manager/home.nix";
hmb = "home-manager build switch";
fkc = "sudo nvim ~/.config/nixos/flake.nix";
nxr = "sudo nixos-rebuild switch --flake ~/.config/nixos#${config.home.sessionVariables.HOSTNAME}";
v = "nvim";
d = "cd ~/Documents";
D = "cd ~/Downloads";
};
initContent = ''
# '~' => goto base of user home directory
alias ~='cd ~'
# Vim keybinds
bindkey -v
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='nvim'
fi
# Set TERM for Ghostty ssh workaround
if [[ "$TERM_PROGRAM" == "ghostty" ]]; then
export TERM=xterm-256color
fi
'';
history.size = 10000;
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
theme = "lambda";
};
};
programs.git = {
enable = true;
userName = "lulusilly";
userEmail = "lunita@puppygirl.onl";
aliases = {
ci = "commit";
co = "checkout";
s = "status";
};
};
programs.waybar = {
enable = true;
package = pkgs.waybar;
# Define the Waybar style.css content here
style = ''
* {
font-family: "JetBrainsMono Nerd Font", monospace;
font-size: 13px;
}
#window {
/* Example: style the window module */
background-color: #333333;
color: #ffffff;
border-radius: 8px;
padding: 0 10px;
}
'';
# Define the Waybar config content here (JSON format)
settings = {
mainBar = {
layer = "top";
position = "top";
modules-left = [ "hyprland/workspaces" "hyprland/window" ];
modules-center = [ "clock" ];
modules-right = [ "network" "pulseaudio" "battery" ];
};
};
};
nixpkgs.config.allowUnfree = true;
home.packages = with pkgs; [
tree # Nice file tree views w/permissions
neofetch # Muh epic r1ce!!!
btop # Resource manager
stow # For dotfiles deployment. May use home.file in future
imagemagick # For converting images into other fmts
sxiv # Minimal image viewer
mpv # Video player
zathura # PDF/CBZ/EPUB/DJVU reader
tmux # Tride and true terminal multiplexer
obsidian # For epic note taking (really just mediocre journaling)
keepassxc # Secure password manager
syncthing # Self explanatory
];
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
home.sessionVariables = {
EDITOR = "nvim";
HOSTNAME = builtins.getEnv "HOSTNAME";
};
programs.home-manager.enable = true;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View file

@ -0,0 +1,123 @@
{ config, pkgs, inputs, ... }:
{
imports =
[
./hardware-configuration.nix
];
# Enable automatic system updates
system.autoUpgrade = {
enable = true;
flake = inputs.self.outPath;
flags = [
"--update-input"
"nixpkgs"
"-L" # print build logs
];
dates = "weekly";
randomizedDelaySec = "45min";
};
# Allow non-free software (RMS will be mad at me :<)
nixpkgs.config.allowUnfree = true;
# Enable nix-command and flakes
nix.settings.experimental-features = [ "nix-command" "flakes"];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
systemd.tpm2.enable = false;
networking.hostName = "syntheticnexus";
networking.networkmanager.enable = true;
time.timeZone = "America/St_Thomas";
i18n.defaultLocale = "en_US.UTF-8";
services.xserver.xkb = {
layout = "us";
variant = "";
};
stylix = {
enable = true;
image = ./bg.jpg;
};
# Using ly as TUI display manager, with minimal Gnome configuration
services.displayManager.ly.enable = true;
services.desktopManager.gnome.enable = true;
services.gnome.core-apps.enable = false;
services.gnome.core-developer-tools.enable = false;
services.gnome.games.enable = false;
environment.gnome.excludePackages = with pkgs; [ gnome-tour gnome-user-docs ];
# using piprewire cuz embrace muh modernity
services.pipewire = {
enable = true;
pulse.enable = true;
};
services.libinput.enable = true; # for laptop touchpad
# Kanata setup
# Mostly copied from https://dev.to/shanu-kumawat/how-to-set-up-kanata-on-nixos-a-step-by-step-guide-1jkc
boot.kernelModules = [ "uinput" ]; # Enable uinput kernel module
hardware.uinput.enable = true; # Enable uinput
# Set up udev rules for uinput
services.udev.extraRules = ''
KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"
'';
users.groups.uinput = { }; # ensure uinput group exists
# Add Kanata service user to necessary groups
systemd.services.kanata-internalKeyboard.serviceConfig = {
SupplementaryGroups = [
"input"
"uinput"
];
};
# Kanata configuration
services.kanata = {
enable = true;
keyboards = {
internalKeyboard = {
devices = [
"/dev/input/by-path/platform-i8042-serio-0-event-kbd"
];
configFile = builtins.fetchurl {
url = https://git.luluslly.xyz/lulusilly/dotfiles/raw/branch/master/.config/kanata/conf.kbd;
sha256 = "1jv6051igv4yxwr9bxzil6qrynvg3imlnh65lxhjdfcvpnmlcy6p";
};
};
};
};
users.users.lunita = {
isNormalUser = true;
description = "Lunita";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
shell = pkgs.zsh;
};
environment.systemPackages = with pkgs; [
curl
wget
neovim
git
home-manager
gnome-console
gnomeExtensions.blur-my-shell
gnomeExtensions.just-perfection
gnomeExtensions.paperwm
nyxt
];
# Zsh
programs.zsh.enable = true;
# Browser
programs.firefox.enable = true;
# Tailscale
services.tailscale.enable = true;
# Syncthing
services.syncthing.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
services.openssh.enable = true;
system.stateVersion = "25.05";
}

View file

@ -0,0 +1,42 @@
# 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 = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c7f03532-bbad-4c5d-9309-052c7cb7f63c";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/2A5E-652D";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/fcd83e93-64eb-40be-97ae-3e512bd8f97e"; }
];
# 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.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f0u5.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}