integrate htpc and associated configuration
This commit is contained in:
@@ -63,8 +63,10 @@
|
||||
./modules/de/kde.nix
|
||||
./modules/desktop-common.nix
|
||||
|
||||
./modules/gui/services/fcast.nix
|
||||
./modules/gui/apps/firefox.nix
|
||||
./modules/gui/apps/spicetify.nix
|
||||
./modules/gui/apps/steam.nix
|
||||
./modules/gui/fonts.nix
|
||||
./modules/gui/services/flatpak.nix
|
||||
./modules/gui/services/kdeconnect.nix
|
||||
@@ -92,8 +94,10 @@
|
||||
./modules/sys/security.nix
|
||||
./modules/sys/shell.nix
|
||||
./modules/sys/stateversion.nix
|
||||
./modules/sys/tz.nix
|
||||
./modules/sys/sysctl.nix
|
||||
./modules/sys/time.nix
|
||||
./modules/sys/users.nix
|
||||
./modules/sys/vm.nix
|
||||
|
||||
./hosts/board/configuration.nix
|
||||
spicetify-nix.nixosModules.spicetify
|
||||
@@ -104,6 +108,58 @@
|
||||
home-manager.users.k3t = ./home/desktop.nix;
|
||||
}
|
||||
];
|
||||
"htpc" = mkHost "x86_64-linux" [
|
||||
./modules/audio/base.nix
|
||||
./modules/audio/zeroconf.nix
|
||||
|
||||
./modules/bluetooth/desktop.nix
|
||||
./modules/de/kde.nix
|
||||
./modules/desktop-common.nix
|
||||
|
||||
./modules/gui/services/fcast.nix
|
||||
./modules/gui/apps/firefox.nix
|
||||
./modules/gui/apps/spicetify.nix
|
||||
./modules/gui/apps/steam.nix
|
||||
./modules/gui/fonts.nix
|
||||
./modules/gui/services/flatpak.nix
|
||||
./modules/gui/services/kdeconnect.nix
|
||||
./modules/gui/services/kwallet.nix
|
||||
./modules/gui/services/xdg.nix
|
||||
|
||||
./modules/net/services/avahi.nix
|
||||
./modules/net/services/fail2ban.nix
|
||||
./modules/net/services/networkmanager.nix
|
||||
./modules/net/services/printing.nix
|
||||
./modules/net/services/tailscale.nix
|
||||
|
||||
./modules/sys/compat.nix
|
||||
./modules/sys/firewall.nix
|
||||
./modules/sys/fs/btrfs.nix
|
||||
./modules/sys/hw/boot.nix
|
||||
./modules/sys/hw/cpu/amd64.nix
|
||||
./modules/sys/hw/gpu/amd.nix
|
||||
./modules/sys/nix.nix
|
||||
./modules/sys/perf.nix
|
||||
./modules/sys/pkgs.nix
|
||||
./modules/sys/rc/openssh.nix
|
||||
./modules/sys/rc/sunshine.nix
|
||||
./modules/sys/rgb.nix
|
||||
./modules/sys/security.nix
|
||||
./modules/sys/shell.nix
|
||||
./modules/sys/stateversion.nix
|
||||
./modules/sys/sysctl.nix
|
||||
./modules/sys/time.nix
|
||||
./modules/sys/users.nix
|
||||
|
||||
./hosts/htpc/configuration.nix
|
||||
spicetify-nix.nixosModules.spicetify
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.k3t = ./home/desktop.nix;
|
||||
}
|
||||
];
|
||||
"T14" = mkHost "x86_64-linux" [
|
||||
./modules/audio/base.nix
|
||||
./modules/audio/zeroconf.nix
|
||||
@@ -112,8 +168,10 @@
|
||||
./modules/de/kde.nix
|
||||
./modules/desktop-common.nix
|
||||
|
||||
./modules/gui/services/fcast.nix
|
||||
./modules/gui/apps/firefox.nix
|
||||
./modules/gui/apps/spicetify.nix
|
||||
./modules/gui/apps/steam.nix
|
||||
./modules/gui/fonts.nix
|
||||
./modules/gui/services/flatpak.nix
|
||||
./modules/gui/services/kdeconnect.nix
|
||||
@@ -141,8 +199,10 @@
|
||||
./modules/sys/security.nix
|
||||
./modules/sys/shell.nix
|
||||
./modules/sys/stateversion.nix
|
||||
./modules/sys/tz.nix
|
||||
./modules/sys/sysctl.nix
|
||||
./modules/sys/time.nix
|
||||
./modules/sys/users.nix
|
||||
./modules/sys/vm.nix
|
||||
|
||||
./hosts/laptop/configuration.nix
|
||||
spicetify-nix.nixosModules.spicetify
|
||||
@@ -168,7 +228,7 @@
|
||||
# ./modules/sys/security.nix
|
||||
# ./modules/sys/shell.nix
|
||||
# ./modules/sys/stateversion.nix
|
||||
# ./modules/sys/tz.nix
|
||||
# ./modules/sys/time.nix
|
||||
# ./modules/sys/users.nix
|
||||
# ./modules/pi-common.nix
|
||||
# ./hosts/pi-htpc-old/configuration.nix
|
||||
@@ -195,7 +255,8 @@
|
||||
./modules/sys/security.nix
|
||||
./modules/sys/shell.nix
|
||||
./modules/sys/stateversion.nix
|
||||
./modules/sys/tz.nix
|
||||
./modules/sys/sysctl.nix
|
||||
./modules/sys/time.nix
|
||||
./modules/sys/users.nix
|
||||
./hosts/nixcloud/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
@@ -223,7 +284,7 @@
|
||||
# ./modules/sys/security.nix
|
||||
# ./modules/sys/shell.nix
|
||||
# ./modules/sys/stateversion.nix
|
||||
# ./modules/sys/tz.nix
|
||||
# ./modules/sys/time.nix
|
||||
# ./modules/sys/users.nix
|
||||
# ./modules/pi-common.nix
|
||||
# ./hosts/pi-htpc-old/configuration.nix
|
||||
|
||||
@@ -10,17 +10,7 @@
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
services.beesd.filesystems = {
|
||||
root = {
|
||||
spec = "LABEL=NixOS";
|
||||
hashTableSizeMB = 128;
|
||||
verbosity = "crit";
|
||||
extraOptions = [ "--loadavg-target" "1.5" ];
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "T14"; # Define your hostname.
|
||||
services.openssh.enable = true;
|
||||
networking.hostName = "board"; # Define your hostname.
|
||||
|
||||
users.users.k3t = {
|
||||
packages = with pkgs; [
|
||||
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
kodi-with-addons = pkgs.kodi-wayland.withPackages (kodiPkgs: with kodiPkgs; [
|
||||
inputstream-adaptive
|
||||
inputstream-ffmpegdirect
|
||||
inputstream-rtmp
|
||||
inputstreamhelper
|
||||
bluetooth-manager
|
||||
vfs-sftp
|
||||
vfs-rar
|
||||
vfs-libarchive
|
||||
urllib3
|
||||
upnext
|
||||
trakt
|
||||
trakt-module
|
||||
sponsorblock
|
||||
invidious
|
||||
simplecache
|
||||
libretro
|
||||
libretro-snes9x
|
||||
libretro-nestopia
|
||||
jellycon
|
||||
archive_tool
|
||||
joystick
|
||||
keymap
|
||||
jellyfin
|
||||
visualization-projectm
|
||||
visualization-goom
|
||||
steam-launcher
|
||||
]);
|
||||
in
|
||||
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "htpc"; # Define your hostname.
|
||||
|
||||
services.displayManager = {
|
||||
autoLogin.user = "k3t";
|
||||
};
|
||||
|
||||
users.users.k3t = {
|
||||
packages = with pkgs; [
|
||||
kodi-with-addons
|
||||
];
|
||||
};
|
||||
}
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
# 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" "ehci_pci" "ahci" "usbhid" "uas" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/9e3085ab-53c4-4301-be0b-ea60edeb5ef5";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2C85-DE7B";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/54f5cbbd-333d-42b4-ab70-033b2a0d20a2"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
|
||||
@@ -10,17 +10,7 @@
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
services.beesd.filesystems = {
|
||||
root = {
|
||||
spec = "LABEL=NixOS";
|
||||
hashTableSizeMB = 128;
|
||||
verbosity = "crit";
|
||||
extraOptions = [ "--loadavg-target" "1.5" ];
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "T14"; # Define your hostname.
|
||||
services.openssh.enable = true;
|
||||
|
||||
users.users.k3t = {
|
||||
packages = with pkgs; [
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
pavucontrol
|
||||
pwvucontrol
|
||||
qpwgraph
|
||||
easyeffects
|
||||
];
|
||||
|
||||
# Enable sound with pipewire.
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
extraCompatPackages = with pkgs; [
|
||||
proton-ge-bin
|
||||
];
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
};
|
||||
programs.gamemode.enable = true;
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
programs.fcast-receiver = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
}
|
||||
@@ -1,3 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.kernelParams = [
|
||||
"split_lock_detect=off"
|
||||
"scsi_mod.use_blk_mq=1"
|
||||
"transparent_hugepage=madvise" # CachyOS default
|
||||
];
|
||||
boot.loader.limine.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
|
||||
boot.binfmt.preferStaticEmulators = true;
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" "x86_64-windows" ];
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
|
||||
boot.binfmt.preferStaticEmulators = true;
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" "x86_64-windows" ];
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
# Graphics
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
vkbasalt
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -14,7 +14,8 @@
|
||||
# Optional (compute / tooling):
|
||||
intel-compute-runtime # OpenCL (NEO) + Level Zero for Arc/Xe
|
||||
# NOTE: 'intel-ocl' also exists as a legacy package; not recommended for Arc/Xe.
|
||||
# libvdpau-va-gl # Only if you must run VDPAU-only apps
|
||||
libvdpau-va-gl # Only if you must run VDPAU-only apps
|
||||
vkbasalt
|
||||
];
|
||||
};
|
||||
}
|
||||
+18
-2
@@ -1,8 +1,24 @@
|
||||
{
|
||||
services.beesd.filesystems = {
|
||||
root = {
|
||||
spec = "LABEL=NixOS";
|
||||
hashTableSizeMB = 128;
|
||||
verbosity = "crit";
|
||||
extraOptions = [ "--loadavg-target" "1.5" ];
|
||||
};
|
||||
};
|
||||
services.fstrim.enable = true;
|
||||
services.system76-scheduler.enable = true;
|
||||
#services.thermald.enable = true;
|
||||
services.power-profiles-daemon.enable = true;
|
||||
systemd.coredump.enable = false;
|
||||
zramSwap.enable = true;
|
||||
zramSwap.memoryPercent = 80;
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
memoryPercent = 90;
|
||||
};
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/scheduler}="kyber"
|
||||
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="kyber"
|
||||
'';
|
||||
}
|
||||
@@ -9,7 +9,14 @@
|
||||
htop
|
||||
mosh
|
||||
btop
|
||||
wget2
|
||||
python314
|
||||
wget2
|
||||
dnsutils
|
||||
fastfetch
|
||||
peazip
|
||||
p7zip
|
||||
whois
|
||||
ffmpeg
|
||||
playerctl
|
||||
];
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
openrgb-with-all-plugins
|
||||
];
|
||||
# OpenRGB
|
||||
services.hardware.openrgb = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{
|
||||
security.polkit.enable = true;
|
||||
security = {
|
||||
sudo.execWheelOnly = true;
|
||||
polkit.enable = true;
|
||||
protectKernelImage = true;
|
||||
};
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
flake = "git+https://k3t.dev/git/nixconf.git?ref=main";
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
# Transparent Hugepages for better memory performance
|
||||
boot.kernel.sysctl = {
|
||||
"vm.max_map_count" = 1048576; # For some games that need it
|
||||
"vm.swappiness" = 200; # Reduce swapping
|
||||
# BBR congestion control
|
||||
"net.core.default_qdisc" = "fq";
|
||||
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||
"kernel.sysrq" = 1; # Enable SysRq for emergency recovery
|
||||
|
||||
# CachyOS performance tweaks
|
||||
"kernel.nmi_watchdog" = 0; # Disable NMI watchdog (reduces overhead)
|
||||
"vm.vfs_cache_pressure" = 50; # Better file cache retention
|
||||
"vm.dirty_ratio" = 10; # Faster writes to disk
|
||||
"vm.dirty_background_ratio" = 5; # Background write threshold
|
||||
"kernel.sched_autogroup_enabled" = 0; # Better CPU scheduling for gaming
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,19 @@
|
||||
{
|
||||
# NTP configuration - NIST atomic clocks
|
||||
services.timesyncd = {
|
||||
enable = true;
|
||||
servers = [
|
||||
"192.168.0.1"
|
||||
];
|
||||
fallbackServers = [
|
||||
"time-a-g.nist.gov"
|
||||
"time-a.nist.gov"
|
||||
"time-b.nist.gov"
|
||||
"time-c.nist.gov"
|
||||
"time.cloudflare.com"
|
||||
"0.pool.ntp.org"
|
||||
];
|
||||
};
|
||||
time.timeZone = "America/Denver";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
package = pkgs.qemu_kvm;
|
||||
swtpm.enable = true; # This enables TPM support
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user