From af743db51f44945e011d61ec57c91255fdb93a40 Mon Sep 17 00:00:00 2001 From: Varyngoth Date: Sun, 16 Nov 2025 20:01:57 -0400 Subject: [PATCH] First upload --- flakies/flake.lock | 0 flakies/flake.nix | 46 +++ flakies/home-manager/home.nix | 69 ++++ flakies/nixos/configuration.nix | 462 +++++++++++++++++++++++ flakies/nixos/hardware-configuration.nix | 42 +++ 5 files changed, 619 insertions(+) create mode 100644 flakies/flake.lock create mode 100644 flakies/flake.nix create mode 100644 flakies/home-manager/home.nix create mode 100644 flakies/nixos/configuration.nix create mode 100644 flakies/nixos/hardware-configuration.nix diff --git a/flakies/flake.lock b/flakies/flake.lock new file mode 100644 index 0000000..e69de29 diff --git a/flakies/flake.nix b/flakies/flake.nix new file mode 100644 index 0000000..8597a27 --- /dev/null +++ b/flakies/flake.nix @@ -0,0 +1,46 @@ +{ + description = "Edict of Septentrio"; #NixOS Config + + inputs = { + # Core Nixpkgs + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + # Home Manager + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + # Hardware optimizations (optional) + hardware.url = "github:NixOS/nixos-hardware"; + }; + + outputs = { self, nixpkgs, home-manager, hardware, ... }@inputs: { + # ---- NixOS system ---- + nixosConfigurations = { + pantheon = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; # pass flake inputs to configs + modules = [ + ./nixos/configuration.nix + ./nixos/hardware-configuration.nix + + # Integrate Home Manager directly (optional but neat) + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = false; + home-manager.useUserPackages = true; + home-manager.users.me = import ./home-manager/home.nix; + } + # Optional: hardware optimizations + hardware.nixosModules.common-cpu-intel + hardware.nixosModules.common-gpu-amd + ]; + }; + }; + # ---- Standalone Home Manager (for non-NixOS systems or debugging) ---- + homeConfigurations."me@pantheon" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; + extraSpecialArgs = { inherit inputs; }; + modules = [ ./home-manager/home.nix ]; + }; + }; +} \ No newline at end of file diff --git a/flakies/home-manager/home.nix b/flakies/home-manager/home.nix new file mode 100644 index 0000000..ac7a7fc --- /dev/null +++ b/flakies/home-manager/home.nix @@ -0,0 +1,69 @@ +{ config, pkgs, inputs, lib, ... }: + +{ + ########################################################################### + ## User Identity + ########################################################################### + home.username = "me"; + home.homeDirectory = "/home/me"; + home.stateVersion = "22.11"; + + ########################################################################### + ## Nix Settings + ########################################################################### + # Allow unfree packages globally + nixpkgs.config.allowUnfree = true; + nixpkgs.config.allowUnfreePredicate = (_: true); + + # Let Home Manager manage itself + programs.home-manager.enable = true; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + ########################################################################### + ## Core Packages (User Space) + ########################################################################### + home.packages = with pkgs; [ + eza # maintained fork of exa + bat # modern cat + fd # modern find (better performance) + fzf # fuzzy finder + ripgrep # modern grep + jq # JSON processor + tree # directory tree viewer + btop # nice replacement for htop + neofetch # quick system summary + ]; + + # Neovim setup + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + }; + + # Shell configuration + programs.zsh = { + enable = true; + + oh-my-zsh = { + enable = true; + plugins = [ "git" "python" "docker" "fzf" ]; + theme = "dpoggi"; + }; + + # Modern shell aliases — adjusted for renamed tools + shellAliases = { + ls = "eza --icons --group-directories-first"; + ll = "eza -l --icons --group-directories-first"; + la = "eza -la --icons --group-directories-first"; + cat = "bat"; + find = "fd"; + grep = "rg"; + top = "btop"; + }; + }; + # Environment variables + home.sessionVariables = { + EDITOR = "nvim"; + }; +} \ No newline at end of file diff --git a/flakies/nixos/configuration.nix b/flakies/nixos/configuration.nix new file mode 100644 index 0000000..5194134 --- /dev/null +++ b/flakies/nixos/configuration.nix @@ -0,0 +1,462 @@ +Leeroy Jenkins +leeroyjenkins8888 +Invisible + +This is the start of the #nix channel. +Dictator Perpetuo — 11/2/2025 17:57 +Image +Dictator Perpetuo — 11/2/2025 21:14 +https://github.com/MohamadSaada/LogiGSK +GitHub +GitHub - MohamadSaada/LogiGSK: A Linux based software package to co... +A Linux based software package to control led's on Logitech G910, G810, G610 and G410. - MohamadSaada/LogiGSK +A Linux based software package to control led's on Logitech G910, G810, G610 and G410. - MohamadSaada/LogiGSK +Dictator Perpetuo — 11/3/2025 16:09 +https://github.com/nix-community/plasma-manager +GitHub +GitHub - nix-community/plasma-manager: Manage KDE Plasma with Home ... +Manage KDE Plasma with Home Manager [maintainer=@HeitorAugustoLN] - GitHub - nix-community/plasma-manager: Manage KDE Plasma with Home Manager [maintainer=@HeitorAugustoLN] +Manage KDE Plasma with Home Manager [maintainer=@HeitorAugustoLN] - GitHub - nix-community/plasma-manager: Manage KDE Plasma with Home Manager [maintainer=@HeitorAugustoLN] +Dictator Perpetuo — 11/4/2025 16:27 +libvirt +bambu-studio +virt-viewer +Dictator Perpetuo — 11/4/2025 23:50 +ollama-rocm +prismlauncher +obs-studio + environment.systemPackages = with pkgs; [ + # System Tools + vim git wget curl htop lm_sensors + libvirt + virt-viewer + # Testing Tools +Expand +log.txt +1 KB +Dictator Perpetuo — 11/5/2025 00:04 +kubernix +Dictator Perpetuo — 11/5/2025 20:39 +rar +Dictator Perpetuo — 11/6/2025 15:09 +linuxKernel.packages.linux_xanmod_stable.r8125 +gparted +Dictator Perpetuo — 11/6/2025 22:27 +https://github.com/microvm-nix/microvm.nix +GitHub +GitHub - microvm-nix/microvm.nix: NixOS MicroVMs +NixOS MicroVMs. Contribute to microvm-nix/microvm.nix development by creating an account on GitHub. +NixOS MicroVMs. Contribute to microvm-nix/microvm.nix development by creating an account on GitHub. +Dictator Perpetuo — 15:34 +# 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, inputs,... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + inputs.home-manager.nixosModules.home-manager + ]; + + ############################################################ + ## Boot & Kernel + ############################################################ + boot.loader.systemd-boot.enable = false; + + boot.loader = { + grub = { + enable = true; + efiSupport = true; + device = "nodev"; # UEFI system + useOSProber = true; # allow GRUB to detect Windows + default = "Windows Boot Manager"; # set Windows as default + timeout = 5; + configurationLimit = 8; # keep last 8 NixOS generations + }; + + efi.canTouchEfiVariables = true; + }; + + + + # Stable & performance kernel + boot.kernelPackages = pkgs.linuxPackages_zen; # Zen kernel = tuned for desktop latency + + boot = { + kernelModules = [ + "intel_rapl" + "intel_rapl_msr" + ]; + kernelParams = [ + "quiet" + "splash" +# "amdgpu.ppfeaturemask=0xffffffff" # Unlock all AMD power tuning features + "nowatchdog" + "intel_pstate=active" +# "intel_pstate=disable" +# "acpi=force" + "intel_pstate=enable_hwp" + "amdgpu.gpu_recovery=1" + "drm.debug=0x1ff" + ]; + }; + + # Enable early KMS for amdgpu + boot.initrd.kernelModules = [ "amdgpu" ]; + + ############################################################ + ## Hardware (AMD GPU + Vulkan + OpenCL + Power | Intel CPU + Power + Microcode) + ############################################################ + hardware = { + graphics = { + enable = true; # KMS + OpenGL + enable32Bit = true; # 32-bit support for Steam / Wine + }; + + # Optional: ROCm compute support + amdgpu.opencl = { + enable = true; # OpenCL / GPU compute + }; + + cpu.intel.updateMicrocode = true; + }; + + powerManagement = { + cpuFreqGovernor = "performance"; + }; + + services.thermald.enable = true; + + systemd.tmpfiles.rules = [ + # PL1 = 125W + "w /sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw - - - - 125000000" + + # PL2 = 150W + "w /sys/class/powercap/intel-rapl:0/constraint_1_power_limit_uw - - - - 150000000" + + # constraint_2 = extra turbo limiter = 160W + "w /sys/class/powercap/intel-rapl:0/constraint_2_power_limit_uw - - - - 160000000" + ]; + + ############################################################ + ## Networking + ############################################################ + networking = { + hostName = "pantheon"; + networkmanager = { + enable = true; +... (206 lines left) +Collapse +configuration.nix +9 KB + +# 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, inputs,... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + inputs.home-manager.nixosModules.home-manager + ]; + + ############################################################ + ## Boot & Kernel + ############################################################ + boot.loader.systemd-boot.enable = false; + + boot.loader = { + grub = { + enable = true; + efiSupport = true; + device = "nodev"; # UEFI system + useOSProber = true; # allow GRUB to detect Windows + default = "Windows Boot Manager"; # set Windows as default + timeout = 5; + configurationLimit = 8; # keep last 8 NixOS generations + }; + + efi.canTouchEfiVariables = true; + }; + + + + # Stable & performance kernel + boot.kernelPackages = pkgs.linuxPackages_zen; # Zen kernel = tuned for desktop latency + + boot = { + kernelModules = [ + "intel_rapl" + "intel_rapl_msr" + ]; + kernelParams = [ + "quiet" + "splash" +# "amdgpu.ppfeaturemask=0xffffffff" # Unlock all AMD power tuning features + "nowatchdog" + "intel_pstate=active" +# "intel_pstate=disable" +# "acpi=force" + "intel_pstate=enable_hwp" + "amdgpu.gpu_recovery=1" + "drm.debug=0x1ff" + ]; + }; + + # Enable early KMS for amdgpu + boot.initrd.kernelModules = [ "amdgpu" ]; + + ############################################################ + ## Hardware (AMD GPU + Vulkan + OpenCL + Power | Intel CPU + Power + Microcode) + ############################################################ + hardware = { + graphics = { + enable = true; # KMS + OpenGL + enable32Bit = true; # 32-bit support for Steam / Wine + }; + + # Optional: ROCm compute support + amdgpu.opencl = { + enable = true; # OpenCL / GPU compute + }; + + cpu.intel.updateMicrocode = true; + }; + + powerManagement = { + cpuFreqGovernor = "performance"; + }; + + services.thermald.enable = true; + + systemd.tmpfiles.rules = [ + # PL1 = 125W + "w /sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw - - - - 125000000" + + # PL2 = 150W + "w /sys/class/powercap/intel-rapl:0/constraint_1_power_limit_uw - - - - 150000000" + + # constraint_2 = extra turbo limiter = 160W + "w /sys/class/powercap/intel-rapl:0/constraint_2_power_limit_uw - - - - 160000000" + ]; + + ############################################################ + ## Networking + ############################################################ + networking = { + hostName = "pantheon"; + networkmanager = { + enable = true; + }; + extraHosts = '' + 192.168.2.69 labyrinth + 192.168.2.169 labyrinth.new + 192.168.2.73 knossos + ''; + firewall = { + trustedInterfaces = [ "enp6s0" "enp7s0" "virbr0" ]; + }; + }; + + # Set your time zone & select internationalisation properties + time.timeZone = "America/Halifax"; + i18n.defaultLocale = "en_CA.UTF-8"; + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + ############################################################ + ## User Configuration + ############################################################ + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.me = { + isNormalUser = true; + description = "me"; + extraGroups = [ "networkmanager" "wheel" "video" "audio" "input" "libvirtd" "storage" "realtime" ]; + packages = with pkgs; []; + shell = pkgs.zsh; + linger = true; + }; + + ############################################################ + ## Desktop Environment: KDE Plasma 6 + Wayland + ############################################################ + services.displayManager.sddm = { + enable = true; + wayland.enable = true; + autoNumlock = true; + }; + + services.desktopManager.plasma6 = { + enable = true; + enableQt5Integration = true; + }; + + # Default to Wayland session + environment.sessionVariables = { + XDG_SESSION_TYPE = "wayland"; + MOZ_ENABLE_WAYLAND = "1"; + QT_QPA_PLATFORM = "wayland"; + SDL_VIDEODRIVER = "wayland"; + CLUTTER_BACKEND = "wayland"; + ELECTRON_OZONE_PLATFORM_HINT = "wayland"; + }; + + ############################################################ + ## Audio: PipeWire + Low-Latency + ############################################################ + security.rtkit.enable = true; + services.pipewire = { + enable = true; # if not already enabled + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment the following + #jack.enable = true; + }; + + ############################################################ + ## Programs & Services + ############################################################ + # Programs + programs.dconf.enable = true; + programs.zsh.enable = true; + programs.gamemode.enable = true; + programs.steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers + gamescopeSession.enable = true; + }; + programs.xwayland.enable = true; # fallback for legacy apps + + # Services + services.tailscale.enable = true; + services.openssh.enable = true; + services.libinput = { + enable = true; + mouse = { + accelProfile = "flat"; # disables acceleration + }; + }; + + virtualisation = { + libvirtd = { + enable = true; + qemu = { + swtpm.enable = true; + }; + }; + docker = { + enable = true; + enableOnBoot = false; + }; + spiceUSBRedirection.enable = true; + }; + services.spice-vdagentd.enable = true; + + + ############################################################ + ## System-wide Packages + ############################################################ + nixpkgs.config.allowUnfree = true; +# nixpkgs.config.allowBroken = true; + + environment.systemPackages = with pkgs; [ +############## System Tools + vim git wget curl htop + ntfs3g + ffmpeg_6-full + linuxKernel.packages.linux_xanmod_stable.r8125 +############## Testing Tools + hwinfo + mcelog + pavucontrol + alsa-utils + wireplumber + gparted + powerstat + radeontop + lm_sensors +############## Network Tools +# tailscale +# wireguard-tools + dnsmasq +############## AI / ML Tools +# ollama-rocm +############## Media Packages + vivaldi +# jellyfin-media-player + discord + heroic + vlc + gamemode +# emulationstation-de +# qbittorrent + quodlibet + prismlauncher + #yt-dlp +############## Programming Tools + vscodium + python3 +############## Workstation Tools + davinci-resolve-studio + freecad-qt6 +# cura + libreoffice-qt6-fresh + handbrake + bambu-studio + obs-studio +############## Virtualisation Tools +# wine + virt-manager + virt-viewer + spice + spice-gtk + spice-protocol + virtio-win + win-spice + adwaita-icon-theme + qemu + ]; + + ############################################################ + ## Filesystems + ############################################################ + + fileSystems."/mnt/nix_bulk0" = { + device = "/dev/disk/by-uuid/f2c89abd-bab6-42d7-84d7-31eef0859eba"; + fsType = "ext4"; + options = [ "rw" "noatime" "users" "exec" ]; + }; + + ############################################################ + ## 🧩 Miscellaneous + ############################################################ + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "25.05"; # Did you read the comment? +} +configuration.nix +9 KB \ No newline at end of file diff --git a/flakies/nixos/hardware-configuration.nix b/flakies/nixos/hardware-configuration.nix new file mode 100644 index 0000000..f8e02d2 --- /dev/null +++ b/flakies/nixos/hardware-configuration.nix @@ -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" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/ac24c178-1c47-410a-8096-90e026e6822b"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/1130-CB30"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/2d17f092-1d28-4098-8e1f-df91ef310600"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp6s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp7s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp8s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}