Nix-Vibe public snapshot (squashed history)

This commit is contained in:
2026-09-19 13:54:34 +01:00
commit cff83a473b
118 changed files with 18716 additions and 0 deletions
+105
View File
@@ -0,0 +1,105 @@
# /hosts/hp-laptop/configuration.nix
{
config,
pkgs,
inputs,
lib,
...
}:
{
imports = [
./hardware-configuration.nix
../../modules/core/common.nix
../../modules/desktop/gui.nix
(import ../../modules/storage/disko.nix {
inherit inputs lib config;
diskoConfigPath = ./disko-config.nix;
})
../../modules/desktop/hyprland.nix
../../modules/core/management.nix
../../modules/hardware/laptop.nix
../../modules/hardware/hp-battery-limit.nix
../../modules/core/dev.nix
];
sops.secrets = {
"users/petere-password" = {
neededForUsers = true;
};
# Nextcloud CalDAV credentials for the QuickShell calendar popup
# (vdirsyncer/khal sync). Values live in secrets.yaml under
# hp-laptop/nextcloud-cal-env; sync runs as petere so it must be readable.
"hp-laptop/nextcloud-cal-env" = {
owner = "petere";
group = "users";
mode = "0440";
};
};
home-manager.users.petere.imports = [
../../home-manager/modules/hyprland.nix
../../home-manager/modules/quickshell-cal.nix
../../home-manager/modules/quickshell-apps.nix
];
home-manager.users.petere.services.quickshell-cal.enable = true;
# Autostart app pool (toggleable from the gear quick-settings panel).
# The on/off choice is stored at runtime in
# ~/.cache/quickshell/autostart.json - adding an app here just makes it
# available as an (off by default) entry next time the panel loads.
home-manager.users.petere.services.quickshell-apps = {
enable = true;
apps = [
{
name = "Element";
cmd = "element-desktop";
}
{
name = "Nextcloud";
cmd = "nextcloud";
}
{
name = "Bitwarden";
cmd = "bitwarden";
}
];
};
networking.hostName = "hp-laptop";
# Open legacy game-streaming ports.
networking.firewall = {
enable = true;
allowedTCPPorts = [ 9756 ];
allowedUDPPorts = [ 9999 ];
};
# TeleportFling: standalone screen + audio sender for OBS Teleport.
environment.systemPackages = [
inputs.teleportfling.packages.${pkgs.system}.teleportfling-gui
inputs.teleportfling.packages.${pkgs.system}.teleportfling
];
# Laptop-specific hardware support (fingerprint reader, fwupd)
my.hardware.laptop.enable = true;
# Charging cap at 80% (protect battery longevity). Board 81AD firmware lacks
# a percentage threshold sysfs, so this runs SBCC/SBCO via acpi_call: a root
# poller inhibits charge at 80% and re-enables auto below 75%. Toggleable
# from the QuickShell gear panel (CHARGE LIMIT).
my.hardware.hpBatteryLimit.enable = true;
# Intel integrated GPU (HP consumer laptops)
hardware.graphics.enable = true;
my.users.petere = {
description = "Peter Edley";
hashedPasswordFile = config.sops.secrets."users/petere-password".path;
subUidStart = 165536;
subGidStart = 165536;
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}
+62
View File
@@ -0,0 +1,62 @@
# /hosts/hp-laptop/disko-config.nix
# Two-disk layout:
# /dev/sda -> boot + ESP (/boot) + swap + root (/)
# /dev/sdb -> home (/home)
{
disk = {
root = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02";
};
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
swap = {
size = "16G";
type = "8200";
content = {
type = "swap";
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
home = {
type = "disk";
device = "/dev/sdb";
content = {
type = "gpt";
partitions = {
home = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/home";
};
};
};
};
};
};
}
@@ -0,0 +1,36 @@
# hardware-configuration.nix for hp-laptop
# Generated placeholder — run `sudo nixos-generate-config --show-hardware-config` on the
# target machine after the initial (disko / nixos-anywhere) install and replace this file.
# NOTE: Do NOT copy the output of `nixos-generate-config` run from the installer ISO — it
# reflects the live environment (tmpfs /, /iso, squashfs overlay), not the installed system.
# NOTE: `fileSystems` and `swapDevices` are intentionally omitted here — they are
# provided by the disko module (hosts/hp-laptop/disko-config.nix).
# Disk layout (see disko-config.nix): /dev/sda = boot + ESP + swap + root (/);
# /dev/sdb = home (/home).
{ config
, lib
, pkgs
, modulesPath
, ...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
networking.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;
}