collate recent changes back to master

This commit is contained in:
atagen 2025-06-18 01:16:11 +10:00
commit 92ed39cb83
258 changed files with 5169 additions and 16379 deletions

309
system/quiver.nix Executable file → Normal file
View file

@ -1,30 +1,86 @@
{ config, lib, pkgs, modulesPath, ... }:
let
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
hyprland = (import flake-compat {
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz";
}).defaultNix;
in {
nixpkgs.overlays = [
(self: super: {
system76-scheduler = pkgs.callPackage ./syspkgs/system76-scheduler.nix {};
kwin-system76-scheduler-integration = pkgs.libsForQt5.callPackage ./syspkgs/kwin-system76-scheduler-integration.nix {};
})
{
config,
lib,
pkgs,
inputs,
rice,
...
}:
{
imports = [
./configuration.nix
];
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
services.ollama = {
enable = true;
user = "ollama";
};
imports =
[ hyprland.nixosModules.default ];
system.stateVersion = "22.11"; # Did you read the comment?
environment.sessionVariables = rec {
WLR_NO_HARDWARE_CURSORS = "1";
networking.hostName = "quiver";
users.users.bolt = {
isNormalUser = true;
extraGroups = [
"wheel"
"podman"
];
};
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usbcore"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.initrd.verbose = false;
boot.kernelModules = [
"kvm-amd"
"i2c-dev"
];
boot.consoleLogLevel = 0;
boot.kernelParams = [
"mitigations=off"
"preempt=full"
"quiet"
"loglevel=3"
"systemd.show_status=off"
"rd.udev.log_level=3"
"vt.global_cursor_default=0"
];
services.scx = {
enable = true;
scheduler = "scx_bpfland";
};
boot.kernelPackages = pkgs.linuxPackages_cachyos;
boot.supportedFilesystems = {
ntfs = true;
btrfs = true;
};
boot.loader.efi.canTouchEfiVariables = true;
# boot.plymouth = {
# enable = true;
# inherit (rice.plymouth) theme themePackages font;
# };
security.tpm2.enable = true;
networking.useDHCP = lib.mkDefault true;
hardware.cpu.amd.updateMicrocode = true;
environment.pathsToLink = [
"/share/xdg-desktop-portal"
"/share/applications"
];
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
# ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=5";
GBM_BACKEND = "nvidia-drm";
NVD_BACKEND = "direct";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
@ -34,157 +90,112 @@ in {
EDITOR = "hx";
};
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbcore" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "i2c-dev" ];
boot.extraModulePackages = [ ];
boot.kernelParams = [ "nvidia_drm.modeset=1" "mitigations=off" "acpi_enforce_resources=lax" "preempt=full" ];
boot.loader.efi.canTouchEfiVariables = true;
# boot.plymouth.enable = true;
boot.supportedFilesystems = [ "ntfs" ];
security.tpm2.enable = true;
boot.loader.systemd-boot.configurationLimit = 5;
networking.useDHCP = lib.mkDefault true;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
nix.settings.trusted-users = [ "bolt" ];
virtualisation.oci-containers.backend = "podman";
hardware.nvidia-container-toolkit.enable = true;
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
dockerSocket.enable = true;
defaultNetwork.settings.dns_enabled = true;
};
};
services.minidlna = {
enable = true;
settings = {
notify_interval = 120;
friendly_name = "PC";
media_dir = [ "A,/data/Music/Slsk" ];
};
};
programs.hyprland = {
enable = true;
xwayland = {
enable = true;
hidpi = false;
};
nvidiaPatches = true;
};
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
hardware.nvidia.modesetting.enable = true;
hardware.nvidia.powerManagement.enable = true;
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.latest;
modesetting.enable = true;
powerManagement.enable = true;
nvidiaPersistenced = true;
open = false;
};
programs.xwayland.enable = true;
systemd.services.no-rgb = {
wantedBy = [ "multi-user.target" ];
description = "rgb led turn-off-er";
serviceConfig = {
Type = "oneshot";
ExecStart = ''${pkgs.openrgb}/bin/openrgb -d "HyperX Fury RGB" -m static -c 000000'';
};
};
systemd.services."com.system76.Scheduler" = {
wantedBy = [ "multi-user.target" ];
description = "the system76 process scheduler";
serviceConfig = {
Type = "dbus";
ExecStart = ''${pkgs.system76-scheduler}/bin/system76-scheduler daemon'';
ExecReload = ''${pkgs.system76-scheduler}/bin/system76-scheduler daemon reload'';
BusName = "com.system76.Scheduler";
};
};
# openrgb no longer recognises the device?
# systemd.services.no-rgb = {
# wantedBy = ["multi-user.target"];
# description = "rgb led turn-off-er";
# serviceConfig = {
# Type = "oneshot";
# ExecStart = ''${pkgs.openrgb}/bin/openrgb -d "HyperX DRAM" -m static -c 000000'';
# After = ["openrgb"];
# };
# };
services.dbus.packages = [
pkgs.kwin-system76-scheduler-integration
pkgs.system76-scheduler
];
# services.hardware.openrgb = {
# enable = true;
# motherboard = "amd";
# };
systemd.packages = [
pkgs.kwin-system76-scheduler-integration
pkgs.system76-scheduler
];
environment.etc = {
"system76-scheduler".source = "${pkgs.system76-scheduler}/etc/system76-scheduler";
};
services.hardware.openrgb = {
enable = true;
motherboard = "amd";
};
hardware.ckb-next.enable = true;
xdg.portal = {
enable = true;
wlr = {
enable = true;
# settings = {
# screencast = {
# output_name = "DP-1";
# max_fps = 60;
# chooser_type = "simple";
# chooser_nvidia = "${pkgs.slurp}/bin/slurp -f %o -or";
# };
# };
};
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
hardware.ckb-next.enable = true;
environment.systemPackages =
builtins.attrValues {
inherit (pkgs)
wl-clipboard
wl-clipboard-x11
xclip
;
inherit (pkgs.kdePackages) qtbase qtdeclarative;
}
++ [
(inputs.quickshell.packages.${pkgs.system}.default.override {
withHyprland = false;
withI3 = false;
})
];
};
environment.systemPackages = with pkgs;
[
ckb-next
openrgb
wl-clipboard
wl-clipboard-x11
xclip
system76-scheduler
kwin-system76-scheduler-integration
];
networking.hostName = "quiver"; # Define your hostname.
users.users.bolt = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
programs.fuse.userAllowOther = true;
services.libinput.mouse = {
accelProfile = "flat";
accelSpeed = 0.0;
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d227445f-6120-4768-8e1b-011f097505c1";
fsType = "ext4";
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/b993b463-c131-4ef1-9aba-0e3eadaa2f9a";
fsType = "btrfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6B75-AF9F";
"/boot" = {
device = "/dev/disk/by-uuid/6B75-AF9F";
fsType = "vfat";
};
fileSystems."/data" = {
device = "/dev/disk/by-uuid/39D4F78C658E8B56";
fsType = "ntfs";
options = [ "rw" "uid=1001" "gid=100" ];
"/data" = {
device = "/dev/disk/by-uuid/39D4F78C658E8B56";
fsType = "ntfs";
options = [
"rw"
"uid=1000"
"gid=100"
];
};
};
# swapDevices = [ {
# device = "/dev/disk/by-uuid/7fde28ec-80f9-4228-8597-c3a57bfbf619";
# size = 4096;
# }
# ];
swapDevices = [
{ device = "/dev/disk/by-uuid/9c006925-e0e9-4165-bc0c-508ae2d1bfce"; }
];
# networking.nftables.enable = true;
networking.firewall = {
allowedUDPPorts = [ 1900 ];
allowedTCPPorts = [ 8200 2234 ];
# allowedUDPPorts = [1900];
# allowedTCPPorts = [8200 2234];
allowedTCPPorts = [ 2234 ];
};
services.open-webui = {
package = inputs.nixpkgs-stable.legacyPackages.x86_64-linux.open-webui;
enable = true;
port = 8088;
environment = {
DO_NOT_TRACK = "True";
SCARF_NO_ANALYTICS = "True";
ANONYMIZED_TELEMETRY = "False";
WEBUI_AUTH = "False";
DATABASE_URL = "sqlite:///${config.services.open-webui.stateDir}/newdb.db";
};
};
# for quickshell
qt.enable = true;
}